trdr-ds-install 1.11.0 → 2.0.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/package.json +1 -1
- package/plugins/trdr-design-system/skills/trdr-ds/SKILL.md +165 -3228
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/abas.json +36 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/badge.json +139 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/boleta.json +121 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/button.json +166 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/card.json +55 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/checkbox.json +82 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/combo-input.json +79 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/copy-button.json +88 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/dropdown.json +94 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/floating-menu.json +151 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/header.json +141 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/janela.json +245 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/news-card.json +124 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/radio-button.json +97 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/search-input.json +69 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/segmented-control.json +60 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/sidebar.json +109 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/stat-card.json +90 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/sub-menu-item.json +45 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/switch.json +89 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/tabela-cotacoes.json +91 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/tabela-ordens.json +81 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/table.json +119 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/text-input.json +159 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/components/tooltip.json +88 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/index.json +262 -0
- package/plugins/trdr-design-system/skills/trdr-ds/data/mappings.json +183 -0
- package/plugins/trdr-design-system/skills/trdr-ds/modes/report.md +139 -0
- package/plugins/trdr-design-system/skills/trdr-ds/modes/resume.md +46 -0
- package/plugins/trdr-design-system/skills/trdr-ds/modes/rollback.md +55 -0
- package/plugins/trdr-design-system/skills/trdr-ds/modes/status.md +37 -0
- package/plugins/trdr-design-system/skills/trdr-ds/modes/sync.md +48 -0
- package/plugins/trdr-design-system/skills/trdr-ds/phases/analyze.md +305 -0
- package/plugins/trdr-design-system/skills/trdr-ds/phases/components.md +204 -0
- package/plugins/trdr-design-system/skills/trdr-ds/phases/final.md +209 -0
- package/plugins/trdr-design-system/skills/trdr-ds/phases/foundation.md +195 -0
- package/plugins/trdr-design-system/skills/trdr-ds/phases/violations.md +183 -0
- package/plugins/trdr-design-system/skills/trdr-ds/templates/claude-md.md +88 -0
- package/plugins/trdr-design-system/skills/trdr-ds/templates/ds-analysis.md +88 -0
- package/plugins/trdr-design-system/skills/trdr-ds/templates/ds-migration.md +59 -0
- package/plugins/trdr-design-system/skills/trdr-ds/templates/ds-progress.md +57 -0
- package/plugins/trdr-design-system/skills/trdr-ds/templates/sprint-plan.md +68 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "checkbox",
|
|
3
|
+
"name": "Checkbox",
|
|
4
|
+
"figmaId": "1462:18059",
|
|
5
|
+
"category": "formulario",
|
|
6
|
+
"description": "Caixa de seleção com 3 estados: Checked, Unchecked e Mixed (indeterminado). 16×16px, border-radius 5px.",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Type",
|
|
10
|
+
"type": "enum",
|
|
11
|
+
"values": [
|
|
12
|
+
"Checked",
|
|
13
|
+
"Unchecked",
|
|
14
|
+
"Mixed"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "State",
|
|
19
|
+
"type": "enum",
|
|
20
|
+
"values": [
|
|
21
|
+
"Default",
|
|
22
|
+
"Focused"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "Disabled",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"values": [
|
|
29
|
+
"true",
|
|
30
|
+
"false"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"dimensions": [
|
|
35
|
+
{
|
|
36
|
+
"label": "Box",
|
|
37
|
+
"width": "16px",
|
|
38
|
+
"height": "16px"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"tokens": [
|
|
42
|
+
{
|
|
43
|
+
"property": "BG Checked / Mixed",
|
|
44
|
+
"token": "action-brand-default",
|
|
45
|
+
"value": "#00D4FF"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"property": "BG Unchecked",
|
|
49
|
+
"token": "surface-secondary",
|
|
50
|
+
"value": "#222222"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"property": "Border padrão",
|
|
54
|
+
"token": "border-default",
|
|
55
|
+
"value": "#4A4A4A"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"property": "Border hover",
|
|
59
|
+
"token": "border-strong",
|
|
60
|
+
"value": "#A4A4A4"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"property": "Focus ring",
|
|
64
|
+
"token": "border-focus",
|
|
65
|
+
"value": "#00D4FF"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"property": "Check / Dash",
|
|
69
|
+
"token": "—",
|
|
70
|
+
"value": "#FFFFFF"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"anatomy": "[label cursor=pointer gap=8px]\n └── [input type=checkbox hidden]\n └── [Box 16×16px border-radius=5px]\n └── [Checkmark SVG 8×7px | Dash SVG 8×2px (mixed)]\n └── [Label 12px/500]",
|
|
74
|
+
"implemented": true,
|
|
75
|
+
"code": {
|
|
76
|
+
"html": "<!-- Checked -->\n<label class=\"trdr-checkbox\">\n <input type=\"checkbox\" checked />\n <span class=\"trdr-checkbox-box trdr-checkbox-checked\">\n <svg width=\"8\" height=\"7\" viewBox=\"0 0 8 7\" fill=\"none\">\n <path d=\"M1 3L3 5.5L7 1\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </span>\n <span>Aceitar termos</span>\n</label>\n\n<!-- Unchecked -->\n<label class=\"trdr-checkbox\">\n <input type=\"checkbox\" />\n <span class=\"trdr-checkbox-box\"></span>\n <span>Receber atualizações</span>\n</label>\n\n<!-- Mixed (indeterminado) -->\n<label class=\"trdr-checkbox\">\n <input type=\"checkbox\" />\n <span class=\"trdr-checkbox-box trdr-checkbox-checked trdr-checkbox-mixed\">\n <svg width=\"8\" height=\"2\" viewBox=\"0 0 8 2\" fill=\"none\">\n <path d=\"M1 1H7\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\"/>\n </svg>\n </span>\n <span>Selecionar todos</span>\n</label>",
|
|
77
|
+
"css": ".trdr-checkbox {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n user-select: none;\n}\n\n.trdr-checkbox-box {\n flex-shrink: 0;\n width: 16px; height: 16px;\n border-radius: 5px; /* Não é --radius-sm */\n border: 1px solid var(--border-default); /* #4A4A4A */\n background: var(--surface-secondary); /* #222222 */\n display: flex; align-items: center; justify-content: center;\n transition: background 0.12s ease, border-color 0.12s ease;\n}\n\n.trdr-checkbox:hover .trdr-checkbox-box { border-color: var(--border-strong); }\n\n.trdr-checkbox-box.trdr-checkbox-checked {\n background: var(--action-brand-default); /* #00D4FF */\n border-color: var(--action-brand-default);\n}\n\n.trdr-checkbox input:focus-visible ~ .trdr-checkbox-box {\n outline: 2px solid var(--border-focus); /* #00D4FF */\n outline-offset: 2px;\n}",
|
|
78
|
+
"react": "import Checkbox from '@/components/ui/Checkbox'\nimport { useState } from 'react'\n\nexport default function Example() {\n const [terms, setTerms] = useState(false)\n const [updates, setUpdates] = useState<boolean | 'mixed'>('mixed')\n\n return (\n <>\n <Checkbox checked={terms} onChange={setTerms} label=\"Aceitar termos\" />\n <Checkbox checked={updates} onChange={(v) => setUpdates(v)} label=\"Selecionar todos\" />\n <Checkbox checked={false} onChange={() => {}} label=\"Desativado\" disabled />\n </>\n )\n}",
|
|
79
|
+
"prompt": "Implemente o componente Checkbox do Design System TRDR.\n\nESPECIFICAÇÕES PIXEL-PERFECT:\n- Box: 16×16px, border-radius: 5px (fixo, não token)\n- Gap label: 8px\n- Checkmark SVG: 8×7px, traço branco (stroke 1.5)\n- Mixed (indeterminado): traço horizontal 8×2px branco\n\nTOKENS OBRIGATÓRIOS:\n- BG Checked/Mixed: --action-brand-default (#00D4FF)\n- BG Unchecked: --surface-secondary (#222222)\n- Border padrão: --border-default (#4A4A4A)\n- Border hover: --border-strong (#A4A4A4)\n- Focus ring: outline 2px --border-focus (#00D4FF) offset 2px\n- Check/Dash: #FFFFFF\n\nESTADOS:\n- checked=true: bg + border = action-brand-default, checkmark SVG visível\n- checked='mixed': mesmo visual de checked + dash horizontal\n- :hover → border-strong\n- :focus-visible → outline border-focus\n- disabled: opacity 0.5, cursor not-allowed"
|
|
80
|
+
},
|
|
81
|
+
"dependencies": []
|
|
82
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "combo-input",
|
|
3
|
+
"name": "Combo Input",
|
|
4
|
+
"figmaId": "1551:11643",
|
|
5
|
+
"category": "formulario",
|
|
6
|
+
"description": "Input numérico split: área de valor (flex-1) + botão chevron (24×24px) separados por 1px gap. Altura 24px.",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "State",
|
|
10
|
+
"type": "enum",
|
|
11
|
+
"values": [
|
|
12
|
+
"Default",
|
|
13
|
+
"Hover",
|
|
14
|
+
"Selected Input",
|
|
15
|
+
"Selected Chevron"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Icon Lead",
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"values": [
|
|
22
|
+
"true",
|
|
23
|
+
"false"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"dimensions": [
|
|
28
|
+
{
|
|
29
|
+
"label": "Altura",
|
|
30
|
+
"height": "24px"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"label": "Chevron",
|
|
34
|
+
"width": "24px",
|
|
35
|
+
"height": "24px"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"tokens": [
|
|
39
|
+
{
|
|
40
|
+
"property": "BG value",
|
|
41
|
+
"token": "surface-primary",
|
|
42
|
+
"value": "#4A4A4A"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"property": "BG chevron default",
|
|
46
|
+
"token": "surface-primary",
|
|
47
|
+
"value": "#4A4A4A"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"property": "Chevron border",
|
|
51
|
+
"token": "border-focus",
|
|
52
|
+
"value": "#00D4FF"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"property": "Border hover",
|
|
56
|
+
"token": "border-strong",
|
|
57
|
+
"value": "#A4A4A4"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"property": "Selected chevron bg",
|
|
61
|
+
"token": "surface-brand",
|
|
62
|
+
"value": "#00D4FF29"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"property": "Texto",
|
|
66
|
+
"token": "content-primary",
|
|
67
|
+
"value": "#FFFFFF"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"anatomy": "[div display=flex gap=1px height=24px]\n └── [Input Value: flex=1, radius=5px 0 0 5px, bg=surface-primary]\n └── [Icon Lead 24×24px opcional]\n └── [Valor numérico 12px/500]\n └── [Chevron: 24×24px, radius=0 5px 5px 0, border=border-focus]\n └── [ChevronDown SVG]",
|
|
71
|
+
"implemented": true,
|
|
72
|
+
"code": {
|
|
73
|
+
"html": "<!-- Default -->\n<div class=\"trdr-combo-input\">\n <div class=\"trdr-combo-input-value\">16</div>\n <button class=\"trdr-combo-input-chevron\" aria-label=\"Abrir opções\">\n <svg width=\"10\" height=\"6\" viewBox=\"0 0 10 6\" fill=\"none\">\n <path d=\"M1 1L5 5L9 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n</div>\n\n<!-- Hover -->\n<div class=\"trdr-combo-input trdr-combo-input-hover\">\n <div class=\"trdr-combo-input-value\">16</div>\n <button class=\"trdr-combo-input-chevron\">...</button>\n</div>\n\n<!-- Selected Input -->\n<div class=\"trdr-combo-input trdr-combo-input-selected-input\">\n <div class=\"trdr-combo-input-value\">16</div>\n <button class=\"trdr-combo-input-chevron\">...</button>\n</div>",
|
|
74
|
+
"css": ".trdr-combo-input {\n display: inline-flex;\n align-items: stretch;\n gap: 1px; /* Split visual */\n height: 24px;\n font-family: var(--font-secondary);\n font-size: 12px; font-weight: 500;\n color: var(--content-primary);\n}\n\n.trdr-combo-input-value {\n flex: 1;\n display: flex; align-items: center;\n background-color: var(--surface-primary); /* #4A4A4A */\n border: 1px solid transparent;\n border-right: none;\n border-radius: 5px 0 0 5px;\n padding: 0 0 0 var(--spacing-sm);\n transition: border-color 0.12s ease;\n}\n\n.trdr-combo-input-chevron {\n width: 24px; height: 24px;\n display: flex; align-items: center; justify-content: center;\n background-color: var(--surface-primary);\n border: 1px solid var(--border-focus); /* Sempre com borda focus */\n border-radius: 0 5px 5px 0;\n cursor: pointer;\n color: var(--content-tertiary);\n}\n\n.trdr-combo-input-hover .trdr-combo-input-value { border-color: var(--border-strong); }\n.trdr-combo-input-selected-input .trdr-combo-input-value { border-color: var(--border-focus); }\n.trdr-combo-input-selected-input .trdr-combo-input-chevron { border-color: transparent; }\n.trdr-combo-input-selected-chevron .trdr-combo-input-chevron { background: var(--surface-brand); }",
|
|
75
|
+
"react": "import ComboInput from '@/components/ui/ComboInput'\nimport { useState } from 'react'\n\nexport default function Example() {\n const [value, setValue] = useState('16')\n\n return (\n <>\n <ComboInput value={value} />\n <ComboInput value=\"32\" state=\"hover\" />\n <ComboInput value=\"8\" state=\"selected-input\" />\n <ComboInput value=\"16\" state=\"selected-chevron\" onChevronClick={() => console.log('abrir menu')} />\n </>\n )\n}",
|
|
76
|
+
"prompt": "Implemente o componente ComboInput do Design System TRDR.\n\nESPECIFICAÇÕES PIXEL-PERFECT:\n- Container: display=flex, gap=1px, height=24px\n- Input Value: flex=1, padding-left=8px, border-radius=5px 0 0 5px\n- Chevron: width=24px, height=24px, border-radius=0 5px 5px 0\n\nTOKENS OBRIGATÓRIOS:\n- BG ambas as seções: --surface-primary (#4A4A4A)\n- Chevron border PADRÃO: --border-focus (#00D4FF) — SEMPRE ciano por padrão\n- Border hover: --border-strong (#A4A4A4) na seção input\n- Selected Input: border-focus na seção input, chevron sem borda\n- Selected Chevron: --surface-brand (#00D4FF29) no chevron\n\nCOMPORTAMENTO:\n- O gap de 1px entre seções cria o \"split\" visual\n- O chevron sempre tem borda focus no estado default (design TRDR)\n- Selecionar o input ativa borda focus na seção esquerda"
|
|
77
|
+
},
|
|
78
|
+
"dependencies": []
|
|
79
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "copy-button",
|
|
3
|
+
"name": "CopyButton",
|
|
4
|
+
"figmaId": "—",
|
|
5
|
+
"category": "outros",
|
|
6
|
+
"description": "Botão de copiar para clipboard com feedback visual. Ícone copy → check ao clicar, com transição de cor. 2 tamanhos (default 28px, sm 20px).",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Size",
|
|
10
|
+
"type": "enum",
|
|
11
|
+
"values": [
|
|
12
|
+
"Default",
|
|
13
|
+
"Small"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "State",
|
|
18
|
+
"type": "enum",
|
|
19
|
+
"values": [
|
|
20
|
+
"Idle",
|
|
21
|
+
"Copied"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"dimensions": [
|
|
26
|
+
{
|
|
27
|
+
"label": "Default",
|
|
28
|
+
"width": "28px",
|
|
29
|
+
"height": "28px"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"label": "Small",
|
|
33
|
+
"width": "20px",
|
|
34
|
+
"height": "20px"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"tokens": [
|
|
38
|
+
{
|
|
39
|
+
"property": "Icon color",
|
|
40
|
+
"token": "content-tertiary",
|
|
41
|
+
"value": "#A4A4A4"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"property": "Icon hover",
|
|
45
|
+
"token": "content-primary",
|
|
46
|
+
"value": "#FFFFFF"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"property": "BG hover",
|
|
50
|
+
"token": "surface-secondary",
|
|
51
|
+
"value": "#222222"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"property": "Border hover",
|
|
55
|
+
"token": "border-default",
|
|
56
|
+
"value": "#4A4A4A"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"property": "Copied color",
|
|
60
|
+
"token": "content-success",
|
|
61
|
+
"value": "#4FE290"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"property": "Copied BG",
|
|
65
|
+
"token": "surface-success",
|
|
66
|
+
"value": "#4FE29014"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"property": "Copied border",
|
|
70
|
+
"token": "content-success",
|
|
71
|
+
"value": "#4FE290"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"property": "Border radius",
|
|
75
|
+
"token": "radius-sm",
|
|
76
|
+
"value": "4px"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"anatomy": "[button.trdr-copy-btn .trdr-copy-btn-sm?]\n └── [svg 14×14 (default) / 12×12 (sm)]\n ├── idle: ícone copy (rect + path)\n └── copied: ícone check (polyline)\n\nDefault: 28×28px, border-radius radius-sm, bg transparent, border 1px transparent\nSmall: 20×20px, svg 12×12px\nHover: icon primary, bg surface-secondary, border border-default\nCopied: icon + border content-success, bg surface-success — auto-reset 1.5s",
|
|
80
|
+
"implemented": true,
|
|
81
|
+
"code": {
|
|
82
|
+
"html": "<!-- Default -->\n<button class=\"trdr-copy-btn\" title=\"Copiar\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n</button>\n\n<!-- Small -->\n<button class=\"trdr-copy-btn trdr-copy-btn-sm\" title=\"Copiar\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n</button>\n\n<!-- Estado copiado (class .copied) -->\n<button class=\"trdr-copy-btn copied\" title=\"Copiado!\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n</button>",
|
|
83
|
+
"css": ".trdr-copy-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: var(--radius-sm);\n background: transparent;\n color: var(--content-tertiary);\n border: 1px solid transparent;\n transition: all 0.15s ease;\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.trdr-copy-btn:hover {\n color: var(--content-primary);\n background-color: var(--surface-secondary);\n border-color: var(--border-default);\n}\n\n.trdr-copy-btn.copied {\n color: var(--content-success);\n background-color: var(--surface-success);\n border-color: var(--content-success);\n}\n\n.trdr-copy-btn-sm {\n width: 20px;\n height: 20px;\n}\n\n.trdr-copy-btn-sm svg {\n width: 12px;\n height: 12px;\n}",
|
|
84
|
+
"react": "import CopyButton from '@/components/ui/CopyButton'\n\nexport default function Example() {\n return (\n <>\n {/* Default (28px) */}\n <CopyButton text=\"--bg-primary\" label=\"Token\" />\n\n {/* Small (20px) */}\n <CopyButton text=\"--bg-primary\" label=\"Token\" size=\"sm\" />\n </>\n )\n}",
|
|
85
|
+
"prompt": "Implemente o componente CopyButton do Design System TRDR.\n\nESPECIFICAÇÕES:\n- Default: 28×28px, border-radius var(--radius-sm), bg transparent, border 1px transparent\n- Small: 20×20px, svg 12×12px (classe .trdr-copy-btn-sm)\n- Ícone SVG inline: copy (rect + path) → check (polyline) ao copiar\n- Auto-reset para idle após 1.5s\n\nESTADOS:\n- Idle: cor --content-tertiary\n- Hover: cor --content-primary, bg --surface-secondary, border --border-default\n- Copied: cor --content-success, bg --surface-success, border --content-success\n\nTOKENS OBRIGATÓRIOS:\n- --content-tertiary (#A4A4A4) — ícone idle\n- --content-primary (#FFFFFF) — ícone hover\n- --surface-secondary (#222222) — bg hover\n- --border-default (#4A4A4A) — border hover\n- --content-success (#4FE290) — ícone/border copied\n- --surface-success (#4FE29014) — bg copied\n- --radius-sm (4px)\n\nNOTAS:\n- Usa navigator.clipboard.writeText com fallback document.execCommand\n- NUNCA usar hex direto. NUNCA usar --scale-spacing-*."
|
|
86
|
+
},
|
|
87
|
+
"dependencies": []
|
|
88
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "dropdown",
|
|
3
|
+
"name": "Dropdown",
|
|
4
|
+
"figmaId": "1462:16743",
|
|
5
|
+
"category": "formulario",
|
|
6
|
+
"description": "Seletor com chevron, 2 tamanhos (Default 24px / Large 32px) e 3 estados. Suporta stroke, sem stroke e icon lead. Abre um floating menu com opções.",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Size",
|
|
10
|
+
"type": "enum",
|
|
11
|
+
"values": [
|
|
12
|
+
"Default",
|
|
13
|
+
"Large"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "State",
|
|
18
|
+
"type": "enum",
|
|
19
|
+
"values": [
|
|
20
|
+
"Default",
|
|
21
|
+
"Focused",
|
|
22
|
+
"Active",
|
|
23
|
+
"Disabled"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Stroke",
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"values": [
|
|
30
|
+
"true",
|
|
31
|
+
"false"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Icon Lead",
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"values": [
|
|
38
|
+
"true",
|
|
39
|
+
"false"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"dimensions": [
|
|
44
|
+
{
|
|
45
|
+
"label": "Default",
|
|
46
|
+
"height": "24px"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"label": "Large",
|
|
50
|
+
"height": "32px"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"tokens": [
|
|
54
|
+
{
|
|
55
|
+
"property": "Background",
|
|
56
|
+
"token": "surface-primary",
|
|
57
|
+
"value": "#4A4A4A"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"property": "Border padrão",
|
|
61
|
+
"token": "border-strong",
|
|
62
|
+
"value": "#A4A4A4"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"property": "Border focused/active",
|
|
66
|
+
"token": "border-focus",
|
|
67
|
+
"value": "#00D4FF"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"property": "Texto",
|
|
71
|
+
"token": "content-primary",
|
|
72
|
+
"value": "#FFFFFF"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"property": "Texto disabled",
|
|
76
|
+
"token": "content-tertiary",
|
|
77
|
+
"value": "#A4A4A4"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"property": "Chevron",
|
|
81
|
+
"token": "content-tertiary",
|
|
82
|
+
"value": "#A4A4A4"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"anatomy": "[button display=inline-flex border-radius=5px]\n └── [Icon Lead 24×24px opcional]\n └── [Label flex=1 overflow=ellipsis]\n └── [Chevron Down 24×24px]",
|
|
86
|
+
"implemented": true,
|
|
87
|
+
"code": {
|
|
88
|
+
"html": "<!-- Default -->\n<button class=\"trdr-dropdown\">\n <span class=\"trdr-dropdown-label\">Mercado</span>\n <span class=\"trdr-dropdown-chevron\">\n <svg width=\"10\" height=\"6\" viewBox=\"0 0 10 6\" fill=\"none\">\n <path d=\"M1 1L5 5L9 1\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </span>\n</button>\n\n<!-- Large -->\n<button class=\"trdr-dropdown trdr-dropdown-lg\">\n <span class=\"trdr-dropdown-label\">Instrumento</span>\n <span class=\"trdr-dropdown-chevron\">...</span>\n</button>\n\n<!-- Disabled -->\n<button class=\"trdr-dropdown\" disabled>\n <span class=\"trdr-dropdown-label\">Indisponível</span>\n <span class=\"trdr-dropdown-chevron\">...</span>\n</button>",
|
|
89
|
+
"css": ".trdr-dropdown {\n display: inline-flex;\n align-items: center;\n background-color: var(--surface-primary); /* #4A4A4A */\n border: 1px solid var(--border-strong); /* #A4A4A4 */\n border-radius: 5px;\n height: 24px;\n padding: 0 4px 0 var(--spacing-sm); /* right=4px, left=8px */\n font-family: var(--font-secondary);\n font-size: 12px;\n font-weight: 500;\n color: var(--content-primary); /* #FFFFFF */\n cursor: pointer;\n min-width: 80px;\n transition: border-color 0.15s ease;\n}\n\n.trdr-dropdown-lg { height: 32px; }\n.trdr-dropdown-no-stroke { border-color: transparent; }\n.trdr-dropdown-active { border-color: var(--border-focus); } /* #00D4FF */\n\n.trdr-dropdown:hover:not(:disabled) { border-color: var(--border-focus); }\n.trdr-dropdown:focus-visible { outline: none; border-color: var(--border-focus); }\n.trdr-dropdown:disabled { color: var(--content-tertiary); cursor: not-allowed; }\n\n.trdr-dropdown-label {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.trdr-dropdown-chevron {\n flex-shrink: 0;\n width: 24px; height: 24px;\n display: flex; align-items: center; justify-content: center;\n color: var(--content-tertiary);\n}",
|
|
90
|
+
"react": "import Dropdown from '@/components/ui/Dropdown'\nimport { useState } from 'react'\n\nexport default function Example() {\n const [value, setValue] = useState('WINQ25')\n\n return (\n <>\n {/* Default size */}\n <Dropdown value={value} size=\"default\" />\n\n {/* Large size */}\n <Dropdown value=\"WINFUT\" size=\"lg\" />\n\n {/* Sem borda */}\n <Dropdown value=\"Mercado\" stroke={false} />\n\n {/* Disabled */}\n <Dropdown value=\"Indisponível\" disabled />\n\n {/* Active (aberto) */}\n <Dropdown value={value} state=\"active\" />\n </>\n )\n}",
|
|
91
|
+
"prompt": "Implemente o componente Dropdown do Design System TRDR.\n\nESPECIFICAÇÕES PIXEL-PERFECT:\n- Default: 24px altura | Large: 32px altura\n- Padding: left=8px (--spacing-sm), right=4px\n- Border-radius: 5px (não é --radius-sm, é 5px fixo)\n- Font: 12px / 500 / --font-secondary\n\nTOKENS OBRIGATÓRIOS:\n- Background: --surface-primary (#4A4A4A)\n- Border padrão: --border-strong (#A4A4A4)\n- Border focused/active: --border-focus (#00D4FF)\n- Texto: --content-primary (#FFFFFF)\n- Texto disabled: --content-tertiary (#A4A4A4)\n- Chevron: --content-tertiary (#A4A4A4)\n\nESTRUTURA:\n- Container: button com flex, border, bg\n- Label: flex=1 com text-overflow ellipsis\n- Chevron: 24×24px, SVG path chevron-down\n\nCOMPORTAMENTO:\n- :hover → border-color: --border-focus\n- :focus-visible → outline: none, border-color: --border-focus\n- .trdr-dropdown-active → border-color: --border-focus\n- :disabled → content-tertiary, cursor not-allowed\n- Variante sem-stroke: border-color transparent"
|
|
92
|
+
},
|
|
93
|
+
"dependencies": []
|
|
94
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "floating-menu",
|
|
3
|
+
"name": "Floating Menu",
|
|
4
|
+
"figmaId": "1921:55380",
|
|
5
|
+
"category": "floating-menu",
|
|
6
|
+
"implemented": true,
|
|
7
|
+
"description": "Menu flutuante genérico do TRDR — compound component com Item, Title e Divider. Cobre desde listas simples de ações até menus seccionados com ícones Material Symbols. Usado em Janela, seletor de ativo, configurações, indicadores e notificações.",
|
|
8
|
+
"props": [
|
|
9
|
+
{
|
|
10
|
+
"name": "width",
|
|
11
|
+
"type": "number | string",
|
|
12
|
+
"values": [
|
|
13
|
+
"172",
|
|
14
|
+
"240",
|
|
15
|
+
"260",
|
|
16
|
+
"280",
|
|
17
|
+
"300",
|
|
18
|
+
"auto"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "children",
|
|
23
|
+
"type": "ReactNode",
|
|
24
|
+
"values": [
|
|
25
|
+
"FloatingMenu.Item, FloatingMenu.Title, FloatingMenu.Divider, custom content"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Item.icon",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"values": [
|
|
32
|
+
"nome do Material Symbols (ex: \"close\", \"star\", \"search\")"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "Item.disabled",
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"values": [
|
|
39
|
+
"true",
|
|
40
|
+
"false"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "Item.onClick",
|
|
45
|
+
"type": "function",
|
|
46
|
+
"values": [
|
|
47
|
+
"() => void"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "Title.size",
|
|
52
|
+
"type": "enum",
|
|
53
|
+
"values": [
|
|
54
|
+
"\"default\" (14px)",
|
|
55
|
+
"\"sm\" (10px)"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"dimensions": [
|
|
60
|
+
{
|
|
61
|
+
"label": "Item height",
|
|
62
|
+
"width": "—",
|
|
63
|
+
"height": "32px"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"label": "Menu padding",
|
|
67
|
+
"width": "8px",
|
|
68
|
+
"height": "8px"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"label": "Ações da janela (5 itens)",
|
|
72
|
+
"width": "172px",
|
|
73
|
+
"height": "192px"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"label": "Notificações (4 itens)",
|
|
77
|
+
"width": "300px",
|
|
78
|
+
"height": "182px"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"label": "Configurações (5 itens + dropdown)",
|
|
82
|
+
"width": "260px",
|
|
83
|
+
"height": "239px"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"tokens": [
|
|
87
|
+
{
|
|
88
|
+
"property": "Menu background",
|
|
89
|
+
"token": "bg.secondary",
|
|
90
|
+
"value": "#141519"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"property": "Menu border",
|
|
94
|
+
"token": "border.subtle",
|
|
95
|
+
"value": "#222222"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"property": "Menu border-radius",
|
|
99
|
+
"token": "radius.md",
|
|
100
|
+
"value": "8px"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"property": "Item border-radius",
|
|
104
|
+
"token": "radius.sm",
|
|
105
|
+
"value": "4px"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"property": "Item label color",
|
|
109
|
+
"token": "content.secondary",
|
|
110
|
+
"value": "#E8E8E8"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"property": "Item icon color",
|
|
114
|
+
"token": "content.tertiary",
|
|
115
|
+
"value": "#A4A4A4"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"property": "Item hover background",
|
|
119
|
+
"token": "surface.secondary",
|
|
120
|
+
"value": "#222222"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"property": "Title color",
|
|
124
|
+
"token": "content.tertiary",
|
|
125
|
+
"value": "#A4A4A4"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"property": "Divider color",
|
|
129
|
+
"token": "border.subtle",
|
|
130
|
+
"value": "#222222"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"property": "Menu gap",
|
|
134
|
+
"token": "spacing.xs",
|
|
135
|
+
"value": "4px"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"property": "Item padding",
|
|
139
|
+
"token": "spacing.sm",
|
|
140
|
+
"value": "8px"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"anatomy": "Container: bg-secondary, border-subtle, radius-md 8px, shadow 0 4px 12px rgba(0,0,0,0.3), padding 8px, gap 4px\n\nFloatingMenu.Title — rótulo de seção: content-tertiary, 14px (padrão) ou 10px (size=\"sm\"), padding-left 8px\nFloatingMenu.Item — botão: 32px height, padding 0 8px, gap 8px, radius-sm 4px\n └ [Icon?: 20px Material Symbols Outlined, content-tertiary] [Label: Inter 14px, content-secondary, flex-1]\n └ :hover → background surface-secondary | :disabled → opacity 0.45, cursor not-allowed\nFloatingMenu.Divider — separador: 1px solid border-subtle, full-width",
|
|
144
|
+
"code": {
|
|
145
|
+
"html": "<!-- Floating Menu TRDR — HTML com classes globais -->\n\n<!-- Exemplo 1: ações simples (sem título) -->\n<div class=\"trdr-floating-menu\" style=\"width:172px\" role=\"menu\">\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">close</span>\n Fechar\n </button>\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">remove</span>\n Minimizar\n </button>\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">keep</span>\n Fixar\n </button>\n</div>\n\n<!-- Exemplo 2: com título, divisor e seções -->\n<div class=\"trdr-floating-menu\" style=\"width:240px\" role=\"menu\">\n <p class=\"trdr-floating-menu-title\">Favoritos</p>\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">star</span>\n WINFUT (Q19)\n </button>\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">star</span>\n PETR4\n </button>\n <div class=\"trdr-floating-menu-divider\" role=\"separator\"></div>\n <p class=\"trdr-floating-menu-title\">Recentes</p>\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">history</span>\n BBDC4\n </button>\n <div class=\"trdr-floating-menu-divider\" role=\"separator\"></div>\n <button class=\"trdr-floating-menu-item\" role=\"menuitem\">\n <span class=\"material-symbols-outlined\" style=\"font-size:20px;line-height:20px;font-variation-settings:'FILL' 0,'GRAD' 0;color:var(--content-tertiary)\">search</span>\n Buscar ativo...\n </button>\n</div>",
|
|
146
|
+
"css": "/* Floating Menu TRDR — classes globais */\n\n/* Container */\n.trdr-floating-menu {\n background: var(--bg-secondary); /* #141519 */\n border: 1px solid var(--border-subtle); /* #222222 */\n border-radius: var(--radius-md); /* 8px */\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30);\n padding: var(--spacing-sm); /* 8px */\n display: flex;\n flex-direction: column;\n gap: var(--spacing-xs); /* 4px */\n overflow: hidden;\n}\n\n/* Item — botão de ação */\n.trdr-floating-menu-item {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm); /* 8px */\n height: 32px;\n padding: 0 var(--spacing-sm);\n background: transparent;\n border: none;\n border-radius: var(--radius-sm); /* 4px */\n cursor: pointer;\n font-family: var(--font-secondary);\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n color: var(--content-secondary); /* #E8E8E8 */\n text-align: left;\n width: 100%;\n flex-shrink: 0;\n transition: background 0.12s ease;\n}\n\n.trdr-floating-menu-item:not(:disabled):hover {\n background: var(--surface-secondary); /* #222222 */\n}\n\n.trdr-floating-menu-item:disabled {\n cursor: not-allowed;\n opacity: 0.45;\n}\n\n/* Título de seção */\n.trdr-floating-menu-title {\n color: var(--content-tertiary); /* #A4A4A4 */\n font-family: var(--font-secondary);\n font-size: 14px;\n font-weight: 400;\n line-height: 1.2;\n width: 100%;\n flex-shrink: 0;\n padding: 0 var(--spacing-sm);\n}\n\n.trdr-floating-menu-title-sm { /* size=\"sm\" — mercados, color-picker */\n font-size: 10px;\n line-height: 15px;\n padding: 4px var(--spacing-xs) 2px;\n}\n\n/* Divisor */\n.trdr-floating-menu-divider {\n height: 1px;\n background: var(--border-subtle); /* #222222 */\n width: 100%;\n flex-shrink: 0;\n}",
|
|
147
|
+
"react": "import FloatingMenu from '@/components/ui/FloatingMenu'\n\n// Ações simples (como na Janela)\n<FloatingMenu width={172}>\n <FloatingMenu.Item icon=\"close\" onClick={onClose}>Fechar</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"remove\" onClick={onMinimize}>Minimizar</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"arrow_outward\" onClick={onMaximize}>Maximizar</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"keep\" onClick={onPin}>Fixar</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"edit\" onClick={onRename}>Renomear aba</FloatingMenu.Item>\n</FloatingMenu>\n\n// Com seções e divisores (como seletor de ativo)\n<FloatingMenu width={280}>\n <FloatingMenu.Title>Favoritos</FloatingMenu.Title>\n <FloatingMenu.Item icon=\"star\" onClick={() => selectAtivo('WINFUT')}>WINFUT (Q19)</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"star\" onClick={() => selectAtivo('PETR4')}>PETR4</FloatingMenu.Item>\n <FloatingMenu.Divider />\n <FloatingMenu.Title>Recentes</FloatingMenu.Title>\n <FloatingMenu.Item icon=\"history\" onClick={() => selectAtivo('BBDC4')}>BBDC4</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"history\" onClick={() => selectAtivo('ITUB4')}>ITUB4</FloatingMenu.Item>\n <FloatingMenu.Divider />\n <FloatingMenu.Item icon=\"search\">Buscar ativo...</FloatingMenu.Item>\n</FloatingMenu>\n\n// Item desabilitado\n<FloatingMenu width={240}>\n <FloatingMenu.Item icon=\"bar_chart\">Volume</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"trending_up\">Média Móvel</FloatingMenu.Item>\n <FloatingMenu.Item icon=\"add\" disabled>Indicador premium</FloatingMenu.Item>\n</FloatingMenu>\n\n// Conteúdo customizado (qualquer ReactNode como children)\n<FloatingMenu width={260}>\n <FloatingMenu.Title>Conta</FloatingMenu.Title>\n <div style={{ padding: '4px 8px' }}>\n {/* Dropdown, Checkbox, Slider, etc. */}\n </div>\n <FloatingMenu.Divider />\n <FloatingMenu.Item icon=\"logout\">Sair</FloatingMenu.Item>\n</FloatingMenu>",
|
|
148
|
+
"prompt": "Implemente o componente FloatingMenu do Design System TRDR — menu flutuante genérico pixel-perfect com Figma 1921:55380.\n\nCOMPOUND COMPONENT — 4 partes:\n1. FloatingMenu (container): bg var(--bg-secondary) #141519, border 1px solid var(--border-subtle) #222, border-radius var(--radius-md) 8px, box-shadow 0 4px 12px rgba(0,0,0,0.30), padding var(--spacing-sm) 8px, gap var(--spacing-xs) 4px, flex-col, overflow hidden. Prop width?: number|string.\n\n2. FloatingMenu.Item (button): height 32px, padding 0 var(--spacing-sm) 8px, gap var(--spacing-sm) 8px, border-radius var(--radius-sm) 4px, background transparent, color var(--content-secondary) #E8E8E8, font Inter 14px/400. :hover (não disabled) → background var(--surface-secondary) #222. :disabled → opacity 0.45, cursor not-allowed. Props: icon?: string (Material Symbols name), disabled?: boolean, onClick, children.\n\n3. FloatingMenu.Title (p): color var(--content-tertiary) #A4A4A4, font Inter 14px/400. Prop size: \"default\" (14px, padding-left 8px) | \"sm\" (10px/15px, padding 4px 4px 2px — usado em mercados/color-picker). children: string.\n\n4. FloatingMenu.Divider (div): height 1px, background var(--border-subtle) #222, width 100%.\n\nICON (Material Symbols Outlined): font-family 'Material Symbols Outlined', font-size 20px, line-height 20px, font-variation-settings: 'FILL' 0 'GRAD' 0, color var(--content-tertiary) #A4A4A4, flex-shrink 0.\n\nLABEL: flex:1, min-width 0, overflow hidden, text-overflow ellipsis, white-space nowrap.\n\nAPI: import FloatingMenu from '@/components/ui/FloatingMenu'\n<FloatingMenu width={172}>\n <FloatingMenu.Item icon=\"close\" onClick={fn}>Fechar</FloatingMenu.Item>\n <FloatingMenu.Title>Seção</FloatingMenu.Title>\n <FloatingMenu.Divider />\n</FloatingMenu>\n\nUse Object.assign(FloatingMenuRoot, { Item, Title, Divider }) para montar o compound component. NUNCA hex direto — apenas tokens var(--*). NUNCA --scale-spacing-* ou --scale-radius-*."
|
|
149
|
+
},
|
|
150
|
+
"dependencies": []
|
|
151
|
+
}
|