@thecb/components 7.0.2-beta.1 → 7.0.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 +15 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +15 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/nav-tabs/NavTab.js +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -231,6 +231,7 @@ declare const NavHeader: React.FC<Expand<NavHeaderProps> &
|
|
|
231
231
|
interface NavTabsProps {
|
|
232
232
|
tabsConfig: Array<{ path: string; label: string }>;
|
|
233
233
|
tabGap?: string;
|
|
234
|
+
tabMinWidth?: string;
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
declare const NavTabs: React.FC<Expand<NavTabsProps> &
|
package/dist/index.esm.js
CHANGED
|
@@ -35273,7 +35273,8 @@ var fallbackValues$y = {
|
|
|
35273
35273
|
var NavTab = function NavTab(_ref) {
|
|
35274
35274
|
var path = _ref.path,
|
|
35275
35275
|
label = _ref.label,
|
|
35276
|
-
themeValues = _ref.themeValues
|
|
35276
|
+
themeValues = _ref.themeValues,
|
|
35277
|
+
minWidth = _ref.minWidth;
|
|
35277
35278
|
|
|
35278
35279
|
var _useContext = useContext(ThemeContext),
|
|
35279
35280
|
isMobile = _useContext.isMobile;
|
|
@@ -35293,7 +35294,7 @@ var NavTab = function NavTab(_ref) {
|
|
|
35293
35294
|
}, /*#__PURE__*/React.createElement(InternalLink, {
|
|
35294
35295
|
color: isActive ? themeValues.activeColor : themeValues.linkColor,
|
|
35295
35296
|
to: path,
|
|
35296
|
-
extraStyles: "\n border-bottom: 3px solid transparent;\n font-family: ".concat(themeValues.fontFamily, ";\n text-decoration: none;\n ").concat(isActive && !isMobile ? border : "none", ";\n &:hover {\n text-decoration: none;\n color: ").concat(themeValues.activeColor, ";\n ").concat(isMobile ? "" : "".concat(border), "\n };\n padding: 1.25rem 0
|
|
35297
|
+
extraStyles: "\n border-bottom: 3px solid transparent;\n font-family: ".concat(themeValues.fontFamily, ";\n text-decoration: none;\n ").concat(isActive && !isMobile ? border : "none", ";\n &:hover {\n text-decoration: none;\n color: ").concat(themeValues.activeColor, ";\n ").concat(isMobile ? "" : "".concat(border), "\n };\n padding: 1.25rem 0;\n ")
|
|
35297
35298
|
}, label));
|
|
35298
35299
|
};
|
|
35299
35300
|
|
|
@@ -35301,13 +35302,16 @@ var NavTab$1 = themeComponent(NavTab, "NavTab", fallbackValues$y);
|
|
|
35301
35302
|
|
|
35302
35303
|
var NavTabs = function NavTabs(_ref) {
|
|
35303
35304
|
var tabsConfig = _ref.tabsConfig,
|
|
35304
|
-
tabGap = _ref.tabGap
|
|
35305
|
+
tabGap = _ref.tabGap,
|
|
35306
|
+
_ref$tabMinWidth = _ref.tabMinWidth,
|
|
35307
|
+
tabMinWidth = _ref$tabMinWidth === void 0 ? "100px" : _ref$tabMinWidth;
|
|
35305
35308
|
|
|
35306
35309
|
var _useContext = useContext(ThemeContext),
|
|
35307
35310
|
isMobile = _useContext.isMobile;
|
|
35308
35311
|
|
|
35309
35312
|
var tabs = tabsConfig.map(function (tabConfig) {
|
|
35310
35313
|
return /*#__PURE__*/React.createElement(NavTab$1, _extends({
|
|
35314
|
+
minWidth: tabMinWidth,
|
|
35311
35315
|
key: tabConfig.path
|
|
35312
35316
|
}, tabConfig));
|
|
35313
35317
|
});
|
|
@@ -43458,7 +43462,14 @@ var Modal$1 = function Modal(_ref) {
|
|
|
43458
43462
|
var _useContext = useContext(ThemeContext),
|
|
43459
43463
|
isMobile = _useContext.isMobile;
|
|
43460
43464
|
|
|
43461
|
-
|
|
43465
|
+
var modalContainerRef = useRef(null);
|
|
43466
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43467
|
+
ref: modalContainerRef
|
|
43468
|
+
}, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
43469
|
+
, {
|
|
43470
|
+
focusTrapOptions: {
|
|
43471
|
+
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
43472
|
+
},
|
|
43462
43473
|
onExit: onExit,
|
|
43463
43474
|
getApplicationNode: getApplicationNode,
|
|
43464
43475
|
titleText: modalHeaderText,
|