trdr-ds-install 1.0.2 → 1.1.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
CHANGED
|
@@ -61,6 +61,16 @@ Search: `var\(--color-|var\(--space-` in CSS/SCSS/component files
|
|
|
61
61
|
**E — Missing tokens.css**:
|
|
62
62
|
Check if `tokens.css` already exists in the project and if it's imported in the global CSS.
|
|
63
63
|
|
|
64
|
+
**F — Hardcoded rgba colors** (should use DS semantic tokens or be flagged):
|
|
65
|
+
Search: `rgba\(` in CSS/SCSS/HTML files (excluding node_modules, vendor)
|
|
66
|
+
|
|
67
|
+
**G — Custom gradients (non-TRDR)** (should use var(--gradient-*) tokens):
|
|
68
|
+
Search: `linear-gradient|radial-gradient` in CSS/SCSS/HTML files
|
|
69
|
+
Flag any gradient that doesn't reference a TRDR gradient token (`var(--gradient-*)`)
|
|
70
|
+
|
|
71
|
+
**H — Hardcoded font-size in px** (should use .trdr-h* / .trdr-body-* text style classes):
|
|
72
|
+
Search: `font-size:\s*\d+px` in CSS/SCSS files (skip tokens.css itself)
|
|
73
|
+
|
|
64
74
|
### Step 4 — Fetch latest component list from Hub
|
|
65
75
|
|
|
66
76
|
Fetch the component catalog to know what's currently available:
|
|
@@ -105,6 +115,9 @@ Output the following report and **do not proceed** until the developer explicitl
|
|
|
105
115
|
| Hardcoded fonts | N | `font-family: Inter` in globals.css:8 |
|
|
106
116
|
| Hardcoded spacing | N | `padding: 16px` in Card.css:22 |
|
|
107
117
|
| Primitive token use | N | `var(--color-blue-600)` in Badge.css:31 |
|
|
118
|
+
| Hardcoded rgba | N | `background: rgba(0,0,0,.3)` in card.css:88 |
|
|
119
|
+
| Custom gradients | N | `linear-gradient(135deg, #FF6B6B...)` in header:24 |
|
|
120
|
+
| Hardcoded font-size | N | `font-size: 22px` in card.css:99 |
|
|
108
121
|
|
|
109
122
|
### TRDR COMPONENTS AVAILABLE (from Hub):
|
|
110
123
|
[List implemented components from the Hub catalog — these have ready-to-use code]
|
|
@@ -531,135 +544,92 @@ Create `tokens.css` in the detected styles directory with this content:
|
|
|
531
544
|
|
|
532
545
|
### Step 2 — Create components.css
|
|
533
546
|
|
|
534
|
-
|
|
547
|
+
Fetch all component CSS directly from the Hub. The Hub is the single source of truth — **NEVER use a static fallback. No exceptions.**
|
|
548
|
+
|
|
549
|
+
#### Step 2.a — Fetch component utility classes
|
|
535
550
|
|
|
536
551
|
```
|
|
537
552
|
WebFetch: https://trdr.mrocontent.com.br/design-md
|
|
538
553
|
```
|
|
539
554
|
|
|
540
|
-
Extract the
|
|
555
|
+
Extract all CSS code blocks from the page that contain `.trdr-*` classes. Copy them verbatim into `components.css`.
|
|
541
556
|
|
|
542
|
-
|
|
557
|
+
**Known Hub components (v1.4) — verify all are present after fetch:**
|
|
558
|
+
|
|
559
|
+
| Slug | CSS Class Prefix |
|
|
560
|
+
|------|-----------------|
|
|
561
|
+
| `button` | `.trdr-btn` |
|
|
562
|
+
| `card` | `.trdr-card` |
|
|
563
|
+
| `text-input` | `.trdr-input` |
|
|
564
|
+
| `dropdown` | `.trdr-dropdown` |
|
|
565
|
+
| `combo-input` | `.trdr-combo` |
|
|
566
|
+
| `checkbox` | `.trdr-checkbox` |
|
|
567
|
+
| `radio-button` | `.trdr-radio` |
|
|
568
|
+
| `switch` | `.trdr-switch` |
|
|
569
|
+
| `segmented-control` | `.trdr-segment` |
|
|
570
|
+
| `tooltip` | `.trdr-tooltip` |
|
|
571
|
+
| `abas` | `.trdr-tabs` |
|
|
572
|
+
| `sub-menu-item` | `.trdr-submenu` |
|
|
573
|
+
| `boleta` | `.trdr-boleta` |
|
|
574
|
+
|
|
575
|
+
For any component whose CSS prefix is not found in the `/design-md` output, fetch its individual page:
|
|
576
|
+
|
|
577
|
+
```
|
|
578
|
+
WebFetch: https://trdr.mrocontent.com.br/componentes/[slug]
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
Extract the CSS code block from that page and append it to `components.css`.
|
|
582
|
+
|
|
583
|
+
**If the Hub is unreachable at any point → STOP. Do NOT proceed with any fallback.**
|
|
584
|
+
Report to the developer:
|
|
585
|
+
> ❌ Hub unreachable (https://trdr.mrocontent.com.br). Cannot create components.css — the DS Hub is required for faithful component implementation. Retry when the Hub is accessible.
|
|
586
|
+
|
|
587
|
+
#### Step 2.b — Add typography text style classes
|
|
588
|
+
|
|
589
|
+
After the component classes, append the following text style utility classes to `components.css`. These represent the Hub's Text Styles spec (H1–H7, B1–B5, Auxiliar, L2–L3). If `/design-md` already contains these classes verbatim, use those instead.
|
|
543
590
|
|
|
544
591
|
```css
|
|
545
592
|
/* ==========================================================================
|
|
546
|
-
TRDR Design
|
|
547
|
-
|
|
593
|
+
TRDR Design System — Text Style Utility Classes
|
|
594
|
+
Source: https://trdr.mrocontent.com.br | Text Styles spec
|
|
548
595
|
========================================================================== */
|
|
549
596
|
|
|
550
|
-
/*
|
|
551
|
-
.trdr-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
557
|
-
.trdr-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
}
|
|
564
|
-
.trdr-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
597
|
+
/* Headings — var(--font-primary) = JetBrains Mono */
|
|
598
|
+
.trdr-h1 { font-family: var(--font-primary); font-size: 80px; font-weight: 500; line-height: 1.1; }
|
|
599
|
+
.trdr-h2 { font-family: var(--font-primary); font-size: 56px; font-weight: 500; line-height: 1.1; }
|
|
600
|
+
.trdr-h3 { font-family: var(--font-primary); font-size: 46px; font-weight: 700; line-height: 1.15; }
|
|
601
|
+
.trdr-h4 { font-family: var(--font-primary); font-size: 38px; font-weight: 500; line-height: 1.15; }
|
|
602
|
+
.trdr-h5 { font-family: var(--font-primary); font-size: 32px; font-weight: 500; line-height: 1.2; }
|
|
603
|
+
.trdr-h6 { font-family: var(--font-primary); font-size: 26px; font-weight: 500; line-height: 1.2; }
|
|
604
|
+
.trdr-h7 { font-family: var(--font-secondary); font-size: 22px; font-weight: 600; line-height: 1.3; }
|
|
605
|
+
|
|
606
|
+
/* Body — var(--font-secondary) = Inter */
|
|
607
|
+
.trdr-body-b1 { font-family: var(--font-secondary); font-size: 18px; font-weight: 400; line-height: 1.6; }
|
|
608
|
+
.trdr-body-b2 { font-family: var(--font-secondary); font-size: 16px; font-weight: 500; line-height: 1.5; }
|
|
609
|
+
.trdr-body-b3 { font-family: var(--font-secondary); font-size: 14px; font-weight: 400; line-height: 1.5; }
|
|
610
|
+
.trdr-body-b4 { font-family: var(--font-secondary); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0.2px; }
|
|
611
|
+
.trdr-body-b5 { font-family: var(--font-secondary); font-size: 10px; font-weight: 400; line-height: 1.4; }
|
|
612
|
+
.trdr-body-aux { font-family: var(--font-secondary); font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0.24px; }
|
|
613
|
+
|
|
614
|
+
/* Labels — var(--font-secondary) = Inter */
|
|
615
|
+
.trdr-label-l2 { font-family: var(--font-secondary); font-size: 16px; font-weight: 600; line-height: 1.4; }
|
|
616
|
+
.trdr-label-l3 { font-family: var(--font-secondary); font-size: 14px; font-weight: 600; line-height: 1.4; }
|
|
617
|
+
```
|
|
568
618
|
|
|
569
|
-
|
|
570
|
-
.trdr-gradient-text {
|
|
571
|
-
background: linear-gradient(90deg, var(--action-brand-default) 30%, #FFFFFF 100%);
|
|
572
|
-
-webkit-background-clip: text;
|
|
573
|
-
-webkit-text-fill-color: transparent;
|
|
574
|
-
background-clip: text;
|
|
575
|
-
}
|
|
619
|
+
#### Step 2.c — Flag missing components
|
|
576
620
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
justify-content: center;
|
|
582
|
-
gap: var(--spacing-xs);
|
|
583
|
-
height: 24px;
|
|
584
|
-
padding: 0 var(--spacing-sm);
|
|
585
|
-
border-radius: var(--radius-md);
|
|
586
|
-
font-family: var(--font-secondary);
|
|
587
|
-
font-size: 14px;
|
|
588
|
-
font-weight: 600;
|
|
589
|
-
line-height: 1;
|
|
590
|
-
white-space: nowrap;
|
|
591
|
-
transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
|
|
592
|
-
cursor: pointer;
|
|
593
|
-
border: none;
|
|
594
|
-
text-decoration: none;
|
|
595
|
-
}
|
|
596
|
-
.trdr-btn-lg { height: 32px; padding: 0 var(--spacing-md); font-size: 14px; }
|
|
597
|
-
|
|
598
|
-
.trdr-btn-primary { background-color: var(--action-brand-inverse-default); color: var(--content-primary); border: 0.5px solid var(--action-brand-inverse-default); }
|
|
599
|
-
.trdr-btn-primary:hover { background-color: var(--action-brand-inverse-hover); border-color: var(--action-brand-inverse-hover); }
|
|
600
|
-
.trdr-btn-primary:active { background-color: var(--action-brand-inverse-active); }
|
|
601
|
-
.trdr-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
602
|
-
|
|
603
|
-
.trdr-btn-secondary { background-color: var(--action-secondary-default); color: var(--content-primary); }
|
|
604
|
-
.trdr-btn-secondary:hover { background-color: var(--action-secondary-hover); }
|
|
605
|
-
.trdr-btn-secondary:active { background-color: var(--action-secondary-active); }
|
|
606
|
-
.trdr-btn-secondary:disabled { background-color: var(--action-secondary-disabled); color: var(--content-disabled); cursor: not-allowed; }
|
|
607
|
-
|
|
608
|
-
.trdr-btn-ghost { background-color: transparent; color: var(--content-secondary); border: 1px solid var(--border-default); }
|
|
609
|
-
.trdr-btn-ghost:hover { background-color: var(--surface-secondary); border-color: var(--border-strong); color: var(--content-primary); }
|
|
610
|
-
.trdr-btn-ghost:active { background-color: var(--surface-primary); }
|
|
611
|
-
.trdr-btn-ghost:disabled { color: var(--content-disabled); border-color: var(--border-disabled); cursor: not-allowed; opacity: 0.5; }
|
|
612
|
-
|
|
613
|
-
.trdr-btn-destructive { background-color: var(--action-destructive-default); color: var(--content-primary); }
|
|
614
|
-
.trdr-btn-destructive:hover { background-color: var(--action-destructive-hover); }
|
|
615
|
-
.trdr-btn-destructive:active { background-color: var(--action-destructive-active); }
|
|
616
|
-
|
|
617
|
-
.trdr-btn-link { background-color: transparent; color: var(--content-brand); padding-left: 0; padding-right: 0; }
|
|
618
|
-
.trdr-btn-link:hover { color: var(--action-brand-hover); text-decoration: underline; }
|
|
619
|
-
|
|
620
|
-
.trdr-btn-long { background-color: var(--context-trading-long-default); color: var(--context-trading-long-text); min-width: 80px; }
|
|
621
|
-
.trdr-btn-long:hover { background-color: var(--context-trading-long-hover); }
|
|
622
|
-
.trdr-btn-long:active { background-color: var(--context-trading-long-active); }
|
|
623
|
-
|
|
624
|
-
.trdr-btn-short { background-color: var(--context-trading-short-default); color: var(--context-trading-short-text); min-width: 80px; }
|
|
625
|
-
.trdr-btn-short:hover { background-color: var(--context-trading-short-hover); }
|
|
626
|
-
.trdr-btn-short:active { background-color: var(--context-trading-short-active); }
|
|
627
|
-
|
|
628
|
-
/* Badge */
|
|
629
|
-
.trdr-badge { display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border-radius: 5px; font-family: var(--font-secondary); font-size: 12px; font-weight: 500; white-space: nowrap; }
|
|
630
|
-
.trdr-badge-brand { background-color: var(--surface-brand); color: var(--content-brand); border: 1px solid var(--border-subtle); }
|
|
631
|
-
.trdr-badge-success { background-color: var(--surface-success); color: var(--content-success); border: 1px solid var(--border-subtle); }
|
|
632
|
-
.trdr-badge-neutral { background-color: var(--surface-secondary); color: var(--content-tertiary); border: 1px solid var(--border-subtle); }
|
|
633
|
-
.trdr-badge-warning { background-color: var(--surface-warning); color: var(--content-warning); }
|
|
634
|
-
|
|
635
|
-
/* Segmented control */
|
|
636
|
-
.trdr-segment-control { display: inline-flex; align-items: center; gap: var(--spacing-sm); flex-wrap: wrap; }
|
|
637
|
-
.trdr-segment { display: inline-flex; align-items: center; justify-content: center; padding: var(--spacing-sm) var(--spacing-md); border-radius: var(--spacing-lg); font-family: var(--font-secondary); font-size: 14px; cursor: pointer; text-decoration: none; transition: background-color 0.15s ease, color 0.15s ease; }
|
|
638
|
-
.trdr-segment-active { background-color: var(--action-brand-inverse-default); color: var(--content-primary); }
|
|
639
|
-
.trdr-segment-inactive { background-color: var(--surface-secondary); color: var(--content-tertiary); }
|
|
640
|
-
.trdr-segment-inactive:hover { color: var(--content-secondary); }
|
|
641
|
-
|
|
642
|
-
/* Input */
|
|
643
|
-
.trdr-input { width: 100%; height: 36px; padding: 0 var(--spacing-md); background-color: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--content-primary); font-family: var(--font-secondary); font-size: 13px; outline: none; transition: border-color 0.15s ease; }
|
|
644
|
-
.trdr-input::placeholder { color: var(--content-tertiary); }
|
|
645
|
-
.trdr-input:focus { border-color: var(--border-focus); }
|
|
646
|
-
|
|
647
|
-
/* Table */
|
|
648
|
-
.trdr-table { width: 100%; border-collapse: collapse; }
|
|
649
|
-
.trdr-table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--content-tertiary); padding: var(--spacing-sm) var(--spacing-lg); border-bottom: 1px solid var(--border-subtle); }
|
|
650
|
-
.trdr-table td { padding: var(--spacing-md) var(--spacing-lg); border-bottom: 1px solid var(--border-subtle); font-size: 13px; color: var(--content-secondary); vertical-align: middle; }
|
|
651
|
-
.trdr-table tr:last-child td { border-bottom: none; }
|
|
652
|
-
.trdr-table tr:hover td { background-color: var(--bg-tertiary); }
|
|
653
|
-
|
|
654
|
-
/* Divider */
|
|
655
|
-
.trdr-divider { width: 100%; height: 1px; background-color: var(--border-subtle); margin: var(--spacing-2xl) 0; }
|
|
656
|
-
|
|
657
|
-
/* Section headings */
|
|
658
|
-
.trdr-section-title { font-family: var(--font-primary); font-size: 24px; font-weight: 500; color: var(--content-primary); margin-bottom: var(--spacing-sm); }
|
|
659
|
-
.trdr-section-subtitle { font-size: 14px; color: var(--content-tertiary); margin-bottom: var(--spacing-3xl); line-height: 1.5; }
|
|
660
|
-
```
|
|
621
|
+
If the developer's project uses a UI pattern that has no corresponding Hub component (e.g., a date picker, a data table, a modal), do NOT invent CSS for it. Instead, create or append to `MISSING_COMPONENTS.md` at the project root:
|
|
622
|
+
|
|
623
|
+
```markdown
|
|
624
|
+
# Missing Hub Components
|
|
661
625
|
|
|
662
|
-
|
|
626
|
+
These patterns were found in the project but have no corresponding component in the TRDR Design Hub.
|
|
627
|
+
Request their implementation at: https://trdr.mrocontent.com.br
|
|
628
|
+
|
|
629
|
+
| Pattern found | File | Status |
|
|
630
|
+
|---------------|------|--------|
|
|
631
|
+
| [pattern name] | [file:line] | ⚠️ Missing from Hub |
|
|
632
|
+
```
|
|
663
633
|
|
|
664
634
|
### Step 3 — Update global CSS
|
|
665
635
|
|
|
@@ -693,6 +663,8 @@ Full reference: https://trdr.mrocontent.com.br
|
|
|
693
663
|
5. Fonts: --font-primary = JetBrains Mono (headings) | --font-secondary = Inter (body) | --font-mono = Roboto Mono (numbers)
|
|
694
664
|
6. Spacing: always var(--spacing-xs/sm/md/lg/xl/2xl/3xl) — never hardcoded px
|
|
695
665
|
7. Border radius: always var(--radius-sm/md/lg/full) — never hardcoded px
|
|
666
|
+
8. Text styles: use .trdr-h1/.../h7 for headings, .trdr-body-b1/.../b5 for paragraphs, .trdr-label-l2/l3 for labels — never raw font-size px
|
|
667
|
+
9. No colors outside the DS anywhere — rgba(), inline gradients, hardcoded hex all require a semantic token. No exceptions.
|
|
696
668
|
|
|
697
669
|
## Token files
|
|
698
670
|
- Tokens: [detected-path]/tokens.css
|
|
@@ -713,18 +685,24 @@ Full reference: https://trdr.mrocontent.com.br
|
|
|
713
685
|
| Error | --content-error | #F34F45 |
|
|
714
686
|
| Warning | --content-warning | #FFCC40 |
|
|
715
687
|
|
|
688
|
+
## Text Style Classes
|
|
689
|
+
Headings: .trdr-h1 (80px) → .trdr-h2 (56px) → .trdr-h3 (46px) → .trdr-h4 (38px) → .trdr-h5 (32px) → .trdr-h6 (26px) → .trdr-h7 (22px/Inter)
|
|
690
|
+
Body: .trdr-body-b1 (18px) → .trdr-body-b2 (16px) → .trdr-body-b3 (14px) → .trdr-body-b4 (12px) → .trdr-body-b5 (10px) → .trdr-body-aux (12px/letter-spacing)
|
|
691
|
+
Labels: .trdr-label-l2 (16px/semibold) → .trdr-label-l3 (14px/semibold)
|
|
692
|
+
All headings use var(--font-primary) = JetBrains Mono. Body/labels use var(--font-secondary) = Inter.
|
|
693
|
+
|
|
716
694
|
## Pre-built component classes
|
|
717
695
|
.trdr-btn, .trdr-btn-primary, .trdr-btn-secondary, .trdr-btn-ghost, .trdr-btn-destructive
|
|
718
696
|
.trdr-btn-long (buy), .trdr-btn-short (sell)
|
|
719
697
|
.trdr-badge, .trdr-badge-brand, .trdr-badge-success, .trdr-badge-neutral
|
|
720
698
|
.trdr-card, .trdr-card-hover
|
|
721
|
-
.trdr-input
|
|
722
|
-
.trdr-table
|
|
699
|
+
.trdr-input, .trdr-dropdown, .trdr-combo, .trdr-checkbox, .trdr-radio, .trdr-switch
|
|
723
700
|
.trdr-segment-control, .trdr-segment-active, .trdr-segment-inactive
|
|
701
|
+
.trdr-tabs, .trdr-submenu, .trdr-tooltip, .trdr-boleta
|
|
724
702
|
|
|
725
703
|
## Getting component code
|
|
726
704
|
For any component, go to: https://trdr.mrocontent.com.br/componentes/[slug]
|
|
727
|
-
Available: button, text-input, switch, dropdown, checkbox, radio-button, combo-input, tooltip, boleta
|
|
705
|
+
Available: button, text-input, switch, dropdown, checkbox, radio-button, combo-input, tooltip, boleta, segmented-control, abas, sub-menu-item, card
|
|
728
706
|
(Check Hub for latest — new components are added regularly)
|
|
729
707
|
|
|
730
708
|
## Layer hierarchy
|
|
@@ -779,11 +757,45 @@ For each violation found in Phase 1, apply the semantic token replacement.
|
|
|
779
757
|
|
|
780
758
|
**Ambiguous colors:** Use property context to decide — `background-color` → bg/surface token, `color` → content token, `border-color` → border token.
|
|
781
759
|
|
|
760
|
+
**rgba() mapping:**
|
|
761
|
+
| Hardcoded pattern | Context | Replace with |
|
|
762
|
+
|-------------------|---------|-------------|
|
|
763
|
+
| `rgba(0,0,0,*)` | box-shadow | No TRDR shadow token exists → flag in DS_MIGRATION.md as "Missing shadow token" |
|
|
764
|
+
| `rgba(255,255,255,.29)` approx | overlay/backdrop | `var(--bg-overlay)` |
|
|
765
|
+
| `rgba(255,255,255,*)` other | overlay | flag in DS_MIGRATION.md |
|
|
766
|
+
| Any other `rgba(N,N,N,*)` | various | Map to nearest semantic alpha token (--surface-brand, --surface-info, --action-*-alpha, etc.) or flag |
|
|
767
|
+
|
|
768
|
+
**Gradient mapping:**
|
|
769
|
+
| Pattern | Replace with |
|
|
770
|
+
|---------|-------------|
|
|
771
|
+
| `linear-gradient(...)` using only TRDR brand colors | `var(--gradient-text-brand)`, `var(--gradient-bg-hero)`, or `var(--gradient-bg-fade)` as appropriate |
|
|
772
|
+
| `linear-gradient(...)` using any non-DS colors | Flag in DS_MIGRATION.md as non-compliant — developer must decide: remove, replace with a TRDR gradient token, or add a new token to the Hub |
|
|
773
|
+
| Gradient inside SVG data URI embedded in CSS | Flag in DS_MIGRATION.md |
|
|
774
|
+
|
|
775
|
+
**Font-size mapping:**
|
|
776
|
+
| Hardcoded value | Replace with |
|
|
777
|
+
|----------------|-------------|
|
|
778
|
+
| `font-size: 80px` | Add `.trdr-h1` class to the element; remove the rule |
|
|
779
|
+
| `font-size: 56px` | `.trdr-h2` class |
|
|
780
|
+
| `font-size: 46px` | `.trdr-h3` class |
|
|
781
|
+
| `font-size: 38px` | `.trdr-h4` class |
|
|
782
|
+
| `font-size: 32px` | `.trdr-h5` class |
|
|
783
|
+
| `font-size: 26px` | `.trdr-h6` class |
|
|
784
|
+
| `font-size: 22px` | `.trdr-h7` class |
|
|
785
|
+
| `font-size: 18px` | `.trdr-body-b1` class |
|
|
786
|
+
| `font-size: 16px` | `.trdr-body-b2` or `.trdr-label-l2` (check weight context) |
|
|
787
|
+
| `font-size: 14px` | `.trdr-body-b3` or `.trdr-label-l3` (check weight context) |
|
|
788
|
+
| `font-size: 12px` | `.trdr-body-b4` or `.trdr-body-aux` (check letter-spacing) |
|
|
789
|
+
| `font-size: 10px` | `.trdr-body-b5` class |
|
|
790
|
+
| `font-size: [other px]` | Nearest text style class — flag in DS_MIGRATION.md if no match |
|
|
791
|
+
|
|
782
792
|
**Do NOT replace:**
|
|
783
|
-
- Hex values inside
|
|
784
|
-
-
|
|
793
|
+
- Hex values inside binary image files (PNG, JPG, GIF)
|
|
794
|
+
- SVG external files — flag them in DS_MIGRATION.md but do not auto-edit
|
|
785
795
|
- Values in commented-out code
|
|
786
796
|
|
|
797
|
+
**All other values MUST be replaced or flagged.** There are no exceptions for "decorative" gradients, shadows, or overlays. If no semantic token exists for a given pattern, flag it in DS_MIGRATION.md under "Missing DS tokens" and notify the developer to request the token in the Hub.
|
|
798
|
+
|
|
787
799
|
### Step 6 — Fetch component-specific code (if applicable)
|
|
788
800
|
|
|
789
801
|
If the developer's project has components that match TRDR component patterns (buttons, inputs, dropdowns, etc.), offer to fetch the exact code from the Hub:
|
|
@@ -834,6 +846,16 @@ Check these before shipping:
|
|
|
834
846
|
- [ ] **Skipped files**: [list any files excluded from migration]
|
|
835
847
|
These still have hardcoded values — migrate manually or run /trdr-ds again
|
|
836
848
|
|
|
849
|
+
## Missing DS tokens (flagged — no semantic token available)
|
|
850
|
+
[List patterns found in the project that have no TRDR token yet — request these in the Hub]
|
|
851
|
+
| Pattern | File | Suggestion |
|
|
852
|
+
|---------|------|-----------|
|
|
853
|
+
| `box-shadow: rgba(0,0,0,*)` | [file:line] | Request shadow token in Hub |
|
|
854
|
+
| `linear-gradient(...)` non-TRDR | [file:line] | Request gradient token or remove |
|
|
855
|
+
|
|
856
|
+
## Missing Hub components (flagged)
|
|
857
|
+
[See MISSING_COMPONENTS.md if generated]
|
|
858
|
+
|
|
837
859
|
## Design System Reference
|
|
838
860
|
- Hub: https://trdr.mrocontent.com.br
|
|
839
861
|
- Tokens: https://trdr.mrocontent.com.br/tokens/semanticos
|
|
@@ -16,9 +16,9 @@ Use os equivalentes semânticos: bg.*, surface.*, content.*, scale.spacing.*
|
|
|
16
16
|
Tabelas de preços, P&L, quantidades, qualquer dado numérico de trading.
|
|
17
17
|
- `font-family: var(--font-mono)`
|
|
18
18
|
|
|
19
|
-
### Regra 4 — Títulos de página e headings →
|
|
20
|
-
|
|
21
|
-
- `font-family: var(--font-primary)`
|
|
19
|
+
### Regra 4 — Títulos de página e headings → JetBrains Mono
|
|
20
|
+
JetBrains Mono é a fonte primária do TRDR DS (`--font-primary`). Use as classes de text style.
|
|
21
|
+
- `font-family: var(--font-primary)` — ou melhor: classe `.trdr-h1` a `.trdr-h6`
|
|
22
22
|
|
|
23
23
|
### Regra 5 — Todo restante da UI → Inter
|
|
24
24
|
Body text, labels, inputs, nav, tooltips — tudo que não é heading ou número.
|
|
@@ -67,6 +67,19 @@ bg.primary (fundo base)
|
|
|
67
67
|
| Candle verde | context.chart.candles.up |
|
|
68
68
|
| Candle vermelho | context.chart.candles.down |
|
|
69
69
|
|
|
70
|
+
### Regra 8 — Text Styles → sempre use as classes utilitárias
|
|
71
|
+
Nunca use `font-size` em px diretamente. Use as classes de text style do DS:
|
|
72
|
+
- Títulos: `.trdr-h1` a `.trdr-h7`
|
|
73
|
+
- Corpo: `.trdr-body-b1` a `.trdr-body-b5`, `.trdr-body-aux`
|
|
74
|
+
- Labels: `.trdr-label-l2`, `.trdr-label-l3`
|
|
75
|
+
|
|
76
|
+
### Regra 9 — Nenhuma cor fora do DS, em lugar nenhum
|
|
77
|
+
`rgba()`, gradientes inline, `#hex` hardcoded são SEMPRE uma violação — sem exceções para gradientes "decorativos" ou sombras.
|
|
78
|
+
Se não existe token semântico para o padrão → registrar em `MISSING_COMPONENTS.md` e solicitar o token no Hub.
|
|
79
|
+
- ❌ `box-shadow: 0 4px 16px rgba(0,0,0,.3)`
|
|
80
|
+
- ❌ `background: linear-gradient(135deg, #FF6B6B, #4158F6)`
|
|
81
|
+
- ✅ Usar token semântico existente ou solicitar novo token ao Hub
|
|
82
|
+
|
|
70
83
|
---
|
|
71
84
|
|
|
72
85
|
## Hub de Referência
|