@malilion/block-ui-react 0.1.0 → 0.2.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.
Files changed (97) hide show
  1. package/dist/components/actions/BlockMenu/BlockMenu.d.ts +9 -0
  2. package/dist/components/actions/BlockMenu/BlockMenu.d.ts.map +1 -0
  3. package/dist/components/actions/BlockMenu/BlockMenu.js +211 -0
  4. package/dist/components/actions/BlockMenu/BlockMenu.js.map +1 -0
  5. package/dist/components/actions/BlockMenu/BlockMenu.module.js +23 -0
  6. package/dist/components/actions/BlockMenu/BlockMenu.module.js.map +1 -0
  7. package/dist/components/actions/BlockMenu/BlockMenu.types.d.ts +42 -0
  8. package/dist/components/actions/BlockMenu/BlockMenu.types.d.ts.map +1 -0
  9. package/dist/components/actions/BlockMenu/BlockMenu.utils.d.ts +10 -0
  10. package/dist/components/actions/BlockMenu/BlockMenu.utils.d.ts.map +1 -0
  11. package/dist/components/actions/BlockMenu/BlockMenu.utils.js +26 -0
  12. package/dist/components/actions/BlockMenu/BlockMenu.utils.js.map +1 -0
  13. package/dist/components/actions/BlockMenu/index.d.ts +3 -0
  14. package/dist/components/actions/BlockMenu/index.d.ts.map +1 -0
  15. package/dist/components/actions/index.d.ts +1 -0
  16. package/dist/components/actions/index.d.ts.map +1 -1
  17. package/dist/components/display/BlockTable/BlockTable.d.ts +8 -0
  18. package/dist/components/display/BlockTable/BlockTable.d.ts.map +1 -0
  19. package/dist/components/display/BlockTable/BlockTable.js +92 -0
  20. package/dist/components/display/BlockTable/BlockTable.js.map +1 -0
  21. package/dist/components/display/BlockTable/BlockTable.module.js +31 -0
  22. package/dist/components/display/BlockTable/BlockTable.module.js.map +1 -0
  23. package/dist/components/display/BlockTable/BlockTable.types.d.ts +49 -0
  24. package/dist/components/display/BlockTable/BlockTable.types.d.ts.map +1 -0
  25. package/dist/components/display/BlockTable/BlockTable.utils.d.ts +8 -0
  26. package/dist/components/display/BlockTable/BlockTable.utils.d.ts.map +1 -0
  27. package/dist/components/display/BlockTable/BlockTable.utils.js +48 -0
  28. package/dist/components/display/BlockTable/BlockTable.utils.js.map +1 -0
  29. package/dist/components/display/BlockTable/index.d.ts +3 -0
  30. package/dist/components/display/BlockTable/index.d.ts.map +1 -0
  31. package/dist/components/display/BlockTooltip/BlockTooltip.d.ts +8 -0
  32. package/dist/components/display/BlockTooltip/BlockTooltip.d.ts.map +1 -0
  33. package/dist/components/display/BlockTooltip/BlockTooltip.js +83 -0
  34. package/dist/components/display/BlockTooltip/BlockTooltip.js.map +1 -0
  35. package/dist/components/display/BlockTooltip/BlockTooltip.module.js +11 -0
  36. package/dist/components/display/BlockTooltip/BlockTooltip.module.js.map +1 -0
  37. package/dist/components/display/BlockTooltip/BlockTooltip.types.d.ts +20 -0
  38. package/dist/components/display/BlockTooltip/BlockTooltip.types.d.ts.map +1 -0
  39. package/dist/components/display/BlockTooltip/BlockTooltip.types.js +11 -0
  40. package/dist/components/display/BlockTooltip/BlockTooltip.types.js.map +1 -0
  41. package/dist/components/display/BlockTooltip/index.d.ts +4 -0
  42. package/dist/components/display/BlockTooltip/index.d.ts.map +1 -0
  43. package/dist/components/display/index.d.ts +2 -0
  44. package/dist/components/display/index.d.ts.map +1 -1
  45. package/dist/components/layout/BlockDivider/BlockDivider.d.ts +7 -0
  46. package/dist/components/layout/BlockDivider/BlockDivider.d.ts.map +1 -0
  47. package/dist/components/layout/BlockDivider/BlockDivider.js +54 -0
  48. package/dist/components/layout/BlockDivider/BlockDivider.js.map +1 -0
  49. package/dist/components/layout/BlockDivider/BlockDivider.module.js +13 -0
  50. package/dist/components/layout/BlockDivider/BlockDivider.module.js.map +1 -0
  51. package/dist/components/layout/BlockDivider/BlockDivider.types.d.ts +14 -0
  52. package/dist/components/layout/BlockDivider/BlockDivider.types.d.ts.map +1 -0
  53. package/dist/components/layout/BlockDivider/BlockDivider.types.js +10 -0
  54. package/dist/components/layout/BlockDivider/BlockDivider.types.js.map +1 -0
  55. package/dist/components/layout/BlockDivider/index.d.ts +4 -0
  56. package/dist/components/layout/BlockDivider/index.d.ts.map +1 -0
  57. package/dist/components/layout/BlockStack/BlockStack.d.ts +4 -0
  58. package/dist/components/layout/BlockStack/BlockStack.d.ts.map +1 -0
  59. package/dist/components/layout/BlockStack/BlockStack.js +22 -0
  60. package/dist/components/layout/BlockStack/BlockStack.js.map +1 -0
  61. package/dist/components/layout/BlockStack/BlockStack.module.js +7 -0
  62. package/dist/components/layout/BlockStack/BlockStack.module.js.map +1 -0
  63. package/dist/components/layout/BlockStack/BlockStack.types.d.ts +24 -0
  64. package/dist/components/layout/BlockStack/BlockStack.types.d.ts.map +1 -0
  65. package/dist/components/layout/BlockStack/BlockStack.types.js +18 -0
  66. package/dist/components/layout/BlockStack/BlockStack.types.js.map +1 -0
  67. package/dist/components/layout/BlockStack/index.d.ts +4 -0
  68. package/dist/components/layout/BlockStack/index.d.ts.map +1 -0
  69. package/dist/components/layout/index.d.ts +2 -0
  70. package/dist/components/layout/index.d.ts.map +1 -1
  71. package/dist/components/navigation/BlockPagination/BlockPagination.d.ts +7 -0
  72. package/dist/components/navigation/BlockPagination/BlockPagination.d.ts.map +1 -0
  73. package/dist/components/navigation/BlockPagination/BlockPagination.js +83 -0
  74. package/dist/components/navigation/BlockPagination/BlockPagination.js.map +1 -0
  75. package/dist/components/navigation/BlockPagination/BlockPagination.module.js +19 -0
  76. package/dist/components/navigation/BlockPagination/BlockPagination.module.js.map +1 -0
  77. package/dist/components/navigation/BlockPagination/BlockPagination.types.d.ts +22 -0
  78. package/dist/components/navigation/BlockPagination/BlockPagination.types.d.ts.map +1 -0
  79. package/dist/components/navigation/BlockPagination/BlockPagination.utils.d.ts +7 -0
  80. package/dist/components/navigation/BlockPagination/BlockPagination.utils.d.ts.map +1 -0
  81. package/dist/components/navigation/BlockPagination/BlockPagination.utils.js +26 -0
  82. package/dist/components/navigation/BlockPagination/BlockPagination.utils.js.map +1 -0
  83. package/dist/components/navigation/BlockPagination/index.d.ts +5 -0
  84. package/dist/components/navigation/BlockPagination/index.d.ts.map +1 -0
  85. package/dist/components/navigation/index.d.ts +1 -0
  86. package/dist/components/navigation/index.d.ts.map +1 -1
  87. package/dist/hooks/useAnchoredPosition.d.ts +17 -0
  88. package/dist/hooks/useAnchoredPosition.d.ts.map +1 -0
  89. package/dist/hooks/useAnchoredPosition.js +62 -0
  90. package/dist/hooks/useAnchoredPosition.js.map +1 -0
  91. package/dist/index.js +11 -1
  92. package/dist/styles.css +529 -0
  93. package/dist/utils/position.d.ts +41 -0
  94. package/dist/utils/position.d.ts.map +1 -0
  95. package/dist/utils/position.js +48 -0
  96. package/dist/utils/position.js.map +1 -0
  97. package/package.json +4 -4
