@thecb/components 10.12.2-beta.0 → 10.12.2-beta.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.
- package/dist/index.cjs.js +36 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +36 -20
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.js +8 -1
- package/src/components/atoms/checkbox/Checkbox.stories.js +17 -13
- package/src/components/atoms/checkbox/Checkbox.theme.js +6 -2
- package/src/components/atoms/icons/PersonIcon.js +3 -3
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +11 -5
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +13 -5
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.theme.js +7 -3
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +11 -5
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +1 -2
package/dist/index.esm.js
CHANGED
|
@@ -18852,9 +18852,9 @@ var AgencyIcon = function AgencyIcon(_ref) {
|
|
|
18852
18852
|
var _excluded$m = ["width", "height", "color"];
|
|
18853
18853
|
var PersonIcon = function PersonIcon(_ref) {
|
|
18854
18854
|
var _ref$width = _ref.width,
|
|
18855
|
-
width = _ref$width === void 0 ? "
|
|
18855
|
+
width = _ref$width === void 0 ? "20" : _ref$width,
|
|
18856
18856
|
_ref$height = _ref.height,
|
|
18857
|
-
height = _ref$height === void 0 ? "
|
|
18857
|
+
height = _ref$height === void 0 ? "21" : _ref$height,
|
|
18858
18858
|
_ref$color = _ref.color,
|
|
18859
18859
|
color = _ref$color === void 0 ? CHARADE_GREY : _ref$color,
|
|
18860
18860
|
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
@@ -18867,7 +18867,7 @@ var PersonIcon = function PersonIcon(_ref) {
|
|
|
18867
18867
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
18868
18868
|
fillRule: "evenodd",
|
|
18869
18869
|
clipRule: "evenodd",
|
|
18870
|
-
d: "
|
|
18870
|
+
d: "M15.25 4.8125H4.75C4.50838 4.8125 4.3125 5.00838 4.3125 5.25V15.75C4.3125 15.9916 4.50838 16.1875 4.75 16.1875H5.625V14.7778C5.625 12.8985 7.02411 11.375 8.75 11.375H11.25C12.9759 11.375 14.375 12.8985 14.375 14.7778V16.1875H15.25C15.4916 16.1875 15.6875 15.9916 15.6875 15.75V5.25C15.6875 5.00838 15.4916 4.8125 15.25 4.8125ZM4.75 17.5H5.625H14.375H15.25C16.2165 17.5 17 16.7165 17 15.75V5.25C17 4.2835 16.2165 3.5 15.25 3.5H4.75C3.7835 3.5 3 4.2835 3 5.25V15.75C3 16.7165 3.7835 17.5 4.75 17.5ZM10 10.5C11.2081 10.5 12.1875 9.52062 12.1875 8.3125C12.1875 7.10438 11.2081 6.125 10 6.125C8.79188 6.125 7.8125 7.10438 7.8125 8.3125C7.8125 9.52062 8.79188 10.5 10 10.5Z",
|
|
18871
18871
|
fill: color
|
|
18872
18872
|
}));
|
|
18873
18873
|
};
|
|
@@ -23197,7 +23197,7 @@ var errorStyles = {
|
|
|
23197
23197
|
"default": "border: 1px solid ".concat(RED, ";")
|
|
23198
23198
|
};
|
|
23199
23199
|
var focusedStyles = {
|
|
23200
|
-
"default": "
|
|
23200
|
+
"default": "\n outline: 3px solid ".concat(ROYAL_BLUE, "; \n outline-offset: 3px;\n ")
|
|
23201
23201
|
};
|
|
23202
23202
|
var disabledCheckedStyles = {
|
|
23203
23203
|
"default": "\n background: #6d717e;\n border: 1px solid #6d717e;\n"
|
|
@@ -23243,7 +23243,7 @@ var CheckboxContainer = styled.span.withConfig({
|
|
|
23243
23243
|
var CheckboxLabelContainer = styled.label.withConfig({
|
|
23244
23244
|
displayName: "Checkbox__CheckboxLabelContainer",
|
|
23245
23245
|
componentId: "sc-36kqbv-1"
|
|
23246
|
-
})(["display:flex;align-items:center;column-gap:1rem;"]);
|
|
23246
|
+
})(["display:flex;align-items:center;column-gap:1rem;cursor:pointer;"]);
|
|
23247
23247
|
var CheckboxIcon = styled.svg.withConfig({
|
|
23248
23248
|
displayName: "Checkbox__CheckboxIcon",
|
|
23249
23249
|
componentId: "sc-36kqbv-2"
|
|
@@ -23333,7 +23333,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
23333
23333
|
},
|
|
23334
23334
|
hiddenStyles: hidden,
|
|
23335
23335
|
background: themeValues.backgroundColor,
|
|
23336
|
-
extraStyles: "outline:
|
|
23336
|
+
extraStyles: "\n :focus {\n outline: 0;\n }\n ".concat(extraStyles, "; \n margin: ").concat(checkboxMargin, ";\n ")
|
|
23337
23337
|
}, rest), /*#__PURE__*/React.createElement(CheckboxLabelContainer, {
|
|
23338
23338
|
"data-qa": dataQa
|
|
23339
23339
|
}, /*#__PURE__*/React.createElement(CheckboxContainer, {
|
|
@@ -50510,11 +50510,15 @@ var PopupMenu = function PopupMenu(_ref) {
|
|
|
50510
50510
|
};
|
|
50511
50511
|
var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$Z);
|
|
50512
50512
|
|
|
50513
|
-
var primaryColor$1 =
|
|
50513
|
+
var primaryColor$1 = WHITE;
|
|
50514
|
+
var primaryHoverColor = INFO_BLUE;
|
|
50514
50515
|
var secondaryColor = MATISSE_BLUE;
|
|
50516
|
+
var secondaryHoverColor = "#115D7E";
|
|
50515
50517
|
var fallbackValues$_ = {
|
|
50516
50518
|
primaryColor: primaryColor$1,
|
|
50517
|
-
|
|
50519
|
+
primaryHoverColor: primaryHoverColor,
|
|
50520
|
+
secondaryColor: secondaryColor,
|
|
50521
|
+
secondaryHoverColor: secondaryHoverColor
|
|
50518
50522
|
};
|
|
50519
50523
|
|
|
50520
50524
|
var StyledFilterContainer = styled(Box).withConfig({
|
|
@@ -50539,11 +50543,15 @@ var FilterButton = styled(ButtonWithAction).withConfig({
|
|
|
50539
50543
|
displayName: "MultipleSelectFilterstyled__FilterButton",
|
|
50540
50544
|
componentId: "sc-126xgc2-2"
|
|
50541
50545
|
})(["min-width:auto;min-height:2.3125rem;margin:0;padding:0.5rem;border-radius:0.25rem;box-shadow:0px 1px 2px 0px rgba(41,42,51,0.1);", " ", ""], function (_ref) {
|
|
50542
|
-
var
|
|
50543
|
-
|
|
50546
|
+
var opened = _ref.opened,
|
|
50547
|
+
textColor = _ref.textColor,
|
|
50548
|
+
textHoverColor = _ref.textHoverColor;
|
|
50549
|
+
return "\n color: ".concat(opened ? textHoverColor : textColor, ";\n :hover,\n :active,\n :focus {\n color: ").concat(textHoverColor, ";\n > * {\n color: ").concat(textHoverColor, ";\n }\n }\n ");
|
|
50544
50550
|
}, function (_ref2) {
|
|
50545
|
-
var
|
|
50546
|
-
|
|
50551
|
+
var opened = _ref2.opened,
|
|
50552
|
+
backgroundColor = _ref2.backgroundColor,
|
|
50553
|
+
backgroundHoverColor = _ref2.backgroundHoverColor;
|
|
50554
|
+
return "\n background-color: ".concat(opened ? backgroundHoverColor : backgroundColor, "; \n :hover,\n :active,\n :focus {\n background-color: ").concat(backgroundHoverColor, ";\n }\n ");
|
|
50547
50555
|
});
|
|
50548
50556
|
var StyledFilterButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
50549
50557
|
return /*#__PURE__*/React.createElement(FilterButton, _extends({
|
|
@@ -50622,7 +50630,9 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50622
50630
|
action = _ref$action === void 0 ? noop$1 : _ref$action,
|
|
50623
50631
|
opened = _ref.opened,
|
|
50624
50632
|
backgroundColor = _ref.backgroundColor,
|
|
50625
|
-
|
|
50633
|
+
backgroundHoverColor = _ref.backgroundHoverColor,
|
|
50634
|
+
textColor = _ref.textColor,
|
|
50635
|
+
textHoverColor = _ref.textHoverColor,
|
|
50626
50636
|
name = _ref.name,
|
|
50627
50637
|
filterDropdownID = _ref.filterDropdownID,
|
|
50628
50638
|
_ref$hasIcon = _ref.hasIcon,
|
|
@@ -50642,6 +50652,10 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50642
50652
|
"aria-expanded": opened,
|
|
50643
50653
|
"aria-controls": filterDropdownID,
|
|
50644
50654
|
backgroundColor: backgroundColor,
|
|
50655
|
+
backgroundHoverColor: backgroundHoverColor,
|
|
50656
|
+
textColor: textColor,
|
|
50657
|
+
textHoverColor: textHoverColor,
|
|
50658
|
+
opened: opened,
|
|
50645
50659
|
dataQa: "".concat(name, "-filter-button"),
|
|
50646
50660
|
extraStyles: extraStyles,
|
|
50647
50661
|
"aria-label": "".concat(filterLabel, " Filter: ").concat(btnTextFilterDescription, " ").concat(btnTextItemsDescription),
|
|
@@ -50654,7 +50668,7 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50654
50668
|
},
|
|
50655
50669
|
intrinsic: true
|
|
50656
50670
|
}, hasIcon && /*#__PURE__*/React.createElement(Icon, {
|
|
50657
|
-
color:
|
|
50671
|
+
color: opened ? textHoverColor : textColor
|
|
50658
50672
|
}), /*#__PURE__*/React.createElement(Center, {
|
|
50659
50673
|
as: "span",
|
|
50660
50674
|
style: {
|
|
@@ -50665,13 +50679,13 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50665
50679
|
intrinsic: true
|
|
50666
50680
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
50667
50681
|
variant: "pS",
|
|
50668
|
-
color:
|
|
50682
|
+
color: opened ? textHoverColor : textColor,
|
|
50669
50683
|
extraStyles: "\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n ".concat(truncateBtnTextWidth && "max-width:" + truncateBtnTextWidth, "\n ")
|
|
50670
50684
|
}, btnTextFilterDescription), /*#__PURE__*/React.createElement(Text$1, {
|
|
50671
|
-
color:
|
|
50685
|
+
color: opened ? textHoverColor : textColor,
|
|
50672
50686
|
variant: "pS"
|
|
50673
50687
|
}, btnTextItemsDescription)), /*#__PURE__*/React.createElement(DropdownIconV2, {
|
|
50674
|
-
color:
|
|
50688
|
+
color: opened ? textHoverColor : textColor
|
|
50675
50689
|
})));
|
|
50676
50690
|
});
|
|
50677
50691
|
|
|
@@ -50786,7 +50800,7 @@ var FilterableListItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50786
50800
|
},
|
|
50787
50801
|
textExtraStyles: "font-size: 0.875rem; margin: 0;",
|
|
50788
50802
|
disabled: disabled,
|
|
50789
|
-
extraStyles: "\n padding: 0.375rem 0.625rem; \n margin: 0;\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.
|
|
50803
|
+
extraStyles: "\n padding: 0.375rem 0.625rem; \n margin: 0;\n :hover,\n :active,\n :focus {\n background-color: ".concat(themeValues.primaryHoverColor, ";\n }\n ").concat(showDivider && dividerStyles, "\n ").concat(extraStyles, "\n "),
|
|
50790
50804
|
checkboxMargin: showDivider ? "0 0 1rem" : "0",
|
|
50791
50805
|
hasIconOverride: true,
|
|
50792
50806
|
icon: CheckboxCheckmarkIcon,
|
|
@@ -51094,8 +51108,10 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
51094
51108
|
setOpened(!opened);
|
|
51095
51109
|
},
|
|
51096
51110
|
opened: opened,
|
|
51097
|
-
|
|
51098
|
-
|
|
51111
|
+
backgroundHoverColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? themeValues.secondaryHoverColor : themeValues.primaryHoverColor,
|
|
51112
|
+
backgroundColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? themeValues.secondaryColor : themeValues.primaryColor,
|
|
51113
|
+
textColor: appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length ? WHITE : CHARADE_GREY,
|
|
51114
|
+
textHoverColor: opened && !(appliedOptions !== null && appliedOptions !== void 0 && appliedOptions.length) ? CHARADE_GREY : WHITE,
|
|
51099
51115
|
name: name,
|
|
51100
51116
|
filterDropdownID: filterDropdownID,
|
|
51101
51117
|
hasIcon: hasIcon,
|