@cellarnode/ui 0.183.0 → 0.184.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.
@@ -21,4 +21,6 @@ export { BillingAddressSourceControl } from "./billing-address-source.js";
21
21
  export type { BillingAddressSourceControlProps } from "./billing-address-source.js";
22
22
  export { PublicLocationNotice } from "./public-location-notice.js";
23
23
  export type { PublicLocationNoticeProps } from "./public-location-notice.js";
24
+ export { OrganisationShell } from "./organisation-shell.js";
25
+ export type { OrganisationShellLabels, OrganisationShellProps, OrganisationShellWidth, } from "./organisation-shell.js";
24
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/org/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,YAAY,EACV,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAC;AAIjB,OAAO,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AAoB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEtE,YAAY,EACV,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,GACd,MAAM,SAAS,CAAC;AAIjB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,YAAY,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAC;AAEjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC"}
package/dist/org/index.js CHANGED
@@ -11,4 +11,6 @@ export { PostalAddressFields } from "./postal-address-fields.js";
11
11
  export { PostalAddressDisplay } from "./postal-address-display.js";
12
12
  export { BillingAddressSourceControl } from "./billing-address-source.js";
13
13
  export { PublicLocationNotice } from "./public-location-notice.js";
14
+ // CEL-2126 — shared organisation section layout (title, org name, content column).
15
+ export { OrganisationShell } from "./organisation-shell.js";
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/org/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAW5D,sEAAsE;AACtE,2EAA2E;AAC3E,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/org/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAW5D,sEAAsE;AACtE,2EAA2E;AAC3E,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,mFAAmF;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { ReactNode } from "react";
2
+ export type OrganisationShellWidth = "default" | "narrow" | "wide" | "full";
3
+ export interface OrganisationShellLabels {
4
+ /** Subtitle shown under the title when there is no organisation name. */
5
+ noOrgSubtitle?: string;
6
+ }
7
+ export interface OrganisationShellProps {
8
+ /** The page title, rendered as the single `h1` (e.g. "Organisation"). */
9
+ title: string;
10
+ /** The organisation name. Plain text, never a heading. Clamps to two lines when long. */
11
+ subtitle?: string;
12
+ /** Optional header actions, right-aligned from `sm` up and stacked below it. */
13
+ actions?: ReactNode;
14
+ /** The section content (the router outlet). */
15
+ children?: ReactNode;
16
+ /**
17
+ * Content width. `default` is `max-w-6xl` (producer's current container),
18
+ * `narrow` is `max-w-4xl`, `wide` is `max-w-7xl`, `full` is unbounded.
19
+ */
20
+ width?: OrganisationShellWidth;
21
+ /**
22
+ * Shown INSTEAD of `children` when the user has no organisation (join and
23
+ * setup UI, request-status card, loading text). Consumer-owned. Rendered in a
24
+ * centred `max-w-4xl` column, as producer does today.
25
+ */
26
+ noOrgState?: ReactNode;
27
+ labels?: OrganisationShellLabels;
28
+ className?: string;
29
+ }
30
+ /**
31
+ * Shared parent layout for the organisation section (CEL-2126). Header
32
+ * (`font-display` h1 plus muted org-name line plus optional actions) over a
33
+ * centred content column. Class-for-class the same as producer's
34
+ * `_app.organisation` header and `max-w-6xl` Outlet container, so adopting it
35
+ * is not a visual change.
36
+ *
37
+ * Landmarks: it renders no `main` (AppShell owns it) and exactly one `h1`; the
38
+ * header is a plain `div` (a `header` reads as a banner landmark to some tools).
39
+ */
40
+ export declare function OrganisationShell({ title, subtitle, actions, children, width, noOrgState, labels, className, }: OrganisationShellProps): import("react/jsx-runtime").JSX.Element;
41
+ //# sourceMappingURL=organisation-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation-shell.d.ts","sourceRoot":"","sources":["../../src/org/organisation-shell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5E,MAAM,WAAW,uBAAuB;IACtC,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAiB,EACjB,UAAU,EACV,MAAM,EACN,SAAS,GACV,EAAE,sBAAsB,2CA8CxB"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ const WIDTH_CLASS = {
4
+ default: "max-w-6xl",
5
+ narrow: "max-w-4xl",
6
+ wide: "max-w-7xl",
7
+ full: "max-w-none",
8
+ };
9
+ /**
10
+ * Shared parent layout for the organisation section (CEL-2126). Header
11
+ * (`font-display` h1 plus muted org-name line plus optional actions) over a
12
+ * centred content column. Class-for-class the same as producer's
13
+ * `_app.organisation` header and `max-w-6xl` Outlet container, so adopting it
14
+ * is not a visual change.
15
+ *
16
+ * Landmarks: it renders no `main` (AppShell owns it) and exactly one `h1`; the
17
+ * header is a plain `div` (a `header` reads as a banner landmark to some tools).
18
+ */
19
+ export function OrganisationShell({ title, subtitle, actions, children, width = "default", noOrgState, labels, className, }) {
20
+ const hasNoOrgState = noOrgState !== undefined && noOrgState !== null && noOrgState !== false;
21
+ const resolvedSubtitle = subtitle ?? (hasNoOrgState ? (labels?.noOrgSubtitle ?? "Manage your organisation") : undefined);
22
+ return (_jsxs("div", { className: cn("flex flex-col gap-8", className), "data-slot": "organisation-shell", children: [_jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", "data-slot": "organisation-shell-header", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "font-display text-2xl/8 font-bold text-foreground sm:text-3xl/10", children: title }), resolvedSubtitle ? (_jsx("p", { className: "mt-1 line-clamp-2 break-words text-sm/5 text-muted-foreground", title: resolvedSubtitle, "data-slot": "organisation-shell-subtitle", children: resolvedSubtitle })) : null] }), actions ? (_jsx("div", { className: "shrink-0", "data-slot": "organisation-shell-actions", children: actions })) : null] }), hasNoOrgState ? (_jsx("div", { className: "mx-auto w-full max-w-4xl", "data-slot": "organisation-shell-no-org", children: noOrgState })) : (_jsx("div", { className: cn("mx-auto w-full", WIDTH_CLASS[width]), "data-slot": "organisation-shell-content", children: children }))] }));
23
+ }
24
+ //# sourceMappingURL=organisation-shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organisation-shell.js","sourceRoot":"","sources":["../../src/org/organisation-shell.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAiClC,MAAM,WAAW,GAA2C;IAC1D,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,GAAG,SAAS,EACjB,UAAU,EACV,MAAM,EACN,SAAS,GACc;IACvB,MAAM,aAAa,GAAG,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,KAAK,CAAC;IAC9F,MAAM,gBAAgB,GACpB,QAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,aAAa,IAAI,0BAA0B,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAElG,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,eAAY,oBAAoB,aAClF,eACE,SAAS,EAAC,oEAAoE,eACpE,2BAA2B,aAErC,eAAK,SAAS,EAAC,SAAS,aACtB,aAAI,SAAS,EAAC,kEAAkE,YAC7E,KAAK,GACH,EACJ,gBAAgB,CAAC,CAAC,CAAC,CAClB,YACE,SAAS,EAAC,+DAA+D,EACzE,KAAK,EAAE,gBAAgB,eACb,6BAA6B,YAEtC,gBAAgB,GACf,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,CAAC,CAAC,CACT,cAAK,SAAS,EAAC,UAAU,eAAW,4BAA4B,YAC7D,OAAO,GACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EAEL,aAAa,CAAC,CAAC,CAAC,CACf,cAAK,SAAS,EAAC,0BAA0B,eAAW,2BAA2B,YAC5E,UAAU,GACP,CACP,CAAC,CAAC,CAAC,CACF,cACE,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,eACzC,4BAA4B,YAErC,QAAQ,GACL,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cellarnode/ui",
3
- "version": "0.183.0",
3
+ "version": "0.184.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@10.28.2+sha512.41872f037ad22f7348e3b1debbaf7e867cfd448f2726d9cf74c08f19507c31d2c8e7a11525b983febc2df640b5438dee6023ebb1f84ed43cc2d654d2bc326264",