@hanzo/ui 8.27.46 → 8.27.47

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 (61) hide show
  1. package/dist/gallery.html +105 -5
  2. package/dist/marketing/Cta.cjs +9 -3
  3. package/dist/marketing/Cta.d.ts +7 -5
  4. package/dist/marketing/Cta.d.ts.map +1 -1
  5. package/dist/marketing/Cta.js +10 -4
  6. package/dist/marketing/Cta.js.map +1 -1
  7. package/dist/marketing/controls.cjs +112 -0
  8. package/dist/marketing/controls.d.ts +42 -0
  9. package/dist/marketing/controls.d.ts.map +1 -0
  10. package/dist/marketing/controls.js +108 -0
  11. package/dist/marketing/controls.js.map +1 -0
  12. package/dist/marketing/document.cjs +7 -0
  13. package/dist/marketing/document.d.ts +22 -0
  14. package/dist/marketing/document.d.ts.map +1 -0
  15. package/dist/marketing/document.js +5 -0
  16. package/dist/marketing/document.js.map +1 -0
  17. package/dist/marketing/host.cjs +39 -0
  18. package/dist/marketing/host.d.ts +21 -0
  19. package/dist/marketing/host.d.ts.map +1 -0
  20. package/dist/marketing/host.js +35 -0
  21. package/dist/marketing/host.js.map +1 -0
  22. package/dist/marketing/index.cjs +24 -1
  23. package/dist/marketing/index.d.ts +8 -2
  24. package/dist/marketing/index.d.ts.map +1 -1
  25. package/dist/marketing/index.js +7 -1
  26. package/dist/marketing/index.js.map +1 -1
  27. package/dist/marketing/loose.cjs +2 -0
  28. package/dist/marketing/loose.d.ts +41 -0
  29. package/dist/marketing/loose.d.ts.map +1 -0
  30. package/dist/marketing/loose.js +2 -0
  31. package/dist/marketing/loose.js.map +1 -0
  32. package/dist/marketing/pager.cjs +22 -0
  33. package/dist/marketing/pager.d.ts +22 -0
  34. package/dist/marketing/pager.d.ts.map +1 -0
  35. package/dist/marketing/pager.js +20 -0
  36. package/dist/marketing/pager.js.map +1 -0
  37. package/dist/marketing/pair.cjs +21 -0
  38. package/dist/marketing/pair.d.ts +22 -0
  39. package/dist/marketing/pair.d.ts.map +1 -0
  40. package/dist/marketing/pair.js +19 -0
  41. package/dist/marketing/pair.js.map +1 -0
  42. package/dist/marketing/run.cjs +28 -0
  43. package/dist/marketing/run.d.ts +33 -0
  44. package/dist/marketing/run.d.ts.map +1 -0
  45. package/dist/marketing/run.js +26 -0
  46. package/dist/marketing/run.js.map +1 -0
  47. package/dist/marketing/surface.cjs +76 -0
  48. package/dist/marketing/surface.d.ts +59 -0
  49. package/dist/marketing/surface.d.ts.map +1 -0
  50. package/dist/marketing/surface.js +70 -0
  51. package/dist/marketing/surface.js.map +1 -0
  52. package/dist/marketing/type.cjs +29 -2
  53. package/dist/marketing/type.d.ts +43 -4
  54. package/dist/marketing/type.d.ts.map +1 -1
  55. package/dist/marketing/type.js +24 -1
  56. package/dist/marketing/type.js.map +1 -1
  57. package/dist/styles/document.css +93 -0
  58. package/dist/styles/motion.css +52 -2
  59. package/dist/styles.css +104 -4
  60. package/dist/theme.css +52 -2
  61. package/package.json +3 -2
