@homebound/beam 2.352.0 → 2.354.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/Css.d.ts +109 -133
- package/dist/Css.js +109 -133
- package/dist/components/Accordion.js +2 -2
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Avatar/AvatarGroup.js +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/ButtonGroup.js +2 -2
- package/dist/components/Chip.js +1 -1
- package/dist/components/DnDGrid/DnDGridItemHandle.js +2 -2
- package/dist/components/Filters/FilterModal.js +1 -1
- package/dist/components/IconButton.js +2 -2
- package/dist/components/Label.js +1 -1
- package/dist/components/Layout/PreventBrowserScroll.js +1 -1
- package/dist/components/Layout/RightPaneLayout/RightPaneLayout.js +2 -2
- package/dist/components/Layout/ScrollableContent.d.ts +1 -1
- package/dist/components/Layout/ScrollableContent.js +1 -1
- package/dist/components/Layout/ScrollableParent.js +2 -2
- package/dist/components/Modal/Modal.js +3 -3
- package/dist/components/Pagination.js +1 -1
- package/dist/components/ScrollShadows.js +2 -2
- package/dist/components/Stepper.js +1 -1
- package/dist/components/SuperDrawer/SuperDrawer.js +2 -2
- package/dist/components/SuperDrawer/SuperDrawerContent.js +2 -2
- package/dist/components/SuperDrawer/components/SuperDrawerHeader.js +1 -1
- package/dist/components/Table/TableStyles.js +9 -9
- package/dist/components/Table/components/ExpandableHeader.js +1 -1
- package/dist/components/Table/components/Row.js +4 -4
- package/dist/components/Table/components/SortHeader.js +1 -1
- package/dist/components/Table/components/cell.js +2 -2
- package/dist/components/Tabs.js +4 -4
- package/dist/components/Tag.js +1 -1
- package/dist/components/ToggleChip.js +1 -1
- package/dist/components/internal/CompoundField.js +4 -4
- package/dist/components/internal/ContextualModal.js +1 -1
- package/dist/components/internal/DatePicker/Day.js +2 -2
- package/dist/components/internal/Menu.js +1 -1
- package/dist/components/internal/MenuSection.js +1 -1
- package/dist/forms/StepperFormApp.js +3 -3
- package/dist/inputs/CheckboxBase.js +5 -5
- package/dist/inputs/ChipSelectField.js +3 -3
- package/dist/inputs/IconCard.js +3 -3
- package/dist/inputs/NumberField.js +1 -1
- package/dist/inputs/RadioGroupField.js +4 -4
- package/dist/inputs/RichTextField.js +4 -4
- package/dist/inputs/Switch.js +1 -1
- package/dist/inputs/TextFieldBase.js +7 -7
- package/dist/inputs/ToggleButton.js +2 -2
- package/dist/inputs/internal/ListBox.js +1 -1
- package/dist/inputs/internal/ListBoxChip.js +1 -1
- package/dist/inputs/internal/ListBoxSection.js +1 -1
- package/dist/inputs/internal/Option.js +1 -1
- package/package.json +2 -2
package/dist/inputs/IconCard.js
CHANGED
|
@@ -32,7 +32,7 @@ function IconCard(props) {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
exports.IconCard = IconCard;
|
|
35
|
-
const baseStyles = Css_1.Css.df.fdc.aic.jcc.wPx(130).hPx(114).ba.br8.
|
|
36
|
-
exports.selectedStyles = Css_1.Css.bw2.
|
|
37
|
-
const disabledStyles = Css_1.Css.
|
|
35
|
+
const baseStyles = Css_1.Css.df.fdc.aic.jcc.wPx(130).hPx(114).ba.br8.bcGray300.bgWhite.gap("12px").p2.tac.$;
|
|
36
|
+
exports.selectedStyles = Css_1.Css.bw2.bcBlue500.bgBlue50.$;
|
|
37
|
+
const disabledStyles = Css_1.Css.bcGray200.bgGray50.$;
|
|
38
38
|
exports.iconCardStylesHover = Css_1.Css.bgGray100.$;
|
|
@@ -15,7 +15,7 @@ function NumberField(props) {
|
|
|
15
15
|
var _a;
|
|
16
16
|
// Determine default alignment based on presentation context
|
|
17
17
|
const { fieldProps } = (0, PresentationContext_1.usePresentationContext)();
|
|
18
|
-
const alignment = (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.numberAlignment) === "right" ? Css_1.Css.
|
|
18
|
+
const alignment = (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.numberAlignment) === "right" ? Css_1.Css.tar.jcfe.$ : Css_1.Css.tal.jcfs.$;
|
|
19
19
|
const { disabled, required, readOnly, type, label, onBlur, onFocus, errorMsg, helperText, value, onChange, xss, displayDirection = false, numFractionDigits = type === "dollars" ? 2 : undefined, truncate = false, onEnter, numberFormatOptions, numIntegerDigits, useGrouping = true, sizeToContent = false, positiveOnly = false, ...otherProps } = props;
|
|
20
20
|
const isDisabled = !!disabled;
|
|
21
21
|
const isReadOnly = !!readOnly;
|
|
@@ -73,19 +73,19 @@ const whiteCircle = "data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white'
|
|
|
73
73
|
// color-adjust: exact;
|
|
74
74
|
// -webkit-print-color-adjust: exact;
|
|
75
75
|
exports.radioReset = {
|
|
76
|
-
...Css_1.Css.add("appearance", "none").p0.dib.
|
|
76
|
+
...Css_1.Css.add("appearance", "none").p0.dib.vam.add("userSelect", "none").fs0.h2.w2.br100.$,
|
|
77
77
|
...Css_1.Css.add("outline", "0px solid transparent").$,
|
|
78
78
|
};
|
|
79
79
|
exports.radioDefault = {
|
|
80
80
|
// By default we're a white circle with a gray border
|
|
81
|
-
...Css_1.Css.bgWhite.
|
|
81
|
+
...Css_1.Css.bgWhite.bcGray300.ba.$,
|
|
82
82
|
// Set the "selected" color that will be used by background=currentColor + box shadow, but is initially ignored
|
|
83
83
|
...Css_1.Css.blue700.$,
|
|
84
84
|
// Apply our default transitions
|
|
85
85
|
...Css_1.Css.transition.$,
|
|
86
86
|
};
|
|
87
87
|
// Unchecked means a gray border
|
|
88
|
-
exports.radioUnchecked = Css_1.Css.cursorPointer.
|
|
88
|
+
exports.radioUnchecked = Css_1.Css.cursorPointer.bcGray300.$;
|
|
89
89
|
// Checked means a blue circle (achieved by a blue background + white dot background image)
|
|
90
90
|
exports.radioChecked = {
|
|
91
91
|
// Make the background become the current (blue) color
|
|
@@ -107,7 +107,7 @@ exports.radioFocus = {
|
|
|
107
107
|
};
|
|
108
108
|
exports.radioHover = {
|
|
109
109
|
// Change both the dot and the border to a darker blue
|
|
110
|
-
...Css_1.Css.blue900.
|
|
110
|
+
...Css_1.Css.blue900.bcBlue900.$,
|
|
111
111
|
};
|
|
112
112
|
exports.radioDisabled = {
|
|
113
113
|
...Css_1.Css.cursorNotAllowed.gray100.$,
|
|
@@ -110,7 +110,7 @@ function RichTextField(props) {
|
|
|
110
110
|
})] }), (0, jsx_runtime_1.jsx)(react_1.Global, { styles: [tributeOverrides] })] }));
|
|
111
111
|
}
|
|
112
112
|
else {
|
|
113
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.w100.if(!fullWidth).maxw("550px").$, children: [label && (0, jsx_runtime_1.jsx)(Label_1.Label, { label: label }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.mh("120px").bgWhite.sm.gray900.bn.p1.br4.
|
|
113
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.w100.if(!fullWidth).maxw("550px").$, children: [label && (0, jsx_runtime_1.jsx)(Label_1.Label, { label: label }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.mh("120px").bgWhite.sm.gray900.bn.p1.br4.bcGray300.ba.$, dangerouslySetInnerHTML: { __html: dompurify_1.default.sanitize(value) || placeholder || "" }, "data-readonly": "true" })] }));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
exports.RichTextField = RichTextField;
|
|
@@ -138,13 +138,13 @@ function attachTributeJs(mergeTags, editorElement) {
|
|
|
138
138
|
catch (_a) { }
|
|
139
139
|
}
|
|
140
140
|
const trixCssOverrides = {
|
|
141
|
-
...Css_1.Css.relative.add({ wordBreak: "break-word" }).br4.
|
|
141
|
+
...Css_1.Css.relative.add({ wordBreak: "break-word" }).br4.bcGray300.ba.$,
|
|
142
142
|
// Put the toolbar on the bottom
|
|
143
143
|
...Css_1.Css.df.fdcr.gap1.$,
|
|
144
144
|
// Some basic copy/paste from TextFieldBase
|
|
145
145
|
"& trix-editor": Css_1.Css.bgWhite.sm.gray900.bn.p1.$,
|
|
146
146
|
// Highlight on focus
|
|
147
|
-
"&:focus-within": Css_1.Css.
|
|
147
|
+
"&:focus-within": Css_1.Css.bcBlue700.$,
|
|
148
148
|
"& trix-toolbar": Css_1.Css.m1.$,
|
|
149
149
|
// Make the buttons closer to ours
|
|
150
150
|
"& .trix-button:not(:first-of-type)": Css_1.Css.bn.$,
|
|
@@ -169,7 +169,7 @@ const trixCssOverrides = {
|
|
|
169
169
|
// Style the @ mention box
|
|
170
170
|
const tributeOverrides = {
|
|
171
171
|
".tribute-container": Css_1.Css.add({ minWidth: "300px" }).$,
|
|
172
|
-
".tribute-container > ul": Css_1.Css.sm.bgWhite.ba.br4.
|
|
172
|
+
".tribute-container > ul": Css_1.Css.sm.bgWhite.ba.br4.bcBlue700.oh.$,
|
|
173
173
|
};
|
|
174
174
|
function extractIdsFromMentions(mergeTags, content) {
|
|
175
175
|
return mergeTags.filter((tag) => content.includes(`@${tag}`));
|
package/dist/inputs/Switch.js
CHANGED
|
@@ -21,7 +21,7 @@ function Switch(props) {
|
|
|
21
21
|
const tooltip = (0, components_1.resolveTooltip)(disabled, props.tooltip);
|
|
22
22
|
const tid = (0, utils_1.useTestIds)(otherProps, label);
|
|
23
23
|
return ((0, jsx_runtime_1.jsxs)("label", { ...hoverProps, css: {
|
|
24
|
-
...Css_1.Css.relative.cursorPointer.df.wmaxc.
|
|
24
|
+
...Css_1.Css.relative.cursorPointer.df.wmaxc.usn.$,
|
|
25
25
|
...(labelStyle === "form" && Css_1.Css.fdc.$),
|
|
26
26
|
...(labelStyle === "left" && Css_1.Css.w100.aic.$),
|
|
27
27
|
...(labelStyle === "inline" && Css_1.Css.gap2.aic.$),
|
|
@@ -52,8 +52,8 @@ function TextFieldBase(props) {
|
|
|
52
52
|
// To remedy this perceived misalignment then we increase the width by the horizontal padding applied (16px), and set a negative margin left margin to re-center the field.
|
|
53
53
|
// Note: Do not modify width and position of 'compound' fields.
|
|
54
54
|
...(borderless && !compound
|
|
55
|
-
? Css_1.Css.
|
|
56
|
-
: Css_1.Css.
|
|
55
|
+
? Css_1.Css.bcTransparent.w("calc(100% + 16px)").ml(-1).$
|
|
56
|
+
: Css_1.Css.bcGray300.if(contrast).bcGray700.$),
|
|
57
57
|
// Do not add borders to compound fields. A compound field is responsible for drawing its own borders
|
|
58
58
|
...(!compound ? Css_1.Css.ba.$ : {}),
|
|
59
59
|
// When multiline is true, then we want to allow the field to grow to the height of the content, but not shrink below the minHeight
|
|
@@ -81,12 +81,12 @@ function TextFieldBase(props) {
|
|
|
81
81
|
// For "multiline" fields we add top and bottom padding of 7px for compact, or 11px for non-compact, to properly match the height of the single line fields
|
|
82
82
|
...(multiline ? Css_1.Css.br4.pyPx(compact ? 7 : 11).add("resize", "none").$ : Css_1.Css.truncate.$),
|
|
83
83
|
},
|
|
84
|
-
hover: Css_1.Css.bgColor(hoverBgColor).if(contrast).
|
|
85
|
-
focus: Css_1.Css.
|
|
84
|
+
hover: Css_1.Css.bgColor(hoverBgColor).if(contrast).bcGray600.$,
|
|
85
|
+
focus: Css_1.Css.bcBlue700.if(contrast).bcBlue500.$,
|
|
86
86
|
disabled: visuallyDisabled
|
|
87
87
|
? Css_1.Css.cursorNotAllowed.gray600.bgColor(disabledBgColor).if(contrast).gray500.$
|
|
88
88
|
: Css_1.Css.cursorNotAllowed.$,
|
|
89
|
-
error: Css_1.Css.
|
|
89
|
+
error: Css_1.Css.bcRed600.if(contrast).bcRed400.$,
|
|
90
90
|
};
|
|
91
91
|
// Watch for each WIP change, convert empty to undefined, and call the user's onChange
|
|
92
92
|
function onDomChange(e) {
|
|
@@ -126,12 +126,12 @@ function TextFieldBase(props) {
|
|
|
126
126
|
...(showHover ? fieldStyles.hover : {}),
|
|
127
127
|
// Only show error styles if the field is not disabled, following the pattern that the error message is also hidden
|
|
128
128
|
...(errorMsg && !inputProps.disabled ? fieldStyles.error : {}),
|
|
129
|
-
...Css_1.Css.if(multiline).aifs.
|
|
129
|
+
...Css_1.Css.if(multiline).aifs.oh.mhPx(textAreaMinHeight).$,
|
|
130
130
|
}, ...hoverProps, ref: inputWrapRef, onClick: unfocusedPlaceholder ? handleUnfocusedPlaceholderClick : undefined, children: [labelStyle === "inline" && label && ((0, jsx_runtime_1.jsx)(Label_1.InlineLabel, { multiline: multiline, labelProps: labelProps, label: label, ...tid.label })), startAdornment && (0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.df.aic.asc.fs0.br4.pr1.$, children: startAdornment }), unfocusedPlaceholder && ((0, jsx_runtime_1.jsx)("div", {
|
|
131
131
|
// Setting -1 tabIndex as this is a scrollable container, which is focusable by default.
|
|
132
132
|
// However, we want the user's focus to move to the field element, which will hide this container.
|
|
133
133
|
tabIndex: -1, ...tid.unfocusedPlaceholderContainer, css: {
|
|
134
|
-
...Css_1.Css.df.asc.w100.maxhPx(74).
|
|
134
|
+
...Css_1.Css.df.asc.w100.maxhPx(74).oa.$,
|
|
135
135
|
...fieldStyles.input,
|
|
136
136
|
...(showHover ? fieldStyles.hover : {}),
|
|
137
137
|
...(inputProps.disabled ? fieldStyles.disabled : {}),
|
|
@@ -37,8 +37,8 @@ function ToggleButton(props) {
|
|
|
37
37
|
...hoverProps,
|
|
38
38
|
...pressProps,
|
|
39
39
|
css: {
|
|
40
|
-
...Css_1.Css.br4.dif.aic.gap1.bgTransparent.gray500.hPx(32).plPx(4).pr1.relative.cursorPointer.w("max-content").smMd
|
|
41
|
-
|
|
40
|
+
...Css_1.Css.br4.dif.aic.gap1.bgTransparent.gray500.hPx(32).plPx(4).pr1.relative.cursorPointer.w("max-content").smMd.usn
|
|
41
|
+
.$,
|
|
42
42
|
...(isHovered && exports.toggleHoverStyles),
|
|
43
43
|
...(isPressed && exports.togglePressStyles),
|
|
44
44
|
...(isSelected && !isDisabled && Css_1.Css.blue700.$),
|
|
@@ -60,7 +60,7 @@ function ListBox(props) {
|
|
|
60
60
|
// Add `w50` in that case to ensure the ListBox is only the width of the field. If the width definitions ever change, we need to update here as well.
|
|
61
61
|
...Css_1.Css.bgWhite.br4.w100.bshBasic.hPx(popoverHeight).df.fdc.if(contrast).bgGray700.if(horizontalLayout).w50.$,
|
|
62
62
|
"&:hover": Css_1.Css.bshHover.$,
|
|
63
|
-
}, ref: listBoxRef, ...listBoxProps, children: [isMultiSelect && !isTree && state.selectionManager.selectedKeys.size > 0 && ((0, jsx_runtime_1.jsx)("ul", { css: Css_1.Css.listReset.pt2.pl2.pb1.pr1.df.bb.
|
|
63
|
+
}, ref: listBoxRef, ...listBoxProps, children: [isMultiSelect && !isTree && state.selectionManager.selectedKeys.size > 0 && ((0, jsx_runtime_1.jsx)("ul", { css: Css_1.Css.listReset.pt2.pl2.pb1.pr1.df.bb.bcGray200.add("flexWrap", "wrap").maxh("50%").oa.$, ref: selectedList, children: selectedOptions.map((o) => ((0, jsx_runtime_1.jsx)(ListBoxToggleChip_1.ListBoxToggleChip, { state: state, option: o, getOptionValue: getOptionValue, getOptionLabel: getOptionLabel, disabled: state.disabledKeys.has(getOptionValue(o)) }, getOptionValue(o)))) })), (0, jsx_runtime_1.jsx)("ul", { css: Css_1.Css.listReset.fg1.$, children: hasSections ? ([...state.collection].map((section) => ((0, jsx_runtime_1.jsx)(ListBoxSection_1.ListBoxSection, { section: section, state: state, contrast: contrast, onListHeightChange: onListHeightChange, popoverHeight: popoverHeight,
|
|
64
64
|
// Only scroll on focus if using VirtualFocus (used for ComboBoxState (SelectField), but not SelectState (ChipSelectField))
|
|
65
65
|
scrollOnFocus: props.shouldUseVirtualFocus, disabledOptionsWithReasons: disabledOptionsWithReasons }, section.key)))) : ((0, jsx_runtime_1.jsx)(VirtualizedOptions_1.VirtualizedOptions, { state: state, items: [...state.collection], onListHeightChange: onListHeightChange, contrast: contrast,
|
|
66
66
|
// Only scroll on focus if using VirtualFocus (used for ComboBoxState (SelectField), but not SelectState (ChipSelectField))
|
|
@@ -7,6 +7,6 @@ const Css_1 = require("../../Css");
|
|
|
7
7
|
function ListBoxChip({ label }) {
|
|
8
8
|
var _a;
|
|
9
9
|
const { fieldProps } = (0, PresentationContext_1.usePresentationContext)();
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css[(_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.typeScale) !== null && _a !== void 0 ? _a : "sm"].
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css[(_a = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.typeScale) !== null && _a !== void 0 ? _a : "sm"].tal.bgGray300.gray900.br16.pxPx(10).pyPx(2).lineClamp1.wbba.$, title: label, children: label }));
|
|
11
11
|
}
|
|
12
12
|
exports.ListBoxChip = ListBoxChip;
|
|
@@ -15,6 +15,6 @@ function ListBoxSection(props) {
|
|
|
15
15
|
const { separatorProps } = (0, react_aria_1.useSeparator)({ elementType: "li" });
|
|
16
16
|
const isPersistentSection = section.key !== state.collection.getFirstKey();
|
|
17
17
|
const childNodes = [...section.childNodes];
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isPersistentSection && (0, jsx_runtime_1.jsx)("li", { ...separatorProps, css: Css_1.Css.bt.
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isPersistentSection && (0, jsx_runtime_1.jsx)("li", { ...separatorProps, css: Css_1.Css.bt.bcGray200.$ }), (0, jsx_runtime_1.jsx)("li", { ...itemProps, css: Css_1.Css.if(!isPersistentSection).oa.$, children: (0, jsx_runtime_1.jsx)("ul", { css: Css_1.Css.listReset.if(!isPersistentSection).hPx(popoverHeight - constants_1.sectionSeparatorHeight - constants_1.persistentItemHeight).$, ...groupProps, children: isPersistentSection ? (childNodes.map((item) => ((0, jsx_runtime_1.jsx)(Option_1.Option, { item: item, state: state, contrast: contrast, disabledReason: disabledOptionsWithReasons[item.key] }, item.key)))) : ((0, jsx_runtime_1.jsx)(VirtualizedOptions_1.VirtualizedOptions, { state: state, items: childNodes, onListHeightChange: onListHeightChange, contrast: contrast, scrollOnFocus: scrollOnFocus, disabledOptionsWithReasons: disabledOptionsWithReasons })) }) })] }));
|
|
19
19
|
}
|
|
20
20
|
exports.ListBoxSection = ListBoxSection;
|
|
@@ -28,7 +28,7 @@ function Option(props) {
|
|
|
28
28
|
children: ((0, jsx_runtime_1.jsxs)("li", { ...(0, react_aria_1.mergeProps)(optionProps, hoverProps), "data-label": item.textValue, ref: ref, css: {
|
|
29
29
|
...Css_1.Css.df.aic.jcsb.py1.px2.mh("42px").outline0.cursorPointer.sm.$,
|
|
30
30
|
// Assumes only one Persistent Item per list - will need to change to utilize Sections if that assumption is incorrect.
|
|
31
|
-
...((0, ChipSelectField_1.isPersistentKey)(item.key) ? Css_1.Css.bt.
|
|
31
|
+
...((0, ChipSelectField_1.isPersistentKey)(item.key) ? Css_1.Css.bt.bcGray200.$ : {}),
|
|
32
32
|
...themeStyles.item,
|
|
33
33
|
...(isHovered && !isDisabled ? themeStyles.hover : {}),
|
|
34
34
|
...(isFocused ? themeStyles.focus : {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homebound/beam",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.354.0",
|
|
4
4
|
"author": "Homebound",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@homebound/eslint-config": "^1.10.2",
|
|
79
79
|
"@homebound/rtl-react-router-utils": "1.0.3",
|
|
80
80
|
"@homebound/rtl-utils": "^2.65.0",
|
|
81
|
-
"@homebound/truss": "^1.
|
|
81
|
+
"@homebound/truss": "^1.135.0",
|
|
82
82
|
"@homebound/tsconfig": "^1.0.3",
|
|
83
83
|
"@semantic-release/exec": "^6.0.3",
|
|
84
84
|
"@semantic-release/git": "^10.0.1",
|