@octaviaflow/core 3.0.12 → 3.0.14

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.
@@ -1,16 +1,49 @@
1
1
  import { type ReactNode } from "react";
2
2
  export interface AuthCardProps {
3
3
  logo?: ReactNode;
4
- title: ReactNode;
4
+ title?: ReactNode;
5
5
  description?: ReactNode;
6
6
  /** Small badge rendered next to the title (e.g. "Organization"). */
7
7
  scope?: ReactNode;
8
+ /**
9
+ * Fully custom header that REPLACES the auto-built logo + title +
10
+ * description block. Use when the default head structure isn't enough
11
+ * (split-screen layouts, custom hero treatments, etc.). When provided,
12
+ * `logo`, `title`, `description`, and `scope` are ignored.
13
+ */
14
+ header?: ReactNode;
15
+ /**
16
+ * Extra content rendered immediately after the description, before the
17
+ * body. Common uses: step indicator ("Step 2 of 3"), breadcrumb,
18
+ * informational chip.
19
+ */
20
+ headerExtra?: ReactNode;
21
+ /**
22
+ * When set, an error Banner is rendered above the body — same Banner
23
+ * the consumer would otherwise hand-roll. Pass `false` / `null` /
24
+ * `undefined` to hide. Accepts the same ReactNode shape Banner expects
25
+ * for its body.
26
+ */
27
+ error?: ReactNode;
28
+ /** Same as `error` but renders a success Banner. */
29
+ success?: ReactNode;
30
+ /**
31
+ * Header alignment. Default `"center"` matches the OctaviaFlow auth
32
+ * convention (centered logo + title). Use `"left"` for split-screen or
33
+ * marketing-heavy layouts where the auth card sits next to other content.
34
+ */
35
+ align?: "center" | "left";
36
+ /**
37
+ * Card width override. Default 400px (matches the historical default).
38
+ * Pass a number (px) or any CSS length string (e.g. "440px", "32rem").
39
+ */
40
+ width?: number | string;
8
41
  children: ReactNode;
9
42
  divider?: ReactNode;
10
43
  footer?: ReactNode;
11
44
  className?: string;
12
45
  }
13
- export declare function AuthCard({ logo, title, description, scope, children, divider, footer, className, }: AuthCardProps): import("react/jsx-runtime").JSX.Element;
46
+ export declare function AuthCard({ logo, title, description, scope, header, headerExtra, error, success, align, width, children, divider, footer, className, }: AuthCardProps): import("react/jsx-runtime").JSX.Element;
14
47
  export interface AuthDividerProps {
15
48
  children?: ReactNode;
16
49
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"AuthCard.d.ts","sourceRoot":"","sources":["../../../src/components/AuthCard/AuthCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,SAAS,EAA2B,MAAM,OAAO,CAAC;AAGpF,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,SAAS,GACV,EAAE,aAAa,2CAgBf;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,QAAe,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAQ3E;AAKD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,gBAAgB,2CAYxF;AAKD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,C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ope,
375
+ header,
376
+ headerExtra,
377
+ error,
378
+ success,
379
+ align = "center",
380
+ width,
375
381
  children,
376
382
  divider,
377
383
  footer,
378
384
  className
379
385
  }) {
380
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("ods-auth-card", className), children: [
381
- logo && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__logo", children: logo }),
382
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "ods-auth-card__head", children: [
383
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "ods-auth-card__title-row", children: [
384
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "ods-auth-card__title", children: title }),
385
- scope && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "ods-auth-card__scope", children: scope })
386
- ] }),
387
- description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "ods-auth-card__desc", children: description })
388
- ] }),
389
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__body", children }),
390
- divider && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__divider", children: divider }),
391
- footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__footer", children: footer })
392
- ] });
386
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
387
+ "div",
388
+ {
389
+ className: cn(
390
+ "ods-auth-card",
391
+ align === "left" && "ods-auth-card--left",
392
+ className
393
+ ),
394
+ style: width != null ? { width: typeof width === "number" ? `${width}px` : width } : void 0,
395
+ children: [
396
+ header ?? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
397
+ logo && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__logo", children: logo }),
398
+ (title || description || scope) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "ods-auth-card__head", children: [
399
+ (title || scope) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "ods-auth-card__title-row", children: [
400
+ title && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h1", { className: "ods-auth-card__title", children: title }),
401
+ scope && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "ods-auth-card__scope", children: scope })
402
+ ] }),
403
+ description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "ods-auth-card__desc", children: description })
404
+ ] })
405
+ ] }),
406
+ headerExtra && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__header-extra", children: headerExtra }),
407
+ (error || success) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
408
+ "div",
409
+ {
410
+ className: "ods-auth-card__messages",
411
+ style: {
412
+ display: "flex",
413
+ flexDirection: "column",
414
+ gap: "var(--ods-space-2)"
415
+ },
416
+ children: [
417
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AutoBanner, { variant: "error", children: error }),
418
+ success && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(AutoBanner, { variant: "success", children: success })
419
+ ]
420
+ }
421
+ ),
422
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__body", children }),
423
+ divider && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__divider", children: divider }),
424
+ footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "ods-auth-card__footer", children: footer })
425
+ ]
426
+ }
427
+ );
428
+ }
429
+ function AutoBanner({
430
+ variant,
431
+ children
432
+ }) {
433
+ const tone = variant === "error" ? {
434
+ bg: "var(--ods-status-error-bg)",
435
+ fg: "var(--ods-status-error-fg)",
436
+ bd: "var(--ods-status-error-bd)"
437
+ } : {
438
+ bg: "var(--ods-status-success-bg)",
439
+ fg: "var(--ods-status-success-fg)",
440
+ bd: "var(--ods-status-success-bd)"
441
+ };
442
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
443
+ "div",
444
+ {
445
+ role: variant === "error" ? "alert" : "status",
446
+ style: {
447
+ padding: "10px 12px",
448
+ background: tone.bg,
449
+ color: tone.fg,
450
+ border: `1px solid ${tone.bd}`,
451
+ borderRadius: "var(--ods-radius-1)",
452
+ fontSize: 13,
453
+ lineHeight: 1.45
454
+ },
455
+ children
456
+ }
457
+ );
393
458
  }
