@bloom-housing/ui-components 9.0.4 → 10.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/blocks/ActionBlock.test.js +2 -2
- package/dist/__tests__/blocks/ActionBlock.test.js.map +1 -1
- package/dist/src/blocks/ActionBlock.d.ts +1 -1
- package/dist/src/blocks/ActionBlock.js +1 -1
- package/dist/src/blocks/ActionBlock.js.map +1 -1
- package/dist/src/blocks/ActionBlock.stories.d.ts +1 -1
- package/dist/src/blocks/ActionBlock.stories.js +8 -7
- package/dist/src/blocks/ActionBlock.stories.js.map +1 -1
- package/package.json +2 -1
- package/src/blocks/ActionBlock.scss +2 -2
- package/src/blocks/ActionBlock.stories.tsx +29 -48
- package/src/blocks/ActionBlock.tsx +2 -2
- package/tailwind.config.js +1 -0
|
@@ -6,7 +6,7 @@ import { AppearanceStyleType } from "../../src/global/AppearanceTypes";
|
|
|
6
6
|
afterEach(cleanup);
|
|
7
7
|
describe("<ActionBlock>", function () {
|
|
8
8
|
it("can render with header & subheader", function () {
|
|
9
|
-
var getByText = render(React.createElement(ActionBlock, { header: "My Applications", subheader: "Subheader Text", icon: React.createElement("span", { className: "Action-icon" }), actions: [
|
|
9
|
+
var getByText = render(React.createElement(ActionBlock, { header: React.createElement("h1", null, "My Applications"), subheader: "Subheader Text", icon: React.createElement("span", { className: "Action-icon" }), actions: [
|
|
10
10
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.primary, key: "button-1" }, "Action"),
|
|
11
11
|
] })).getByText;
|
|
12
12
|
expect(getByText("My Applications")).not.toBeNull();
|
|
@@ -14,7 +14,7 @@ describe("<ActionBlock>", function () {
|
|
|
14
14
|
expect(getByText("Action")).not.toBeNull();
|
|
15
15
|
});
|
|
16
16
|
it("subheader is hidden for inline layout", function () {
|
|
17
|
-
var _a = render(React.createElement(ActionBlock, { header: "My Applications", subheader: "Subheader Text", icon: React.createElement("span", { className: "Action-icon" }), layout: ActionBlockLayout.inline, actions: [
|
|
17
|
+
var _a = render(React.createElement(ActionBlock, { header: React.createElement("h1", null, "My Applications"), subheader: "Subheader Text", icon: React.createElement("span", { className: "Action-icon" }), layout: ActionBlockLayout.inline, actions: [
|
|
18
18
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.primary, key: "button-1" }, "Action"),
|
|
19
19
|
] })), getByText = _a.getByText, container = _a.container;
|
|
20
20
|
expect(getByText("My Applications")).not.toBeNull();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBlock.test.js","sourceRoot":"","sources":["../../../__tests__/blocks/ActionBlock.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"ActionBlock.test.js","sourceRoot":"","sources":["../../../__tests__/blocks/ActionBlock.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAC7E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAEtE,SAAS,CAAC,OAAO,CAAC,CAAA;AAElB,QAAQ,CAAC,eAAe,EAAE;IACxB,EAAE,CAAC,oCAAoC,EAAE;QAC/B,IAAA,SAAS,GAAK,MAAM,CAC1B,oBAAC,WAAW,IACV,MAAM,EAAE,kDAAwB,EAChC,SAAS,EAAC,gBAAgB,EAC1B,IAAI,EAAE,8BAAM,SAAS,EAAC,aAAa,GAAQ,EAC3C,OAAO,EAAE;gBACP,oBAAC,MAAM,IACL,OAAO,EAAE,cAAM,OAAA,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAApB,CAAoB,EACnC,SAAS,EAAE,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("div", { className: actionBlockClasses.join(" ") },
|
|
26
26
|
React.createElement("div", { className: "action-block__head" },
|
|
27
27
|
icon && React.createElement("div", { className: "action-block__icon" }, icon),
|
|
28
|
-
React.createElement("
|
|
28
|
+
React.createElement("div", { className: "action-block__header" }, header),
|
|
29
29
|
subheader && layout === ActionBlockLayout.block && (React.createElement("p", { className: "action-block__subheader" }, subheader))),
|
|
30
30
|
React.createElement("div", { className: "action-block__actions" }, actions)));
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBlock.js","sourceRoot":"","sources":["../../../src/blocks/ActionBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,oBAAoB,CAAA;AAE3B,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,2DAAkC,CAAA;IAClC,yDAAgC,CAAA;AAClC,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAUD,IAAM,WAAW,GAAG,UAAC,EAQF;QAPjB,OAAO,aAAA,EACP,kBAAuC,EAAvC,UAAU,mBAAG,qBAAqB,CAAC,IAAI,KAAA,EACvC,SAAS,eAAA,EACT,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,cAAgC,EAAhC,MAAM,mBAAG,iBAAiB,CAAC,KAAK,KAAA,EAChC,SAAS,eAAA;IAET,IAAM,kBAAkB,GAAG,CAAC,cAAc,EAAE,UAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAE,CAAC,CAAA;IAC5E,IAAI,UAAU;QAAE,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACnD,IAAI,MAAM,KAAK,O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,EAAE;QACtB,kBAAkB,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;KAC/C;SAAM;QACL,kBAAkB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;KAChD;IAED,OAAO,CACL,6BAAK,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;QAC1C,6BAAK,SAAS,EAAC,oBAAoB;YAChC,IAAI,IAAI,6BAAK,SAAS,EAAC,oBAAoB,IAAE,IAAI,CAAO;YACzD,6BAAK,SAAS,EAAE,sBAAsB,IAAG,MAAM,CAAO;YACrD,SAAS,IAAI,MAAM,KAAK,iBAAiB,CAAC,KAAK,IAAI,CAClD,2BAAG,SAAS,EAAC,yBAAyB,IAAE,SAAS,CAAK,CACvD,CACG;QACN,6BAAK,SAAS,EAAC,uBAAuB,IAAE,OAAO,CAAO,CAClD,CACP,CAAA;AACH,CAAC,CAAA;AACD,OAAO,EAAE,WAAW,IAAI,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -3,7 +3,7 @@ declare const _default: {
|
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const blockWithIcon: () => JSX.Element;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const blockNoIconNoBackground: () => JSX.Element;
|
|
7
7
|
export declare const blockWithDarkerBg: () => JSX.Element;
|
|
8
8
|
export declare const blockWithSubheader: () => JSX.Element;
|
|
9
9
|
export declare const inlineBlock: () => JSX.Element;
|
|
@@ -3,28 +3,29 @@ import ActionBlock, { ActionBlockLayout } from "./ActionBlock";
|
|
|
3
3
|
import { Button } from "../..";
|
|
4
4
|
import { AppearanceStyleType } from "../global/AppearanceTypes";
|
|
5
5
|
import Icon from "../icons/Icon";
|
|
6
|
+
import Heading from "../text/Heading";
|
|
6
7
|
export default {
|
|
7
8
|
title: "Blocks/Action Block",
|
|
8
9
|
};
|
|
9
|
-
export var blockWithIcon = function () { return (React.createElement(ActionBlock, { header: "Action
|
|
10
|
+
export var blockWithIcon = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "Action Block"), background: "primary-lighter", icon: React.createElement(Icon, { size: "3xl", symbol: "mail" }), actions: [
|
|
10
11
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.primary }, "Action"),
|
|
11
12
|
] })); };
|
|
12
|
-
export var
|
|
13
|
+
export var blockNoIconNoBackground = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "Full length headline text that spans the block"), actions: [
|
|
13
14
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.info }, "Button"),
|
|
14
15
|
] })); };
|
|
15
|
-
export var blockWithDarkerBg = function () { return (React.createElement(ActionBlock, { header: "Action
|
|
16
|
+
export var blockWithDarkerBg = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "Action Block"), icon: React.createElement(Icon, { size: "3xl", symbol: "mail" }), background: "primary-darker", actions: [
|
|
16
17
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.primary }, "Action"),
|
|
17
18
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.info }, "Action"),
|
|
18
19
|
] })); };
|
|
19
|
-
export var blockWithSubheader = function () { return (React.createElement(ActionBlock, { header: "Full length headline text that spans the block", subheader: "Brunch leggings trust fund tattooed, flannel sustainable man braid venmo. ", icon: React.createElement(Icon, { size: "3xl", symbol: "mail" }), background: "primary-lighter", actions: [React.createElement(Button, { onClick: function () { return console.log("click"); } }, "Action")] })); };
|
|
20
|
-
export var inlineBlock = function () { return (React.createElement(ActionBlock, { header: "See more listings from our community partners", icon: React.createElement(Icon, { size: "3xl", symbol: "mail" }), background: "primary-lighter", layout: ActionBlockLayout.inline, actions: [
|
|
20
|
+
export var blockWithSubheader = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "Full length headline text that spans the block"), subheader: "Brunch leggings trust fund tattooed, flannel sustainable man braid venmo. ", icon: React.createElement(Icon, { size: "3xl", symbol: "mail" }), background: "primary-lighter", actions: [React.createElement(Button, { onClick: function () { return console.log("click"); } }, "Action")] })); };
|
|
21
|
+
export var inlineBlock = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "See more listings from our community partners"), icon: React.createElement(Icon, { size: "3xl", symbol: "mail" }), background: "primary-lighter", layout: ActionBlockLayout.inline, actions: [
|
|
21
22
|
React.createElement(Button, { onClick: function () { return console.log("click"); }, styleType: AppearanceStyleType.primary }, "Action"),
|
|
22
23
|
] })); };
|
|
23
|
-
export var inlineBlockWith2actions = function () { return (React.createElement(ActionBlock, { header: "Find more listings on our website", background: "primary-darker", layout: ActionBlockLayout.inline, actions: [
|
|
24
|
+
export var inlineBlockWith2actions = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "Find more listings on our website"), background: "primary-darker", layout: ActionBlockLayout.inline, actions: [
|
|
24
25
|
React.createElement(Button, { onClick: function () { return console.log("click"); } }, "First Come, First Served"),
|
|
25
26
|
React.createElement(Button, { onClick: function () { return console.log("click"); } }, "First Come, First Served"),
|
|
26
27
|
] })); };
|
|
27
|
-
export var inlineBlockWith2actionsAsLinks = function () { return (React.createElement(ActionBlock, { header: "Find more listings on our website
|
|
28
|
+
export var inlineBlockWith2actionsAsLinks = function () { return (React.createElement(ActionBlock, { header: React.createElement(Heading, { priority: 2 }, "Find more listings on our website"), background: "primary-darker", layout: ActionBlockLayout.inline, actions: [
|
|
28
29
|
React.createElement("a", { className: "button", key: "action-1", href: "https://google.com" }, "First come, first served"),
|
|
29
30
|
React.createElement("a", { className: "button", key: "action-2", href: "https://google.com" }, "City Second loan program"),
|
|
30
31
|
] })); };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBlock.stories.js","sourceRoot":"","sources":["../../../src/blocks/ActionBlock.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAA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|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"author": "Sean Albert <sean.albert@exygy.com>",
|
|
5
5
|
"description": "Shared user interface components for Bloom affordable housing system",
|
|
6
6
|
"homepage": "https://github.com/bloom-housing/ui-components",
|
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
"react-text-mask": "^5.4.3",
|
|
152
152
|
"react-transition-group": "^4.4.1",
|
|
153
153
|
"tailwindcss": "2.2.10",
|
|
154
|
+
"tailwindcss-rtl": "^0.9.0",
|
|
154
155
|
"ts-jest": "^26.4.1",
|
|
155
156
|
"typesafe-actions": "^5.1.0"
|
|
156
157
|
},
|
|
@@ -1,112 +1,93 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import ActionBlock, { ActionBlockLayout } from "./ActionBlock"
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import React from "react"
|
|
2
|
+
import ActionBlock, { ActionBlockLayout } from "./ActionBlock"
|
|
3
|
+
import { Button } from "../.."
|
|
4
|
+
import { AppearanceStyleType } from "../global/AppearanceTypes"
|
|
5
|
+
import Icon from "../icons/Icon"
|
|
6
|
+
import Heading from "../text/Heading"
|
|
7
7
|
|
|
8
8
|
export default {
|
|
9
9
|
title: "Blocks/Action Block",
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
|
|
12
12
|
export const blockWithIcon = () => (
|
|
13
13
|
<ActionBlock
|
|
14
|
-
header=
|
|
14
|
+
header={<Heading priority={2}>Action Block</Heading>}
|
|
15
15
|
background="primary-lighter"
|
|
16
16
|
icon={<Icon size="3xl" symbol="mail" />}
|
|
17
17
|
actions={[
|
|
18
|
-
<Button
|
|
19
|
-
onClick={() => console.log("click")}
|
|
20
|
-
styleType={AppearanceStyleType.primary}
|
|
21
|
-
>
|
|
18
|
+
<Button onClick={() => console.log("click")} styleType={AppearanceStyleType.primary}>
|
|
22
19
|
Action
|
|
23
20
|
</Button>,
|
|
24
21
|
]}
|
|
25
22
|
></ActionBlock>
|
|
26
|
-
)
|
|
23
|
+
)
|
|
27
24
|
|
|
28
|
-
export const
|
|
25
|
+
export const blockNoIconNoBackground = () => (
|
|
29
26
|
<ActionBlock
|
|
30
|
-
header=
|
|
27
|
+
header={<Heading priority={2}>Full length headline text that spans the block</Heading>}
|
|
31
28
|
actions={[
|
|
32
|
-
<Button
|
|
33
|
-
onClick={() => console.log("click")}
|
|
34
|
-
styleType={AppearanceStyleType.info}
|
|
35
|
-
>
|
|
29
|
+
<Button onClick={() => console.log("click")} styleType={AppearanceStyleType.info}>
|
|
36
30
|
Button
|
|
37
31
|
</Button>,
|
|
38
32
|
]}
|
|
39
33
|
></ActionBlock>
|
|
40
|
-
)
|
|
34
|
+
)
|
|
41
35
|
|
|
42
36
|
export const blockWithDarkerBg = () => (
|
|
43
37
|
<ActionBlock
|
|
44
|
-
header=
|
|
38
|
+
header={<Heading priority={2}>Action Block</Heading>}
|
|
45
39
|
icon={<Icon size="3xl" symbol="mail" />}
|
|
46
40
|
background="primary-darker"
|
|
47
41
|
actions={[
|
|
48
|
-
<Button
|
|
49
|
-
onClick={() => console.log("click")}
|
|
50
|
-
styleType={AppearanceStyleType.primary}
|
|
51
|
-
>
|
|
42
|
+
<Button onClick={() => console.log("click")} styleType={AppearanceStyleType.primary}>
|
|
52
43
|
Action
|
|
53
44
|
</Button>,
|
|
54
|
-
<Button
|
|
55
|
-
onClick={() => console.log("click")}
|
|
56
|
-
styleType={AppearanceStyleType.info}
|
|
57
|
-
>
|
|
45
|
+
<Button onClick={() => console.log("click")} styleType={AppearanceStyleType.info}>
|
|
58
46
|
Action
|
|
59
47
|
</Button>,
|
|
60
48
|
]}
|
|
61
49
|
></ActionBlock>
|
|
62
|
-
)
|
|
50
|
+
)
|
|
63
51
|
|
|
64
52
|
export const blockWithSubheader = () => (
|
|
65
53
|
<ActionBlock
|
|
66
|
-
header=
|
|
54
|
+
header={<Heading priority={2}>Full length headline text that spans the block</Heading>}
|
|
67
55
|
subheader="Brunch leggings trust fund tattooed, flannel sustainable man braid venmo. "
|
|
68
56
|
icon={<Icon size="3xl" symbol="mail" />}
|
|
69
57
|
background="primary-lighter"
|
|
70
58
|
actions={[<Button onClick={() => console.log("click")}>Action</Button>]}
|
|
71
59
|
></ActionBlock>
|
|
72
|
-
)
|
|
60
|
+
)
|
|
73
61
|
|
|
74
62
|
export const inlineBlock = () => (
|
|
75
63
|
<ActionBlock
|
|
76
|
-
header=
|
|
64
|
+
header={<Heading priority={2}>See more listings from our community partners</Heading>}
|
|
77
65
|
icon={<Icon size="3xl" symbol="mail" />}
|
|
78
66
|
background="primary-lighter"
|
|
79
67
|
layout={ActionBlockLayout.inline}
|
|
80
68
|
actions={[
|
|
81
|
-
<Button
|
|
82
|
-
onClick={() => console.log("click")}
|
|
83
|
-
styleType={AppearanceStyleType.primary}
|
|
84
|
-
>
|
|
69
|
+
<Button onClick={() => console.log("click")} styleType={AppearanceStyleType.primary}>
|
|
85
70
|
Action
|
|
86
71
|
</Button>,
|
|
87
72
|
]}
|
|
88
73
|
></ActionBlock>
|
|
89
|
-
)
|
|
74
|
+
)
|
|
90
75
|
|
|
91
76
|
export const inlineBlockWith2actions = () => (
|
|
92
77
|
<ActionBlock
|
|
93
|
-
header=
|
|
78
|
+
header={<Heading priority={2}>Find more listings on our website</Heading>}
|
|
94
79
|
background="primary-darker"
|
|
95
80
|
layout={ActionBlockLayout.inline}
|
|
96
81
|
actions={[
|
|
97
|
-
<Button onClick={() => console.log("click")}>
|
|
98
|
-
|
|
99
|
-
</Button>,
|
|
100
|
-
<Button onClick={() => console.log("click")}>
|
|
101
|
-
First Come, First Served
|
|
102
|
-
</Button>,
|
|
82
|
+
<Button onClick={() => console.log("click")}>First Come, First Served</Button>,
|
|
83
|
+
<Button onClick={() => console.log("click")}>First Come, First Served</Button>,
|
|
103
84
|
]}
|
|
104
85
|
></ActionBlock>
|
|
105
|
-
)
|
|
86
|
+
)
|
|
106
87
|
|
|
107
88
|
export const inlineBlockWith2actionsAsLinks = () => (
|
|
108
89
|
<ActionBlock
|
|
109
|
-
header=
|
|
90
|
+
header={<Heading priority={2}>Find more listings on our website</Heading>}
|
|
110
91
|
background="primary-darker"
|
|
111
92
|
layout={ActionBlockLayout.inline}
|
|
112
93
|
actions={[
|
|
@@ -118,4 +99,4 @@ export const inlineBlockWith2actionsAsLinks = () => (
|
|
|
118
99
|
</a>,
|
|
119
100
|
]}
|
|
120
101
|
></ActionBlock>
|
|
121
|
-
)
|
|
102
|
+
)
|
|
@@ -15,7 +15,7 @@ interface ActionBlockProps {
|
|
|
15
15
|
actions: React.ReactNode[]
|
|
16
16
|
background?: string
|
|
17
17
|
className?: string
|
|
18
|
-
header:
|
|
18
|
+
header: React.ReactNode
|
|
19
19
|
icon?: React.ReactNode
|
|
20
20
|
layout?: ActionBlockLayout
|
|
21
21
|
subheader?: string
|
|
@@ -41,7 +41,7 @@ const ActionBlock = ({
|
|
|
41
41
|
<div className={actionBlockClasses.join(" ")}>
|
|
42
42
|
<div className="action-block__head">
|
|
43
43
|
{icon && <div className="action-block__icon">{icon}</div>}
|
|
44
|
-
<
|
|
44
|
+
<div className={"action-block__header"}>{header}</div>
|
|
45
45
|
{subheader && layout === ActionBlockLayout.block && (
|
|
46
46
|
<p className="action-block__subheader">{subheader}</p>
|
|
47
47
|
)}
|