@hanzo/ui 8.14.2 → 8.14.3
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/css.cjs +2 -3
- package/dist/css.d.ts +7 -4
- package/dist/css.d.ts.map +1 -1
- package/dist/css.js +2 -3
- package/dist/css.js.map +1 -1
- package/dist/gallery.html +1 -1
- package/package.json +1 -1
package/dist/css.cjs
CHANGED
|
@@ -3,13 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.css = void 0;
|
|
4
4
|
const cn_1 = require("./core/cn.cjs");
|
|
5
5
|
const tw_1 = require("./tw.cjs");
|
|
6
|
-
|
|
7
|
-
const responsive = (key) => key.startsWith('$');
|
|
6
|
+
const group = (v) => typeof v === 'object' && v !== null;
|
|
8
7
|
const css = (...classes) => {
|
|
9
8
|
const { props } = (0, tw_1.tw)((0, cn_1.cn)(...classes));
|
|
10
9
|
const out = {};
|
|
11
10
|
for (const key in props)
|
|
12
|
-
if (!
|
|
11
|
+
if (!group(props[key]))
|
|
13
12
|
out[key] = props[key];
|
|
14
13
|
return out;
|
|
15
14
|
};
|
package/dist/css.d.ts
CHANGED
|
@@ -18,10 +18,13 @@
|
|
|
18
18
|
* `tw` already speaks CSS — `h-4 w-4 ml-2` is `{height:16,width:16,marginLeft:8}`
|
|
19
19
|
* — so this is that, with the one part an inline style cannot hold removed.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
21
|
+
* A CONDITION DOES NOT SURVIVE. `md:grid-cols-2` is a media query and
|
|
22
|
+
* `hover:bg-black` is a pseudo-class; a `style` attribute holds neither. `tw`
|
|
23
|
+
* returns both as a nested group — `$md`, `hoverStyle`, `groupHoverStyle` — so
|
|
24
|
+
* the rule is simply that an inline style is FLAT: a value that is itself a
|
|
25
|
+
* group is dropped, never flattened. Flattening would paint the large-screen
|
|
26
|
+
* rule on a phone and the hover state at rest, and silently wrong is worse than
|
|
27
|
+
* visibly absent. Anything conditional belongs on a `Box`.
|
|
25
28
|
*/
|
|
26
29
|
import type { CSSProperties } from 'react';
|
|
27
30
|
import { type ClassValue } from './tw.js';
|
package/dist/css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,EAAE,KAAK,UAAU,EAAM,MAAM,MAAM,CAAA;AAI1C,eAAO,MAAM,GAAG,eAAgB,UAAU,EAAE,KAAG,aAK9C,CAAA;eAEc,GAAG"}
|
package/dist/css.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { cn } from './core/cn.js';
|
|
2
2
|
import { tw } from './tw.js';
|
|
3
|
-
|
|
4
|
-
const responsive = (key) => key.startsWith('$');
|
|
3
|
+
const group = (v) => typeof v === 'object' && v !== null;
|
|
5
4
|
export const css = (...classes) => {
|
|
6
5
|
const { props } = tw(cn(...classes));
|
|
7
6
|
const out = {};
|
|
8
7
|
for (const key in props)
|
|
9
|
-
if (!
|
|
8
|
+
if (!group(props[key]))
|
|
10
9
|
out[key] = props[key];
|
|
11
10
|
return out;
|
|
12
11
|
};
|
package/dist/css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"css.js","sourceRoot":"","sources":["../src/css.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAmB,EAAE,EAAE,MAAM,MAAM,CAAA;AAE1C,MAAM,KAAK,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,CAAA;AAEjE,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,OAAqB,EAAiB,EAAE;IAC7D,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAA;IACpC,MAAM,GAAG,GAA4B,EAAE,CAAA;IACvC,KAAK,MAAM,GAAG,IAAI,KAAK;QAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACtE,OAAO,GAAoB,CAAA;AAC7B,CAAC,CAAA;AAED,eAAe,GAAG,CAAA"}
|
package/dist/gallery.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.14.
|
|
1
|
+
<!doctype html><html lang="en" class="t_dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>@hanzo/ui 8.14.3</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
|
|
2
2
|
:root { --hanzo-ui-styles: 1; }
|
|
3
3
|
/* Hanzo Design System — the entry point. Import THIS one file.
|
|
4
4
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "8.14.
|
|
3
|
+
"version": "8.14.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
|
|
6
6
|
"exports": {
|