@tradalab/lyra 3.1.0 → 3.3.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradalab/lyra",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "Tradalab UI kit — shadcn (radix-lyra) primitives, composed components, and app shell for React 19 / Next 16 / Tailwind v4.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
@@ -48,6 +48,9 @@
48
48
  --color-input: var(--input);
49
49
  --color-border: var(--border);
50
50
  --color-destructive: var(--destructive);
51
+ --color-success: var(--success);
52
+ --color-warning: var(--warning);
53
+ --color-info: var(--info);
51
54
  --color-accent-foreground: var(--accent-foreground);
52
55
  --color-accent: var(--accent);
53
56
  --color-muted-foreground: var(--muted-foreground);
@@ -85,6 +88,15 @@
85
88
  --accent: oklch(0.97 0 0);
86
89
  --accent-foreground: oklch(0.205 0 0);
87
90
  --destructive: oklch(0.577 0.245 27.325);
91
+ /* The palette is otherwise achromatic, which left every state but a failure rendering as the
92
+ same grey: `secondary` and `outline` differ by a fill, not a hue, so "running" and "archived"
93
+ arrived as two identical pills. Measured as TEXT on --card, not picked by eye: success 5.49:1
94
+ light / 9.32:1 dark, warning 5.03 / 8.35, info 5.56 / 8.13. No *-foreground counterparts,
95
+ because nothing fills a shape with these yet and a token nothing renders is a claim nobody
96
+ checks. */
97
+ --success: oklch(0.508 0.105 165.6);
98
+ --warning: oklch(0.555 0.146 49);
99
+ --info: oklch(0.52 0.16 253);
88
100
  --border: oklch(0.922 0 0);
89
101
  --input: oklch(0.922 0 0);
90
102
  --ring: oklch(0.708 0 0);
@@ -120,6 +132,10 @@
120
132
  --accent: oklch(0.269 0 0);
121
133
  --accent-foreground: oklch(0.985 0 0);
122
134
  --destructive: oklch(0.704 0.191 22.216);
135
+ /* Lighter ends of the same three ramps: on a dark card the light values drop under the bar. */
136
+ --success: oklch(0.773 0.153 163.2);
137
+ --warning: oklch(0.769 0.165 70.1);
138
+ --info: oklch(0.75 0.14 245);
123
139
  --border: oklch(1 0 0 / 10%);
124
140
  --input: oklch(1 0 0 / 15%);
125
141
  --ring: oklch(0.556 0 0);
@@ -149,3 +165,33 @@
149
165
  @apply font-sans;
150
166
  }
151
167
  }
168
+
169
+ /* A sidebar row marks "you are here" with `data-active:bg-sidebar-accent`, which is the SAME
170
+ background `hover:` paints. Only `font-medium` separated the two, so pointing at any row made it
171
+ look like the open one and the open one was findable only by elimination. A rail marks POSITION,
172
+ which is the one thing on that row you cannot also do.
173
+ *
174
+ * Three choices that each cost a bug to learn:
175
+ * - `::before`, not `box-shadow`. An unlayered box-shadow beats every layered utility whatever
176
+ * its specificity, so it overwrote `focus-visible:ring-2`; since the button also carries
177
+ * `outline-hidden`, the row for the current page had NO keyboard focus indicator at all.
178
+ * - the attribute, not `NavItem`. Apps render `SidebarMenuButton` directly for rows that carry a
179
+ * count or a custom body, and those are rows you can be standing on too.
180
+ * - `--sidebar-accent-foreground` as the fallback, which measures 16.4:1 on the active row in
181
+ * light and 14.5:1 in dark. `--ring` reads better in prose and measures 2.38:1 here, so it is
182
+ * invisible until an app happens to remap it. An app with an accent sets
183
+ * `--sidebar-active-rail` and changes nothing else. */
184
+ @layer components {
185
+ [data-slot="sidebar-menu-button"][data-active="true"] {
186
+ position: relative;
187
+ }
188
+
189
+ [data-slot="sidebar-menu-button"][data-active="true"]::before {
190
+ content: "";
191
+ position: absolute;
192
+ inset-block: 0;
193
+ inset-inline-start: 0;
194
+ width: 2px;
195
+ background: var(--sidebar-active-rail, var(--sidebar-accent-foreground));
196
+ }
197
+ }