@stackone/malachite 2.119.0 → 2.120.1

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/COMPONENTS.md CHANGED
@@ -17,7 +17,7 @@ The catalog of components exported from `@stackone/malachite`. **Reach for one o
17
17
  - **`SelectableCard`** — A card that is one option in a radio group — eyebrow, optional status tag, title, description, a count label and a top-right action slot. Use inside a `CardStrip`. Selection is controlled by the consumer: pass `selected`, which drives both the visual treatment and `aria-checked`. A selected card meets the sheet below the way a browser tab meets its toolbar — its bottom corners flare outward onto the strip’s rule — so its outline is one SVG path rather than borders, which would split into two lines at the tangent. `variant` picks the palette: `profile` (green), `library` (neutral) or `editing` (amber, for a profile with unsaved changes). `actions` stands in the card’s top-right corner, on the eyebrow row, and renders outside the control so a menu or icon button inside it stays clickable and keeps its own tab stop. Nothing else marks that corner: the flared outline, the tint and the green eyebrow already say which card is selected, so a radio there would only repeat them. `onDismiss` adds an x after `actions`, tinted like the eyebrow so it reads as part of the card — for discarding a draft card; `dismissDisabledReason` disables it and explains why in its tooltip. `isDefault` marks the card as the account default with a pin beside the title, named for assistive tech and tooltipped for everyone else — it belongs with the name it qualifies rather than among the actions, which read as things to press. `address` puts a one-line chip above the count for a copyable address such as a server URL: its `label` is cut short with an ellipsis, and its full `value` shows in a tooltip and is copied on click, without selecting the card. It takes the place of `description`, since the card has room for one or the other. For a row-shaped selectable use `Surface.Row` instead. _Key props:_ `value`, `title`, `titleIcon`, `isDefault`, `variant` (`profile` | `library` | `editing`), `eyebrow`, `status` (`label`, `type`, `tooltip`), `description`, `address` (`label`, `value`), `countLabel`, `actions`, `onDismiss` (`dismissLabel`, `dismissDisabledReason`), `selected`, `loading` (`loadingLabel`, `loadingHint`), `disabled`, `dimmed`, `onSelect`, `tabIndex`, `aria-label`, `className`, `style`.
18
18
  - **`CardStrip`** — Horizontally scrolling radio group of cards, with edge arrows that appear only when the content overflows, an edge fade, scroll-snap and arrow-key navigation matching `SegmentedControl`. Owns interaction only: it finds its options by looking for `role="radio"` descendants carrying `data-value`, so any such child works (`SelectableCard` emits both). Pass a non-selectable terminal tile as `CardStrip.AddTile` — it sits inside the group but outside the radio set, and must be a direct child or it scrolls with the cards. Use `leading` to pin a card that should not scroll away; the strip tells the cards which slot they are in, so a pinned `SelectableCard` drops the left rule the scrolling ones draw. A strip too narrow to show a card beside `leading` scrolls it with the cards rather than squeezing them, so the selected card always has its full width. Set `bleed` when the strip sits in a `PageLayout`: the strip stretches past the horizontal padding of the layout so its bottom rule runs the full width of the page card, while the cards stay aligned to the gutter. With no cards at all the strip degenerates to its pinned slots alone — no trough, no scroller and no arrows — with the add tile standing beside `leading` and taking `primary` emphasis automatically, since adding the first card is the only thing on offer. _Key props:_ `value`, `tone` (`profile` | `library` | `editing` — read off the selected card unless set), `onChange`, `children`, `leading`, `arrows`, `fadeEdges`, `snap`, `bleed`, `scrollSelectedIntoView`, `aria-label`, `aria-labelledby`, `className`, `style`. `CardStrip.AddTile`: `label`, `icon`, `onClick`, `disabled`, `emphasis` (`primary` | `secondary` — left to the strip unless set: `primary` while there are no cards, `secondary` once there are), `className`.
19
19
  - **`SplitScreenLayout`** — Two-pane full-screen layout (content + preview/aside) with an optional dismiss button.
20
- - **`PageLayout`** — Standard page chrome: a bordered card holding a breadcrumb bar, an optional alert strip, and a header block (subtitle, title + suffix, description) above the page body. Used as `PageLayout.Regular`; `PageLayout.Empty` is the chrome-only variant for pre-auth and error screens, with `headerActions` and `background` slots. `PageLayout.Column` is the capped, centred column that `contentWidth` uses, on its own; set `standalone` for a page with no layout around it. Actions are declared as data (`buttons`) rather than children, and any that do not fit collapse into an overflow `ActionMenu` via `OverflowRow`. A client-side-routed app must pass `renderLink` so crumbs and the back button go through its router instead of reloading the document. Both layouts render a `main` landmark, demoted via `role` when the app owns its own. Deliberately not a `Surface` — the page card is 16px and carries no shadow. _Key props:_ `PageLayout.Regular`: `breadcrumbLinks`, `breadcrumbActions`, `renderLink`, `title`, `titleSuffix`, `subtitle`, `description`, `buttons`, `loading`, `centered`, `noPadding`, `contentGap` (`small` | `medium` | `large` | `xlarge`, default `small`), `contentWidth` (`narrow`: caps and centres the header and body column for a single-column form), `alert`, `role`, `aria-label`, `aria-labelledby`, `className`, `style`. `PageLayout.Empty`: `title`, `centered`, `uniformPadding`, `headerActions`, `background`, `role`, `aria-label`, `aria-labelledby`, `className`, `style`. `PageLayout.Column`: `width` (`narrow`), `gap`, `standalone`, `className`.
20
+ - **`PageLayout`** — Standard page chrome: a bordered card holding a breadcrumb bar, an optional alert strip, and a header block (subtitle, title + suffix, description) above the page body. Used as `PageLayout.Regular`; `PageLayout.Empty` is the chrome-only variant for pre-auth and error screens, with `headerActions` and `background` slots. `PageLayout.Column` is the capped, centred column that `contentWidth` uses, on its own; set `standalone` for a page with no layout around it. Actions are declared as data (`buttons`) rather than children, and any that do not fit collapse into an overflow `ActionMenu` via `OverflowRow`. A client-side-routed app must pass `renderLink` so crumbs and the back button go through its router instead of reloading the document. Both layouts render a `main` landmark, demoted via `role` when the app owns its own. Deliberately not a `Surface` — the page card is 16px and carries no shadow. _Key props:_ `PageLayout.Regular`: `breadcrumbLinks`, `breadcrumbActions`, `renderLink`, `title`, `titleSuffix`, `subtitle`, `description`, `buttons`, `loading`, `centered`, `noPadding`, `contentGap` (`small` | `medium` | `large` | `xlarge`, default `small`), `contentWidth` (`narrow`: caps and centres the header and body column for a single-column form), `alert`, `role`, `aria-label`, `aria-labelledby`, `className`, `style`. `PageLayout.Empty`: `title`, `centered`, `uniformPadding`, `headerActions`, `background`, `backgroundImage` (a URL laid over the lower half of the content area, cover-fitted and multiplied onto the card so artwork drawn for white sinks into dark; `background` wins), `standalone` (adds the page inset and page background, for a screen rendered before the app frame), `role`, `aria-label`, `aria-labelledby`, `className`, `style`. `PageLayout.Column`: `width` (`narrow`), `gap`, `standalone`, `className`.
21
21
  - **`WizardLayout`** — Full-screen wizard scaffold: top bar (back button, right-aligned stepper, trailing slot), pinned `header` slot, centered scrolling content column, and a pinned footer (above sticky body content). `footerGlass` gives the footer a frosted translucent + backdrop-blur treatment. `banner` pins a page-wide notice under the top bar, above `header` and outside the content column, so a warning about the whole page is not squeezed to the column's width — pair it with `Alert layout="banner"`. `topBarSize="large"` draws a 60px top bar with 28px insets (52px and 16px below 640px). `footerAlign="content"` holds the footer to the content column, inside its gutter, so a full-width action lines up with the list above it. `reserveBack={false}` drops the square held for a hidden back button, so `leading` sits at the same inset as `trailing`; the default keeps it so `leading` does not move as the wizard steps. _Key props:_ `showBack`, `onBack`, `reserveBack`, `topBarSize` (`default` | `large`), `footerAlign` (`full` | `content`), `leading`, `stepper`, `trailing`, `banner`, `header`, `footer`, `footerGlass`, `center`, `contentWidth`, `minWidth`.
