@homebound/beam 2.305.0 → 2.306.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 +557 -387
- package/dist/Css.js +803 -633
- package/dist/components/Accordion.js +1 -1
- package/dist/components/Button.js +16 -16
- package/dist/components/Chip.js +4 -4
- package/dist/components/CssReset.js +2 -2
- package/dist/components/DnDGrid/DnDGridItemHandle.js +1 -1
- package/dist/components/Filters/Filters.js +1 -1
- package/dist/components/IconButton.js +1 -1
- package/dist/components/Loader.js +1 -1
- package/dist/components/NavLink.js +2 -2
- package/dist/components/Pagination.js +1 -1
- package/dist/components/Snackbar/SnackbarNotice.js +2 -2
- package/dist/components/Stepper.js +5 -6
- package/dist/components/Table/TableStyles.js +1 -1
- package/dist/components/Table/components/ExpandableHeader.js +1 -1
- package/dist/components/Table/components/Row.js +3 -3
- package/dist/components/Table/components/SortHeader.js +1 -1
- package/dist/components/Table/utils/utils.js +1 -1
- package/dist/components/Tabs.js +3 -3
- package/dist/components/Tag.js +3 -3
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/internal/CompoundField.js +3 -3
- package/dist/components/internal/DatePicker/DatePicker.css +2 -2
- package/dist/components/internal/DatePicker/Day.js +4 -4
- package/dist/components/internal/MenuItem.js +3 -9
- package/dist/inputs/CheckboxBase.js +3 -3
- package/dist/inputs/RadioGroupField.js +2 -2
- package/dist/inputs/RichTextField.js +3 -3
- package/dist/inputs/Switch.js +3 -3
- package/dist/inputs/TextFieldBase.js +1 -1
- package/dist/inputs/ToggleButton.js +1 -1
- package/dist/inputs/ToggleChipGroup.js +2 -2
- package/dist/inputs/TreeSelectField/TreeOption.js +1 -1
- package/dist/inputs/internal/ComboBoxInput.js +1 -1
- package/dist/inputs/internal/Option.js +2 -2
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ function Accordion(props) {
|
|
|
42
42
|
}, children: [(0, jsx_runtime_1.jsxs)("button", { ...testIds.title, ...focusProps, "aria-controls": id, "aria-expanded": expanded, disabled: disabled, css: {
|
|
43
43
|
...Css_1.Css.df.jcsb.gap2.aic.w100.p2.baseMd.outline("none").addIn(":hover", Css_1.Css.bgGray100.$).$,
|
|
44
44
|
...(disabled && Css_1.Css.gray500.$),
|
|
45
|
-
...(isFocusVisible && Css_1.Css.boxShadow(`inset 0 0 0 2px ${Css_1.Palette.
|
|
45
|
+
...(isFocusVisible && Css_1.Css.boxShadow(`inset 0 0 0 2px ${Css_1.Palette.Blue700}`).$),
|
|
46
46
|
...xss,
|
|
47
47
|
}, onClick: () => {
|
|
48
48
|
setExpanded(!expanded);
|
|
@@ -78,10 +78,10 @@ function getButtonStyles(variant, size, contrast) {
|
|
|
78
78
|
}
|
|
79
79
|
const variantStyles = (contrast) => ({
|
|
80
80
|
primary: {
|
|
81
|
-
baseStyles: Css_1.Css.
|
|
82
|
-
hoverStyles: Css_1.Css.
|
|
83
|
-
pressedStyles: Css_1.Css.
|
|
84
|
-
disabledStyles: Css_1.Css.
|
|
81
|
+
baseStyles: Css_1.Css.bgBlue600.white.$,
|
|
82
|
+
hoverStyles: Css_1.Css.bgBlue700.$,
|
|
83
|
+
pressedStyles: Css_1.Css.bgBlue800.$,
|
|
84
|
+
disabledStyles: Css_1.Css.bgBlue200.if(contrast).gray600.bgBlue900.$,
|
|
85
85
|
focusStyles: Css_1.Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${Css_1.Palette.White}`).$,
|
|
86
86
|
},
|
|
87
87
|
secondary: {
|
|
@@ -92,33 +92,33 @@ const variantStyles = (contrast) => ({
|
|
|
92
92
|
focusStyles: Css_1.Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${Css_1.Palette.White}`).$,
|
|
93
93
|
},
|
|
94
94
|
tertiary: {
|
|
95
|
-
baseStyles: Css_1.Css.bgTransparent.
|
|
95
|
+
baseStyles: Css_1.Css.bgTransparent.blue600.if(contrast).white.$,
|
|
96
96
|
hoverStyles: Css_1.Css.bgGray100.if(contrast).bgGray700.white.$,
|
|
97
|
-
pressedStyles: Css_1.Css.
|
|
97
|
+
pressedStyles: Css_1.Css.blue800.if(contrast).bgWhite.gray900.$,
|
|
98
98
|
disabledStyles: Css_1.Css.gray400.if(contrast).gray700.$,
|
|
99
|
-
focusStyles: Css_1.Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${Css_1.Palette.
|
|
99
|
+
focusStyles: Css_1.Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${Css_1.Palette.Blue400}`).bgGray700.white.$,
|
|
100
100
|
},
|
|
101
101
|
tertiaryDanger: {
|
|
102
|
-
baseStyles: Css_1.Css.bgTransparent.
|
|
102
|
+
baseStyles: Css_1.Css.bgTransparent.red600.if(contrast).red400.$,
|
|
103
103
|
hoverStyles: Css_1.Css.bgGray100.if(contrast).bgGray700.white.$,
|
|
104
|
-
pressedStyles: Css_1.Css.
|
|
104
|
+
pressedStyles: Css_1.Css.red800.if(contrast).bgWhite.gray900.$,
|
|
105
105
|
disabledStyles: Css_1.Css.gray400.if(contrast).gray700.$,
|
|
106
106
|
focusStyles: Css_1.Css.boxShadow(`0px 0px 0px 2px ${Css_1.Palette.White}, 0px 0px 0px 4px ${Css_1.Palette.Red500}`)
|
|
107
107
|
.if(contrast)
|
|
108
108
|
.boxShadow(`0px 0px 0px 2px ${Css_1.Palette.Red500}`).$,
|
|
109
109
|
},
|
|
110
110
|
danger: {
|
|
111
|
-
baseStyles: Css_1.Css.
|
|
112
|
-
hoverStyles: Css_1.Css.
|
|
113
|
-
pressedStyles: Css_1.Css.
|
|
111
|
+
baseStyles: Css_1.Css.bgRed600.white.$,
|
|
112
|
+
hoverStyles: Css_1.Css.bgRed700.$,
|
|
113
|
+
pressedStyles: Css_1.Css.bgRed800.$,
|
|
114
114
|
disabledStyles: Css_1.Css.bgRed200.if(contrast).bgRed900.gray600.$,
|
|
115
115
|
focusStyles: Css_1.Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${Css_1.Palette.White}`).$,
|
|
116
116
|
},
|
|
117
117
|
text: {
|
|
118
|
-
baseStyles: Css_1.Css.
|
|
119
|
-
hoverStyles: Css_1.Css.
|
|
120
|
-
pressedStyles: Css_1.Css.
|
|
121
|
-
disabledStyles: Css_1.Css.
|
|
118
|
+
baseStyles: Css_1.Css.blue700.add("fontSize", "inherit").if(contrast).blue400.$,
|
|
119
|
+
hoverStyles: Css_1.Css.blue600.if(contrast).blue300.$,
|
|
120
|
+
pressedStyles: Css_1.Css.blue700.if(contrast).blue200.$,
|
|
121
|
+
disabledStyles: Css_1.Css.blue300.if(contrast).blue700.$,
|
|
122
122
|
focusStyles: Css_1.Css.bshFocus.if(contrast).boxShadow(`0 0 0 2px ${Css_1.Palette.White}`).$,
|
|
123
123
|
},
|
|
124
124
|
// Todo: handle contrast variant
|
package/dist/components/Chip.js
CHANGED
|
@@ -34,12 +34,12 @@ function Chip({ type = exports.ChipTypes.neutral, ...props }) {
|
|
|
34
34
|
}
|
|
35
35
|
exports.Chip = Chip;
|
|
36
36
|
const typeStyles = {
|
|
37
|
-
caution: Css_1.Css.
|
|
38
|
-
warning: Css_1.Css.
|
|
39
|
-
success: Css_1.Css.
|
|
37
|
+
caution: Css_1.Css.bgYellow200.$,
|
|
38
|
+
warning: Css_1.Css.bgRed200.$,
|
|
39
|
+
success: Css_1.Css.bgGreen200.$,
|
|
40
40
|
light: Css_1.Css.bgWhite.$,
|
|
41
41
|
dark: Css_1.Css.bgGray900.white.$,
|
|
42
42
|
neutral: Css_1.Css.bgGray200.$,
|
|
43
43
|
darkMode: Css_1.Css.bgGray700.white.$,
|
|
44
|
-
info: Css_1.Css.
|
|
44
|
+
info: Css_1.Css.bgBlue100.$,
|
|
45
45
|
};
|
|
@@ -17,11 +17,11 @@ exports.CssReset = CssReset;
|
|
|
17
17
|
exports.navLink = "navLink";
|
|
18
18
|
const ourReset = (0, react_1.css) `
|
|
19
19
|
a:not(.${exports.navLink}) {
|
|
20
|
-
color: ${Css_1.Palette.
|
|
20
|
+
color: ${Css_1.Palette.Blue700};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
a:visited:not(.${exports.navLink}) {
|
|
24
|
-
color: ${Css_1.Palette.
|
|
24
|
+
color: ${Css_1.Palette.Blue500};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -15,7 +15,7 @@ function DnDGridItemHandle(props) {
|
|
|
15
15
|
return ((0, jsx_runtime_1.jsx)("button", { css: {
|
|
16
16
|
...(compact ? iconButtonCompact : iconButtonNormal),
|
|
17
17
|
...src_1.Css.cursor("grab").bTransparent.bsSolid.bgTransparent.outline0.dif.aic.jcc.transition.if(isFocusVisible)
|
|
18
|
-
.
|
|
18
|
+
.bBlue700.$,
|
|
19
19
|
...(isHovered && src_1.Css.bgGray200.$),
|
|
20
20
|
}, ...(0, react_aria_1.mergeProps)(dragHandleProps, focusProps, hoverProps), ...tid, children: (0, jsx_runtime_1.jsx)(src_1.Icon, { icon: icon, inc: compact ? 2 : undefined, color: color }) }));
|
|
21
21
|
}
|
|
@@ -32,7 +32,7 @@ function Filters(props) {
|
|
|
32
32
|
// Return list of filter components. `onSelect` should update the `filter`
|
|
33
33
|
return ((0, jsx_runtime_1.jsxs)("div", { css: {
|
|
34
34
|
...(vertical ? Css_1.Css.df.fdc.gap2.$ : Css_1.Css.df.aic.gap1.$),
|
|
35
|
-
}, ...testId, children: [maybeGroupByField, (0, utils_1.safeEntries)(pageFilters).map(([key, f]) => ((0, jsx_runtime_1.jsx)("div", { children: f.render(filter[key], (value) => onChange((0, Filters_1.updateFilter)(filter, key, value)), testId, false, vertical) }, key))), Object.keys(modalFilters).length > 0 && ((0, jsx_runtime_1.jsx)(Button_1.Button, { label: "More Filters", endAdornment: numModalFilters > 0 && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.wPx(16).hPx(16).fs0.br100.
|
|
35
|
+
}, ...testId, children: [maybeGroupByField, (0, utils_1.safeEntries)(pageFilters).map(([key, f]) => ((0, jsx_runtime_1.jsx)("div", { children: f.render(filter[key], (value) => onChange((0, Filters_1.updateFilter)(filter, key, value)), testId, false, vertical) }, key))), Object.keys(modalFilters).length > 0 && ((0, jsx_runtime_1.jsx)(Button_1.Button, { label: "More Filters", endAdornment: numModalFilters > 0 && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.wPx(16).hPx(16).fs0.br100.bgBlue700.white.tinySb.df.aic.jcc.$, children: numModalFilters })), variant: "secondary", onClick: () => openModal({
|
|
36
36
|
// Spreading `props` to pass along `data-testid`
|
|
37
37
|
content: (0, jsx_runtime_1.jsx)(Filters_1.FilterModal, { ...props, filter: filter, onApply: onChange, filters: modalFilters }),
|
|
38
38
|
}), ...testId.moreFiltersBtn })), Object.keys(filter).length > 0 && ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { label: "Clear", variant: "tertiary", onClick: () => onChange({}), ...testId.clearBtn }) }))] }));
|
|
@@ -57,5 +57,5 @@ const iconButtonNormal = Css_1.Css.hPx(28).wPx(28).br8.bw2.$;
|
|
|
57
57
|
const iconButtonCompact = Css_1.Css.hPx(18).wPx(18).br4.bw1.$;
|
|
58
58
|
exports.iconButtonStylesHover = Css_1.Css.bgGray200.$;
|
|
59
59
|
exports.iconButtonContrastStylesHover = Css_1.Css.bgGray700.$;
|
|
60
|
-
const iconButtonStylesFocus = Css_1.Css.
|
|
60
|
+
const iconButtonStylesFocus = Css_1.Css.bBlue700.$;
|
|
61
61
|
const iconButtonStylesDisabled = Css_1.Css.cursorNotAllowed.$;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
5
5
|
const Css_1 = require("../Css");
|
|
6
6
|
function Loader({ size = "lg", contrast = false }) {
|
|
7
7
|
const [dimensions, borderSize] = sizeToPixels[size];
|
|
8
|
-
const [bgColor, spinnerColor] = contrast ? [Css_1.Palette.Gray600, Css_1.Palette.Gray200] : [Css_1.Palette.White, Css_1.Palette.
|
|
8
|
+
const [bgColor, spinnerColor] = contrast ? [Css_1.Palette.Gray600, Css_1.Palette.Gray200] : [Css_1.Palette.White, Css_1.Palette.Blue700];
|
|
9
9
|
return ((0, jsx_runtime_1.jsx)("div", { "aria-label": "Loading", css: Css_1.Css.br100.ba
|
|
10
10
|
.hPx(dimensions)
|
|
11
11
|
.wPx(dimensions)
|
|
@@ -46,9 +46,9 @@ const baseStyles = Css_1.Css.df.aic.hPx(32).pyPx(6).px1.br4.smMd.outline0.$;
|
|
|
46
46
|
const navLinkVariantStyles = (contrast) => ({
|
|
47
47
|
side: {
|
|
48
48
|
baseStyles: { ...baseStyles, ...Css_1.Css.gray700.if(contrast).gray600.$ },
|
|
49
|
-
activeStyles: Css_1.Css.
|
|
49
|
+
activeStyles: Css_1.Css.blue700.bgBlue50.if(contrast).white.bgGray700.$,
|
|
50
50
|
disabledStyles: Css_1.Css.gray400.cursorNotAllowed.if(contrast).gray800.$,
|
|
51
|
-
focusRingStyles: Css_1.Css.
|
|
51
|
+
focusRingStyles: Css_1.Css.bgBlue50.bshFocus.if(contrast).bgGray700.white.$,
|
|
52
52
|
hoverStyles: Css_1.Css.gray700.bgGray100.if(contrast).bgGray800.gray600.$,
|
|
53
53
|
pressedStyles: Css_1.Css.gray700.bgGray200.if(contrast).bgGray200.gray800.$,
|
|
54
54
|
},
|
|
@@ -29,7 +29,7 @@ function Pagination(props) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
const tid = (0, utils_1.useTestIds)(props, "pagination");
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.df.bGray300.bt.xs.gray500.px1.ml2.pt2.$, ...tid, children: [(0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.df.mya.mr2.$, ...tid.pageSizeLabel, children: "Page size:" }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.wPx(78).$, children: (0, jsx_runtime_1.jsx)(inputs_1.SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: exports.pageOptions, value: pageSize, onSelect: (val) => set({ pageNumber: 1, pageSize: val }), ...tid.pageSize }) }), (0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.mla.mya.df.$, children: [(0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.df.mya.mr2.$, ...tid.pageInfoLabel, children: [first, " ", showLast ? `- ${last}` : "", " of ", totalCount] }), (0, jsx_runtime_1.jsx)(components_1.IconButton, { icon: "chevronLeft", color: hasPrevPage ? Css_1.Palette.
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.df.bGray300.bt.xs.gray500.px1.ml2.pt2.$, ...tid, children: [(0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.df.mya.mr2.$, ...tid.pageSizeLabel, children: "Page size:" }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.wPx(78).$, children: (0, jsx_runtime_1.jsx)(inputs_1.SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: exports.pageOptions, value: pageSize, onSelect: (val) => set({ pageNumber: 1, pageSize: val }), ...tid.pageSize }) }), (0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.mla.mya.df.$, children: [(0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.df.mya.mr2.$, ...tid.pageInfoLabel, children: [first, " ", showLast ? `- ${last}` : "", " of ", totalCount] }), (0, jsx_runtime_1.jsx)(components_1.IconButton, { icon: "chevronLeft", color: hasPrevPage ? Css_1.Palette.Blue700 : Css_1.Palette.Gray200, onClick: () => set({ pageNumber: pageNumber - 1, pageSize }), disabled: !hasPrevPage, ...tid.previousIcon }), (0, jsx_runtime_1.jsx)(components_1.IconButton, { icon: "chevronRight", color: hasNextPage ? Css_1.Palette.Blue700 : Css_1.Palette.Gray200, onClick: () => set({ pageNumber: pageNumber + 1, pageSize }), disabled: !hasNextPage, ...tid.nextIcon })] })] }));
|
|
33
33
|
}
|
|
34
34
|
exports.Pagination = Pagination;
|
|
35
35
|
function toLimitAndOffset(page) {
|
|
@@ -17,9 +17,9 @@ function SnackbarNotice(props) {
|
|
|
17
17
|
exports.SnackbarNotice = SnackbarNotice;
|
|
18
18
|
const typeToIcon = {
|
|
19
19
|
// Can change to a Tupple with IconKey and color?
|
|
20
|
-
error: { icon: "xCircle", color: Css_1.Palette.
|
|
20
|
+
error: { icon: "xCircle", color: Css_1.Palette.Red400 },
|
|
21
21
|
warning: { icon: "error", color: Css_1.Palette.Yellow300 },
|
|
22
22
|
success: { icon: "checkCircle", color: Css_1.Palette.Green300 },
|
|
23
|
-
info: { icon: "infoCircle", color: Css_1.Palette.
|
|
23
|
+
info: { icon: "infoCircle", color: Css_1.Palette.Blue300 },
|
|
24
24
|
alert: { icon: "errorCircle", color: Css_1.Palette.White },
|
|
25
25
|
};
|
|
@@ -25,9 +25,8 @@ function Stepper(props) {
|
|
|
25
25
|
}) }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.mt1.bgGray300
|
|
26
26
|
.hPx(4)
|
|
27
27
|
.maxwPx(steps.length * maxStepWidth + (steps.length - 1) * gap)
|
|
28
|
-
.mwPx(steps.length * minStepWidth + (steps.length - 1) * gap).w100.$, children: (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.
|
|
29
|
-
|
|
30
|
-
.h100.w(`${((lastCompletedStep + 1) / steps.length) * 100}%`).$ }) })] }));
|
|
28
|
+
.mwPx(steps.length * minStepWidth + (steps.length - 1) * gap).w100.$, children: (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.bgBlue600.add("transition", "width 200ms").h100.w(`${((lastCompletedStep + 1) / steps.length) * 100}%`)
|
|
29
|
+
.$ }) })] }));
|
|
31
30
|
}
|
|
32
31
|
exports.Stepper = Stepper;
|
|
33
32
|
function StepButton(props) {
|
|
@@ -42,9 +41,9 @@ function StepButton(props) {
|
|
|
42
41
|
return ((0, jsx_runtime_1.jsxs)("button", { ref: ref, ...buttonProps, ...focusProps, ...hoverProps, css: {
|
|
43
42
|
...Css_1.Css.buttonBase.$,
|
|
44
43
|
...Css_1.Css.tl.w100.h100.sm.gray700.add("whiteSpace", "initial").if(state === "error").red600.$,
|
|
45
|
-
...(isCurrent ? Css_1.Css.
|
|
46
|
-
...(isHovered && !isPressed ? Css_1.Css.
|
|
47
|
-
...(isPressed ? Css_1.Css.
|
|
44
|
+
...(isCurrent ? Css_1.Css.blue700.if(state === "error").red800.$ : {}),
|
|
45
|
+
...(isHovered && !isPressed ? Css_1.Css.blue800.if(state === "error").red500.$ : {}),
|
|
46
|
+
...(isPressed ? Css_1.Css.blue500.if(state === "error").red900.$ : {}),
|
|
48
47
|
...(disabled ? Css_1.Css.gray400.cursorNotAllowed.if(state === "error").red200.$ : {}),
|
|
49
48
|
...(isFocusVisible ? focusRingStyles : {}),
|
|
50
49
|
}, ...tid[(0, defaultTestId_1.defaultTestId)(label)], children: [(0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.mrPx(4).$, children: (0, jsx_runtime_1.jsx)(StepIcon, { state: state, isHovered: isHovered, isPressed: isPressed, isCurrent: isCurrent }) }), label] }));
|
|
@@ -61,7 +61,7 @@ function memoizedTableStyles() {
|
|
|
61
61
|
: Css_1.Css.addIn("> *", Css_1.Css.bsh0.$).$,
|
|
62
62
|
presentationSettings: { borderless: true, typeScale: "xs", wrap: rowHeight === "flexible" },
|
|
63
63
|
levels: grouped ? groupedLevels : defaultLevels,
|
|
64
|
-
rowHoverColor: Css_1.Palette.
|
|
64
|
+
rowHoverColor: Css_1.Palette.Blue100,
|
|
65
65
|
keptGroupRowCss: Css_1.Css.bgYellow100.gray900.xsMd.$,
|
|
66
66
|
keptLastRowCss: Css_1.Css.boxShadow("inset 0px -14px 8px -11px rgba(63,63,63,.18)").$,
|
|
67
67
|
};
|
|
@@ -19,7 +19,7 @@ function ExpandableHeader(props) {
|
|
|
19
19
|
// Do not apply sticky styles when rendering as table. Currently the table does not properly respect column widths, causing the sticky offsets to be incorrect
|
|
20
20
|
const applyStickyStyles = isExpanded && as !== "table";
|
|
21
21
|
const { hoverProps, isHovered } = (0, hooks_1.useHover)({});
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("button", { ...hoverProps, css: Css_1.Css.df.xsMd.aic.jcsb.gap2.px1.hPx(32).mxPx(-8).w("calc(100% + 16px)").br4.
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)("button", { ...hoverProps, css: Css_1.Css.df.xsMd.aic.jcsb.gap2.px1.hPx(32).mxPx(-8).w("calc(100% + 16px)").br4.blue700.if(isHovered).bgGray100.$, onClick: async () => {
|
|
23
23
|
if ((0, utils_2.isFunction)(column.expandColumns)) {
|
|
24
24
|
setIsLoading(true);
|
|
25
25
|
await tableState.loadExpandedColumns(column.id);
|
|
@@ -58,7 +58,7 @@ function RowImpl(props) {
|
|
|
58
58
|
// Optionally include the row hover styles, by default they should be turned on.
|
|
59
59
|
...(showRowHoverColor && {
|
|
60
60
|
// Even though backgroundColor is set on the cellCss, the hover target is the row.
|
|
61
|
-
"&:hover > *": Css_1.Css.bgColor((_b = style.rowHoverColor) !== null && _b !== void 0 ? _b : Css_1.Palette.
|
|
61
|
+
"&:hover > *": Css_1.Css.bgColor((_b = style.rowHoverColor) !== null && _b !== void 0 ? _b : Css_1.Palette.Blue100).$,
|
|
62
62
|
}),
|
|
63
63
|
// For virtual tables use `display: flex` to keep all cells on the same row. For each cell in the row use `flexNone` to ensure they stay their defined widths
|
|
64
64
|
...(as === "table" ? {} : Css_1.Css.relative.df.fg1.fs1.addIn("&>*", Css_1.Css.flexNone.$).$),
|
|
@@ -205,13 +205,13 @@ function RowImpl(props) {
|
|
|
205
205
|
// The specific cell's css (if any from GridCellContent)
|
|
206
206
|
...rowStyleCellCss,
|
|
207
207
|
// Apply active row styling for non-nested card styles.
|
|
208
|
-
...(isActive ? Css_1.Css.bgColor((_d = style.activeBgColor) !== null && _d !== void 0 ? _d : Css_1.Palette.
|
|
208
|
+
...(isActive ? Css_1.Css.bgColor((_d = style.activeBgColor) !== null && _d !== void 0 ? _d : Css_1.Palette.Blue50).$ : {}),
|
|
209
209
|
// Add any cell specific style overrides
|
|
210
210
|
...((0, utils_1.isGridCellContent)(maybeContent) && maybeContent.typeScale ? Css_1.Css[maybeContent.typeScale].$ : {}),
|
|
211
211
|
// And any cell specific css
|
|
212
212
|
...((0, utils_1.isGridCellContent)(maybeContent) && maybeContent.css ? maybeContent.css : {}),
|
|
213
213
|
// Apply cell highlight styles to active cell and hover
|
|
214
|
-
...Css_1.Css.if(applyCellHighlight && isCellActive).br4.boxShadow(`inset 0 0 0 1px ${Css_1.Palette.
|
|
214
|
+
...Css_1.Css.if(applyCellHighlight && isCellActive).br4.boxShadow(`inset 0 0 0 1px ${Css_1.Palette.Blue700}`).$,
|
|
215
215
|
// Define the width of the column on each cell. Supports col spans.
|
|
216
216
|
width: `calc(${columnSizes.slice(columnIndex, columnIndex + currentColspan).join(" + ")})`,
|
|
217
217
|
...(typeof column.mw === "string" ? Css_1.Css.mw(column.mw).$ : {}),
|
|
@@ -27,7 +27,7 @@ function SortHeader(props) {
|
|
|
27
27
|
const sorted = sortKey === (current === null || current === void 0 ? void 0 : current.columnId) ? current === null || current === void 0 ? void 0 : current.direction : undefined;
|
|
28
28
|
const toggleSort = (0, react_1.useCallback)(() => tableState.setSortKey(sortKey), [sortKey, tableState]);
|
|
29
29
|
const tid = (0, useTestIds_1.useTestIds)(props, "sortHeader");
|
|
30
|
-
const icon = ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: sorted === "DESC" ? "sortDown" : "sortUp", color: sorted !== undefined ? Css_1.Palette.
|
|
30
|
+
const icon = ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: sorted === "DESC" ? "sortDown" : "sortUp", color: sorted !== undefined ? Css_1.Palette.Blue700 : Css_1.Palette.Gray400, xss: {
|
|
31
31
|
...Css_1.Css.ml1.if(iconOnLeft).mr1.ml0.$,
|
|
32
32
|
...Css_1.Css.visibility("hidden")
|
|
33
33
|
.if(isHovered || sorted !== undefined)
|
|
@@ -36,7 +36,7 @@ function toContent(maybeContent, isHeader, canSortColumn, isClientSideSorting, s
|
|
|
36
36
|
content =
|
|
37
37
|
isGridCellContent(maybeContent) && !!maybeContent.onClick
|
|
38
38
|
? (0, getInteractiveElement_1.getButtonOrLink)(content, maybeContent.onClick, {
|
|
39
|
-
css: Css_1.Css.maxw100.
|
|
39
|
+
css: Css_1.Css.maxw100.blue700.ta("inherit").if(((_a = style === null || style === void 0 ? void 0 : style.presentationSettings) === null || _a === void 0 ? void 0 : _a.wrap) === false).truncate.$,
|
|
40
40
|
})
|
|
41
41
|
: content;
|
|
42
42
|
if (content && typeof content === "string" && isHeader && canSortColumn) {
|
package/dist/components/Tabs.js
CHANGED
|
@@ -127,11 +127,11 @@ function getTabStyles() {
|
|
|
127
127
|
return {
|
|
128
128
|
baseStyles: Css_1.Css.df.aic.hPx(32).pyPx(verticalPaddingPx).px1.outline0.gray700.add("width", "fit-content")
|
|
129
129
|
.cursorPointer.sm.$,
|
|
130
|
-
activeStyles: Css_1.Css.add(borderBottomStyles).
|
|
130
|
+
activeStyles: Css_1.Css.add(borderBottomStyles).bBlue700.smMd.gray900.$,
|
|
131
131
|
disabledStyles: Css_1.Css.gray400.cursorNotAllowed.$,
|
|
132
|
-
focusRingStyles: Css_1.Css.
|
|
132
|
+
focusRingStyles: Css_1.Css.bgBlue50.bshFocus.$,
|
|
133
133
|
hoverStyles: Css_1.Css.add(borderBottomStyles).bGray400.$,
|
|
134
|
-
activeHoverStyles: Css_1.Css.
|
|
134
|
+
activeHoverStyles: Css_1.Css.bgBlue50.add(borderBottomStyles).bBlue700.$,
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
exports.getTabStyles = getTabStyles;
|
package/dist/components/Tag.js
CHANGED
|
@@ -15,13 +15,13 @@ exports.Tag = Tag;
|
|
|
15
15
|
function getStyles(type) {
|
|
16
16
|
switch (type) {
|
|
17
17
|
case "info":
|
|
18
|
-
return Css_1.Css.
|
|
18
|
+
return Css_1.Css.bgBlue100.$;
|
|
19
19
|
case "caution":
|
|
20
20
|
return Css_1.Css.bgYellow200.$;
|
|
21
21
|
case "warning":
|
|
22
|
-
return Css_1.Css.
|
|
22
|
+
return Css_1.Css.bgRed200.$;
|
|
23
23
|
case "success":
|
|
24
|
-
return Css_1.Css.
|
|
24
|
+
return Css_1.Css.bgGreen200.$;
|
|
25
25
|
default:
|
|
26
26
|
// Neutral case
|
|
27
27
|
return Css_1.Css.bgGray200.$;
|
|
@@ -22,7 +22,7 @@ const typeToIcon = {
|
|
|
22
22
|
};
|
|
23
23
|
const variantStyles = {
|
|
24
24
|
success: Css_1.Css.bgGreen100.gray900.$,
|
|
25
|
-
info: Css_1.Css.
|
|
25
|
+
info: Css_1.Css.bgBlue100.gray900.$,
|
|
26
26
|
warning: Css_1.Css.bgYellow200.gray900.$,
|
|
27
27
|
alert: Css_1.Css.bgGray200.gray900.$,
|
|
28
28
|
error: Css_1.Css.bgRed100.gray900.$,
|
|
@@ -13,17 +13,17 @@ function CompoundField({ children }) {
|
|
|
13
13
|
const internalProps = { compound: true };
|
|
14
14
|
return ((0, jsx_runtime_1.jsxs)("div", { css: {
|
|
15
15
|
...Css_1.Css.df.$,
|
|
16
|
-
"&:focus-within > div:nth-of-type(2)": Css_1.Css.
|
|
16
|
+
"&:focus-within > div:nth-of-type(2)": Css_1.Css.bgBlue700.$, // Separation line when inputs are focused
|
|
17
17
|
}, children: [(0, jsx_runtime_1.jsx)("div", { css: {
|
|
18
18
|
...commonStyles,
|
|
19
19
|
...Css_1.Css.bl.borderRadius("4px 0 0 4px").$,
|
|
20
|
-
"&:focus-within": Css_1.Css.
|
|
20
|
+
"&:focus-within": Css_1.Css.bBlue700.$,
|
|
21
21
|
}, children: (0, react_1.cloneElement)(children[0], {
|
|
22
22
|
internalProps,
|
|
23
23
|
}) }), (0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.wPx(1).flexNone.bgGray300.$ }), (0, jsx_runtime_1.jsx)("div", { css: {
|
|
24
24
|
...commonStyles,
|
|
25
25
|
...Css_1.Css.fg1.br.borderRadius("0 4px 4px 0").$,
|
|
26
|
-
"&:focus-within": Css_1.Css.
|
|
26
|
+
"&:focus-within": Css_1.Css.bBlue700.$,
|
|
27
27
|
}, children: (0, react_1.cloneElement)(children[1], {
|
|
28
28
|
internalProps,
|
|
29
29
|
}) })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
/* Modified by Beam (40 -> 32) */
|
|
3
3
|
--rdp-cell-size: 32px;
|
|
4
|
-
/* Modified by Beam (#0000ff ->
|
|
4
|
+
/* Modified by Beam (#0000ff -> Blue700) */
|
|
5
5
|
--rdp-accent-color: rgba(3, 105, 161, 1);
|
|
6
6
|
--rdp-background-color: #e7edff;
|
|
7
7
|
/* Switch to dark colors for dark themes */
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
/* Outline border for focused elements */
|
|
11
11
|
--rdp-outline: 2px solid var(--rdp-accent-color);
|
|
12
12
|
/* Outline border for focused and selected elements */
|
|
13
|
-
/* Modified by Beam (rgba(0, 0, 0, 0.75) ->
|
|
13
|
+
/* Modified by Beam (rgba(0, 0, 0, 0.75) -> Blue700) */
|
|
14
14
|
--rdp-outline-selected: 2px solid rgba(3, 105, 161, 1);
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -32,7 +32,7 @@ function Day(props) {
|
|
|
32
32
|
"&:hover:not(:active) > div": Css_1.Css.bgGray100.$,
|
|
33
33
|
}),
|
|
34
34
|
...(!disabled && { "&:active > div": Css_1.Css.bgGray400.gray900.$ }),
|
|
35
|
-
"&:focus:not(:active) > div": Css_1.Css.ba.
|
|
35
|
+
"&:focus:not(:active) > div": Css_1.Css.ba.bBlue700.if(selected).bBlue900.$,
|
|
36
36
|
...(showRangeStyles &&
|
|
37
37
|
range_start &&
|
|
38
38
|
Css_1.Css.addIn(":after", { ...rangeBaseStyles, ...Css_1.Css.rightPx(-2).wPx(8).$ }).$),
|
|
@@ -41,7 +41,7 @@ function Day(props) {
|
|
|
41
41
|
}, ...tid, children: (0, jsx_runtime_1.jsxs)("div", { css: {
|
|
42
42
|
...Css_1.Css.overflowHidden.gray900.relative.z1.br4.df.aic.jcc.wPx(28).hPx(30).mtPx(2).br4.$,
|
|
43
43
|
...(today && !range_middle && Css_1.Css.bgGray100.$),
|
|
44
|
-
...(selected && !range_middle && Css_1.Css.white.
|
|
44
|
+
...(selected && !range_middle && Css_1.Css.white.bgBlue700.$),
|
|
45
45
|
...(disabled && Css_1.Css.gray500.$),
|
|
46
46
|
}, children: [(0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.mtPx(-2).$, children: children }), indicatorDot && ((0, jsx_runtime_1.jsx)("div", {
|
|
47
47
|
// Using `absolute` position as to not change the placement of the day's number when this is introduced
|
|
@@ -49,7 +49,7 @@ function Day(props) {
|
|
|
49
49
|
.bottomPx(4)
|
|
50
50
|
.wPx(4)
|
|
51
51
|
.hPx(4)
|
|
52
|
-
.
|
|
52
|
+
.bgBlue700.br4.if(selected && !range_middle).bgWhite.$, ...tid.indicatorDot }))] }) }));
|
|
53
53
|
}
|
|
54
54
|
exports.Day = Day;
|
|
55
|
-
const rangeBaseStyles = Css_1.Css.absolute.topPx(2).contentEmpty.hPx(30).wPx(32).
|
|
55
|
+
const rangeBaseStyles = Css_1.Css.absolute.topPx(2).contentEmpty.hPx(30).wPx(32).bgBlue100.$;
|
|
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_aria_1 = require("react-aria");
|
|
7
7
|
const react_router_1 = require("react-router");
|
|
8
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
8
9
|
const Avatar_1 = require("../Avatar");
|
|
9
10
|
const Icon_1 = require("../Icon");
|
|
10
11
|
const Tooltip_1 = require("../Tooltip");
|
|
11
12
|
const Css_1 = require("../../Css");
|
|
12
13
|
const utils_1 = require("../../utils");
|
|
13
14
|
const defaultTestId_1 = require("../../utils/defaultTestId");
|
|
14
|
-
const react_router_dom_1 = require("react-router-dom");
|
|
15
15
|
function MenuItemImpl(props) {
|
|
16
16
|
const { item, state, onClose, contrast } = props;
|
|
17
17
|
const menuItem = item.value;
|
|
@@ -53,7 +53,7 @@ function MenuItemImpl(props) {
|
|
|
53
53
|
return ((0, jsx_runtime_1.jsx)("li", { ...menuItemProps, ...hoverProps, ref: ref, css: {
|
|
54
54
|
...Css_1.Css.df.aic.py1.px2.cursorPointer.outline0.mh("42px").sm.$,
|
|
55
55
|
...(!isDisabled && isHovered ? (contrast ? Css_1.Css.bgGray800.$ : Css_1.Css.bgGray100.$) : {}),
|
|
56
|
-
...(isFocused ? Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${Css_1.Palette.
|
|
56
|
+
...(isFocused ? Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${Css_1.Palette.Blue700}`).$ : {}),
|
|
57
57
|
...(isDisabled ? Css_1.Css.gray500.cursorNotAllowed.$ : {}),
|
|
58
58
|
...(destructive ? Css_1.Css.red600.$ : {}),
|
|
59
59
|
...(isSelected ? Css_1.Css.fw5.$ : {}),
|
|
@@ -65,13 +65,7 @@ function MenuItemImpl(props) {
|
|
|
65
65
|
}
|
|
66
66
|
exports.MenuItemImpl = MenuItemImpl;
|
|
67
67
|
function renderMenuItem(menuItem, isSelected, isDisabled, contrast) {
|
|
68
|
-
return ((0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.df.w100.aic.jcsb.gap2.$, children: [(0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.df.aic.$, children: maybeWrapInLink(menuItem.onClick, isIconMenuItem(menuItem) ? ((0, jsx_runtime_1.jsx)(IconMenuItem, { ...menuItem })) : isImageMenuItem(menuItem) ? ((0, jsx_runtime_1.jsx)(ImageMenuItem, { ...menuItem })) : (menuItem.label), isDisabled) }), isSelected && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: "check", color: !contrast
|
|
69
|
-
? isDisabled
|
|
70
|
-
? Css_1.Palette.Gray400
|
|
71
|
-
: Css_1.Palette.LightBlue700
|
|
72
|
-
: isDisabled
|
|
73
|
-
? Css_1.Palette.Gray500
|
|
74
|
-
: Css_1.Palette.White }))] }));
|
|
68
|
+
return ((0, jsx_runtime_1.jsxs)("div", { css: Css_1.Css.df.w100.aic.jcsb.gap2.$, children: [(0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.df.aic.$, children: maybeWrapInLink(menuItem.onClick, isIconMenuItem(menuItem) ? ((0, jsx_runtime_1.jsx)(IconMenuItem, { ...menuItem })) : isImageMenuItem(menuItem) ? ((0, jsx_runtime_1.jsx)(ImageMenuItem, { ...menuItem })) : (menuItem.label), isDisabled) }), isSelected && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: "check", color: !contrast ? (isDisabled ? Css_1.Palette.Gray400 : Css_1.Palette.Blue700) : isDisabled ? Css_1.Palette.Gray500 : Css_1.Palette.White }))] }));
|
|
75
69
|
}
|
|
76
70
|
function ImageMenuItem(item) {
|
|
77
71
|
const { src, size = 24, label, isAvatar = false } = item;
|
|
@@ -29,13 +29,13 @@ function CheckboxBase(props) {
|
|
|
29
29
|
}
|
|
30
30
|
exports.CheckboxBase = CheckboxBase;
|
|
31
31
|
const baseStyles = Css_1.Css.hPx(16).mw((0, Css_1.px)(16)).relative.ba.bGray300.br4.bgWhite.transition.$;
|
|
32
|
-
const filledBoxStyles = Css_1.Css.
|
|
33
|
-
const filledBoxHoverStyles = Css_1.Css.
|
|
32
|
+
const filledBoxStyles = Css_1.Css.bBlue700.bgBlue700.$;
|
|
33
|
+
const filledBoxHoverStyles = Css_1.Css.bgBlue900.$;
|
|
34
34
|
const disabledBoxStyles = Css_1.Css.bgGray50.bGray100.$;
|
|
35
35
|
const disabledSelectedBoxStyles = Css_1.Css.bgGray400.bGray400.$;
|
|
36
36
|
const disabledColor = Css_1.Css.gray300.$;
|
|
37
37
|
const focusRingStyles = Css_1.Css.bshFocus.$;
|
|
38
|
-
const hoverBorderStyles = Css_1.Css.
|
|
38
|
+
const hoverBorderStyles = Css_1.Css.bBlue900.$;
|
|
39
39
|
const markStyles = { svg: Css_1.Css.absolute.topPx(-1).leftPx(-1).$ };
|
|
40
40
|
const labelStyles = Css_1.Css.smMd.$;
|
|
41
41
|
const descStyles = Css_1.Css.sm.gray700.$;
|
|
@@ -80,7 +80,7 @@ exports.radioDefault = {
|
|
|
80
80
|
// By default we're a white circle with a gray border
|
|
81
81
|
...Css_1.Css.bgWhite.bGray300.ba.$,
|
|
82
82
|
// Set the "selected" color that will be used by background=currentColor + box shadow, but is initially ignored
|
|
83
|
-
...Css_1.Css.
|
|
83
|
+
...Css_1.Css.blue700.$,
|
|
84
84
|
// Apply our default transitions
|
|
85
85
|
...Css_1.Css.transition.$,
|
|
86
86
|
};
|
|
@@ -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.
|
|
110
|
+
...Css_1.Css.blue900.bBlue900.$,
|
|
111
111
|
};
|
|
112
112
|
exports.radioDisabled = {
|
|
113
113
|
...Css_1.Css.cursorNotAllowed.gray100.$,
|
|
@@ -120,7 +120,7 @@ function attachTributeJs(mergeTags, editorElement) {
|
|
|
120
120
|
noMatchTemplate: () => `<span style:"visibility: hidden;"></span>`,
|
|
121
121
|
// According to the Tribute Types, `original.value` should always be present.
|
|
122
122
|
// However, we have received errors in DataDog for "Cannot read properties of undefined (reading 'original')", so we're adding some checks.
|
|
123
|
-
selectTemplate: (item) => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.original) === null || _a === void 0 ? void 0 : _a.value) ? `<span style="color: ${Css_1.Palette.
|
|
123
|
+
selectTemplate: (item) => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.original) === null || _a === void 0 ? void 0 : _a.value) ? `<span style="color: ${Css_1.Palette.Blue700};">@${item.original.value}</span>` : ""; },
|
|
124
124
|
values,
|
|
125
125
|
});
|
|
126
126
|
// In dev mode, this fails because jsdom doesn't support contentEditable. Note that
|
|
@@ -138,7 +138,7 @@ const trixCssOverrides = {
|
|
|
138
138
|
// Some basic copy/paste from TextFieldBase
|
|
139
139
|
"& trix-editor": Css_1.Css.bgWhite.sm.gray900.bn.p1.$,
|
|
140
140
|
// Highlight on focus
|
|
141
|
-
"&:focus-within": Css_1.Css.
|
|
141
|
+
"&:focus-within": Css_1.Css.bBlue700.$,
|
|
142
142
|
"& trix-toolbar": Css_1.Css.m1.$,
|
|
143
143
|
// Make the buttons closer to ours
|
|
144
144
|
"& .trix-button:not(:first-of-type)": Css_1.Css.bn.$,
|
|
@@ -163,7 +163,7 @@ const trixCssOverrides = {
|
|
|
163
163
|
// Style the @ mention box
|
|
164
164
|
const tributeOverrides = {
|
|
165
165
|
".tribute-container": Css_1.Css.add({ minWidth: "300px" }).$,
|
|
166
|
-
".tribute-container > ul": Css_1.Css.sm.bgWhite.ba.br4.
|
|
166
|
+
".tribute-container > ul": Css_1.Css.sm.bgWhite.ba.br4.bBlue700.overflowHidden.$,
|
|
167
167
|
};
|
|
168
168
|
function extractIdsFromMentions(mergeTags, content) {
|
|
169
169
|
return mergeTags.filter((tag) => content.includes(`@${tag}`));
|
package/dist/inputs/Switch.js
CHANGED
|
@@ -34,13 +34,13 @@ function Switch(props) {
|
|
|
34
34
|
...(isHovered && exports.switchHoverStyles),
|
|
35
35
|
...(isKeyboardFocus && exports.switchFocusStyles),
|
|
36
36
|
...(isDisabled && Css_1.Css.bgGray300.$),
|
|
37
|
-
...(isSelected && Css_1.Css.
|
|
37
|
+
...(isSelected && Css_1.Css.bgBlue700.$),
|
|
38
38
|
...(isSelected && isHovered && exports.switchSelectedHoverStyles),
|
|
39
39
|
}, children: (0, jsx_runtime_1.jsx)("div", { css: {
|
|
40
40
|
...switchCircleDefaultStyles(compact),
|
|
41
41
|
...(isDisabled && Css_1.Css.bgGray100.$),
|
|
42
42
|
...(isSelected && switchCircleSelectedStyles(compact)),
|
|
43
|
-
}, children: withIcon && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: isSelected ? "check" : "x", color: isSelected ? Css_1.Palette.
|
|
43
|
+
}, children: withIcon && ((0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: isSelected ? "check" : "x", color: isSelected ? Css_1.Palette.Blue700 : Css_1.Palette.Gray400 })) }) }), labelStyle === "inline" && ((0, jsx_runtime_1.jsx)("span", { css: {
|
|
44
44
|
// LineHeight is conditionally applied to handle compact version text alignment
|
|
45
45
|
...Css_1.Css.if(compact).add("lineHeight", "1").$,
|
|
46
46
|
}, children: label })), (0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: (0, jsx_runtime_1.jsx)("input", { ref: ref, ...inputProps, ...focusProps }) })] })),
|
|
@@ -54,7 +54,7 @@ const circleDiameter = (isCompact) => (isCompact ? 12 : 20);
|
|
|
54
54
|
// Switcher/Toggle element styles
|
|
55
55
|
exports.switchHoverStyles = Css_1.Css.bgGray400.$;
|
|
56
56
|
exports.switchFocusStyles = Css_1.Css.bshFocus.$;
|
|
57
|
-
exports.switchSelectedHoverStyles = Css_1.Css.
|
|
57
|
+
exports.switchSelectedHoverStyles = Css_1.Css.bgBlue900.$;
|
|
58
58
|
// Circle inside Switcher/Toggle element styles
|
|
59
59
|
const switchCircleDefaultStyles = (isCompact) => ({
|
|
60
60
|
...Css_1.Css.wPx(circleDiameter(isCompact))
|
|
@@ -72,7 +72,7 @@ function TextFieldBase(props) {
|
|
|
72
72
|
...(contrast && Css_1.Css.addIn("&::selection", Css_1.Css.bgGray800.$).$),
|
|
73
73
|
},
|
|
74
74
|
hover: Css_1.Css.bgColor(hoverBgColor).if(contrast).bGray600.$,
|
|
75
|
-
focus: Css_1.Css.
|
|
75
|
+
focus: Css_1.Css.bBlue700.if(contrast).bBlue500.$,
|
|
76
76
|
disabled: visuallyDisabled
|
|
77
77
|
? Css_1.Css.cursorNotAllowed.gray600.bgColor(disabledBgColor).if(contrast).gray500.$
|
|
78
78
|
: Css_1.Css.cursorNotAllowed.$,
|
|
@@ -41,7 +41,7 @@ function ToggleButton(props) {
|
|
|
41
41
|
.selectNone.$,
|
|
42
42
|
...(isHovered && exports.toggleHoverStyles),
|
|
43
43
|
...(isPressed && exports.togglePressStyles),
|
|
44
|
-
...(isSelected && !isDisabled && Css_1.Css.
|
|
44
|
+
...(isSelected && !isDisabled && Css_1.Css.blue700.$),
|
|
45
45
|
...(isKeyboardFocus && exports.toggleFocusStyles),
|
|
46
46
|
...(isDisabled && Css_1.Css.gray300.cursorNotAllowed.$),
|
|
47
47
|
},
|
|
@@ -31,8 +31,8 @@ function ToggleChip(props) {
|
|
|
31
31
|
...Css_1.Css.relative.dib.br16.sm.px1.cursorPointer.pyPx(4).bgGray200.if(isDisabled).cursorNotAllowed.gray600.pr1.$,
|
|
32
32
|
...(isSelected
|
|
33
33
|
? {
|
|
34
|
-
...Css_1.Css.white.
|
|
35
|
-
":hover:not([data-disabled='true'])": Css_1.Css.
|
|
34
|
+
...Css_1.Css.white.bgBlue700.$,
|
|
35
|
+
":hover:not([data-disabled='true'])": Css_1.Css.bgBlue800.$,
|
|
36
36
|
}
|
|
37
37
|
: { ":hover:not([data-disabled='true'])": Css_1.Css.bgGray300.$ }),
|
|
38
38
|
...(isFocusVisible ? Css_1.Css.bshFocus.$ : {}),
|
|
@@ -30,7 +30,7 @@ function TreeOption(props) {
|
|
|
30
30
|
item: Css_1.Css.gray900.if(contrast).white.$,
|
|
31
31
|
hover: Css_1.Css.bgGray100.if(contrast).bgGray600.$,
|
|
32
32
|
disabled: Css_1.Css.cursorNotAllowed.gray400.if(contrast).gray500.$,
|
|
33
|
-
focus: Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${!contrast ? Css_1.Palette.
|
|
33
|
+
focus: Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${!contrast ? Css_1.Palette.Blue700 : Css_1.Palette.Blue500}`).$,
|
|
34
34
|
};
|
|
35
35
|
return ((0, jsx_runtime_1.jsxs)("li", { ...hoverProps, css: {
|
|
36
36
|
...Css_1.Css.df.aic.jcsb.gap1.pl2.mh("42px").outline0.cursorPointer.sm.plPx(16 + level * 8).$,
|
|
@@ -18,7 +18,7 @@ function ComboBoxInput(props) {
|
|
|
18
18
|
const showNumSelection = isMultiSelect && state.selectionManager.selectedKeys.size > 1;
|
|
19
19
|
// For MultiSelect only show the `fieldDecoration` when input is not in focus.
|
|
20
20
|
const showFieldDecoration = (!isMultiSelect || (isMultiSelect && !isFocused)) && fieldDecoration && selectedOptions.length === 1;
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(TextFieldBase_1.TextFieldBase, { ...otherProps, errorMsg: errorMsg, contrast: contrast, xss: otherProps.labelStyle !== "inline" && !inputProps.readOnly ? Css_1.Css.fw5.$ : {}, startAdornment: (showNumSelection && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.wPx(16).hPx(16).fs0.br100.
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(TextFieldBase_1.TextFieldBase, { ...otherProps, errorMsg: errorMsg, contrast: contrast, xss: otherProps.labelStyle !== "inline" && !inputProps.readOnly ? Css_1.Css.fw5.$ : {}, startAdornment: (showNumSelection && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.wPx(16).hPx(16).fs0.br100.bgBlue700.white.tinySb.df.aic.jcc.$, "data-testid": "selectedOptionsCount", children: state.selectionManager.selectedKeys.size }))) ||
|
|
22
22
|
(showFieldDecoration && fieldDecoration(selectedOptions[0])), endAdornment: !inputProps.readOnly && ((0, jsx_runtime_1.jsx)("button", { ...buttonProps, disabled: inputProps.disabled, ref: buttonRef, css: {
|
|
23
23
|
...Css_1.Css.br4.outline0.gray700.if(contrast).gray400.$,
|
|
24
24
|
...(inputProps.disabled ? Css_1.Css.cursorNotAllowed.gray400.if(contrast).gray600.$ : {}),
|
|
@@ -17,7 +17,7 @@ function Option(props) {
|
|
|
17
17
|
item: Css_1.Css.gray900.if(contrast).white.$,
|
|
18
18
|
hover: Css_1.Css.bgGray100.if(contrast).bgGray600.$,
|
|
19
19
|
disabled: Css_1.Css.cursorNotAllowed.gray400.if(contrast).gray500.$,
|
|
20
|
-
focus: Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${!contrast ? Css_1.Palette.
|
|
20
|
+
focus: Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${!contrast ? Css_1.Palette.Blue700 : Css_1.Palette.Blue500}`).$,
|
|
21
21
|
};
|
|
22
22
|
// Get props for the option element.
|
|
23
23
|
// Prevent options from receiving browser focus via shouldUseVirtualFocus.
|
|
@@ -36,7 +36,7 @@ function Option(props) {
|
|
|
36
36
|
}, children: [item.rendered, isSelected && ((0, jsx_runtime_1.jsx)("span", { css: Css_1.Css.fs0.$, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { icon: "check", color: !contrast
|
|
37
37
|
? isDisabled
|
|
38
38
|
? Css_1.Palette.Gray400
|
|
39
|
-
: Css_1.Palette.
|
|
39
|
+
: Css_1.Palette.Blue700
|
|
40
40
|
: isDisabled
|
|
41
41
|
? Css_1.Palette.Gray500
|
|
42
42
|
: Css_1.Palette.White }) }))] })),
|