@@ -0,0 +1,70 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * Surfaces that answer approach, and the marks inside them that answer with
5
+ * them.
6
+ *
7
+ * Leaf a card: a corner, an edge that brightens on hover, no ground
8
+ * Cell a tile of a ruled grid: no corner and no edge, a ground that brightens
9
+ * Lift ink that brightens when its card is hovered; `step` also moves it
10
+ * 2px toward where it goes
11
+ * Reveal a line offered only on approach — hover, or a keyboard's focus
12
+ * Lattice a ruled backdrop: a decorative grid behind a hero
13
+ *
14
+ * A Leaf or a Cell is a gui `group`, and the marks read it with `$group-hover`,
15
+ * so the card decides when and the mark decides how. It is a group and NOT a
16
+ * size container: gui's default `container-type: inline-size` sizes the box as
17
+ * if it were empty, so a card a row sizes by its content — a filter chip —
18
+ * collapsed to its own padding. No mark asks the group its size. An ink written on a mark
19
+ * is a prop beside the hover, so nothing has to out-rank anything: the lift a
20
+ * stylesheet used to apply lost to every atomic `color` a mark carried, and
21
+ * those cards never lifted.
22
+ *
23
+ * Every default is a prop a caller replaces: `p` for the padding, `borderColor`
24
+ * for the resting edge, `hoverStyle` for the approach, `bg` for a ground.
25
+ */
26
+ import { Text, View } from '@hanzo/gui';
27
+ import { slot } from '../backends/gui/slot.js';
28
+ import { useHost } from './host.js';
29
+ /** The element's own display — what @hanzo/design's base or the browser gives
30
+ * it — under gui Text's `inline`. */
31
+ const OWN = 'revert-layer';
32
+ /** The element's own ink, the same way: @hanzo/design's base gives every `<a>`
33
+ * and every heading `--text-primary`, and anything else takes its parent's. */
34
+ const INK = 'revert-layer';
35
+ /** The lifted ink: white on the dark ground, ink on the light one. */
36
+ const LIFT = 'var(--text-primary)';
37
+ /** A card. The defaults change nothing but the corner and the hover edge: no
38
+ * ground, a transparent resting edge, so a card that names only a ground gets
39
+ * a ground and no lift. */
40
+ const Leaf = ({ render, ...p }) => {
41
+ const host = useHost(render, p.href, 'div');
42
+ return (_jsx(Text, { ...slot('leaf'), group: true, containerType: "normal", render: host, display: "block", height: "100%", whiteSpace: "inherit", textDecorationLine: "none", color: INK, p: "$4", borderWidth: 1, borderStyle: "solid", borderColor: "transparent", rounded: "var(--radius-xl)", hoverStyle: { borderColor: 'var(--white-15)' }, ...p }));
43
+ };
44
+ /** A tile of a ruled grid, which rules its own lines with a 1px gap over a
45
+ * neutral ground — so a Cell adds no edge and no corner, which would break the
46
+ * flush rule the grid is made of, and no box: the element keeps the display the
47
+ * document gives it, so a row stays a row and an icon button stays centred. */
48
+ const Cell = ({ render, ...p }) => {
49
+ const host = useHost(render, p.href, 'div');
50
+ return (_jsx(Text, { ...slot('cell'), group: true, containerType: "normal", render: host, display: OWN, whiteSpace: "inherit", textDecorationLine: "none", bg: "var(--pure-black)", color: "inherit", hoverStyle: { bg: 'var(--neutral-950)' }, ...p }));
51
+ };
52
+ /** Ink that brightens with its card. Inline, like the word or icon it wraps;
53
+ * a mark that steps is a box (`display="inline-flex"`), because an inline box
54
+ * does not move. */
55
+ const Lift = ({ render = 'span', step = false, ...p }) => (_jsx(Text, { ...slot('lift'), render: render, display: OWN, whiteSpace: "inherit", color: INK, transition: (step
56
+ ? 'color var(--duration-fast) var(--ease-in-out), transform var(--duration-fast) var(--ease-in-out)'
57
+ : 'color var(--duration-fast) var(--ease-in-out)'), "$group-hover": step ? { color: LIFT, x: 2 } : { color: LIFT }, ...p }));
58
+ /** A line only offered on approach: hidden at rest, shown while its group is
59
+ * hovered or holds a keyboard's focus — a reveal a keyboard cannot reach is
60
+ * one half of the people never see. */
61
+ const Reveal = ({ render = 'span', ...p }) => (_jsx(Text, { ...slot('reveal'), render: render, display: OWN, whiteSpace: "inherit", color: INK, opacity: 0, transition: 'opacity var(--duration-fast) var(--ease-in-out)', "$group-hover": { opacity: 1 }, "$group-focusVisible": { opacity: 1 }, "$group-focusWithin": { opacity: 1 }, ...p }));
62
+ /** A ruled backdrop, in the foreground ink so it reads on either ground. Two
63
+ * knobs, the pitch and the strength; everything else — where it sits, what
64
+ * masks it — is the caller's props. */
65
+ const Lattice = ({ size = 30, opacity = 0.05, ...p }) => {
66
+ const ink = `color-mix(in srgb, var(--foreground) ${opacity * 100}%, transparent)`;
67
+ return (_jsx(View, { ...slot('lattice'), "aria-hidden": true, backgroundImage: `linear-gradient(to right, ${ink} 1px, transparent 1px), linear-gradient(to bottom, ${ink} 1px, transparent 1px)`, backgroundSize: `${size}px ${size}px`, ...p }));
68
+ };
69
+ export { Leaf, Cell, Lift, Reveal, Lattice };
70
+ //# sourceMappingURL=surface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/marketing/surface.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAkC,MAAM,YAAY,CAAA;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAA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CAAwC,OAAO,GAAG,GAAG,iBAAiB,CAAA;IAClF,OAAO,CACL,KAAC,IAAI,OACC,IAAI,CAAC,SAAS,CAAC,uBAEnB,eAAe,EAAE,6BAA6B,GAAG,sDAAsD,GAAG,wBAAwB,EAClI,cAAc,EAAE,GAAG,IAAI,MAAM,IAAI,IAAI,KAChC,CAAY,GACjB,CACH,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAA"}
@@ -1,7 +1,7 @@
1
1
  'use client';"use strict";
2
2
  'use client';
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Line = void 0;
4
+ exports.Claim = exports.Lede = exports.Eyebrow = exports.Title = exports.Display = exports.Line = void 0;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  /**
7
7
  * Line — one line of type on the marketing ramp.
@@ -15,6 +15,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
15
15
  * so, and a page with no headings passes every visual check.
16
16
  */
17
17
  const gui_1 = require("@hanzo/gui");
