@openwarelabs/blocks 0.7.0 → 0.8.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 (94) hide show
  1. package/dist/features/Features01/Features01.d.cts +3 -0
  2. package/dist/features/Features01/Features01.d.ts +3 -0
  3. package/dist/features/Features01/Features01.types.d.cts +21 -0
  4. package/dist/features/Features01/Features01.types.d.ts +21 -0
  5. package/dist/features/Features02/Features02.d.cts +3 -0
  6. package/dist/features/Features02/Features02.d.ts +3 -0
  7. package/dist/features/Features02/Features02.types.d.cts +30 -0
  8. package/dist/features/Features02/Features02.types.d.ts +30 -0
  9. package/dist/features/Features03/Features03.d.cts +3 -0
  10. package/dist/features/Features03/Features03.d.ts +3 -0
  11. package/dist/features/Features03/Features03.types.d.cts +24 -0
  12. package/dist/features/Features03/Features03.types.d.ts +24 -0
  13. package/dist/features/Features04/Features04.d.cts +3 -0
  14. package/dist/features/Features04/Features04.d.ts +3 -0
  15. package/dist/features/Features04/Features04.types.d.cts +29 -0
  16. package/dist/features/Features04/Features04.types.d.ts +29 -0
  17. package/dist/features/Features05/Features05.d.cts +3 -0
  18. package/dist/features/Features05/Features05.d.ts +3 -0
  19. package/dist/features/Features05/Features05.types.d.cts +18 -0
  20. package/dist/features/Features05/Features05.types.d.ts +18 -0
  21. package/dist/footers/Footer01/Footer01.d.cts +3 -0
  22. package/dist/footers/Footer01/Footer01.d.ts +3 -0
  23. package/dist/footers/Footer01/Footer01.types.d.cts +32 -0
  24. package/dist/footers/Footer01/Footer01.types.d.ts +32 -0
  25. package/dist/footers/Footer02/Footer02.d.cts +3 -0
  26. package/dist/footers/Footer02/Footer02.d.ts +3 -0
  27. package/dist/footers/Footer02/Footer02.types.d.cts +18 -0
  28. package/dist/footers/Footer02/Footer02.types.d.ts +18 -0
  29. package/dist/footers/Footer03/Footer03.d.cts +3 -0
  30. package/dist/footers/Footer03/Footer03.d.ts +3 -0
  31. package/dist/footers/Footer03/Footer03.types.d.cts +53 -0
  32. package/dist/footers/Footer03/Footer03.types.d.ts +53 -0
  33. package/dist/footers/Footer04/Footer04.d.cts +3 -0
  34. package/dist/footers/Footer04/Footer04.d.ts +3 -0
  35. package/dist/footers/Footer04/Footer04.types.d.cts +18 -0
  36. package/dist/footers/Footer04/Footer04.types.d.ts +18 -0
  37. package/dist/headers/Header01/Header01.d.cts +6 -0
  38. package/dist/headers/Header01/Header01.d.ts +6 -0
  39. package/dist/headers/Header01/Header01.types.d.cts +18 -0
  40. package/dist/headers/Header01/Header01.types.d.ts +18 -0
  41. package/dist/headers/Header02/Header02.d.cts +6 -0
  42. package/dist/headers/Header02/Header02.d.ts +6 -0
  43. package/dist/headers/Header02/Header02.types.d.cts +69 -0
  44. package/dist/headers/Header02/Header02.types.d.ts +69 -0
  45. package/dist/headers/Header03/Header03.d.cts +6 -0
  46. package/dist/headers/Header03/Header03.d.ts +6 -0
  47. package/dist/headers/Header03/Header03.types.d.cts +24 -0
  48. package/dist/headers/Header03/Header03.types.d.ts +24 -0
  49. package/dist/headers/Header04/Header04.d.cts +3 -0
  50. package/dist/headers/Header04/Header04.d.ts +3 -0
  51. package/dist/headers/Header04/Header04.types.d.cts +47 -0
  52. package/dist/headers/Header04/Header04.types.d.ts +47 -0
  53. package/dist/headers/Header05/Header05.d.cts +3 -0
  54. package/dist/headers/Header05/Header05.d.ts +3 -0
  55. package/dist/headers/Header05/Header05.types.d.cts +27 -0
  56. package/dist/headers/Header05/Header05.types.d.ts +27 -0
  57. package/dist/index.cjs +1259 -7
  58. package/dist/index.cjs.map +4 -4
  59. package/dist/index.d.cts +39 -1
  60. package/dist/index.d.ts +39 -1
  61. package/dist/index.js +1272 -20
  62. package/dist/index.js.map +4 -4
  63. package/dist/pricing/Pricing01/Pricing01.d.cts +3 -0
  64. package/dist/pricing/Pricing01/Pricing01.d.ts +3 -0
  65. package/dist/pricing/Pricing01/Pricing01.types.d.cts +43 -0
  66. package/dist/pricing/Pricing01/Pricing01.types.d.ts +43 -0
  67. package/dist/pricing/Pricing02/Pricing02.d.cts +3 -0
  68. package/dist/pricing/Pricing02/Pricing02.d.ts +3 -0
  69. package/dist/pricing/Pricing02/Pricing02.types.d.cts +64 -0
  70. package/dist/pricing/Pricing02/Pricing02.types.d.ts +64 -0
  71. package/dist/pricing/Pricing03/Pricing03.d.cts +3 -0
  72. package/dist/pricing/Pricing03/Pricing03.d.ts +3 -0
  73. package/dist/pricing/Pricing03/Pricing03.types.d.cts +65 -0
  74. package/dist/pricing/Pricing03/Pricing03.types.d.ts +65 -0
  75. package/dist/pricing/Pricing04/Pricing04.d.cts +3 -0
  76. package/dist/pricing/Pricing04/Pricing04.d.ts +3 -0
  77. package/dist/pricing/Pricing04/Pricing04.types.d.cts +38 -0
  78. package/dist/pricing/Pricing04/Pricing04.types.d.ts +38 -0
  79. package/dist/pricing/Pricing05/Pricing05.d.cts +3 -0
  80. package/dist/pricing/Pricing05/Pricing05.d.ts +3 -0
  81. package/dist/pricing/Pricing05/Pricing05.types.d.cts +64 -0
  82. package/dist/pricing/Pricing05/Pricing05.types.d.ts +64 -0
  83. package/dist/shared/BlockActions.d.cts +1 -1
  84. package/dist/shared/BlockActions.d.ts +1 -1
  85. package/dist/shared/BlockBrandLink.d.cts +3 -0
  86. package/dist/shared/BlockBrandLink.d.ts +3 -0
  87. package/dist/shared/FooterColumns.d.cts +3 -0
  88. package/dist/shared/FooterColumns.d.ts +3 -0
  89. package/dist/shared/icons.d.cts +13 -3
  90. package/dist/shared/icons.d.ts +13 -3
  91. package/dist/shared/shared.types.d.cts +49 -1
  92. package/dist/shared/shared.types.d.ts +49 -1
  93. package/dist/styles.css +3428 -333
  94. package/package.json +2 -2
package/dist/index.cjs CHANGED
@@ -20,12 +20,31 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // blocks/src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ Features01: () => Features01,
24
+ Features02: () => Features02,
25
+ Features03: () => Features03,
26
+ Features04: () => Features04,
27
+ Features05: () => Features05,
28
+ Footer01: () => Footer01,
29
+ Footer02: () => Footer02,
30
+ Footer03: () => Footer03,
31
+ Footer04: () => Footer04,
32
+ Header01: () => Header01,
33
+ Header02: () => Header02,
34
+ Header03: () => Header03,
35
+ Header04: () => Header04,
36
+ Header05: () => Header05,
23
37
  Hero01: () => Hero01,
24
38
  Hero02: () => Hero02,
25
39
  Hero03: () => Hero03,
26
40
  Hero04: () => Hero04,
27
41
  Hero05: () => Hero05,
28
- Hero06: () => Hero06
42
+ Hero06: () => Hero06,
43
+ Pricing01: () => Pricing01,
44
+ Pricing02: () => Pricing02,
45
+ Pricing03: () => Pricing03,
46
+ Pricing04: () => Pricing04,
47
+ Pricing05: () => Pricing05
29
48
  });
30
49
  module.exports = __toCommonJS(index_exports);
31
50
 
@@ -36,18 +55,22 @@ var import_ui2 = require("@openwarelabs/ui");
36
55
  // blocks/src/shared/BlockActions.tsx
37
56
  var import_ui = require("@openwarelabs/ui");
38
57
  var import_jsx_runtime = require("react/jsx-runtime");
