@ballistix.digital/react-components 0.4.44 → 0.4.46
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.d.ts +1 -1
- package/dist/index.esm.js +23 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -446,7 +446,7 @@ var styles$g = {
|
|
|
446
446
|
};
|
|
447
447
|
|
|
448
448
|
var Container$3 = function (props) {
|
|
449
|
-
var children = props.children, label = props.label, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'left' : _b, stylesOverrides = props.styles;
|
|
449
|
+
var children = props.children, label = props.label, _a = props.type, type = _a === void 0 ? 'button' : _a, _b = props.direction, direction = _b === void 0 ? 'bottom-left' : _b, stylesOverrides = props.styles;
|
|
450
450
|
var handleGenerateStyle = function () {
|
|
451
451
|
var result = deepCopyObject(styles$f.base);
|
|
452
452
|
var keys = calculateNestedKeys(styles$f.base);
|
|
@@ -472,18 +472,26 @@ var base$e = {
|
|
|
472
472
|
};
|
|
473
473
|
var button = {};
|
|
474
474
|
var compact = {};
|
|
475
|
-
var
|
|
475
|
+
var bottomLeft = {
|
|
476
476
|
items: 'origin-top-right right-0',
|
|
477
477
|
};
|
|
478
|
-
var
|
|
478
|
+
var bottomRight = {
|
|
479
479
|
items: 'origin-top-left left-0',
|
|
480
480
|
};
|
|
481
|
+
var topLeft = {
|
|
482
|
+
items: 'origin-bottom-right right-0 bottom-0',
|
|
483
|
+
};
|
|
484
|
+
var topRight = {
|
|
485
|
+
items: 'origin-bottom-left left-0 bottom-0',
|
|
486
|
+
};
|
|
481
487
|
var styles$f = {
|
|
482
488
|
base: base$e,
|
|
483
489
|
button: button,
|
|
484
490
|
compact: compact,
|
|
485
|
-
left:
|
|
486
|
-
right:
|
|
491
|
+
'bottom-left': bottomLeft,
|
|
492
|
+
'bottom-right': bottomRight,
|
|
493
|
+
'top-left': topLeft,
|
|
494
|
+
'top-right': topRight,
|
|
487
495
|
};
|
|
488
496
|
|
|
489
497
|
var IconElement = function (props) {
|
|
@@ -17462,7 +17470,16 @@ var List$1 = function (props) {
|
|
|
17462
17470
|
setActive && setActive(tab === null || tab === void 0 ? void 0 : tab.props.accessor);
|
|
17463
17471
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17464
17472
|
}, []);
|
|
17465
|
-
|
|
17473
|
+
var handleCalculateActiveAccessor = function (items) {
|
|
17474
|
+
var _a;
|
|
17475
|
+
var result = active;
|
|
17476
|
+
var currentItem = (_a = n.Children.map(children, function (child) { return (__assign({}, child.props)); })) === null || _a === void 0 ? void 0 : _a.find(function (tab) { return tab === null || tab === void 0 ? void 0 : tab.isCurrent; });
|
|
17477
|
+
if (currentItem === null || currentItem === void 0 ? void 0 : currentItem.href) {
|
|
17478
|
+
result = currentItem === null || currentItem === void 0 ? void 0 : currentItem.accessor;
|
|
17479
|
+
}
|
|
17480
|
+
return result;
|
|
17481
|
+
};
|
|
17482
|
+
return (jsxRuntime.jsxs("div", __assign({ className: styles.list.container }, { children: [jsxRuntime.jsxs("div", __assign({ className: styles.list.head }, { children: [jsxRuntime.jsx("label", __assign({ htmlFor: name, className: styles.list.label }, { children: "Select a tab" })), jsxRuntime.jsx("select", __assign({ id: name, name: name, value: handleCalculateActiveAccessor(), className: styles.list.select, onChange: handleChangeSelect }, { children: n.Children.map(children, function (child) {
|
|
17466
17483
|
var _a;
|
|
17467
17484
|
return (jsxRuntime.jsx("option", __assign({ value: child.props.accessor }, { children: child.props.children }), (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.accessor));
|
|
17468
17485
|
}) }))] })), jsxRuntime.jsx("div", __assign({ className: styles.list.body }, { children: jsxRuntime.jsx("nav", __assign({ className: styles.list.navigation }, { children: children })) }))] })));
|