18
+ const slot_1 = require("../backends/gui/slot.cjs");
19
+ const host_1 = require("./host.cjs");
18
20
  const SIZE = {
19
21
  xs: { fontSize: '$1', lineHeight: '$1' },
20
22
  sm: { fontSize: '$2', lineHeight: '$2' },
@@ -33,6 +35,31 @@ const TONE = {
33
35
  };
34
36
  const Line = ({ size, tone = 'plain', weight, align, render, children, ...p }) => {
35
37
  const pair = size ? SIZE[size] : undefined;
36
- return ((0, jsx_runtime_1.jsx)(gui_1.Text, { render: render, fontSize: pair?.fontSize, lineHeight: pair?.lineHeight, fontWeight: weight, color: TONE[tone], text: align, ...p, children: children }));
38
+ const host = (0, host_1.useHost)(render, p.href, 'span');
39
+ return ((0, jsx_runtime_1.jsx)(gui_1.Text, { render: host, fontSize: pair?.fontSize, lineHeight: pair?.lineHeight, fontWeight: weight, color: TONE[tone], text: align, ...p, children: children }));
37
40
  };
38
41
  exports.Line = Line;
42
+ /** The element's own box — a heading's or a paragraph's block, a span's line —
43
+ * which is what the document gives it under gui Text's `inline`. */
44
+ const BLOCK = { display: 'revert-layer', whiteSpace: 'inherit' };
45
+ /** How a heading and a paragraph break: evened out, and no lone last word. A
46
+ * web-only prop, typed once here. */
47
+ const BALANCE = { textWrap: 'balance' };
48
+ const PRETTY = { textWrap: 'pretty' };
49
+ /** The page heading: three rungs of one ramp, 32 / 40 / 52. */
50
+ const Display = ({ render = 'h1', ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('display'), render: render, ...BLOCK, fontFamily: "$heading", fontSize: "$10", fontWeight: '497', lineHeight: '1.19', letterSpacing: '-0.012em', color: "var(--foreground)", ...BALANCE, ...(p.fontSize === undefined ? { $sm: { fontSize: '$11' }, $lg: { fontSize: 'var(--text-6xl)' } } : null), ...p }));
51
+ exports.Display = Display;
52
+ /** The section heading: one size at every width, so it never grows into a page
53
+ * heading. `quiet` is one rung down, for a heading under another section's. */
54
+ const Title = ({ render = 'h2', quiet = false, ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('title'), render: render, ...BLOCK, fontFamily: "$heading", fontSize: quiet ? '$7' : '$8', fontWeight: '497', lineHeight: (quiet ? '1.2' : '1.22'), letterSpacing: '-0.01em', color: "var(--foreground)", ...BALANCE, ...p }));
55
+ exports.Title = Title;
56
+ /** The small caps line above a heading. */
57
+ const Eyebrow = ({ render = 'p', ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('eyebrow'), render: render, ...BLOCK, fontSize: "$2", fontWeight: "500", lineHeight: 'calc(1.25 / 0.875)', letterSpacing: '0.2em', textTransform: "uppercase", color: "var(--muted-foreground)", ...p }));
58
+ exports.Eyebrow = Eyebrow;
59
+ /** The paragraph under a heading. */
60
+ const Lede = ({ render = 'p', ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('lede'), render: render, ...BLOCK, fontSize: "$3", lineHeight: '1.65', letterSpacing: 0, color: "var(--muted-foreground)", ...PRETTY, ...p }));
61
+ exports.Lede = Lede;
62
+ /** The category line under the promise: read second, so bigger and brighter than
63
+ * a lede, a rung up at 640 the way the display above it steps. */
64
+ const Claim = ({ render = 'p', ...p }) => ((0, jsx_runtime_1.jsx)(gui_1.Text, { ...(0, slot_1.slot)('claim'), render: render, ...BLOCK, fontSize: "$7", lineHeight: 'var(--leading-snug)', color: "var(--text-secondary)", ...(p.fontSize === undefined ? { $sm: { fontSize: '$8' } } : null), ...p }));
65
+ exports.Claim = Claim;
@@ -10,7 +10,7 @@
10
10
  * so, and a page with no headings passes every visual check.
11
11
  */
12
12
  import { type TextProps } from '@hanzo/gui';
