@valiify/dashboard-ui 0.1.1 → 0.2.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +411 -4
  2. package/CLAUDE.md +809 -768
  3. package/COMPONENTS.md +520 -520
  4. package/GETTING_STARTED.md +14 -14
  5. package/QUICK_REFERENCE.md +22 -22
  6. package/README.md +28 -6
  7. package/TROUBLESHOOTING.md +6 -6
  8. package/class-manifest.json +664 -0
  9. package/design-methodology/dashboard.md +496 -0
  10. package/dist/dashboard-ui.css +4897 -0
  11. package/dist/index.css +502 -502
  12. package/examples/basic/index.html +8 -8
  13. package/examples/daisyui-starter/README.md +35 -0
  14. package/examples/daisyui-starter/check-no-bleed.mjs +81 -0
  15. package/examples/daisyui-starter/index.html +45 -0
  16. package/examples/daisyui-starter/package-lock.json +2221 -0
  17. package/examples/daisyui-starter/package.json +22 -0
  18. package/examples/daisyui-starter/postcss.config.js +1 -0
  19. package/examples/daisyui-starter/src/styles.css +20 -0
  20. package/examples/daisyui-starter/tailwind.config.js +12 -0
  21. package/examples/postcss-starter/index.html +8 -8
  22. package/examples/postcss-starter/package.json +1 -1
  23. package/examples/vite-starter/README.md +4 -4
  24. package/examples/vite-starter/package.json +1 -1
  25. package/examples/vite-starter/src/main.js +41 -41
  26. package/package.json +23 -4
  27. package/src/build/components.css +29 -0
  28. package/src/build/utilities.css +42 -0
  29. package/src/components/ICON-SYSTEM.md +39 -39
  30. package/src/components/alert.css +26 -26
  31. package/src/components/avatar.css +9 -9
  32. package/src/components/breadcrumbs.css +15 -15
  33. package/src/components/button.css +21 -21
  34. package/src/components/card.css +10 -10
  35. package/src/components/checkbox.css +21 -21
  36. package/src/components/chip.css +43 -43
  37. package/src/components/data-row.css +19 -19
  38. package/src/components/divider.css +23 -23
  39. package/src/components/dropdown-field.css +34 -34
  40. package/src/components/dropdown-menu.css +12 -12
  41. package/src/components/field-verification.css +25 -25
  42. package/src/components/filter-segment.css +20 -20
  43. package/src/components/icon-button.css +11 -11
  44. package/src/components/icon.css +18 -18
  45. package/src/components/input.css +29 -29
  46. package/src/components/link.css +28 -28
  47. package/src/components/loading-indicator.css +20 -20
  48. package/src/components/loading-inline.css +8 -8
  49. package/src/components/menu-item.css +28 -28
  50. package/src/components/modal.css +36 -36
  51. package/src/components/navigation-rail.css +95 -95
  52. package/src/components/pagination-item.css +22 -22
  53. package/src/components/pagination.css +24 -24
  54. package/src/components/pill.css +14 -14
  55. package/src/components/progress-bar.css +28 -28
  56. package/src/components/radio-select.css +13 -13
  57. package/src/components/section-marker.css +12 -12
  58. package/src/components/segment-selector.css +9 -9
  59. package/src/components/sensitive-data.css +8 -8
  60. package/src/components/skeleton.css +29 -29
  61. package/src/components/step.css +14 -14
  62. package/src/components/stepper.css +15 -15
  63. package/src/components/switch.css +12 -12
  64. package/src/components/tabs.css +40 -40
  65. package/src/components/tag.css +20 -20
  66. package/src/components/text-button.css +24 -24
  67. package/src/components/textarea.css +23 -23
  68. package/src/components/toast.css +29 -29
  69. package/src/components/tooltip.css +11 -11
  70. package/src/icons/README.md +16 -10
  71. package/src/icons/sprite.svg +1 -1
  72. package/src/themes/valiify-tokens.css +285 -0
  73. package/src/themes/valiify-type-prefixed.css +37 -0
  74. package/src/utilities/index.css +1 -1
  75. package/src/utility-surface.css +321 -0
  76. package/types/components.d.ts +235 -236
@@ -6,33 +6,33 @@
6
6
  * (Context Window, Leading Icon).
7
7
  *
8
8
  * Usage:
9
- * <dialog class="modal modal-destructive">
10
- * <div class="modal-header">
11
- * <div class="modal-title-group">
12
- * <span class="modal-icon">
13
- * <svg class="icon icon-size-20" aria-hidden="true">
9
+ * <dialog class="vd-modal vd-modal-destructive">
10
+ * <div class="vd-modal-header">
11
+ * <div class="vd-modal-title-group">
12
+ * <span class="vd-modal-icon">
13
+ * <svg class="vd-icon vd-icon-size-20" aria-hidden="true">
14
14
  * <use href="#triangle-alert" />
15
15
  * </svg>
16
16
  * </span>
17
- * <h2 class="modal-title">Decline this application?</h2>
17
+ * <h2 class="vd-modal-title">Decline this application?</h2>
18
18
  * </div>
19
- * <button class="icon-button icon-button-lg" aria-label="Close">
20
- * <svg class="icon icon-size-16" aria-hidden="true"><use href="#x" /></svg>
19
+ * <button class="vd-icon-button vd-icon-button-lg" aria-label="Close">
20
+ * <svg class="vd-icon vd-icon-size-16" aria-hidden="true"><use href="#x" /></svg>
21
21
  * </button>
22
22
  * </div>
23
23
  *
24
- * <div class="modal-subtitles">
25
- * <p class="modal-subtitle">The applicant is notified through the portal.</p>
26
- * <p class="modal-description">Two blocking items remain unresolved.</p>
24
+ * <div class="vd-modal-subtitles">
25
+ * <p class="vd-modal-subtitle">The applicant is notified through the portal.</p>
26
+ * <p class="vd-modal-description">Two blocking items remain unresolved.</p>
27
27
  * </div>
28
28
  *
29
- * <div class="modal-context">
30
- * <p class="modal-context-text">#BA-204417 · Northwind Freight LLC</p>
29
+ * <div class="vd-modal-context">
30
+ * <p class="vd-modal-context-text">#BA-204417 · Northwind Freight LLC</p>
31
31
  * </div>
32
32
  *
33
- * <div class="modal-footer">
34
- * <button class="btn btn-empty btn-lg">Cancel</button>
35
- * <button class="btn btn-critical btn-lg">Decline application</button>
33
+ * <div class="vd-modal-footer">
34
+ * <button class="vd-btn vd-btn-empty vd-btn-lg">Cancel</button>
35
+ * <button class="vd-btn vd-btn-critical vd-btn-lg">Decline application</button>
36
36
  * </div>
37
37
  * </dialog>
38
38
  *
@@ -50,7 +50,7 @@
50
50
  * The variant classes here style ONLY the icon container; the footer button is
51
51
  * the consumer's to pick, because it is an instance slot in Figma too.
52
52
  *
53
- * `.btn-critical` did not exist — Button's own variant set (73:180) has just
53
+ * `.vd-btn-critical` did not exist — Button's own variant set (73:180) has just
54
54
  * primary / outline / empty. It is added in button.css and documented there.
55
55
  *
56
56
  * TWO TOKEN INCONSISTENCIES REPRODUCED, not corrected:
@@ -73,12 +73,12 @@
73
73
  *
74
74
  * POSITIONING AND THE BACKDROP ARE THE CONSUMER'S, as with Tooltip — Figma
75
75
  * draws the dialog frame only, with no scrim layer. The one concession is a
76
- * `::backdrop` rule for when `.modal` is used on a native `<dialog>`, since a
76
+ * `::backdrop` rule for when `.vd-modal` is used on a native `<dialog>`, since a
77
77
  * modal with no backdrop is not shippable. Marked as an extension below.
78
78
  */
79
79
 