22
22
  - **`PageActions`** — A page's action buttons, collapsing into an overflow menu as the row narrows. `PageLayout.Regular` renders these from its `buttons` prop; import it directly when a page builds its own header block (e.g. one that scrolls the title away) so the collapse, the dividers and the href handling come with it rather than being hand-rolled. _Key props:_ `buttons` (`PageAction[]`).
23
23
  - **`Toolbar`** — Flat, opaque horizontal bar for a sub-header / filter row (e.g. a Search). Owns its chrome — an opaque ground (`card-background`, or the sunken page ground with `surface="page"` for a bar above a card), so it can pin over scrolling content, plus an optional bottom `divider` — so consumers don’t hand-roll background/border tokens. Its `TOOLBAR_FILTER_WIDTH_PX` / `TOOLBAR_FILTER_MIN_WIDTH_PX` / `TOOLBAR_FILL_BASIS_PX` / `TOOLBAR_FILL_MIN_WIDTH_PX` are exported so a control outside the bar can line up with one inside it without re-typing the number. `sticky` pins it to the top of its scroll container; any other positioning is left to the consumer, as is the gutter when `padding="none"` — use that when the bar must sit flush with the content it pins over. `layout="filters"` makes it own the layout too, which consumers were each re-deriving and getting wrong the same way: a `flex: 1` search with no floor collapses to nothing on a narrow viewport, and a row that cannot wrap runs off the page. Compose it as `Toolbar.Fill` for the search and `Toolbar.Item` per filter, as flat siblings; `grow={false}` stops a slot growing past its basis, for a row that already spaces its children, though it can still shrink toward its `minWidth`. The row packs greedily from its basis widths and each line's spare space is shared out by grow factor, which is deliberately lopsided: the search outweighs the filters a hundred to one, so a shared line leaves them at their 200px while a filter left alone on a wrapped line grows into the whole width instead of stranding beside a gap. A filter drops to the next line once its full 200px basis will not fit, and the filters sharing a line then compress toward a 160px floor. A search and a filter are laid out differently rather than uniformly, because a search field's useful width is "as much as you can spare" where a filter's is the width of a value. _Key props:_ `divider`, `padding` (`none` | `compact` | `default`), `layout` (`plain` | `filters`), `surface` (`card` | `page` — `page` paints the sunken page ground, for a bar that sits above a card rather than inside it), `sticky` (pins it to the top of its scroll container above the rows under it), `className`, `style`. `Fill`: `minWidth`. `Item`: `width`, `minWidth`, `grow`.
@@ -1,8 +1,9 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { useRef as f, useId as g } from "react";
3
- import { WORDMARK_VIEW_BOX as u, MARK_TOP_PATH as _, MARK_BOTTOM_PATH as b, MARK_LEFT_PATH as R, MARK_RIGHT_PATH as T, WORDMARK_TEXT_PATH as y } from "./stackOneWordmarkPaths.js";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { useRef as A, useId as g } from "react";
3
+ import { PAGE_BACKGROUND as p } from "./PageLayout/constants.js";
4
+ import { WORDMARK_VIEW_BOX as _, MARK_TOP_PATH as u, MARK_BOTTOM_PATH as b, MARK_LEFT_PATH as R, MARK_RIGHT_PATH as T, WORDMARK_TEXT_PATH as y } from "./stackOneWordmarkPaths.js";
4
5
  import { useAdoptedStyleSheet as C } from "./useAdoptedStyleSheet.js";
5
- const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachite-loading-screen-scan", o = "malachite-loading-screen-band", c = 40, K = `
6
+ const l = 164, E = 21, x = 4, K = 28, r = "#00AF66", s = "#285C4D", d = "malachite-loading-screen-scan", o = "malachite-loading-screen-band", c = 40, v = `
6
7
  @keyframes ${d} {
7
8
  from { transform: translateX(-100%); }
8
9
  to { transform: translateX(${100 / (c / 100)}%); }
@@ -22,23 +23,23 @@ const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachi
22
23
  animation: none;
23
24
  width: 100%;
24
25
  }
25
- }`, m = "var(--malachite-card-sunken-background, rgb(250, 250, 250))", M = "var(--malachite-card-subtle-divider, rgb(241, 241, 241))", h = `color-mix(in srgb, var(--malachite-text-primary, rgb(10, 10, 10)) 12%, ${m})`, I = ({
26
- "aria-label": p = "Loading",
26
+ }`, M = "var(--malachite-card-subtle-divider, rgb(241, 241, 241))", m = `color-mix(in srgb, var(--malachite-text-primary, rgb(10, 10, 10)) 12%, ${p})`, S = ({
27
+ "aria-label": h = "Loading",
27
28
  "aria-labelledby": i,
28
- className: A = ""
29
+ className: f = ""
29
30
  }) => {
30
- const n = f(null);
31
- C(n, K, "malachite-loading-screen-keyframes");
32
- const t = `mal-loading-screen-${g().replace(/[^a-zA-Z0-9_-]/g, "")}`;
33
- return /* @__PURE__ */ a(
31
+ const n = A(null);
32
+ C(n, v, "malachite-loading-screen-keyframes");
33
+ const a = `mal-loading-screen-${g().replace(/[^a-zA-Z0-9_-]/g, "")}`;
34
+ return /* @__PURE__ */ t(
34
35
  "div",
35
36
  {
36
37
  ref: n,
37
38
  role: "progressbar",
38
39
  "aria-busy": !0,
39
- "aria-label": i === void 0 ? p : void 0,
40
+ "aria-label": i === void 0 ? h : void 0,
40
41
  "aria-labelledby": i,
41
- className: A,
42
+ className: f,
42
43
  style: {
43
44
  position: "fixed",
44
45
  inset: 0,
@@ -46,25 +47,25 @@ const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachi
46
47
  flexDirection: "column",
47
48
  alignItems: "center",
48
49
  justifyContent: "center",
49
- gap: x,
50
- backgroundColor: m
50
+ gap: K,
51
+ backgroundColor: p
51
52
  },
52
53
  children: [
53
- /* @__PURE__ */ a(
54
+ /* @__PURE__ */ t(
54
55
  "svg",
55
56
  {
56
- viewBox: u,
57
+ viewBox: _,
57
58
  width: l,
58
59
  height: E,
59
60
  fill: "none",
60
61
  "aria-hidden": !0,
61
62
  style: { color: "var(--malachite-text-primary, rgb(10, 10, 10))" },
62
63
  children: [
63
- /* @__PURE__ */ a("defs", { children: [
64
- /* @__PURE__ */ a(
64
+ /* @__PURE__ */ t("defs", { children: [
65
+ /* @__PURE__ */ t(
65
66
  "linearGradient",
66
67
  {
67
- id: `${t}-top`,
68
+ id: `${a}-top`,
68
69
  x1: "133.334",
69
70
  y1: "20.1114",
70
71
  x2: "66.667",
@@ -76,10 +77,10 @@ const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachi
76
77
  ]
77
78
  }
78
79
  ),
79
- /* @__PURE__ */ a(
80
+ /* @__PURE__ */ t(
80
81
  "linearGradient",
81
82
  {
82
- id: `${t}-bottom`,
83
+ id: `${a}-bottom`,
83
84
  x1: "66.667",
84
85
  y1: "97.8888",
85
86
  x2: "133.334",
@@ -92,13 +93,13 @@ const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachi
92
93
  }
93
94
  )
94
95
  ] }),
95
- /* @__PURE__ */ e("path", { "data-malachite-shape": "", d: _, fill: `url(#${t}-top)` }),
96
+ /* @__PURE__ */ e("path", { "data-malachite-shape": "", d: u, fill: `url(#${a}-top)` }),
96
97
  /* @__PURE__ */ e(
97
98
  "path",
98
99
  {
99
100
  "data-malachite-shape": "",
100
101
  d: b,
101
- fill: `url(#${t}-bottom)`
102
+ fill: `url(#${a}-bottom)`
102
103
  }
103
104
  ),
104
105
  /* @__PURE__ */ e("path", { "data-malachite-shape": "", d: R, fill: r }),
@@ -114,10 +115,10 @@ const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachi
114
115
  position: "relative",
115
116
  overflow: "hidden",
116
117
  width: l,
117
- height: v,
118
+ height: x,
118
119
  borderRadius: 999,
119
120
  backgroundColor: M,
120
- backgroundImage: `linear-gradient(${h}, ${h})`
121
+ backgroundImage: `linear-gradient(${m}, ${m})`
121
122
  },
122
123
  children: /* @__PURE__ */ e("div", { className: o })
123
124
  }
