@homebound/beam 4.15.0 → 4.16.1
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/README.md +1 -1
- package/dist/Css.json +1 -1
- package/dist/index.cjs +52 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +52 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Homebound's React component design system.
|
|
6
6
|
|
|
7
|
-
_To see the latest designs, check out the [Figma](https://www.figma.com/
|
|
7
|
+
_To see the latest designs, check out the [Figma](https://www.figma.com/design/62R8KiDklvgBBSH0mQGWHo/BEAM_27_LIBRARY?node-id=0-1&p=f&m=draw) file._
|
|
8
8
|
|
|
9
9
|
## Page layout shells
|
|
10
10
|
|
package/dist/Css.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"increment": 8,
|
|
3
3
|
"breakpoints": {"ifPrint":"@media print","ifSm":"@media screen and (max-width: 599px)","ifMd":"@media screen and (min-width: 600px) and (max-width: 1024px)","ifSmOrMd":"@media screen and (max-width: 1024px)","ifMdAndUp":"@media screen and (min-width: 600px)","ifMdAndDown":"@media screen and (max-width: 1024px)","ifLg":"@media screen and (min-width: 1025px)","ifMdOrLg":"@media screen and (min-width: 600px)"},
|
|
4
4
|
"typography": ["xs2","xs2Sb","xs","xsSb","sm","smSb","md","mdSb","lg","xl","xl2"],
|
|
5
|
-
"tokens": {"AiFieldBg":"--b-ai-field-bg","AiFieldFg":"--b-ai-field-fg","ButtonCautionDisabledBg":"--b-button-caution-disabled-bg","ButtonCautionDisabledFg":"--b-button-caution-disabled-fg","ButtonDangerDisabledBg":"--b-button-danger-disabled-bg","ButtonDangerDisabledFg":"--b-button-danger-disabled-fg","ButtonGhostDisabledFg":"--b-button-ghost-disabled-fg","ButtonGhostFg":"--b-button-ghost-fg","ButtonPrimaryDisabledBg":"--b-button-primary-disabled-bg","ButtonPrimaryDisabledFg":"--b-button-primary-disabled-fg","ButtonSecondaryFg":"--b-button-secondary-fg","ButtonTertiaryFg":"--b-button-tertiary-fg","ButtonTertiaryFgPressed":"--b-button-tertiary-fg-pressed","ChoiceDisabled":"--b-choice-disabled","ChoiceSelected":"--b-choice-selected","Danger":"--b-danger","DangerPressed":"--b-danger-pressed","EnvBrandDev":"--b-env-brand-dev","EnvBrandLocalProd":"--b-env-brand-local-prod","EnvBrandProd":"--b-env-brand-prod","EnvBrandQa":"--b-env-brand-qa","FieldBgDefault":"--b-field-bg-default","FieldBgDisabled":"--b-field-bg-disabled","FieldBgHover":"--b-field-bg-hover","FieldBorderDefault":"--b-field-border-default","FieldBorderError":"--b-field-border-error","FieldBorderFocus":"--b-field-border-focus","FieldBorderHover":"--b-field-border-hover","FieldTextDisabled":"--b-field-text-disabled","FocusRingInset":"--b-focus-ring-inset","FocusRingMuted":"--b-focus-ring-muted","LoaderFill":"--b-loader-fill","LoaderSpinner":"--b-loader-spinner","LoaderTrack":"--b-loader-track","NavGlobalItemBgActive":"--b-nav-global-item-bg-active","NavGlobalItemBgHover":"--b-nav-global-item-bg-hover","NavGlobalItemBgPressed":"--b-nav-global-item-bg-pressed","NavGlobalText":"--b-nav-global-text","NavGlobalTextActive":"--b-nav-global-text-active","NavGlobalTextDisabled":"--b-nav-global-text-disabled","NavItemBgActive":"--b-nav-item-bg-active","NavItemBgHover":"--b-nav-item-bg-hover","NavItemBgPressed":"--b-nav-item-bg-pressed","NavText":"--b-nav-text","NavTextActive":"--b-nav-text-active","NavTextDisabled":"--b-nav-text-disabled","NavTextFocusVisible":"--b-nav-text-focus-visible","NavTextPressed":"--b-nav-text-pressed","NeutralFillHover":"--b-neutral-fill-hover","NeutralFillHoverStrong":"--b-neutral-fill-hover-strong","NeutralFillHoverSubtle":"--b-neutral-fill-hover-subtle","NeutralFillPressed":"--b-neutral-fill-pressed","NeutralSurfacePressed":"--b-neutral-surface-pressed","OnPrimary":"--b-on-primary","OnSurface":"--b-on-surface","OnSurfaceDisabled":"--b-on-surface-disabled","OnSurfaceMuted":"--b-on-surface-muted","OnSurfaceRaisedHover":"--b-on-surface-raised-hover","OnSurfaceRaisedPressed":"--b-on-surface-raised-pressed","Primary":"--b-primary","PrimaryHover":"--b-primary-hover","PrimaryPressed":"--b-primary-pressed","Scrim":"--b-scrim","SelectionFill":"--b-selection-fill","SelectionIndicator":"--b-selection-indicator","Surface":"--b-surface","SurfaceDisabled":"--b-surface-disabled","SurfaceHover":"--b-surface-hover","SurfaceRaised":"--b-surface-raised","SurfaceRaisedHover":"--b-surface-raised-hover","SurfaceRaisedPressed":"--b-surface-raised-pressed","SurfaceSeparator":"--b-surface-separator","SurfaceSubtle":"--b-surface-subtle","TextDisabled":"--b-text-disabled","TextHelper":"--b-text-helper","TextLabel":"--b-text-label","TextLinkDefault":"--b-text-link-default","TextLinkDisabled":"--b-text-link-disabled","TextLinkHover":"--b-text-link-hover","TextLinkPressed":"--b-text-link-pressed","TextPlaceholder":"--b-text-placeholder","TextSelection":"--b-text-selection"},
|
|
5
|
+
"tokens": {"AiFieldBg":"--b-ai-field-bg","AiFieldFg":"--b-ai-field-fg","ButtonCautionDisabledBg":"--b-button-caution-disabled-bg","ButtonCautionDisabledFg":"--b-button-caution-disabled-fg","ButtonDangerDisabledBg":"--b-button-danger-disabled-bg","ButtonDangerDisabledFg":"--b-button-danger-disabled-fg","ButtonGhostDisabledFg":"--b-button-ghost-disabled-fg","ButtonGhostFg":"--b-button-ghost-fg","ButtonPrimaryDisabledBg":"--b-button-primary-disabled-bg","ButtonPrimaryDisabledFg":"--b-button-primary-disabled-fg","ButtonSecondaryFg":"--b-button-secondary-fg","ButtonTertiaryFg":"--b-button-tertiary-fg","ButtonTertiaryFgPressed":"--b-button-tertiary-fg-pressed","ChoiceDisabled":"--b-choice-disabled","ChoiceSelected":"--b-choice-selected","Danger":"--b-danger","DangerPressed":"--b-danger-pressed","EnvBrandDev":"--b-env-brand-dev","EnvBrandLocalProd":"--b-env-brand-local-prod","EnvBrandProd":"--b-env-brand-prod","EnvBrandQa":"--b-env-brand-qa","FieldBgDefault":"--b-field-bg-default","FieldBgDisabled":"--b-field-bg-disabled","FieldBgHover":"--b-field-bg-hover","FieldBorderDefault":"--b-field-border-default","FieldBorderError":"--b-field-border-error","FieldBorderFocus":"--b-field-border-focus","FieldBorderHover":"--b-field-border-hover","FieldTextDisabled":"--b-field-text-disabled","FocusRingInset":"--b-focus-ring-inset","FocusRingMuted":"--b-focus-ring-muted","LoaderFill":"--b-loader-fill","LoaderSpinner":"--b-loader-spinner","LoaderTrack":"--b-loader-track","NavGlobalItemBgActive":"--b-nav-global-item-bg-active","NavGlobalItemBgHover":"--b-nav-global-item-bg-hover","NavGlobalItemBgPressed":"--b-nav-global-item-bg-pressed","NavGlobalText":"--b-nav-global-text","NavGlobalTextActive":"--b-nav-global-text-active","NavGlobalTextDisabled":"--b-nav-global-text-disabled","NavItemBgActive":"--b-nav-item-bg-active","NavItemBgHover":"--b-nav-item-bg-hover","NavItemBgPressed":"--b-nav-item-bg-pressed","NavText":"--b-nav-text","NavTextActive":"--b-nav-text-active","NavTextDisabled":"--b-nav-text-disabled","NavTextFocusVisible":"--b-nav-text-focus-visible","NavTextPressed":"--b-nav-text-pressed","NeutralFillHover":"--b-neutral-fill-hover","NeutralFillHoverStrong":"--b-neutral-fill-hover-strong","NeutralFillHoverSubtle":"--b-neutral-fill-hover-subtle","NeutralFillPressed":"--b-neutral-fill-pressed","NeutralSurfacePressed":"--b-neutral-surface-pressed","OnPrimary":"--b-on-primary","OnSurface":"--b-on-surface","OnSurfaceActive":"--b-on-surface-active","OnSurfaceDisabled":"--b-on-surface-disabled","OnSurfaceMuted":"--b-on-surface-muted","OnSurfaceRaisedHover":"--b-on-surface-raised-hover","OnSurfaceRaisedPressed":"--b-on-surface-raised-pressed","Primary":"--b-primary","PrimaryHover":"--b-primary-hover","PrimaryPressed":"--b-primary-pressed","Scrim":"--b-scrim","SelectionFill":"--b-selection-fill","SelectionIndicator":"--b-selection-indicator","Surface":"--b-surface","SurfaceActive":"--b-surface-active","SurfaceActiveHover":"--b-surface-active-hover","SurfaceDisabled":"--b-surface-disabled","SurfaceHover":"--b-surface-hover","SurfaceRaised":"--b-surface-raised","SurfaceRaisedHover":"--b-surface-raised-hover","SurfaceRaisedPressed":"--b-surface-raised-pressed","SurfaceSeparator":"--b-surface-separator","SurfaceSubtle":"--b-surface-subtle","TextDisabled":"--b-text-disabled","TextHelper":"--b-text-helper","TextLabel":"--b-text-label","TextLinkDefault":"--b-text-link-default","TextLinkDisabled":"--b-text-link-disabled","TextLinkHover":"--b-text-link-hover","TextLinkPressed":"--b-text-link-pressed","TextPlaceholder":"--b-text-placeholder","TextSelection":"--b-text-selection"},
|
|
6
6
|
"keyframes": {"loadingDots":"@keyframes loadingDots { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }","spin":"@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }","pulse":"@keyframes pulse { 50% { opacity: 0.6; } }","aiStarLoader":"@keyframes aiStarLoader { 0%, 66.67%, 100% { transform: scale(0.5); } 33.33% { transform: scale(1); } }"},
|
|
7
7
|
"abbreviations": {
|
|
8
8
|
"animation": {"kind":"variable","props":["animation"],"incremented":false},
|
package/dist/index.cjs
CHANGED
|
@@ -500,6 +500,7 @@ var Tokens = /* @__PURE__ */ ((Tokens63) => {
|
|
|
500
500
|
Tokens63["NeutralSurfacePressed"] = "--b-neutral-surface-pressed";
|
|
501
501
|
Tokens63["OnPrimary"] = "--b-on-primary";
|
|
502
502
|
Tokens63["OnSurface"] = "--b-on-surface";
|
|
503
|
+
Tokens63["OnSurfaceActive"] = "--b-on-surface-active";
|
|
503
504
|
Tokens63["OnSurfaceDisabled"] = "--b-on-surface-disabled";
|
|
504
505
|
Tokens63["OnSurfaceMuted"] = "--b-on-surface-muted";
|
|
505
506
|
Tokens63["OnSurfaceRaisedHover"] = "--b-on-surface-raised-hover";
|
|
@@ -511,6 +512,8 @@ var Tokens = /* @__PURE__ */ ((Tokens63) => {
|
|
|
511
512
|
Tokens63["SelectionFill"] = "--b-selection-fill";
|
|
512
513
|
Tokens63["SelectionIndicator"] = "--b-selection-indicator";
|
|
513
514
|
Tokens63["Surface"] = "--b-surface";
|
|
515
|
+
Tokens63["SurfaceActive"] = "--b-surface-active";
|
|
516
|
+
Tokens63["SurfaceActiveHover"] = "--b-surface-active-hover";
|
|
514
517
|
Tokens63["SurfaceDisabled"] = "--b-surface-disabled";
|
|
515
518
|
Tokens63["SurfaceHover"] = "--b-surface-hover";
|
|
516
519
|
Tokens63["SurfaceRaised"] = "--b-surface-raised";
|
|
@@ -6786,6 +6789,22 @@ function shallowEqual(objA, objB) {
|
|
|
6786
6789
|
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
|
|
6787
6790
|
return false;
|
|
6788
6791
|
}
|
|
6792
|
+
if (objA instanceof Map || objB instanceof Map) {
|
|
6793
|
+
if (!(objA instanceof Map && objB instanceof Map) || objA.size !== objB.size) return false;
|
|
6794
|
+
for (const [key, value] of objA) {
|
|
6795
|
+
if (!objB.has(key) || !Object.is(value, objB.get(key))) return false;
|
|
6796
|
+
}
|
|
6797
|
+
return true;
|
|
6798
|
+
}
|
|
6799
|
+
if (objA instanceof Set || objB instanceof Set) {
|
|
6800
|
+
if (!(objA instanceof Set && objB instanceof Set) || objA.size !== objB.size) return false;
|
|
6801
|
+
for (const value of objA) {
|
|
6802
|
+
if (!objB.has(value)) return false;
|
|
6803
|
+
}
|
|
6804
|
+
return true;
|
|
6805
|
+
}
|
|
6806
|
+
if (Array.isArray(objA) !== Array.isArray(objB)) return false;
|
|
6807
|
+
if (!Array.isArray(objA) && (!isPlainObject(objA) || !isPlainObject(objB))) return false;
|
|
6789
6808
|
const keysA = Object.keys(objA);
|
|
6790
6809
|
const keysB = Object.keys(objB);
|
|
6791
6810
|
if (keysA.length !== keysB.length) {
|
|
@@ -6793,12 +6812,16 @@ function shallowEqual(objA, objB) {
|
|
|
6793
6812
|
}
|
|
6794
6813
|
for (let i = 0; i < keysA.length; i++) {
|
|
6795
6814
|
const currentKey = keysA[i];
|
|
6796
|
-
if (!
|
|
6815
|
+
if (!Object.prototype.hasOwnProperty.call(objB, currentKey) || !Object.is(objA[currentKey], objB[currentKey])) {
|
|
6797
6816
|
return false;
|
|
6798
6817
|
}
|
|
6799
6818
|
}
|
|
6800
6819
|
return true;
|
|
6801
6820
|
}
|
|
6821
|
+
function isPlainObject(value) {
|
|
6822
|
+
const prototype = Object.getPrototypeOf(value);
|
|
6823
|
+
return prototype === Object.prototype || prototype === null;
|
|
6824
|
+
}
|
|
6802
6825
|
|
|
6803
6826
|
// src/hooks/useComputed.ts
|
|
6804
6827
|
function useComputed(fn, deps) {
|
|
@@ -8757,6 +8780,22 @@ var filledBoxStyles = {
|
|
|
8757
8780
|
var filledBoxHoverStyles = {
|
|
8758
8781
|
backgroundColor: "bgBlue900"
|
|
8759
8782
|
};
|
|
8783
|
+
var indeterminateBoxStyles = {
|
|
8784
|
+
borderColor: ["bc_var", {
|
|
8785
|
+
"--borderColor": "var(--b-surface-active)"
|
|
8786
|
+
}],
|
|
8787
|
+
backgroundColor: ["bgColor_var", {
|
|
8788
|
+
"--backgroundColor": "var(--b-surface-active)"
|
|
8789
|
+
}]
|
|
8790
|
+
};
|
|
8791
|
+
var indeterminateHoverStyles = {
|
|
8792
|
+
borderColor: ["bc_var", {
|
|
8793
|
+
"--borderColor": "var(--b-surface-active-hover)"
|
|
8794
|
+
}],
|
|
8795
|
+
backgroundColor: ["bgColor_var", {
|
|
8796
|
+
"--backgroundColor": "var(--b-surface-active-hover)"
|
|
8797
|
+
}]
|
|
8798
|
+
};
|
|
8760
8799
|
var disabledBoxStyles = {
|
|
8761
8800
|
backgroundColor: ["bgColor_var", {
|
|
8762
8801
|
"--backgroundColor": "var(--b-field-bg-disabled)"
|
|
@@ -8815,20 +8854,27 @@ function StyledCheckbox(props) {
|
|
|
8815
8854
|
} = (0, import_react_aria5.useHover)({
|
|
8816
8855
|
isDisabled
|
|
8817
8856
|
});
|
|
8818
|
-
const
|
|
8857
|
+
const showSelected = Boolean(isSelected) && !isDisabled;
|
|
8858
|
+
const showIndeterminate = isIndeterminate && !isDisabled;
|
|
8859
|
+
const markIcon = isIndeterminate ? dashMark(isDisabled ? "--b-on-primary" /* OnPrimary */ : "--b-on-surface-active" /* OnSurfaceActive */) : isSelected ? checkmarkSmall : "";
|
|
8819
8860
|
const tid = useTestIds(props);
|
|
8820
8861
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { ...hoverProps, ...(0, import_runtime19.trussProps)({
|
|
8821
8862
|
...baseStyles,
|
|
8822
|
-
...
|
|
8823
|
-
...
|
|
8863
|
+
...showSelected && filledBoxStyles,
|
|
8864
|
+
...showIndeterminate && indeterminateBoxStyles,
|
|
8865
|
+
...showSelected && isHovered && filledBoxHoverStyles,
|
|
8866
|
+
...showIndeterminate && isHovered && indeterminateHoverStyles,
|
|
8824
8867
|
...isDisabled && disabledBoxStyles,
|
|
8825
8868
|
...isDisabled && isSelected && disabledSelectedBoxStyles,
|
|
8826
8869
|
...isFocusVisible && focusRingStyles,
|
|
8827
|
-
|
|
8870
|
+
// Selected and empty boxes still use the palette hover border. Indeterminate hover sets its own.
|
|
8871
|
+
...isHovered && !showIndeterminate && hoverBorderStyles
|
|
8828
8872
|
}), "aria-hidden": "true", "data-checked": isSelected ? true : isIndeterminate ? "mixed" : false, ...tid.checkbox, children: markIcon });
|
|
8829
8873
|
}
|
|
8830
8874
|
var checkmarkSmall = /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("svg", { width: "16", height: "16", ...(0, import_runtime19.trussProps)(markSvgStyles), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M6.66669 10.3907L4.47135 8.19533L3.52869 9.138L6.66669 12.276L13.138 5.80467L12.1954 4.862L6.66669 10.3907Z", fill: `var(${"--b-on-primary" /* OnPrimary */})` }) });
|
|
8831
|
-
|
|
8875
|
+
function dashMark(fillToken) {
|
|
8876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("svg", { width: "16", height: "16", ...(0, import_runtime19.trussProps)(markSvgStyles), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { x: "4", y: "7.5", width: "8", height: "1.35", fill: `var(${fillToken})` }) });
|
|
8877
|
+
}
|
|
8832
8878
|
|
|
8833
8879
|
// src/inputs/Checkbox.tsx
|
|
8834
8880
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|