39
- function BlockActionButton({ action, variant }) {
58
+ function BlockActionButton({ action, variant, size = "lg", className, onAfterClick, fullWidth = false }) {
40
59
  const { label, href, onClick, startIcon, endIcon, target, "aria-label": ariaLabel } = action;
60
+ const click = onClick || onAfterClick ? (event) => {
61
+ onClick?.(event);
62
+ onAfterClick?.();
63
+ } : void 0;
41
64
  if (href !== void 0) {
42
65
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
43
66
  "a",
44
67
  {
45
- className: (0, import_ui.buttonClassName)({ variant, size: "lg", shape: "pill" }),
68
+ className: (0, import_ui.cx)((0, import_ui.buttonClassName)({ variant, size, shape: "pill" }), fullWidth && "ow-button--full", className),
46
69
  href,
47
70
  target,
48
71
  rel: target === "_blank" ? "noopener noreferrer" : void 0,
49
72
  "aria-label": ariaLabel,
50
- onClick,
73
+ onClick: click,
51
74
  children: [
52
75
  startIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ow-button__icon", children: startIcon }) : null,
53
76
  label,
@@ -56,7 +79,21 @@ function BlockActionButton({ action, variant }) {
56
79
  }
57
80
  );
58
81
  }
59
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Button, { variant, shape: "pill", size: "lg", startIcon, endIcon, "aria-label": ariaLabel, onClick, children: label });
82
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
+ import_ui.Button,
84
+ {
85
+ variant,
86
+ shape: "pill",
87
+ size,
88
+ startIcon,
89
+ endIcon,
90
+ "aria-label": ariaLabel,
91
+ onClick: click,
92
+ fullWidth,
93
+ className,
94
+ children: label
95
+ }
96
+ );
60
97
  }
61
98
  function BlockActions({ primary, secondary, className }) {
62
99
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className, children: [
@@ -87,7 +124,7 @@ var import_ui3 = require("@openwarelabs/ui");
87
124
 
88
125
  // blocks/src/shared/icons.tsx
89
126
  var import_jsx_runtime3 = require("react/jsx-runtime");
90
- var icon = (paths) => function BlockIcon({ size = 16 }) {
127
+ var icon = (paths) => function BlockIcon({ size = 16, strokeWidth = 2 }) {
91
128
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
92
129
  "svg",
93
130
  {
@@ -97,7 +134,7 @@ var icon = (paths) => function BlockIcon({ size = 16 }) {
97
134
  viewBox: "0 0 24 24",
98
135
  fill: "none",
99
136
  stroke: "currentColor",
100
- strokeWidth: 2,
137
+ strokeWidth,
101
138
  strokeLinecap: "round",
102
139
  strokeLinejoin: "round",
103
140
  "aria-hidden": "true",
@@ -119,6 +156,57 @@ var DownloadIcon = icon(
119
156
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m7 10 5 5 5-5" })
120
157
  ] })
121
158
  );
159
+ var MenuIcon = icon(
160
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 5h16" }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 12h16" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M4 19h16" })
164
+ ] })
165
+ );
166
+ var XIcon = icon(
167
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
168
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M18 6 6 18" }),
169
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 6 12 12" })
170
+ ] })
171
+ );
172
+ var ChevronDownIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6 9 6 6 6-6" }));
173
+ var ChevronRightIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m9 18 6-6-6-6" }));
174
+ var ArrowRightIcon = icon(
175
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
176
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5 12h14" }),
177
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m12 5 7 7-7 7" })
178
+ ] })
179
+ );
180
+ var MinusIcon = icon(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M5 12h14" }));
181
+ var SunIcon = icon(
182
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
183
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "4" }),
184
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 2v2" }),
185
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M12 20v2" }),
186
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m4.93 4.93 1.41 1.41" }),
187
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m17.66 17.66 1.41 1.41" }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M2 12h2" }),
189
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 12h2" }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m6.34 17.66-1.41 1.41" }),
191
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m19.07 4.93-1.41 1.41" })
192
+ ] })
193
+ );
194
+ var MoonIcon = icon(
195
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" })
196
+ );
197
+ var MonitorIcon = icon(
198
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
199
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
200
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
201
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
202
+ ] })
203
+ );
204
+ var CircleCheckIcon = icon(
205
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
206
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
207
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "m16 9-5.5 5.5L8 12" })
208
+ ] })
209
+ );
122
210
 
123
211
  // blocks/src/heroes/Hero02/Hero02.tsx
124
212
  var import_jsx_runtime4 = require("react/jsx-runtime");
@@ -367,4 +455,1168 @@ function Hero06({
367
455
  visual
368
456
  ] }) });
369
457
  }