13
- import type { ReactNode } from 'react';
13
+ import type { Host, Loose } from './loose.js';
14
14
  declare const SIZE: {
15
15
  readonly xs: {
16
16
  readonly fontSize: '$1';
@@ -53,14 +53,53 @@ declare const TONE: {
53
53
  };
54
54
  export type LineSize = keyof typeof SIZE;
55
55
  export type LineTone = keyof typeof TONE;
56
- export type LineProps = Omit<TextProps, 'children' | 'render' | 'color'> & {
56
+ export type LineProps = Loose<Omit<TextProps, 'children' | 'render' | 'color'>> & Host & {
57
57
  size?: LineSize;
58
58
  tone?: LineTone;
59
+ /** An ink of its own, in place of a tone. */
60
+ color?: string;
59
61
  weight?: '400' | '500' | '600' | '700';
60
- render?: 'h1' | 'h2' | 'h3' | 'h4' | 'p' | 'span' | 'div' | 'li' | 'blockquote' | 'cite';
62
+ render?: TextProps['render'];
61
63
  align?: 'center' | 'right';
62
- children?: ReactNode;
63
64
  };
64
65
  declare const Line: ({ size, tone, weight, align, render, children, ...p }: LineProps) => import("react").JSX.Element;
65
66
  export { Line };
67
+ /**
68
+ * The type a page's own copy is set in: the page heading, the section heading,
69
+ * the small caps line above one and the paragraph under it, and the category
70
+ * line under the promise. One rung of @hanzo/design's ramp each, said once here
71
+ * so a call site passes words and spacing, never type.
72
+ *
73
+ * Each is a block of running text: `display="revert-layer"` and
74
+ * `whiteSpace="inherit"` undo gui Text's inline, pre-wrap default, which is
75
+ * right for a label and wrong for a paragraph — the element is the box the
76
+ * document makes it, and takes the white space of the page it sits in. `render` picks the element and defaults to the one the role
77
+ * is — a page heading is an `<h1>` — and accepts an element, so a link or a
78
+ * motion host can carry the role: `render={<motion.p {...reveal} />}`.
79
+ *
80
+ * A stated `fontSize` is the whole size: the display and claim ramps step up at
81
+ * 640 and 1024, and a breakpoint would otherwise re-grow a size the caller set.
82
+ *
83
+ * Hierarchy is by scale, not weight: the headings are book weight (497, the
84
+ * Zen cut that reads as regular at display size) with leading that lets them
85
+ * breathe, and one ink — the heading owns its colour.
86
+ */
87
+ export type RoleProps = Loose<Omit<TextProps, 'render' | 'children'>> & Host & {
88
+ render?: TextProps['render'];
89
+ };
90
+ /** The page heading: three rungs of one ramp, 32 / 40 / 52. */
91
+ declare const Display: ({ render, ...p }: RoleProps) => import("react").JSX.Element;
92
+ /** The section heading: one size at every width, so it never grows into a page
93
+ * heading. `quiet` is one rung down, for a heading under another section's. */
94
+ declare const Title: ({ render, quiet, ...p }: RoleProps & {
95
+ quiet?: boolean;
96
+ }) => import("react").JSX.Element;
97
+ /** The small caps line above a heading. */
98
+ declare const Eyebrow: ({ render, ...p }: RoleProps) => import("react").JSX.Element;
99
+ /** The paragraph under a heading. */
100
+ declare const Lede: ({ render, ...p }: RoleProps) => import("react").JSX.Element;
101
+ /** The category line under the promise: read second, so bigger and brighter than
102
+ * a lede, a rung up at 640 the way the display above it steps. */
103
+ declare const Claim: ({ render, ...p }: RoleProps) => import("react").JSX.Element;
104
+ export { Display, Title, Eyebrow, Lede, Claim };
66
105
  //# sourceMappingURL=type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/marketing/type.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,Y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x-runtime";
12
12
  * so, and a page with no headings passes every visual check.
13
13
  */
14
14
  import { Text } from '@hanzo/gui';
15
+ import { slot } from '../backends/gui/slot.js';
16
+ import { useHost } from './host.js';
15
17
  const SIZE = {
16
18
  xs: { fontSize: '$1', lineHeight: '$1' },
17
19
  sm: { fontSize: '$2', lineHeight: '$2' },
@@ -30,7 +32,28 @@ const TONE = {
30
32
  };
31
33
  const Line = ({ size, tone = 'plain', weight, align, render, children, ...p }) => {
32
34
  const pair = size ? SIZE[size] : undefined;
33
- return (_jsx(Text, { render: render, fontSize: pair?.fontSize, lineHeight: pair?.lineHeight, fontWeight: weight, color: TONE[tone], text: align, ...p, children: children }));
35
+ const host = useHost(render, p.href, 'span');
36
+ return (_jsx(Text, { render: host, fontSize: pair?.fontSize, lineHeight: pair?.lineHeight, fontWeight: weight, color: TONE[tone], text: align, ...p, children: children }));
34
37
  };
35
38
  export { Line };
39
+ /** The element's own box — a heading's or a paragraph's block, a span's line —
40
+ * which is what the document gives it under gui Text's `inline`. */
41
+ const BLOCK = { display: 'revert-layer', whiteSpace: 'inherit' };
42
+ /** How a heading and a paragraph break: evened out, and no lone last word. A
43
+ * web-only prop, typed once here. */
44
+ const BALANCE = { textWrap: 'balance' };
45
+ const PRETTY = { textWrap: 'pretty' };
46
+ /** The page heading: three rungs of one ramp, 32 / 40 / 52. */
47
+ const Display = ({ render = 'h1', ...p }) => (_jsx(Text, { ...slot('display'), render: render, ...BLOCK, fontFamily: "$heading", fontSize: "$10", fontWeight: '497', lineHeight: '1.19', letterSpacing: '-0.012em', color: "var(--foreground)", ...BALANCE, ...(p.fontSize === undefined ? { $sm: { fontSize: '$11' }, $lg: { fontSize: 'var(--text-6xl)' } } : null), ...p }));
48
+ /** The section heading: one size at every width, so it never grows into a page
49
+ * heading. `quiet` is one rung down, for a heading under another section's. */
50
+ const Title = ({ render = 'h2', quiet = false, ...p }) => (_jsx(Text, { ...slot('title'), render: render, ...BLOCK, fontFamily: "$heading", fontSize: quiet ? '$7' : '$8', fontWeight: '497', lineHeight: (quiet ? '1.2' : '1.22'), letterSpacing: '-0.01em', color: "var(--foreground)", ...BALANCE, ...p }));
51
+ /** The small caps line above a heading. */
52
+ const Eyebrow = ({ render = 'p', ...p }) => (_jsx(Text, { ...slot('eyebrow'), render: render, ...BLOCK, fontSize: "$2", fontWeight: "500", lineHeight: 'calc(1.25 / 0.875)', letterSpacing: '0.2em', textTransform: "uppercase", color: "var(--muted-foreground)", ...p }));
53
+ /** The paragraph under a heading. */
54
+ const Lede = ({ render = 'p', ...p }) => (_jsx(Text, { ...slot('lede'), render: render, ...BLOCK, fontSize: "$3", lineHeight: '1.65', letterSpacing: 0, color: "var(--muted-foreground)", ...PRETTY, ...p }));
55
+ /** The category line under the promise: read second, so bigger and brighter than
56
+ * a lede, a rung up at 640 the way the display above it steps. */
57
+ const Claim = ({ render = 'p', ...p }) => (_jsx(Text, { ...slot('claim'), render: render, ...BLOCK, fontSize: "$7", lineHeight: 'var(--leading-snug)', color: "var(--text-secondary)", ...(p.fontSize === undefined ? { $sm: { fontSize: '$8' } } : null), ...p }));
58
+ export { Display, Title, Eyebrow, Lede, Claim };
36
59
  //# sourceMappingURL=type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/marketing/type.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;GAUG;AACH,OAAO,EAAE,IAAI,EAAkB,MAAM,YAAY,CAAA;AAGjD,MAAM,IAAI,GAAG;IACX,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACxC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IACxC,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;IAC1C,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;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,IAAI,EACb,UAAU,EAAE,qBAA8B,EAC1C,KAAK,EAAC,uBAAuB,KACzB,CAAC,CAAC,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAC9D,CAAY,GACjB,CACH,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,93 @@
1
+ /* @hanzo/ui document — the body of a long document: a policy, a set of terms, an
2
+ explanation authored in markdown.
3
+
4
+ Import once at the app root: import '@hanzo/ui/styles/document.css'
5
+
6
+ KEYED ON `data-slot='document'`, NEVER ON A CLASS. `<Document>` stamps the
7
+ slot. The content arrives as bare tags rendered from markdown, which is the
8
+ one case no prop can reach, so these rules select by tag from the container.
9
+ Everything else on a page is props.
10
+
11
+ A contents list in a <nav> is chrome, and its links do not underline. A
12
+ table is the one thing that can outgrow its column, and nothing wraps it, so
13
+ the scroll goes on the table itself. */
14
+
15
+ [data-slot='document'] {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: var(--space-4);
19
+ font-size: var(--text-base);
20
+ line-height: var(--leading-relaxed);
21
+ color: var(--muted-foreground);
22
+ }
23
+
24
+ [data-slot='document'] a {
25
+ color: var(--foreground);
26
+ text-underline-offset: 4px;
27
+ }
28
+
29
+ [data-slot='document'] a:not(:is(nav, aside, header, [role=navigation]) a) {
30
+ text-decoration: underline;
31
+ }
32
+
33
+ [data-slot='document'] :is(strong, th) {
34
+ font-weight: var(--weight-medium);
35
+ color: var(--foreground);
36
+ }
37
+
38
+ [data-slot='document'] :is(h2, h3) {
39
+ font-weight: var(--weight-medium);
40
+ color: var(--foreground);
41
+ }
42
+
43
+ [data-slot='document'] h2 {
44
+ margin-top: var(--space-6);
45
+ font-size: var(--text-xl);
46
+ }
47
+
48
+ [data-slot='document'] h3 {
49
+ margin-top: var(--space-4);
50
+ font-size: var(--text-base);
51
+ }
52
+
53
+ [data-slot='document'] ul { list-style: disc; }
54
+ [data-slot='document'] ol { list-style: decimal; }
55
+
56
+ [data-slot='document'] :is(ul, ol) {
57
+ display: flex;
58
+ flex-direction: column;
59
+ gap: var(--space-2);
60
+ padding-left: var(--space-5);
61
+ }
62
+
63
+ [data-slot='document'] blockquote {
64
+ padding: var(--space-4);
65
+ border: 1px solid var(--border);
66
+ border-radius: var(--radius-lg);
67
+ background-color: var(--secondary);
68
+ }
69
+
70
+ [data-slot='document'] code {
71
+ font-family: var(--font-mono);
72
+ font-size: var(--text-sm);
73
+ color: var(--foreground);
74
+ }
75
+
76
+ [data-slot='document'] hr {
77
+ border: 0;
78
+ border-top: 1px solid var(--border);
79
+ }
80
+
81
+ [data-slot='document'] table {
82
+ display: block;
83
+ overflow-x: auto;
84
+ border-collapse: collapse;
85
+ font-size: var(--text-sm);
86
+ }
87
+
88
+ [data-slot='document'] :is(th, td) {
89
+ padding: var(--space-2) var(--space-3);
90
+ border: 1px solid var(--border);
91
+ text-align: start;
92
+ vertical-align: top;
93
+ }
@@ -11,13 +11,15 @@
11
11
  itself. Every animation is off under `prefers-reduced-motion: reduce`.
12
12
 
13
13
  rise enter: fade up 10px over 400ms FadeIn, Timeline, tooltips
14
+ `data-beat="n"` staggers it n x 70ms
14
15
  fade opacity eases 240ms SlideOver's scrim
15
16
  slide transform eases 260ms SlideOver's panel
16
17
  drag a row eases into place while one is held Reorder
17
18
  pulse opacity dims and returns, 2s Pulse, StatusDot, Skeleton
18
19
  blink on/off, 1s Caret
19
20
  shimmer a highlight sweeps a placeholder product Skeleton
20
- unfold a sheet turns open about its hinge unfold() */
21
+ unfold a sheet turns open about its hinge unfold()
22
+ run a light sweeps a set, child by child Run */
21
23
 
22
24
  @keyframes rise {
23
25
  from {
@@ -35,6 +37,17 @@
35
37
  will-change: transform, opacity;
36
38
  }
37
39
 
40
+ /* A staged entrance: `data-beat="n"` holds a rise back n beats of 70ms, so a set
41
+ that arrives together still reads in order. Reduced motion drops the
42
+ animation and the delay with it, so nothing waits hidden. */
43
+ [data-motion='rise'][data-beat='1'] { animation-delay: 70ms; }
44
+ [data-motion='rise'][data-beat='2'] { animation-delay: 140ms; }
45
+ [data-motion='rise'][data-beat='3'] { animation-delay: 210ms; }
46
+ [data-motion='rise'][data-beat='4'] { animation-delay: 280ms; }
47
+ [data-motion='rise'][data-beat='5'] { animation-delay: 350ms; }
48
+ [data-motion='rise'][data-beat='6'] { animation-delay: 420ms; }
49
+ [data-motion='rise'][data-beat='7'] { animation-delay: 490ms; }
50
+
38
51
  [data-motion='fade'] {
39
52
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
40
53
  will-change: opacity;
@@ -115,8 +128,45 @@
115
128
  --turn: 7deg;
116
129
  }
117
130
 
131
+ /* A run: a light crosses a set of things that are all true at once (`<Run>`).
132
+ Each direct child is lit `data-beat` steps of `--run-step` after the first;
133
+ the sweep owns `color` and returns it to `--run-rest`. */
134
+ @keyframes run {
135
+ 0%,
136
+ 26%,
137
+ 100% {
138
+ color: var(--run-rest, var(--neutral-400));
139
+ border-color: var(--neutral-800);
140
+ }
141
+ 8% {
142
+ color: var(--foreground);
143
+ border-color: var(--muted-foreground);
144
+ }
145
+ }
146
+
147
+ [data-motion='run'] > * {
148
+ animation: run 5.4s var(--ease-in-out) infinite;
149
+ }
150
+
151
+ [data-motion='run'] > [data-beat='1'] { animation-delay: calc(1 * var(--run-step, 0.22s)); }
152
+ [data-motion='run'] > [data-beat='2'] { animation-delay: calc(2 * var(--run-step, 0.22s)); }
153
+ [data-motion='run'] > [data-beat='3'] { animation-delay: calc(3 * var(--run-step, 0.22s)); }
154
+ [data-motion='run'] > [data-beat='4'] { animation-delay: calc(4 * var(--run-step, 0.22s)); }
155
+ [data-motion='run'] > [data-beat='5'] { animation-delay: calc(5 * var(--run-step, 0.22s)); }
156
+ [data-motion='run'] > [data-beat='6'] { animation-delay: calc(6 * var(--run-step, 0.22s)); }
157
+ [data-motion='run'] > [data-beat='7'] { animation-delay: calc(7 * var(--run-step, 0.22s)); }
158
+ [data-motion='run'] > [data-beat='8'] { animation-delay: calc(8 * var(--run-step, 0.22s)); }
159
+ [data-motion='run'] > [data-beat='9'] { animation-delay: calc(9 * var(--run-step, 0.22s)); }
160
+ [data-motion='run'] > [data-beat='10'] { animation-delay: calc(10 * var(--run-step, 0.22s)); }
161
+ [data-motion='run'] > [data-beat='11'] { animation-delay: calc(11 * var(--run-step, 0.22s)); }
162
+ [data-motion='run'] > [data-beat='12'] { animation-delay: calc(12 * var(--run-step, 0.22s)); }
163
+ [data-motion='run'] > [data-beat='13'] { animation-delay: calc(13 * var(--run-step, 0.22s)); }
164
+ [data-motion='run'] > [data-beat='14'] { animation-delay: calc(14 * var(--run-step, 0.22s)); }
165
+ [data-motion='run'] > [data-beat='15'] { animation-delay: calc(15 * var(--run-step, 0.22s)); }
166
+
118
167
  @media (prefers-reduced-motion: reduce) {
119
- [data-motion] {
168
+ [data-motion],
169
+ [data-motion='run'] > * {
120
170
  animation: none;
121
171
  transition: none;
122
172
  }
package/dist/styles.css CHANGED
@@ -1819,13 +1819,15 @@
1819
1819
  itself. Every animation is off under `prefers-reduced-motion: reduce`.
1820
1820
 
1821
1821
  rise enter: fade up 10px over 400ms FadeIn, Timeline, tooltips
1822
+ `data-beat="n"` staggers it n x 70ms
1822
1823
  fade opacity eases 240ms SlideOver's scrim
1823
1824
  slide transform eases 260ms SlideOver's panel
1824
1825
  drag a row eases into place while one is held Reorder
1825
1826
  pulse opacity dims and returns, 2s Pulse, StatusDot, Skeleton
1826
1827
  blink on/off, 1s Caret
1827
1828
  shimmer a highlight sweeps a placeholder product Skeleton
1828
- unfold a sheet turns open about its hinge unfold() */
1829
+ unfold a sheet turns open about its hinge unfold()
1830
+ run a light sweeps a set, child by child Run */
1829
1831
 
1830
1832
  @keyframes rise {
1831
1833
  from {
@@ -1843,6 +1845,17 @@
1843
1845
  will-change: transform, opacity;
1844
1846
  }
1845
1847
 
1848
+ /* A staged entrance: `data-beat="n"` holds a rise back n beats of 70ms, so a set
1849
+ that arrives together still reads in order. Reduced motion drops the
1850
+ animation and the delay with it, so nothing waits hidden. */
1851
+ [data-motion='rise'][data-beat='1'] { animation-delay: 70ms; }
1852
+ [data-motion='rise'][data-beat='2'] { animation-delay: 140ms; }
1853
+ [data-motion='rise'][data-beat='3'] { animation-delay: 210ms; }
1854
+ [data-motion='rise'][data-beat='4'] { animation-delay: 280ms; }
1855
+ [data-motion='rise'][data-beat='5'] { animation-delay: 350ms; }
1856
+ [data-motion='rise'][data-beat='6'] { animation-delay: 420ms; }
1857
+ [data-motion='rise'][data-beat='7'] { animation-delay: 490ms; }
1858
+
1846
1859
  [data-motion='fade'] {
1847
1860
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
1848
1861
  will-change: opacity;
@@ -1923,8 +1936,45 @@
1923
1936
  --turn: 7deg;
1924
1937
  }
1925
1938
 
1939
+ /* A run: a light crosses a set of things that are all true at once (`<Run>`).
1940
+ Each direct child is lit `data-beat` steps of `--run-step` after the first;
1941
+ the sweep owns `color` and returns it to `--run-rest`. */
1942
+ @keyframes run {
1943
+ 0%,
1944
+ 26%,
1945
+ 100% {
1946
+ color: var(--run-rest, var(--neutral-400));
1947
+ border-color: var(--neutral-800);
1948
+ }
1949
+ 8% {
1950
+ color: var(--foreground);
1951
+ border-color: var(--muted-foreground);
1952
+ }
1953
+ }
1954
+
1955
+ [data-motion='run'] > * {
1956
+ animation: run 5.4s var(--ease-in-out) infinite;
1957
+ }
1958
+
1959
+ [data-motion='run'] > [data-beat='1'] { animation-delay: calc(1 * var(--run-step, 0.22s)); }
1960
+ [data-motion='run'] > [data-beat='2'] { animation-delay: calc(2 * var(--run-step, 0.22s)); }
1961
+ [data-motion='run'] > [data-beat='3'] { animation-delay: calc(3 * var(--run-step, 0.22s)); }
1962
+ [data-motion='run'] > [data-beat='4'] { animation-delay: calc(4 * var(--run-step, 0.22s)); }
1963
+ [data-motion='run'] > [data-beat='5'] { animation-delay: calc(5 * var(--run-step, 0.22s)); }
1964
+ [data-motion='run'] > [data-beat='6'] { animation-delay: calc(6 * var(--run-step, 0.22s)); }
1965
+ [data-motion='run'] > [data-beat='7'] { animation-delay: calc(7 * var(--run-step, 0.22s)); }
1966
+ [data-motion='run'] > [data-beat='8'] { animation-delay: calc(8 * var(--run-step, 0.22s)); }
1967
+ [data-motion='run'] > [data-beat='9'] { animation-delay: calc(9 * var(--run-step, 0.22s)); }
1968
+ [data-motion='run'] > [data-beat='10'] { animation-delay: calc(10 * var(--run-step, 0.22s)); }
1969
+ [data-motion='run'] > [data-beat='11'] { animation-delay: calc(11 * var(--run-step, 0.22s)); }
1970
+ [data-motion='run'] > [data-beat='12'] { animation-delay: calc(12 * var(--run-step, 0.22s)); }
1971
+ [data-motion='run'] > [data-beat='13'] { animation-delay: calc(13 * var(--run-step, 0.22s)); }
1972
+ [data-motion='run'] > [data-beat='14'] { animation-delay: calc(14 * var(--run-step, 0.22s)); }
1973
+ [data-motion='run'] > [data-beat='15'] { animation-delay: calc(15 * var(--run-step, 0.22s)); }
1974
+
1926
1975
  @media (prefers-reduced-motion: reduce) {
1927
- [data-motion] {
1976
+ [data-motion],
1977
+ [data-motion='run'] > * {
1928
1978
  animation: none;
1929
1979
  transition: none;
1930
1980
  }
@@ -2500,13 +2550,15 @@ a svg,
2500
2550
  itself. Every animation is off under `prefers-reduced-motion: reduce`.
2501
2551
 
2502
2552
  rise enter: fade up 10px over 400ms FadeIn, Timeline, tooltips
2553
+ `data-beat="n"` staggers it n x 70ms
2503
2554
  fade opacity eases 240ms SlideOver's scrim
2504
2555
  slide transform eases 260ms SlideOver's panel
2505
2556
  drag a row eases into place while one is held Reorder
2506
2557
  pulse opacity dims and returns, 2s Pulse, StatusDot, Skeleton
2507
2558
  blink on/off, 1s Caret
2508
2559
  shimmer a highlight sweeps a placeholder product Skeleton
2509
- unfold a sheet turns open about its hinge unfold() */
2560
+ unfold a sheet turns open about its hinge unfold()
2561
+ run a light sweeps a set, child by child Run */
2510
2562
 
2511
2563
  @keyframes rise {
2512
2564
  from {
@@ -2524,6 +2576,17 @@ a svg,
2524
2576
  will-change: transform, opacity;
2525
2577
  }
2526
2578
 
2579
+ /* A staged entrance: `data-beat="n"` holds a rise back n beats of 70ms, so a set
2580
+ that arrives together still reads in order. Reduced motion drops the
2581
+ animation and the delay with it, so nothing waits hidden. */
2582
+ [data-motion='rise'][data-beat='1'] { animation-delay: 70ms; }
2583
+ [data-motion='rise'][data-beat='2'] { animation-delay: 140ms; }
2584
+ [data-motion='rise'][data-beat='3'] { animation-delay: 210ms; }
2585
+ [data-motion='rise'][data-beat='4'] { animation-delay: 280ms; }
2586
+ [data-motion='rise'][data-beat='5'] { animation-delay: 350ms; }
2587
+ [data-motion='rise'][data-beat='6'] { animation-delay: 420ms; }
2588
+ [data-motion='rise'][data-beat='7'] { animation-delay: 490ms; }
2589
+
2527
2590
  [data-motion='fade'] {
2528
2591
  transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1);
2529
2592
  will-change: opacity;
@@ -2604,8 +2667,45 @@ a svg,
2604
2667
  --turn: 7deg;
2605
2668
  }
2606
2669
 
2670
+ /* A run: a light crosses a set of things that are all true at once (`<Run>`).
2671
+ Each direct child is lit `data-beat` steps of `--run-step` after the first;
2672
+ the sweep owns `color` and returns it to `--run-rest`. */
2673
+ @keyframes run {
2674
+ 0%,
2675
+ 26%,
2676
+ 100% {
2677
+ color: var(--run-rest, var(--neutral-400));
2678
+ border-color: var(--neutral-800);
2679
+ }
2680
+ 8% {
2681
+ color: var(--foreground);
2682
+ border-color: var(--muted-foreground);
2683
+ }
2684
+ }
2685
+
2686
+ [data-motion='run'] > * {
2687
+ animation: run 5.4s var(--ease-in-out) infinite;
2688
+ }
2689
+
2690
+ [data-motion='run'] > [data-beat='1'] { animation-delay: calc(1 * var(--run-step, 0.22s)); }
2691
+ [data-motion='run'] > [data-beat='2'] { animation-delay: calc(2 * var(--run-step, 0.22s)); }
2692
+ [data-motion='run'] > [data-beat='3'] { animation-delay: calc(3 * var(--run-step, 0.22s)); }
2693
+ [data-motion='run'] > [data-beat='4'] { animation-delay: calc(4 * var(--run-step, 0.22s)); }
2694
+ [data-motion='run'] > [data-beat='5'] { animation-delay: calc(5 * var(--run-step, 0.22s)); }
2695
+ [data-motion='run'] > [data-beat='6'] { animation-delay: calc(6 * var(--run-step, 0.22s)); }
2696
+ [data-motion='run'] > [data-beat='7'] { animation-delay: calc(7 * var(--run-step, 0.22s)); }
2697
+ [data-motion='run'] > [data-beat='8'] { animation-delay: calc(8 * var(--run-step, 0.22s)); }
2698
+ [data-motion='run'] > [data-beat='9'] { animation-delay: calc(9 * var(--run-step, 0.22s)); }
2699
+ [data-motion='run'] > [data-beat='10'] { animation-delay: calc(10 * var(--run-step, 0.22s)); }
2700
+ [data-motion='run'] > [data-beat='11'] { animation-delay: calc(11 * var(--run-step, 0.22s)); }
2701
+ [data-motion='run'] > [data-beat='12'] { animation-delay: calc(12 * var(--run-step, 0.22s)); }
2702
+ [data-motion='run'] > [data-beat='13'] { animation-delay: calc(13 * var(--run-step, 0.22s)); }
2703
+ [data-motion='run'] > [data-beat='14'] { animation-delay: calc(14 * var(--run-step, 0.22s)); }
2704
+ [data-motion='run'] > [data-beat='15'] { animation-delay: calc(15 * var(--run-step, 0.22s)); }
2705
+
2607
2706
  @media (prefers-reduced-motion: reduce) {
2608
- [data-motion] {
2707
+ [data-motion],
2708
+ [data-motion='run'] > * {
2609
2709
  animation: none;
2610
2710
  transition: none;
2611
2711
  }