@valiify/dashboard-ui 0.1.0-alpha.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/CHANGELOG.md +104 -0
- package/LICENSE +21 -0
- package/README.md +373 -0
- package/dist/index.css +3743 -0
- package/package.json +82 -0
- package/src/base/index.css +21 -0
- package/src/components/ICON-SYSTEM.md +425 -0
- package/src/components/_template.css +109 -0
- package/src/components/alert.css +156 -0
- package/src/components/avatar.css +87 -0
- package/src/components/breadcrumbs.css +158 -0
- package/src/components/button.css +177 -0
- package/src/components/card.css +63 -0
- package/src/components/checkbox.css +181 -0
- package/src/components/chip.css +234 -0
- package/src/components/data-row.css +142 -0
- package/src/components/divider.css +143 -0
- package/src/components/dropdown-field.css +185 -0
- package/src/components/dropdown-menu.css +80 -0
- package/src/components/field-verification.css +156 -0
- package/src/components/filter-segment.css +163 -0
- package/src/components/icon-button.css +83 -0
- package/src/components/icon.css +145 -0
- package/src/components/index.css +47 -0
- package/src/components/input.css +180 -0
- package/src/components/link.css +183 -0
- package/src/components/loading-indicator.css +184 -0
- package/src/components/loading-inline.css +75 -0
- package/src/components/menu-item.css +138 -0
- package/src/components/modal.css +203 -0
- package/src/components/navigation-rail.css +558 -0
- package/src/components/pagination-item.css +196 -0
- package/src/components/pagination.css +108 -0
- package/src/components/pill.css +108 -0
- package/src/components/progress-bar.css +157 -0
- package/src/components/radio-select.css +97 -0
- package/src/components/section-marker.css +96 -0
- package/src/components/segment-selector.css +78 -0
- package/src/components/sensitive-data.css +77 -0
- package/src/components/skeleton.css +184 -0
- package/src/components/step.css +106 -0
- package/src/components/stepper.css +93 -0
- package/src/components/switch.css +99 -0
- package/src/components/tabs.css +213 -0
- package/src/components/tag.css +133 -0
- package/src/components/text-button.css +170 -0
- package/src/components/textarea.css +156 -0
- package/src/components/toast.css +182 -0
- package/src/components/tooltip.css +70 -0
- package/src/fonts.css +23 -0
- package/src/icons/README.md +297 -0
- package/src/icons/custom/help.svg +3 -0
- package/src/icons/custom/valiify-logo.svg +6 -0
- package/src/icons/icon-list.txt +2036 -0
- package/src/icons/sprite.svg +12223 -0
- package/src/index.css +35 -0
- package/src/library.css +34 -0
- package/src/themes/valiify.css +319 -0
- package/src/utilities/index.css +35 -0
- package/types/components.d.ts +630 -0
- package/types/index.d.ts +15 -0
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert Component
|
|
3
|
+
*
|
|
4
|
+
* Contextual feedback banner for inline status messages. Extracted from Figma
|
|
5
|
+
* Alert (880:31080) — 5 variants on a single `Type` axis, plus three booleans
|
|
6
|
+
* (Icon, Action Button, Dismiss).
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* <div class="alert alert-critical" role="alert">
|
|
10
|
+
* <div class="alert-body">
|
|
11
|
+
* <svg class="alert-icon icon icon-size-18" aria-hidden="true">
|
|
12
|
+
* <use href="#triangle-alert" />
|
|
13
|
+
* </svg>
|
|
14
|
+
* <div class="alert-content">
|
|
15
|
+
* <p class="alert-title">Business address mismatch</p>
|
|
16
|
+
* <p class="alert-message">Middesk returns a registered-agent address.</p>
|
|
17
|
+
* <button class="text-button text-button-primary">Review Field</button>
|
|
18
|
+
* </div>
|
|
19
|
+
* <button class="icon-button icon-button-md" aria-label="Dismiss">
|
|
20
|
+
* <svg class="icon icon-size-14" aria-hidden="true"><use href="#x" /></svg>
|
|
21
|
+
* </button>
|
|
22
|
+
* </div>
|
|
23
|
+
* </div>
|
|
24
|
+
*
|
|
25
|
+
* A TYPE CLASS IS REQUIRED. `.alert` carries layout only; every colour lives on
|
|
26
|
+
* the type. Figma's `Type` axis has no default value, and baking one into the
|
|
27
|
+
* base class is the mistake Tabs already taught us — "explicit beats clever".
|
|
28
|
+
* A bare `.alert` renders transparent, which reads as the authoring error it is.
|
|
29
|
+
*
|
|
30
|
+
* Type drives exactly two colours, and all five follow the same pattern except
|
|
31
|
+
* one:
|
|
32
|
+
*
|
|
33
|
+
* type fill rail + icon
|
|
34
|
+
* critical Critical/Soft Critical/Main
|
|
35
|
+
* warning Warning/Soft Warning/Main
|
|
36
|
+
* success Approved/Soft Approved/Main
|
|
37
|
+
* info Primary/Soft Primary/Main
|
|
38
|
+
* neutral Neutral/Soft Neutral/Main rail, but Neutral/CONTENT icon
|
|
39
|
+
*
|
|
40
|
+
* NEUTRAL'S ICON IS THE ODD ONE OUT. Verified by sampling the Figma render, not
|
|
41
|
+
* assumed: its rail is `Neutral/Main` (#9999a6) while its glyph is
|
|
42
|
+
* `Neutral/Content` (#65656e). Every other type uses one colour for both. This
|
|
43
|
+
* is why `Neutral/Content` appears in that variant's variable set and nowhere
|
|
44
|
+
* else. Reproduced faithfully; on the designer list.
|
|
45
|
+
*
|
|
46
|
+
* THE RAIL IS A BORDER, NOT A CHILD. Figma models the 3px accent as a clipped
|
|
47
|
+
* rectangle layer inside an `overflow: clip` frame; here it is the left border,
|
|
48
|
+
* which saves consumers a DOM node and a class.
|
|
49
|
+
*
|
|
50
|
+
* This was verified rather than assumed — both renders were traced pixel by
|
|
51
|
+
* pixel down the top-left corner. Figma's rail is 2px wide through the arc and
|
|
52
|
+
* reaches its full 3px seven rows down; ours reaches 3px on the eighth. A
|
|
53
|
+
* one-row antialiasing difference in how the two renderers clip, with identical
|
|
54
|
+
* geometry either side of it.
|
|
55
|
+
*
|
|
56
|
+
* WIDTH IS NOT PINNED. Figma's 828px is the leftover of a 1007px artboard with
|
|
57
|
+
* 36px margins, not a specification — an inline banner spans its container.
|
|
58
|
+
* Contrast Modal (480) and Toast (356), which are genuinely fixed floating
|
|
59
|
+
* elements and ARE pinned.
|
|
60
|
+
*
|
|
61
|
+
* THE ACTION AND DISMISS ARE EXISTING COMPONENTS. Figma's "Review Field" is a
|
|
62
|
+
* literal Text Button instance (Type=Primary). The dismiss is NOT an instance —
|
|
63
|
+
* it is a stray 10x16 raw vector, where Toast and Modal both use a real Icon
|
|
64
|
+
* Button. Treated as an authoring slip and implemented as `.icon-button
|
|
65
|
+
* icon-button-md`, matching the rest of the library. On the designer list.
|
|
66
|
+
*
|
|
67
|
+
* The 8px radius is raw in Figma rather than bound to `Radius/MD`, the same
|
|
68
|
+
* unbound reading Toast's card has. Mapped to `--radius-surface` because the
|
|
69
|
+
* value matches exactly.
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
@layer components {
|
|
73
|
+
.alert {
|
|
74
|
+
/* Layout — a banner, so it fills its container */
|
|
75
|
+
@apply flex w-full items-start;
|
|
76
|
+
|
|
77
|
+
/* Shape. The rail is the left border; the radius clips it, which is what
|
|
78
|
+
Figma's `overflow: clip` frame achieves around its rectangle layer. */
|
|
79
|
+
@apply rounded-surface; /* 8px */
|
|
80
|
+
@apply overflow-hidden;
|
|
81
|
+
@apply border-l-[3px] border-l-transparent;
|
|
82
|
+
|
|
83
|
+
/* No fill of its own — the type class supplies it. */
|
|
84
|
+
@apply bg-transparent;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* --- Parts -------------------------------------------------------------- */
|
|
88
|
+
|
|
89
|
+
.alert-body {
|
|
90
|
+
@apply flex flex-1 items-start gap-3; /* 12px */
|
|
91
|
+
min-width: 0;
|
|
92
|
+
@apply p-4; /* 16px */
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* 18px. Colour comes from the type class; the glyph is the consumer's. */
|
|
96
|
+
.alert-icon {
|
|
97
|
+
@apply shrink-0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.alert-content {
|
|
101
|
+
@apply flex flex-1 flex-col items-start gap-1; /* 4px */
|
|
102
|
+
min-width: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* 12.5px with a 12.5px line-height — the line box is exactly the cap height,
|
|
106
|
+
as in Toast. Body 2 - Bold reports Medium/500 despite the name. */
|
|
107
|
+
.alert-title {
|
|
108
|
+
@apply text-body-2-bold; /* 12.5px / 12.5px / 500 */
|
|
109
|
+
@apply text-content-primary;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.alert-message {
|
|
113
|
+
@apply text-caption; /* 12px / 18px / 400 */
|
|
114
|
+
@apply text-content-secondary;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* --- Types -------------------------------------------------------------- */
|
|
118
|
+
|
|
119
|
+
.alert-critical {
|
|
120
|
+
@apply border-l-critical bg-critical-soft;
|
|
121
|
+
}
|
|
122
|
+
.alert-critical .alert-icon {
|
|
123
|
+
@apply text-critical;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.alert-warning {
|
|
127
|
+
@apply border-l-warning bg-warning-soft;
|
|
128
|
+
}
|
|
129
|
+
.alert-warning .alert-icon {
|
|
130
|
+
@apply text-warning;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.alert-success {
|
|
134
|
+
@apply border-l-approved bg-approved-soft;
|
|
135
|
+
}
|
|
136
|
+
.alert-success .alert-icon {
|
|
137
|
+
@apply text-approved;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.alert-info {
|
|
141
|
+
@apply border-l-primary bg-primary-soft;
|
|
142
|
+
}
|
|
143
|
+
.alert-info .alert-icon {
|
|
144
|
+
@apply text-primary;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.alert-neutral {
|
|
148
|
+
@apply border-l-neutral bg-neutral-soft;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Neutral/Content, not Neutral/Main — the one type whose rail and glyph
|
|
152
|
+
differ. Verified against the Figma render. See the header. */
|
|
153
|
+
.alert-neutral .alert-icon {
|
|
154
|
+
@apply text-neutral-content;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar Component
|
|
3
|
+
*
|
|
4
|
+
* Circular user marker showing initials. Extracted from Figma Avatar (79:230)
|
|
5
|
+
* — 8 variants (4 sizes × Disabled), plus a Ring boolean.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* <span class="avatar avatar-md">NC</span>
|
|
9
|
+
*
|
|
10
|
+
* FOUR SIZES, THREE TYPE STYLES. xs and sm share Micro S - Bold; only md and
|
|
11
|
+
* lg step up. Do not assume one style per size.
|
|
12
|
+
*
|
|
13
|
+
* xs 16px Micro S - Bold 8px / 600 / 0.4%
|
|
14
|
+
* sm 18px Micro S - Bold 8px / 600 / 0.4%
|
|
15
|
+
* md 20px Micro M - Bold 8.5px / 500 (default)
|
|
16
|
+
* lg 34px Micro L - Bold 11px / 500
|
|
17
|
+
*
|
|
18
|
+
* Careful: Figma names the md and lg styles "- Bold" but both report Medium /
|
|
19
|
+
* 500. Only Micro S - Bold is actually 600. Do not map "-Bold" to 700.
|
|
20
|
+
*
|
|
21
|
+
* INITIALS ONLY. Figma's component description reads "User profile image
|
|
22
|
+
* displayed as a circle", but no image layer, image fill, or swap slot exists
|
|
23
|
+
* in any of the 8 variants — the only children are the text node and a hidden
|
|
24
|
+
* Ring. No image support is implemented here rather than invent one; the
|
|
25
|
+
* contradiction is flagged for the designer.
|
|
26
|
+
*
|
|
27
|
+
* Disabled changes the background and NOTHING else — the initials stay
|
|
28
|
+
* Content/Contrast rather than dimming.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
@layer components {
|
|
32
|
+
.avatar {
|
|
33
|
+
/* Layout */
|
|
34
|
+
@apply inline-flex shrink-0 items-center justify-center;
|
|
35
|
+
|
|
36
|
+
/* Default size: md (20px) */
|
|
37
|
+
@apply size-5;
|
|
38
|
+
|
|
39
|
+
/* Shape */
|
|
40
|
+
@apply rounded-pill; /* Radius/Rounded */
|
|
41
|
+
@apply border border-[length:var(--border-thin)] border-stroke-divider;
|
|
42
|
+
|
|
43
|
+
/* Colors */
|
|
44
|
+
@apply bg-primary text-content-contrast;
|
|
45
|
+
|
|
46
|
+
/* Type — md */
|
|
47
|
+
@apply text-micro-m-bold; /* 8.5px / 500 */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* --- Sizes ------------------------------------------------------------ */
|
|
51
|
+
|
|
52
|
+
.avatar-xs {
|
|
53
|
+
@apply size-4; /* 16px */
|
|
54
|
+
@apply text-micro-s-bold; /* 8px / 600 / 0.4% */
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.avatar-sm {
|
|
58
|
+
@apply size-4.5; /* 18px */
|
|
59
|
+
@apply text-micro-s-bold; /* 8px / 600 / 0.4% */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.avatar-md {
|
|
63
|
+
@apply size-5; /* 20px — same as default */
|
|
64
|
+
@apply text-micro-m-bold; /* 8.5px / 500 */
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.avatar-lg {
|
|
68
|
+
@apply size-8.5; /* 34px */
|
|
69
|
+
@apply text-micro-l-bold; /* 11px / 500 */
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* --- States ----------------------------------------------------------- */
|
|
73
|
+
|
|
74
|
+
/* Not an interactive element, so there is no :disabled to hook — a modifier
|
|
75
|
+
class, matching .input-disabled. Only the fill changes. */
|
|
76
|
+
.avatar-disabled {
|
|
77
|
+
@apply bg-primary-disabled;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Figma's Ring is a boolean property, hidden by default, and shares the 2px
|
|
81
|
+
Primary/Main treatment used by Chip. Figma insets it -0.5px so its outer
|
|
82
|
+
edge clears the hairline; normalised to a plain inset ring here, which is
|
|
83
|
+
within half a pixel and cannot overflow the layout. */
|
|
84
|
+
.avatar.with-ring {
|
|
85
|
+
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumbs Component
|
|
3
|
+
*
|
|
4
|
+
* Hierarchical navigation path showing the current location. Rebuilt on
|
|
5
|
+
* 2026-08-25 against a RESTRUCTURED Figma design, which now splits the
|
|
6
|
+
* component across three nodes:
|
|
7
|
+
*
|
|
8
|
+
* Breadcrumb Item 1046:22649 State (Default/Hover/Focus) x isCurrent
|
|
9
|
+
* Breadcrumb Separator 1046:22654 Type (chevron / slash)
|
|
10
|
+
* Breadcrumbs 880:31218 the row that composes them
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* <nav class="breadcrumbs" aria-label="Breadcrumb">
|
|
14
|
+
* <svg class="breadcrumb-home icon icon-size-14" aria-hidden="true">
|
|
15
|
+
* <use href="#home" />
|
|
16
|
+
* </svg>
|
|
17
|
+
* <span class="breadcrumb-separator" aria-hidden="true">></span>
|
|
18
|
+
* <a class="breadcrumb" href="/applications">Applications</a>
|
|
19
|
+
* <span class="breadcrumb-separator" aria-hidden="true">></span>
|
|
20
|
+
* <span class="breadcrumb breadcrumb-current" aria-current="page">#BA-204417</span>
|
|
21
|
+
* </nav>
|
|
22
|
+
*
|
|
23
|
+
* THE CRUMB IS NOW A BOX, NOT A BARE TEXT NODE. Figma gives it 2px/4px padding
|
|
24
|
+
* and a 4px radius (`Radius/XS`), which is what gives the focus ring something
|
|
25
|
+
* to draw around — previously there was nothing but the glyphs.
|
|
26
|
+
*
|
|
27
|
+
* THE TYPE IS NOW BOUND TO TEXT STYLES, where the previous revision documented
|
|
28
|
+
* it as "raw throughout". Both map exactly onto tokens we already ship:
|
|
29
|
+
*
|
|
30
|
+
* not current Body Content/Body 1 13 / 19.5 / 400 -> text-body-1
|
|
31
|
+
* current Body Content/Body 1 - Bold 13 / 19.5 / 500 -> text-body-1-bold
|
|
32
|
+
*
|
|
33
|
+
* So the current crumb now steps its WEIGHT as well as its colour. The old
|
|
34
|
+
* `leading: normal` is gone — 19.5px is authored, and the visual spec used to
|
|
35
|
+
* assert the exact opposite ("leading is Auto not 19.5").
|
|
36
|
+
*
|
|
37
|
+
* HOVER IS A 0.5px RULE IN `currentColor`. Figma draws it as a vector line
|
|
38
|
+
* under the label, coloured to match that label — `#5b5b68` on an ancestor and
|
|
39
|
+
* `#16161a` on a current item — so `currentColor` reproduces both with one
|
|
40
|
+
* declaration. It spans the label, not the padded box.
|
|
41
|
+
*
|
|
42
|
+
* IT IS PAINTED AS A GRADIENT BAND RATHER THAN `text-decoration`, and that is
|
|
43
|
+
* forced: Chrome renders `text-decoration-thickness: 0.5px` as a full 1px.
|
|
44
|
+
* Measured by rendering an isolated underline at 1x and 2x — 0.5px and 1px came
|
|
45
|
+
* out byte-identical (0.985 and 0.993 CSS px). A background gradient is
|
|
46
|
+
* antialiased and has no such rounding, so it carries the authored 0.5 exactly.
|
|
47
|
+
* This is the same trap, and the same fix, as the Loading Indicator ring.
|
|
48
|
+
*
|
|
49
|
+
* FOCUS IS THE SHARED RING. Figma draws a 2px `Primary/Main` border inside the
|
|
50
|
+
* box; `focus-ring` is a 2px `Primary/Main` outline at a -2px offset, which is
|
|
51
|
+
* the same width, colour and position. Using the ring rather than a real border
|
|
52
|
+
* also keeps focus from reflowing the row — a border would add 4px to a box
|
|
53
|
+
* whose height is content-driven.
|
|
54
|
+
*
|
|
55
|
+
* THE SEPARATORS ARE NOW UNIFORM: both chevron and slash are 12px Inter Regular
|
|
56
|
+
* in `Content/Tertiary`. The previous revision documented three inconsistent
|
|
57
|
+
* treatments (13 Regular / 12 Regular / 13 Bold) and reproduced them as
|
|
58
|
+
* deliberate optical corrections. The designer has since regularised them, so
|
|
59
|
+
* that whole note is gone.
|
|
60
|
+
*
|
|
61
|
+
* They are still TEXT CHARACTERS, not icons — including the one Figma calls
|
|
62
|
+
* "chevron", which is a literal `>`. The glyph is the consumer's to write.
|
|
63
|
+
*
|
|
64
|
+
* SEPARATORS MUST CARRY `aria-hidden="true"`. They are decorative; without it a
|
|
65
|
+
* screen reader announces "greater than" / "slash" / "middot" between every
|
|
66
|
+
* crumb. `select-none` keeps them out of a copied path.
|
|
67
|
+
*
|
|
68
|
+
* THE MIDDOT IS NOT PART OF THE SEPARATOR COMPONENT. In the slash variant Figma
|
|
69
|
+
* draws it as a loose text node at 13px Inter Regular — a different size from
|
|
70
|
+
* the 12px separators, and Regular where the old revision had it Bold. It joins
|
|
71
|
+
* two facets of one location rather than two levels of hierarchy.
|
|
72
|
+
*
|
|
73
|
+
* COLOUR AND WEIGHT MARK DEPTH, NOT POSITION. In the slash variant BOTH trailing
|
|
74
|
+
* items are current, because the ID and the business name are two halves of one
|
|
75
|
+
* location — so `-current` is not "the last child".
|
|
76
|
+
*
|
|
77
|
+
* THE HOME ICON IS `Content/Tertiary`, a step lighter than the crumbs beside it.
|
|
78
|
+
* Previously inferred from a render; now confirmed by sampling the restructured
|
|
79
|
+
* container at full opacity.
|
|
80
|
+
*
|
|
81
|
+
* REMOVED IN THIS REBUILD: `.breadcrumb-mono`. The redesign renders `#BA-204417`
|
|
82
|
+
* as an ordinary current item in Inter Medium, so the JetBrains Mono 700
|
|
83
|
+
* treatment no longer has any basis in Figma. See CHANGELOG.md — this is a
|
|
84
|
+
* breaking change.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
@layer components {
|
|
88
|
+
.breadcrumbs {
|
|
89
|
+
@apply flex w-full items-center gap-2; /* 8px */
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* --- Crumbs -------------------------------------------------------------- */
|
|
93
|
+
|
|
94
|
+
/* A padded, rounded box as of the 2026-08-25 restructure. Height is
|
|
95
|
+
content-driven (2 + 19.5 + 2 = 23.5 against Figma's 24px frame, which is
|
|
96
|
+
its own rounding); there is no border, so the hairline trap that forces
|
|
97
|
+
explicit heights elsewhere does not apply here. */
|
|
98
|
+
.breadcrumb {
|
|
99
|
+
@apply shrink-0;
|
|
100
|
+
@apply px-1 py-0.5; /* 4px / 2px */
|
|
101
|
+
@apply rounded-tight; /* 4px — Radius/XS */
|
|
102
|
+
@apply text-body-1; /* 13 / 19.5 / 400 */
|
|
103
|
+
@apply text-content-secondary no-underline;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Figma State=Hover: a 0.5px rule under the label, in the label's own colour.
|
|
107
|
+
A gradient band, not text-decoration — Chrome floors the latter to 1px.
|
|
108
|
+
`content-box` origin makes it span the label rather than the padding. */
|
|
109
|
+
.breadcrumb:hover {
|
|
110
|
+
background-image: linear-gradient(currentColor, currentColor);
|
|
111
|
+
background-repeat: no-repeat;
|
|
112
|
+
background-origin: content-box;
|
|
113
|
+
background-size: 100% 0.5px;
|
|
114
|
+
background-position: 0 100%;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Figma State=Focus: 2px Primary/Main. See the header for why this is the
|
|
118
|
+
outline utility rather than the border Figma draws. */
|
|
119
|
+
.breadcrumb:focus-visible {
|
|
120
|
+
@apply focus-ring;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* The current location. In the slash variant this covers TWO adjacent items,
|
|
124
|
+
so it is a depth marker rather than "the last one". Now steps the weight
|
|
125
|
+
to 500 as well as the colour. */
|
|
126
|
+
.breadcrumb-current {
|
|
127
|
+
@apply text-body-1-bold; /* 13 / 19.5 / 500 */
|
|
128
|
+
@apply text-content-primary;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* Drawn a step lighter than the crumbs, matching the separators. */
|
|
132
|
+
.breadcrumb-home {
|
|
133
|
+
@apply shrink-0;
|
|
134
|
+
@apply text-content-tertiary;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* --- Separators ---------------------------------------------------------- */
|
|
138
|
+
|
|
139
|
+
/* Both types are identical now. Always pair with aria-hidden="true". */
|
|
140
|
+
.breadcrumb-separator {
|
|
141
|
+
@apply shrink-0 select-none;
|
|
142
|
+
@apply text-[12px] font-normal leading-[normal];
|
|
143
|
+
@apply text-content-tertiary;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Retained for compatibility only. The chevron and slash separators were 12px
|
|
147
|
+
and 13px in the previous design; they are both 12px now, so this modifier
|
|
148
|
+
restates the base rather than changing it. Safe to drop from markup. */
|
|
149
|
+
.breadcrumb-separator-chevron {
|
|
150
|
+
@apply text-[12px];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* The loose middot from the slash variant — 13px where the separators are 12,
|
|
154
|
+
and Regular where this used to be Bold. Not a Separator instance in Figma. */
|
|
155
|
+
.breadcrumb-separator-dot {
|
|
156
|
+
@apply text-[13px] font-normal;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Button Component — Figma 73:180
|
|
3
|
+
*
|
|
4
|
+
* Interactive button for actions throughout the dashboard. 42 variants across
|
|
5
|
+
* Size (sm/md/lg) x State (rest/hover/selected/active/disabled) x Display
|
|
6
|
+
* (primary/outline/empty). Primary has no `active`, which is why it is 12
|
|
7
|
+
* variants where the other two are 15.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* <button class="btn btn-primary">Primary Button</button>
|
|
11
|
+
* <button class="btn btn-outline btn-sm">Small Outline</button>
|
|
12
|
+
* <button class="btn btn-lg" disabled>Disabled Large</button>
|
|
13
|
+
*
|
|
14
|
+
* THERE IS NO "DEFAULT" DISPLAY VALUE. Figma's axis is primary / outline /
|
|
15
|
+
* empty, full stop. A bare `.btn` is Display=outline — the set's rest default —
|
|
16
|
+
* and that is all "default" ever meant here.
|
|
17
|
+
*
|
|
18
|
+
* Until 2026-08-24 the base class took outline's REST APPEARANCE but none of
|
|
19
|
+
* its states, because the interaction rules lived inside `.btn-outline`. A bare
|
|
20
|
+
* `.btn` therefore looked like an outline button and responded to nothing:
|
|
21
|
+
* identical at rest, inert on hover and on `aria-selected`. The ramp now lives
|
|
22
|
+
* on the base, so `.btn` behaves, and `.btn-outline` is an explicit alias for
|
|
23
|
+
* the same thing.
|
|
24
|
+
*
|
|
25
|
+
* OUTLINE AND EMPTY SHARE ONE INTERACTION RAMP in Figma — hover `Action/Subtle`,
|
|
26
|
+
* selected `Action/Hover`, active `Primary/Soft` + `Primary/Main` — differing
|
|
27
|
+
* only in the rest border and in whether active draws one. Putting the ramp on
|
|
28
|
+
* the base serves outline, empty and the bare class at once, and closes the two
|
|
29
|
+
* states `.btn-empty` was missing.
|
|
30
|
+
*
|
|
31
|
+
* The two FILLED displays run their own ramps and override all of it. The base
|
|
32
|
+
* ramp's `:active` sets both a border colour and `Primary/Main` text, so each
|
|
33
|
+
* filled variant resets `border-transparent` AND `Content/Contrast` in its own
|
|
34
|
+
* active rule — otherwise a pressed primary renders a blue label on a blue fill.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
@layer components {
|
|
38
|
+
.btn {
|
|
39
|
+
/* Layout */
|
|
40
|
+
@apply inline-flex items-center justify-center gap-1.25;
|
|
41
|
+
@apply h-7 px-3; /* Medium (28px) - default size, 5px gap */
|
|
42
|
+
|
|
43
|
+
/* Shape */
|
|
44
|
+
@apply rounded-control; /* 6px from Figma */
|
|
45
|
+
|
|
46
|
+
/* Type — each size has its OWN Figma text style, they are not shared:
|
|
47
|
+
sm = Action S (12px/14), md = Action M (12.5px/14), lg = Action L (13px/auto) */
|
|
48
|
+
@apply text-action-m; /* Medium default */
|
|
49
|
+
|
|
50
|
+
/* Interaction */
|
|
51
|
+
@apply cursor-pointer;
|
|
52
|
+
@apply transition-colors duration-150;
|
|
53
|
+
|
|
54
|
+
/* Display=outline — the base, not a separate "default". See the header. */
|
|
55
|
+
@apply border border-[length:var(--border-thin)] border-stroke-divider;
|
|
56
|
+
@apply bg-transparent text-content-primary;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* --- Base interaction ramp (Display=outline, shared with empty) ------ */
|
|
60
|
+
|
|
61
|
+
/* Declared before the variants so the filled displays, whose nested rules
|
|
62
|
+
compile to the same specificity, win on source order as they always have. */
|
|
63
|
+
|
|
64
|
+
.btn:hover:not(:disabled) {
|
|
65
|
+
@apply bg-action-subtle;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.btn:active:not(:disabled) {
|
|
69
|
+
@apply bg-primary-soft text-primary border-primary;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.btn[aria-selected="true"] {
|
|
73
|
+
@apply bg-action-hover;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* --- Variants ------------------------------------------------------- */
|
|
77
|
+
|
|
78
|
+
.btn-primary {
|
|
79
|
+
@apply border-transparent bg-primary text-content-contrast;
|
|
80
|
+
|
|
81
|
+
&:hover:not(:disabled) {
|
|
82
|
+
@apply bg-primary-dark;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:active:not(:disabled) {
|
|
86
|
+
@apply border-transparent bg-primary-pressed text-content-contrast;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&[aria-selected="true"] {
|
|
90
|
+
@apply bg-primary-pressed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:disabled {
|
|
94
|
+
@apply bg-primary-disabled;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Identical to the bare base by design — Figma's outline IS the default
|
|
99
|
+
Display, so this class exists to say so at the call site rather than to
|
|
100
|
+
add anything. Its states come from the base ramp above. */
|
|
101
|
+
.btn-outline {
|
|
102
|
+
@apply border-[length:var(--border-thin)] border-stroke-divider;
|
|
103
|
+
@apply bg-transparent text-content-primary;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* NOT IN BUTTON'S FIGMA VARIANT SET (73:180), which is primary / outline /
|
|
107
|
+
empty only. It comes from Modal (908:1580), where the destructive variant
|
|
108
|
+
renders its confirm button with a Critical/Main fill as an instance
|
|
109
|
+
override. Defined here rather than scoped to the modal footer, because a
|
|
110
|
+
destructive confirm is not modal-specific — the next one elsewhere would
|
|
111
|
+
otherwise reinvent it.
|
|
112
|
+
|
|
113
|
+
Figma specifies the rest state and nothing else. Hover steps to
|
|
114
|
+
Critical/Strong, which is the only darker critical token; there is no
|
|
115
|
+
critical-pressed, so :active is left to match hover rather than invent a
|
|
116
|
+
third colour. Revisit if the designer adds a real destructive Button. */
|
|
117
|
+
.btn-critical {
|
|
118
|
+
@apply border-transparent bg-critical text-content-contrast;
|
|
119
|
+
|
|
120
|
+
&:hover:not(:disabled) {
|
|
121
|
+
@apply bg-critical-strong;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:active:not(:disabled) {
|
|
125
|
+
@apply border-transparent bg-critical-strong text-content-contrast;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Not in Figma either — but without it the base ramp would grey out a
|
|
129
|
+
selected critical button. Matches its own pressed value. */
|
|
130
|
+
&[aria-selected="true"] {
|
|
131
|
+
@apply bg-critical-strong;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:disabled {
|
|
135
|
+
@apply bg-critical-soft text-content-tertiary;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* Hover (Action/Subtle) and selected (Action/Hover) come from the base ramp,
|
|
140
|
+
which is exactly what Figma draws for empty — they were missing entirely
|
|
141
|
+
before 2026-08-24. Only the active border differs: empty never draws one. */
|
|
142
|
+
.btn-empty {
|
|
143
|
+
@apply border-transparent bg-transparent text-content-primary;
|
|
144
|
+
|
|
145
|
+
&:active:not(:disabled) {
|
|
146
|
+
@apply border-transparent bg-primary-soft text-primary;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* --- Sizes ---------------------------------------------------------- */
|
|
151
|
+
|
|
152
|
+
.btn-sm {
|
|
153
|
+
@apply h-6 px-2 gap-1.25; /* 24px, 8px padding, 5px gap */
|
|
154
|
+
@apply text-action-s; /* 12px / 14px / 500 */
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.btn-lg {
|
|
158
|
+
@apply h-8 px-4 gap-1.5; /* 32px, 16px padding, 6px gap */
|
|
159
|
+
@apply text-action-l; /* 13px / normal / 500 */
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* --- States --------------------------------------------------------- */
|
|
163
|
+
|
|
164
|
+
.btn:focus-visible {
|
|
165
|
+
@apply focus-ring;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.btn:disabled {
|
|
169
|
+
@apply cursor-not-allowed;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Figma dims the label on the non-filled variants. Primary keeps its
|
|
173
|
+
contrast text, since its fill already drops to Primary/Disabled. */
|
|
174
|
+
.btn:disabled:not(.btn-primary) {
|
|
175
|
+
@apply text-content-tertiary;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Card Component — PLACEHOLDER, NOT PART OF THE REAL LIBRARY
|
|
3
|
+
*
|
|
4
|
+
* This is leftover scaffolding from the Phase 1 proof of concept. It was never
|
|
5
|
+
* extracted from a Figma component and has not yet been replaced by one.
|
|
6
|
+
*
|
|
7
|
+
* Its padding, radius and structure are invented. Do NOT treat it as a
|
|
8
|
+
* reference, do not copy its patterns into new components, and do not build
|
|
9
|
+
* product UI on it. It is excluded from the visual verification suite for the
|
|
10
|
+
* same reason — checking it would only assert that a placeholder still matches
|
|
11
|
+
* itself.
|
|
12
|
+
*
|
|
13
|
+
* When the real Card lands in Figma, this file should be rewritten from
|
|
14
|
+
* scratch rather than adjusted.
|
|
15
|
+
*
|
|
16
|
+
* Usage (provisional):
|
|
17
|
+
* <div class="card">
|
|
18
|
+
* <h2 class="card-title">Title</h2>
|
|
19
|
+
* <p class="card-body">Content</p>
|
|
20
|
+
* </div>
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
@layer components {
|
|
24
|
+
.card {
|
|
25
|
+
@apply p-4; /* Figma Spacing/16 */
|
|
26
|
+
|
|
27
|
+
/* Shape */
|
|
28
|
+
@apply rounded-surface; /* Figma Radius/MD */
|
|
29
|
+
@apply border border-[length:var(--border-thin)]; /* Figma Stroke/Thin */
|
|
30
|
+
|
|
31
|
+
@apply border-stroke-divider bg-surface-paper;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.card-title {
|
|
35
|
+
@apply mb-2; /* Figma Spacing/8 */
|
|
36
|
+
@apply text-h2; /* Figma Body Content/H2 */
|
|
37
|
+
@apply text-content-primary;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.card-body {
|
|
41
|
+
@apply text-body-1; /* Figma Body Content/Body 1 */
|
|
42
|
+
@apply text-content-secondary;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Compact variant */
|
|
46
|
+
.card-compact {
|
|
47
|
+
@apply p-3; /* Figma Spacing/12 */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Bordered variant — full-pixel border instead of the hairline default */
|
|
51
|
+
.card-bordered {
|
|
52
|
+
@apply border-[length:var(--border-line)] border-stroke-border; /* Figma Stroke/Line */
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Hoverable card */
|
|
56
|
+
.card-hover {
|
|
57
|
+
@apply cursor-pointer transition-shadow duration-200;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.card-hover:hover {
|
|
61
|
+
@apply shadow-panel; /* Figma General Drop Shadow */
|
|
62
|
+
}
|
|
63
|
+
}
|