@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 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
- /** gui writes a breakpoint group under a `$`-prefixed key. */
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 (!responsive(key))
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
- * BREAKPOINTS DO NOT SURVIVE. `md:grid-cols-2` is a media query, and there is no
22
- * media query inside a `style` attribute. Those keys are dropped rather than
23
- * flattened, because flattening would apply a large-screen rule on a phone —
24
- * silently wrong beats visibly absent. Responsive layout belongs on a `Box`.
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;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,EAAE,KAAK,UAAU,EAAM,MAAM,MAAM,CAAA;AAK1C,eAAO,MAAM,GAAG,eAAgB,UAAU,EAAE,KAAG,aAK9C,CAAA;eAEc,GAAG"}
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
- /** gui writes a breakpoint group under a `$`-prefixed key. */
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 (!responsive(key))
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":"AA2BA,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAmB,EAAE,EAAE,MAAM,MAAM,CAAA;AAE1C,8DAA8D;AAC9D,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;AAEvD,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,UAAU,CAAC,GAAG,CAAC;YAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IACpE,OAAO,GAAoB,CAAA;AAC7B,CAAC,CAAA;AAED,eAAe,GAAG,CAAA"}
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.2</title><style>/* @hanzo/ui — generated by scripts/gen-css.mjs. Do not edit. */
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.2",
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": {