@valiify/dashboard-ui 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +493 -4
- package/CLAUDE.md +884 -768
- package/COMPONENTS.md +520 -520
- package/GETTING_STARTED.md +63 -14
- package/QUICK_REFERENCE.md +22 -22
- package/README.md +45 -6
- package/TROUBLESHOOTING.md +46 -6
- package/class-manifest.json +664 -0
- package/design-methodology/dashboard.md +496 -0
- package/dist/dashboard-ui.css +4891 -0
- package/dist/index.css +502 -502
- package/examples/README.md +42 -0
- package/examples/basic/index.html +8 -8
- package/examples/daisyui-starter/README.md +58 -0
- package/examples/daisyui-starter/check-no-bleed.mjs +249 -0
- package/examples/daisyui-starter/index.html +72 -0
- package/examples/daisyui-starter/linked.html +74 -0
- package/examples/daisyui-starter/package-lock.json +2221 -0
- package/examples/daisyui-starter/package.json +22 -0
- package/examples/daisyui-starter/postcss.config.js +1 -0
- package/examples/daisyui-starter/src/host.css +14 -0
- package/examples/daisyui-starter/src/only-import.css +4 -0
- package/examples/daisyui-starter/src/styles.css +36 -0
- package/examples/daisyui-starter/tailwind.config.js +13 -0
- package/examples/postcss-starter/index.html +8 -8
- package/examples/postcss-starter/package.json +1 -1
- package/examples/sveltekit-starter/README.md +32 -0
- package/examples/sveltekit-starter/check-scoped-styles.mjs +103 -0
- package/examples/sveltekit-starter/package-lock.json +1300 -0
- package/examples/sveltekit-starter/package.json +24 -0
- package/examples/sveltekit-starter/src/app.css +17 -0
- package/examples/sveltekit-starter/src/app.html +11 -0
- package/examples/sveltekit-starter/src/lib/GlobalReset.svelte +20 -0
- package/examples/sveltekit-starter/src/lib/ScopedRemedy.svelte +27 -0
- package/examples/sveltekit-starter/src/lib/ScopedReset.svelte +22 -0
- package/examples/sveltekit-starter/src/routes/+layout.svelte +6 -0
- package/examples/sveltekit-starter/src/routes/+page.svelte +10 -0
- package/examples/sveltekit-starter/svelte.config.js +4 -0
- package/examples/sveltekit-starter/vite.config.js +6 -0
- package/examples/vite-starter/README.md +4 -4
- package/examples/vite-starter/package.json +1 -1
- package/examples/vite-starter/src/main.js +41 -41
- package/package.json +21 -4
- package/src/build/components.css +35 -0
- package/src/build/utilities.css +46 -0
- package/src/components/ICON-SYSTEM.md +39 -39
- package/src/components/alert.css +26 -26
- package/src/components/avatar.css +9 -9
- package/src/components/breadcrumbs.css +15 -15
- package/src/components/button.css +21 -21
- package/src/components/card.css +10 -10
- package/src/components/checkbox.css +21 -21
- package/src/components/chip.css +43 -43
- package/src/components/data-row.css +19 -19
- package/src/components/divider.css +23 -23
- package/src/components/dropdown-field.css +34 -34
- package/src/components/dropdown-menu.css +12 -12
- package/src/components/field-verification.css +25 -25
- package/src/components/filter-segment.css +20 -20
- package/src/components/icon-button.css +11 -11
- package/src/components/icon.css +18 -18
- package/src/components/input.css +29 -29
- package/src/components/link.css +28 -28
- package/src/components/loading-indicator.css +20 -20
- package/src/components/loading-inline.css +8 -8
- package/src/components/menu-item.css +28 -28
- package/src/components/modal.css +36 -36
- package/src/components/navigation-rail.css +95 -95
- package/src/components/pagination-item.css +22 -22
- package/src/components/pagination.css +24 -24
- package/src/components/pill.css +14 -14
- package/src/components/progress-bar.css +28 -28
- package/src/components/radio-select.css +13 -13
- package/src/components/section-marker.css +12 -12
- package/src/components/segment-selector.css +9 -9
- package/src/components/sensitive-data.css +8 -8
- package/src/components/skeleton.css +29 -29
- package/src/components/step.css +14 -14
- package/src/components/stepper.css +15 -15
- package/src/components/switch.css +12 -12
- package/src/components/tabs.css +40 -40
- package/src/components/tag.css +20 -20
- package/src/components/text-button.css +24 -24
- package/src/components/textarea.css +23 -23
- package/src/components/toast.css +29 -29
- package/src/components/tooltip.css +11 -11
- package/src/icons/README.md +16 -10
- package/src/icons/sprite.svg +1 -1
- package/src/themes/valiify-tokens.css +285 -0
- package/src/themes/valiify-type-prefixed.css +37 -0
- package/src/utilities/index.css +1 -1
- package/src/utility-surface.css +321 -0
- package/types/components.d.ts +235 -236
package/src/components/tag.css
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* Tag (79:251): Hover × Active × Disabled × Size, plus four boolean slots.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* <button class="tag" aria-pressed="false">Design</button>
|
|
9
|
+
* <button class="vd-tag" aria-pressed="false">Design</button>
|
|
10
10
|
*
|
|
11
|
-
* <button class="tag tag-md" aria-pressed="false">
|
|
12
|
-
* <span class="avatar avatar-xs">JS</span>
|
|
11
|
+
* <button class="vd-tag vd-tag-md" aria-pressed="false">
|
|
12
|
+
* <span class="vd-avatar vd-avatar-xs">JS</span>
|
|
13
13
|
* Design
|
|
14
|
-
* <span class="tag-count">1</span>
|
|
15
|
-
* <span class="dot dot-warning"></span>
|
|
14
|
+
* <span class="vd-tag-count">1</span>
|
|
15
|
+
* <span class="vd-dot vd-dot-warning"></span>
|
|
16
16
|
* </button>
|
|
17
17
|
*
|
|
18
18
|
* THE SLOTS ARE EXISTING COMPONENTS, NOT NEW PARTS. Figma's avatar slot is a
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
@layer components {
|
|
48
|
-
.tag {
|
|
48
|
+
.vd-tag {
|
|
49
49
|
/* Layout */
|
|
50
50
|
@apply inline-flex shrink-0 items-center gap-2.5; /* 10px at sm */
|
|
51
51
|
@apply px-2.25 py-1; /* 9px / 4px */
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
/* --- Parts ------------------------------------------------------------ */
|
|
72
72
|
|
|
73
73
|
/* Not a badge, despite the Figma description — bare mono text. md only. */
|
|
74
|
-
.tag-count {
|
|
74
|
+
.vd-tag-count {
|
|
75
75
|
@apply shrink-0;
|
|
76
76
|
@apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
|
|
77
77
|
@apply text-content-tertiary;
|
|
@@ -79,55 +79,55 @@
|
|
|
79
79
|
|
|
80
80
|
/* --- Sizes ------------------------------------------------------------ */
|
|
81
81
|
|
|
82
|
-
.tag-sm {
|
|
82
|
+
.vd-tag-sm {
|
|
83
83
|
@apply h-[21px] gap-2.5; /* 10px gap */
|
|
84
84
|
@apply text-micro-l; /* 11px / 400 */
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/* 24px is fixed in Figma and wins over its own nominal 4px padding, which
|
|
88
88
|
would compute to 26px. Pinned, as button.css does. */
|
|
89
|
-
.tag-md {
|
|
89
|
+
.vd-tag-md {
|
|
90
90
|
@apply h-[24px] gap-2; /* 8px gap */
|
|
91
91
|
@apply text-caption; /* 12px / 18px / 400 */
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/* --- States ----------------------------------------------------------- */
|
|
95
95
|
|
|
96
|
-
.tag:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
96
|
+
.vd-tag:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
97
97
|
@apply bg-action-subtle;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.tag:focus-visible {
|
|
100
|
+
.vd-tag:focus-visible {
|
|
101
101
|
@apply focus-ring;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/* Active — a solid, full-contrast fill, unlike Pill's soft tint. */
|
|
105
|
-
.tag[aria-pressed="true"],
|
|
106
|
-
.tag[aria-selected="true"] {
|
|
105
|
+
.vd-tag[aria-pressed="true"],
|
|
106
|
+
.vd-tag[aria-selected="true"] {
|
|
107
107
|
@apply bg-primary text-content-contrast;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
.tag[aria-pressed="true"] .tag-count,
|
|
111
|
-
.tag[aria-selected="true"] .tag-count {
|
|
110
|
+
.vd-tag[aria-pressed="true"] .vd-tag-count,
|
|
111
|
+
.vd-tag[aria-selected="true"] .vd-tag-count {
|
|
112
112
|
@apply text-content-contrast;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* Only md bumps the weight when active. sm has no equivalent step. */
|
|
116
|
-
.tag-md[aria-pressed="true"],
|
|
117
|
-
.tag-md[aria-selected="true"] {
|
|
116
|
+
.vd-tag-md[aria-pressed="true"],
|
|
117
|
+
.vd-tag-md[aria-selected="true"] {
|
|
118
118
|
@apply text-caption-bold; /* 12px / 18px / 500 */
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/* Disabled dims the label ONLY — border, background and slots are untouched,
|
|
122
122
|
which is what Figma draws. No blanket opacity. */
|
|
123
|
-
.tag:disabled,
|
|
124
|
-
.tag[aria-disabled="true"] {
|
|
123
|
+
.vd-tag:disabled,
|
|
124
|
+
.vd-tag[aria-disabled="true"] {
|
|
125
125
|
@apply cursor-not-allowed text-content-tertiary;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/* Ring — Figma boolean, hidden by default. Same treatment as Chip, Avatar
|
|
129
129
|
and Pill. */
|
|
130
|
-
.tag.with-ring {
|
|
130
|
+
.vd-tag.vd-with-ring {
|
|
131
131
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
* plus Icon and Ring booleans.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
|
-
* <button class="text-button text-button-cell">Select all</button>
|
|
9
|
+
* <button class="vd-text-button vd-text-button-cell">Select all</button>
|
|
10
10
|
*
|
|
11
|
-
* <button class="text-button text-button-primary">
|
|
12
|
-
* <svg class="icon icon-size-12" aria-hidden="true"><use href="#plus" /></svg>
|
|
11
|
+
* <button class="vd-text-button vd-text-button-primary">
|
|
12
|
+
* <svg class="vd-icon vd-icon-size-12" aria-hidden="true"><use href="#plus" /></svg>
|
|
13
13
|
* Add row
|
|
14
14
|
* </button>
|
|
15
15
|
*
|
|
16
16
|
* THIS IS NOT A .btn VARIANT. Different Figma component, different type scale,
|
|
17
17
|
* different geometry — .btn has fixed 24/28/32px heights, this hugs its text at
|
|
18
18
|
* 15px or 18px. Reach for .btn-empty when you want a real button that happens
|
|
19
|
-
* to look bare; reach for .text-button for an inline affordance inside a table
|
|
19
|
+
* to look bare; reach for .vd-text-button for an inline affordance inside a table
|
|
20
20
|
* cell or a line of copy.
|
|
21
21
|
*
|
|
22
22
|
* THE THREE TYPES ARE NOT THREE SKINS OF ONE CONTROL — cell is a genuinely
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
@layer components {
|
|
58
|
-
.text-button {
|
|
58
|
+
.vd-text-button {
|
|
59
59
|
/* Layout — shared by all three types */
|
|
60
60
|
@apply inline-flex shrink-0 items-center justify-center gap-1; /* 4px */
|
|
61
61
|
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
/* --- Types -------------------------------------------------------------- */
|
|
80
80
|
|
|
81
81
|
/* Explicit form of the default. */
|
|
82
|
-
.text-button-cell {
|
|
82
|
+
.vd-text-button-cell {
|
|
83
83
|
@apply px-1.75 py-0.25; /* 7px / 1px */
|
|
84
84
|
@apply h-[15px]; /* pinned — see the header */
|
|
85
85
|
@apply text-micro-l; /* 11px / 400 / Auto */
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/* No padding at all — 52x18 in Figma is exactly the 12px/18px line box. */
|
|
90
|
-
.text-button-text {
|
|
90
|
+
.vd-text-button-text {
|
|
91
91
|
@apply h-auto px-0 py-0;
|
|
92
92
|
@apply text-caption; /* 12px / 18px / 400 */
|
|
93
93
|
@apply text-content-secondary;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.text-button-primary {
|
|
96
|
+
.vd-text-button-primary {
|
|
97
97
|
@apply h-auto px-0 py-0;
|
|
98
98
|
@apply text-caption; /* 12px / 18px / 400 */
|
|
99
99
|
@apply text-primary;
|
|
@@ -102,69 +102,69 @@
|
|
|
102
102
|
/* --- States ------------------------------------------------------------- */
|
|
103
103
|
|
|
104
104
|
/* Shared: hover and press darken the label. Primary overrides both below. */
|
|
105
|
-
.text-button:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
105
|
+
.vd-text-button:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
106
106
|
@apply text-content-primary;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.text-button:active:not(:disabled):not([aria-disabled="true"]) {
|
|
109
|
+
.vd-text-button:active:not(:disabled):not([aria-disabled="true"]) {
|
|
110
110
|
@apply text-content-primary;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/* cell is the only type that grows a background. */
|
|
114
|
-
.text-button-cell:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
114
|
+
.vd-text-button-cell:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
115
115
|
@apply bg-action-hover;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.text-button-cell:active:not(:disabled):not([aria-disabled="true"]) {
|
|
118
|
+
.vd-text-button-cell:active:not(:disabled):not([aria-disabled="true"]) {
|
|
119
119
|
@apply bg-action-focused;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/* Primary rides the Primary ramp instead of the Content ramp. Same
|
|
123
123
|
specificity as the shared rules above, so it must stay after them —
|
|
124
124
|
the ordering is load-bearing, exactly as in button.css. */
|
|
125
|
-
.text-button-primary:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
125
|
+
.vd-text-button-primary:hover:not(:disabled):not([aria-disabled="true"]) {
|
|
126
126
|
@apply text-primary-dark;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.text-button-primary:active:not(:disabled):not([aria-disabled="true"]) {
|
|
129
|
+
.vd-text-button-primary:active:not(:disabled):not([aria-disabled="true"]) {
|
|
130
130
|
@apply text-primary-pressed;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
/* Active — the selected/applied state. Weight steps 400 -> 500, and because
|
|
134
134
|
the type token carries size and line-height too, the whole token is
|
|
135
135
|
swapped rather than just the weight. */
|
|
136
|
-
.text-button-cell[aria-pressed="true"],
|
|
137
|
-
.text-button-cell[aria-selected="true"] {
|
|
136
|
+
.vd-text-button-cell[aria-pressed="true"],
|
|
137
|
+
.vd-text-button-cell[aria-selected="true"] {
|
|
138
138
|
@apply bg-primary-soft text-primary;
|
|
139
139
|
@apply text-micro-l-bold; /* 11px / 500 / Auto */
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
.text-button-text[aria-pressed="true"],
|
|
143
|
-
.text-button-text[aria-selected="true"] {
|
|
142
|
+
.vd-text-button-text[aria-pressed="true"],
|
|
143
|
+
.vd-text-button-text[aria-selected="true"] {
|
|
144
144
|
@apply text-primary;
|
|
145
145
|
@apply text-caption-bold; /* 12px / 18px / 500 */
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/* Figma draws no Active for Primary. It already sits at Primary/Main, so the
|
|
149
149
|
only thing left to express selection with is the weight. Nothing invented. */
|
|
150
|
-
.text-button-primary[aria-pressed="true"],
|
|
151
|
-
.text-button-primary[aria-selected="true"] {
|
|
150
|
+
.vd-text-button-primary[aria-pressed="true"],
|
|
151
|
+
.vd-text-button-primary[aria-selected="true"] {
|
|
152
152
|
@apply text-caption-bold; /* 12px / 18px / 500 */
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.text-button:focus-visible {
|
|
155
|
+
.vd-text-button:focus-visible {
|
|
156
156
|
@apply focus-ring;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
/* Not in Figma — house convention. */
|
|
160
|
-
.text-button:disabled,
|
|
161
|
-
.text-button[aria-disabled="true"] {
|
|
160
|
+
.vd-text-button:disabled,
|
|
161
|
+
.vd-text-button[aria-disabled="true"] {
|
|
162
162
|
@apply cursor-not-allowed text-content-tertiary;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
/* Ring — Figma boolean, hidden by default. Same 2px inset Primary/Main
|
|
166
166
|
treatment as Chip, Avatar, Pill and Tag. */
|
|
167
|
-
.text-button.with-ring {
|
|
167
|
+
.vd-text-button.vd-with-ring {
|
|
168
168
|
@apply ring-[length:var(--border-micro)] ring-inset ring-primary;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -13,19 +13,19 @@
|
|
|
13
13
|
* consumer decides: `rows` for an initial line count, a height utility for a
|
|
14
14
|
* fixed box, or the resize handle. There are no size variants.
|
|
15
15
|
*
|
|
16
|
-
* .textarea-counter is a library extension, not in the design file.
|
|
16
|
+
* .vd-textarea-counter is a library extension, not in the design file.
|
|
17
17
|
*
|
|
18
18
|
* Structure:
|
|
19
|
-
* <div class="textarea-container">
|
|
20
|
-
* <div class="textarea-label">...</div> <!-- Optional -->
|
|
21
|
-
* <div class="textarea-field">...</div> <!-- Required -->
|
|
22
|
-
* <div class="textarea-error-message">...</div> <!-- Optional -->
|
|
19
|
+
* <div class="vd-textarea-container">
|
|
20
|
+
* <div class="vd-textarea-label">...</div> <!-- Optional -->
|
|
21
|
+
* <div class="vd-textarea-field">...</div> <!-- Required -->
|
|
22
|
+
* <div class="vd-textarea-error-message">...</div> <!-- Optional -->
|
|
23
23
|
* </div>
|
|
24
24
|
*
|
|
25
25
|
* Usage:
|
|
26
|
-
* <div class="textarea-container">
|
|
27
|
-
* <div class="textarea-field">
|
|
28
|
-
* <textarea class="textarea" rows="4" placeholder="Enter text..."></textarea>
|
|
26
|
+
* <div class="vd-textarea-container">
|
|
27
|
+
* <div class="vd-textarea-field">
|
|
28
|
+
* <textarea class="vd-textarea" rows="4" placeholder="Enter text..."></textarea>
|
|
29
29
|
* </div>
|
|
30
30
|
* </div>
|
|
31
31
|
*/
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
@layer components {
|
|
34
34
|
/* --- Container ---------------------------------------------------- */
|
|
35
35
|
|
|
36
|
-
.textarea-container {
|
|
36
|
+
.vd-textarea-container {
|
|
37
37
|
@apply flex flex-col items-start w-full;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* --- Label ------------------------------------------------------- */
|
|
41
41
|
|
|
42
|
-
.textarea-label {
|
|
42
|
+
.vd-textarea-label {
|
|
43
43
|
@apply flex items-center w-full pb-1.5; /* 6px bottom padding */
|
|
44
44
|
@apply text-[10px] font-semibold uppercase tracking-[1px] leading-[12px];
|
|
45
45
|
@apply text-content-tertiary;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.textarea-label > span {
|
|
48
|
+
.vd-textarea-label > span {
|
|
49
49
|
@apply flex-1;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
/* Note: Help button uses .icon-button .icon-button-xs from icon-button.css */
|
|
52
|
+
/* Note: Help button uses .vd-icon-button .vd-icon-button-xs from icon-button.css */
|
|
53
53
|
|
|
54
54
|
/* --- Textarea Field ---------------------------------------------- */
|
|
55
55
|
|
|
56
|
-
.textarea-field {
|
|
56
|
+
.vd-textarea-field {
|
|
57
57
|
/* Layout */
|
|
58
58
|
@apply flex items-start w-full; /* items-start for top alignment */
|
|
59
59
|
@apply px-3 py-1.75; /* 12px / 7px, per Figma */
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
/* --- Actual Textarea Element ------------------------------------- */
|
|
78
78
|
|
|
79
|
-
.textarea {
|
|
79
|
+
.vd-textarea {
|
|
80
80
|
/* Layout */
|
|
81
81
|
@apply flex-1 w-full;
|
|
82
82
|
min-width: 0;
|
|
@@ -107,40 +107,40 @@
|
|
|
107
107
|
|
|
108
108
|
/* --- Background Variants ----------------------------------------- */
|
|
109
109
|
|
|
110
|
-
.textarea-bg-neutral {
|
|
110
|
+
.vd-textarea-bg-neutral {
|
|
111
111
|
@apply bg-surface-card; /* Figma BG=Neutral is Surface/Card #fafafb */
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/* --- States ------------------------------------------------------ */
|
|
115
115
|
|
|
116
116
|
/* Hover */
|
|
117
|
-
.textarea-field:hover:not(:has(:disabled)):not(.textarea-disabled) {
|
|
117
|
+
.vd-textarea-field:hover:not(:has(:disabled)):not(.vd-textarea-disabled) {
|
|
118
118
|
@apply border-stroke-border;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
/* Focus */
|
|
122
|
-
.textarea-field:focus-within {
|
|
122
|
+
.vd-textarea-field:focus-within {
|
|
123
123
|
@apply focus-ring;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/* Error */
|
|
127
|
-
.textarea-field.textarea-error {
|
|
127
|
+
.vd-textarea-field.vd-textarea-error {
|
|
128
128
|
@apply border-critical;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
/* Disabled */
|
|
132
|
-
.textarea-field:has(:disabled),
|
|
133
|
-
.textarea-field.textarea-disabled {
|
|
132
|
+
.vd-textarea-field:has(:disabled),
|
|
133
|
+
.vd-textarea-field.vd-textarea-disabled {
|
|
134
134
|
@apply bg-action-subtle border-stroke-divider cursor-not-allowed;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.textarea:disabled {
|
|
137
|
+
.vd-textarea:disabled {
|
|
138
138
|
@apply cursor-not-allowed;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
/* --- Error Message ----------------------------------------------- */
|
|
142
142
|
|
|
143
|
-
.textarea-error-message {
|
|
143
|
+
.vd-textarea-error-message {
|
|
144
144
|
@apply flex items-center w-full pt-1.5; /* 6px top padding */
|
|
145
145
|
@apply text-[11px] leading-[normal] font-normal;
|
|
146
146
|
@apply text-critical-strong;
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
|
|
149
149
|
/* --- Character Counter (Optional) -------------------------------- */
|
|
150
150
|
|
|
151
|
-
.textarea-counter {
|
|
151
|
+
.vd-textarea-counter {
|
|
152
152
|
@apply flex items-center justify-end w-full pt-1;
|
|
153
153
|
@apply text-[11px] leading-[normal] font-normal;
|
|
154
154
|
@apply text-content-secondary;
|
package/src/components/toast.css
CHANGED
|
@@ -6,30 +6,30 @@
|
|
|
6
6
|
* Simple).
|
|
7
7
|
*
|
|
8
8
|
* Usage — Full:
|
|
9
|
-
* <div class="toast toast-success" role="status">
|
|
10
|
-
* <div class="toast-header">
|
|
11
|
-
* <div class="toast-main">
|
|
12
|
-
* <svg class="toast-icon icon icon-size-18" aria-hidden="true">
|
|
9
|
+
* <div class="vd-toast vd-toast-success" role="status">
|
|
10
|
+
* <div class="vd-toast-header">
|
|
11
|
+
* <div class="vd-toast-main">
|
|
12
|
+
* <svg class="vd-toast-icon vd-icon vd-icon-size-18" aria-hidden="true">
|
|
13
13
|
* <use href="#circle-check" />
|
|
14
14
|
* </svg>
|
|
15
|
-
* <div class="toast-text">
|
|
16
|
-
* <p class="toast-title">Document request sent</p>
|
|
17
|
-
* <p class="toast-message">Client has been notified to upload their W-9.</p>
|
|
15
|
+
* <div class="vd-toast-text">
|
|
16
|
+
* <p class="vd-toast-title">Document request sent</p>
|
|
17
|
+
* <p class="vd-toast-message">Client has been notified to upload their W-9.</p>
|
|
18
18
|
* </div>
|
|
19
19
|
* </div>
|
|
20
|
-
* <button class="icon-button icon-button-md" aria-label="Dismiss">
|
|
21
|
-
* <svg class="icon icon-size-14" aria-hidden="true"><use href="#x" /></svg>
|
|
20
|
+
* <button class="vd-icon-button vd-icon-button-md" aria-label="Dismiss">
|
|
21
|
+
* <svg class="vd-icon vd-icon-size-14" aria-hidden="true"><use href="#x" /></svg>
|
|
22
22
|
* </button>
|
|
23
23
|
* </div>
|
|
24
|
-
* <div class="toast-footer">
|
|
25
|
-
* <span class="toast-timestamp">just now</span>
|
|
26
|
-
* <button class="text-button text-button-primary">Retry</button>
|
|
24
|
+
* <div class="vd-toast-footer">
|
|
25
|
+
* <span class="vd-toast-timestamp">just now</span>
|
|
26
|
+
* <button class="vd-text-button vd-text-button-primary">Retry</button>
|
|
27
27
|
* </div>
|
|
28
28
|
* </div>
|
|
29
29
|
*
|
|
30
30
|
* Usage — Simple:
|
|
31
|
-
* <div class="toast toast-simple" role="status">
|
|
32
|
-
* <svg class="icon icon-size-15" aria-hidden="true"><use href="#check" /></svg>
|
|
31
|
+
* <div class="vd-toast vd-toast-simple" role="status">
|
|
32
|
+
* <svg class="vd-icon vd-icon-size-15" aria-hidden="true"><use href="#check" /></svg>
|
|
33
33
|
* Template Saved
|
|
34
34
|
* </div>
|
|
35
35
|
*
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
*/
|
|
77
77
|
|
|
78
78
|
@layer components {
|
|
79
|
-
.toast {
|
|
79
|
+
.vd-toast {
|
|
80
80
|
/* Layout — Full */
|
|
81
81
|
@apply flex w-89 flex-col items-start gap-3; /* 356px, 12px */
|
|
82
82
|
@apply p-4; /* 16px */
|
|
@@ -94,43 +94,43 @@
|
|
|
94
94
|
|
|
95
95
|
/* --- Full parts --------------------------------------------------------- */
|
|
96
96
|
|
|
97
|
-
.toast-header {
|
|
97
|
+
.vd-toast-header {
|
|
98
98
|
@apply flex w-full items-start justify-between;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.toast-main {
|
|
101
|
+
.vd-toast-main {
|
|
102
102
|
@apply flex flex-1 items-start gap-3; /* 12px */
|
|
103
103
|
min-width: 0;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/* 18px. Colour comes from the type class; the glyph is the consumer's. */
|
|
107
|
-
.toast-icon {
|
|
107
|
+
.vd-toast-icon {
|
|
108
108
|
@apply shrink-0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.toast-text {
|
|
111
|
+
.vd-toast-text {
|
|
112
112
|
@apply flex flex-1 flex-col items-start gap-1; /* 4px */
|
|
113
113
|
min-width: 0;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
/* 12.5px with a 12.5px line-height — the line box is exactly the cap height,
|
|
117
117
|
which is intentional in Figma and keeps the two lines tight. */
|
|
118
|
-
.toast-title {
|
|
118
|
+
.vd-toast-title {
|
|
119
119
|
@apply text-body-2-bold; /* 12.5px / 12.5px / 500 */
|
|
120
120
|
@apply text-content-primary;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.toast-message {
|
|
123
|
+
.vd-toast-message {
|
|
124
124
|
@apply text-caption; /* 12px / 18px / 400 */
|
|
125
125
|
@apply text-content-secondary;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
.toast-footer {
|
|
128
|
+
.vd-toast-footer {
|
|
129
129
|
@apply flex w-full items-center justify-between;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/* Data/Data xs needs font-mono — --text-* carries no family. See CLAUDE.md. */
|
|
133
|
-
.toast-timestamp {
|
|
133
|
+
.vd-toast-timestamp {
|
|
134
134
|
@apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
|
|
135
135
|
@apply text-content-faint;
|
|
136
136
|
}
|
|
@@ -139,15 +139,15 @@
|
|
|
139
139
|
|
|
140
140
|
/* Type sets the icon colour and nothing else. Unlike Modal, all three follow
|
|
141
141
|
the same pattern — no exceptions to reproduce. */
|
|
142
|
-
.toast-success .toast-icon {
|
|
142
|
+
.vd-toast-success .vd-toast-icon {
|
|
143
143
|
@apply text-approved;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
.toast-error .toast-icon {
|
|
146
|
+
.vd-toast-error .vd-toast-icon {
|
|
147
147
|
@apply text-critical;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
.toast-info .toast-icon {
|
|
150
|
+
.vd-toast-info .vd-toast-icon {
|
|
151
151
|
@apply text-primary;
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
/* A different shape wearing the same name — see the header. Every property
|
|
157
157
|
Full sets and Simple contradicts has to be restated, so this block is
|
|
158
158
|
exhaustive on purpose rather than relying on what happens to cascade. */
|
|
159
|
-
.toast-simple {
|
|
159
|
+
.vd-toast-simple {
|
|
160
160
|
@apply inline-flex w-70 flex-row items-center justify-center gap-2.25; /* 280px, 9px */
|
|
161
161
|
@apply px-4 py-2.5; /* 16px / 10px */
|
|
162
162
|
@apply h-[35px]; /* pinned — see the header */
|
|
@@ -175,8 +175,8 @@
|
|
|
175
175
|
|
|
176
176
|
/* Simple has no type variants in Figma, so a stray type class must not tint
|
|
177
177
|
its icon — it is Content/Contrast like the rest of the pill. */
|
|
178
|
-
.toast-simple .toast-icon,
|
|
179
|
-
.toast-simple .icon {
|
|
178
|
+
.vd-toast-simple .vd-toast-icon,
|
|
179
|
+
.vd-toast-simple .vd-icon {
|
|
180
180
|
@apply shrink-0 text-content-contrast;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
* from Figma Tooltip (880:31125) — a single symbol, no variants.
|
|
6
6
|
*
|
|
7
7
|
* Structure (Figma's own property names):
|
|
8
|
-
* <div class="tooltip" role="tooltip">
|
|
9
|
-
* <p class="tooltip-title">INDUSTRY / NAICS</p>
|
|
10
|
-
* <p class="tooltip-content">North American Industry Classification …</p>
|
|
11
|
-
* <hr class="tooltip-divider" />
|
|
12
|
-
* <p class="tooltip-subtext">Middesk · Secretary of State</p>
|
|
8
|
+
* <div class="vd-tooltip" role="tooltip">
|
|
9
|
+
* <p class="vd-tooltip-title">INDUSTRY / NAICS</p>
|
|
10
|
+
* <p class="vd-tooltip-content">North American Industry Classification …</p>
|
|
11
|
+
* <hr class="vd-tooltip-divider" />
|
|
12
|
+
* <p class="vd-tooltip-subtext">Middesk · Secretary of State</p>
|
|
13
13
|
* </div>
|
|
14
14
|
*
|
|
15
15
|
* All four parts are optional in markup. Figma models title / content /
|
|
16
16
|
* subtext as TEXT properties rather than boolean toggles, so it draws them
|
|
17
|
-
* always — but a tooltip with only `.tooltip-content` is the common case and
|
|
17
|
+
* always — but a tooltip with only `.vd-tooltip-content` is the common case and
|
|
18
18
|
* nothing here depends on the siblings being present.
|
|
19
19
|
*
|
|
20
20
|
* This is the only DARK surface in the library: the background is
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
@layer components {
|
|
30
|
-
.tooltip {
|
|
30
|
+
.vd-tooltip {
|
|
31
31
|
/* Layout */
|
|
32
32
|
@apply flex w-70 flex-col items-start gap-1.5; /* 280px, 6px */
|
|
33
33
|
@apply px-4 py-3; /* 16px / 12px */
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
|
|
48
48
|
/* Title and subtext are styled identically in Figma — same size, same
|
|
49
49
|
token. Kept as one rule so they cannot drift apart. */
|
|
50
|
-
.tooltip-title,
|
|
51
|
-
.tooltip-subtext {
|
|
50
|
+
.vd-tooltip-title,
|
|
51
|
+
.vd-tooltip-subtext {
|
|
52
52
|
@apply w-full;
|
|
53
53
|
@apply text-micro-l text-content-faint; /* 11px / 400 */
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.tooltip-content {
|
|
56
|
+
.vd-tooltip-content {
|
|
57
57
|
@apply w-full;
|
|
58
58
|
@apply text-caption text-content-contrast; /* 12px / 18px / 400 */
|
|
59
59
|
}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
invisible on this dark background. Drawn as a filled box rather than a
|
|
63
63
|
border because Chrome rounds sub-pixel border widths up to a full 1px;
|
|
64
64
|
a background box can render the half pixel at 2x. */
|
|
65
|
-
.tooltip-divider {
|
|
65
|
+
.vd-tooltip-divider {
|
|
66
66
|
@apply w-full border-none;
|
|
67
67
|
height: var(--border-thin);
|
|
68
68
|
@apply bg-content-secondary;
|
package/src/icons/README.md
CHANGED
|
@@ -22,17 +22,17 @@ Load the sprite once in your HTML (typically in `<head>` or at the start of `<bo
|
|
|
22
22
|
|
|
23
23
|
```html
|
|
24
24
|
<!-- Basic usage -->
|
|
25
|
-
<svg class="icon" width="24" height="24">
|
|
25
|
+
<svg class="vd-icon" width="24" height="24">
|
|
26
26
|
<use href="#search" />
|
|
27
27
|
</svg>
|
|
28
28
|
|
|
29
29
|
<!-- With currentColor (inherits text color) -->
|
|
30
|
-
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
30
|
+
<svg class="vd-icon" width="20" height="20" aria-hidden="true">
|
|
31
31
|
<use href="#check" />
|
|
32
32
|
</svg>
|
|
33
33
|
|
|
34
34
|
<!-- Custom icon (prefixed with 'custom-') -->
|
|
35
|
-
<svg class="icon" width="24" height="24">
|
|
35
|
+
<svg class="vd-icon" width="24" height="24">
|
|
36
36
|
<use href="#custom-valiify-logo" />
|
|
37
37
|
</svg>
|
|
38
38
|
```
|
|
@@ -41,6 +41,12 @@ Load the sprite once in your HTML (typically in `<head>` or at the start of `<bo
|
|
|
41
41
|
|
|
42
42
|
Icons use `currentColor` by default and scale to their container:
|
|
43
43
|
|
|
44
|
+
> **Superseded.** The block below is the original sketch of the icon class. The
|
|
45
|
+
> shipped API is `.vd-icon` plus `.icon-size-*` (10–24), and stroke weight comes from
|
|
46
|
+
> the `--icon-stroke` ramp in `src/components/icon.css`, not a flat `stroke-width: 2`
|
|
47
|
+
> — see the Icon section of CLAUDE.md. Colour is a token utility (`text-approved`),
|
|
48
|
+
> not an `.icon-success` modifier. Kept for history; do not copy.
|
|
49
|
+
|
|
44
50
|
```css
|
|
45
51
|
.icon {
|
|
46
52
|
display: inline-block;
|
|
@@ -115,7 +121,7 @@ Custom icons are prefixed with `custom-` to avoid naming conflicts.
|
|
|
115
121
|
|
|
116
122
|
4. **Use your icon**:
|
|
117
123
|
```html
|
|
118
|
-
<svg class="icon" width="24" height="24">
|
|
124
|
+
<svg class="vd-icon" width="24" height="24">
|
|
119
125
|
<use href="#custom-status-verified" />
|
|
120
126
|
</svg>
|
|
121
127
|
```
|
|
@@ -172,8 +178,8 @@ export default {
|
|
|
172
178
|
### Vanilla HTML/CSS (Framework-agnostic)
|
|
173
179
|
```html
|
|
174
180
|
<!-- Just use SVG directly -->
|
|
175
|
-
<button class="btn btn-primary">
|
|
176
|
-
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
181
|
+
<button class="vd-btn vd-btn-primary">
|
|
182
|
+
<svg class="vd-icon" width="20" height="20" aria-hidden="true">
|
|
177
183
|
<use href="#search" />
|
|
178
184
|
</svg>
|
|
179
185
|
Search
|
|
@@ -186,7 +192,7 @@ export default {
|
|
|
186
192
|
```html
|
|
187
193
|
<!-- Icon next to text label -->
|
|
188
194
|
<button>
|
|
189
|
-
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
195
|
+
<svg class="vd-icon" width="20" height="20" aria-hidden="true">
|
|
190
196
|
<use href="#save" />
|
|
191
197
|
</svg>
|
|
192
198
|
Save Changes
|
|
@@ -197,7 +203,7 @@ export default {
|
|
|
197
203
|
```html
|
|
198
204
|
<!-- Icon is the only label -->
|
|
199
205
|
<button aria-label="Close dialog">
|
|
200
|
-
<svg class="icon" width="20" height="20" aria-hidden="true">
|
|
206
|
+
<svg class="vd-icon" width="20" height="20" aria-hidden="true">
|
|
201
207
|
<use href="#x" />
|
|
202
208
|
</svg>
|
|
203
209
|
</button>
|
|
@@ -206,8 +212,8 @@ export default {
|
|
|
206
212
|
### Meaningful icons (convey information)
|
|
207
213
|
```html
|
|
208
214
|
<!-- Icon conveys status/information -->
|
|
209
|
-
<div
|
|
210
|
-
<svg class="icon icon-
|
|
215
|
+
<div>
|
|
216
|
+
<svg class="vd-icon vd-icon-size-16 text-approved" role="img" aria-label="Verified">
|
|
211
217
|
<use href="#check-circle" />
|
|
212
218
|
</svg>
|
|
213
219
|
<span>Account verified</span>
|