@openwarelabs/blocks 0.8.0 → 0.9.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.
- package/dist/calls-to-action/Cta01/Cta01.d.cts +3 -0
- package/dist/calls-to-action/Cta01/Cta01.d.ts +3 -0
- package/dist/calls-to-action/Cta01/Cta01.types.d.cts +14 -0
- package/dist/calls-to-action/Cta01/Cta01.types.d.ts +14 -0
- package/dist/calls-to-action/Cta02/Cta02.d.cts +3 -0
- package/dist/calls-to-action/Cta02/Cta02.d.ts +3 -0
- package/dist/calls-to-action/Cta02/Cta02.types.d.cts +16 -0
- package/dist/calls-to-action/Cta02/Cta02.types.d.ts +16 -0
- package/dist/calls-to-action/Cta03/Cta03.d.cts +3 -0
- package/dist/calls-to-action/Cta03/Cta03.d.ts +3 -0
- package/dist/calls-to-action/Cta03/Cta03.types.d.cts +18 -0
- package/dist/calls-to-action/Cta03/Cta03.types.d.ts +18 -0
- package/dist/index.cjs +64 -0
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +4 -4
- package/dist/styles.css +344 -0
- package/package.json +2 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Cta01Props } from "./Cta01.types.cjs";
|
|
2
|
+
/** A wide panel on a dot grid with a headline on the left and the buttons on the right. */
|
|
3
|
+
export declare function Cta01({ title, description, primaryAction, secondaryAction, note, className, ...props }: Cta01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Cta01Props } from "./Cta01.types.js";
|
|
2
|
+
/** A wide panel on a dot grid with a headline on the left and the buttons on the right. */
|
|
3
|
+
export declare function Cta01({ title, description, primaryAction, secondaryAction, note, className, ...props }: Cta01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockAction } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface Cta01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
4
|
+
/** The section's heading. */
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/** A sentence or two under the title. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** The main call to action, as a primary pill button. */
|
|
9
|
+
primaryAction: BlockAction;
|
|
10
|
+
/** A second, lower-stakes action beside it. */
|
|
11
|
+
secondaryAction?: BlockAction;
|
|
12
|
+
/** A small line under the buttons, which can start with a 14px icon: "Most teams are set up in ten minutes." */
|
|
13
|
+
note?: ReactNode;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockAction } from "../../shared/shared.types.js";
|
|
3
|
+
export interface Cta01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
4
|
+
/** The section's heading. */
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/** A sentence or two under the title. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** The main call to action, as a primary pill button. */
|
|
9
|
+
primaryAction: BlockAction;
|
|
10
|
+
/** A second, lower-stakes action beside it. */
|
|
11
|
+
secondaryAction?: BlockAction;
|
|
12
|
+
/** A small line under the buttons, which can start with a 14px icon: "Most teams are set up in ten minutes." */
|
|
13
|
+
note?: ReactNode;
|
|
14
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Cta02Props } from "./Cta02.types.cjs";
|
|
2
|
+
/** A centred call to action on the brand colour, with white text, a white button and a few facts. */
|
|
3
|
+
export declare function Cta02({ eyebrow, title, description, primaryAction, secondaryLink, facts, className, ...props }: Cta02Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Cta02Props } from "./Cta02.types.js";
|
|
2
|
+
/** A centred call to action on the brand colour, with white text, a white button and a few facts. */
|
|
3
|
+
export declare function Cta02({ eyebrow, title, description, primaryAction, secondaryLink, facts, className, ...props }: Cta02Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockAction, BlockLink } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface Cta02Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
4
|
+
/** A small pill above the title, drawn for the brand colour: "Ready when you are". */
|
|
5
|
+
eyebrow?: ReactNode;
|
|
6
|
+
/** The section's heading. */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** A sentence or two under the title. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** A white button on the brand colour. */
|
|
11
|
+
primaryAction: BlockAction;
|
|
12
|
+
/** A text link beside it, with an arrow: "Talk to sales". */
|
|
13
|
+
secondaryLink?: BlockLink;
|
|
14
|
+
/** Short facts under the buttons, each with a tick: "No card needed". */
|
|
15
|
+
facts?: ReactNode[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockAction, BlockLink } from "../../shared/shared.types.js";
|
|
3
|
+
export interface Cta02Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
4
|
+
/** A small pill above the title, drawn for the brand colour: "Ready when you are". */
|
|
5
|
+
eyebrow?: ReactNode;
|
|
6
|
+
/** The section's heading. */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** A sentence or two under the title. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** A white button on the brand colour. */
|
|
11
|
+
primaryAction: BlockAction;
|
|
12
|
+
/** A text link beside it, with an arrow: "Talk to sales". */
|
|
13
|
+
secondaryLink?: BlockLink;
|
|
14
|
+
/** Short facts under the buttons, each with a tick: "No card needed". */
|
|
15
|
+
facts?: ReactNode[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Cta03Props } from "./Cta03.types.cjs";
|
|
2
|
+
/** Words, two buttons and a few points beside a picture. */
|
|
3
|
+
export declare function Cta03({ eyebrow, title, description, primaryAction, secondaryAction, points, visual, className, ...props }: Cta03Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Cta03Props } from "./Cta03.types.js";
|
|
2
|
+
/** Words, two buttons and a few points beside a picture. */
|
|
3
|
+
export declare function Cta03({ eyebrow, title, description, primaryAction, secondaryAction, points, visual, className, ...props }: Cta03Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockAction } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface Cta03Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
4
|
+
/** A small line above the title, such as the section's name. */
|
|
5
|
+
eyebrow?: ReactNode;
|
|
6
|
+
/** The section's heading. */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** A sentence or two under the title. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** The main call to action, as a primary pill button. */
|
|
11
|
+
primaryAction: BlockAction;
|
|
12
|
+
/** A second, lower-stakes action beside it. */
|
|
13
|
+
secondaryAction?: BlockAction;
|
|
14
|
+
/** Short points under the buttons, each with a tick. */
|
|
15
|
+
points?: ReactNode[];
|
|
16
|
+
/** The picture beside the words (under them on phones), usually a screenshot. */
|
|
17
|
+
visual: ReactNode;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BlockAction } from "../../shared/shared.types.js";
|
|
3
|
+
export interface Cta03Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
4
|
+
/** A small line above the title, such as the section's name. */
|
|
5
|
+
eyebrow?: ReactNode;
|
|
6
|
+
/** The section's heading. */
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
/** A sentence or two under the title. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** The main call to action, as a primary pill button. */
|
|
11
|
+
primaryAction: BlockAction;
|
|
12
|
+
/** A second, lower-stakes action beside it. */
|
|
13
|
+
secondaryAction?: BlockAction;
|
|
14
|
+
/** Short points under the buttons, each with a tick. */
|
|
15
|
+
points?: ReactNode[];
|
|
16
|
+
/** The picture beside the words (under them on phones), usually a screenshot. */
|
|
17
|
+
visual: ReactNode;
|
|
18
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,9 @@ 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
|
+
Cta01: () => Cta01,
|
|
24
|
+
Cta02: () => Cta02,
|
|
25
|
+
Cta03: () => Cta03,
|
|
23
26
|
Features01: () => Features01,
|
|
24
27
|
Features02: () => Features02,
|
|
25
28
|
Features03: () => Features03,
|
|
@@ -1619,4 +1622,65 @@ function Footer04({ title, titleMuted, primaryAction, columns, legal, legalLinks
|
|
|
1619
1622
|
/* @__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
1623
|
] }) });
|
|
1621
1624
|
}
|
|
1625
|
+
|
|
1626
|
+
// blocks/src/calls-to-action/Cta01/Cta01.tsx
|
|
1627
|
+
var import_react25 = require("react");
|
|
1628
|
+
var import_ui29 = require("@openwarelabs/ui");
|
|
1629
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1630
|
+
function Cta01({ title, description, primaryAction, secondaryAction, note, className, ...props }) {
|
|
1631
|
+
const id = (0, import_react25.useId)();
|
|
1632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("section", { className: (0, import_ui29.cx)("ow-cta01", className), "aria-labelledby": id, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_ui29.DotGrid, { fade: true, className: "ow-cta01__panel", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "ow-cta01__content", children: [
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "ow-cta01__text", children: [
|
|
1634
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_ui29.Text, { variant: "section-title", id, children: title }),
|
|
1635
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_ui29.Text, { variant: "lead", className: "ow-cta01__lead", children: description }) : null
|
|
1636
|
+
] }),
|
|
1637
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "ow-cta01__side", children: [
|
|
1638
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(BlockActions, { className: "ow-cta01__actions", primary: primaryAction, secondary: secondaryAction }),
|
|
1639
|
+
note ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_ui29.Text, { as: "p", variant: "caption", className: "ow-cta01__note", children: note }) : null
|
|
1640
|
+
] })
|
|
1641
|
+
] }) }) });
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
// blocks/src/calls-to-action/Cta02/Cta02.tsx
|
|
1645
|
+
var import_react26 = require("react");
|
|
1646
|
+
var import_ui30 = require("@openwarelabs/ui");
|
|
1647
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1648
|
+
function Cta02({ eyebrow, title, description, primaryAction, secondaryLink, facts, className, ...props }) {
|
|
1649
|
+
const id = (0, import_react26.useId)();
|
|
1650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("section", { className: (0, import_ui30.cx)("ow-cta02", className), "aria-labelledby": id, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ui30.DotGrid, { fade: true, className: "ow-cta02__plate", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "ow-cta02__content", children: [
|
|
1651
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ui30.Text, { as: "p", variant: "body", className: "ow-cta02__eyebrow", children: eyebrow }) : null,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ui30.Text, { as: "h2", variant: "page-title", id, className: "ow-cta02__title", children: title }),
|
|
1653
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ui30.Text, { variant: "lead", className: "ow-cta02__lead", children: description }) : null,
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "ow-cta02__actions", children: [
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(BlockActionButton, { action: primaryAction, variant: "secondary", className: "ow-cta02__action" }),
|
|
1656
|
+
secondaryLink ? /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ui30.Link, { href: secondaryLink.href, variant: "standalone", className: "ow-cta02__link", children: [
|
|
1657
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_ui30.Text, { variant: "label", children: secondaryLink.label }),
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ArrowRightIcon, { size: 16 })
|
|
1659
|
+
] }) : null
|
|
1660
|
+
] }),
|
|
1661
|
+
facts?.length ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("ul", { className: "ow-cta02__facts", children: facts.map((fact, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_ui30.Text, { as: "li", variant: "body", children: [
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckIcon, { size: 15 }),
|
|
1663
|
+
fact
|
|
1664
|
+
] }, index)) }) : null
|
|
1665
|
+
] }) }) });
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
// blocks/src/calls-to-action/Cta03/Cta03.tsx
|
|
1669
|
+
var import_react27 = require("react");
|
|
1670
|
+
var import_ui31 = require("@openwarelabs/ui");
|
|
1671
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1672
|
+
function Cta03({ eyebrow, title, description, primaryAction, secondaryAction, points, visual, className, ...props }) {
|
|
1673
|
+
const id = (0, import_react27.useId)();
|
|
1674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("section", { className: (0, import_ui31.cx)("ow-cta03", className), "aria-labelledby": id, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "ow-cta03__inner", children: [
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { children: [
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_ui31.SectionHeading, { eyebrow, title: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { id, children: title }), intro: description }),
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BlockActions, { className: "ow-cta03__actions", primary: primaryAction, secondary: secondaryAction }),
|
|
1678
|
+
points?.length ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("ul", { className: "ow-cta03__points", children: points.map((point, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_ui31.Text, { as: "li", variant: "body", tone: "soft", children: [
|
|
1679
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CheckIcon, { size: 16 }),
|
|
1680
|
+
point
|
|
1681
|
+
] }, index)) }) : null
|
|
1682
|
+
] }),
|
|
1683
|
+
visual
|
|
1684
|
+
] }) });
|
|
1685
|
+
}
|
|
1622
1686
|
//# sourceMappingURL=index.cjs.map
|