@homebound/beam 2.344.0 → 2.344.2

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.
@@ -12,7 +12,13 @@ const src_1 = require("..");
12
12
  /** An internal helper component for rendering form labels. */
13
13
  function LabelComponent(props) {
14
14
  const { labelProps, label, hidden, suffix, contrast = false, tooltip, inline, xss, ...others } = props;
15
- const labelEl = ((0, jsx_runtime_1.jsxs)("label", { ...labelProps, ...others, css: { ...Css_1.Css.dif.aic.gap1.sm.gray700.mbPx(inline ? 0 : 4).if(contrast).white.$, ...xss }, children: [label, suffix && ` ${suffix}`, tooltip && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(src_1.Icon, { icon: "infoCircle", tooltip: tooltip, inc: 2, color: contrast ? Css_1.Palette.White : Css_1.Palette.Gray700 }) }))] }));
15
+ const labelEl = ((0, jsx_runtime_1.jsxs)("label", { ...labelProps, ...others, css: {
16
+ ...Css_1.Css.dif.aic.gap1.sm.gray700
17
+ .mbPx(inline ? 0 : 4)
18
+ .if(contrast)
19
+ .white.if(!inline).asfs.$,
20
+ ...xss,
21
+ }, children: [label, suffix && ` ${suffix}`, tooltip && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(src_1.Icon, { icon: "infoCircle", tooltip: tooltip, inc: 2, color: contrast ? Css_1.Palette.White : Css_1.Palette.Gray700 }) }))] }));
16
22
  return hidden ? (0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: labelEl }) : labelEl;
17
23
  }
18
24
  exports.Label = react_1.default.memo(LabelComponent);
@@ -18,7 +18,8 @@ function Tooltip(props) {
18
18
  const tid = (0, utils_1.useTestIds)(props, "tooltip");
19
19
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { ref: triggerRef, ...triggerProps, ...(!state.isOpen && typeof title === "string" ? { title } : {}), ...tid,
20
20
  // Add display contents to prevent the tooltip wrapping element from short-circuiting inherited styles (i.e. flex item positioning)
21
- css: Css_1.Css.display("contents").$,
21
+ // Once the element is `:active`, allow pointer events (i.e. click events) to pass through to the children.
22
+ css: Css_1.Css.display("contents").addIn(":active", Css_1.Css.add("pointerEvents", "none").$).$,
22
23
  // Adding `draggable` as a hack to allow focus to continue through this element and into its children.
23
24
  // This is due to some code in React-Aria that prevents default due ot mobile browser inconsistencies,
24
25
  // and the only way they don't prevent default is if the element is draggable.
@@ -97,7 +97,7 @@ function TextFieldBase(props) {
97
97
  }, onFocus);
98
98
  const showFocus = (isFocused && !inputProps.readOnly) || forceFocus;
99
99
  const showHover = (isHovered && !inputProps.disabled && !inputProps.readOnly && !isFocused) || forceHover;
100
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { css: fieldStyles.container, ...groupProps, ...focusWithinProps, children: [label && labelStyle !== "inline" && ((0, jsx_runtime_1.jsx)(Label_1.Label, { labelProps: labelProps, hidden: labelStyle === "hidden" || compound, label: label, suffix: labelSuffix, contrast: contrast, ...tid.label })), (0, components_1.maybeTooltip)({
100
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { css: fieldStyles.container, ...groupProps, ...focusWithinProps, children: [label && labelStyle !== "inline" && ((0, jsx_runtime_1.jsx)(Label_1.Label, { labelProps: labelProps, hidden: labelStyle === "hidden" || compound, label: label, inline: labelStyle !== "above", suffix: labelSuffix, contrast: contrast, ...tid.label })), (0, components_1.maybeTooltip)({
101
101
  title: tooltip,
102
102
  placement: "top",
103
103
  children: inputProps.readOnly ? ((0, jsx_runtime_1.jsxs)("div", { css: {
@@ -14,7 +14,7 @@ function ToggleChipGroup(props) {
14
14
  const state = (0, react_stately_1.useCheckboxGroupState)({ ...props, value: values });
15
15
  const { groupProps, labelProps } = (0, react_aria_1.useCheckboxGroup)(props, state);
16
16
  const tid = (0, useTestIds_1.useTestIds)(props, "toggleChip");
17
- return ((0, jsx_runtime_1.jsxs)("div", { ...groupProps, css: Css_1.Css.relative.df.fdc.if(labelStyle === "left").fdr.maxw100.$, children: [(0, jsx_runtime_1.jsx)(Label_1.Label, { label: label, ...labelProps, hidden: hideLabel }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.df.gap1.add("flexWrap", "wrap").if(labelStyle === "left").ml2.$, children: options.map((o) => ((0, jsx_runtime_1.jsx)(ToggleChip, { value: o.value, groupState: state, selected: state.value.includes(o.value), label: o.label, disabled: o.disabled, ...tid[o.value] }, o.value))) })] }));
17
+ return ((0, jsx_runtime_1.jsxs)("div", { ...groupProps, css: Css_1.Css.relative.df.fdc.if(labelStyle === "left").fdr.maxw100.$, children: [(0, jsx_runtime_1.jsx)(Label_1.Label, { label: label, ...labelProps, hidden: hideLabel, inline: labelStyle === "left" }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.df.gap1.add("flexWrap", "wrap").if(labelStyle === "left").ml2.$, children: options.map((o) => ((0, jsx_runtime_1.jsx)(ToggleChip, { value: o.value, groupState: state, selected: state.value.includes(o.value), label: o.label, disabled: o.disabled, ...tid[o.value] }, o.value))) })] }));
18
18
  }
19
19
  exports.ToggleChipGroup = ToggleChipGroup;
20
20
  function ToggleChip(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.344.0",
3
+ "version": "2.344.2",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",