80
80
  @layer components {
81
- .modal {
81
+ .vd-modal {
82
82
  /* Layout — 480px fixed width, height follows content */
83
83
  @apply flex w-120 flex-col items-start gap-6; /* 480px, 24px between sections */
84
84
  @apply p-8; /* 32px */
@@ -96,25 +96,25 @@
96
96
 
97
97
  /* --- Header ------------------------------------------------------------ */
98
98
 
99
- .modal-header {
99
+ .vd-modal-header {
100
100
  @apply flex w-full items-start justify-between;
101
101
  }
102
102
 
103
- .modal-title-group {
103
+ .vd-modal-title-group {
104
104
  @apply flex flex-1 items-center gap-3; /* 12px */
105
105
  min-width: 0;
106
106
  }
107
107
 
108
108
  /* 36px circle = a 20px icon plus 8px of padding. Defaults to the neutral
109
109
  treatment; the variant classes below override it. */
110
- .modal-icon {
110
+ .vd-modal-icon {
111
111
  @apply inline-flex shrink-0 items-center justify-center;
112
112
  @apply p-2; /* 8px -> 36px overall */
113
113
  @apply rounded-pill;
114
114
  @apply bg-surface-neutral text-neutral;
115
115
  }
116
116
 
117
- .modal-title {
117
+ .vd-modal-title {
118
118
  @apply flex-1;
119
119
  min-width: 0;
120
120
  @apply text-h1; /* 19px / 21.8px / 600 */
@@ -123,19 +123,19 @@
123
123
 
124
124
  /* --- Subtitles ---------------------------------------------------------- */
125
125
 
126
- .modal-subtitles {
126
+ .vd-modal-subtitles {
127
127
  @apply flex w-full flex-col items-start gap-2; /* 8px */
128
128
  }
129
129
 
130
130
  /* Two different 12px styles, and they are not interchangeable — the line
131
131
  heights differ (18px vs 14px), as do the colours. */
132
- .modal-subtitle {
132
+ .vd-modal-subtitle {
133
133
  @apply w-full;
134
134
  @apply text-caption; /* 12px / 18px / 400 */
135
135
  @apply text-content-secondary;
136
136
  }
137
137
 
138
- .modal-description {
138
+ .vd-modal-description {
139
139
  @apply w-full;
140
140
  @apply text-help-caption; /* 12px / 14px / 400 */
141
141
  @apply text-content-tertiary;
@@ -143,7 +143,7 @@
143
143
 
144
144
  /* --- Context window (Figma's Context Window boolean) -------------------- */
145
145
 
146
- .modal-context {
146
+ .vd-modal-context {
147
147
  @apply flex w-full items-center;
148
148
  @apply p-3; /* 12px */
149
149
  @apply rounded-surface; /* 8px */
@@ -151,7 +151,7 @@
151
151
  @apply bg-surface-frame;
152
152
  }
153
153
 
154
- .modal-context-text {
154
+ .vd-modal-context-text {
155
155
  @apply flex-1;
156
156
  min-width: 0;
157
157
  @apply text-data-xs font-mono; /* 12px / 16.5px / 400, JetBrains Mono */
@@ -160,36 +160,36 @@
160
160
 
161
161
  /* --- Footer ------------------------------------------------------------- */
162
162
 
163
- .modal-footer {
163
+ .vd-modal-footer {
164
164
  @apply flex w-full items-center justify-end gap-3; /* 12px */
165
165
  }
166
166
 
167
- /* Figma dims the cancel label to Content/Secondary, where .btn-empty is
167
+ /* Figma dims the cancel label to Content/Secondary, where .vd-btn-empty is
168
168
  Content/Primary. This is an INSTANCE OVERRIDE in the Modal, not a change to
169
169
  the Button component — Button's own set (73:180) is untouched — so it is
170
170
  scoped to the footer rather than pushed into button.css. Flagged with the
171
171
  designer: if empty buttons are meant to be Secondary everywhere, this rule
172
172
  should move and this scoping should disappear. */
173
- .modal-footer .btn-empty:not(:hover):not(:active) {
173
+ .vd-modal-footer .vd-btn-empty:not(:hover):not(:active) {
174
174
  @apply text-content-secondary;
175
175
  }
176
176
 
177
177
  /* --- Action variants ---------------------------------------------------- */
178
178
 
179
179
  /* These style the icon container only. The footer button is a slot — see the
180
- header for which .btn variant each Action pairs with. */
180
+ header for which .vd-btn variant each Action pairs with. */
181
181
 
182
- .modal-destructive .modal-icon {
182
+ .vd-modal-destructive .vd-modal-icon {
183
183
  @apply bg-critical-soft text-critical;
184
184
  }
185
185
 
186
186
  /* Approved/Content, not Approved/Main — Figma's own inconsistency. */
187
- .modal-positive .modal-icon {
187
+ .vd-modal-positive .vd-modal-icon {
188
188
  @apply bg-approved-soft text-approved-content;
189
189
  }
190
190
 
191
191
  /* Surface/Neutral, not Neutral/Soft — Figma's own inconsistency. */
192
- .modal-neutral .modal-icon {
192
+ .vd-modal-neutral .vd-modal-icon {
193
193
  @apply bg-surface-neutral text-neutral;
194
194
  }
195
195
 
@@ -197,7 +197,7 @@
197
197
 
198
198
  /* `<dialog>` centres itself and supplies a backdrop for free; both of its
199
199
  UA defaults (1em padding, inset border) are already overridden above. */
200
- dialog.modal::backdrop {
200
+ dialog.vd-modal::backdrop {
201
201
  background-color: oklch(0.2027 0.0395 282.3 / 0.4);
202
202
  }
203
203
  }