@buildcanada/components 0.3.3 → 0.3.5
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/content/Card/Card.d.ts +62 -0
- package/dist/content/Card/Card.d.ts.map +1 -0
- package/dist/content/Card/Card.js +45 -0
- package/dist/content/Card/Card.scss +281 -0
- package/dist/content/Card/index.d.ts +3 -0
- package/dist/content/Card/index.d.ts.map +1 -0
- package/dist/content/Card/index.js +2 -0
- package/dist/content/Hero/Hero.d.ts +28 -0
- package/dist/content/Hero/Hero.d.ts.map +1 -0
- package/dist/content/Hero/Hero.js +16 -0
- package/dist/content/Hero/Hero.scss +150 -0
- package/dist/content/Hero/index.d.ts +3 -0
- package/dist/content/Hero/index.d.ts.map +1 -0
- package/dist/content/Hero/index.js +2 -0
- package/dist/content/StatBlock/StatBlock.d.ts +15 -0
- package/dist/content/StatBlock/StatBlock.d.ts.map +1 -0
- package/dist/content/StatBlock/StatBlock.js +10 -0
- package/dist/content/StatBlock/StatBlock.scss +83 -0
- package/dist/content/StatBlock/index.d.ts +3 -0
- package/dist/content/StatBlock/index.d.ts.map +1 -0
- package/dist/content/StatBlock/index.js +2 -0
- package/dist/feedback/Dialog/Dialog.d.ts +18 -0
- package/dist/feedback/Dialog/Dialog.d.ts.map +1 -0
- package/dist/feedback/Dialog/Dialog.js +33 -0
- package/dist/feedback/Dialog/Dialog.scss +158 -0
- package/dist/feedback/Dialog/index.d.ts +2 -0
- package/dist/feedback/Dialog/index.d.ts.map +1 -0
- package/dist/feedback/Dialog/index.js +1 -0
- package/dist/feedback/PopupForm/PopupForm.d.ts +24 -0
- package/dist/feedback/PopupForm/PopupForm.d.ts.map +1 -0
- package/dist/feedback/PopupForm/PopupForm.js +13 -0
- package/dist/feedback/PopupForm/PopupForm.scss +34 -0
- package/dist/feedback/PopupForm/index.d.ts +2 -0
- package/dist/feedback/PopupForm/index.d.ts.map +1 -0
- package/dist/feedback/PopupForm/index.js +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/layout/Container/Container.d.ts +11 -0
- package/dist/layout/Container/Container.d.ts.map +1 -0
- package/dist/layout/Container/Container.js +7 -0
- package/dist/layout/Container/Container.scss +40 -0
- package/dist/layout/Container/index.d.ts +3 -0
- package/dist/layout/Container/index.d.ts.map +1 -0
- package/dist/layout/Container/index.js +2 -0
- package/dist/layout/Divider/Divider.d.ts +12 -0
- package/dist/layout/Divider/Divider.d.ts.map +1 -0
- package/dist/layout/Divider/Divider.js +7 -0
- package/dist/layout/Divider/Divider.scss +117 -0
- package/dist/layout/Divider/index.d.ts +3 -0
- package/dist/layout/Divider/index.d.ts.map +1 -0
- package/dist/layout/Divider/index.js +2 -0
- package/dist/layout/Grid/Grid.d.ts +24 -0
- package/dist/layout/Grid/Grid.d.ts.map +1 -0
- package/dist/layout/Grid/Grid.js +11 -0
- package/dist/layout/Grid/Grid.scss +81 -0
- package/dist/layout/Grid/index.d.ts +3 -0
- package/dist/layout/Grid/index.d.ts.map +1 -0
- package/dist/layout/Grid/index.js +2 -0
- package/dist/layout/Section/Section.d.ts +13 -0
- package/dist/layout/Section/Section.d.ts.map +1 -0
- package/dist/layout/Section/Section.js +7 -0
- package/dist/layout/Section/Section.scss +74 -0
- package/dist/layout/Section/index.d.ts +3 -0
- package/dist/layout/Section/index.d.ts.map +1 -0
- package/dist/layout/Section/index.js +2 -0
- package/dist/layout/Stack/Stack.d.ts +18 -0
- package/dist/layout/Stack/Stack.d.ts.map +1 -0
- package/dist/layout/Stack/Stack.js +7 -0
- package/dist/layout/Stack/Stack.scss +61 -0
- package/dist/layout/Stack/index.d.ts +3 -0
- package/dist/layout/Stack/index.d.ts.map +1 -0
- package/dist/layout/Stack/index.js +2 -0
- package/dist/navigation/Footer/Footer.d.ts +31 -0
- package/dist/navigation/Footer/Footer.d.ts.map +1 -0
- package/dist/navigation/Footer/Footer.js +21 -0
- package/dist/navigation/Footer/Footer.scss +233 -0
- package/dist/navigation/Footer/index.d.ts +3 -0
- package/dist/navigation/Footer/index.d.ts.map +1 -0
- package/dist/navigation/Footer/index.js +2 -0
- package/dist/navigation/Header/Header.d.ts +23 -0
- package/dist/navigation/Header/Header.d.ts.map +1 -0
- package/dist/navigation/Header/Header.js +16 -0
- package/dist/navigation/Header/Header.scss +325 -0
- package/dist/navigation/Header/index.d.ts +3 -0
- package/dist/navigation/Header/index.d.ts.map +1 -0
- package/dist/navigation/Header/index.js +2 -0
- package/dist/primitives/Button/Button.d.ts +31 -0
- package/dist/primitives/Button/Button.d.ts.map +1 -0
- package/dist/primitives/Button/Button.js +36 -0
- package/dist/primitives/Button/Button.scss +218 -0
- package/dist/primitives/Button/index.d.ts +3 -0
- package/dist/primitives/Button/index.d.ts.map +1 -0
- package/dist/primitives/Button/index.js +2 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts +13 -0
- package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/primitives/Checkbox/Checkbox.js +10 -0
- package/dist/primitives/Checkbox/Checkbox.scss +114 -0
- package/dist/primitives/Checkbox/index.d.ts +3 -0
- package/dist/primitives/Checkbox/index.d.ts.map +1 -0
- package/dist/primitives/Checkbox/index.js +2 -0
- package/dist/primitives/TextField/TextField.d.ts +22 -0
- package/dist/primitives/TextField/TextField.d.ts.map +1 -0
- package/dist/primitives/TextField/TextField.js +14 -0
- package/dist/primitives/TextField/TextField.scss +93 -0
- package/dist/primitives/TextField/index.d.ts +3 -0
- package/dist/primitives/TextField/index.d.ts.map +1 -0
- package/dist/primitives/TextField/index.js +2 -0
- package/dist/styles/fonts.scss +27 -0
- package/dist/styles/main.scss +36 -0
- package/dist/styles/tokens.scss +301 -0
- package/dist/styles/typography.scss +232 -0
- package/package.json +12 -11
- package/src/content/Card/Card.stories.tsx +389 -0
- package/src/content/Card/index.ts +2 -2
- package/src/content/Hero/Hero.stories.tsx +299 -0
- package/src/content/Hero/index.ts +2 -2
- package/src/content/StatBlock/StatBlock.stories.tsx +331 -0
- package/src/content/StatBlock/index.ts +2 -2
- package/src/feedback/Dialog/Dialog.stories.tsx +286 -0
- package/src/feedback/Dialog/index.ts +1 -1
- package/src/feedback/PopupForm/PopupForm.stories.tsx +341 -0
- package/src/feedback/PopupForm/PopupForm.tsx +2 -2
- package/src/feedback/PopupForm/index.ts +1 -1
- package/src/index.ts +15 -15
- package/src/layout/Container/Container.stories.tsx +153 -0
- package/src/layout/Container/index.ts +2 -2
- package/src/layout/Divider/Divider.stories.tsx +204 -0
- package/src/layout/Divider/index.ts +2 -2
- package/src/layout/Grid/Grid.stories.tsx +263 -0
- package/src/layout/Grid/index.ts +2 -2
- package/src/layout/Section/Section.stories.tsx +173 -0
- package/src/layout/Section/index.ts +2 -2
- package/src/layout/Stack/Stack.stories.tsx +342 -0
- package/src/layout/Stack/index.ts +2 -2
- package/src/navigation/Footer/Footer.stories.tsx +351 -0
- package/src/navigation/Footer/index.ts +2 -2
- package/src/navigation/Header/Header.stories.tsx +346 -0
- package/src/navigation/Header/index.ts +2 -2
- package/src/primitives/Button/Button.stories.tsx +300 -0
- package/src/primitives/Button/index.ts +2 -2
- package/src/primitives/Checkbox/Checkbox.stories.tsx +204 -0
- package/src/primitives/Checkbox/index.ts +2 -2
- package/src/primitives/TextField/TextField.stories.tsx +265 -0
- package/src/primitives/TextField/index.ts +2 -2
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@use "../../styles/tokens" as *;
|
|
2
|
+
@use "../../styles/typography" as *;
|
|
3
|
+
|
|
4
|
+
/*******************************************************************************
|
|
5
|
+
* StatBlock Component
|
|
6
|
+
*
|
|
7
|
+
* Large formatted number with label, used for data display (canadaspends.com)
|
|
8
|
+
******************************************************************************/
|
|
9
|
+
|
|
10
|
+
.bc-stat-block {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: calc($space-1 / 2);
|
|
14
|
+
|
|
15
|
+
/***************************************************************************
|
|
16
|
+
* Size Variants
|
|
17
|
+
***************************************************************************/
|
|
18
|
+
|
|
19
|
+
&--sm {
|
|
20
|
+
.bc-stat-block__value {
|
|
21
|
+
@include h2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.bc-stat-block__label {
|
|
25
|
+
@include label-sm;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--md {
|
|
30
|
+
.bc-stat-block__value {
|
|
31
|
+
@include display-2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.bc-stat-block__label {
|
|
35
|
+
@include label;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--lg {
|
|
40
|
+
.bc-stat-block__value {
|
|
41
|
+
@include display-1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bc-stat-block__label {
|
|
45
|
+
@include h4;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/***************************************************************************
|
|
50
|
+
* Elements
|
|
51
|
+
***************************************************************************/
|
|
52
|
+
|
|
53
|
+
&__value {
|
|
54
|
+
color: $charcoal;
|
|
55
|
+
font-variant-numeric: tabular-nums;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__label {
|
|
59
|
+
color: $text-secondary;
|
|
60
|
+
text-transform: uppercase;
|
|
61
|
+
letter-spacing: 0.05em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__description {
|
|
65
|
+
@include body-3;
|
|
66
|
+
color: $text-muted;
|
|
67
|
+
margin-top: calc($space-1 / 2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__change {
|
|
71
|
+
@include mono-sm;
|
|
72
|
+
color: $text-secondary;
|
|
73
|
+
margin-top: calc($space-1 / 2);
|
|
74
|
+
|
|
75
|
+
&--up {
|
|
76
|
+
color: $emerald-600;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&--down {
|
|
80
|
+
color: $auburn;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/content/StatBlock/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACxG,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type DialogPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center";
|
|
2
|
+
export interface DialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
position?: DialogPosition;
|
|
9
|
+
className?: string;
|
|
10
|
+
closeOnEscape?: boolean;
|
|
11
|
+
showCloseButton?: boolean;
|
|
12
|
+
ariaLabelledBy?: string;
|
|
13
|
+
ariaDescribedBy?: string;
|
|
14
|
+
offset?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function Dialog({ open, onClose, children, title, description, position, className, closeOnEscape, showCloseButton, ariaLabelledBy, ariaDescribedBy, offset, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default Dialog;
|
|
18
|
+
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/feedback/Dialog/Dialog.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GACpB,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,GACd,QAAQ,CAAA;AAEd,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,MAAM,CAAC,EACnB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAyB,EACzB,SAAS,EACT,aAAoB,EACpB,eAAsB,EACtB,cAAc,EACd,eAAe,EACf,MAAW,GACd,EAAE,WAAW,2CA6Eb;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useCallback } from "react";
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
export function Dialog({ open, onClose, children, title, description, position = "bottom-right", className, closeOnEscape = true, showCloseButton = true, ariaLabelledBy, ariaDescribedBy, offset = 16, }) {
|
|
7
|
+
const dialogRef = useRef(null);
|
|
8
|
+
const handleClose = useCallback(() => {
|
|
9
|
+
onClose();
|
|
10
|
+
}, [onClose]);
|
|
11
|
+
// Handle escape key
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!closeOnEscape || !open)
|
|
14
|
+
return;
|
|
15
|
+
const handleKeyDown = (e) => {
|
|
16
|
+
if (e.key === "Escape") {
|
|
17
|
+
handleClose();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
21
|
+
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
22
|
+
}, [closeOnEscape, open, handleClose]);
|
|
23
|
+
if (!open)
|
|
24
|
+
return null;
|
|
25
|
+
const classes = cx("bc-dialog", `bc-dialog--${position}`, className);
|
|
26
|
+
const titleId = ariaLabelledBy || (title ? "bc-dialog-title" : undefined);
|
|
27
|
+
const descriptionId = ariaDescribedBy || (description ? "bc-dialog-description" : undefined);
|
|
28
|
+
const style = {
|
|
29
|
+
"--bc-dialog-offset": `${offset}px`,
|
|
30
|
+
};
|
|
31
|
+
return (_jsx("div", { ref: dialogRef, className: classes, style: style, role: "dialog", "aria-modal": "false", "aria-labelledby": titleId, "aria-describedby": descriptionId, children: _jsxs("div", { className: "bc-dialog__container", children: [(title || showCloseButton) && (_jsxs("header", { className: "bc-dialog__header", children: [title && (_jsx("h2", { id: titleId, className: "bc-dialog__title", children: title })), showCloseButton && (_jsx("button", { type: "button", className: "bc-dialog__close", onClick: handleClose, "aria-label": "Close dialog", children: _jsx(FontAwesomeIcon, { icon: faXmark }) }))] })), description && (_jsx("p", { id: descriptionId, className: "bc-dialog__description", children: description })), _jsx("div", { className: "bc-dialog__content", children: children })] }) }));
|
|
32
|
+
}
|
|
33
|
+
export default Dialog;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
@use "../../styles/tokens" as *;
|
|
2
|
+
|
|
3
|
+
/*******************************************************************************
|
|
4
|
+
* Dialog Component
|
|
5
|
+
*
|
|
6
|
+
* A non-modal floating panel that doesn't block interaction with the UI.
|
|
7
|
+
* Sizes to its contents and can be positioned in corners.
|
|
8
|
+
******************************************************************************/
|
|
9
|
+
|
|
10
|
+
.bc-dialog {
|
|
11
|
+
position: fixed;
|
|
12
|
+
z-index: $z-popover;
|
|
13
|
+
background: $white;
|
|
14
|
+
border: 1px solid $border-default;
|
|
15
|
+
box-shadow: $shadow-lg;
|
|
16
|
+
max-width: calc(100vw - var(--bc-dialog-offset, 16px) * 2);
|
|
17
|
+
max-height: calc(100dvh - var(--bc-dialog-offset, 16px) * 2);
|
|
18
|
+
|
|
19
|
+
// Animation
|
|
20
|
+
animation: bc-dialog-enter $transition-base;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes bc-dialog-enter {
|
|
24
|
+
from {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transform: scale(0.95);
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/*******************************************************************************
|
|
35
|
+
* Dialog Positions
|
|
36
|
+
******************************************************************************/
|
|
37
|
+
|
|
38
|
+
.bc-dialog--top-left {
|
|
39
|
+
top: var(--bc-dialog-offset, 16px);
|
|
40
|
+
left: var(--bc-dialog-offset, 16px);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.bc-dialog--top-right {
|
|
44
|
+
top: var(--bc-dialog-offset, 16px);
|
|
45
|
+
right: var(--bc-dialog-offset, 16px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bc-dialog--bottom-left {
|
|
49
|
+
bottom: var(--bc-dialog-offset, 16px);
|
|
50
|
+
left: var(--bc-dialog-offset, 16px);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.bc-dialog--bottom-right {
|
|
54
|
+
bottom: var(--bc-dialog-offset, 16px);
|
|
55
|
+
right: var(--bc-dialog-offset, 16px);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.bc-dialog--center {
|
|
59
|
+
top: 50%;
|
|
60
|
+
left: 50%;
|
|
61
|
+
transform: translate(-50%, -50%);
|
|
62
|
+
animation: bc-dialog-enter-center $transition-base;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes bc-dialog-enter-center {
|
|
66
|
+
from {
|
|
67
|
+
opacity: 0;
|
|
68
|
+
transform: translate(-50%, -50%) scale(0.95);
|
|
69
|
+
}
|
|
70
|
+
to {
|
|
71
|
+
opacity: 1;
|
|
72
|
+
transform: translate(-50%, -50%) scale(1);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/*******************************************************************************
|
|
77
|
+
* Dialog Container
|
|
78
|
+
******************************************************************************/
|
|
79
|
+
|
|
80
|
+
.bc-dialog__container {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/*******************************************************************************
|
|
87
|
+
* Dialog Header
|
|
88
|
+
******************************************************************************/
|
|
89
|
+
|
|
90
|
+
.bc-dialog__header {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
gap: $space-2;
|
|
95
|
+
padding: $space-2 $space-2 0 $space-3;
|
|
96
|
+
flex-shrink: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bc-dialog__title {
|
|
100
|
+
font-family: "Soehne Kraftig", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
101
|
+
font-size: 1.125rem;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
line-height: 1.4;
|
|
104
|
+
color: $charcoal;
|
|
105
|
+
margin: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.bc-dialog__close {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
width: 32px;
|
|
113
|
+
height: 32px;
|
|
114
|
+
padding: 0;
|
|
115
|
+
border: none;
|
|
116
|
+
background: transparent;
|
|
117
|
+
color: $gray-600;
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
transition: background-color $transition-fast, color $transition-fast;
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background-color: $gray-100;
|
|
124
|
+
color: $charcoal;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:focus-visible {
|
|
128
|
+
outline: 2px solid $auburn;
|
|
129
|
+
outline-offset: 2px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
svg {
|
|
133
|
+
width: 16px;
|
|
134
|
+
height: 16px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/*******************************************************************************
|
|
139
|
+
* Dialog Description
|
|
140
|
+
******************************************************************************/
|
|
141
|
+
|
|
142
|
+
.bc-dialog__description {
|
|
143
|
+
font-family: "Financier Text Regular", Georgia, "Times New Roman", serif;
|
|
144
|
+
font-size: 0.875rem;
|
|
145
|
+
line-height: 1.5;
|
|
146
|
+
color: $gray-600;
|
|
147
|
+
margin: 0;
|
|
148
|
+
padding: $space-1 $space-3 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/*******************************************************************************
|
|
152
|
+
* Dialog Content
|
|
153
|
+
******************************************************************************/
|
|
154
|
+
|
|
155
|
+
.bc-dialog__content {
|
|
156
|
+
overflow-y: auto;
|
|
157
|
+
padding: $space-3;
|
|
158
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feedback/Dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dialog } from "./Dialog.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type DialogPosition } from "../Dialog/index.js";
|
|
2
|
+
import { type ButtonVariant } from "../../primitives/Button/index.js";
|
|
3
|
+
export interface PopupFormProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
position?: DialogPosition;
|
|
11
|
+
offset?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
submitText?: string;
|
|
14
|
+
submitVariant?: ButtonVariant;
|
|
15
|
+
cancelText?: string;
|
|
16
|
+
cancelVariant?: ButtonVariant;
|
|
17
|
+
showCancel?: boolean;
|
|
18
|
+
isSubmitting?: boolean;
|
|
19
|
+
submitDisabled?: boolean;
|
|
20
|
+
closeOnEscape?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function PopupForm({ open, onClose, onSubmit, children, title, description, position, offset, className, submitText, submitVariant, cancelText, cancelVariant, showCancel, isSubmitting, submitDisabled, closeOnEscape, }: PopupFormProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default PopupForm;
|
|
24
|
+
//# sourceMappingURL=PopupForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupForm.d.ts","sourceRoot":"","sources":["../../../src/feedback/PopupForm/PopupForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAE7E,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAA;IACvD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,wBAAgB,SAAS,CAAC,EACtB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAyB,EACzB,MAAM,EACN,SAAS,EACT,UAAqB,EACrB,aAA8B,EAC9B,UAAqB,EACrB,aAAkC,EAClC,UAAiB,EACjB,YAAoB,EACpB,cAAsB,EACtB,aAAoB,GACvB,EAAE,cAAc,2CA4ChB;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import { Dialog } from "../Dialog/index.js";
|
|
4
|
+
import { Button } from "../../primitives/Button/index.js";
|
|
5
|
+
export function PopupForm({ open, onClose, onSubmit, children, title, description, position = "bottom-right", offset, className, submitText = "Submit", submitVariant = "solid-auburn", cancelText = "Cancel", cancelVariant = "outline-charcoal", showCancel = true, isSubmitting = false, submitDisabled = false, closeOnEscape = true, }) {
|
|
6
|
+
const handleSubmit = (e) => {
|
|
7
|
+
e.preventDefault();
|
|
8
|
+
onSubmit(e);
|
|
9
|
+
};
|
|
10
|
+
const classes = cx("bc-popup-form", className);
|
|
11
|
+
return (_jsx(Dialog, { open: open, onClose: onClose, title: title, description: description, position: position, offset: offset, closeOnEscape: closeOnEscape, children: _jsxs("form", { onSubmit: handleSubmit, className: classes, children: [_jsx("div", { className: "bc-popup-form__fields", children: children }), _jsxs("div", { className: "bc-popup-form__actions", children: [showCancel && (_jsx(Button, { type: "button", text: cancelText, variant: cancelVariant, onClick: onClose, disabled: isSubmitting, icon: null })), _jsx(Button, { type: "submit", text: isSubmitting ? "Submitting..." : submitText, variant: submitVariant, disabled: submitDisabled || isSubmitting, icon: null })] })] }) }));
|
|
12
|
+
}
|
|
13
|
+
export default PopupForm;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use "../../styles/tokens" as *;
|
|
2
|
+
|
|
3
|
+
/*******************************************************************************
|
|
4
|
+
* PopupForm Component
|
|
5
|
+
******************************************************************************/
|
|
6
|
+
|
|
7
|
+
.bc-popup-form {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: $space-3;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/*******************************************************************************
|
|
14
|
+
* PopupForm Fields
|
|
15
|
+
******************************************************************************/
|
|
16
|
+
|
|
17
|
+
.bc-popup-form__fields {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: $space-3;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/*******************************************************************************
|
|
24
|
+
* PopupForm Actions
|
|
25
|
+
******************************************************************************/
|
|
26
|
+
|
|
27
|
+
.bc-popup-form__actions {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
gap: $space-2;
|
|
32
|
+
padding-top: $space-2;
|
|
33
|
+
border-top: 1px solid $border-muted;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feedback/PopupForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PopupForm } from "./PopupForm.js";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* @buildcanada/components
|
|
3
|
+
*
|
|
4
|
+
* Build Canada Design System Components
|
|
5
|
+
******************************************************************************/
|
|
6
|
+
export { Button, type ButtonProps, type ButtonVariant, type ButtonSize } from "./primitives/Button/index.js";
|
|
7
|
+
export { TextField, type TextFieldProps, type TextFieldType } from "./primitives/TextField/index.js";
|
|
8
|
+
export { Checkbox, type CheckboxProps } from "./primitives/Checkbox/index.js";
|
|
9
|
+
export { Container, type ContainerProps, type ContainerSize } from "./layout/Container/index.js";
|
|
10
|
+
export { Section, type SectionProps, type SectionBackground, type SectionSpacing } from "./layout/Section/index.js";
|
|
11
|
+
export { Grid, GridItem, type GridProps, type GridItemProps, type GridColumns, type GridGap } from "./layout/Grid/index.js";
|
|
12
|
+
export { Stack, type StackProps, type StackDirection, type StackSpacing, type StackAlign, type StackJustify } from "./layout/Stack/index.js";
|
|
13
|
+
export { Divider, type DividerProps, type DividerOrientation, type DividerVariant } from "./layout/Divider/index.js";
|
|
14
|
+
export { Card, CardImage, CardIcon, CardContent, CardTitle, CardDescription, CardMeta, CardStat, CardAuthor, type CardProps, type CardVariant, type CardImageProps, type CardIconProps, type CardContentProps, type CardTitleProps, type CardDescriptionProps, type CardMetaProps, type CardStatProps, type CardAuthorProps, } from "./content/Card/index.js";
|
|
15
|
+
export { Hero, HeroTitle, HeroSubtitle, HeroActions, type HeroProps, type HeroVariant, type HeroBackground, type HeroTitleProps, type HeroSubtitleProps, type HeroActionsProps, } from "./content/Hero/index.js";
|
|
16
|
+
export { StatBlock, type StatBlockProps, type StatBlockSize, type StatBlockTrend } from "./content/StatBlock/index.js";
|
|
17
|
+
export { Header, type HeaderProps, type NavItem } from "./navigation/Header/index.js";
|
|
18
|
+
export { Footer, type FooterProps, type FooterLink, type SocialLink } from "./navigation/Footer/index.js";
|
|
19
|
+
export { Dialog, type DialogProps, type DialogPosition } from "./feedback/Dialog/index.js";
|
|
20
|
+
export { PopupForm, type PopupFormProps } from "./feedback/PopupForm/index.js";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAGhF,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC5G,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAA;AACpG,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAG7E,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAChG,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AACnH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAC3H,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC5I,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAGpH,OAAO,EACH,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,WAAW,EACX,SAAS,EACT,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,eAAe,GACvB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACH,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,WAAW,EACX,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACxB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGtH,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAGzG,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
* @buildcanada/components
|
|
3
|
+
*
|
|
4
|
+
* Build Canada Design System Components
|
|
5
|
+
******************************************************************************/
|
|
6
|
+
// Primitives
|
|
7
|
+
export { Button } from "./primitives/Button/index.js";
|
|
8
|
+
export { TextField } from "./primitives/TextField/index.js";
|
|
9
|
+
export { Checkbox } from "./primitives/Checkbox/index.js";
|
|
10
|
+
// Layout
|
|
11
|
+
export { Container } from "./layout/Container/index.js";
|
|
12
|
+
export { Section } from "./layout/Section/index.js";
|
|
13
|
+
export { Grid, GridItem } from "./layout/Grid/index.js";
|
|
14
|
+
export { Stack } from "./layout/Stack/index.js";
|
|
15
|
+
export { Divider } from "./layout/Divider/index.js";
|
|
16
|
+
// Content
|
|
17
|
+
export { Card, CardImage, CardIcon, CardContent, CardTitle, CardDescription, CardMeta, CardStat, CardAuthor, } from "./content/Card/index.js";
|
|
18
|
+
export { Hero, HeroTitle, HeroSubtitle, HeroActions, } from "./content/Hero/index.js";
|
|
19
|
+
export { StatBlock } from "./content/StatBlock/index.js";
|
|
20
|
+
// Navigation
|
|
21
|
+
export { Header } from "./navigation/Header/index.js";
|
|
22
|
+
export { Footer } from "./navigation/Footer/index.js";
|
|
23
|
+
// Feedback
|
|
24
|
+
export { Dialog } from "./feedback/Dialog/index.js";
|
|
25
|
+
export { PopupForm } from "./feedback/PopupForm/index.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
2
|
+
export interface ContainerProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
size?: ContainerSize;
|
|
7
|
+
as?: "div" | "main" | "article" | "section";
|
|
8
|
+
}
|
|
9
|
+
export declare function Container({ children, className, style, size, as: Component, }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Container;
|
|
11
|
+
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/layout/Container/Container.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAA;AAE9D,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;CAC9C;AAED,wBAAgB,SAAS,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAW,EACX,EAAE,EAAE,SAAiB,GACxB,EAAE,cAAc,2CAQhB;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
export function Container({ children, className, style, size = "lg", as: Component = "div", }) {
|
|
4
|
+
const classes = cx("bc-container", `bc-container--${size}`, className);
|
|
5
|
+
return (_jsx(Component, { className: classes, style: style, children: children }));
|
|
6
|
+
}
|
|
7
|
+
export default Container;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use "../../styles/tokens" as *;
|
|
2
|
+
|
|
3
|
+
/*******************************************************************************
|
|
4
|
+
* Container Component
|
|
5
|
+
*
|
|
6
|
+
* Max-width container with responsive padding
|
|
7
|
+
******************************************************************************/
|
|
8
|
+
|
|
9
|
+
.bc-container {
|
|
10
|
+
width: 100%;
|
|
11
|
+
margin-left: auto;
|
|
12
|
+
margin-right: auto;
|
|
13
|
+
padding-left: $space-3;
|
|
14
|
+
padding-right: $space-3;
|
|
15
|
+
|
|
16
|
+
@include md-up {
|
|
17
|
+
padding-left: $space-5;
|
|
18
|
+
padding-right: $space-5;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--sm {
|
|
22
|
+
max-width: 640px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&--md {
|
|
26
|
+
max-width: 768px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--lg {
|
|
30
|
+
max-width: 1024px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--xl {
|
|
34
|
+
max-width: 1280px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--full {
|
|
38
|
+
max-width: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/Container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type DividerOrientation = "horizontal" | "vertical";
|
|
2
|
+
export type DividerVariant = "solid" | "dashed" | "construction";
|
|
3
|
+
export interface DividerProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
orientation?: DividerOrientation;
|
|
7
|
+
variant?: DividerVariant;
|
|
8
|
+
spacing?: "none" | "sm" | "md" | "lg";
|
|
9
|
+
}
|
|
10
|
+
export declare function Divider({ className, style, orientation, variant, spacing, }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default Divider;
|
|
12
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../src/layout/Divider/Divider.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,CAAA;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,cAAc,CAAA;AAEhE,MAAM,WAAW,YAAY;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CACxC;AAED,wBAAgB,OAAO,CAAC,EACpB,SAAS,EACT,KAAK,EACL,WAA0B,EAC1B,OAAiB,EACjB,OAAc,GACjB,EAAE,YAAY,2CAUd;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
export function Divider({ className, style, orientation = "horizontal", variant = "solid", spacing = "md", }) {
|
|
4
|
+
const classes = cx("bc-divider", `bc-divider--${orientation}`, `bc-divider--${variant}`, `bc-divider--spacing-${spacing}`, className);
|
|
5
|
+
return _jsx("hr", { className: classes, style: style });
|
|
6
|
+
}
|
|
7
|
+
export default Divider;
|