@hideyukimori/nene2-ui 0.18.1 → 0.19.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/dist/feedback/Badge.js +1 -1
- package/dist/feedback/Badge.js.map +1 -1
- package/package.json +1 -1
- package/themes/default.css +19 -1
package/dist/feedback/Badge.js
CHANGED
|
@@ -16,6 +16,6 @@ const TONE_CLASS = {
|
|
|
16
16
|
* find every such lie afterwards except by reading every screen.
|
|
17
17
|
*/
|
|
18
18
|
export function Badge({ tone = 'neutral', className, children }) {
|
|
19
|
-
return (_jsx("span", { className: cx('inline-flex items-center rounded-x-slot-badge border px-x-slot-badge-pad-x py-x-slot-badge-pad-y font-sans', TONE_CLASS[tone], className), children: children }));
|
|
19
|
+
return (_jsx("span", { className: cx('inline-flex items-center gap-x-slot-badge-gap rounded-x-slot-badge border px-x-slot-badge-pad-x py-x-slot-badge-pad-y font-sans text-x-slot-badge font-x-slot-badge', TONE_CLASS[tone], className), children: children }));
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/feedback/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAkBlC,MAAM,UAAU,GAAoD;IAClE,OAAO,EACL,4FAA4F;IAC9F,MAAM,EAAE,yFAAyF;IACjG,MAAM,EAAE,yFAAyF;IACjG,OAAO,EACL,4FAA4F;IAC9F,IAAI,EAAE,mFAAmF;IACzF,IAAI,EAAE,mFAAmF;CAC1F,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAc;IACzE,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/feedback/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAkBlC,MAAM,UAAU,GAAoD;IAClE,OAAO,EACL,4FAA4F;IAC9F,MAAM,EAAE,yFAAyF;IACjG,MAAM,EAAE,yFAAyF;IACjG,OAAO,EACL,4FAA4F;IAC9F,IAAI,EAAE,mFAAmF;IACzF,IAAI,EAAE,mFAAmF;CAC1F,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAc;IACzE,OAAO,CACL,eACE,SAAS,EAAE,EAAE,CACX,qKAAqK,EACrK,UAAU,CAAC,IAAI,CAAC,EAChB,SAAS,CACV,YAEA,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hideyukimori/nene2-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "NeNe fleet shared React UI kit — token-driven primitives on Tailwind v4 @theme. Components carry no design of their own; themes do.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/themes/default.css
CHANGED
|
@@ -164,6 +164,12 @@
|
|
|
164
164
|
--spacing-x-slot-choice-box: var(--spacing-x-sm);
|
|
165
165
|
--spacing-x-slot-badge-pad-x: var(--spacing-x-2xs);
|
|
166
166
|
--spacing-x-slot-badge-pad-y: var(--spacing-x-3xs);
|
|
167
|
+
/* 🔴 Between a badge's icon and its label (#463). Unlike every other slot added so far,
|
|
168
|
+
* this one **changes what a Badge already renders**: the current default is *nothing
|
|
169
|
+
* specified*, so an icon sits flush against its text. Both consumers — nene-vault and
|
|
170
|
+
* nene-deal — were already correcting that independently, so the painting this replaces
|
|
171
|
+
* is one no consumer used. */
|
|
172
|
+
--spacing-x-slot-badge-gap: var(--spacing-x-3xs);
|
|
167
173
|
--spacing-x-slot-switch-pad-x: var(--spacing-x-2xs);
|
|
168
174
|
--spacing-x-slot-switch-pad-y: var(--spacing-x-3xs);
|
|
169
175
|
--spacing-x-slot-alert-pad: var(--spacing-x-2xs);
|
|
@@ -185,6 +191,10 @@
|
|
|
185
191
|
--radius-x-slot-button: var(--radius-x-md);
|
|
186
192
|
--radius-x-slot-control: var(--radius-x-md);
|
|
187
193
|
--radius-x-slot-badge: var(--radius-x-md);
|
|
194
|
+
/* A badge is a label, not body copy (#463). Inherited type made it the size and weight of
|
|
195
|
+
* whatever it sat in; both consumers overrode both. Same caveat as the gap above: this
|
|
196
|
+
* changes the current render. */
|
|
197
|
+
--text-x-slot-badge: var(--text-x-2xs);
|
|
188
198
|
--radius-x-slot-switch: var(--radius-x-md);
|
|
189
199
|
--radius-x-slot-alert: var(--radius-x-md);
|
|
190
200
|
--radius-x-slot-toast: var(--radius-x-md);
|
|
@@ -410,7 +420,15 @@
|
|
|
410
420
|
--spacing-x-slot-button-icon: var(--spacing-x-lg);
|
|
411
421
|
|
|
412
422
|
/* ── Weight slots ─────────────────────────────────────────────────────────────
|
|
413
|
-
* `font-medium` appeared inline in four components. Same rule, same reason as colour.
|
|
423
|
+
* `font-medium` appeared inline in four components. Same rule, same reason as colour.
|
|
424
|
+
*
|
|
425
|
+
* 🔴 The badge is `semibold`, and it is the one slot here that is not preserving an
|
|
426
|
+
* existing inline weight — it had none, which is why #463 exists. So the reason the other
|
|
427
|
+
* six are `medium` (that is what they already rendered) does not reach it, and the only
|
|
428
|
+
* evidence left is the consumers: nene-vault ships `font-semibold` and nene-deal measures
|
|
429
|
+
* 600 in production. **Nothing ships 500.** A badge also carries its weight at 11px, where
|
|
430
|
+
* the others sit at body size — the weight is doing work the size cannot. */
|
|
431
|
+
--font-weight-x-slot-badge: var(--font-weight-semibold);
|
|
414
432
|
--font-weight-x-slot-button: var(--font-weight-medium);
|
|
415
433
|
--font-weight-x-slot-table-header: var(--font-weight-medium);
|
|
416
434
|
--font-weight-x-slot-detail-term: var(--font-weight-medium);
|