trepur_components 0.3.27 → 0.3.28
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/components/Button/index.js +4 -1
- package/dist/components/Carousel/index.js +1 -0
- package/dist/components/Nav/index.js +57 -12
- package/dist/components/NavItem/index.js +50 -35
- package/dist/components/Timeline/index.css +0 -2
- package/dist/components/Tubestops/index.css +30 -35
- package/package.json +4 -21
|
@@ -52,7 +52,8 @@ const buttonProps = {
|
|
|
52
52
|
target: _propTypes.default.string,
|
|
53
53
|
leftIcon: _propTypes.default.shape(_Icon.iconProps),
|
|
54
54
|
rightIcon: _propTypes.default.shape(_Icon.iconProps),
|
|
55
|
-
centerIcon: _propTypes.default.shape(_Icon.iconProps)
|
|
55
|
+
centerIcon: _propTypes.default.shape(_Icon.iconProps),
|
|
56
|
+
ariaLabel: _propTypes.default.string
|
|
56
57
|
};
|
|
57
58
|
exports.buttonProps = buttonProps;
|
|
58
59
|
|
|
@@ -120,6 +121,8 @@ const Button = _ref => {
|
|
|
120
121
|
className: classList,
|
|
121
122
|
type: "button",
|
|
122
123
|
"aria-busy": buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.isLoading
|
|
124
|
+
}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.ariaLabel) && {
|
|
125
|
+
"aria-label": buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.ariaLabel
|
|
123
126
|
}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick) && {
|
|
124
127
|
onClick: buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.onClick
|
|
125
128
|
}, (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled) && {
|
|
@@ -150,6 +150,7 @@ const Carousel = _ref => {
|
|
|
150
150
|
|
|
151
151
|
(_instanceRef$current11 = instanceRef.current) === null || _instanceRef$current11 === void 0 ? void 0 : _instanceRef$current11.moveToIdx(idx);
|
|
152
152
|
},
|
|
153
|
+
"aria-label": "".concat(id, "_item_").concat(idx),
|
|
153
154
|
className: dotClasses + (currentSlide === idx ? " active ".concat(dots === null || dots === void 0 ? void 0 : dots.activeColours) : " ".concat(dots === null || dots === void 0 ? void 0 : dots.colours))
|
|
154
155
|
});
|
|
155
156
|
})));
|
|
@@ -15,12 +15,56 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
15
15
|
|
|
16
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
23
|
|
|
22
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
25
|
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
|
|
30
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
+
|
|
32
|
+
const burgerMenuBtnProps = {
|
|
33
|
+
bgColor: _propTypes.default.string,
|
|
34
|
+
color: _propTypes.default.string,
|
|
35
|
+
hoverBgColor: _propTypes.default.string,
|
|
36
|
+
hoverColor: _propTypes.default.string,
|
|
37
|
+
activeBgColor: _propTypes.default.string
|
|
38
|
+
};
|
|
39
|
+
const navProps = {
|
|
40
|
+
id: _propTypes.default.string,
|
|
41
|
+
classes: _propTypes.default.string,
|
|
42
|
+
firstRow: _propTypes.default.array,
|
|
43
|
+
firstRowClasses: _propTypes.default.string,
|
|
44
|
+
secondRow: _propTypes.default.array,
|
|
45
|
+
secondRowClasses: _propTypes.default.string,
|
|
46
|
+
thirdRow: _propTypes.default.array,
|
|
47
|
+
thirdRowClasses: _propTypes.default.string,
|
|
48
|
+
mobileItems: _propTypes.default.object,
|
|
49
|
+
bgColor: _propTypes.default.string,
|
|
50
|
+
burgerMenuBtn: burgerMenuBtnProps,
|
|
51
|
+
mobileBgColor: _propTypes.default.string,
|
|
52
|
+
asSideBar: _propTypes.default.bool,
|
|
53
|
+
mobileNavCloseColor: _propTypes.default.string,
|
|
54
|
+
sideBarWidth: _propTypes.default.string,
|
|
55
|
+
dropdownNavHeight: _propTypes.default.string,
|
|
56
|
+
mobileLogo: _propTypes.default.string,
|
|
57
|
+
mobileLogoBannerClasses: _propTypes.default.string,
|
|
58
|
+
mobileNavLogoLink: _propTypes.default.string,
|
|
59
|
+
fixedTop: _propTypes.default.bool,
|
|
60
|
+
mobileClasses: _propTypes.default.string,
|
|
61
|
+
borderBottom: _propTypes.default.bool,
|
|
62
|
+
borderBottomColor: _propTypes.default.string,
|
|
63
|
+
closeMobileIconProps: _propTypes.default.string,
|
|
64
|
+
rowHeight: _propTypes.default.string,
|
|
65
|
+
getNavStatus: _propTypes.default.func
|
|
66
|
+
};
|
|
67
|
+
|
|
24
68
|
const Nav = _ref => {
|
|
25
69
|
let {
|
|
26
70
|
id,
|
|
@@ -33,11 +77,8 @@ const Nav = _ref => {
|
|
|
33
77
|
thirdRowClasses,
|
|
34
78
|
mobileItems,
|
|
35
79
|
bgColor,
|
|
80
|
+
burgerMenuBtn,
|
|
36
81
|
mobileBgColor,
|
|
37
|
-
mobileNavButtonBgColor,
|
|
38
|
-
mobileNavButtonColor,
|
|
39
|
-
hoverMobileNavButtonBgColor,
|
|
40
|
-
hoverMobileNavButtonColor,
|
|
41
82
|
asSideBar,
|
|
42
83
|
mobileNavCloseColor,
|
|
43
84
|
sideBarWidth,
|
|
@@ -66,14 +107,14 @@ const Nav = _ref => {
|
|
|
66
107
|
[thirdRowClasses]: thirdRowClasses
|
|
67
108
|
}, 'flex');
|
|
68
109
|
const styles = (0, _classnames.default)({
|
|
69
|
-
[
|
|
70
|
-
'bg-white': !
|
|
71
|
-
[
|
|
72
|
-
'text-black': !
|
|
73
|
-
[
|
|
74
|
-
'hover:bg-black': !
|
|
75
|
-
[
|
|
76
|
-
'hover:text-white': !
|
|
110
|
+
[burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.bgColor]: burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.bgColor,
|
|
111
|
+
'bg-white': !(burgerMenuBtn !== null && burgerMenuBtn !== void 0 && burgerMenuBtn.bgColor),
|
|
112
|
+
[burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.color]: burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.color,
|
|
113
|
+
'text-black': !(burgerMenuBtn !== null && burgerMenuBtn !== void 0 && burgerMenuBtn.color),
|
|
114
|
+
[burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.hoverBgColor]: burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.hoverBgColor,
|
|
115
|
+
'hover:bg-black': !(burgerMenuBtn !== null && burgerMenuBtn !== void 0 && burgerMenuBtn.hoverBgColor),
|
|
116
|
+
[burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.hoverColor]: burgerMenuBtn === null || burgerMenuBtn === void 0 ? void 0 : burgerMenuBtn.hoverColor,
|
|
117
|
+
'hover:text-white': !(burgerMenuBtn !== null && burgerMenuBtn !== void 0 && burgerMenuBtn.hoverColor)
|
|
77
118
|
});
|
|
78
119
|
const sideNavClasses = (0, _classnames.default)({
|
|
79
120
|
[mobileBgColor]: mobileBgColor,
|
|
@@ -141,6 +182,7 @@ const Nav = _ref => {
|
|
|
141
182
|
onClick: openMenu,
|
|
142
183
|
type: "button",
|
|
143
184
|
className: "inline-flex items-center justify-center \n p-2 rounded-md focus:ring-2 focus:ring-inset \n focus:ring-white ".concat(styles),
|
|
185
|
+
"aria-label": "open navigation",
|
|
144
186
|
"aria-controls": "mobile-menu",
|
|
145
187
|
"aria-expanded": "false"
|
|
146
188
|
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
@@ -253,5 +295,8 @@ const Nav = _ref => {
|
|
|
253
295
|
}))));
|
|
254
296
|
};
|
|
255
297
|
|
|
298
|
+
Nav.propTypes = {
|
|
299
|
+
navProps: _propTypes.default.shape(_objectSpread({}, navProps))
|
|
300
|
+
};
|
|
256
301
|
var _default = Nav;
|
|
257
302
|
exports.default = _default;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -9,7 +7,7 @@ exports.navItemProps = exports.default = void 0;
|
|
|
9
7
|
|
|
10
8
|
require("core-js/modules/es.object.assign.js");
|
|
11
9
|
|
|
12
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
11
|
|
|
14
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
13
|
|
|
@@ -17,10 +15,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
19
|
|
|
26
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -36,23 +30,36 @@ const navItemProps = {
|
|
|
36
30
|
name: _propTypes.default.string,
|
|
37
31
|
url: _propTypes.default.string,
|
|
38
32
|
onClick: _propTypes.default.func,
|
|
39
|
-
borderColor: _propTypes.default.string,
|
|
40
|
-
textColor: _propTypes.default.string,
|
|
41
|
-
bgColor: _propTypes.default.string,
|
|
42
|
-
hoverBorderColor: _propTypes.default.string,
|
|
43
|
-
hoverTextColor: _propTypes.default.string,
|
|
44
|
-
hoverBgColor: _propTypes.default.string,
|
|
45
33
|
bordered: _propTypes.default.bool,
|
|
46
34
|
rounded: _propTypes.default.bool,
|
|
47
35
|
underlineOnHover: _propTypes.default.bool,
|
|
48
36
|
isActive: _propTypes.default.bool,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
default: _propTypes.default.shape({
|
|
38
|
+
borderColor: _propTypes.default.string,
|
|
39
|
+
textColor: _propTypes.default.string,
|
|
40
|
+
bgColor: _propTypes.default.string
|
|
41
|
+
}),
|
|
42
|
+
hover: _propTypes.default.shape({
|
|
43
|
+
borderColor: _propTypes.default.string,
|
|
44
|
+
textColor: _propTypes.default.string,
|
|
45
|
+
bgColor: _propTypes.default.string
|
|
46
|
+
}),
|
|
47
|
+
focus: _propTypes.default.shape({
|
|
48
|
+
borderColor: _propTypes.default.string,
|
|
49
|
+
textColor: _propTypes.default.string,
|
|
50
|
+
bgColor: _propTypes.default.string
|
|
51
|
+
}),
|
|
52
|
+
active: _propTypes.default.shape({
|
|
53
|
+
borderColor: _propTypes.default.string,
|
|
54
|
+
textColor: _propTypes.default.string,
|
|
55
|
+
bgColor: _propTypes.default.string
|
|
56
|
+
})
|
|
52
57
|
};
|
|
53
58
|
exports.navItemProps = navItemProps;
|
|
54
59
|
|
|
55
60
|
const NavItem = _ref => {
|
|
61
|
+
var _navItemProps$default, _navItemProps$default2, _navItemProps$default3, _navItemProps$default4, _navItemProps$default5, _navItemProps$default6, _navItemProps$default7, _navItemProps$default8, _navItemProps$default9, _navItemProps$active, _navItemProps$active2, _navItemProps$active3, _navItemProps$active4, _navItemProps$active5, _navItemProps$active6, _navItemProps$active7, _navItemProps$active8, _navItemProps$active9, _navItemProps$hover, _navItemProps$hover2, _navItemProps$hover3, _navItemProps$hover4, _navItemProps$hover5, _navItemProps$hover6, _navItemProps$hover7, _navItemProps$hover8, _navItemProps$hover9, _navItemProps$focus, _navItemProps$focus2, _navItemProps$focus3, _navItemProps$focus4, _navItemProps$focus5, _navItemProps$focus6, _navItemProps$focus7, _navItemProps$focus8, _navItemProps$focus9;
|
|
62
|
+
|
|
56
63
|
let {
|
|
57
64
|
navItemProps
|
|
58
65
|
} = _ref;
|
|
@@ -68,28 +75,36 @@ const NavItem = _ref => {
|
|
|
68
75
|
[navItemProps.linkClasses]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.linkClasses
|
|
69
76
|
}, 'px-4 mx-2 mb-4 text-center whitespace-nowrap');
|
|
70
77
|
const styleClasses = (0, _classnames.default)({
|
|
71
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.bgColor]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.bgColor,
|
|
72
|
-
'bg-black': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.bgColor),
|
|
73
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.textColor]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.textColor,
|
|
74
|
-
'text-white': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.textColor),
|
|
75
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.borderColor]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.borderColor,
|
|
76
|
-
'border-black': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.borderColor)
|
|
78
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$default = navItemProps.default) === null || _navItemProps$default === void 0 ? void 0 : _navItemProps$default.bgColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$default2 = navItemProps.default) === null || _navItemProps$default2 === void 0 ? void 0 : _navItemProps$default2.bgColor,
|
|
79
|
+
'bg-black': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$default3 = navItemProps.default) !== null && _navItemProps$default3 !== void 0 && _navItemProps$default3.bgColor),
|
|
80
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$default4 = navItemProps.default) === null || _navItemProps$default4 === void 0 ? void 0 : _navItemProps$default4.textColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$default5 = navItemProps.default) === null || _navItemProps$default5 === void 0 ? void 0 : _navItemProps$default5.textColor,
|
|
81
|
+
'text-white': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$default6 = navItemProps.default) !== null && _navItemProps$default6 !== void 0 && _navItemProps$default6.textColor),
|
|
82
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$default7 = navItemProps.default) === null || _navItemProps$default7 === void 0 ? void 0 : _navItemProps$default7.borderColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$default8 = navItemProps.default) === null || _navItemProps$default8 === void 0 ? void 0 : _navItemProps$default8.borderColor,
|
|
83
|
+
'border-black': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$default9 = navItemProps.default) !== null && _navItemProps$default9 !== void 0 && _navItemProps$default9.borderColor)
|
|
77
84
|
});
|
|
78
85
|
const activeStyleClasses = (0, _classnames.default)({
|
|
79
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.
|
|
80
|
-
'bg-blue': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.
|
|
81
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.
|
|
82
|
-
'text-white': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.
|
|
83
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.
|
|
84
|
-
'border-blue': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.
|
|
86
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$active = navItemProps.active) === null || _navItemProps$active === void 0 ? void 0 : _navItemProps$active.bgColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$active2 = navItemProps.active) === null || _navItemProps$active2 === void 0 ? void 0 : _navItemProps$active2.bgColor,
|
|
87
|
+
'bg-blue': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$active3 = navItemProps.active) !== null && _navItemProps$active3 !== void 0 && _navItemProps$active3.bgColor),
|
|
88
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$active4 = navItemProps.active) === null || _navItemProps$active4 === void 0 ? void 0 : _navItemProps$active4.textColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$active5 = navItemProps.active) === null || _navItemProps$active5 === void 0 ? void 0 : _navItemProps$active5.textColor,
|
|
89
|
+
'text-white': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$active6 = navItemProps.active) !== null && _navItemProps$active6 !== void 0 && _navItemProps$active6.textColor),
|
|
90
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$active7 = navItemProps.active) === null || _navItemProps$active7 === void 0 ? void 0 : _navItemProps$active7.borderColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$active8 = navItemProps.active) === null || _navItemProps$active8 === void 0 ? void 0 : _navItemProps$active8.borderColor,
|
|
91
|
+
'border-blue': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$active9 = navItemProps.active) !== null && _navItemProps$active9 !== void 0 && _navItemProps$active9.borderColor)
|
|
85
92
|
});
|
|
86
93
|
const hoverStyles = (0, _classnames.default)({
|
|
87
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.
|
|
88
|
-
'hover:bg-white': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.
|
|
89
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.
|
|
90
|
-
'hover:text-black': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.
|
|
91
|
-
[navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.
|
|
92
|
-
'hover:border-black': !(navItemProps !== null && navItemProps !== void 0 && navItemProps.
|
|
94
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$hover = navItemProps.hover) === null || _navItemProps$hover === void 0 ? void 0 : _navItemProps$hover.bgColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$hover2 = navItemProps.hover) === null || _navItemProps$hover2 === void 0 ? void 0 : _navItemProps$hover2.bgColor,
|
|
95
|
+
'hover:bg-white': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$hover3 = navItemProps.hover) !== null && _navItemProps$hover3 !== void 0 && _navItemProps$hover3.bgColor),
|
|
96
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$hover4 = navItemProps.hover) === null || _navItemProps$hover4 === void 0 ? void 0 : _navItemProps$hover4.textColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$hover5 = navItemProps.hover) === null || _navItemProps$hover5 === void 0 ? void 0 : _navItemProps$hover5.textColor,
|
|
97
|
+
'hover:text-black': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$hover6 = navItemProps.hover) !== null && _navItemProps$hover6 !== void 0 && _navItemProps$hover6.textColor),
|
|
98
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$hover7 = navItemProps.hover) === null || _navItemProps$hover7 === void 0 ? void 0 : _navItemProps$hover7.borderColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$hover8 = navItemProps.hover) === null || _navItemProps$hover8 === void 0 ? void 0 : _navItemProps$hover8.borderColor,
|
|
99
|
+
'hover:border-black': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$hover9 = navItemProps.hover) !== null && _navItemProps$hover9 !== void 0 && _navItemProps$hover9.borderColor)
|
|
100
|
+
});
|
|
101
|
+
const focusStyles = (0, _classnames.default)({
|
|
102
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$focus = navItemProps.focus) === null || _navItemProps$focus === void 0 ? void 0 : _navItemProps$focus.bgColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$focus2 = navItemProps.focus) === null || _navItemProps$focus2 === void 0 ? void 0 : _navItemProps$focus2.bgColor,
|
|
103
|
+
'focus:bg-white': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$focus3 = navItemProps.focus) !== null && _navItemProps$focus3 !== void 0 && _navItemProps$focus3.bgColor),
|
|
104
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$focus4 = navItemProps.focus) === null || _navItemProps$focus4 === void 0 ? void 0 : _navItemProps$focus4.textColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$focus5 = navItemProps.focus) === null || _navItemProps$focus5 === void 0 ? void 0 : _navItemProps$focus5.textColor,
|
|
105
|
+
'focus:text-black': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$focus6 = navItemProps.focus) !== null && _navItemProps$focus6 !== void 0 && _navItemProps$focus6.textColor),
|
|
106
|
+
[navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$focus7 = navItemProps.focus) === null || _navItemProps$focus7 === void 0 ? void 0 : _navItemProps$focus7.borderColor]: navItemProps === null || navItemProps === void 0 ? void 0 : (_navItemProps$focus8 = navItemProps.focus) === null || _navItemProps$focus8 === void 0 ? void 0 : _navItemProps$focus8.borderColor,
|
|
107
|
+
'focus:border-black': !(navItemProps !== null && navItemProps !== void 0 && (_navItemProps$focus9 = navItemProps.focus) !== null && _navItemProps$focus9 !== void 0 && _navItemProps$focus9.borderColor)
|
|
93
108
|
});
|
|
94
109
|
const styles = (0, _classnames.default)({
|
|
95
110
|
[activeStyleClasses]: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.isActive,
|
|
@@ -102,7 +117,7 @@ const NavItem = _ref => {
|
|
|
102
117
|
}), /*#__PURE__*/_react.default.createElement("a", {
|
|
103
118
|
href: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.url
|
|
104
119
|
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
105
|
-
className: "".concat(linkClassList, " ").concat(hoverStyles, " ").concat(
|
|
120
|
+
className: "".concat(linkClassList, " ").concat(styles, " ").concat(hoverStyles, " ").concat(focusStyles),
|
|
106
121
|
onClick: navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.onClick
|
|
107
122
|
}, navItemProps === null || navItemProps === void 0 ? void 0 : navItemProps.name)));
|
|
108
123
|
};
|
|
@@ -1,97 +1,92 @@
|
|
|
1
1
|
/* Vertical */
|
|
2
2
|
.tubestop.flex-col.none-reverse .status-flow-item:not(:first-child):before {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
display: block;
|
|
3
|
+
@apply absolute;
|
|
4
|
+
@apply block;
|
|
7
5
|
|
|
8
6
|
content: "";
|
|
9
7
|
width: 1px;
|
|
10
8
|
height: 100%;
|
|
11
9
|
left: 7px;
|
|
12
|
-
top: -100
|
|
10
|
+
top: -100%;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
.tubestop.flex-col.none-reverse .status-flow-item:not(:last-child):after {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
display: block;
|
|
14
|
+
@apply absolute;
|
|
15
|
+
@apply block;
|
|
20
16
|
|
|
21
17
|
content: "";
|
|
22
18
|
width: 1px;
|
|
23
19
|
height: 100%;
|
|
24
20
|
left: 7px;
|
|
25
|
-
top: 40
|
|
21
|
+
top: 40%;
|
|
26
22
|
}
|
|
27
23
|
|
|
28
24
|
/* reverse */
|
|
29
25
|
.tubestop.flex-col.reverse .status-flow-item:not(:first-child):before {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
display: block;
|
|
26
|
+
@apply absolute;
|
|
27
|
+
@apply block;
|
|
34
28
|
|
|
35
29
|
content: "";
|
|
36
30
|
width: 1px;
|
|
37
31
|
height: 100%;
|
|
38
32
|
right: 7px;
|
|
39
|
-
top: -100
|
|
33
|
+
top: -100%;
|
|
40
34
|
}
|
|
41
35
|
|
|
42
36
|
.tubestop.flex-col.reverse .status-flow-item:not(:last-child):after {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
display: block;
|
|
37
|
+
@apply absolute;
|
|
38
|
+
@apply block;
|
|
47
39
|
|
|
48
40
|
content: "";
|
|
49
41
|
width: 1px;
|
|
50
42
|
height: 100%;
|
|
51
43
|
right: 7px;
|
|
52
|
-
top: 40
|
|
44
|
+
top: 40%;
|
|
53
45
|
}
|
|
54
46
|
|
|
55
47
|
/* Horizontal */
|
|
56
48
|
.tubestop.flex-row.none-reverse .status-flow-item:not(:first-child):after {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
display: block;
|
|
49
|
+
@apply absolute;
|
|
50
|
+
@apply block;
|
|
61
51
|
|
|
62
52
|
content: "";
|
|
63
53
|
width: 100%;
|
|
64
54
|
height: 1px;
|
|
65
55
|
left: -50%;
|
|
66
|
-
bottom: 7px
|
|
56
|
+
bottom: 7px;
|
|
67
57
|
}
|
|
68
58
|
|
|
69
59
|
.tubestop.flex-row-reverse.none-reverse
|
|
70
60
|
.status-flow-item:not(:first-child):after {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
display: block;
|
|
61
|
+
@apply absolute;
|
|
62
|
+
@apply block;
|
|
75
63
|
|
|
76
64
|
content: "";
|
|
77
65
|
width: 100%;
|
|
78
66
|
height: 1px;
|
|
79
67
|
right: -50%;
|
|
80
|
-
top: 7px
|
|
68
|
+
top: 7px;
|
|
81
69
|
}
|
|
82
70
|
|
|
83
71
|
/*reverse*/
|
|
84
72
|
.tubestop.flex-row.reverse .status-flow-item:not(:first-child):after {
|
|
73
|
+
@apply absolute;
|
|
74
|
+
@apply block;
|
|
75
|
+
|
|
76
|
+
content: "";
|
|
77
|
+
width: 100%;
|
|
78
|
+
height: 1px;
|
|
85
79
|
left: -50%;
|
|
86
80
|
bottom: 7px;
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tubestop.flex-row.reverse .status-flow-item:not(:first-child):after {
|
|
84
|
+
@apply absolute;
|
|
85
|
+
@apply block;
|
|
89
86
|
|
|
90
87
|
content: "";
|
|
91
88
|
width: 100%;
|
|
92
89
|
height: 1px;
|
|
93
90
|
right: -50%;
|
|
94
|
-
top: 7px
|
|
91
|
+
top: 7px;
|
|
95
92
|
}
|
|
96
|
-
|
|
97
|
-
/*# sourceMappingURL=index.css.map */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "trepur_components",
|
|
3
3
|
"description": "component lib",
|
|
4
4
|
"author": "trepur_ttenneb",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.28",
|
|
6
6
|
"private": false,
|
|
7
7
|
"keywords": [
|
|
8
8
|
"react",
|
|
@@ -30,27 +30,12 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"compile:css": "postcss src/**/*.css --base src/lib/components --dir dist/components -m --verbose",
|
|
33
|
-
"build": "NODE_ENV=production babel src/lib --out-dir dist --ignore src/**/*.stories.js --copy-files --no-copy-ignored && rm -rf dist/utils dist/assets && rm -rf dist/typography
|
|
33
|
+
"build": "NODE_ENV=production babel src/lib --out-dir dist --ignore src/**/*.stories.js --copy-files --no-copy-ignored && rm -rf dist/utils dist/assets && rm -rf dist/typography",
|
|
34
|
+
"build-new": "NODE_ENV=production babel src/lib --out-dir dist --ignore src/**/*.stories.js --copy-files --no-copy-ignored && rm -rf dist/utils dist/assets && rm -rf dist/typography && npm run compile:css",
|
|
34
35
|
"eject": "react-scripts eject",
|
|
35
36
|
"storybook": "start-storybook -p 6006",
|
|
36
37
|
"build-storybook": "build-storybook -s public"
|
|
37
38
|
},
|
|
38
|
-
"eslintConfig": {
|
|
39
|
-
"extends": [
|
|
40
|
-
"react-app",
|
|
41
|
-
"react-app/jest"
|
|
42
|
-
],
|
|
43
|
-
"overrides": [
|
|
44
|
-
{
|
|
45
|
-
"files": [
|
|
46
|
-
"**/*.stories.*"
|
|
47
|
-
],
|
|
48
|
-
"rules": {
|
|
49
|
-
"import/no-anonymous-default-export": "off"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
39
|
"browserslist": {
|
|
55
40
|
"production": [
|
|
56
41
|
">0.2%",
|
|
@@ -64,8 +49,7 @@
|
|
|
64
49
|
]
|
|
65
50
|
},
|
|
66
51
|
"devDependencies": {
|
|
67
|
-
"@babel/cli": "^7.
|
|
68
|
-
"@babel/core": "^7.17.5",
|
|
52
|
+
"@babel/cli": "^7.18.10",
|
|
69
53
|
"@babel/preset-env": "^7.16.11",
|
|
70
54
|
"@storybook/addon-actions": "^6.4.19",
|
|
71
55
|
"@storybook/addon-essentials": "^6.4.19",
|
|
@@ -78,7 +62,6 @@
|
|
|
78
62
|
"@storybook/react": "^6.4.19",
|
|
79
63
|
"@storybook/testing-library": "0.0.9",
|
|
80
64
|
"autoprefixer": "^10.4.2",
|
|
81
|
-
"babel-cli": "^6.26.0",
|
|
82
65
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
83
66
|
"postcss": "^8.4.16",
|
|
84
67
|
"tailwindcss": "^3.0.23",
|