@homebound/beam 2.201.2 → 2.202.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/components/ButtonModal.d.ts +3 -0
- package/dist/components/Icon.d.ts +4 -0
- package/dist/components/Icon.js +4 -0
- package/dist/components/Table/components/cell.js +1 -1
- package/dist/components/internal/OverlayTrigger.d.ts +4 -1
- package/dist/components/internal/OverlayTrigger.js +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { OverlayTriggerProps } from "./internal/OverlayTrigger";
|
|
3
|
+
import { ButtonVariant } from "./Button";
|
|
3
4
|
export interface ButtonModalProps extends Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip"> {
|
|
4
5
|
content: ReactNode;
|
|
5
6
|
title?: string;
|
|
7
|
+
variant?: ButtonVariant;
|
|
6
8
|
storybookDefaultOpen?: boolean;
|
|
9
|
+
hideEndAdornment?: boolean;
|
|
7
10
|
}
|
|
8
11
|
export declare function ButtonModal(props: ButtonModalProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -94,6 +94,10 @@ export declare const Icons: {
|
|
|
94
94
|
house: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
95
95
|
bell: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
96
96
|
customize: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
97
|
+
leaf: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
98
|
+
floorPlan: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
99
|
+
chair: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
100
|
+
bolt: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
97
101
|
projects: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
98
102
|
tasks: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
99
103
|
finances: import("@emotion/react/jsx-runtime").JSX.Element;
|
package/dist/components/Icon.js
CHANGED
|
@@ -103,6 +103,10 @@ exports.Icons = {
|
|
|
103
103
|
house: ((0, jsx_runtime_1.jsx)("path", { d: "M5.00299 22H9.00299H15.003H19.003C20.106 22 21.003 21.103 21.003 20V11C21.003 10.735 20.898 10.48 20.71 10.293L12.71 2.29301C12.319 1.90201 11.687 1.90201 11.296 2.29301L3.29599 10.293C3.10799 10.48 3.00299 10.735 3.00299 11V20C3.00299 21.103 3.89999 22 5.00299 22ZM10.003 20V15H14.003V20H10.003ZM5.00299 11.414L12.003 4.41401L19.003 11.414L19.004 20H16.003V15C16.003 13.897 15.106 13 14.003 13H10.003C8.89999 13 8.00299 13.897 8.00299 15V20H5.00299V11.414Z" }, void 0)),
|
|
104
104
|
bell: ((0, jsx_runtime_1.jsx)("path", { d: "M19 13.586V10C19 6.783 16.815 4.073 13.855 3.258C13.562 2.52 12.846 2 12 2C11.154 2 10.438 2.52 10.145 3.258C7.185 4.074 5 6.783 5 10V13.586L3.293 15.293C3.105 15.48 3 15.734 3 16V18C3 18.553 3.447 19 4 19H20C20.553 19 21 18.553 21 18V16C21 15.734 20.895 15.48 20.707 15.293L19 13.586ZM19 17H5V16.414L6.707 14.707C6.895 14.52 7 14.266 7 14V10C7 7.243 9.243 5 12 5C14.757 5 17 7.243 17 10V14C17 14.266 17.105 14.52 17.293 14.707L19 16.414V17ZM12 22C13.311 22 14.407 21.166 14.818 20H9.182C9.593 21.166 10.689 22 12 22Z" }, void 0)),
|
|
105
105
|
customize: ((0, jsx_runtime_1.jsx)("path", { d: "M4 11H10C10.553 11 11 10.552 11 10V4C11 3.448 10.553 3 10 3H4C3.447 3 3 3.448 3 4V10C3 10.552 3.447 11 4 11ZM5 5H9V9H5V5ZM20 3H14C13.447 3 13 3.448 13 4V10C13 10.552 13.447 11 14 11H20C20.553 11 21 10.552 21 10V4C21 3.448 20.553 3 20 3ZM19 9H15V5H19V9ZM10 21C10.553 21 11 20.553 11 20V14C11 13.447 10.553 13 10 13H4C3.447 13 3 13.447 3 14V20C3 20.553 3.447 21 4 21H10ZM5 15H9V19H5V15ZM18 14H16V16H14V18H16V20H18V18H20V16H18V14Z" }, void 0)),
|
|
106
|
+
leaf: ((0, jsx_runtime_1.jsx)("path", { d: "M19.8703 4L18.9173 4.32242C17.2839 4.89837 15.5397 5.07512 13.8264 4.83829C12.0261 4.55473 10.1833 4.8067 8.52111 5.56373C7.63992 5.94454 6.86658 6.543 6.2715 7.30463C5.67642 8.06626 5.2785 8.96686 5.11397 9.92443C4.94661 10.8453 4.96373 11.791 5.16431 12.705C5.36489 13.619 5.74483 14.4826 6.28145 15.2443C6.2338 15.4136 6.18615 15.5829 6.14644 15.7521C5.82386 17.1442 5.66392 18.57 5.66991 20H7.25832C7.33298 18.8295 7.48957 17.6658 7.7269 16.5179C8.82881 17.1218 10.0645 17.4298 11.3167 17.4126C12.4846 17.4118 13.6404 17.1733 14.7159 16.7113C20.7598 14.0917 19.9656 5.37834 19.9656 5.01562L19.8703 4ZM14.0964 15.2282C12.0236 16.1229 9.54563 15.9698 8.15578 14.8655C8.39068 14.0683 8.71302 13.3005 9.11676 12.5763C9.43063 12.0551 9.80091 11.5712 10.2207 11.1335C10.6497 10.6911 11.1328 10.3065 11.6582 9.98892C12.744 9.33002 13.9481 8.89709 15.2004 8.71537V7.90932C13.7595 7.8587 12.3275 8.15711 11.0229 8.77985C9.68892 9.44044 8.55766 10.4576 7.75073 11.7219C7.45145 12.2048 7.18606 12.7085 6.95653 13.2292C6.58843 12.2735 6.48409 11.2341 6.65473 10.2227C6.76653 9.51459 7.05413 8.84705 7.49043 8.28298C7.92673 7.7189 8.49735 7.27685 9.14853 6.99849C10.0981 6.54804 11.1342 6.3168 12.1824 6.32141C12.6748 6.32141 13.1593 6.36977 13.6676 6.41008C15.2594 6.61852 16.8756 6.52284 18.4328 6.12796C18.3772 8.35264 17.9801 13.5516 14.0964 15.2282Z" }, void 0)),
|
|
107
|
+
floorPlan: ((0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.60712 4.5C3.60712 4.08579 3.9429 3.75 4.35712 3.75H12.2143H16.1428H20.0714C20.4856 3.75 20.8214 4.08579 20.8214 4.5V20.2143C20.8214 20.6285 20.4856 20.9643 20.0714 20.9643H15.5512C15.4788 20.9876 15.4015 21.0002 15.3214 21.0002C15.2412 21.0002 15.1639 20.9876 15.0915 20.9643H4.35712C3.9429 20.9643 3.60712 20.6285 3.60712 20.2143V12.3571C3.60712 11.9429 3.9429 11.6071 4.35712 11.6071C4.77133 11.6071 5.10712 11.9429 5.10712 12.3571V19.4643H14.5714V17.8216C14.5714 17.4074 14.9071 17.0716 15.3214 17.0716C15.7356 17.0716 16.0714 17.4074 16.0714 17.8216V19.4643H19.3214V13.0716H19.3214L11.3571 13.0716V13.9643C11.3571 14.3785 11.0213 14.7143 10.6071 14.7143C10.1929 14.7143 9.85712 14.3785 9.85712 13.9643V12.3305L9.85707 12.3216L9.85712 12.3127V10.75C9.85712 10.3358 10.1929 10 10.6071 10C11.0213 10 11.3571 10.3358 11.3571 10.75V11.5716L19.3214 11.5716H19.3214V5.25H16.1428L16.0714 5.25V7.67857C16.0714 8.09279 15.7356 8.42857 15.3214 8.42857C14.9071 8.42857 14.5714 8.09278 14.5714 7.67857V5.25H12.2143H5.10712V6.46429C5.10712 6.8785 4.77133 7.21429 4.35712 7.21429C3.9429 7.21429 3.60712 6.8785 3.60712 6.46429V4.5Z" }, void 0)),
|
|
108
|
+
chair: ((0, jsx_runtime_1.jsx)("path", { d: "M17.25 12.8V5.6C17.25 4.7176 16.5773 4 15.75 4H8.25C7.42275 4 6.75 4.7176 6.75 5.6V12.8C6.33525 12.8 6 13.1576 6 13.6V20H7.5V16H16.5V20H18V13.6C18 13.1576 17.6648 12.8 17.25 12.8ZM15.75 5.6V12.8H14.25V5.6H15.75ZM12.75 5.6V12.8H11.25V5.6H12.75ZM8.25 5.6H9.75V12.8H8.25V5.6Z" }, void 0)),
|
|
109
|
+
bolt: ((0, jsx_runtime_1.jsx)("path", { d: "M17.168 8H13L13.806 3.165C13.907 2.555 13.438 2 12.819 2H7.66702C7.17802 2 6.76102 2.354 6.68102 2.835L5.01402 12.835C4.91202 13.445 5.38202 14 6.00002 14H10V22L18.01 9.541C18.438 8.875 17.96 8 17.168 8Z" }, void 0)),
|
|
106
110
|
// Navigation
|
|
107
111
|
projects: ((0, jsx_runtime_1.jsx)("path", { d: "M4 6H6V8H4V6ZM4 11H6V13H4V11ZM4 16H6V18H4V16ZM20 8V6H18.8H9.2H8.023V8H9.2H18.8H20ZM8 11H20V13H8V11ZM8 16H20V18H8V16Z" }, void 0)),
|
|
108
112
|
tasks: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M5 22H19C20.103 22 21 21.103 21 20V5C21 3.897 20.103 3 19 3H17C17 2.447 16.553 2 16 2H8C7.447 2 7 2.447 7 3H5C3.897 3 3 3.897 3 5V20C3 21.103 3.897 22 5 22ZM5 5H7V7H17V5H19V20H5V5Z" }, void 0), (0, jsx_runtime_1.jsx)("path", { d: "M11 13.586L9.20697 11.793L7.79297 13.207L11 16.414L16.207 11.207L14.793 9.79297L11 13.586Z" }, void 0)] }, void 0)),
|
|
@@ -15,7 +15,7 @@ exports.defaultRenderFn = defaultRenderFn;
|
|
|
15
15
|
/** Sets up the `GridContext` so that header cells can access the current sort settings. */
|
|
16
16
|
const headerRenderFn = (column, as) => (key, css, content, row, rowStyle, classNames) => {
|
|
17
17
|
const Cell = as === "table" ? "th" : "div";
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(Cell, Object.assign({ css: { ...css, ...(0, TableStyles_1.tableRowStyles)(as, column) }, className: classNames }, { children: content }),
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(Cell, Object.assign({ css: { ...css, ...(0, TableStyles_1.tableRowStyles)(as, column) }, className: classNames }, { children: content }), key));
|
|
19
19
|
};
|
|
20
20
|
exports.headerRenderFn = headerRenderFn;
|
|
21
21
|
/** Renders a cell element when a row link is in play. */
|
|
@@ -2,7 +2,7 @@ import { AriaButtonProps } from "@react-types/button";
|
|
|
2
2
|
import { MutableRefObject, ReactElement, ReactNode } from "react";
|
|
3
3
|
import { MenuTriggerState } from "react-stately";
|
|
4
4
|
import { AvatarButtonProps } from "../AvatarButton";
|
|
5
|
-
import { ButtonProps } from "../Button";
|
|
5
|
+
import { ButtonProps, ButtonVariant } from "../Button";
|
|
6
6
|
import { IconButtonProps } from "../IconButton";
|
|
7
7
|
interface TextButtonTriggerProps extends Pick<ButtonProps, "label" | "variant" | "size" | "icon"> {
|
|
8
8
|
}
|
|
@@ -26,6 +26,9 @@ export interface OverlayTriggerProps {
|
|
|
26
26
|
buttonRef: MutableRefObject<HTMLButtonElement | null>;
|
|
27
27
|
/** Result of the useMenuTriggerState hook */
|
|
28
28
|
state: MenuTriggerState;
|
|
29
|
+
/** Prop set the style of the button element */
|
|
30
|
+
variant?: ButtonVariant;
|
|
31
|
+
hideEndAdornment?: boolean;
|
|
29
32
|
}
|
|
30
33
|
export declare function OverlayTrigger(props: OverlayTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
31
34
|
export declare function isTextButton(trigger: TextButtonTriggerProps | IconButtonTriggerProps | AvatarButtonTriggerProps): trigger is TextButtonTriggerProps;
|
|
@@ -13,7 +13,7 @@ const Css_1 = require("../../Css");
|
|
|
13
13
|
const utils_1 = require("../../utils");
|
|
14
14
|
const defaultTestId_1 = require("../../utils/defaultTestId");
|
|
15
15
|
function OverlayTrigger(props) {
|
|
16
|
-
const { trigger, buttonRef, menuTriggerProps, placement, state, disabled, tooltip, children } = props;
|
|
16
|
+
const { trigger, buttonRef, menuTriggerProps, placement, state, disabled, tooltip, children, variant, hideEndAdornment, } = props;
|
|
17
17
|
const popoverRef = (0, react_1.useRef)(null);
|
|
18
18
|
const { overlayProps: positionProps } = (0, react_aria_1.useOverlayPosition)({
|
|
19
19
|
targetRef: buttonRef,
|
|
@@ -24,7 +24,7 @@ function OverlayTrigger(props) {
|
|
|
24
24
|
placement: (placement ? `bottom ${placement}` : "bottom left"),
|
|
25
25
|
});
|
|
26
26
|
const tid = (0, utils_1.useTestIds)(props, isTextButton(trigger) ? (0, defaultTestId_1.defaultTestId)(trigger.label) : isIconButton(trigger) ? trigger.icon : trigger.name);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.relative.dib.$ }, { children: [isTextButton(trigger) ? ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: "secondary" }, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef, endAdornment: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: state.isOpen ? "chevronUp" : "chevronDown" }, void 0), disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }, tid), void 0)) : isIconButton(trigger) ? ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, Object.assign({}, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef }, tid, { disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }), void 0)) : ((0, jsx_runtime_1.jsx)(AvatarButton_1.AvatarButton, Object.assign({}, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef }, tid, { disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }), void 0)), state.isOpen && ((0, jsx_runtime_1.jsx)(internal_1.Popover, Object.assign({ triggerRef: buttonRef, popoverRef: popoverRef, positionProps: positionProps, onClose: () => state.close(), isOpen: state.isOpen }, { children: children }), void 0))] }), void 0));
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.relative.dib.$ }, { children: [isTextButton(trigger) ? ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({ variant: variant ? variant : "secondary" }, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef, endAdornment: !hideEndAdornment ? (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: state.isOpen ? "chevronUp" : "chevronDown" }, void 0) : null, disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }, tid), void 0)) : isIconButton(trigger) ? ((0, jsx_runtime_1.jsx)(IconButton_1.IconButton, Object.assign({}, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef }, tid, { disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }), void 0)) : ((0, jsx_runtime_1.jsx)(AvatarButton_1.AvatarButton, Object.assign({}, trigger, { menuTriggerProps: menuTriggerProps, buttonRef: buttonRef }, tid, { disabled: disabled, tooltip: tooltip, onClick: utils_1.noop }), void 0)), state.isOpen && ((0, jsx_runtime_1.jsx)(internal_1.Popover, Object.assign({ triggerRef: buttonRef, popoverRef: popoverRef, positionProps: positionProps, onClose: () => state.close(), isOpen: state.isOpen }, { children: children }), void 0))] }), void 0));
|
|
28
28
|
}
|
|
29
29
|
exports.OverlayTrigger = OverlayTrigger;
|
|
30
30
|
function isTextButton(trigger) {
|