@@ -127,7 +128,7 @@ const l = 164, E = 21, v = 4, x = 28, r = "#00AF66", s = "#285C4D", d = "malachi
127
128
  );
128
129
  };
129
130
  export {
130
- I as LoadingScreen,
131
- I as default
131
+ S as LoadingScreen,
132
+ S as default
132
133
  };
133
134
  //# sourceMappingURL=LoadingScreen.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingScreen.js","sources":["../../src/components/LoadingScreen.tsx"],"sourcesContent":["import React, { useId, useRef } from 'react';\nimport {\n MARK_BOTTOM_PATH,\n MARK_LEFT_PATH,\n MARK_RIGHT_PATH,\n MARK_TOP_PATH,\n WORDMARK_TEXT_PATH,\n WORDMARK_VIEW_BOX,\n} from './stackOneWordmarkPaths';\nimport { useAdoptedStyleSheet } from './useAdoptedStyleSheet';\n\nexport interface LoadingScreenProps {\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n}\n\nconst WIDTH_PX = 164;\nconst WORDMARK_HEIGHT_PX = 21;\nconst BAR_HEIGHT_PX = 4;\nconst GAP_PX = 28;\n\n// The brand mark's own colours, fixed like Avatar's placeholder logo: StackOne's mark looks\n// the same in every theme. Only the lettering follows the theme.\nconst MARK_GREEN = '#00AF66';\nconst MARK_SHADE = '#285C4D';\n\nconst KEYFRAME_NAME = 'malachite-loading-screen-scan';\nconst BAND_CLASS = 'malachite-loading-screen-band';\nconst BAND_WIDTH_PERCENT = 40;\n// A media query cannot override an inline style, so the band is styled here. Reduced motion\n// stops the scan at full width: a band frozen part way would read as progress.\nconst KEYFRAMES_CSS = `\n@keyframes ${KEYFRAME_NAME} {\n from { transform: translateX(-100%); }\n to { transform: translateX(${100 / (BAND_WIDTH_PERCENT / 100)}%); }\n}\n.${BAND_CLASS} {\n position: absolute;\n top: 0;\n left: 0;\n width: ${BAND_WIDTH_PERCENT}%;\n height: 100%;\n border-radius: 999px;\n background-color: var(--malachite-accent-background, rgb(0, 175, 102));\n animation: ${KEYFRAME_NAME} 1.1s ease-in-out infinite alternate;\n}\n@media (prefers-reduced-motion: reduce) {\n .${BAND_CLASS} {\n animation: none;\n width: 100%;\n }\n}`;\n\nconst PAGE_BACKGROUND = 'var(--malachite-card-sunken-background, rgb(250, 250, 250))';\nconst TRACK_FALLBACK = 'var(--malachite-card-subtle-divider, rgb(241, 241, 241))';\nconst TRACK_MIX = `color-mix(in srgb, var(--malachite-text-primary, rgb(10, 10, 10)) 12%, ${PAGE_BACKGROUND})`;\n\n/**\n * The whole viewport while an app has nothing to show yet: the StackOne wordmark over a bar\n * scanning back and forth, on the page background. It is the screen unified-cloud paints before\n * its bundle loads, so a page that hands over to it, or from it, reads as one wait.\n */\nconst LoadingScreen: React.FC<LoadingScreenProps> = ({\n 'aria-label': ariaLabel = 'Loading',\n 'aria-labelledby': ariaLabelledBy,\n className = '',\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n useAdoptedStyleSheet(ref, KEYFRAMES_CSS, 'malachite-loading-screen-keyframes');\n const gradientId = `mal-loading-screen-${useId().replace(/[^a-zA-Z0-9_-]/g, '')}`;\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-busy\n aria-label={ariaLabelledBy === undefined ? ariaLabel : undefined}\n aria-labelledby={ariaLabelledBy}\n className={className}\n style={{\n position: 'fixed',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: GAP_PX,\n backgroundColor: PAGE_BACKGROUND,\n }}\n >\n <svg\n viewBox={WORDMARK_VIEW_BOX}\n width={WIDTH_PX}\n height={WORDMARK_HEIGHT_PX}\n fill=\"none\"\n aria-hidden\n // The lettering takes `currentColor` from malachite's icon rule; the mark opts out.\n style={{ color: 'var(--malachite-text-primary, rgb(10, 10, 10))' }}\n >\n <defs>\n <linearGradient\n id={`${gradientId}-top`}\n x1=\"133.334\"\n y1=\"20.1114\"\n x2=\"66.667\"\n y2=\"20.1114\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor={MARK_GREEN} />\n <stop offset=\"1\" stopColor={MARK_SHADE} />\n </linearGradient>\n <linearGradient\n id={`${gradientId}-bottom`}\n x1=\"66.667\"\n y1=\"97.8888\"\n x2=\"133.334\"\n y2=\"97.8888\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor={MARK_GREEN} />\n <stop offset=\"1\" stopColor={MARK_SHADE} />\n </linearGradient>\n </defs>\n <path data-malachite-shape=\"\" d={MARK_TOP_PATH} fill={`url(#${gradientId}-top)`} />\n <path\n data-malachite-shape=\"\"\n d={MARK_BOTTOM_PATH}\n fill={`url(#${gradientId}-bottom)`}\n />\n <path data-malachite-shape=\"\" d={MARK_LEFT_PATH} fill={MARK_GREEN} />\n <path data-malachite-shape=\"\" d={MARK_RIGHT_PATH} fill={MARK_GREEN} />\n <path d={WORDMARK_TEXT_PATH} fill=\"currentColor\" />\n </svg>\n <div\n style={{\n position: 'relative',\n overflow: 'hidden',\n width: WIDTH_PX,\n height: BAR_HEIGHT_PX,\n borderRadius: 999,\n backgroundColor: TRACK_FALLBACK,\n backgroundImage: `linear-gradient(${TRACK_MIX}, ${TRACK_MIX})`,\n }}\n >\n <div className={BAND_CLASS} />\n </div>\n </div>\n );\n};\n\nexport default LoadingScreen;\nexport { LoadingScreen };\n"],"names":["WIDTH_PX","WORDMARK_HEIGHT_PX","BAR_HEIGHT_PX","GAP_PX","MARK_GREEN","MARK_SHADE","KEYFRAME_NAME","BAND_CLASS","BAND_WIDTH_PERCENT","KEYFRAMES_CSS","PAGE_BACKGROUND","TRACK_FALLBACK","TRACK_MIX","LoadingScreen","ariaLabel","ariaLabelledBy","className","ref","useRef","useAdoptedStyleSheet","gradientId","useId","jsxs","WORDMARK_VIEW_BOX","jsx","MARK_TOP_PATH","MARK_BOTTOM_PATH","MARK_LEFT_PATH","MARK_RIGHT_PATH","WORDMARK_TEXT_PATH"],"mappings":";;;;AAiBA,MAAMA,IAAW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AAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAErD,gBAAAL;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,OAAO;AAAA,cACH,UAAU;AAAA,cACV,UAAU;AAAA,cACV,OAAOxB;AAAA,cACP,QAAQE;AAAA,cACR,cAAc;AAAA,cACd,iBAAiBS;AAAA,cACjB,iBAAiB,mBAAmBC,CAAS,KAAKA,CAAS;AAAA,YAAA;AAAA,YAG/D,UAAA,gBAAAY,EAAC,OAAA,EAAI,WAAWjB,EAAA,CAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MAChC;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
