@thecb/components 5.4.4 → 5.6.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/dist/index.cjs.js +31 -13
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +31 -13
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/breadcrumb/Breadcrumb.js +6 -2
- package/src/components/atoms/layouts/Reel.js +9 -0
- package/src/components/atoms/layouts/Reel.styled.js +11 -0
- package/src/components/atoms/processing-fee/ProcessingFee.js +2 -2
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +4 -4
- package/src/components/molecules/editable-list/EditableList.js +2 -2
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +2 -1
- package/src/util/general.js +2 -0
package/dist/index.cjs.js
CHANGED
|
@@ -6044,6 +6044,9 @@ var displayCurrency = function displayCurrency(cents) {
|
|
|
6044
6044
|
var convertCentsToMoneyInt = function convertCentsToMoneyInt(n) {
|
|
6045
6045
|
return (n / 100).toFixed(0);
|
|
6046
6046
|
};
|
|
6047
|
+
var formatPercent = function formatPercent(decimal) {
|
|
6048
|
+
return Number.parseFloat(decimal).toFixed(2);
|
|
6049
|
+
};
|
|
6047
6050
|
|
|
6048
6051
|
var createUniqueId = function createUniqueId() {
|
|
6049
6052
|
return "_" + Math.random().toString(36).substr(2, 9);
|
|
@@ -6118,6 +6121,7 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6118
6121
|
noop: noop,
|
|
6119
6122
|
displayCurrency: displayCurrency,
|
|
6120
6123
|
convertCentsToMoneyInt: convertCentsToMoneyInt,
|
|
6124
|
+
formatPercent: formatPercent,
|
|
6121
6125
|
safeChildren: safeChildren,
|
|
6122
6126
|
generateClickHandler: generateClickHandler,
|
|
6123
6127
|
checkCardBrand: checkCardBrand,
|
|
@@ -12146,7 +12150,7 @@ var Motion = function Motion(_ref) {
|
|
|
12146
12150
|
var ReelStyled = styled__default.div.withConfig({
|
|
12147
12151
|
displayName: "Reelstyled__ReelStyled",
|
|
12148
12152
|
componentId: "sc-bhf05j-0"
|
|
12149
|
-
})(["display:flex;overflow-x:", ";padding:", ";height:", ";justify-content:", ";> * + *{margin-left:", ";}> *{flex:0 0 ", ";}"], function (_ref) {
|
|
12153
|
+
})(["display:flex;overflow-x:", ";padding:", ";height:", ";justify-content:", ";> * + *{margin-left:", ";}> *{flex:0 0 ", ";}", ""], function (_ref) {
|
|
12150
12154
|
var disableScroll = _ref.disableScroll;
|
|
12151
12155
|
return disableScroll ? "hidden" : "auto";
|
|
12152
12156
|
}, function (_ref2) {
|
|
@@ -12164,9 +12168,18 @@ var ReelStyled = styled__default.div.withConfig({
|
|
|
12164
12168
|
}, function (_ref6) {
|
|
12165
12169
|
var childWidth = _ref6.childWidth;
|
|
12166
12170
|
return childWidth;
|
|
12171
|
+
}, function (_ref7) {
|
|
12172
|
+
var useOrderedList = _ref7.useOrderedList,
|
|
12173
|
+
useUnorderedList = _ref7.useUnorderedList;
|
|
12174
|
+
return useOrderedList || useUnorderedList ? "\n margin: 0;\n margin-block-start: 0;\n margin-block-end: 0;\n padding-inline-start: 0;\n list-style-type: none;\n " : "";
|
|
12167
12175
|
});
|
|
12168
12176
|
|
|
12169
12177
|
var _excluded$g = ["childGap", "height", "childWidth", "padding", "justifyContent", "disableScroll", "useOrderedList", "useUnorderedList", "children"];
|
|
12178
|
+
/*
|
|
12179
|
+
Safari has a bug where it refuses to recognize <ul /> tags as lists when list-style: none is used
|
|
12180
|
+
This affects the apple voice over (mainly used on iOS devices)
|
|
12181
|
+
The solution is to explicitly include "role=List"
|
|
12182
|
+
*/
|
|
12170
12183
|
|
|
12171
12184
|
var Reel = function Reel(_ref) {
|
|
12172
12185
|
var _ref$childGap = _ref.childGap,
|
|
@@ -12196,8 +12209,12 @@ var Reel = function Reel(_ref) {
|
|
|
12196
12209
|
padding: padding,
|
|
12197
12210
|
justifyContent: justifyContent,
|
|
12198
12211
|
disableScroll: disableScroll,
|
|
12199
|
-
as: elementType
|
|
12200
|
-
|
|
12212
|
+
as: elementType,
|
|
12213
|
+
useOrderedList: useOrderedList,
|
|
12214
|
+
useUnorderedList: useUnorderedList
|
|
12215
|
+
}, rest, {
|
|
12216
|
+
role: useOrderedList || useUnorderedList ? "list" : "section"
|
|
12217
|
+
}), safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
12201
12218
|
};
|
|
12202
12219
|
|
|
12203
12220
|
/*
|
|
@@ -17001,7 +17018,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
17001
17018
|
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
17002
17019
|
key: "breadcrumb-".concat(linkText)
|
|
17003
17020
|
}, /*#__PURE__*/React__default.createElement(InternalLink, {
|
|
17004
|
-
"aria-current": index === breadcrumbsList.length - 1
|
|
17021
|
+
"aria-current": index === breadcrumbsList.length - 1 ? "location" : "",
|
|
17005
17022
|
to: linkDestination,
|
|
17006
17023
|
active: isActive.toString(),
|
|
17007
17024
|
color: themeValues.color,
|
|
@@ -17010,7 +17027,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
17010
17027
|
fontWeight: themeValues.fontWeight,
|
|
17011
17028
|
margin: themeValues.margin,
|
|
17012
17029
|
extraStyles: "\n text-transform: uppercase;\n ".concat(isActive.toString() === "true" && "pointer-events: none;\n color: ".concat(themeValues.activeBreadcrumbColor, ";\n "), "\n &:first-child {\n margin-left: 0;\n }\n &:active {\n color: ").concat(themeValues.activeColor, "; \n }")
|
|
17013
|
-
}, linkText), index < breadcrumbsList.length - 1
|
|
17030
|
+
}, linkText), index < breadcrumbsList.length - 1 ? /*#__PURE__*/React__default.createElement(IconChevron, null) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
|
|
17014
17031
|
})));
|
|
17015
17032
|
};
|
|
17016
17033
|
|
|
@@ -22154,7 +22171,7 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
22154
22171
|
hiddenStyles: hide
|
|
22155
22172
|
}, /*#__PURE__*/React__default.createElement(Alert$1, {
|
|
22156
22173
|
heading: "Processing Fee",
|
|
22157
|
-
text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(feeValue * 100, "%"), " ").concat(ifElse(isNil, always(""), function (a) {
|
|
22174
|
+
text: "There is a processing fee of ".concat(feeType === "FLAT" ? "".concat(displayCurrency(feeValue)) : "".concat(formatPercent(feeValue * 100), "%"), " ").concat(ifElse(isNil, always(""), function (a) {
|
|
22158
22175
|
return "with a minimum of ".concat(displayCurrency(a), " ");
|
|
22159
22176
|
})(feeMinimum), "on all ").concat(feeName, " payments."),
|
|
22160
22177
|
variant: "info",
|
|
@@ -35289,11 +35306,11 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
35289
35306
|
}, customTitle ? /*#__PURE__*/React__default.createElement(Box, {
|
|
35290
35307
|
width: "calc(100% - 36px)",
|
|
35291
35308
|
padding: "0px"
|
|
35292
|
-
}, title) : /*#__PURE__*/React__default.createElement(
|
|
35293
|
-
variant: "h6",
|
|
35309
|
+
}, title) : /*#__PURE__*/React__default.createElement(Title$1, {
|
|
35294
35310
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
35295
35311
|
color: themeValues.titleColor,
|
|
35296
|
-
as: "h6"
|
|
35312
|
+
as: "h6",
|
|
35313
|
+
variant: "small"
|
|
35297
35314
|
}, title), /*#__PURE__*/React__default.createElement(Motion, {
|
|
35298
35315
|
variants: icon,
|
|
35299
35316
|
extraStyles: "display: flex; align-items: center;"
|
|
@@ -35483,7 +35500,7 @@ var EditableList = function EditableList(_ref) {
|
|
|
35483
35500
|
return removeItem(item.id);
|
|
35484
35501
|
},
|
|
35485
35502
|
extraStyles: "min-width: 0;",
|
|
35486
|
-
"aria-label": "Remove ".concat(itemName
|
|
35503
|
+
"aria-label": "Remove ".concat(itemName)
|
|
35487
35504
|
})), canEdit && /*#__PURE__*/React__default.createElement(Box, {
|
|
35488
35505
|
padding: "0 0.5rem",
|
|
35489
35506
|
border: "2px solid transparent",
|
|
@@ -35497,7 +35514,7 @@ var EditableList = function EditableList(_ref) {
|
|
|
35497
35514
|
return editItem(item.id);
|
|
35498
35515
|
},
|
|
35499
35516
|
extraStyles: "min-width: 0;",
|
|
35500
|
-
"aria-label": "Edit ".concat(itemName
|
|
35517
|
+
"aria-label": "Edit ".concat(itemName)
|
|
35501
35518
|
}))));
|
|
35502
35519
|
})), canAdd && (!maxItems || items.length < maxItems) && /*#__PURE__*/React__default.createElement(Box, {
|
|
35503
35520
|
padding: items.length === 0 ? "0" : "1rem 0 0"
|
|
@@ -35804,8 +35821,9 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
35804
35821
|
borderSize: "3px",
|
|
35805
35822
|
borderColor: highlightIndex == i ? themeValues.textColor : "transparent",
|
|
35806
35823
|
borderWidthOverride: "0 0 3px 0",
|
|
35807
|
-
extraStyles: "text-align: center;",
|
|
35808
|
-
as: "li"
|
|
35824
|
+
extraStyles: "text-align: center; display: block;",
|
|
35825
|
+
as: "li",
|
|
35826
|
+
"aria-current": highlightIndex == i ? "step" : ""
|
|
35809
35827
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
35810
35828
|
variant: "p",
|
|
35811
35829
|
textAlign: "center",
|