@@ -0,0 +1,8 @@
1
+ import type { BlockTableColumn, BlockTableSort } from "./BlockTable.types";
2
+ /** The property `key` of a row, when it is a renderable or sortable primitive. */
3
+ export declare function readField(row: unknown, key: string): string | number | undefined;
4
+ /** Returns a sorted copy of `rows` (stable; empty values last in both directions). */
5
+ export declare function sortRows<T>(rows: T[], columns: BlockTableColumn<T>[], sort: BlockTableSort | null): T[];
6
+ /** Clicking a header cycles: unsorted → ascending → descending → unsorted. */
7
+ export declare function nextSort(current: BlockTableSort | null, key: string): BlockTableSort | null;
8
+ //# sourceMappingURL=BlockTable.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTable.utils.d.ts","sourceRoot":"","sources":["../../../../src/components/display/BlockTable/BlockTable.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAI3E,kFAAkF;AAClF,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAIhF;AAaD,sFAAsF;AACtF,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,CAAC,EAAE,EACT,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,EAC9B,IAAI,EAAE,cAAc,GAAG,IAAI,GAC1B,CAAC,EAAE,CAaL;AAED,8EAA8E;AAC9E,wBAAgB,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAI3F"}
@@ -0,0 +1,48 @@
1
+ //#region src/components/display/BlockTable/BlockTable.utils.ts
2
+ /** The property `key` of a row, when it is a renderable or sortable primitive. */
3
+ function readField(row, key) {
4
+ if (row === null || typeof row !== "object") return void 0;
5
+ const value = row[key];
6
+ return typeof value === "string" || typeof value === "number" ? value : void 0;
7
+ }
8
+ var collator = new Intl.Collator(void 0, {
9
+ numeric: true,
10
+ sensitivity: "base"
11
+ });
12
+ function compare(a, b) {
13
+ if (a === null || a === void 0 || a === "") return b === null || b === void 0 || b === "" ? 0 : 1;
14
+ if (b === null || b === void 0 || b === "") return -1;
15
+ if (typeof a === "number" && typeof b === "number") return a - b;
16
+ return collator.compare(String(a), String(b));
17
+ }
18
+ /** Returns a sorted copy of `rows` (stable; empty values last in both directions). */
19
+ function sortRows(rows, columns, sort) {
20
+ if (!sort) return rows;
21
+ const column = columns.find((candidate) => candidate.key === sort.key);
22
+ if (!column) return rows;
23
+ const value = (row) => column.sortValue ? column.sortValue(row) : readField(row, column.key);
24
+ const sign = sort.direction === "asc" ? 1 : -1;
25
+ return [...rows].sort((a, b) => {
26
+ const va = value(a);
27
+ const vb = value(b);
28
+ const empty = (v) => v === null || v === void 0 || v === "";
29
+ if (empty(va) || empty(vb)) return compare(va, vb);
30
+ return compare(va, vb) * sign;
31
+ });
32
+ }
33
+ /** Clicking a header cycles: unsorted → ascending → descending → unsorted. */
34
+ function nextSort(current, key) {
35
+ if (current?.key !== key) return {
36
+ key,
37
+ direction: "asc"
38
+ };
39
+ if (current.direction === "asc") return {
40
+ key,
41
+ direction: "desc"
42
+ };
43
+ return null;
44
+ }
45
+ //#endregion
46
+ export { nextSort, readField, sortRows };
47
+
48
+ //# sourceMappingURL=BlockTable.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTable.utils.js","names":[],"sources":["../../../../src/components/display/BlockTable/BlockTable.utils.ts"],"sourcesContent":["import type { BlockTableColumn, BlockTableSort } from \"./BlockTable.types\";\n\ntype SortableValue = string | number | null | undefined;\n\n/** The property `key` of a row, when it is a renderable or sortable primitive. */\nexport function readField(row: unknown, key: string): string | number | undefined {\n if (row === null || typeof row !== \"object\") return undefined;\n const value = (row as Record<string, unknown>)[key];\n return typeof value === \"string\" || typeof value === \"number\" ? value : undefined;\n}\n\nconst collator = new Intl.Collator(undefined, { numeric: true, sensitivity: \"base\" });\n\nfunction compare(a: SortableValue, b: SortableValue): number {\n // Empty values always sort last.\n if (a === null || a === undefined || a === \"\")\n return b === null || b === undefined || b === \"\" ? 0 : 1;\n if (b === null || b === undefined || b === \"\") return -1;\n if (typeof a === \"number\" && typeof b === \"number\") return a - b;\n return collator.compare(String(a), String(b));\n}\n\n/** Returns a sorted copy of `rows` (stable; empty values last in both directions). */\nexport function sortRows<T>(\n rows: T[],\n columns: BlockTableColumn<T>[],\n sort: BlockTableSort | null,\n): T[] {\n if (!sort) return rows;\n const column = columns.find((candidate) => candidate.key === sort.key);\n if (!column) return rows;\n const value = (row: T) => (column.sortValue ? column.sortValue(row) : readField(row, column.key));\n const sign = sort.direction === \"asc\" ? 1 : -1;\n return [...rows].sort((a, b) => {\n const va = value(a);\n const vb = value(b);\n const empty = (v: SortableValue) => v === null || v === undefined || v === \"\";\n if (empty(va) || empty(vb)) return compare(va, vb);\n return compare(va, vb) * sign;\n });\n}\n\n/** Clicking a header cycles: unsorted → ascending → descending → unsorted. */\nexport function nextSort(current: BlockTableSort | null, key: string): BlockTableSort | null {\n if (current?.key !== key) return { key, direction: \"asc\" };\n if (current.direction === \"asc\") return { key, direction: \"desc\" };\n return null;\n}\n"],"mappings":";;AAKA,SAAgB,UAAU,KAAc,KAA0C;CAChF,IAAI,QAAQ,QAAQ,OAAO,QAAQ,UAAU,OAAO,KAAA;CACpD,MAAM,QAAS,IAAgC;CAC/C,OAAO,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,QAAQ,KAAA;AAC1E;AAEA,IAAM,WAAW,IAAI,KAAK,SAAS,KAAA,GAAW;CAAE,SAAS;CAAM,aAAa;AAAO,CAAC;AAEpF,SAAS,QAAQ,GAAkB,GAA0B;CAE3D,IAAI,MAAM,QAAQ,MAAM,KAAA,KAAa,MAAM,IACzC,OAAO,MAAM,QAAQ,MAAM,KAAA,KAAa,MAAM,KAAK,IAAI;CACzD,IAAI,MAAM,QAAQ,MAAM,KAAA,KAAa,MAAM,IAAI,OAAO;CACtD,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,UAAU,OAAO,IAAI;CAC/D,OAAO,SAAS,QAAQ,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAC9C;;AAGA,SAAgB,SACd,MACA,SACA,MACK;CACL,IAAI,CAAC,MAAM,OAAO;CAClB,MAAM,SAAS,QAAQ,MAAM,cAAc,UAAU,QAAQ,KAAK,GAAG;CACrE,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,SAAS,QAAY,OAAO,YAAY,OAAO,UAAU,GAAG,IAAI,UAAU,KAAK,OAAO,GAAG;CAC/F,MAAM,OAAO,KAAK,cAAc,QAAQ,IAAI;CAC5C,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;EAC9B,MAAM,KAAK,MAAM,CAAC;EAClB,MAAM,KAAK,MAAM,CAAC;EAClB,MAAM,SAAS,MAAqB,MAAM,QAAQ,MAAM,KAAA,KAAa,MAAM;EAC3E,IAAI,MAAM,EAAE,KAAK,MAAM,EAAE,GAAG,OAAO,QAAQ,IAAI,EAAE;EACjD,OAAO,QAAQ,IAAI,EAAE,IAAI;CAC3B,CAAC;AACH;;AAGA,SAAgB,SAAS,SAAgC,KAAoC;CAC3F,IAAI,SAAS,QAAQ,KAAK,OAAO;EAAE;EAAK,WAAW;CAAM;CACzD,IAAI,QAAQ,cAAc,OAAO,OAAO;EAAE;EAAK,WAAW;CAAO;CACjE,OAAO;AACT"}
@@ -0,0 +1,3 @@
1
+ export { BlockTable } from "./BlockTable";
2
+ export type { BlockTableColumn, BlockTableProps, BlockTableSort, BlockTableSortDirection, } from "./BlockTable.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/BlockTable/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { BlockTooltipProps } from "./BlockTooltip.types";
2
+ /**
3
+ * Short hint for a focusable element, shown on hover and keyboard focus.
4
+ * Rendered in the provider's overlay layer, so scroll containers never clip it.
5
+ * Escape dismisses it; the pointer can move onto it without closing it.
6
+ */
7
+ export declare const BlockTooltip: import("react").ForwardRefExoticComponent<BlockTooltipProps & import("react").RefAttributes<HTMLSpanElement>>;
8
+ //# sourceMappingURL=BlockTooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/display/BlockTooltip/BlockTooltip.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAK9D;;;;GAIG;AACH,eAAO,MAAM,YAAY,+GA8FvB,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { cx } from "../../../utils/cx.js";
2
+ import { usePortalContainer } from "../../../provider/context.js";
3
+ import { useAnchoredPosition } from "../../../hooks/useAnchoredPosition.js";
4
+ import { mergeRefs } from "../../../utils/refs.js";
5
+ import BlockTooltip_module_default from "./BlockTooltip.module.js";
6
+ import { cloneElement, forwardRef, useEffect, useId, useRef, useState } from "react";
7
+ import { createPortal } from "react-dom";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/components/display/BlockTooltip/BlockTooltip.tsx
10
+ /** Grace period so the pointer can cross the gap onto the tooltip (WCAG 1.4.13 hoverable). */
11
+ var CLOSE_DELAY = 120;
12
+ /**
13
+ * Short hint for a focusable element, shown on hover and keyboard focus.
14
+ * Rendered in the provider's overlay layer, so scroll containers never clip it.
15
+ * Escape dismisses it; the pointer can move onto it without closing it.
16
+ */
17
+ var BlockTooltip = forwardRef(function BlockTooltip({ content, children, placement = "top", delay = 300, size = "md", disabled = false, className, onPointerEnter, onPointerLeave, onFocus, onBlur, ...rest }, ref) {
18
+ const container = usePortalContainer();
19
+ const tooltipId = useId();
20
+ const [open, setOpen] = useState(false);
21
+ const anchorRef = useRef(null);
22
+ const tooltipRef = useRef(null);
23
+ const timer = useRef(void 0);
24
+ const visible = open && !disabled;
25
+ const position = useAnchoredPosition(anchorRef, tooltipRef, visible, { side: placement });
26
+ const schedule = (next, ms) => {
27
+ clearTimeout(timer.current);
28
+ if (ms <= 0) setOpen(next);
29
+ else timer.current = setTimeout(() => setOpen(next), ms);
30
+ };
31
+ useEffect(() => () => clearTimeout(timer.current), []);
32
+ useEffect(() => {
33
+ if (!open) return;
34
+ const onKeyDown = (event) => {
35
+ if (event.key === "Escape") {
36
+ clearTimeout(timer.current);
37
+ setOpen(false);
38
+ }
39
+ };
40
+ document.addEventListener("keydown", onKeyDown);
41
+ return () => document.removeEventListener("keydown", onKeyDown);
42
+ }, [open]);
43
+ const hasTooltip = !disabled && container !== null;
44
+ const describedBy = cx(children.props["aria-describedby"], hasTooltip && tooltipId) || void 0;
45
+ return /* @__PURE__ */ jsxs("span", {
46
+ ref: mergeRefs(ref, anchorRef),
47
+ className: cx(BlockTooltip_module_default.anchor, className),
48
+ onPointerEnter: (event) => {
49
+ schedule(true, delay);
50
+ onPointerEnter?.(event);
51
+ },
52
+ onPointerLeave: (event) => {
53
+ schedule(false, CLOSE_DELAY);
54
+ onPointerLeave?.(event);
55
+ },
56
+ onFocus: (event) => {
57
+ schedule(true, 0);
58
+ onFocus?.(event);
59
+ },
60
+ onBlur: (event) => {
61
+ schedule(false, 0);
62
+ onBlur?.(event);
63
+ },
64
+ ...rest,
65
+ children: [cloneElement(children, { "aria-describedby": describedBy }), hasTooltip ? createPortal(/* @__PURE__ */ jsx("span", {
66
+ ref: tooltipRef,
67
+ id: tooltipId,
68
+ role: "tooltip",
69
+ hidden: !visible,
70
+ "data-placement": position?.side ?? placement,
71
+ "data-size": size,
72
+ className: BlockTooltip_module_default.tooltip,
73
+ style: position?.style,
74
+ onPointerEnter: () => schedule(true, 0),
75
+ onPointerLeave: () => schedule(false, CLOSE_DELAY),
76
+ children: content
77
+ }), container) : null]
78
+ });
79
+ });
80
+ //#endregion
81
+ export { BlockTooltip };
82
+
83
+ //# sourceMappingURL=BlockTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTooltip.js","names":["styles"],"sources":["../../../../src/components/display/BlockTooltip/BlockTooltip.tsx"],"sourcesContent":["import {\n cloneElement,\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type FocusEvent,\n type PointerEvent,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { useAnchoredPosition } from \"../../../hooks/useAnchoredPosition\";\nimport { usePortalContainer } from \"../../../provider/context\";\nimport { cx } from \"../../../utils/cx\";\nimport { mergeRefs } from \"../../../utils/refs\";\nimport styles from \"./BlockTooltip.module.css\";\nimport type { BlockTooltipProps } from \"./BlockTooltip.types\";\n\n/** Grace period so the pointer can cross the gap onto the tooltip (WCAG 1.4.13 hoverable). */\nconst CLOSE_DELAY = 120;\n\n/**\n * Short hint for a focusable element, shown on hover and keyboard focus.\n * Rendered in the provider's overlay layer, so scroll containers never clip it.\n * Escape dismisses it; the pointer can move onto it without closing it.\n */\nexport const BlockTooltip = forwardRef<HTMLSpanElement, BlockTooltipProps>(function BlockTooltip(\n {\n content,\n children,\n placement = \"top\",\n delay = 300,\n size = \"md\",\n disabled = false,\n className,\n onPointerEnter,\n onPointerLeave,\n onFocus,\n onBlur,\n ...rest\n },\n ref,\n) {\n const container = usePortalContainer();\n const tooltipId = useId();\n const [open, setOpen] = useState(false);\n const anchorRef = useRef<HTMLSpanElement>(null);\n const tooltipRef = useRef<HTMLSpanElement>(null);\n const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n\n const visible = open && !disabled;\n const position = useAnchoredPosition(anchorRef, tooltipRef, visible, { side: placement });\n\n const schedule = (next: boolean, ms: number) => {\n clearTimeout(timer.current);\n if (ms <= 0) setOpen(next);\n else timer.current = setTimeout(() => setOpen(next), ms);\n };\n\n useEffect(() => () => clearTimeout(timer.current), []);\n\n useEffect(() => {\n if (!open) return;\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n clearTimeout(timer.current);\n setOpen(false);\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n return () => document.removeEventListener(\"keydown\", onKeyDown);\n }, [open]);\n\n const hasTooltip = !disabled && container !== null;\n const describedBy = cx(children.props[\"aria-describedby\"], hasTooltip && tooltipId) || undefined;\n\n return (\n <span\n ref={mergeRefs(ref, anchorRef)}\n className={cx(styles.anchor, className)}\n onPointerEnter={(event: PointerEvent<HTMLSpanElement>) => {\n schedule(true, delay);\n onPointerEnter?.(event);\n }}\n onPointerLeave={(event: PointerEvent<HTMLSpanElement>) => {\n schedule(false, CLOSE_DELAY);\n onPointerLeave?.(event);\n }}\n onFocus={(event: FocusEvent<HTMLSpanElement>) => {\n schedule(true, 0);\n onFocus?.(event);\n }}\n onBlur={(event: FocusEvent<HTMLSpanElement>) => {\n schedule(false, 0);\n onBlur?.(event);\n }}\n {...rest}\n >\n {cloneElement(children, { \"aria-describedby\": describedBy })}\n {hasTooltip\n ? createPortal(\n <span\n ref={tooltipRef}\n id={tooltipId}\n role=\"tooltip\"\n hidden={!visible}\n data-placement={position?.side ?? placement}\n data-size={size}\n className={styles.tooltip}\n style={position?.style}\n onPointerEnter={() => schedule(true, 0)}\n onPointerLeave={() => schedule(false, CLOSE_DELAY)}\n >\n {content}\n </span>,\n container,\n )\n : null}\n </span>\n );\n});\n"],"mappings":";;;;;;;;;;AAmBA,IAAM,cAAc;;;;;;AAOpB,IAAa,eAAe,WAA+C,SAAS,aAClF,EACE,SACA,UACA,YAAY,OACZ,QAAQ,KACR,OAAO,MACP,WAAW,OACX,WACA,gBACA,gBACA,SACA,QACA,GAAG,QAEL,KACA;CACA,MAAM,YAAY,mBAAmB;CACrC,MAAM,YAAY,MAAM;CACxB,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CACtC,MAAM,YAAY,OAAwB,IAAI;CAC9C,MAAM,aAAa,OAAwB,IAAI;CAC/C,MAAM,QAAQ,OAAkD,KAAA,CAAS;CAEzE,MAAM,UAAU,QAAQ,CAAC;CACzB,MAAM,WAAW,oBAAoB,WAAW,YAAY,SAAS,EAAE,MAAM,UAAU,CAAC;CAExF,MAAM,YAAY,MAAe,OAAe;EAC9C,aAAa,MAAM,OAAO;EAC1B,IAAI,MAAM,GAAG,QAAQ,IAAI;OACpB,MAAM,UAAU,iBAAiB,QAAQ,IAAI,GAAG,EAAE;CACzD;CAEA,sBAAsB,aAAa,MAAM,OAAO,GAAG,CAAC,CAAC;CAErD,gBAAgB;EACd,IAAI,CAAC,MAAM;EACX,MAAM,aAAa,UAAyB;GAC1C,IAAI,MAAM,QAAQ,UAAU;IAC1B,aAAa,MAAM,OAAO;IAC1B,QAAQ,KAAK;GACf;EACF;EACA,SAAS,iBAAiB,WAAW,SAAS;EAC9C,aAAa,SAAS,oBAAoB,WAAW,SAAS;CAChE,GAAG,CAAC,IAAI,CAAC;CAET,MAAM,aAAa,CAAC,YAAY,cAAc;CAC9C,MAAM,cAAc,GAAG,SAAS,MAAM,qBAAqB,cAAc,SAAS,KAAK,KAAA;CAEvF,OACE,qBAAC,QAAD;EACE,KAAK,UAAU,KAAK,SAAS;EAC7B,WAAW,GAAGA,4BAAO,QAAQ,SAAS;EACtC,iBAAiB,UAAyC;GACxD,SAAS,MAAM,KAAK;GACpB,iBAAiB,KAAK;EACxB;EACA,iBAAiB,UAAyC;GACxD,SAAS,OAAO,WAAW;GAC3B,iBAAiB,KAAK;EACxB;EACA,UAAU,UAAuC;GAC/C,SAAS,MAAM,CAAC;GAChB,UAAU,KAAK;EACjB;EACA,SAAS,UAAuC;GAC9C,SAAS,OAAO,CAAC;GACjB,SAAS,KAAK;EAChB;EACA,GAAI;EAnBN,UAAA,CAqBG,aAAa,UAAU,EAAE,oBAAoB,YAAY,CAAC,GAC1D,aACG,aACE,oBAAC,QAAD;GACE,KAAK;GACL,IAAI;GACJ,MAAK;GACL,QAAQ,CAAC;GACT,kBAAgB,UAAU,QAAQ;GAClC,aAAW;GACX,WAAWA,4BAAO;GAClB,OAAO,UAAU;GACjB,sBAAsB,SAAS,MAAM,CAAC;GACtC,sBAAsB,SAAS,OAAO,WAAW;GAEhD,UAAA;EACG,CAAA,GACN,SACF,IACA,IACA;;AAEV,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/components/display/BlockTooltip/BlockTooltip.module.css
2
+ var anchor = "block-anchor-3LOJ3";
3
+ var tooltip = "block-tooltip-K9Jn9";
4
+ var BlockTooltip_module_default = {
5
+ anchor,
6
+ tooltip
7
+ };
8
+ //#endregion
9
+ export { anchor, BlockTooltip_module_default as default, tooltip };
10
+
11
+ //# sourceMappingURL=BlockTooltip.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTooltip.module.js","names":[],"sources":["../../../../src/components/display/BlockTooltip/BlockTooltip.module.css"],"sourcesContent":[".anchor {\n display: inline-flex;\n vertical-align: middle;\n}\n\n.tooltip {\n position: fixed;\n top: var(--block-float-y, 0);\n left: var(--block-float-x, 0);\n z-index: var(--block-z-tooltip);\n width: max-content;\n max-width: min(280px, calc(100vw - var(--block-space-4)));\n padding: var(--block-space-1) var(--block-space-2);\n font-family: var(--block-font-body);\n font-size: var(--block-font-size-sm);\n font-weight: var(--block-font-weight-medium);\n line-height: var(--block-line-height-tight);\n text-align: left;\n text-transform: none;\n white-space: normal;\n color: var(--block-text-primary);\n background-color: var(--block-obsidian-dark);\n border: var(--block-border-width-thin) solid var(--block-black);\n box-shadow:\n inset 0 0 0 2px var(--block-obsidian-light),\n var(--block-shadow-drop);\n}\n\n.tooltip[hidden] {\n display: none;\n}\n\n.tooltip[data-size=\"sm\"] {\n max-width: min(200px, calc(100vw - var(--block-space-4)));\n}\n\n/* Pixel arrow, aligned with the anchor's center even when the box slides. */\n.tooltip::after {\n content: \"\";\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: var(--block-obsidian-light);\n}\n\n.tooltip[data-placement=\"top\"]::after,\n.tooltip[data-placement=\"bottom\"]::after {\n left: calc(var(--block-float-arrow, 50%) - 4px);\n}\n\n.tooltip[data-placement=\"left\"]::after,\n.tooltip[data-placement=\"right\"]::after {\n top: calc(var(--block-float-arrow, 50%) - 4px);\n}\n\n.tooltip[data-placement=\"top\"]::after {\n top: 100%;\n clip-path: polygon(0 0, 100% 0, 50% 100%);\n}\n\n.tooltip[data-placement=\"bottom\"]::after {\n bottom: 100%;\n clip-path: polygon(50% 0, 100% 100%, 0 100%);\n}\n\n.tooltip[data-placement=\"left\"]::after {\n left: 100%;\n clip-path: polygon(0 0, 100% 50%, 0 100%);\n}\n\n.tooltip[data-placement=\"right\"]::after {\n right: 100%;\n clip-path: polygon(100% 0, 100% 100%, 0 50%);\n}\n"],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes, ReactElement, ReactNode } from "react";
2
+ export declare const tooltipPlacements: readonly ["top", "bottom", "left", "right"];
3
+ export type BlockTooltipPlacement = (typeof tooltipPlacements)[number];
4
+ export interface BlockTooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, "content"> {
5
+ /** Tooltip text. Keep it short and non-interactive — links and buttons belong in a menu or modal. */
6
+ content: ReactNode;
7
+ /** A single focusable element (button, link, input). It receives `aria-describedby`. */
8
+ children: ReactElement<{
9
+ "aria-describedby"?: string;
10
+ }>;
11
+ /** Preferred side; flips to the opposite side when it would leave the viewport. @default "top" */
12
+ placement?: BlockTooltipPlacement;
13
+ /** Hover delay before opening, in ms. Focus opens immediately. @default 300 */
14
+ delay?: number;
15
+ /** `sm` wraps at 200px, `md` at 280px. @default "md" */
16
+ size?: "sm" | "md";
17
+ /** Never show the tooltip. */
18
+ disabled?: boolean;
19
+ }
20
+ //# sourceMappingURL=BlockTooltip.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTooltip.types.d.ts","sourceRoot":"","sources":["../../../../src/components/display/BlockTooltip/BlockTooltip.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErE,eAAO,MAAM,iBAAiB,6CAA8C,CAAC;AAE7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvE,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC;IACzF,qGAAqG;IACrG,OAAO,EAAE,SAAS,CAAC;IACnB,wFAAwF;IACxF,QAAQ,EAAE,YAAY,CAAC;QAAE,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,kGAAkG;IAClG,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -0,0 +1,11 @@
1
+ //#region src/components/display/BlockTooltip/BlockTooltip.types.ts
2
+ var tooltipPlacements = [
3
+ "top",
4
+ "bottom",
5
+ "left",
6
+ "right"
7
+ ];
8
+ //#endregion
9
+ export { tooltipPlacements };
10
+
11
+ //# sourceMappingURL=BlockTooltip.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockTooltip.types.js","names":[],"sources":["../../../../src/components/display/BlockTooltip/BlockTooltip.types.ts"],"sourcesContent":["import type { HTMLAttributes, ReactElement, ReactNode } from \"react\";\n\nexport const tooltipPlacements = [\"top\", \"bottom\", \"left\", \"right\"] as const;\n\nexport type BlockTooltipPlacement = (typeof tooltipPlacements)[number];\n\nexport interface BlockTooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, \"content\"> {\n /** Tooltip text. Keep it short and non-interactive — links and buttons belong in a menu or modal. */\n content: ReactNode;\n /** A single focusable element (button, link, input). It receives `aria-describedby`. */\n children: ReactElement<{ \"aria-describedby\"?: string }>;\n /** Preferred side; flips to the opposite side when it would leave the viewport. @default \"top\" */\n placement?: BlockTooltipPlacement;\n /** Hover delay before opening, in ms. Focus opens immediately. @default 300 */\n delay?: number;\n /** `sm` wraps at 200px, `md` at 280px. @default \"md\" */\n size?: \"sm\" | \"md\";\n /** Never show the tooltip. */\n disabled?: boolean;\n}\n"],"mappings":";AAEA,IAAa,oBAAoB;CAAC;CAAO;CAAU;CAAQ;AAAO"}
@@ -0,0 +1,4 @@
1
+ export { BlockTooltip } from "./BlockTooltip";
2
+ export { tooltipPlacements } from "./BlockTooltip.types";
3
+ export type { BlockTooltipPlacement, BlockTooltipProps } from "./BlockTooltip.types";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/display/BlockTooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from "./BlockBadge";
2
+ export * from "./BlockTooltip";
3
+ export * from "./BlockTable";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/display/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/display/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { BlockDividerProps } from "./BlockDivider.types";
2
+ /**
3
+ * Carved separator line. Horizontal dividers render an `<hr>`; vertical ones a
4
+ * `role="separator"`. A labelled divider reads its label instead of a separator.
5
+ */
6
+ export declare const BlockDivider: import("react").ForwardRefExoticComponent<BlockDividerProps & import("react").RefAttributes<HTMLElement>>;
7
+ //# sourceMappingURL=BlockDivider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockDivider.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/BlockDivider/BlockDivider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,YAAY,2GA8CvB,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { cx } from "../../../utils/cx.js";
2
+ import BlockDivider_module_default from "./BlockDivider.module.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region src/components/layout/BlockDivider/BlockDivider.tsx
6
+ /**
7
+ * Carved separator line. Horizontal dividers render an `<hr>`; vertical ones a
8
+ * `role="separator"`. A labelled divider reads its label instead of a separator.
9
+ */
10
+ var BlockDivider = forwardRef(function BlockDivider({ orientation = "horizontal", variant = "bevel", label, decorative = false, className, ...rest }, ref) {
11
+ const shared = {
12
+ "data-orientation": orientation,
13
+ "data-variant": variant,
14
+ className: cx(BlockDivider_module_default.divider, className)
15
+ };
16
+ if (label && orientation === "horizontal") return /* @__PURE__ */ jsxs("div", {
17
+ ref,
18
+ ...shared,
19
+ "data-labelled": "",
20
+ "aria-hidden": decorative || void 0,
21
+ ...rest,
22
+ children: [
23
+ /* @__PURE__ */ jsx("span", {
24
+ className: BlockDivider_module_default.line,
25
+ "aria-hidden": "true"
26
+ }),
27
+ /* @__PURE__ */ jsx("span", {
28
+ className: BlockDivider_module_default.label,
29
+ children: label
30
+ }),
31
+ /* @__PURE__ */ jsx("span", {
32
+ className: BlockDivider_module_default.line,
33
+ "aria-hidden": "true"
34
+ })
35
+ ]
36
+ });
37
+ if (orientation === "horizontal") return /* @__PURE__ */ jsx("hr", {
38
+ ref,
39
+ ...shared,
40
+ "aria-hidden": decorative || void 0,
41
+ ...rest
42
+ });
43
+ return /* @__PURE__ */ jsx("div", {
44
+ ref,
45
+ role: decorative ? "none" : "separator",
46
+ "aria-orientation": decorative ? void 0 : "vertical",
47
+ ...shared,
48
+ ...rest
49
+ });
50
+ });
51
+ //#endregion
52
+ export { BlockDivider };
53
+
54
+ //# sourceMappingURL=BlockDivider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockDivider.js","names":["styles"],"sources":["../../../../src/components/layout/BlockDivider/BlockDivider.tsx"],"sourcesContent":["import { forwardRef, type Ref } from \"react\";\nimport { cx } from \"../../../utils/cx\";\nimport styles from \"./BlockDivider.module.css\";\nimport type { BlockDividerProps } from \"./BlockDivider.types\";\n\n/**\n * Carved separator line. Horizontal dividers render an `<hr>`; vertical ones a\n * `role=\"separator\"`. A labelled divider reads its label instead of a separator.\n */\nexport const BlockDivider = forwardRef<HTMLElement, BlockDividerProps>(function BlockDivider(\n { orientation = \"horizontal\", variant = \"bevel\", label, decorative = false, className, ...rest },\n ref,\n) {\n const shared = {\n \"data-orientation\": orientation,\n \"data-variant\": variant,\n className: cx(styles.divider, className),\n };\n\n if (label && orientation === \"horizontal\") {\n return (\n <div\n ref={ref as Ref<HTMLDivElement>}\n {...shared}\n data-labelled=\"\"\n aria-hidden={decorative || undefined}\n {...rest}\n >\n <span className={styles.line} aria-hidden=\"true\" />\n <span className={styles.label}>{label}</span>\n <span className={styles.line} aria-hidden=\"true\" />\n </div>\n );\n }\n\n if (orientation === \"horizontal\") {\n return (\n <hr\n ref={ref as Ref<HTMLHRElement>}\n {...shared}\n aria-hidden={decorative || undefined}\n {...rest}\n />\n );\n }\n\n return (\n <div\n ref={ref as Ref<HTMLDivElement>}\n role={decorative ? \"none\" : \"separator\"}\n aria-orientation={decorative ? undefined : \"vertical\"}\n {...shared}\n {...rest}\n />\n );\n});\n"],"mappings":";;;;;;;;;AASA,IAAa,eAAe,WAA2C,SAAS,aAC9E,EAAE,cAAc,cAAc,UAAU,SAAS,OAAO,aAAa,OAAO,WAAW,GAAG,QAC1F,KACA;CACA,MAAM,SAAS;EACb,oBAAoB;EACpB,gBAAgB;EAChB,WAAW,GAAGA,4BAAO,SAAS,SAAS;CACzC;CAEA,IAAI,SAAS,gBAAgB,cAC3B,OACE,qBAAC,OAAD;EACO;EACL,GAAI;EACJ,iBAAc;EACd,eAAa,cAAc,KAAA;EAC3B,GAAI;EALN,UAAA;GAOE,oBAAC,QAAD;IAAM,WAAWA,4BAAO;IAAM,eAAY;GAAQ,CAAA;GAClD,oBAAC,QAAD;IAAM,WAAWA,4BAAO;IAAQ,UAAA;GAAY,CAAA;GAC5C,oBAAC,QAAD;IAAM,WAAWA,4BAAO;IAAM,eAAY;GAAQ,CAAA;EAC/C;;CAIT,IAAI,gBAAgB,cAClB,OACE,oBAAC,MAAD;EACO;EACL,GAAI;EACJ,eAAa,cAAc,KAAA;EAC3B,GAAI;CACL,CAAA;CAIL,OACE,oBAAC,OAAD;EACO;EACL,MAAM,aAAa,SAAS;EAC5B,oBAAkB,aAAa,KAAA,IAAY;EAC3C,GAAI;EACJ,GAAI;CACL,CAAA;AAEL,CAAC"}
@@ -0,0 +1,13 @@
1
+ //#region src/components/layout/BlockDivider/BlockDivider.module.css
2
+ var divider = "block-divider-7wQzM";
3
+ var line = "block-line-WiUib";
4
+ var label = "block-label-5tJ-t";
5
+ var BlockDivider_module_default = {
6
+ divider,
7
+ line,
8
+ label
9
+ };
10
+ //#endregion
11
+ export { BlockDivider_module_default as default, divider, label, line };
12
+
13
+ //# sourceMappingURL=BlockDivider.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockDivider.module.js","names":[],"sources":["../../../../src/components/layout/BlockDivider/BlockDivider.module.css"],"sourcesContent":[".divider {\n --divider-thickness: 4px;\n flex-shrink: 0;\n margin: 0;\n padding: 0;\n border: 0;\n color: var(--block-text-muted);\n}\n\n/* Horizontal / vertical lines share one look, drawn by .divider or .line. */\n.divider:not([data-labelled]),\n.line {\n background-color: var(--block-border);\n}\n\n.divider[data-orientation=\"horizontal\"]:not([data-labelled]),\n.line {\n width: 100%;\n height: var(--divider-thickness);\n}\n\n.divider[data-orientation=\"vertical\"] {\n align-self: stretch;\n width: var(--divider-thickness);\n min-height: 1em;\n}\n\n.divider[data-variant=\"bevel\"]:not([data-labelled]),\n.divider[data-variant=\"bevel\"] .line {\n background-color: var(--block-shadow-bevel-dark);\n box-shadow: inset -2px -2px 0 var(--block-shadow-bevel-light);\n}\n\n.divider[data-variant=\"line\"] {\n --divider-thickness: 2px;\n}\n\n.divider[data-variant=\"dashed\"]:not([data-labelled]),\n.divider[data-variant=\"dashed\"] .line {\n background-color: transparent;\n background-image: linear-gradient(90deg, var(--block-border) 50%, transparent 50%);\n background-size: 8px 100%;\n}\n\n.divider[data-orientation=\"vertical\"][data-variant=\"dashed\"] {\n background-image: linear-gradient(180deg, var(--block-border) 50%, transparent 50%);\n background-size: 100% 8px;\n}\n\n.divider[data-labelled] {\n display: flex;\n align-items: center;\n gap: var(--block-space-3);\n width: 100%;\n}\n\n.line {\n flex: 1;\n min-width: var(--block-space-4);\n}\n\n.label {\n flex-shrink: 0;\n font-family: var(--block-font-display);\n font-size: var(--block-font-size-sm);\n font-weight: var(--block-font-weight-bold);\n letter-spacing: var(--block-letter-spacing-wide);\n text-transform: uppercase;\n}\n"],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export declare const dividerVariants: readonly ["bevel", "line", "dashed"];
3
+ export type BlockDividerVariant = (typeof dividerVariants)[number];
4
+ export interface BlockDividerProps extends HTMLAttributes<HTMLElement> {
5
+ /** @default "horizontal" */
6
+ orientation?: "horizontal" | "vertical";
7
+ /** `bevel` is a carved groove, `line` a flat border, `dashed` a pixel dash. @default "bevel" */
8
+ variant?: BlockDividerVariant;
9
+ /** Text in the middle of a horizontal divider (e.g. "or"). */
10
+ label?: ReactNode;
11
+ /** Purely visual: hide it from assistive technology. */
12
+ decorative?: boolean;
13
+ }
14
+ //# sourceMappingURL=BlockDivider.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockDivider.types.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/BlockDivider/BlockDivider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,eAAO,MAAM,eAAe,sCAAuC,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,WAAW,CAAC;IACpE,4BAA4B;IAC5B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,gGAAgG;IAChG,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,8DAA8D;IAC9D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -0,0 +1,10 @@
1
+ //#region src/components/layout/BlockDivider/BlockDivider.types.ts
2
+ var dividerVariants = [
3
+ "bevel",
4
+ "line",
5
+ "dashed"
6
+ ];
7
+ //#endregion
8
+ export { dividerVariants };
9
+
10
+ //# sourceMappingURL=BlockDivider.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockDivider.types.js","names":[],"sources":["../../../../src/components/layout/BlockDivider/BlockDivider.types.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\n\nexport const dividerVariants = [\"bevel\", \"line\", \"dashed\"] as const;\n\nexport type BlockDividerVariant = (typeof dividerVariants)[number];\n\nexport interface BlockDividerProps extends HTMLAttributes<HTMLElement> {\n /** @default \"horizontal\" */\n orientation?: \"horizontal\" | \"vertical\";\n /** `bevel` is a carved groove, `line` a flat border, `dashed` a pixel dash. @default \"bevel\" */\n variant?: BlockDividerVariant;\n /** Text in the middle of a horizontal divider (e.g. \"or\"). */\n label?: ReactNode;\n /** Purely visual: hide it from assistive technology. */\n decorative?: boolean;\n}\n"],"mappings":";AAEA,IAAa,kBAAkB;CAAC;CAAS;CAAQ;AAAQ"}
@@ -0,0 +1,4 @@
1
+ export { BlockDivider } from "./BlockDivider";
2
+ export { dividerVariants } from "./BlockDivider.types";
3
+ export type { BlockDividerProps, BlockDividerVariant } from "./BlockDivider.types";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/BlockDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BlockStackProps } from "./BlockStack.types";
2
+ /** Flex layout helper that spaces children on the 4px token grid. */
3
+ export declare const BlockStack: import("react").ForwardRefExoticComponent<BlockStackProps & import("react").RefAttributes<HTMLElement>>;
4
+ //# sourceMappingURL=BlockStack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockStack.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/BlockStack/BlockStack.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qEAAqE;AACrE,eAAO,MAAM,UAAU,yGA8BrB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { cx } from "../../../utils/cx.js";
2
+ import BlockStack_module_default from "./BlockStack.module.js";
3
+ import { createElement, forwardRef } from "react";
4
+ //#region src/components/layout/BlockStack/BlockStack.tsx
5
+ /** Flex layout helper that spaces children on the 4px token grid. */
6
+ var BlockStack = forwardRef(function BlockStack({ direction = "column", gap = 3, align = "stretch", justify = "start", wrap = false, stackOnMobile = false, as = "div", className, children, ...rest }, ref) {
7
+ return createElement(as, {
8
+ ref,
9
+ "data-direction": direction,
10
+ "data-gap": gap,
11
+ "data-align": align,
12
+ "data-justify": justify,
13
+ "data-wrap": wrap || void 0,
14
+ "data-stack-mobile": stackOnMobile || void 0,
15
+ className: cx(BlockStack_module_default.stack, className),
16
+ ...rest
17
+ }, children);
18
+ });
19
+ //#endregion
20
+ export { BlockStack };
21
+
22
+ //# sourceMappingURL=BlockStack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockStack.js","names":["styles"],"sources":["../../../../src/components/layout/BlockStack/BlockStack.tsx"],"sourcesContent":["import { createElement, forwardRef } from \"react\";\nimport { cx } from \"../../../utils/cx\";\nimport styles from \"./BlockStack.module.css\";\nimport type { BlockStackProps } from \"./BlockStack.types\";\n\n/** Flex layout helper that spaces children on the 4px token grid. */\nexport const BlockStack = forwardRef<HTMLElement, BlockStackProps>(function BlockStack(\n {\n direction = \"column\",\n gap = 3,\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n stackOnMobile = false,\n as = \"div\",\n className,\n children,\n ...rest\n },\n ref,\n) {\n return createElement(\n as,\n {\n ref,\n \"data-direction\": direction,\n \"data-gap\": gap,\n \"data-align\": align,\n \"data-justify\": justify,\n \"data-wrap\": wrap || undefined,\n \"data-stack-mobile\": stackOnMobile || undefined,\n className: cx(styles.stack, className),\n ...rest,\n },\n children,\n );\n});\n"],"mappings":";;;;;AAMA,IAAa,aAAa,WAAyC,SAAS,WAC1E,EACE,YAAY,UACZ,MAAM,GACN,QAAQ,WACR,UAAU,SACV,OAAO,OACP,gBAAgB,OAChB,KAAK,OACL,WACA,UACA,GAAG,QAEL,KACA;CACA,OAAO,cACL,IACA;EACE;EACA,kBAAkB;EAClB,YAAY;EACZ,cAAc;EACd,gBAAgB;EAChB,aAAa,QAAQ,KAAA;EACrB,qBAAqB,iBAAiB,KAAA;EACtC,WAAW,GAAGA,0BAAO,OAAO,SAAS;EACrC,GAAG;CACL,GACA,QACF;AACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ //#region src/components/layout/BlockStack/BlockStack.module.css
2
+ var stack = "block-stack-z5qhc";
3
+ var BlockStack_module_default = { stack };
4
+ //#endregion
5
+ export { BlockStack_module_default as default, stack };
6
+
7
+ //# sourceMappingURL=BlockStack.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockStack.module.js","names":[],"sources":["../../../../src/components/layout/BlockStack/BlockStack.module.css"],"sourcesContent":[".stack {\n display: flex;\n flex-direction: column;\n min-width: 0;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.stack[data-direction=\"row\"] {\n flex-direction: row;\n}\n\n.stack[data-wrap] {\n flex-wrap: wrap;\n}\n\n.stack[data-gap=\"0\"] {\n gap: var(--block-space-0);\n}\n\n.stack[data-gap=\"1\"] {\n gap: var(--block-space-1);\n}\n\n.stack[data-gap=\"2\"] {\n gap: var(--block-space-2);\n}\n\n.stack[data-gap=\"3\"] {\n gap: var(--block-space-3);\n}\n\n.stack[data-gap=\"4\"] {\n gap: var(--block-space-4);\n}\n\n.stack[data-gap=\"5\"] {\n gap: var(--block-space-5);\n}\n\n.stack[data-gap=\"6\"] {\n gap: var(--block-space-6);\n}\n\n.stack[data-gap=\"8\"] {\n gap: var(--block-space-8);\n}\n\n.stack[data-gap=\"10\"] {\n gap: var(--block-space-10);\n}\n\n.stack[data-gap=\"12\"] {\n gap: var(--block-space-12);\n}\n\n.stack[data-align=\"start\"] {\n align-items: flex-start;\n}\n\n.stack[data-align=\"center\"] {\n align-items: center;\n}\n\n.stack[data-align=\"end\"] {\n align-items: flex-end;\n}\n\n.stack[data-align=\"stretch\"] {\n align-items: stretch;\n}\n\n.stack[data-align=\"baseline\"] {\n align-items: baseline;\n}\n\n.stack[data-justify=\"start\"] {\n justify-content: flex-start;\n}\n\n.stack[data-justify=\"center\"] {\n justify-content: center;\n}\n\n.stack[data-justify=\"end\"] {\n justify-content: flex-end;\n}\n\n.stack[data-justify=\"between\"] {\n justify-content: space-between;\n}\n\n.stack[data-justify=\"around\"] {\n justify-content: space-around;\n}\n\n@media (max-width: 767.98px) {\n .stack[data-stack-mobile] {\n flex-direction: column;\n }\n}\n"],"mappings":""}
@@ -0,0 +1,24 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ /** Spacing token steps (4px grid) accepted by `gap`. */
3
+ export declare const stackGaps: readonly [0, 1, 2, 3, 4, 5, 6, 8, 10, 12];
4
+ export type BlockStackGap = (typeof stackGaps)[number];
5
+ export type BlockStackAlign = "start" | "center" | "end" | "stretch" | "baseline";
6
+ export type BlockStackJustify = "start" | "center" | "end" | "between" | "around";
7
+ export interface BlockStackProps extends HTMLAttributes<HTMLElement> {
8
+ /** @default "column" */
9
+ direction?: "row" | "column";
10
+ /** Spacing token step between children (`3` = `--block-space-3` = 12px). @default 3 */
11
+ gap?: BlockStackGap;
12
+ /** Cross-axis alignment. @default "stretch" */
13
+ align?: BlockStackAlign;
14
+ /** Main-axis distribution. @default "start" */
15
+ justify?: BlockStackJustify;
16
+ /** Let children wrap onto new lines. */
17
+ wrap?: boolean;
18
+ /** Switch a row to a column below 768px (PRD §50 mobile). */
19
+ stackOnMobile?: boolean;
20
+ /** Render as a different element. @default "div" */
21
+ as?: "div" | "section" | "ul" | "ol" | "nav" | "header" | "footer";
22
+ children?: ReactNode;
23
+ }
24
+ //# sourceMappingURL=BlockStack.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockStack.types.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/BlockStack/BlockStack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,wDAAwD;AACxD,eAAO,MAAM,SAAS,2CAA4C,CAAC;AAEnE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;AAElF,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElF,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,WAAW,CAAC;IAClE,wBAAwB;IACxB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,uFAAuF;IACvF,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,wCAAwC;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6DAA6D;IAC7D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oDAAoD;IACpD,EAAE,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -0,0 +1,18 @@
1
+ //#region src/components/layout/BlockStack/BlockStack.types.ts
2
+ /** Spacing token steps (4px grid) accepted by `gap`. */
3
+ var stackGaps = [
4
+ 0,
5
+ 1,
6
+ 2,
7
+ 3,
8
+ 4,
9
+ 5,
10
+ 6,
11
+ 8,
12
+ 10,
13
+ 12
14
+ ];
15
+ //#endregion
16
+ export { stackGaps };
17
+
18
+ //# sourceMappingURL=BlockStack.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockStack.types.js","names":[],"sources":["../../../../src/components/layout/BlockStack/BlockStack.types.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from \"react\";\n\n/** Spacing token steps (4px grid) accepted by `gap`. */\nexport const stackGaps = [0, 1, 2, 3, 4, 5, 6, 8, 10, 12] as const;\n\nexport type BlockStackGap = (typeof stackGaps)[number];\n\nexport type BlockStackAlign = \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n\nexport type BlockStackJustify = \"start\" | \"center\" | \"end\" | \"between\" | \"around\";\n\nexport interface BlockStackProps extends HTMLAttributes<HTMLElement> {\n /** @default \"column\" */\n direction?: \"row\" | \"column\";\n /** Spacing token step between children (`3` = `--block-space-3` = 12px). @default 3 */\n gap?: BlockStackGap;\n /** Cross-axis alignment. @default \"stretch\" */\n align?: BlockStackAlign;\n /** Main-axis distribution. @default \"start\" */\n justify?: BlockStackJustify;\n /** Let children wrap onto new lines. */\n wrap?: boolean;\n /** Switch a row to a column below 768px (PRD §50 mobile). */\n stackOnMobile?: boolean;\n /** Render as a different element. @default \"div\" */\n as?: \"div\" | \"section\" | \"ul\" | \"ol\" | \"nav\" | \"header\" | \"footer\";\n children?: ReactNode;\n}\n"],"mappings":";;AAGA,IAAa,YAAY;CAAC;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAI;AAAE"}
@@ -0,0 +1,4 @@
1
+ export { BlockStack } from "./BlockStack";
2
+ export { stackGaps } from "./BlockStack.types";
3
+ export type { BlockStackAlign, BlockStackGap, BlockStackJustify, BlockStackProps, } from "./BlockStack.types";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/BlockStack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,YAAY,EACV,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
@@ -1,2 +1,4 @@
1
1
  export * from "./BlockPanel";
2
+ export * from "./BlockStack";
3
+ export * from "./BlockDivider";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { BlockPaginationProps } from "./BlockPagination.types";
2
+ /**
3
+ * Page navigation with previous / next arrows. The current page is a grass
4
+ * block marked `aria-current="page"`; long ranges collapse into ellipses.
5
+ */
6
+ export declare const BlockPagination: import("react").ForwardRefExoticComponent<BlockPaginationProps & import("react").RefAttributes<HTMLElement>>;
7
+ //# sourceMappingURL=BlockPagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlockPagination.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/BlockPagination/BlockPagination.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGpE;;;GAGG;AACH,eAAO,MAAM,eAAe,8GA+F3B,CAAC"}