1
+ {"version":3,"file":"LoadingScreen.js","sources":["../../src/components/LoadingScreen.tsx"],"sourcesContent":["import React, { useId, useRef } from 'react';\nimport { PAGE_BACKGROUND } from './PageLayout/constants';\nimport {\n MARK_BOTTOM_PATH,\n MARK_LEFT_PATH,\n MARK_RIGHT_PATH,\n MARK_TOP_PATH,\n WORDMARK_TEXT_PATH,\n WORDMARK_VIEW_BOX,\n} from './stackOneWordmarkPaths';\nimport { useAdoptedStyleSheet } from './useAdoptedStyleSheet';\n\nexport interface LoadingScreenProps {\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n}\n\nconst WIDTH_PX = 164;\nconst WORDMARK_HEIGHT_PX = 21;\nconst BAR_HEIGHT_PX = 4;\nconst GAP_PX = 28;\n\n// The brand mark's own colours, fixed like Avatar's placeholder logo: StackOne's mark looks\n// the same in every theme. Only the lettering follows the theme.\nconst MARK_GREEN = '#00AF66';\nconst MARK_SHADE = '#285C4D';\n\nconst KEYFRAME_NAME = 'malachite-loading-screen-scan';\nconst BAND_CLASS = 'malachite-loading-screen-band';\nconst BAND_WIDTH_PERCENT = 40;\n// A media query cannot override an inline style, so the band is styled here. Reduced motion\n// stops the scan at full width: a band frozen part way would read as progress.\nconst KEYFRAMES_CSS = `\n@keyframes ${KEYFRAME_NAME} {\n from { transform: translateX(-100%); }\n to { transform: translateX(${100 / (BAND_WIDTH_PERCENT / 100)}%); }\n}\n.${BAND_CLASS} {\n position: absolute;\n top: 0;\n left: 0;\n width: ${BAND_WIDTH_PERCENT}%;\n height: 100%;\n border-radius: 999px;\n background-color: var(--malachite-accent-background, rgb(0, 175, 102));\n animation: ${KEYFRAME_NAME} 1.1s ease-in-out infinite alternate;\n}\n@media (prefers-reduced-motion: reduce) {\n .${BAND_CLASS} {\n animation: none;\n width: 100%;\n }\n}`;\n\nconst TRACK_FALLBACK = 'var(--malachite-card-subtle-divider, rgb(241, 241, 241))';\nconst TRACK_MIX = `color-mix(in srgb, var(--malachite-text-primary, rgb(10, 10, 10)) 12%, ${PAGE_BACKGROUND})`;\n\n/**\n * The whole viewport while an app has nothing to show yet: the StackOne wordmark over a bar\n * scanning back and forth, on the page background. It is the screen unified-cloud paints before\n * its bundle loads, so a page that hands over to it, or from it, reads as one wait.\n */\nconst LoadingScreen: React.FC<LoadingScreenProps> = ({\n 'aria-label': ariaLabel = 'Loading',\n 'aria-labelledby': ariaLabelledBy,\n className = '',\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n useAdoptedStyleSheet(ref, KEYFRAMES_CSS, 'malachite-loading-screen-keyframes');\n const gradientId = `mal-loading-screen-${useId().replace(/[^a-zA-Z0-9_-]/g, '')}`;\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-busy\n aria-label={ariaLabelledBy === undefined ? ariaLabel : undefined}\n aria-labelledby={ariaLabelledBy}\n className={className}\n style={{\n position: 'fixed',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n gap: GAP_PX,\n backgroundColor: PAGE_BACKGROUND,\n }}\n >\n <svg\n viewBox={WORDMARK_VIEW_BOX}\n width={WIDTH_PX}\n height={WORDMARK_HEIGHT_PX}\n fill=\"none\"\n aria-hidden\n // The lettering takes `currentColor` from malachite's icon rule; the mark opts out.\n style={{ color: 'var(--malachite-text-primary, rgb(10, 10, 10))' }}\n >\n <defs>\n <linearGradient\n id={`${gradientId}-top`}\n x1=\"133.334\"\n y1=\"20.1114\"\n x2=\"66.667\"\n y2=\"20.1114\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor={MARK_GREEN} />\n <stop offset=\"1\" stopColor={MARK_SHADE} />\n </linearGradient>\n <linearGradient\n id={`${gradientId}-bottom`}\n x1=\"66.667\"\n y1=\"97.8888\"\n x2=\"133.334\"\n y2=\"97.8888\"\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor={MARK_GREEN} />\n <stop offset=\"1\" stopColor={MARK_SHADE} />\n </linearGradient>\n </defs>\n <path data-malachite-shape=\"\" d={MARK_TOP_PATH} fill={`url(#${gradientId}-top)`} />\n <path\n data-malachite-shape=\"\"\n d={MARK_BOTTOM_PATH}\n fill={`url(#${gradientId}-bottom)`}\n />\n <path data-malachite-shape=\"\" d={MARK_LEFT_PATH} fill={MARK_GREEN} />\n <path data-malachite-shape=\"\" d={MARK_RIGHT_PATH} fill={MARK_GREEN} />\n <path d={WORDMARK_TEXT_PATH} fill=\"currentColor\" />\n </svg>\n <div\n style={{\n position: 'relative',\n overflow: 'hidden',\n width: WIDTH_PX,\n height: BAR_HEIGHT_PX,\n borderRadius: 999,\n backgroundColor: TRACK_FALLBACK,\n backgroundImage: `linear-gradient(${TRACK_MIX}, ${TRACK_MIX})`,\n }}\n >\n <div className={BAND_CLASS} />\n </div>\n </div>\n );\n};\n\nexport default LoadingScreen;\nexport { LoadingScreen };\n"],"names":["WIDTH_PX","WORDMARK_HEIGHT_PX","BAR_HEIGHT_PX","GAP_PX","MARK_GREEN","MARK_SHADE","KEYFRAME_NAME","BAND_CLASS","BAND_WIDTH_PERCENT","KEYFRAMES_CSS","TRACK_FALLBACK","TRACK_MIX","PAGE_BACKGROUND","LoadingScreen","ariaLabel","ariaLabelledBy","className","ref","useRef","useAdoptedStyleSheet","gradientId","useId","jsxs","WORDMARK_VIEW_BOX","jsx","MARK_TOP_PATH","MARK_BOT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AAA,cACpE,gBAAAoB,EAAC,QAAA,EAAK,GAAGK,GAAoB,MAAK,eAAA,CAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAErD,gBAAAL;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,OAAO;AAAA,cACH,UAAU;AAAA,cACV,UAAU;AAAA,cACV,OAAOxB;AAAA,cACP,QAAQE;AAAA,cACR,cAAc;AAAA,cACd,iBAAiBQ;AAAA,cACjB,iBAAiB,mBAAmBC,CAAS,KAAKA,CAAS;AAAA,YAAA;AAAA,YAG/D,UAAA,gBAAAa,EAAC,OAAA,EAAI,WAAWjB,EAAA,CAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MAChC;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
@@ -1,12 +1,14 @@
1
- const a = "var(--malachite-radius-xxxl, 16px)", o = "w-full overflow-hidden bg-[var(--malachite-card-background)] border border-solid border-[var(--malachite-card-border)]", c = "border-b border-solid border-[var(--malachite-card-border)]", e = 56, d = "calc(100vh - 16px)", t = "calc(100vh - 136px)", r = "--malachite-page-content-inset", l = `var(${r}, 0px)`;
1
+ const a = "var(--malachite-radius-xxxl, 16px)", c = "w-full overflow-hidden bg-[var(--malachite-card-background)] border border-solid border-[var(--malachite-card-border)]", o = "border-b border-solid border-[var(--malachite-card-border)]", e = 56, t = 8, d = "var(--malachite-card-sunken-background, rgb(250, 250, 250))", n = "calc(100vh - 16px)", E = "calc(100vh - 136px)", r = "--malachite-page-content-inset", s = `var(${r}, 0px)`;
2
2
  export {
3
- o as CARD_CLASSES,
4
- d as CARD_MIN_HEIGHT,
3
+ c as CARD_CLASSES,
4
+ n as CARD_MIN_HEIGHT,
5
5
  a as CARD_RADIUS,
6
- l as CONTENT_INSET,
6
+ s as CONTENT_INSET,
7
7
  r as CONTENT_INSET_VAR,
8
- t as CONTENT_MIN_HEIGHT,
9
- c as DIVIDER_CLASSES,
10
- e as HEADER_HEIGHT
8
+ E as CONTENT_MIN_HEIGHT,
9
+ o as DIVIDER_CLASSES,
10
+ e as HEADER_HEIGHT,
11
+ d as PAGE_BACKGROUND,
12
+ t as PAGE_INSET
11
13
  };
12
14
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/components/PageLayout/constants.ts"],"sourcesContent":["// Not a <Surface>: that is a 14px card and paints a box-shadow this page card must not have.\nexport const CARD_RADIUS = 'var(--malachite-radius-xxxl, 16px)';\nexport const CARD_CLASSES =\n 'w-full overflow-hidden bg-[var(--malachite-card-background)] border border-solid border-[var(--malachite-card-border)]';\nexport const DIVIDER_CLASSES = 'border-b border-solid border-[var(--malachite-card-border)]';\n\n// 56, not Figma's 60: the app sidebar's divider sits at 9 + 56 and this header's must land\n// on the same line (8px page inset + 1px card border + 56). Move both together or neither.\nexport const HEADER_HEIGHT = 56;\nexport const CARD_MIN_HEIGHT = 'calc(100vh - 16px)';\n// 136 is not derivable from the constants above: the extra 64px is app chrome above the card.\nexport const CONTENT_MIN_HEIGHT = 'calc(100vh - 136px)';\n\n// Set by RegularLayout to its own horizontal content padding, so a `bleed` child can pull\n// itself out to the page card's edges without knowing which layout variant wraps it.\nexport const CONTENT_INSET_VAR = '--malachite-page-content-inset';\nexport const CONTENT_INSET = `var(${CONTENT_INSET_VAR}, 0px)`;\n"],"names":["CARD_RADIUS","CARD_CLASSES","DIVIDER_CLASSES","HEADER_HEIGHT","CARD_MIN_HEIGHT","CONTENT_MIN_HEIGHT","CONTENT_INSET_VAR","CONTENT_INSET"],"mappings":"AACO,MAAMA,IAAc,sCACdC,IACT,0HACSC,IAAkB,+DAIlBC,IAAgB,IAChBC,IAAkB,sBAElBC,IAAqB,uBAIrBC,IAAoB,kCACpBC,IAAgB,OAAOD,CAAiB;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/components/PageLayout/constants.ts"],"sourcesContent":["// Not a <Surface>: that is a 14px card and paints a box-shadow this page card must not have.\nexport const CARD_RADIUS = 'var(--malachite-radius-xxxl, 16px)';\nexport const CARD_CLASSES =\n 'w-full overflow-hidden bg-[var(--malachite-card-background)] border border-solid border-[var(--malachite-card-border)]';\nexport const DIVIDER_CLASSES = 'border-b border-solid border-[var(--malachite-card-border)]';\n\n// 56, not Figma's 60: the app sidebar's divider sits at 9 + 56 and this header's must land\n// on the same line (8px page inset + 1px card border + 56). Move both together or neither.\nexport const HEADER_HEIGHT = 56;\nexport const PAGE_INSET = 8;\nexport const PAGE_BACKGROUND = 'var(--malachite-card-sunken-background, rgb(250, 250, 250))';\nexport const CARD_MIN_HEIGHT = `calc(100vh - ${PAGE_INSET * 2}px)`;\n// 136 is not derivable from the constants above: the extra 64px is app chrome above the card.\nexport const CONTENT_MIN_HEIGHT = 'calc(100vh - 136px)';\n\n// Set by RegularLayout to its own horizontal content padding, so a `bleed` child can pull\n// itself out to the page card's edges without knowing which layout variant wraps it.\nexport const CONTENT_INSET_VAR = '--malachite-page-content-inset';\nexport const CONTENT_INSET = `var(${CONTENT_INSET_VAR}, 0px)`;\n"],"names":["CARD_RADIUS","CARD_CLASSES","DIVIDER_CLASSES","HEADER_HEIGHT","PAGE_INSET","PAGE_BACKGROUND","CARD_MIN_HEIGHT","CONTENT_MIN_HEIGHT","CONTENT_INSET_VAR","CONTENT_INSET"],"mappings":"AACO,MAAMA,IAAc,sCACdC,IACT,0HACSC,IAAkB,+DAIlBC,IAAgB,IAChBC,IAAa,GACbC,IAAkB,+DAClBC,IAAkB,sBAElBC,IAAqB,uBAIrBC,IAAoB,kCACpBC,IAAgB,OAAOD,CAAiB;"}
@@ -0,0 +1,5 @@
1
+ const c = (r) => `url("${r.replace(/[\\"]/g, "\\$&").replace(/[\0-\x1f\x7f]/g, (e) => `\\${e.charCodeAt(0).toString(16)} `)}")`;
2
+ export {
3
+ c as cssUrl
4
+ };
5
+ //# sourceMappingURL=cssUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cssUrl.js","sources":["../../../src/components/PageLayout/cssUrl.ts"],"sourcesContent":["export const cssUrl = (url: string): string =>\n `url(\"${url\n .replace(/[\\\\\"]/g, '\\\\$&')\n .replace(/[\\0-\\x1f\\x7f]/g, (c) => `\\\\${c.charCodeAt(0).toString(16)} `)}\")`;\n"],"names":["cssUrl","url","c"],"mappings":"AAAO,MAAMA,IAAS,CAACC,MACnB,QAAQA,EACH,QAAQ,UAAU,MAAM,EACxB,QAAQ,kBAAkB,CAACC,MAAM,KAAKA,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC;"}
@@ -1,41 +1,43 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import E from "../Typography/Text.js";
3
- import { CARD_MIN_HEIGHT as b, CARD_RADIUS as I, CARD_CLASSES as N, HEADER_HEIGHT as f, DIVIDER_CLASSES as v, CONTENT_MIN_HEIGHT as H } from "./constants.js";
4
- const u = ({
2
+ import N from "../Typography/Text.js";
3
+ import { CARD_MIN_HEIGHT as u, CARD_RADIUS as v, CARD_CLASSES as g, HEADER_HEIGHT as y, DIVIDER_CLASSES as I, CONTENT_MIN_HEIGHT as x, PAGE_BACKGROUND as A, PAGE_INSET as S } from "./constants.js";
4
+ import { cssUrl as _ } from "./cssUrl.js";
5
+ const T = ({
5
6
  title: i,
6
7
  children: s,
7
8
  centered: n = !1,
8
9
  uniformPadding: l = !1,
9
- headerActions: r,
10
+ headerActions: o,
10
11
  background: t,
11
- role: d,
12
- "aria-label": m,
13
- "aria-labelledby": c,
14
- className: h = "",
15
- style: o
12
+ backgroundImage: r,
13
+ standalone: c = !1,
14
+ role: m,
15
+ "aria-label": b,
16
+ "aria-labelledby": h,
17
+ className: p = "",
18
+ style: E
16
19
  }) => {
17
- const p = l ? "8px" : n ? "5vh 14vw" : "40px";
18
- return /* @__PURE__ */ a(
20
+ const f = l ? "8px" : n ? "5vh 14vw" : "40px", d = /* @__PURE__ */ a(
19
21
  "main",
20
22
  {
21
- className: `${N} ${h}`,
22
- style: { borderRadius: I, minHeight: b, ...o },
23
- role: d,
24
- "aria-label": m,
25
- "aria-labelledby": c,
23
+ className: `${g} ${p}`,
24
+ style: { borderRadius: v, minHeight: u, ...E },
25
+ role: m,
26
+ "aria-label": b,
27
+ "aria-labelledby": h,
26
28
  children: [
27
29
  /* @__PURE__ */ a(
28
30
  "div",
29
31
  {
30
- className: `flex items-center justify-between gap-4 ${v}`,
32
+ className: `flex items-center justify-between gap-4 ${I}`,
31
33
  style: {
32
- height: f,
34
+ height: y,
33
35
  paddingInlineStart: l ? 8 : 28,
34
36
  paddingInlineEnd: l ? 8 : 16
35
37
  },
36
38
  children: [
37
- /* @__PURE__ */ e("div", { className: "min-w-0", children: i ? /* @__PURE__ */ e(E, { fontWeight: "bold", children: i }) : null }),
38
- r
39
+ /* @__PURE__ */ e("div", { className: "min-w-0", children: i ? /* @__PURE__ */ e(N, { fontWeight: "bold", children: i }) : null }),
40
+ o
39
41
  ]
40
42
  }
41
43
  ),
@@ -43,9 +45,19 @@ const u = ({
43
45
  "div",
44
46
  {
45
47
  className: "relative",
46
- style: { padding: p, minHeight: H },
48
+ style: { padding: f, minHeight: x },
47
49
  children: [
48
- t ? /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "absolute bottom-0 left-0 h-1/2 w-full z-0", children: t }) : null,
50
+ t ? /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "absolute bottom-0 left-0 h-1/2 w-full z-0", children: t }) : r ? /* @__PURE__ */ e(
51
+ "div",
52
+ {
53
+ "aria-hidden": "true",
54
+ className: "absolute bottom-0 left-0 h-1/2 w-full z-0 bg-cover bg-center",
55
+ style: {
56
+ backgroundImage: _(r),
57
+ mixBlendMode: "multiply"
58
+ }
59
+ }
60
+ ) : null,
49
61
  /* @__PURE__ */ e("div", { className: "relative z-10", children: s })
50
62
  ]
51
63
  }
@@ -53,9 +65,21 @@ const u = ({
53
65
  ]
54
66
  }
55
67
  );
68
+ return c ? /* @__PURE__ */ e(
69
+ "div",
70
+ {
71
+ style: {
72
+ boxSizing: "border-box",
73
+ width: "100%",
74
+ padding: S,
75
+ backgroundColor: A
76
+ },
77
+ children: d
78
+ }
79
+ ) : d;
56
80
  };
57
81
  export {
58
- u as EmptyLayout,
59
- u as default
82
+ T as EmptyLayout,
83
+ T as default
60
84
  };
61
85
  //# sourceMappingURL=emptyLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"emptyLayout.js","sources":["../../../src/components/PageLayout/emptyLayout.tsx"],"sourcesContent":["import React from 'react';\nimport Text from '../Typography/Text';\nimport {\n CARD_CLASSES,\n CARD_MIN_HEIGHT,\n CARD_RADIUS,\n CONTENT_MIN_HEIGHT,\n DIVIDER_CLASSES,\n HEADER_HEIGHT,\n} from './constants';\n\nexport interface EmptyLayoutProps {\n title?: string;\n children: React.ReactNode;\n centered?: boolean;\n uniformPadding?: boolean;\n headerActions?: React.ReactNode;\n background?: React.ReactNode;\n /** Demotes the default `main` landmark — pass e.g. `region` when the app owns its own. */\n role?: React.AriaRole;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst EmptyLayout: React.FC<EmptyLayoutProps> = ({\n title,\n children,\n centered = false,\n uniformPadding = false,\n headerActions,\n background,\n role,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className = '',\n style,\n}) => {\n const contentPadding = uniformPadding ? '8px' : centered ? '5vh 14vw' : '40px';\n\n return (\n <main\n className={`${CARD_CLASSES} ${className}`}\n style={{ borderRadius: CARD_RADIUS, minHeight: CARD_MIN_HEIGHT, ...style }}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n <div\n className={`flex items-center justify-between gap-4 ${DIVIDER_CLASSES}`}\n style={{\n height: HEADER_HEIGHT,\n paddingInlineStart: uniformPadding ? 8 : 28,\n paddingInlineEnd: uniformPadding ? 8 : 16,\n }}\n >\n <div className=\"min-w-0\">\n {title ? <Text fontWeight=\"bold\">{title}</Text> : null}\n </div>\n {headerActions}\n </div>\n\n <div\n className=\"relative\"\n style={{ padding: contentPadding, minHeight: CONTENT_MIN_HEIGHT }}\n >\n {background ? (\n <div aria-hidden=\"true\" className=\"absolute bottom-0 left-0 h-1/2 w-full z-0\">\n {background}\n </div>\n ) : null}\n <div className=\"relative z-10\">{children}</div>\n </div>\n </main>\n );\n};\n\nexport default EmptyLayout;\nexport { EmptyLayout };\n"],"names":["EmptyLayout","title","children","centered","uniformPadding","headerActions","background","role","ariaLabel","ariaLabelledBy","className","style","contentPadding","jsxs","CARD_CLASSES","CARD_RADIUS","CARD_MIN_HEIGHT","DIVIDER_CLASSES","HEADER_HEIGHT","jsx","Text","CONTENT_MIN_HEIGHT"],"mappings":";;;AA0BA,MAAMA,IAA0C,CAAC;AAAA,EAC7C,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,gBAAAC,IAAiB;AAAA,EACjB,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAcC;AAAA,EACd,mBAAmBC;AAAA,EACnB,WAAAC,IAAY;AAAA,EACZ,OAAAC;AACJ,MAAM;AACF,QAAMC,IAAiBR,IAAiB,QAAQD,IAAW,aAAa;AAExE,SACI,gBAAAU;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,WAAW,GAAGC,CAAY,IAAIJ,CAAS;AAAA,MACvC,OAAO,EAAE,cAAcK,GAAa,WAAWC,GAAiB,GAAGL,EAAA;AAAA,MACnE,MAAAJ;AAAA,MACA,cAAYC;AAAA,MACZ,mBAAiBC;AAAA,MAEjB,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAW,2CAA2CI,CAAe;AAAA,YACrE,OAAO;AAAA,cACH,QAAQC;AAAA,cACR,oBAAoBd,IAAiB,IAAI;AAAA,cACzC,kBAAkBA,IAAiB,IAAI;AAAA,YAAA;AAAA,YAG3C,UAAA;AAAA,cAAA,gBAAAe,EAAC,OAAA,EAAI,WAAU,WACV,UAAAlB,IAAQ,gBAAAkB,EAACC,KAAK,YAAW,QAAQ,UAAAnB,EAAA,CAAM,IAAU,MACtD;AAAA,cACCI;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGL,gBAAAQ;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAU;AAAA,YACV,OAAO,EAAE,SAASD,GAAgB,WAAWS,EAAA;AAAA,YAE5C,UAAA;AAAA,cAAAf,sBACI,OAAA,EAAI,eAAY,QAAO,WAAU,6CAC7B,aACL,IACA;AAAA,cACJ,gBAAAa,EAAC,OAAA,EAAI,WAAU,iBAAiB,UAAAjB,EAAA,CAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC7C;AAAA,IAAA;AAAA,EAAA;AAGZ;"}
1
+ {"version":3,"file":"emptyLayout.js","sources":["../../../src/components/PageLayout/emptyLayout.tsx"],"sourcesContent":["import React from 'react';\nimport Text from '../Typography/Text';\nimport {\n CARD_CLASSES,\n CARD_MIN_HEIGHT,\n CARD_RADIUS,\n CONTENT_MIN_HEIGHT,\n DIVIDER_CLASSES,\n HEADER_HEIGHT,\n PAGE_BACKGROUND,\n PAGE_INSET,\n} from './constants';\nimport { cssUrl } from './cssUrl';\n\nexport interface EmptyLayoutProps {\n title?: string;\n children: React.ReactNode;\n centered?: boolean;\n uniformPadding?: boolean;\n headerActions?: React.ReactNode;\n background?: React.ReactNode;\n /**\n * An image for the lower half of the content area, cover-fitted. It is multiplied onto the card, so\n * artwork drawn for a white card sinks into a dark one. Ignored when `background` is set.\n */\n backgroundImage?: string;\n /**\n * For a screen rendered before the app frame: adds the page inset around the card and paints\n * it with the page background.\n */\n standalone?: boolean;\n /** Demotes the default `main` landmark — pass e.g. `region` when the app owns its own. */\n role?: React.AriaRole;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n className?: string;\n style?: React.CSSProperties;\n}\n\nconst EmptyLayout: React.FC<EmptyLayoutProps> = ({\n title,\n children,\n centered = false,\n uniformPadding = false,\n headerActions,\n background,\n backgroundImage,\n standalone = false,\n role,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n className = '',\n style,\n}) => {\n const contentPadding = uniformPadding ? '8px' : centered ? '5vh 14vw' : '40px';\n const card = (\n <main\n className={`${CARD_CLASSES} ${className}`}\n style={{ borderRadius: CARD_RADIUS, minHeight: CARD_MIN_HEIGHT, ...style }}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n <div\n className={`flex items-center justify-between gap-4 ${DIVIDER_CLASSES}`}\n style={{\n height: HEADER_HEIGHT,\n paddingInlineStart: uniformPadding ? 8 : 28,\n paddingInlineEnd: uniformPadding ? 8 : 16,\n }}\n >\n <div className=\"min-w-0\">\n {title ? <Text fontWeight=\"bold\">{title}</Text> : null}\n </div>\n {headerActions}\n </div>\n\n <div\n className=\"relative\"\n style={{ padding: contentPadding, minHeight: CONTENT_MIN_HEIGHT }}\n >\n {background ? (\n <div aria-hidden=\"true\" className=\"absolute bottom-0 left-0 h-1/2 w-full z-0\">\n {background}\n </div>\n ) : backgroundImage ? (\n <div\n aria-hidden=\"true\"\n className=\"absolute bottom-0 left-0 h-1/2 w-full z-0 bg-cover bg-center\"\n style={{\n backgroundImage: cssUrl(backgroundImage),\n mixBlendMode: 'multiply',\n }}\n />\n ) : null}\n <div className=\"relative z-10\">{children}</div>\n </div>\n </main>\n );\n\n return standalone ? (\n <div\n style={{\n boxSizing: 'border-box',\n width: '100%',\n padding: PAGE_INSET,\n backgroundColor: PAGE_BACKGROUND,\n }}\n >\n {card}\n </div>\n ) : (\n card\n );\n};\n\nexport default EmptyLayout;\nexport { EmptyLayout };\n"],"names":["EmptyLayout","title","children","centered","uniformPadding","headerActions","background","backgroundImage","standalone","role","ariaLabel","ariaLabelledBy","className","style","contentPadding","card","jsxs","CARD_CLASSES","CARD_RADIUS","CARD_MIN_HEIGHT","DIVIDER_CLASSES","HEADER_HEIGHT","jsx","Text","C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WAAU,6CAC7B,UAAAhB,GACL,IACAC,IACA,gBAAAe;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACG,eAAY;AAAA,kBACZ,WAAU;AAAA,kBACV,OAAO;AAAA,oBACH,iBAAiBG,EAAOlB,CAAe;AAAA,oBACvC,cAAc;AAAA,kBAAA;AAAA,gBAClB;AAAA,cAAA,IAEJ;AAAA,cACJ,gBAAAe,EAAC,OAAA,EAAI,WAAU,iBAAiB,UAAApB,EAAA,CAAS;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAC7C;AAAA,IAAA;AAAA,EAAA;AAIR,SAAOM,IACH,gBAAAc;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,OAAO;AAAA,QACH,WAAW;AAAA,QACX,OAAO;AAAA,QACP,SAASI;AAAA,QACT,iBAAiBC;AAAA,MAAA;AAAA,MAGpB,UAAAZ;AAAA,IAAA;AAAA,EAAA,IAGLA;AAER;"}
@@ -1,8 +1,8 @@
1
- import { jsxs as ye, Fragment as Me, jsx as O } from "react/jsx-runtime";
2
- import Se, { useContext as Ce, useState as Q, useSyncExternalStore as De, useRef as d, useCallback as Z, useEffect as $, useMemo as _e } from "react";
1
+ import { jsxs as ye, Fragment as Se, jsx as O } from "react/jsx-runtime";
2
+ import Me, { useContext as Ce, useState as Q, useSyncExternalStore as De, useRef as d, useCallback as Z, useEffect as $, useMemo as _e } from "react";
3
3
  import { createPortal as Ae } from "react-dom";
4
4
  import { ShadowRootWrapper as Ne } from "../ShadowRootWrapper.js";
5
- import { PopoverNote as Ie, PopoverStatus as Oe, PopoverSearch as ke, PopoverEmpty as Ke, PopoverSection as Re, PopoverList as He, PopoverAction as Be, PopoverHeader as $e } from "./PopoverParts.js";
5
+ import { PopoverNote as Ie, PopoverStatus as Oe, PopoverSearch as Ke, PopoverEmpty as ke, PopoverSection as Re, PopoverList as He, PopoverAction as Be, PopoverHeader as $e } from "./PopoverParts.js";
6
6
  import { getDeepActiveElement as U } from "./activeElement.js";
7
7
  import { elementRef as Ue, composeRefs as We, chainHandler as p } from "./composeRefs.js";
8
8
  import { pushEscapeLayer as je } from "./escapeLayers.js";
@@ -11,7 +11,7 @@ import { firstTabStopIn as re } from "./overlayBehaviour.js";
11
11
  import { usePopupLayer as Ge } from "./overlayLayers.js";
12
12
  import { PopoverTreeContext as ee, PopoverShownContext as Ve } from "./popoverTree.js";
13
13
  import { useHoverClose as Xe } from "./useHoverClose.js";
14
- import { useLatestRef as k } from "./useLatestRef.js";
14
+ import { useLatestRef as K } from "./useLatestRef.js";
15
15
  import { usePopoverPosition as Ye } from "./usePopoverPosition.js";
16
16
  import { usePopoverTree as qe } from "./usePopoverTree.js";
17
17
  const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malachite-radius-xl,12px)] border border-solid border-[var(--malachite-card-border,rgb(232,232,232))] bg-[var(--malachite-card-background,rgb(255,255,255))] text-[var(--malachite-text-primary,rgb(10,10,10))]", Je = {
@@ -37,7 +37,7 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
37
37
  const a = r.getRootNode();
38
38
  return [r, ...a instanceof ShadowRoot ? te(a.host) : []];
39
39
  }, tr = () => () => {
40
- }, or = () => !0, nr = () => !1, W = (r, a) => a ?? re(r) ?? r, K = (r) => typeof r == "function" ? r() : r == null ? void 0 : r.current, sr = (r, a) => !r || r === document.body || !r.isConnected || r === a, cr = ({
40
+ }, or = () => !0, nr = () => !1, W = (r, a) => a ?? re(r) ?? r, k = (r) => typeof r == "function" ? r() : r == null ? void 0 : r.current, sr = (r, a) => !r || r === document.body || !r.isConnected || r === a, cr = ({
41
41
  trigger: r,
42
42
  children: a,
43
43
  open: g,
@@ -58,13 +58,13 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
58
58
  "aria-labelledby": de,
59
59
  className: pe = ""
60
60
  }) => {
61
- const me = Ce(ee), [ve, he] = Q(oe), c = g ?? ve, be = De(tr, or, nr), w = d(null), b = d(null), Pe = Ge("popover", c, b), [t, Ee] = Q(null), V = d(0), R = d(!1), C = d(!1), D = d(!1), x = d(null), T = d(null), _ = k(c), X = k(g), A = k(ne), P = k(F), L = F !== void 0, l = Z(
61
+ const me = Ce(ee), [ve, he] = Q(oe), c = g ?? ve, be = De(tr, or, nr), w = d(null), b = d(null), Pe = Ge("popover", c, b), [t, Ee] = Q(null), V = d(0), R = d(!1), C = d(!1), D = d(!1), x = d(null), T = d(null), _ = K(c), X = K(g), A = K(ne), P = K(F), L = F !== void 0, l = Z(
62
62
  (e) => {
63
63
  var u;
64
64
  e !== _.current && (X.current === void 0 && he(e), (u = A.current) == null || u.call(A, e));
65
65
  },
66
66
  [_, X, A]
67
- ), { pointerInside: y, focusInside: M, triggerFocused: Y, cancelClose: h, scheduleClose: N } = Xe({
67
+ ), { pointerInside: y, focusInside: S, triggerFocused: Y, cancelClose: h, scheduleClose: N } = Xe({
68
68
  isOpenRef: _,
69
69
  heldByChildren: V,
70
70
  setOpen: l
@@ -103,38 +103,38 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
103
103
  var s;
104
104
  document.removeEventListener("mousedown", e, !0), u(), y.current = !1;
105
105
  const n = U();
106
- M.current && (!n || n === document.body) && (C.current = !0, (s = w.current) == null || s.focus({ preventScroll: !0 }), C.current = !1), M.current = !1, x.current = null, T.current = null;
106
+ S.current && (!n || n === document.body) && (C.current = !0, (s = w.current) == null || s.focus({ preventScroll: !0 }), C.current = !1), S.current = !1, x.current = null, T.current = null;
107
107
  };
108
- }, [c, l, H, y, M]);
109
- const S = c && t !== null && o !== null, E = Z((e) => {
108
+ }, [c, l, H, y, S]);
109
+ const M = c && t !== null && o !== null, E = Z((e) => {
110
110
  x.current = e, e.focus({ preventScroll: !0 });
111
111
  }, []);
112
112
  $(() => {
113
113
  const e = m === "click" || R.current;
114
- if (!S || !t || !e)
114
+ if (!M || !t || !e)
115
115
  return;
116
116
  R.current = !1;
117
- const u = L ? K(P.current) : v == null ? void 0 : v.current;
117
+ const u = L ? k(P.current) : v == null ? void 0 : v.current;
118
118
  E(W(t, u));
119
- }, [S, t, m, L, v, P, E]), $(() => {
120
- if (!S || !t || !L)
119
+ }, [M, t, m, L, v, P, E]), $(() => {
120
+ if (!M || !t || !L)
121
121
  return;
122
122
  const e = () => {
123
123
  const n = U();
124
124
  if (sr(n, b.current)) {
125
- T.current && !T.current.isConnected && E(W(t, K(P.current)));
125
+ T.current && !T.current.isConnected && E(W(t, k(P.current)));
126
126
  return;
127
127
  }
128
128
  if (n !== x.current)
129
129
  return;
130
- const s = K(P.current) ?? (n === t ? re(t) : null);
130
+ const s = k(P.current) ?? (n === t ? re(t) : null);
131
131
  s && s !== n && s.isConnected && E(s);
132
132
  }, u = new MutationObserver(e);
133
133
  return u.observe(t, { childList: !0, subtree: !0 }), () => u.disconnect();
134
- }, [S, t, L, P, E]);
134
+ }, [M, t, L, P, E]);
135
135
  const B = () => {
136
136
  if (h(), c && t) {
137
- const e = L ? K(P.current) : v == null ? void 0 : v.current;
137
+ const e = L ? k(P.current) : v == null ? void 0 : v.current;
138
138
  E(W(t, e));
139
139
  return;
140
140
  }
@@ -150,7 +150,7 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
150
150
  (n) => u.some((s) => s == null ? void 0 : s.contains(n))
151
151
  );
152
152
  }, q = (e) => {
153
- e && queueMicrotask(() => {
153
+ e && setTimeout(() => {
154
154
  !I(e) && !I(U()) && l(!1);
155
155
  });
156
156
  }, i = m === "hover" ? {
@@ -166,7 +166,7 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
166
166
  } : null, f = r.props, z = Ue(r), we = _e(
167
167
  () => We(z, w),
168
168
  [z]
169
- ), J = er[j.split("-")[0]], xe = Se.cloneElement(r, {
169
+ ), J = er[j.split("-")[0]], xe = Me.cloneElement(r, {
170
170
  ref: we,
171
171
  "aria-haspopup": G,
172
172
  "aria-expanded": c,
@@ -236,7 +236,7 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
236
236
  maxWidth: `calc(100vw - ${Fe * 2}px)`,
237
237
  visibility: o ? "visible" : "hidden"
238
238
  };
239
- return /* @__PURE__ */ ye(Me, { children: [
239
+ return /* @__PURE__ */ ye(Se, { children: [
240
240
  xe,
241
241
  c && be && Ae(
242
242
  /* @__PURE__ */ O(ee.Provider, { value: ge, children: /* @__PURE__ */ O(
@@ -263,18 +263,18 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
263
263
  onMouseOver: i == null ? void 0 : i.onPanelMouseOver,
264
264
  onMouseLeave: i == null ? void 0 : i.onMouseLeave,
265
265
  onFocus: (e) => {
266
- M.current = !0, e.target !== x.current && (x.current = null), e.target instanceof HTMLElement && (t != null && t.contains(e.target)) && (T.current = e.target), h();
266
+ S.current = !0, e.target !== x.current && (x.current = null), e.target instanceof HTMLElement && (t != null && t.contains(e.target)) && (T.current = e.target), h();
267
267
  },
268
268
  onBlur: (e) => {
269
269
  if (!I(e.relatedTarget)) {
270
- if (e.relatedTarget && (T.current = null), M.current = !1, m === "hover") {
270
+ if (e.relatedTarget && (T.current = null), S.current = !1, m === "hover") {
271
271
  N();
272
272
  return;
273
273
  }
274
274
  q(e.relatedTarget);
275
275
  }
276
276
  },
277
- children: /* @__PURE__ */ O(Ve.Provider, { value: S, children: a })
277
+ children: /* @__PURE__ */ O(Ve.Provider, { value: M, children: a })
278
278
  }
279
279
  )
280
280
  }
@@ -287,8 +287,8 @@ const ze = "font-sans box-border overflow-auto outline-none rounded-[var(--malac
287
287
  Action: Be,
288
288
  List: He,
289
289
  Section: Re,
290
- Empty: Ke,
291
- Search: ke,
290
+ Empty: ke,
291
+ Search: Ke,
292
292
  Status: Oe,
293
293
  Note: Ie
294
294
  });