@homebound/beam 2.413.0-alpha.5 → 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 +25 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14605,7 +14605,7 @@ var variantStyles2 = {
|
|
|
14605
14605
|
|
|
14606
14606
|
// src/components/BeamContext.tsx
|
|
14607
14607
|
var import_react103 = require("react");
|
|
14608
|
-
var
|
|
14608
|
+
var import_react_aria45 = require("react-aria");
|
|
14609
14609
|
|
|
14610
14610
|
// src/components/Modal/Modal.tsx
|
|
14611
14611
|
var import_utils72 = require("@react-aria/utils");
|
|
@@ -16512,7 +16512,6 @@ function isSelectionButtonMenuProps(props) {
|
|
|
16512
16512
|
|
|
16513
16513
|
// src/components/Filters/FilterDropdownMenu.tsx
|
|
16514
16514
|
var import_react97 = require("react");
|
|
16515
|
-
var import_react_aria45 = require("react-aria");
|
|
16516
16515
|
|
|
16517
16516
|
// src/components/CountBadge.tsx
|
|
16518
16517
|
var import_jsx_runtime127 = require("@emotion/react/jsx-runtime");
|
|
@@ -17080,20 +17079,6 @@ function FilterDropdownMenu(props) {
|
|
|
17080
17079
|
const { filter, onChange, filterDefs, groupBy } = props;
|
|
17081
17080
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
17082
17081
|
const [isOpen, setIsOpen] = (0, import_react97.useState)(false);
|
|
17083
|
-
const buttonRef = (0, import_react97.useRef)(null);
|
|
17084
|
-
const filterContentRef = (0, import_react97.useRef)(null);
|
|
17085
|
-
const { overlayProps } = (0, import_react_aria45.useOverlay)(
|
|
17086
|
-
{
|
|
17087
|
-
isOpen,
|
|
17088
|
-
onClose: () => setIsOpen(false),
|
|
17089
|
-
isDismissable: true,
|
|
17090
|
-
shouldCloseOnInteractOutside: (element) => {
|
|
17091
|
-
if (buttonRef.current?.contains(element)) return false;
|
|
17092
|
-
return true;
|
|
17093
|
-
}
|
|
17094
|
-
},
|
|
17095
|
-
filterContentRef
|
|
17096
|
-
);
|
|
17097
17082
|
const activeFilterCount = (0, import_react97.useMemo)(() => getActiveFilterCount(filter), [filter]);
|
|
17098
17083
|
const filterImpls = (0, import_react97.useMemo)(() => buildFilterImpls(filterDefs), [filterDefs]);
|
|
17099
17084
|
const renderFilters = () => {
|
|
@@ -17103,7 +17088,7 @@ function FilterDropdownMenu(props) {
|
|
|
17103
17088
|
return [...nonCheckbox, ...checkbox].map(([key, f]) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { children: f.render(filter[key], (value) => onChange(updateFilter(filter, key, value)), testId, false, false) }, key));
|
|
17104
17089
|
};
|
|
17105
17090
|
return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(import_jsx_runtime140.Fragment, { children: [
|
|
17106
|
-
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
17091
|
+
/* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
17107
17092
|
Button,
|
|
17108
17093
|
{
|
|
17109
17094
|
label: "Filter",
|
|
@@ -17117,8 +17102,8 @@ function FilterDropdownMenu(props) {
|
|
|
17117
17102
|
onClick: () => setIsOpen(!isOpen),
|
|
17118
17103
|
...testId.button
|
|
17119
17104
|
}
|
|
17120
|
-
)
|
|
17121
|
-
isOpen && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", {
|
|
17105
|
+
),
|
|
17106
|
+
isOpen && /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { css: Css.df.aic.fww.gap1.order(1).$, children: [
|
|
17122
17107
|
groupBy && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
|
|
17123
17108
|
SelectField,
|
|
17124
17109
|
{
|
|
@@ -17736,7 +17721,7 @@ function BeamProvider({ children, ...presentationProps }) {
|
|
|
17736
17721
|
};
|
|
17737
17722
|
}, [modalBodyDiv, modalFooterDiv, modalHeaderDiv, sdHeaderDiv]);
|
|
17738
17723
|
return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(BeamContext.Provider, { value: { ...context }, children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(PresentationProvider, { ...presentationProps, children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(RightPaneProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(AutoSaveStatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(SnackbarProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(ToastProvider, { children: [
|
|
17739
|
-
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
|
|
17724
|
+
/* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(import_react_aria45.OverlayProvider, { children: [
|
|
17740
17725
|
children,
|
|
17741
17726
|
modalRef.current && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(Modal, { ...modalRef.current })
|
|
17742
17727
|
] }),
|
|
@@ -17762,14 +17747,14 @@ function useBeamContext() {
|
|
|
17762
17747
|
|
|
17763
17748
|
// src/components/ButtonDatePicker.tsx
|
|
17764
17749
|
var import_react104 = require("react");
|
|
17765
|
-
var
|
|
17750
|
+
var import_react_aria46 = require("react-aria");
|
|
17766
17751
|
var import_react_stately18 = require("react-stately");
|
|
17767
17752
|
var import_jsx_runtime151 = require("@emotion/react/jsx-runtime");
|
|
17768
17753
|
function ButtonDatePicker(props) {
|
|
17769
17754
|
const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
|
|
17770
17755
|
const state = (0, import_react_stately18.useMenuTriggerState)({ isOpen: defaultOpen });
|
|
17771
17756
|
const buttonRef = (0, import_react104.useRef)(null);
|
|
17772
|
-
const { menuTriggerProps, menuProps } = (0,
|
|
17757
|
+
const { menuTriggerProps, menuProps } = (0, import_react_aria46.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
|
|
17773
17758
|
const tid = useTestIds(
|
|
17774
17759
|
props,
|
|
17775
17760
|
isTextButton(trigger) ? defaultTestId(labelOr(trigger, "buttonDatePicker")) : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name
|
|
@@ -17789,7 +17774,7 @@ function ButtonDatePicker(props) {
|
|
|
17789
17774
|
|
|
17790
17775
|
// src/components/ButtonGroup.tsx
|
|
17791
17776
|
var import_react105 = require("react");
|
|
17792
|
-
var
|
|
17777
|
+
var import_react_aria47 = require("react-aria");
|
|
17793
17778
|
var import_jsx_runtime152 = (
|
|
17794
17779
|
// Disable the button if the ButtonGroup is disabled or if the current button is disabled.
|
|
17795
17780
|
require("@emotion/react/jsx-runtime")
|
|
@@ -17806,9 +17791,9 @@ function GroupButton(props) {
|
|
|
17806
17791
|
const { icon, iconInc, iconColor, text, active, onClick: onPress, disabled, size, tooltip, ...otherProps } = props;
|
|
17807
17792
|
const ariaProps = { onPress, isDisabled: !!disabled, ...otherProps };
|
|
17808
17793
|
const ref = (0, import_react105.useRef)(null);
|
|
17809
|
-
const { buttonProps, isPressed } = (0,
|
|
17810
|
-
const { isFocusVisible, focusProps } = (0,
|
|
17811
|
-
const { hoverProps, isHovered } = (0,
|
|
17794
|
+
const { buttonProps, isPressed } = (0, import_react_aria47.useButton)(ariaProps, ref);
|
|
17795
|
+
const { isFocusVisible, focusProps } = (0, import_react_aria47.useFocusRing)();
|
|
17796
|
+
const { hoverProps, isHovered } = (0, import_react_aria47.useHover)(ariaProps);
|
|
17812
17797
|
const tid = useTestIds(props);
|
|
17813
17798
|
return /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("span", { css: getButtonStyles2(), children: maybeTooltip({
|
|
17814
17799
|
title: resolveTooltip(disabled, tooltip),
|
|
@@ -17865,7 +17850,7 @@ var iconStyles2 = {
|
|
|
17865
17850
|
|
|
17866
17851
|
// src/components/Card.tsx
|
|
17867
17852
|
var import_react107 = require("react");
|
|
17868
|
-
var
|
|
17853
|
+
var import_react_aria48 = require("react-aria");
|
|
17869
17854
|
|
|
17870
17855
|
// src/components/Tag.tsx
|
|
17871
17856
|
var import_utils116 = require("@react-aria/utils");
|
|
@@ -17924,7 +17909,7 @@ function Card(props) {
|
|
|
17924
17909
|
tag
|
|
17925
17910
|
} = props;
|
|
17926
17911
|
const tid = useTestIds(props, "card");
|
|
17927
|
-
const { hoverProps, isHovered } = (0,
|
|
17912
|
+
const { hoverProps, isHovered } = (0, import_react_aria48.useHover)({ isDisabled });
|
|
17928
17913
|
const isList = type === "list";
|
|
17929
17914
|
const imgHeight = isList ? 96 : bordered ? 224 : 256;
|
|
17930
17915
|
const styles = (0, import_react107.useMemo)(
|
|
@@ -18199,12 +18184,12 @@ var gridCloneKey = "dndgrid-clone";
|
|
|
18199
18184
|
var activeGridItemClass = "dndgrid-active";
|
|
18200
18185
|
|
|
18201
18186
|
// src/components/DnDGrid/DnDGridItemHandle.tsx
|
|
18202
|
-
var
|
|
18187
|
+
var import_react_aria49 = require("react-aria");
|
|
18203
18188
|
var import_jsx_runtime157 = require("@emotion/react/jsx-runtime");
|
|
18204
18189
|
function DnDGridItemHandle(props) {
|
|
18205
18190
|
const { dragHandleProps, icon = "move", compact = false, color } = props;
|
|
18206
|
-
const { focusProps, isFocusVisible } = (0,
|
|
18207
|
-
const { hoverProps, isHovered } = (0,
|
|
18191
|
+
const { focusProps, isFocusVisible } = (0, import_react_aria49.useFocusRing)();
|
|
18192
|
+
const { hoverProps, isHovered } = (0, import_react_aria49.useHover)({});
|
|
18208
18193
|
const tid = useTestIds(props, "dragHandle");
|
|
18209
18194
|
const iconButtonNormal2 = Css.hPx(28).wPx(28).br8.bw2.$;
|
|
18210
18195
|
const iconButtonCompact2 = Css.hPx(18).wPx(18).br4.bw1.$;
|
|
@@ -18216,7 +18201,7 @@ function DnDGridItemHandle(props) {
|
|
|
18216
18201
|
...Css.cursor("grab").bcTransparent.bss.bgTransparent.outline0.dif.aic.jcc.transition.if(isFocusVisible).bcBlue700.$,
|
|
18217
18202
|
...isHovered && Css.bgGray200.$
|
|
18218
18203
|
},
|
|
18219
|
-
...(0,
|
|
18204
|
+
...(0, import_react_aria49.mergeProps)(dragHandleProps, focusProps, hoverProps),
|
|
18220
18205
|
...tid,
|
|
18221
18206
|
children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Icon, { icon, inc: compact ? 2 : void 0, color })
|
|
18222
18207
|
}
|
|
@@ -18530,7 +18515,7 @@ var snackbarId = 1;
|
|
|
18530
18515
|
|
|
18531
18516
|
// src/components/Stepper.tsx
|
|
18532
18517
|
var import_react116 = require("react");
|
|
18533
|
-
var
|
|
18518
|
+
var import_react_aria50 = require("react-aria");
|
|
18534
18519
|
var import_jsx_runtime163 = require("@emotion/react/jsx-runtime");
|
|
18535
18520
|
function Stepper(props) {
|
|
18536
18521
|
const { steps, currentStep, onChange } = props;
|
|
@@ -18574,9 +18559,9 @@ function StepButton(props) {
|
|
|
18574
18559
|
const { label, disabled, state, isCurrent, onClick } = props;
|
|
18575
18560
|
const ariaProps = { onPress: onClick, isDisabled: disabled };
|
|
18576
18561
|
const ref = (0, import_react116.useRef)(null);
|
|
18577
|
-
const { buttonProps, isPressed } = (0,
|
|
18578
|
-
const { isFocusVisible, focusProps } = (0,
|
|
18579
|
-
const { hoverProps, isHovered } = (0,
|
|
18562
|
+
const { buttonProps, isPressed } = (0, import_react_aria50.useButton)(ariaProps, ref);
|
|
18563
|
+
const { isFocusVisible, focusProps } = (0, import_react_aria50.useFocusRing)();
|
|
18564
|
+
const { hoverProps, isHovered } = (0, import_react_aria50.useHover)(ariaProps);
|
|
18580
18565
|
const focusRingStyles2 = state === "error" ? Css.bshDanger.$ : Css.bshFocus.$;
|
|
18581
18566
|
const tid = useTestIds(props, "stepButton");
|
|
18582
18567
|
return /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)(
|
|
@@ -18863,7 +18848,7 @@ var SuperDrawerContent = ({ children, actions }) => {
|
|
|
18863
18848
|
// src/components/Tabs.tsx
|
|
18864
18849
|
var import_change_case7 = require("change-case");
|
|
18865
18850
|
var import_react118 = require("react");
|
|
18866
|
-
var
|
|
18851
|
+
var import_react_aria51 = require("react-aria");
|
|
18867
18852
|
var import_react_router2 = require("react-router");
|
|
18868
18853
|
var import_react_router_dom5 = require("react-router-dom");
|
|
18869
18854
|
var import_jsx_runtime168 = require("@emotion/react/jsx-runtime");
|
|
@@ -18906,7 +18891,7 @@ function Tabs(props) {
|
|
|
18906
18891
|
const selected = isRouteTabs(props) ? uniqueTabValue(
|
|
18907
18892
|
props.tabs.find((t) => !!(0, import_react_router2.matchPath)(location.pathname, { path: t.path, exact: true })) || props.tabs[0]
|
|
18908
18893
|
) : props.selected;
|
|
18909
|
-
const { isFocusVisible, focusProps } = (0,
|
|
18894
|
+
const { isFocusVisible, focusProps } = (0, import_react_aria51.useFocusRing)();
|
|
18910
18895
|
const tid = useTestIds(others, "tabs");
|
|
18911
18896
|
const [active, setActive] = (0, import_react118.useState)(selected);
|
|
18912
18897
|
const ref = (0, import_react118.useRef)(null);
|
|
@@ -18951,7 +18936,7 @@ function TabImpl(props) {
|
|
|
18951
18936
|
const { tab, onClick, active, onKeyUp, onBlur, focusProps, isFocusVisible = false, ...others } = props;
|
|
18952
18937
|
const { disabled = false, name: label, icon, endAdornment } = tab;
|
|
18953
18938
|
const isDisabled = !!disabled;
|
|
18954
|
-
const { hoverProps, isHovered } = (0,
|
|
18939
|
+
const { hoverProps, isHovered } = (0, import_react_aria51.useHover)({ isDisabled });
|
|
18955
18940
|
const { baseStyles: baseStyles5, activeStyles: activeStyles4, focusRingStyles: focusRingStyles2, hoverStyles: hoverStyles4, disabledStyles: disabledStyles4, activeHoverStyles } = (0, import_react118.useMemo)(
|
|
18956
18941
|
() => getTabStyles(),
|
|
18957
18942
|
[]
|
|
@@ -18974,7 +18959,7 @@ function TabImpl(props) {
|
|
|
18974
18959
|
...isFocusVisible && active && focusRingStyles2
|
|
18975
18960
|
}
|
|
18976
18961
|
};
|
|
18977
|
-
const interactiveProps = (0,
|
|
18962
|
+
const interactiveProps = (0, import_react_aria51.mergeProps)(focusProps, hoverProps, {
|
|
18978
18963
|
onKeyUp,
|
|
18979
18964
|
onBlur,
|
|
18980
18965
|
...isRouteTab(tab) ? {} : { onClick: () => onClick(tab.value) }
|