458
+
459
+ // blocks/src/headers/Header01/Header01.tsx
460
+ var import_react8 = require("react");
461
+ var import_ui9 = require("@openwarelabs/ui");
462
+
463
+ // blocks/src/shared/BlockBrandLink.tsx
464
+ var import_react7 = require("react");
465
+ var import_ui8 = require("@openwarelabs/ui");
466
+ var import_jsx_runtime9 = require("react/jsx-runtime");
467
+ var BlockBrandLink = (0, import_react7.forwardRef)(function BlockBrandLink2({ brand, className }, ref) {
468
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_ui8.Link, { ref, href: brand.href, variant: "standalone", className, children: [
469
+ brand.logo,
470
+ brand.name
471
+ ] });
472
+ });
473
+
474
+ // blocks/src/headers/Header01/Header01.tsx
475
+ var import_jsx_runtime10 = require("react/jsx-runtime");
476
+ function Header01({ brand, links, primaryAction, secondaryLink, labels = {}, className, ...props }) {
477
+ const [menuOpen, setMenuOpen] = (0, import_react8.useState)(false);
478
+ const menuLabel = labels.menu ?? "Menu";
479
+ (0, import_react8.useEffect)(() => {
480
+ const wide = window.matchMedia("(min-width: 761px)");
481
+ const onChange = () => wide.matches && setMenuOpen(false);
482
+ wide.addEventListener("change", onChange);
483
+ return () => wide.removeEventListener("change", onChange);
484
+ }, []);
485
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_ui9.cx)("ow-header01", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
486
+ import_ui9.SiteHeader,
487
+ {
488
+ brand: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(BlockBrandLink, { brand, className: "ow-header01__brand" }),
489
+ nav: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ui9.Link, { href: link.href, variant: "standalone", "aria-current": link.current ? "page" : void 0, children: link.label }, index)),
490
+ actions: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
491
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
492
+ import_ui9.Link,
493
+ {
494
+ href: secondaryLink.href,
495
+ variant: "standalone",
496
+ className: "ow-header01__sign-in",
497
+ "aria-current": secondaryLink.current ? "page" : void 0,
498
+ children: secondaryLink.label
499
+ }
500
+ ) : null,
501
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "sm" }),
502
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ow-header01__phone-menu", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
503
+ import_ui9.Popover,
504
+ {
505
+ "aria-label": menuLabel,
506
+ placement: "bottom-end",
507
+ width: 240,
508
+ open: menuOpen,
509
+ onOpenChange: setMenuOpen,
510
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ui9.Button, { variant: "ghost", shape: "pill", size: "sm", iconOnly: true, "aria-label": menuLabel, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MenuIcon, { size: 16 }) }),
511
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("nav", { className: "ow-header01__menu", "aria-label": "Main", children: [
512
+ links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
513
+ import_ui9.Link,
514
+ {
515
+ href: link.href,
516
+ variant: "standalone",
517
+ className: "ow-header01__menu-link",
518
+ "aria-current": link.current ? "page" : void 0,
519
+ onClick: () => setMenuOpen(false),
520
+ children: link.label
521
+ },
522
+ index
523
+ )),
524
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
525
+ import_ui9.Link,
526
+ {
527
+ href: secondaryLink.href,
528
+ variant: "standalone",
529
+ className: "ow-header01__menu-link ow-header01__menu-link--sign-in",
530
+ onClick: () => setMenuOpen(false),
531
+ children: secondaryLink.label
532
+ }
533
+ ) : null
534
+ ] })
535
+ }
536
+ ) })
537
+ ] })
538
+ }
539
+ ) });
540
+ }
541
+
542
+ // blocks/src/headers/Header02/Header02.tsx
543
+ var import_react9 = require("react");
544
+ var import_ui10 = require("@openwarelabs/ui");
545
+ var import_jsx_runtime11 = require("react/jsx-runtime");
546
+ var navigateTo = (href) => window.location.assign(href);
547
+ function PanelContent({ panel, onNavigate }) {
548
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ow-header02__product", children: [
549
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "ow-header02__features", children: panel.features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ui10.Link, { href: feature.href, variant: "standalone", className: "ow-header02__feature", onClick: onNavigate, children: [
550
+ feature.icon ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ow-header02__feature-icon", "aria-hidden": "true", children: feature.icon }) : null,
551
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ow-header02__feature-text", children: [
552
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Text, { variant: "label", children: feature.title }),
553
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Text, { variant: "caption", children: feature.description })
554
+ ] })
555
+ ] }) }, index)) }),
556
+ panel.highlight ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ui10.Link, { href: panel.highlight.href, variant: "standalone", className: "ow-header02__news", onClick: onNavigate, children: [
557
+ panel.highlight.badge ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Badge, { size: "sm", variant: "active", children: panel.highlight.badge }) : null,
558
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Text, { variant: "label", children: panel.highlight.title }),
559
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ui10.Text, { as: "span", tone: "primary", className: "ow-header02__news-link", children: [
560
+ panel.highlight.linkLabel,
561
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ArrowRightIcon, { size: 14 })
562
+ ] })
563
+ ] }) : null
564
+ ] });
565
+ }
566
+ function Header02({
567
+ brand,
568
+ panel,
569
+ menus = [],
570
+ links = [],
571
+ primaryAction,
572
+ secondaryLink,
573
+ onNavigate = navigateTo,
574
+ defaultPanelOpen = false,
575
+ labels = {},
576
+ className,
577
+ ...props
578
+ }) {
579
+ const [productOpen, setProductOpen] = (0, import_react9.useState)(defaultPanelOpen);
580
+ const [phoneOpen, setPhoneOpen] = (0, import_react9.useState)(false);
581
+ const phoneId = (0, import_react9.useId)();
582
+ const closePhone = () => setPhoneOpen(false);
583
+ (0, import_react9.useEffect)(() => {
584
+ const wide = window.matchMedia("(min-width: 761px)");
585
+ const onChange = () => wide.matches ? setPhoneOpen(false) : setProductOpen(false);
586
+ wide.addEventListener("change", onChange);
587
+ return () => wide.removeEventListener("change", onChange);
588
+ }, []);
589
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: (0, import_ui10.cx)("ow-header02", className), ...props, children: [
590
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ow-header02__inner", children: [
591
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BlockBrandLink, { brand, className: "ow-header02__brand" }),
592
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("nav", { className: "ow-header02__nav", "aria-label": "Main", children: [
593
+ panel ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
594
+ import_ui10.Popover,
595
+ {
596
+ className: "ow-header02__popover",
597
+ "aria-label": panel.label,
598
+ width: 720,
599
+ autoFocus: false,
600
+ open: productOpen,
601
+ onOpenChange: setProductOpen,
602
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Button, { variant: "ghost", shape: "pill", size: "sm", className: "ow-header02__item", endIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronDownIcon, { size: 14 }), children: panel.label }),
603
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PanelContent, { panel, onNavigate: () => setProductOpen(false) })
604
+ }
605
+ ) : null,
606
+ menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
607
+ import_ui10.Menu,
608
+ {
609
+ label: menu.label,
610
+ width: 220,
611
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Button, { variant: "ghost", shape: "pill", size: "sm", className: "ow-header02__item", endIcon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChevronDownIcon, { size: 14 }), children: menu.label }),
612
+ children: menu.groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react9.Fragment, { children: [
613
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.MenuSeparator, {}) : null,
614
+ group.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.MenuItem, { icon: entry.icon, onSelect: () => onNavigate(entry.href), children: entry.label }, entry.label))
615
+ ] }, index))
616
+ },
617
+ menu.label
618
+ )),
619
+ links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
620
+ "a",
621
+ {
622
+ href: link.href,
623
+ className: (0, import_ui10.cx)((0, import_ui10.buttonClassName)({ variant: "ghost", shape: "pill", size: "sm" }), "ow-header02__item"),
624
+ "aria-current": link.current ? "page" : void 0,
625
+ children: link.label
626
+ },
627
+ index
628
+ ))
629
+ ] }),
630
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ow-header02__actions", children: [
631
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
632
+ "a",
633
+ {
634
+ href: secondaryLink.href,
635
+ className: (0, import_ui10.cx)((0, import_ui10.buttonClassName)({ variant: "ghost", shape: "pill", size: "sm" }), "ow-header02__item ow-header02__sign-in"),
636
+ children: secondaryLink.label
637
+ }
638
+ ) : null,
639
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "sm" }),
640
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
641
+ import_ui10.Button,
642
+ {
643
+ className: "ow-header02__toggle",
644
+ variant: "ghost",
645
+ size: "sm",
646
+ iconOnly: true,
647
+ "aria-label": labels.menu ?? "Menu",
648
+ "aria-expanded": phoneOpen,
649
+ "aria-controls": phoneId,
650
+ onClick: () => setPhoneOpen((open) => !open),
651
+ children: phoneOpen ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(XIcon, { size: 18 }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MenuIcon, { size: 18 })
652
+ }
653
+ )
654
+ ] })
655
+ ] }),
656
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("nav", { id: phoneId, className: "ow-header02__panel", "aria-label": "Main", hidden: !phoneOpen, children: [
657
+ panel ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
658
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Text, { variant: "overline", as: "p", className: "ow-header02__panel-label", children: panel.label }),
659
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "ow-header02__panel-list", children: panel.features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_ui10.Link, { href: feature.href, variant: "standalone", className: "ow-header02__panel-link", onClick: closePhone, children: [
660
+ feature.icon,
661
+ feature.title
662
+ ] }) }, index)) })
663
+ ] }) : null,
664
+ menus.map((menu) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react9.Fragment, { children: [
665
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Text, { variant: "overline", as: "p", className: "ow-header02__panel-label", children: menu.label }),
666
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "ow-header02__panel-list ow-header02__panel-list--columns", children: menu.groups.flat().map((entry) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_ui10.Link, { href: entry.href, variant: "standalone", className: "ow-header02__panel-link", onClick: closePhone, children: entry.label }) }, entry.label)) })
667
+ ] }, menu.label)),
668
+ links.length ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("ul", { className: "ow-header02__panel-list ow-header02__panel-list--ruled", children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
669
+ import_ui10.Link,
670
+ {
671
+ href: link.href,
672
+ variant: "standalone",
673
+ className: "ow-header02__panel-link",
674
+ "aria-current": link.current ? "page" : void 0,
675
+ onClick: closePhone,
676
+ children: link.label
677
+ }
678
+ ) }, index)) }) : null,
679
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("a", { href: secondaryLink.href, className: (0, import_ui10.cx)((0, import_ui10.buttonClassName)({ shape: "pill" }), "ow-button--full"), onClick: closePhone, children: secondaryLink.label }) : null
680
+ ] })
681
+ ] });
682
+ }
683
+
684
+ // blocks/src/headers/Header03/Header03.tsx
685
+ var import_ui11 = require("@openwarelabs/ui");
686
+ var import_jsx_runtime12 = require("react/jsx-runtime");
687
+ function NavLink({ link }) {
688
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ui11.Link, { href: link.href, variant: "standalone", className: "ow-header03__link", "aria-current": link.current ? "page" : void 0, children: link.label });
689
+ }
690
+ function Header03({ brand, start, end = [], primaryAction, secondaryLink, labels = {}, className, ...props }) {
691
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: (0, import_ui11.cx)("ow-header03", className), ...props, children: [
692
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ow-header03__inner", children: [
693
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { className: "ow-header03__nav", "aria-label": labels.start ?? "Primary", children: start.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NavLink, { link }, index)) }),
694
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ui11.Link, { href: secondaryLink.href, variant: "standalone", className: "ow-header03__link ow-header03__phone-only", children: secondaryLink.label }) : null,
695
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BlockBrandLink, { brand, className: "ow-header03__brand" }),
696
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ow-header03__end", children: [
697
+ end.length ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { className: "ow-header03__nav", "aria-label": labels.end ?? "More", children: end.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NavLink, { link }, index)) }) : null,
698
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ow-header03__actions", children: [
699
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NavLink, { link: secondaryLink }) : null,
700
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "sm" })
701
+ ] })
702
+ ] })
703
+ ] }),
704
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_ui11.ScrollShadow, { orientation: "horizontal", size: 24, className: "ow-header03__phone-only ow-header03__phone-nav", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { "aria-label": labels.all ?? "Main", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ul", { className: "ow-header03__phone-links", children: [...start, ...end].map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(NavLink, { link }) }, index)) }) }) })
705
+ ] });
706
+ }
707
+
708
+ // blocks/src/headers/Header04/Header04.tsx
709
+ var import_react10 = require("react");
710
+ var import_ui12 = require("@openwarelabs/ui");
711
+ var import_jsx_runtime13 = require("react/jsx-runtime");
712
+ var navigateTo2 = (href) => window.location.assign(href);
713
+ function Header04({
714
+ announcement,
715
+ onDismiss,
716
+ defaultDismissed = false,
717
+ brand,
718
+ links,
719
+ primaryAction,
720
+ secondaryLink,
721
+ onNavigate = navigateTo2,
722
+ labels = {},
723
+ className,
724
+ ...props
725
+ }) {
726
+ const [closed, setClosed] = (0, import_react10.useState)(defaultDismissed);
727
+ const brandRef = (0, import_react10.useRef)(null);
728
+ const dismiss = () => {
729
+ setClosed(true);
730
+ onDismiss?.();
731
+ brandRef.current?.focus();
732
+ };
733
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_ui12.cx)("ow-header04", className), ...props, children: [
734
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
735
+ "aside",
736
+ {
737
+ className: "ow-header04__notice",
738
+ "aria-label": labels.announcement ?? "Announcement",
739
+ "data-closed": closed || void 0,
740
+ "aria-hidden": closed || void 0,
741
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ow-header04__clip", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ow-header04__notice-inner", children: [
742
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_ui12.Text, { className: "ow-header04__message", children: [
743
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ow-header04__dot", "aria-hidden": "true" }),
744
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("strong", { children: announcement.title }),
745
+ announcement.description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
746
+ " ",
747
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ow-header04__detail", children: announcement.description })
748
+ ] }) : null,
749
+ announcement.link ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_ui12.Link, { href: announcement.link.href, className: "ow-header04__link", children: [
750
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ow-header04__link-wide", children: announcement.link.label }),
751
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ow-header04__link-narrow", children: announcement.link.shortLabel ?? announcement.link.label }),
752
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ArrowRightIcon, { size: 14 })
753
+ ] }) : null
754
+ ] }),
755
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui12.CloseButton, { size: "sm", label: labels.dismiss ?? "Dismiss the announcement", onClick: dismiss })
756
+ ] }) })
757
+ }
758
+ ),
759
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("header", { className: "ow-header04__header", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ow-header04__inner", children: [
760
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(BlockBrandLink, { ref: brandRef, brand, className: "ow-header04__brand" }),
761
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "ow-header04__nav", "aria-label": "Main", children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
762
+ import_ui12.Link,
763
+ {
764
+ href: link.href,
765
+ variant: "standalone",
766
+ className: "ow-header04__link-plain",
767
+ "aria-current": link.current ? "page" : void 0,
768
+ children: link.label
769
+ },
770
+ index
771
+ )) }),
772
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ow-header04__actions", children: [
773
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui12.Link, { href: secondaryLink.href, variant: "standalone", className: "ow-header04__link-plain", children: secondaryLink.label }) : null,
774
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "sm" }),
775
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ow-header04__phone-menu", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
776
+ import_ui12.Menu,
777
+ {
778
+ label: labels.menu ?? "Menu",
779
+ align: "end",
780
+ width: 220,
781
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui12.Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": labels.menu ?? "Menu", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MenuIcon, { size: 18 }) }),
782
+ children: [
783
+ links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui12.MenuItem, { onSelect: () => onNavigate(link.href), children: link.label }, index)),
784
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
785
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui12.MenuSeparator, {}),
786
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_ui12.MenuItem, { onSelect: () => onNavigate(secondaryLink.href), children: secondaryLink.label })
787
+ ] }) : null
788
+ ]
789
+ }
790
+ ) })
791
+ ] })
792
+ ] }) })
793
+ ] });
794
+ }
795
+
796
+ // blocks/src/headers/Header05/Header05.tsx
797
+ var import_react11 = require("react");
798
+ var import_ui13 = require("@openwarelabs/ui");
799
+ var import_jsx_runtime14 = require("react/jsx-runtime");
800
+ var narrow = "(max-width: 1024px)";
801
+ function Header05({ brand, links, more, primaryAction, secondaryLink, defaultOpen = false, labels = {}, className, ...props }) {
802
+ const [open, setOpen] = (0, import_react11.useState)(defaultOpen);
803
+ const moreId = (0, import_react11.useId)();
804
+ (0, import_react11.useEffect)(() => {
805
+ const query = window.matchMedia(narrow);
806
+ const onChange = () => !query.matches && setOpen(false);
807
+ query.addEventListener("change", onChange);
808
+ return () => query.removeEventListener("change", onChange);
809
+ }, []);
810
+ const close = () => setOpen(false);
811
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
812
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("header", { className: (0, import_ui13.cx)("ow-header05", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "ow-header05__inner", children: [
813
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BlockBrandLink, { brand, className: "ow-header05__brand" }),
814
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("nav", { className: "ow-header05__nav", "aria-label": "Main", children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
815
+ import_ui13.Link,
816
+ {
817
+ href: link.href,
818
+ variant: "standalone",
819
+ className: "ow-header05__link",
820
+ "aria-current": link.current ? "page" : void 0,
821
+ children: link.label
822
+ },
823
+ index
824
+ )) }),
825
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "ow-header05__actions", children: [
826
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui13.Link, { href: secondaryLink.href, variant: "standalone", className: "ow-header05__link", children: secondaryLink.label }) : null,
827
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "sm" }),
828
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
829
+ import_ui13.Button,
830
+ {
831
+ className: "ow-header05__open",
832
+ variant: "ghost",
833
+ size: "sm",
834
+ iconOnly: true,
835
+ "aria-label": labels.open ?? "Open menu",
836
+ "aria-haspopup": "dialog",
837
+ "aria-expanded": open,
838
+ onClick: () => setOpen(true),
839
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(MenuIcon, { size: 18 })
840
+ }
841
+ )
842
+ ] })
843
+ ] }) }),
844
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
845
+ import_ui13.Drawer,
846
+ {
847
+ className: "ow-header05__drawer",
848
+ open,
849
+ onClose: close,
850
+ title: labels.title ?? "Menu",
851
+ side: "right",
852
+ size: 320,
853
+ footer: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
854
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", { href: secondaryLink.href, className: (0, import_ui13.buttonClassName)({ shape: "pill" }), onClick: close, children: secondaryLink.label }) : null,
855
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "md", onAfterClick: close })
856
+ ] }),
857
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("nav", { "aria-label": "Main", children: [
858
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "ow-header05__drawer-list", children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
859
+ import_ui13.Link,
860
+ {
861
+ href: link.href,
862
+ variant: "standalone",
863
+ className: "ow-header05__drawer-link",
864
+ "aria-current": link.current ? "page" : void 0,
865
+ onClick: close,
866
+ children: [
867
+ link.label,
868
+ link.current ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ow-header05__current", "aria-hidden": "true" }) : null,
869
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ChevronRightIcon, { size: 16 })
870
+ ]
871
+ }
872
+ ) }, index)) }),
873
+ more ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "ow-header05__more", children: [
874
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui13.Text, { variant: "overline", as: "p", className: "ow-header05__more-label", id: moreId, children: more.title }),
875
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("ul", { className: "ow-header05__more-list", "aria-labelledby": moreId, children: more.links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ui13.Link, { href: link.href, variant: "standalone", className: "ow-header05__more-link", onClick: close, children: link.label }) }, index)) })
876
+ ] }) : null
877
+ ] })
878
+ }
879
+ )
880
+ ] });
881
+ }
882
+
883
+ // blocks/src/pricing/Pricing01/Pricing01.tsx
884
+ var import_react12 = require("react");
885
+ var import_ui14 = require("@openwarelabs/ui");
886
+ var import_jsx_runtime15 = require("react/jsx-runtime");
887
+ function Pricing01({ eyebrow, title, description, plans, enterprise, note, className, ...props }) {
888
+ const id = (0, import_react12.useId)();
889
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("section", { className: (0, import_ui14.cx)("ow-pricing01", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ow-pricing01__inner", children: [
890
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.SectionHeading, { align: "center", eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
891
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "ow-pricing01__grid", children: plans.map((plan, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
892
+ import_ui14.Card,
893
+ {
894
+ padding: "none",
895
+ className: "ow-pricing01__card",
896
+ "data-recommended": plan.recommended || void 0,
897
+ "aria-labelledby": `${id}-plan-${index}`,
898
+ role: "group",
899
+ children: [
900
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ow-pricing01__head", children: [
901
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ow-pricing01__name-row", children: [
902
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Text, { variant: "card-title", id: `${id}-plan-${index}`, children: plan.name }),
903
+ plan.badge ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Badge, { size: "sm", variant: "active", children: plan.badge }) : null
904
+ ] }),
905
+ plan.summary ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Text, { variant: "copy", className: "ow-pricing01__summary", children: plan.summary }) : null,
906
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_ui14.Text, { as: "p", variant: "body", tone: "muted", className: "ow-pricing01__price", children: [
907
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Text, { as: "span", variant: "section-title", tone: "default", className: "ow-pricing01__amount", children: plan.price }),
908
+ plan.unit
909
+ ] }),
910
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(BlockActionButton, { action: plan.action, variant: plan.recommended ? "primary" : "secondary", size: "md", fullWidth: true })
911
+ ] }),
912
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ow-pricing01__body", children: [
913
+ plan.featuresTitle ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Text, { as: "p", variant: "label", children: plan.featuresTitle }) : null,
914
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "ow-pricing01__features", children: plan.features.map((feature, featureIndex) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_ui14.Text, { as: "li", variant: "body", tone: "soft", children: [
915
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CheckIcon, { size: 16 }),
916
+ feature
917
+ ] }, featureIndex)) })
918
+ ] })
919
+ ]
920
+ },
921
+ index
922
+ )) }),
923
+ enterprise ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ow-pricing01__enterprise", children: [
924
+ enterprise.icon ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "ow-pricing01__enterprise-icon", "aria-hidden": "true", children: enterprise.icon }) : null,
925
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_ui14.Text, { variant: "copy", className: "ow-pricing01__enterprise-text", children: [
926
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Text, { as: "strong", variant: "label", tone: "default", children: enterprise.title }),
927
+ " ",
928
+ enterprise.description
929
+ ] }),
930
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_ui14.Link, { href: enterprise.link.href, variant: "standalone", className: "ow-pricing01__enterprise-link", children: [
931
+ enterprise.link.label,
932
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ArrowRightIcon, { size: 14 })
933
+ ] })
934
+ ] }) : null,
935
+ note ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_ui14.Text, { as: "p", variant: "caption", align: "center", className: "ow-pricing01__note", children: note }) : null
936
+ ] }) });
937
+ }
938
+
939
+ // blocks/src/pricing/Pricing02/Pricing02.tsx
940
+ var import_react13 = require("react");
941
+ var import_ui15 = require("@openwarelabs/ui");
942
+ var import_jsx_runtime16 = require("react/jsx-runtime");
943
+ var priceFor = (plan, period) => "amount" in plan.price ? plan.price : plan.price[period];
944
+ var includes = (name) => `${name} includes`;
945
+ function Pricing02({
946
+ eyebrow,
947
+ title,
948
+ description,
949
+ plans,
950
+ periodNote,
951
+ defaultPeriod = "monthly",
952
+ onPeriodChange,
953
+ note,
954
+ labels = {},
955
+ className,
956
+ ...props
957
+ }) {
958
+ const [period, setPeriod] = (0, import_react13.useState)(defaultPeriod);
959
+ const id = (0, import_react13.useId)();
960
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("section", { className: (0, import_ui15.cx)("ow-pricing02", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ow-pricing02__inner", children: [
961
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ow-pricing02__header", children: [
962
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.SectionHeading, { eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
963
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ow-pricing02__switch", children: [
964
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
965
+ import_ui15.SegmentedControl,
966
+ {
967
+ "aria-label": labels.period ?? "Billing period",
968
+ value: period,
969
+ onChange: (value) => {
970
+ setPeriod(value);
971
+ onPeriodChange?.(value);
972
+ },
973
+ options: [
974
+ { value: "monthly", label: labels.monthly ?? "Monthly" },
975
+ { value: "yearly", label: labels.yearly ?? "Yearly" }
976
+ ]
977
+ }
978
+ ),
979
+ periodNote ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.Text, { as: "p", variant: "caption", children: periodNote }) : null
980
+ ] })
981
+ ] }),
982
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.VisuallyHidden, { "aria-live": "polite", children: period === "yearly" ? labels.showingYearly ?? "Showing yearly prices." : labels.showingMonthly ?? "Showing monthly prices." }),
983
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ow-pricing02__panel", children: plans.map((plan, index) => {
984
+ const price = priceFor(plan, period);
985
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ow-pricing02__plan", "data-popular": plan.recommended || void 0, children: [
986
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ow-pricing02__name-row", children: [
987
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.Text, { variant: "card-title", children: plan.name }),
988
+ plan.badge ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.Badge, { size: "sm", variant: "active", children: plan.badge }) : null
989
+ ] }),
990
+ plan.summary ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.Text, { variant: "copy", className: "ow-pricing02__summary", children: plan.summary }) : null,
991
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ow-pricing02__price", children: [
992
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_ui15.Text, { as: "p", variant: "body", tone: "muted", className: "ow-pricing02__figure", children: [
993
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
994
+ import_ui15.Text,
995
+ {
996
+ as: "span",
997
+ variant: "section-title",
998
+ tone: "default",
999
+ className: price.custom ? "ow-pricing02__amount ow-pricing02__amount--text" : "ow-pricing02__amount",
1000
+ children: price.amount
1001
+ },
1002
+ price.amount
1003
+ ),
1004
+ price.unit
1005
+ ] }),
1006
+ price.billing ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.Text, { as: "p", variant: "caption", className: "ow-pricing02__billing", children: price.billing }) : null
1007
+ ] }),
1008
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(BlockActionButton, { action: plan.action, variant: plan.recommended ? "primary" : "secondary", size: "md", fullWidth: true }),
1009
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "ow-pricing02__features", "aria-label": (labels.includes ?? includes)(plan.name), children: plan.features.map((feature, featureIndex) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_ui15.Text, { as: "li", variant: "body", tone: "soft", children: [
1010
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckIcon, { size: 16 }),
1011
+ feature
1012
+ ] }, featureIndex)) })
1013
+ ] }, index);
1014
+ }) }),
1015
+ note ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_ui15.Text, { as: "p", variant: "caption", align: "center", className: "ow-pricing02__note", children: note }) : null
1016
+ ] }) });
1017
+ }
1018
+
1019
+ // blocks/src/pricing/Pricing03/Pricing03.tsx
1020
+ var import_react14 = require("react");
1021
+ var import_ui16 = require("@openwarelabs/ui");
1022
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1023
+ var phoneQuery = "(max-width: 760px)";
1024
+ function useIsPhone() {
1025
+ return (0, import_react14.useSyncExternalStore)(
1026
+ (onChange) => {
1027
+ const list = window.matchMedia(phoneQuery);
1028
+ list.addEventListener("change", onChange);
1029
+ return () => list.removeEventListener("change", onChange);
1030
+ },
1031
+ () => window.matchMedia(phoneQuery).matches,
1032
+ () => false
1033
+ );
1034
+ }
1035
+ var caption = (title) => `${title}, by plan`;
1036
+ function Pricing03({ eyebrow, title, description, plans, groups, pricesNote, defaultPlan, note, labels = {}, className, ...props }) {
1037
+ const id = (0, import_react14.useId)();
1038
+ const isPhone = useIsPhone();
1039
+ const [picked, setPicked] = (0, import_react14.useState)(() => defaultPlan ?? (plans.find((plan) => plan.recommended) ?? plans[0])?.id ?? "");
1040
+ const shown = isPhone ? plans.filter((plan) => plan.id === picked) : plans;
1041
+ const cell = (value) => {
1042
+ if (value === true) {
1043
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ow-pricing03__yes", children: [
1044
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CheckIcon, { size: 14, strokeWidth: 2.5 }),
1045
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.VisuallyHidden, { children: labels.included ?? "Included" })
1046
+ ] });
1047
+ }
1048
+ if (value === false) {
1049
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ow-pricing03__no", children: [
1050
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MinusIcon, { size: 16 }),
1051
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.VisuallyHidden, { children: labels.notIncluded ?? "Not included" })
1052
+ ] });
1053
+ }
1054
+ return value;
1055
+ };
1056
+ const columns = (groupTitle) => [
1057
+ {
1058
+ key: "feature",
1059
+ header: groupTitle,
1060
+ render: (row) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_ui16.Text, { as: "span", variant: "body", className: "ow-pricing03__feature", children: [
1061
+ row.feature,
1062
+ row.note ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.Text, { variant: "caption", className: "ow-pricing03__feature-note", children: row.note }) : null
1063
+ ] })
1064
+ },
1065
+ ...shown.map((plan) => ({
1066
+ key: plan.id,
1067
+ header: plan.name,
1068
+ render: (row) => cell(row.values[plan.id])
1069
+ }))
1070
+ ];
1071
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("section", { className: (0, import_ui16.cx)("ow-pricing03", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ow-pricing03__inner", children: [
1072
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.SectionHeading, { align: "center", eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1073
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ow-pricing03__picker", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1074
+ import_ui16.SegmentedControl,
1075
+ {
1076
+ "aria-label": labels.picker ?? "Plan to compare",
1077
+ fullWidth: true,
1078
+ value: picked,
1079
+ onChange: setPicked,
1080
+ options: plans.map((plan) => ({ value: plan.id, label: plan.name }))
1081
+ }
1082
+ ) }),
1083
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ow-pricing03__plans", children: [
1084
+ pricesNote ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.Text, { as: "p", variant: "caption", className: "ow-pricing03__plans-label", children: pricesNote }) : null,
1085
+ shown.map((plan) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ow-pricing03__plan", children: [
1086
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_ui16.Text, { as: "p", variant: "card-title", className: "ow-pricing03__plan-name", children: [
1087
+ plan.name,
1088
+ plan.badge ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.Badge, { size: "sm", variant: "active", children: plan.badge }) : null
1089
+ ] }),
1090
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_ui16.Text, { as: "p", variant: "caption", className: "ow-pricing03__plan-price", children: [
1091
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.Text, { as: "strong", variant: "label", tone: "default", className: "ow-pricing03__plan-amount", children: plan.price }),
1092
+ " ",
1093
+ plan.unit
1094
+ ] }),
1095
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BlockActionButton, { action: plan.action, variant: plan.recommended ? "primary" : "secondary", size: "sm" })
1096
+ ] }, plan.id))
1097
+ ] }),
1098
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ow-pricing03__groups", children: groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1099
+ import_ui16.Table,
1100
+ {
1101
+ className: "ow-pricing03__group",
1102
+ caption: (labels.caption ?? caption)(group.title),
1103
+ hideCaption: true,
1104
+ columns: columns(group.title),
1105
+ rows: group.rows.map((row, index) => ({ ...row, id: `${group.title}-${index}` }))
1106
+ },
1107
+ group.title
1108
+ )) }),
1109
+ note ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui16.Text, { as: "p", variant: "caption", align: "center", className: "ow-pricing03__note", children: note }) : null
1110
+ ] }) });
1111
+ }
1112
+
1113
+ // blocks/src/pricing/Pricing04/Pricing04.tsx
1114
+ var import_react15 = require("react");
1115
+ var import_ui17 = require("@openwarelabs/ui");
1116
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1117
+ function Pricing04({ eyebrow, title, description, product, offer, promises, className, ...props }) {
1118
+ const id = (0, import_react15.useId)();
1119
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("section", { className: (0, import_ui17.cx)("ow-pricing04", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ow-pricing04__inner", children: [
1120
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.SectionHeading, { align: "center", eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1121
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui17.Card, { padding: "none", className: "ow-pricing04__card", children: [
1122
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ow-pricing04__details", children: [
1123
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { variant: "heading", children: product.name }),
1124
+ product.description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { variant: "copy", className: "ow-pricing04__description", children: product.description }) : null,
1125
+ product.featuresTitle ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { as: "p", variant: "label", tone: "primary", className: "ow-pricing04__included", children: product.featuresTitle }) : null,
1126
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "ow-pricing04__features", children: product.features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui17.Text, { as: "li", variant: "body", tone: "soft", children: [
1127
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CheckIcon, { size: 16 }),
1128
+ feature
1129
+ ] }, index)) })
1130
+ ] }),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ow-pricing04__offer", children: [
1132
+ offer.label ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { as: "p", variant: "label", tone: "soft", children: offer.label }) : null,
1133
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui17.Text, { as: "p", variant: "label", tone: "muted", className: "ow-pricing04__price", children: [
1134
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { as: "span", variant: "page-title", tone: "default", className: "ow-pricing04__amount", children: offer.price }),
1135
+ offer.currency
1136
+ ] }),
1137
+ offer.unit ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { variant: "body", tone: "muted", className: "ow-pricing04__unit", children: offer.unit }) : null,
1138
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BlockActionButton, { action: offer.action, variant: "primary", fullWidth: true }),
1139
+ offer.note ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_ui17.Text, { as: "p", variant: "caption", className: "ow-pricing04__fine", children: offer.note }) : null
1140
+ ] })
1141
+ ] }),
1142
+ promises?.length ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("ul", { className: "ow-pricing04__promises", children: promises.map((promise, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_ui17.Text, { as: "li", variant: "body", tone: "muted", children: [
1143
+ promise.icon,
1144
+ promise.text
1145
+ ] }, index)) }) : null
1146
+ ] }) });
1147
+ }
1148
+
1149
+ // blocks/src/pricing/Pricing05/Pricing05.tsx
1150
+ var import_react16 = require("react");
1151
+ var import_ui18 = require("@openwarelabs/ui");
1152
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1153
+ function estimate(tiers, units) {
1154
+ const lines = tiers.map((tier) => {
1155
+ const count = Math.max(0, Math.min(units, tier.to) - tier.from);
1156
+ return { tier, count, cost: count * tier.price };
1157
+ });
1158
+ return { lines, total: lines.reduce((sum, line) => sum + line.cost, 0) };
1159
+ }
1160
+ var capitalise = (text) => text.charAt(0).toUpperCase() + text.slice(1);
1161
+ function Pricing05({
1162
+ eyebrow,
1163
+ title,
1164
+ description,
1165
+ tiers,
1166
+ aside,
1167
+ estimate: words,
1168
+ max,
1169
+ step = max / 200,
1170
+ defaultValue,
1171
+ marks = [0, max / 4, max / 2, max * 3 / 4, max],
1172
+ currency = "EUR",
1173
+ locale,
1174
+ action,
1175
+ note,
1176
+ labels = {},
1177
+ className,
1178
+ ...props
1179
+ }) {
1180
+ const id = (0, import_react16.useId)();
1181
+ const [units, setUnits] = (0, import_react16.useState)(defaultValue);
1182
+ const { lines, total } = estimate(tiers, units);
1183
+ const current = tiers.findIndex((tier) => units <= tier.to);
1184
+ const unit = labels.unit ?? "unit";
1185
+ const plural = labels.units ?? "units";
1186
+ const perMonth = labels.perMonth ?? `${plural} a month`;
1187
+ const format = (0, import_react16.useMemo)(() => {
1188
+ const number = new Intl.NumberFormat(locale);
1189
+ const money = new Intl.NumberFormat(locale, { style: "currency", currency });
1190
+ const unitPrice = new Intl.NumberFormat(locale, { style: "currency", currency, minimumFractionDigits: 2, maximumFractionDigits: 3 });
1191
+ return { number: (value) => number.format(value), money: (value) => money.format(value), unitPrice: (value) => unitPrice.format(value) };
1192
+ }, [locale, currency]);
1193
+ const rangeLabel = (tier) => {
1194
+ if (tier.from === 0) return `First ${format.number(tier.to)} ${plural}`;
1195
+ if (tier.to === Infinity) return `Over ${format.number(tier.from)}`;
1196
+ return `${format.number(tier.from + 1)} to ${format.number(tier.to)}`;
1197
+ };
1198
+ const mark = (value) => value === 0 ? "0" : value >= 1e3 && value % 1e3 === 0 ? `${value / 1e3}k` : format.number(value);
1199
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("section", { className: (0, import_ui18.cx)("ow-pricing05", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "ow-pricing05__inner", children: [
1200
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
1201
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.SectionHeading, { eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1202
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("ul", { className: "ow-pricing05__tiers", "aria-label": labels.tiers ?? `Price per ${unit}`, children: tiers.map((tier, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("li", { className: "ow-pricing05__tier", "data-current": index === current || void 0, children: [
1203
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "ow-pricing05__tier-dot", "aria-hidden": "true" }),
1204
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { variant: index === current ? "label" : "body", tone: index === current ? "default" : "soft", children: rangeLabel(tier) }),
1205
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { variant: "label", className: "ow-pricing05__tier-price", children: tier.price === 0 ? labels.free ?? "Free" : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
1206
+ format.unitPrice(tier.price),
1207
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_ui18.Text, { as: "small", variant: "caption", className: "ow-pricing05__tier-unit", children: [
1208
+ "a ",
1209
+ unit
1210
+ ] })
1211
+ ] }) })
1212
+ ] }, tier.from)) }),
1213
+ aside ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { variant: "copy", className: "ow-pricing05__aside", children: aside }) : null
1214
+ ] }),
1215
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_ui18.Card, { padding: "none", className: "ow-pricing05__card", children: [
1216
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { variant: "card-title", children: words.title }),
1217
+ words.description ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { variant: "copy", className: "ow-pricing05__card-intro", children: words.description }) : null,
1218
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_ui18.Text, { as: "p", variant: "heading", className: "ow-pricing05__runs", "aria-hidden": "true", children: [
1219
+ format.number(units),
1220
+ " ",
1221
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { as: "small", variant: "body", tone: "muted", className: "ow-pricing05__runs-unit", children: perMonth })
1222
+ ] }),
1223
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1224
+ import_ui18.Slider,
1225
+ {
1226
+ "aria-label": labels.slider ?? capitalise(perMonth),
1227
+ showValue: false,
1228
+ min: 0,
1229
+ max,
1230
+ step,
1231
+ value: units,
1232
+ onChange: setUnits,
1233
+ formatValue: (value) => `${format.number(value)} ${plural}, about ${format.money(estimate(tiers, value).total)} a month`
1234
+ }
1235
+ ),
1236
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ow-pricing05__scale", "aria-hidden": "true", children: marks.map((value) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: mark(value) }, value)) }),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "ow-pricing05__breakdown", children: lines.map(({ tier, count, cost }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_ui18.Text, { as: "div", variant: "body", tone: "soft", className: "ow-pricing05__line", "data-idle": count === 0 || void 0, children: [
1238
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { children: [
1239
+ format.number(count),
1240
+ " ",
1241
+ plural,
1242
+ " ",
1243
+ tier.price === 0 ? (labels.free ?? "Free").toLowerCase() : `at ${format.unitPrice(tier.price)}`
1244
+ ] }),
1245
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: format.money(cost) })
1246
+ ] }, tier.from)) }),
1247
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "ow-pricing05__total", children: [
1248
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_ui18.Text, { as: "p", variant: "label", children: [
1249
+ words.totalLabel,
1250
+ words.totalNote ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { as: "small", variant: "caption", className: "ow-pricing05__total-note", children: words.totalNote }) : null
1251
+ ] }),
1252
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { as: "p", variant: "section-title", className: "ow-pricing05__total-amount", children: format.money(total) })
1253
+ ] }),
1254
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BlockActionButton, { action, variant: "primary", fullWidth: true, className: "ow-pricing05__action" }),
1255
+ note ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ui18.Text, { as: "p", variant: "caption", align: "center", className: "ow-pricing05__fine", children: note }) : null
1256
+ ] })
1257
+ ] }) });
1258
+ }
1259
+
1260
+ // blocks/src/features/Features01/Features01.tsx
1261
+ var import_react17 = require("react");
1262
+ var import_ui19 = require("@openwarelabs/ui");
1263
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1264
+ function Features01({ eyebrow, title, description, features, footer, className, ...props }) {
1265
+ const id = (0, import_react17.useId)();
1266
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("section", { className: (0, import_ui19.cx)("ow-features01", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "ow-features01__inner", children: [
1267
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ui19.SectionHeading, { align: "center", eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1268
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", { className: "ow-features01__grid", children: features.map((feature, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("li", { className: "ow-features01__item", children: [
1269
+ feature.icon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ow-features01__icon", "aria-hidden": "true", children: feature.icon }) : null,
1270
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ui19.Text, { variant: "card-title", className: "ow-features01__title", children: feature.title }),
1271
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ui19.Text, { variant: "copy", className: "ow-features01__text", children: feature.description })
1272
+ ] }, index)) }),
1273
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ui19.Text, { variant: "copy", align: "center", className: "ow-features01__more", children: footer }) : null
1274
+ ] }) });
1275
+ }
1276
+
1277
+ // blocks/src/features/Features02/Features02.tsx
1278
+ var import_react18 = require("react");
1279
+ var import_ui20 = require("@openwarelabs/ui");
1280
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1281
+ function Features02({ eyebrow, title, description, rows, className, ...props }) {
1282
+ const id = (0, import_react18.useId)();
1283
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("section", { className: (0, import_ui20.cx)("ow-features02", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ow-features02__inner", children: [
1284
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ui20.SectionHeading, { eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1285
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "ow-features02__rows", children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("article", { className: "ow-features02__row", "aria-labelledby": `${id}-row-${index}`, children: [
1286
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ow-features02__copy", children: [
1287
+ row.kicker || row.icon ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ui20.Text, { variant: "label", tone: "primary", className: "ow-features02__kicker", children: [
1288
+ row.icon,
1289
+ row.kicker
1290
+ ] }) : null,
1291
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ui20.Text, { variant: "heading", id: `${id}-row-${index}`, className: "ow-features02__title", children: row.title }),
1292
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_ui20.Text, { variant: "lead", className: "ow-features02__text", children: row.description }),
1293
+ row.points?.length ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("ul", { className: "ow-features02__points", children: row.points.map((point, pointIndex) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ui20.Text, { as: "li", tone: "soft", className: "ow-features02__point", children: [
1294
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CheckIcon, { size: 16 }),
1295
+ point
1296
+ ] }, pointIndex)) }) : null,
1297
+ row.link ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_ui20.Link, { href: row.link.href, variant: "standalone", className: "ow-features02__link", children: [
1298
+ row.link.label,
1299
+ " \u2192"
1300
+ ] }) : null
1301
+ ] }),
1302
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1303
+ import_ui20.DotGrid,
1304
+ {
1305
+ className: "ow-features02__stage",
1306
+ role: row.visualLabel ? "img" : void 0,
1307
+ "aria-label": row.visualLabel,
1308
+ children: row.visual
1309
+ }
1310
+ )
1311
+ ] }, index)) })
1312
+ ] }) });
1313
+ }
1314
+
1315
+ // blocks/src/features/Features03/Features03.tsx
1316
+ var import_react19 = require("react");
1317
+ var import_ui21 = require("@openwarelabs/ui");
1318
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1319
+ function Features03({ eyebrow, title, description, cards, className, ...props }) {
1320
+ const id = (0, import_react19.useId)();
1321
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("section", { className: (0, import_ui21.cx)("ow-features03", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ow-features03__inner", children: [
1322
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ow-features03__header", children: [
1323
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui21.SectionHeading, { eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { id: `${id}-title`, children: title }) }),
1324
+ description ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui21.Text, { variant: "lead", className: "ow-features03__intro", children: description }) : null
1325
+ ] }),
1326
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ow-features03__grid", children: cards.map((card, index) => {
1327
+ const featured = index === 0;
1328
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
1329
+ "article",
1330
+ {
1331
+ className: (0, import_ui21.cx)(
1332
+ "ow-features03__card",
1333
+ featured && "ow-features03__card--featured",
1334
+ index === cards.length - 1 && index > 0 && "ow-features03__card--last"
1335
+ ),
1336
+ "aria-labelledby": `${id}-card-${index}`,
1337
+ children: [
1338
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "ow-features03__copy", children: [
1339
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui21.Text, { variant: featured ? "heading" : "card-title", id: `${id}-card-${index}`, children: card.title }),
1340
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_ui21.Text, { variant: featured ? "lead" : "copy", className: "ow-features03__text", children: card.description })
1341
+ ] }),
1342
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "ow-features03__visual", role: card.visualLabel ? "img" : void 0, "aria-label": card.visualLabel, children: card.visual })
1343
+ ]
1344
+ },
1345
+ index
1346
+ );
1347
+ }) })
1348
+ ] }) });
1349
+ }
1350
+
1351
+ // blocks/src/features/Features04/Features04.tsx
1352
+ var import_react20 = require("react");
1353
+ var import_ui22 = require("@openwarelabs/ui");
1354
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1355
+ function Features04({ eyebrow, title, description, tabs, defaultTab = 0, labels = {}, className, ...props }) {
1356
+ const id = (0, import_react20.useId)();
1357
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("section", { className: (0, import_ui22.cx)("ow-features04", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "ow-features04__inner", children: [
1358
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ui22.SectionHeading, { align: "center", eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1359
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_ui22.Tabs, { defaultValue: String(defaultTab), className: "ow-features04__tabs", children: [
1360
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ui22.TabList, { "aria-label": labels.tabs ?? "Features", children: tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ui22.Tab, { value: String(index), icon: tab.icon, children: tab.label }, index)) }),
1361
+ tabs.map((tab, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_ui22.TabPanel, { value: String(index), className: "ow-features04__panel", children: [
1362
+ tab.caption ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_ui22.Text, { variant: "copy", align: "center", className: "ow-features04__caption", children: tab.caption }) : null,
1363
+ tab.visual
1364
+ ] }, index))
1365
+ ] })
1366
+ ] }) });
1367
+ }
1368
+
1369
+ // blocks/src/features/Features05/Features05.tsx
1370
+ var import_react21 = require("react");
1371
+ var import_ui23 = require("@openwarelabs/ui");
1372
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1373
+ function Features05({ eyebrow, title, description, items, primaryAction, secondaryLink, visual, className, ...props }) {
1374
+ const id = (0, import_react21.useId)();
1375
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("section", { className: (0, import_ui23.cx)("ow-features05", className), "aria-labelledby": `${id}-title`, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "ow-features05__inner", children: [
1376
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "ow-features05__copy", children: [
1377
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ui23.SectionHeading, { eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { id: `${id}-title`, children: title }), intro: description }),
1378
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("ul", { className: "ow-features05__list", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_ui23.Text, { as: "li", tone: "soft", className: "ow-features05__item", children: [
1379
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "ow-features05__tick", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CheckIcon, { size: 12, strokeWidth: 3 }) }),
1380
+ item
1381
+ ] }, index)) }),
1382
+ primaryAction || secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "ow-features05__actions", children: [
1383
+ primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(BlockActionButton, { action: primaryAction, variant: "primary" }) : null,
1384
+ secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_ui23.Link, { href: secondaryLink.href, variant: "standalone", children: secondaryLink.label }) : null
1385
+ ] }) : null
1386
+ ] }),
1387
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "ow-features05__visual", children: visual })
1388
+ ] }) });
1389
+ }
1390
+
1391
+ // blocks/src/footers/Footer01/Footer01.tsx
1392
+ var import_react23 = require("react");
1393
+ var import_ui25 = require("@openwarelabs/ui");
1394
+
1395
+ // blocks/src/shared/FooterColumns.tsx
1396
+ var import_react22 = require("react");
1397
+ var import_ui24 = require("@openwarelabs/ui");
1398
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1399
+ function FooterColumns({ columns, headingClassName, listClassName, badgeClassName }) {
1400
+ const id = (0, import_react22.useId)();
1401
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("nav", { "aria-labelledby": `${id}-${index}`, children: [
1402
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ui24.Text, { variant: "label", as: "h2", id: `${id}-${index}`, className: headingClassName, children: column.title }),
1403
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("ul", { className: listClassName, children: column.links.map((link, linkIndex) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("li", { children: [
1404
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ui24.Link, { href: link.href, variant: "standalone", children: link.label }),
1405
+ link.badge ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_ui24.Text, { variant: "badge", className: badgeClassName, children: link.badge }) : null
1406
+ ] }, linkIndex)) })
1407
+ ] }, index)) });
1408
+ }
1409
+
1410
+ // blocks/src/footers/Footer01/Footer01.tsx
1411
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1412
+ var currentTheme = () => typeof document === "undefined" ? "system" : document.documentElement.dataset.theme ?? "system";
1413
+ function useTheme() {
1414
+ const [theme, setTheme] = (0, import_react23.useState)(currentTheme);
1415
+ (0, import_react23.useEffect)(() => {
1416
+ const observer = new MutationObserver(() => setTheme(currentTheme()));
1417
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ["data-theme"] });
1418
+ return () => observer.disconnect();
1419
+ }, []);
1420
+ const choose = (value) => {
1421
+ document.documentElement.dataset.theme = value;
1422
+ setTheme(value);
1423
+ };
1424
+ return [theme, choose];
1425
+ }
1426
+ function Footer01({ brand, description, status, columns, legal, legalLinks = [], themeSwitch = false, labels = {}, className, ...props }) {
1427
+ const [theme, setTheme] = useTheme();
1428
+ const themeId = (0, import_react23.useId)();
1429
+ const home = labels.home ?? (typeof brand.name === "string" ? `${brand.name} home` : void 0);
1430
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("footer", { className: (0, import_ui25.cx)("ow-footer01", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ow-footer01__inner", children: [
1431
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ow-footer01__top", children: [
1432
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ow-footer01__brand", children: [
1433
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_ui25.Link, { href: brand.href, variant: "standalone", className: "ow-footer01__logo", "aria-label": home, children: [
1434
+ brand.logo,
1435
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_ui25.Text, { variant: "dialog-title", as: "span", children: brand.name })
1436
+ ] }),
1437
+ description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_ui25.Text, { variant: "copy", children: description }) : null,
1438
+ status ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_ui25.Link, { href: status.href, variant: "standalone", className: "ow-footer01__status", children: [
1439
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "ow-footer01__status-dot", "aria-hidden": "true" }),
1440
+ status.label
1441
+ ] }) : null
1442
+ ] }),
1443
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(FooterColumns, { columns, headingClassName: "ow-footer01__heading", listClassName: "ow-footer01__links", badgeClassName: "ow-footer01__new" })
1444
+ ] }),
1445
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_ui25.Separator, {}),
1446
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ow-footer01__bottom", children: [
1447
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_ui25.Text, { variant: "caption", as: "p", className: "ow-footer01__legal", children: [
1448
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: legal }),
1449
+ legalLinks.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_ui25.Link, { href: link.href, variant: "muted", children: link.label }, index))
1450
+ ] }),
1451
+ themeSwitch ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ow-footer01__theme", children: [
1452
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_ui25.Text, { variant: "caption", id: themeId, children: labels.theme ?? "Theme" }),
1453
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1454
+ import_ui25.SegmentedControl,
1455
+ {
1456
+ size: "sm",
1457
+ "aria-labelledby": themeId,
1458
+ options: [
1459
+ { value: "light", label: null, icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SunIcon, { size: 15 }), "aria-label": labels.light ?? "Light" },
1460
+ { value: "dark", label: null, icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MoonIcon, { size: 15 }), "aria-label": labels.dark ?? "Dark" },
1461
+ { value: "system", label: null, icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MonitorIcon, { size: 15 }), "aria-label": labels.system ?? "Match the system" }
1462
+ ],
1463
+ value: theme,
1464
+ onChange: setTheme
1465
+ }
1466
+ )
1467
+ ] }) : null
1468
+ ] })
1469
+ ] }) });
1470
+ }
1471
+
1472
+ // blocks/src/footers/Footer02/Footer02.tsx
1473
+ var import_ui26 = require("@openwarelabs/ui");
1474
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1475
+ function Footer02({ brand, links, legal, labels = {}, className, ...props }) {
1476
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("footer", { className: (0, import_ui26.cx)("ow-footer02", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "ow-footer02__inner", children: [
1477
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_ui26.Link, { href: brand.href, className: "ow-footer02__logo", "aria-label": labels.home ?? (typeof brand.name === "string" ? `${brand.name} home` : void 0), children: brand.logo }),
1478
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("nav", { "aria-label": labels.nav ?? "Footer", children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("ul", { className: "ow-footer02__links", children: links.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_ui26.Link, { href: link.href, variant: "standalone", children: link.label }) }, index)) }) }),
1479
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_ui26.Text, { variant: "caption", as: "p", children: legal })
1480
+ ] }) });
1481
+ }
1482
+
1483
+ // blocks/src/footers/Footer03/Footer03.tsx
1484
+ var import_react24 = require("react");
1485
+ var import_ui27 = require("@openwarelabs/ui");
1486
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1487
+ var emailPattern2 = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1488
+ function Footer03({ newsletter, brand, description, columns, legal, legalLinks = [], labels = {}, className, ...props }) {
1489
+ const [email, setEmail] = (0, import_react24.useState)("");
1490
+ const [error, setError] = (0, import_react24.useState)("");
1491
+ const [sending, setSending] = (0, import_react24.useState)(false);
1492
+ const [sentTo, setSentTo] = (0, import_react24.useState)("");
1493
+ const input = (0, import_react24.useRef)(null);
1494
+ const id = (0, import_react24.useId)();
1495
+ const subscribe = async (event) => {
1496
+ event.preventDefault();
1497
+ const address = email.trim();
1498
+ if (!address) setError(labels.empty ?? "Enter your email address.");
1499
+ else if (!emailPattern2.test(address)) setError(labels.invalid ?? "That doesn't look like an email address. Check it for a typo.");
1500
+ else {
1501
+ setError("");
1502
+ setSending(true);
1503
+ try {
1504
+ await newsletter.onSubmit(address);
1505
+ setSentTo(address);
1506
+ return;
1507
+ } catch (failure) {
1508
+ setError(failure instanceof Error && failure.message ? failure.message : labels.failed ?? "That didn't go through. Try again in a moment.");
1509
+ } finally {
1510
+ setSending(false);
1511
+ }
1512
+ }
1513
+ input.current?.focus();
1514
+ };
1515
+ const startAgain = () => {
1516
+ setSentTo("");
1517
+ setEmail("");
1518
+ window.setTimeout(() => input.current?.focus());
1519
+ };
1520
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("footer", { className: (0, import_ui27.cx)("ow-footer03", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ow-footer03__inner", children: [
1521
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("section", { className: "ow-footer03__signup", "aria-labelledby": `${id}-title`, children: [
1522
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { children: [
1523
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "heading", as: "h2", id: `${id}-title`, children: newsletter.title }),
1524
+ newsletter.description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "copy", className: "ow-footer03__intro", children: newsletter.description }) : null
1525
+ ] }),
1526
+ sentTo ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ow-footer03__done", role: "status", children: [
1527
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CircleCheckIcon, { size: 18 }),
1528
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("span", { className: "ow-footer03__done-text", children: [
1529
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "label", children: newsletter.successTitle }),
1530
+ newsletter.successDescription ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "body", as: "span", tone: "soft", className: "ow-footer03__done-detail", children: newsletter.successDescription(sentTo) }) : null
1531
+ ] }),
1532
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Button, { size: "sm", variant: "ghost", onClick: startAgain, children: labels.change ?? "Change" })
1533
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("form", { noValidate: true, onSubmit: subscribe, children: [
1534
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ow-footer03__row", children: [
1535
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1536
+ import_ui27.Input,
1537
+ {
1538
+ ref: input,
1539
+ type: "email",
1540
+ autoComplete: "email",
1541
+ placeholder: labels.placeholder ?? "you@example.com",
1542
+ "aria-label": labels.email ?? "Email address",
1543
+ "aria-describedby": `${id}-note`,
1544
+ className: "ow-footer03__email",
1545
+ startContent: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(MailIcon, { size: 16 }),
1546
+ isInvalid: Boolean(error),
1547
+ value: email,
1548
+ onChange: (event) => {
1549
+ setEmail(event.target.value);
1550
+ if (error) setError("");
1551
+ }
1552
+ }
1553
+ ),
1554
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Button, { type: "submit", variant: "primary", shape: "pill", loading: sending, endIcon: newsletter.submitIcon, children: newsletter.submitLabel })
1555
+ ] }),
1556
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1557
+ import_ui27.Text,
1558
+ {
1559
+ variant: "caption",
1560
+ as: "p",
1561
+ id: `${id}-note`,
1562
+ tone: error ? "danger" : void 0,
1563
+ className: "ow-footer03__note",
1564
+ "aria-live": "polite",
1565
+ children: error || newsletter.note
1566
+ }
1567
+ )
1568
+ ] })
1569
+ ] }),
1570
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ow-footer03__links", children: [
1571
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ow-footer03__brand", children: [
1572
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
1573
+ import_ui27.Link,
1574
+ {
1575
+ href: brand.href,
1576
+ variant: "standalone",
1577
+ className: "ow-footer03__logo",
1578
+ "aria-label": labels.home ?? (typeof brand.name === "string" ? `${brand.name} home` : void 0),
1579
+ children: [
1580
+ brand.logo,
1581
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "dialog-title", as: "span", children: brand.name })
1582
+ ]
1583
+ }
1584
+ ),
1585
+ description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "copy", className: "ow-footer03__line", children: description }) : null
1586
+ ] }),
1587
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(FooterColumns, { columns, headingClassName: "ow-footer03__heading", listClassName: "ow-footer03__list" })
1588
+ ] }),
1589
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Separator, {}),
1590
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "ow-footer03__bottom", children: [
1591
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "caption", as: "p", children: legal }),
1592
+ legalLinks.length ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Text, { variant: "caption", as: "ul", className: "ow-footer03__legal", children: legalLinks.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_ui27.Link, { href: link.href, variant: "muted", children: link.label }) }, index)) }) : null
1593
+ ] })
1594
+ ] }) });
1595
+ }
1596
+
1597
+ // blocks/src/footers/Footer04/Footer04.tsx
1598
+ var import_ui28 = require("@openwarelabs/ui");
1599
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1600
+ function Footer04({ title, titleMuted, primaryAction, columns, legal, legalLinks = [], wordmark, className, ...props }) {
1601
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("footer", { className: (0, import_ui28.cx)("ow-footer04", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "ow-footer04__inner", children: [
1602
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "ow-footer04__top", children: [
1603
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "ow-footer04__pitch", children: [
1604
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_ui28.Text, { variant: "heading", as: "p", children: [
1605
+ title,
1606
+ titleMuted ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1607
+ " ",
1608
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ui28.Text, { variant: "heading", as: "span", tone: "muted", children: titleMuted })
1609
+ ] }) : null
1610
+ ] }),
1611
+ primaryAction ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(BlockActionButton, { action: primaryAction, variant: "primary", size: "md" }) : null
1612
+ ] }),
1613
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ow-footer04__columns", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FooterColumns, { columns, headingClassName: "ow-footer04__heading", listClassName: "ow-footer04__list" }) })
1614
+ ] }),
1615
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "ow-footer04__legal", children: [
1616
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ui28.Text, { variant: "caption", as: "p", children: legal }),
1617
+ legalLinks.length ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ui28.Text, { variant: "caption", as: "ul", className: "ow-footer04__legal-links", children: legalLinks.map((link, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_ui28.Link, { href: link.href, variant: "muted", children: link.label }) }, index)) }) : null
1618
+ ] }),
1619
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ow-footer04__name", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ow-footer04__crop", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: wordmark }) }) })
1620
+ ] }) });
1621
+ }
370
1622
  //# sourceMappingURL=index.cjs.map