@homebound/beam 2.413.0-alpha.4 → 2.413.0-alpha.6
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/index.cjs +26 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -47
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6697,7 +6697,7 @@ function Button(props) {
|
|
|
6697
6697
|
// Default the icon based on other properties.
|
|
6698
6698
|
icon = download ? "download" : showExternalLinkIcon ? "linkExternal" : void 0,
|
|
6699
6699
|
variant = "primary",
|
|
6700
|
-
size = "
|
|
6700
|
+
size = "md",
|
|
6701
6701
|
buttonRef
|
|
6702
6702
|
} = ariaProps;
|
|
6703
6703
|
const ref = useGetRef(buttonRef);
|
|
@@ -14245,7 +14245,7 @@ var variantStyles2 = {
|
|
|
14245
14245
|
};
|
|
14246
14246
|
|
|
14247
14247
|
// src/components/BeamContext.tsx
|
|
14248
|
-
import { createContext as createContext6, useContext as useContext16, useMemo as useMemo37, useReducer, useRef as
|
|
14248
|
+
import { createContext as createContext6, useContext as useContext16, useMemo as useMemo37, useReducer, useRef as useRef46 } from "react";
|
|
14249
14249
|
import { OverlayProvider } from "react-aria";
|
|
14250
14250
|
|
|
14251
14251
|
// src/components/Modal/Modal.tsx
|
|
@@ -16152,8 +16152,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
16152
16152
|
}
|
|
16153
16153
|
|
|
16154
16154
|
// src/components/Filters/FilterDropdownMenu.tsx
|
|
16155
|
-
import { memo as memo2, useMemo as useMemo33,
|
|
16156
|
-
import { useOverlay as useOverlay3 } from "react-aria";
|
|
16155
|
+
import { memo as memo2, useMemo as useMemo33, useState as useState38 } from "react";
|
|
16157
16156
|
|
|
16158
16157
|
// src/components/CountBadge.tsx
|
|
16159
16158
|
import { jsx as jsx127 } from "@emotion/react/jsx-runtime";
|
|
@@ -16721,20 +16720,6 @@ function FilterDropdownMenu(props) {
|
|
|
16721
16720
|
const { filter, onChange, filterDefs, groupBy } = props;
|
|
16722
16721
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
16723
16722
|
const [isOpen, setIsOpen] = useState38(false);
|
|
16724
|
-
const buttonRef = useRef46(null);
|
|
16725
|
-
const filterContentRef = useRef46(null);
|
|
16726
|
-
const { overlayProps } = useOverlay3(
|
|
16727
|
-
{
|
|
16728
|
-
isOpen,
|
|
16729
|
-
onClose: () => setIsOpen(false),
|
|
16730
|
-
isDismissable: true,
|
|
16731
|
-
shouldCloseOnInteractOutside: (element) => {
|
|
16732
|
-
if (buttonRef.current?.contains(element)) return false;
|
|
16733
|
-
return true;
|
|
16734
|
-
}
|
|
16735
|
-
},
|
|
16736
|
-
filterContentRef
|
|
16737
|
-
);
|
|
16738
16723
|
const activeFilterCount = useMemo33(() => getActiveFilterCount(filter), [filter]);
|
|
16739
16724
|
const filterImpls = useMemo33(() => buildFilterImpls(filterDefs), [filterDefs]);
|
|
16740
16725
|
const renderFilters = () => {
|
|
@@ -16744,7 +16729,7 @@ function FilterDropdownMenu(props) {
|
|
|
16744
16729
|
return [...nonCheckbox, ...checkbox].map(([key, f]) => /* @__PURE__ */ jsx140("div", { children: f.render(filter[key], (value) => onChange(updateFilter(filter, key, value)), testId, false, false) }, key));
|
|
16745
16730
|
};
|
|
16746
16731
|
return /* @__PURE__ */ jsxs68(Fragment30, { children: [
|
|
16747
|
-
/* @__PURE__ */ jsx140(
|
|
16732
|
+
/* @__PURE__ */ jsx140(
|
|
16748
16733
|
Button,
|
|
16749
16734
|
{
|
|
16750
16735
|
label: "Filter",
|
|
@@ -16758,8 +16743,8 @@ function FilterDropdownMenu(props) {
|
|
|
16758
16743
|
onClick: () => setIsOpen(!isOpen),
|
|
16759
16744
|
...testId.button
|
|
16760
16745
|
}
|
|
16761
|
-
)
|
|
16762
|
-
isOpen && /* @__PURE__ */ jsxs68("div", {
|
|
16746
|
+
),
|
|
16747
|
+
isOpen && /* @__PURE__ */ jsxs68("div", { css: Css.df.aic.fww.gap1.order(1).$, children: [
|
|
16763
16748
|
groupBy && /* @__PURE__ */ jsx140(
|
|
16764
16749
|
SelectField,
|
|
16765
16750
|
{
|
|
@@ -17348,18 +17333,18 @@ var BeamContext = createContext6({
|
|
|
17348
17333
|
});
|
|
17349
17334
|
function BeamProvider({ children, ...presentationProps }) {
|
|
17350
17335
|
const [, tick] = useReducer((prev) => prev + 1, 0);
|
|
17351
|
-
const modalRef =
|
|
17336
|
+
const modalRef = useRef46();
|
|
17352
17337
|
const modalHeaderDiv = useMemo37(() => document.createElement("div"), []);
|
|
17353
17338
|
const modalBodyDiv = useMemo37(() => {
|
|
17354
17339
|
const el = document.createElement("div");
|
|
17355
17340
|
el.style.height = "100%";
|
|
17356
17341
|
return el;
|
|
17357
17342
|
}, []);
|
|
17358
|
-
const modalCanCloseChecksRef =
|
|
17343
|
+
const modalCanCloseChecksRef = useRef46([]);
|
|
17359
17344
|
const modalFooterDiv = useMemo37(() => document.createElement("div"), []);
|
|
17360
|
-
const drawerContentStackRef =
|
|
17361
|
-
const drawerCanCloseChecks =
|
|
17362
|
-
const drawerCanCloseDetailsChecks =
|
|
17345
|
+
const drawerContentStackRef = useRef46([]);
|
|
17346
|
+
const drawerCanCloseChecks = useRef46([]);
|
|
17347
|
+
const drawerCanCloseDetailsChecks = useRef46([]);
|
|
17363
17348
|
const sdHeaderDiv = useMemo37(() => document.createElement("div"), []);
|
|
17364
17349
|
const context = useMemo37(() => {
|
|
17365
17350
|
return {
|
|
@@ -17402,14 +17387,14 @@ function useBeamContext() {
|
|
|
17402
17387
|
}
|
|
17403
17388
|
|
|
17404
17389
|
// src/components/ButtonDatePicker.tsx
|
|
17405
|
-
import { useRef as
|
|
17390
|
+
import { useRef as useRef47 } from "react";
|
|
17406
17391
|
import { useMenuTrigger as useMenuTrigger4 } from "react-aria";
|
|
17407
17392
|
import { useMenuTriggerState as useMenuTriggerState4 } from "react-stately";
|
|
17408
17393
|
import { jsx as jsx151 } from "@emotion/react/jsx-runtime";
|
|
17409
17394
|
function ButtonDatePicker(props) {
|
|
17410
17395
|
const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
|
|
17411
17396
|
const state = useMenuTriggerState4({ isOpen: defaultOpen });
|
|
17412
|
-
const buttonRef =
|
|
17397
|
+
const buttonRef = useRef47(null);
|
|
17413
17398
|
const { menuTriggerProps, menuProps } = useMenuTrigger4({ isDisabled: !!disabled }, state, buttonRef);
|
|
17414
17399
|
const tid = useTestIds(
|
|
17415
17400
|
props,
|
|
@@ -17429,7 +17414,7 @@ function ButtonDatePicker(props) {
|
|
|
17429
17414
|
}
|
|
17430
17415
|
|
|
17431
17416
|
// src/components/ButtonGroup.tsx
|
|
17432
|
-
import { useRef as
|
|
17417
|
+
import { useRef as useRef48 } from "react";
|
|
17433
17418
|
import { useButton as useButton10, useFocusRing as useFocusRing12, useHover as useHover15 } from "react-aria";
|
|
17434
17419
|
import { jsx as jsx152, jsxs as jsxs75 } from "@emotion/react/jsx-runtime";
|
|
17435
17420
|
function ButtonGroup(props) {
|
|
@@ -17446,7 +17431,7 @@ function ButtonGroup(props) {
|
|
|
17446
17431
|
function GroupButton(props) {
|
|
17447
17432
|
const { icon, iconInc, iconColor, text, active, onClick: onPress, disabled, size, tooltip, ...otherProps } = props;
|
|
17448
17433
|
const ariaProps = { onPress, isDisabled: !!disabled, ...otherProps };
|
|
17449
|
-
const ref =
|
|
17434
|
+
const ref = useRef48(null);
|
|
17450
17435
|
const { buttonProps, isPressed } = useButton10(ariaProps, ref);
|
|
17451
17436
|
const { isFocusVisible, focusProps } = useFocusRing12();
|
|
17452
17437
|
const { hoverProps, isHovered } = useHover15(ariaProps);
|
|
@@ -17510,14 +17495,14 @@ import { useHover as useHover16 } from "react-aria";
|
|
|
17510
17495
|
|
|
17511
17496
|
// src/components/Tag.tsx
|
|
17512
17497
|
import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
|
|
17513
|
-
import { useRef as
|
|
17498
|
+
import { useRef as useRef49, useState as useState41 } from "react";
|
|
17514
17499
|
import { jsx as jsx153, jsxs as jsxs76 } from "@emotion/react/jsx-runtime";
|
|
17515
17500
|
function Tag(props) {
|
|
17516
17501
|
const { text, type, xss, preventTooltip = false, ...otherProps } = props;
|
|
17517
17502
|
const typeStyles2 = getStyles(type);
|
|
17518
17503
|
const tid = useTestIds(otherProps);
|
|
17519
17504
|
const [showTooltip, setShowTooltip] = useState41(false);
|
|
17520
|
-
const ref =
|
|
17505
|
+
const ref = useRef49(null);
|
|
17521
17506
|
useResizeObserver4({
|
|
17522
17507
|
ref,
|
|
17523
17508
|
onResize: () => {
|
|
@@ -17631,7 +17616,7 @@ function Copy(props) {
|
|
|
17631
17616
|
|
|
17632
17617
|
// src/components/DnDGrid/DnDGrid.tsx
|
|
17633
17618
|
import equal2 from "fast-deep-equal";
|
|
17634
|
-
import { useCallback as useCallback23, useRef as
|
|
17619
|
+
import { useCallback as useCallback23, useRef as useRef50 } from "react";
|
|
17635
17620
|
|
|
17636
17621
|
// src/components/DnDGrid/DnDGridContext.tsx
|
|
17637
17622
|
import { createContext as createContext7, useContext as useContext17 } from "react";
|
|
@@ -17648,12 +17633,12 @@ function useDnDGridContext() {
|
|
|
17648
17633
|
import { jsx as jsx156 } from "@emotion/react/jsx-runtime";
|
|
17649
17634
|
function DnDGrid(props) {
|
|
17650
17635
|
const { children, gridStyles, onReorder, activeItemStyles } = props;
|
|
17651
|
-
const gridEl =
|
|
17652
|
-
const dragEl =
|
|
17653
|
-
const cloneEl =
|
|
17654
|
-
const initialOrder =
|
|
17655
|
-
const reorderViaKeyboard =
|
|
17656
|
-
const transformFrom =
|
|
17636
|
+
const gridEl = useRef50(null);
|
|
17637
|
+
const dragEl = useRef50();
|
|
17638
|
+
const cloneEl = useRef50();
|
|
17639
|
+
const initialOrder = useRef50();
|
|
17640
|
+
const reorderViaKeyboard = useRef50(false);
|
|
17641
|
+
const transformFrom = useRef50({ x: 0, y: 0 });
|
|
17657
17642
|
const tid = useTestIds(props, "dndGrid");
|
|
17658
17643
|
const getGridItems = useCallback23(() => {
|
|
17659
17644
|
return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
|
|
@@ -18022,10 +18007,10 @@ function HbSpinnerProvider({ quips = [], children }) {
|
|
|
18022
18007
|
|
|
18023
18008
|
// src/components/MaxLines.tsx
|
|
18024
18009
|
import { useLayoutEffect as useLayoutEffect2, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
18025
|
-
import { useCallback as useCallback24, useEffect as useEffect29, useRef as
|
|
18010
|
+
import { useCallback as useCallback24, useEffect as useEffect29, useRef as useRef51, useState as useState42 } from "react";
|
|
18026
18011
|
import { jsx as jsx161, jsxs as jsxs79 } from "@emotion/react/jsx-runtime";
|
|
18027
18012
|
function MaxLines({ maxLines, children }) {
|
|
18028
|
-
const elRef =
|
|
18013
|
+
const elRef = useRef51(null);
|
|
18029
18014
|
const [hasMore, setHasMore] = useState42(false);
|
|
18030
18015
|
const [expanded, setExpanded] = useState42(false);
|
|
18031
18016
|
useLayoutEffect2(() => {
|
|
@@ -18048,7 +18033,7 @@ function MaxLines({ maxLines, children }) {
|
|
|
18048
18033
|
|
|
18049
18034
|
// src/components/ScrollShadows.tsx
|
|
18050
18035
|
import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
18051
|
-
import { useCallback as useCallback25, useMemo as useMemo42, useRef as
|
|
18036
|
+
import { useCallback as useCallback25, useMemo as useMemo42, useRef as useRef52, useState as useState43 } from "react";
|
|
18052
18037
|
import { jsx as jsx162, jsxs as jsxs80 } from "@emotion/react/jsx-runtime";
|
|
18053
18038
|
function ScrollShadows(props) {
|
|
18054
18039
|
const { children, xss, horizontal = false, bgColor = "rgba(255,255,255,1)" /* White */ } = props;
|
|
@@ -18059,7 +18044,7 @@ function ScrollShadows(props) {
|
|
|
18059
18044
|
}
|
|
18060
18045
|
const [showStartShadow, setShowStartShadow] = useState43(false);
|
|
18061
18046
|
const [showEndShadow, setShowEndShadow] = useState43(false);
|
|
18062
|
-
const scrollRef =
|
|
18047
|
+
const scrollRef = useRef52(null);
|
|
18063
18048
|
const [startShadowStyles, endShadowStyles] = useMemo42(() => {
|
|
18064
18049
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
18065
18050
|
const commonStyles = Css.absolute.z3.add({ pointerEvents: "none" }).$;
|
|
@@ -18170,7 +18155,7 @@ function useSnackbar() {
|
|
|
18170
18155
|
var snackbarId = 1;
|
|
18171
18156
|
|
|
18172
18157
|
// src/components/Stepper.tsx
|
|
18173
|
-
import { useRef as
|
|
18158
|
+
import { useRef as useRef53 } from "react";
|
|
18174
18159
|
import { useButton as useButton11, useFocusRing as useFocusRing14, useHover as useHover18 } from "react-aria";
|
|
18175
18160
|
import { jsx as jsx163, jsxs as jsxs81 } from "@emotion/react/jsx-runtime";
|
|
18176
18161
|
function Stepper(props) {
|
|
@@ -18214,7 +18199,7 @@ function Stepper(props) {
|
|
|
18214
18199
|
function StepButton(props) {
|
|
18215
18200
|
const { label, disabled, state, isCurrent, onClick } = props;
|
|
18216
18201
|
const ariaProps = { onPress: onClick, isDisabled: disabled };
|
|
18217
|
-
const ref =
|
|
18202
|
+
const ref = useRef53(null);
|
|
18218
18203
|
const { buttonProps, isPressed } = useButton11(ariaProps, ref);
|
|
18219
18204
|
const { isFocusVisible, focusProps } = useFocusRing14();
|
|
18220
18205
|
const { hoverProps, isHovered } = useHover18(ariaProps);
|
|
@@ -18503,7 +18488,7 @@ var SuperDrawerContent = ({ children, actions }) => {
|
|
|
18503
18488
|
|
|
18504
18489
|
// src/components/Tabs.tsx
|
|
18505
18490
|
import { camelCase as camelCase5 } from "change-case";
|
|
18506
|
-
import { useEffect as useEffect31, useMemo as useMemo44, useRef as
|
|
18491
|
+
import { useEffect as useEffect31, useMemo as useMemo44, useRef as useRef54, useState as useState44 } from "react";
|
|
18507
18492
|
import { mergeProps as mergeProps13, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
|
|
18508
18493
|
import { matchPath, Route } from "react-router";
|
|
18509
18494
|
import { Link as Link5, useLocation } from "react-router-dom";
|
|
@@ -18550,7 +18535,7 @@ function Tabs(props) {
|
|
|
18550
18535
|
const { isFocusVisible, focusProps } = useFocusRing15();
|
|
18551
18536
|
const tid = useTestIds(others, "tabs");
|
|
18552
18537
|
const [active, setActive] = useState44(selected);
|
|
18553
|
-
const ref =
|
|
18538
|
+
const ref = useRef54(null);
|
|
18554
18539
|
useEffect31(() => setActive(selected), [selected]);
|
|
18555
18540
|
function onKeyUp(e) {
|
|
18556
18541
|
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|