394
459
  function AuthDivider({ children = "OR", className }) {
395
460
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("ods-auth-divider", className), children: [
@@ -11624,14 +11689,22 @@ function ExpandedLayout({
11624
11689
  pinned,
11625
11690
  onPinToggle
11626
11691
  }) {
11692
+ const hasFooterControl = Boolean(onPinToggle || onToggle);
11627
11693
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_jsx_runtime69.Fragment, { children: [
11628
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__header", children: [
11694
+ (logo || brand) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__header", children: [
11629
11695
  logo && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__logo", children: logo }),
11630
11696
  brand && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__brand", children: [
11631
11697
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__brand-name", children: brand.name }),
11632
11698
  brand.subtitle && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__brand-sub", children: brand.subtitle })
11633
- ] }),
11634
- onPinToggle && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11699
+ ] })
11700
+ ] }),
11701
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__body", children: sections.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__section", children: [
11702
+ section.label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__section-label", children: section.label }),
11703
+ section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id))
11704
+ ] }, section.id ?? sIdx)) }),
11705
+ (footerItems || user || hasFooterControl) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__footer", children: [
11706
+ footerItems && footerItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__footer-list", children: footerItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id)) }),
11707
+ hasFooterControl && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__footer-control", children: onPinToggle ? /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
11635
11708
  "button",
11636
11709
  {
11637
11710
  type: "button",
@@ -11639,48 +11712,57 @@ function ExpandedLayout({
11639
11712
  onClick: onPinToggle,
11640
11713
  "aria-label": pinned ? "Unpin sidebar" : "Pin sidebar",
11641
11714
  "aria-pressed": pinned,
11642
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11643
- "path",
11644
- {
11645
- d: "M5.5 1h3v3l2 3h-3v3l-1.5 2L4.5 10V7h-3l2-3V1z",
11646
- stroke: "currentColor",
11647
- strokeWidth: "1.3",
11648
- strokeLinejoin: "round",
11649
- fill: pinned ? "currentColor" : "none"
11650
- }
11651
- ) })
11715
+ children: [
11716
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PinIcon, { pinned: !!pinned }),
11717
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__pin-label", children: pinned ? "Unpin" : "Pin sidebar" })
11718
+ ]
11652
11719
  }
11653
- ),
11654
- onToggle && !onPinToggle && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11720
+ ) : /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
11655
11721
  "button",
11656
11722
  {
11657
11723
  type: "button",
11658
11724
  className: "ods-sidebar__collapse",
11659
11725
  onClick: onToggle,
11660
11726
  "aria-label": "Collapse sidebar",
11661
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11662
- "path",
11663
- {
11664
- d: "M3 3v10M11 5l-3 3 3 3",
11665
- stroke: "currentColor",
11666
- strokeWidth: "1.5",
11667
- strokeLinecap: "round",
11668
- strokeLinejoin: "round"
11669
- }
11670
- ) })
11727
+ children: [
11728
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11729
+ "path",
11730
+ {
11731
+ d: "M3 3v10M11 5l-3 3 3 3",
11732
+ stroke: "currentColor",
11733
+ strokeWidth: "1.5",
11734
+ strokeLinecap: "round",
11735
+ strokeLinejoin: "round"
11736
+ }
11737
+ ) }),
11738
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "ods-sidebar__pin-label", children: "Collapse" })
11739
+ ]
11671
11740
  }
11672
- )
11673
- ] }),
11674
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__body", children: sections.map((section, sIdx) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__section", children: [
11675
- section.label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__section-label", children: section.label }),
11676
- section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id))
11677
- ] }, section.id ?? sIdx)) }),
11678
- (footerItems || user) && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ods-sidebar__footer", children: [
11679
- footerItems && footerItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "ods-sidebar__footer-list", children: footerItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ExpandedItem, { item, level: 0 }, item.id)) }),
11741
+ ) }),
11680
11742
  user && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SidebarUserCard, { user })
11681
11743
  ] })
11682
11744
  ] });
11683
11745
  }
11746
+ function PinIcon({ pinned }) {
11747
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
11748
+ "svg",
11749
+ {
11750
+ width: "14",
11751
+ height: "14",
11752
+ viewBox: "0 0 16 16",
11753
+ fill: pinned ? "currentColor" : "none",
11754
+ stroke: "currentColor",
11755
+ strokeWidth: "1.5",
11756
+ strokeLinejoin: "round",
11757
+ strokeLinecap: "round",
11758
+ "aria-hidden": "true",
11759
+ children: [
11760
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "M10.5 1.5 14.5 5.5 11.5 8.5 11 11 5 5 7.5 4.5z" }),
11761
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "M5 5 1.5 14.5" })
11762
+ ]
11763
+ }
11764
+ );
11765
+ }
11684
11766
  function ExpandedItem({ item, level }) {
11685
11767
  const hasChildren = !!(item.children && item.children.length > 0);
11686
11768
  const [open, setOpen] = (0, import_react53.useState)(