trepur_components 0.1.26 → 0.1.30
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/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +17 -4
- package/dist/components/BreadcrumbsBordered/index.js +29 -36
- package/dist/components/BreadcrumbsBorderedItem/BreadcrumbsBorderedItem.stories.js +57 -0
- package/dist/components/BreadcrumbsBorderedItem/README.md +28 -0
- package/dist/components/{BreadcrumbsBordered → BreadcrumbsBorderedItem}/index.css +8 -8
- package/dist/components/BreadcrumbsBorderedItem/index.js +158 -0
- package/dist/components/Button/Button.stories.js +113 -6
- package/dist/components/{ButtonSlide → Button}/Styles.css +0 -3
- package/dist/components/Button/index.js +25 -13
- package/dist/components/Card/Card.stories.js +34 -2
- package/dist/components/Card/index.js +22 -9
- package/dist/components/CardImageLink/index.js +1 -1
- package/dist/components/Jumbotron/index.js +1 -1
- package/dist/components/Nav/Nav.stories.js +1 -1
- package/dist/index.js +70 -6
- package/package.json +1 -1
- package/dist/components/ButtonSlide/ButtonSlide.stories.js +0 -149
- package/dist/components/ButtonSlide/README.md +0 -18
- package/dist/components/ButtonSlide/index.js +0 -41
- package/dist/components/index.js +0 -16
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports._BreadcrumbsBordered = exports.WithOnlyOneLink = void 0;
|
|
6
|
+
exports.default = exports._BreadcrumbsBordered = exports.WithOnlyOneLink = exports.WithColors = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,8 +11,6 @@ var _README = _interopRequireDefault(require("./README.md"));
|
|
|
11
11
|
|
|
12
12
|
var _index = _interopRequireDefault(require("./index"));
|
|
13
13
|
|
|
14
|
-
require("./index.css");
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
16
|
const links = [{
|
|
@@ -45,12 +43,27 @@ exports.default = _default;
|
|
|
45
43
|
|
|
46
44
|
const _BreadcrumbsBordered = args => {
|
|
47
45
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
48
|
-
links: links
|
|
46
|
+
links: links,
|
|
47
|
+
textColor: "white"
|
|
49
48
|
});
|
|
50
49
|
};
|
|
51
50
|
|
|
52
51
|
exports._BreadcrumbsBordered = _BreadcrumbsBordered;
|
|
53
52
|
|
|
53
|
+
const WithColors = args => {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
55
|
+
links: links,
|
|
56
|
+
bgColor: "#38B6FF",
|
|
57
|
+
borderColor: "white",
|
|
58
|
+
textColor: "white",
|
|
59
|
+
hoverTextColor: "#38B6FF",
|
|
60
|
+
hoverBgColor: "white",
|
|
61
|
+
hoverBorderColor: "#38B6FF"
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.WithColors = WithColors;
|
|
66
|
+
|
|
54
67
|
const WithOnlyOneLink = args => {
|
|
55
68
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
56
69
|
links: link
|
|
@@ -7,54 +7,47 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
require("
|
|
10
|
+
var _index = _interopRequireDefault(require("../BreadcrumbsBorderedItem/index"));
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
const Breadcrumbs = _ref => {
|
|
15
15
|
let {
|
|
16
16
|
className,
|
|
17
|
-
links
|
|
17
|
+
links,
|
|
18
|
+
textColor,
|
|
19
|
+
bgColor,
|
|
20
|
+
borderColor,
|
|
21
|
+
hoverTextColor,
|
|
22
|
+
hoverBgColor,
|
|
23
|
+
hoverBorderColor
|
|
18
24
|
} = _ref;
|
|
19
25
|
const linksLength = Object.keys(links).length;
|
|
20
26
|
let classes = 'flex py-2 px-8 ' + className;
|
|
21
27
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
22
28
|
className: classes
|
|
23
29
|
}, links && links.map((link, i) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}))) : /*#__PURE__*/_react.default.createElement("p", {
|
|
46
|
-
className: "pt-1"
|
|
47
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
48
|
-
className: "test-arrow-bottom"
|
|
49
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
50
|
-
className: "test-arrow-top"
|
|
51
|
-
}), link.name, /*#__PURE__*/_react.default.createElement("span", {
|
|
52
|
-
className: "right-arrow"
|
|
53
|
-
})) : /*#__PURE__*/_react.default.createElement("p", {
|
|
54
|
-
className: "pt-1"
|
|
55
|
-
}, link.name, /*#__PURE__*/_react.default.createElement("span", {
|
|
56
|
-
className: "right-arrow"
|
|
57
|
-
})))));
|
|
30
|
+
let margin = i === 0 ? ' mr-3' : ' mx-3';
|
|
31
|
+
let first = i === 0 ? true : false;
|
|
32
|
+
let bType = 'standard';
|
|
33
|
+
|
|
34
|
+
if (linksLength >= 1 && i + 1 < linksLength) {
|
|
35
|
+
bType = 'link';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
39
|
+
classNames: margin,
|
|
40
|
+
name: link.name,
|
|
41
|
+
link: link.link,
|
|
42
|
+
type: bType,
|
|
43
|
+
firstItem: first,
|
|
44
|
+
textColor: textColor,
|
|
45
|
+
bgColor: bgColor,
|
|
46
|
+
borderColor: borderColor,
|
|
47
|
+
hoverTextColor: hoverTextColor,
|
|
48
|
+
hoverBgColor: hoverBgColor,
|
|
49
|
+
hoverBorderColor: hoverBorderColor
|
|
50
|
+
});
|
|
58
51
|
}));
|
|
59
52
|
};
|
|
60
53
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._BreadcrumbsItem = exports.WithColors = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _README = _interopRequireDefault(require("./README.md"));
|
|
11
|
+
|
|
12
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
13
|
+
|
|
14
|
+
require("./index.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const link = '/';
|
|
19
|
+
const name = 'link 1';
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Components/BreadcrumbsItem',
|
|
22
|
+
argTypes: {},
|
|
23
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
24
|
+
className: "p-4"
|
|
25
|
+
}, story())],
|
|
26
|
+
parameters: {
|
|
27
|
+
readme: {
|
|
28
|
+
sidebar: _README.default
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.default = _default;
|
|
33
|
+
|
|
34
|
+
const _BreadcrumbsItem = args => {
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
36
|
+
link: link,
|
|
37
|
+
name: name,
|
|
38
|
+
textColor: "white"
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports._BreadcrumbsItem = _BreadcrumbsItem;
|
|
43
|
+
|
|
44
|
+
const WithColors = args => {
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
46
|
+
link: link,
|
|
47
|
+
name: name,
|
|
48
|
+
bgColor: "#38B6FF",
|
|
49
|
+
borderColor: "white",
|
|
50
|
+
textColor: "white",
|
|
51
|
+
hoverTextColor: "#38B6FF",
|
|
52
|
+
hoverBgColor: "white",
|
|
53
|
+
hoverBorderColor: "#38B6FF"
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.WithColors = WithColors;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Breadcrumbs
|
|
2
|
+
|
|
3
|
+
Breadcrumbs with a bit of styling
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
const links = [
|
|
9
|
+
{
|
|
10
|
+
link: '/',
|
|
11
|
+
name: 'link 1'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
link: '/',
|
|
15
|
+
name: 'link 2'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
link: '/',
|
|
19
|
+
name: 'Link 3'
|
|
20
|
+
},
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
<BreadCrumbs links={links} />
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Parameters
|
|
27
|
+
`links={array} (default=null)`
|
|
28
|
+
`classNames={string} (default=null)`
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@apply h-0;
|
|
9
9
|
border-top: 17px solid transparent;
|
|
10
10
|
border-bottom: 15px solid transparent;
|
|
11
|
-
border-left: 16px solid
|
|
11
|
+
border-left: 16px solid ;
|
|
12
12
|
@apply absolute;
|
|
13
13
|
right: -16px;
|
|
14
14
|
@apply top-0;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
.test-arrow-bottom {
|
|
18
18
|
@apply w-0;
|
|
19
19
|
@apply h-0;
|
|
20
|
-
border-top: 17px solid
|
|
20
|
+
border-top: 17px solid ;
|
|
21
21
|
border-bottom: 18px solid transparent;
|
|
22
22
|
border-left: 17px solid transparent;
|
|
23
23
|
@apply absolute;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
.test-arrow-top {
|
|
31
31
|
@apply w-0;
|
|
32
32
|
@apply h-0;
|
|
33
|
-
border-top: 18px solid
|
|
33
|
+
border-top: 18px solid ;
|
|
34
34
|
border-bottom: 17px solid transparent;
|
|
35
35
|
border-left: 17px solid transparent;
|
|
36
36
|
@apply absolute;
|
|
@@ -42,15 +42,15 @@
|
|
|
42
42
|
@apply relative;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.item:hover .right-arrow {
|
|
46
|
-
border-left-color: theme('colors.
|
|
45
|
+
/* .item:hover .right-arrow {
|
|
46
|
+
border-left-color: theme('colors.white');
|
|
47
47
|
}
|
|
48
48
|
.item:hover .test-arrow-bottom {
|
|
49
|
-
border-top-color: theme('colors.
|
|
49
|
+
border-top-color: theme('colors.white');
|
|
50
50
|
}
|
|
51
51
|
.item:hover .test-arrow-top {
|
|
52
|
-
border-top-color: theme('colors.
|
|
53
|
-
}
|
|
52
|
+
border-top-color: theme('colors.white');
|
|
53
|
+
} */
|
|
54
54
|
|
|
55
55
|
.bc-item:focus {
|
|
56
56
|
@apply border-0;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
require("./index.css");
|
|
13
|
+
|
|
14
|
+
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); }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
const BreadcrumbsItem = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
classNames,
|
|
21
|
+
name,
|
|
22
|
+
link,
|
|
23
|
+
type,
|
|
24
|
+
firstItem,
|
|
25
|
+
textColor,
|
|
26
|
+
bgColor,
|
|
27
|
+
borderColor,
|
|
28
|
+
hoverTextColor,
|
|
29
|
+
hoverBgColor,
|
|
30
|
+
hoverBorderColor
|
|
31
|
+
} = _ref;
|
|
32
|
+
//---------- Styling ---------------
|
|
33
|
+
const [styles, setStyles] = (0, _react.useState)({
|
|
34
|
+
'background-color': bgColor ? bgColor : 'gray',
|
|
35
|
+
color: textColor ? textColor : 'black',
|
|
36
|
+
'borderColor': borderColor ? borderColor : 'white'
|
|
37
|
+
});
|
|
38
|
+
const [hoverStyles, setHoverStyles] = (0, _react.useState)({
|
|
39
|
+
'background-color': 'transparent',
|
|
40
|
+
'border-left-color': bgColor ? bgColor : 'gray'
|
|
41
|
+
});
|
|
42
|
+
const [hoverStylesBackArrows, setHoverStylesBackArrows] = (0, _react.useState)({
|
|
43
|
+
'background-color': 'transparent',
|
|
44
|
+
'color': bgColor ? bgColor : 'gray',
|
|
45
|
+
'border-left-color': 'transparent'
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const setHoverState = isHovering => {
|
|
49
|
+
if (isHovering) {
|
|
50
|
+
setStyles({
|
|
51
|
+
'background-color': hoverBgColor ? hoverBgColor : 'black',
|
|
52
|
+
color: hoverTextColor ? hoverTextColor : 'white',
|
|
53
|
+
'borderColor': hoverBorderColor ? hoverBorderColor : 'white'
|
|
54
|
+
});
|
|
55
|
+
setHoverStyles({
|
|
56
|
+
'background-color': 'transparent',
|
|
57
|
+
'border-left-color': hoverBgColor ? hoverBgColor : 'black'
|
|
58
|
+
});
|
|
59
|
+
setHoverStylesBackArrows({
|
|
60
|
+
'background-color': 'transparent',
|
|
61
|
+
'color': hoverBgColor ? hoverBgColor : 'black',
|
|
62
|
+
'border-left-color': 'transparent'
|
|
63
|
+
});
|
|
64
|
+
} else {
|
|
65
|
+
setStyles({
|
|
66
|
+
'background-color': bgColor ? bgColor : 'grey',
|
|
67
|
+
color: textColor ? textColor : 'black',
|
|
68
|
+
'border-color': borderColor ? borderColor : 'white'
|
|
69
|
+
});
|
|
70
|
+
setHoverStyles({
|
|
71
|
+
'background-color': 'transparent',
|
|
72
|
+
'border-left-color': bgColor ? bgColor : 'gray'
|
|
73
|
+
});
|
|
74
|
+
setHoverStylesBackArrows({
|
|
75
|
+
'background-color': 'transparent',
|
|
76
|
+
'color': bgColor ? bgColor : 'gray',
|
|
77
|
+
'border-left-color': 'transparent'
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}; //-----------------------------------
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
84
|
+
key: name,
|
|
85
|
+
className: "item"
|
|
86
|
+
}, type === 'link' ? firstItem ? /*#__PURE__*/_react.default.createElement("a", {
|
|
87
|
+
onMouseOver: () => setHoverState(true),
|
|
88
|
+
onMouseOut: () => setHoverState(false),
|
|
89
|
+
style: styles,
|
|
90
|
+
href: link,
|
|
91
|
+
className: "hover:underline"
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
93
|
+
className: "list-none"
|
|
94
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
95
|
+
style: styles,
|
|
96
|
+
className: 'bc-item px-4 h-8 ' + classNames
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
98
|
+
className: !firstItem ? 'text-center pt-1' : 'text-center pt-1'
|
|
99
|
+
}, name, /*#__PURE__*/_react.default.createElement("span", {
|
|
100
|
+
style: hoverStyles,
|
|
101
|
+
className: "right-arrow"
|
|
102
|
+
}))))) : /*#__PURE__*/_react.default.createElement("a", {
|
|
103
|
+
onMouseOver: () => setHoverState(true),
|
|
104
|
+
onMouseOut: () => setHoverState(false),
|
|
105
|
+
style: styles,
|
|
106
|
+
href: link,
|
|
107
|
+
className: "hover:underline"
|
|
108
|
+
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
109
|
+
className: "list-none"
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
111
|
+
style: styles,
|
|
112
|
+
className: 'bc-item px-4 h-8 ' + classNames
|
|
113
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
114
|
+
className: !firstItem ? 'text-center pt-1' : 'text-center pt-1'
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
116
|
+
style: hoverStylesBackArrows,
|
|
117
|
+
className: "test-arrow-bottom"
|
|
118
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
119
|
+
style: hoverStylesBackArrows,
|
|
120
|
+
className: "test-arrow-top"
|
|
121
|
+
}), name, /*#__PURE__*/_react.default.createElement("span", {
|
|
122
|
+
style: hoverStyles,
|
|
123
|
+
className: "right-arrow"
|
|
124
|
+
}))))) : firstItem ? /*#__PURE__*/_react.default.createElement("li", {
|
|
125
|
+
className: "list-none"
|
|
126
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
style: styles,
|
|
128
|
+
onMouseOver: () => setHoverState(true),
|
|
129
|
+
onMouseOut: () => setHoverState(false),
|
|
130
|
+
className: 'bc-item px-4 h-8 ' + classNames
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
132
|
+
className: "text-center pt-1"
|
|
133
|
+
}, name, /*#__PURE__*/_react.default.createElement("span", {
|
|
134
|
+
style: hoverStyles,
|
|
135
|
+
className: "right-arrow"
|
|
136
|
+
})))) : /*#__PURE__*/_react.default.createElement("li", {
|
|
137
|
+
className: "list-none"
|
|
138
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
+
style: styles,
|
|
140
|
+
onMouseOver: () => setHoverState(true),
|
|
141
|
+
onMouseOut: () => setHoverState(false),
|
|
142
|
+
className: 'bc-item px-4 h-8 ' + classNames
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
144
|
+
className: "text-center pt-1"
|
|
145
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
146
|
+
style: hoverStylesBackArrows,
|
|
147
|
+
className: "test-arrow-bottom"
|
|
148
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
149
|
+
style: hoverStylesBackArrows,
|
|
150
|
+
className: "test-arrow-top"
|
|
151
|
+
}), name, /*#__PURE__*/_react.default.createElement("span", {
|
|
152
|
+
style: hoverStyles,
|
|
153
|
+
className: "right-arrow"
|
|
154
|
+
})))));
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
var _default = BreadcrumbsItem;
|
|
158
|
+
exports.default = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.withStyles = exports.default = exports._Button = exports.WithIconRight = exports.WithIconLeft = exports.WithBothIcons = exports.
|
|
6
|
+
exports.withStyles = exports.default = exports._Button = exports.WithSlideDesign = exports.WithIconRight = exports.WithIconLeft = exports.WithBothIcons = exports.SlideButton = exports.AsSocialButton = exports.AsSlideWithStyles = exports.AsSlideWithSocialButton = exports.AsSlideWithInternalLink = exports.AsSlideWithExternalLink = exports.AsInternalLink = exports.AsExternalLink = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -87,6 +87,7 @@ var _default = {
|
|
|
87
87
|
control: {
|
|
88
88
|
type: 'color'
|
|
89
89
|
},
|
|
90
|
+
default: 'blue',
|
|
90
91
|
table: {
|
|
91
92
|
category: 'Hover',
|
|
92
93
|
subcategory: 'Colors'
|
|
@@ -177,6 +178,23 @@ const _Button = args => {
|
|
|
177
178
|
|
|
178
179
|
exports._Button = _Button;
|
|
179
180
|
|
|
181
|
+
const SlideButton = args => {
|
|
182
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
183
|
+
ctaText: args.text,
|
|
184
|
+
bgColor: args.bgColor,
|
|
185
|
+
textColor: args.textColor,
|
|
186
|
+
borderColor: args.borderColor,
|
|
187
|
+
hoverCtaText: args.hoverText,
|
|
188
|
+
hoverTextColor: args.hoverTextColor,
|
|
189
|
+
hoverBgColor: args.hoverBgColor,
|
|
190
|
+
hoverBorderColor: args.hoverBorderColor,
|
|
191
|
+
onClick: (0, _addonActions.action)('button-click'),
|
|
192
|
+
buttonDesign: "slide"
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
exports.SlideButton = SlideButton;
|
|
197
|
+
|
|
180
198
|
const withStyles = args => {
|
|
181
199
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
182
200
|
ctaText: args.text,
|
|
@@ -194,6 +212,24 @@ const withStyles = args => {
|
|
|
194
212
|
|
|
195
213
|
exports.withStyles = withStyles;
|
|
196
214
|
|
|
215
|
+
const AsSlideWithStyles = args => {
|
|
216
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
217
|
+
ctaText: args.text,
|
|
218
|
+
bgColor: "red",
|
|
219
|
+
textColor: "white",
|
|
220
|
+
borderColor: "red",
|
|
221
|
+
hoverCtaText: args.text,
|
|
222
|
+
hoverTextColor: "red",
|
|
223
|
+
hoverBgColor: "red",
|
|
224
|
+
hoverBorderColor: "red",
|
|
225
|
+
onClick: (0, _addonActions.action)('button-click'),
|
|
226
|
+
buttonType: "button",
|
|
227
|
+
buttonDesign: "slide"
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
exports.AsSlideWithStyles = AsSlideWithStyles;
|
|
232
|
+
|
|
197
233
|
const WithIconRight = args => {
|
|
198
234
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
199
235
|
rightIcon: args.rightIcon,
|
|
@@ -227,7 +263,19 @@ const WithBothIcons = args => {
|
|
|
227
263
|
|
|
228
264
|
exports.WithBothIcons = WithBothIcons;
|
|
229
265
|
|
|
230
|
-
const
|
|
266
|
+
const WithSlideDesign = args => {
|
|
267
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
268
|
+
leftIcon: args.leftIcon,
|
|
269
|
+
rightIcon: args.rightIcon,
|
|
270
|
+
ctaText: args.text,
|
|
271
|
+
buttonType: "button",
|
|
272
|
+
buttonDesign: "slide"
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
exports.WithSlideDesign = WithSlideDesign;
|
|
277
|
+
|
|
278
|
+
const AsExternalLink = args => {
|
|
231
279
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
232
280
|
url: "/",
|
|
233
281
|
ctaText: args.text,
|
|
@@ -235,9 +283,20 @@ const ButtonAsExternalLink = args => {
|
|
|
235
283
|
});
|
|
236
284
|
};
|
|
237
285
|
|
|
238
|
-
exports.
|
|
286
|
+
exports.AsExternalLink = AsExternalLink;
|
|
287
|
+
|
|
288
|
+
const AsSlideWithExternalLink = args => {
|
|
289
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
290
|
+
url: "/",
|
|
291
|
+
ctaText: args.text,
|
|
292
|
+
buttonType: "external",
|
|
293
|
+
buttonDesign: "slide"
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
exports.AsSlideWithExternalLink = AsSlideWithExternalLink;
|
|
239
298
|
|
|
240
|
-
const
|
|
299
|
+
const AsInternalLink = args => {
|
|
241
300
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
242
301
|
ctaText: args.text,
|
|
243
302
|
url: "/",
|
|
@@ -246,7 +305,19 @@ const ButtonAsInternalLink = args => {
|
|
|
246
305
|
});
|
|
247
306
|
};
|
|
248
307
|
|
|
249
|
-
exports.
|
|
308
|
+
exports.AsInternalLink = AsInternalLink;
|
|
309
|
+
|
|
310
|
+
const AsSlideWithInternalLink = args => {
|
|
311
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
312
|
+
ctaText: args.text,
|
|
313
|
+
url: "/",
|
|
314
|
+
onClick: (0, _addonActions.action)('button-click'),
|
|
315
|
+
buttonType: "internal",
|
|
316
|
+
buttonDesign: "slide"
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
exports.AsSlideWithInternalLink = AsSlideWithInternalLink;
|
|
250
321
|
|
|
251
322
|
const AsSocialButton = args => {
|
|
252
323
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
@@ -279,4 +350,40 @@ const AsSocialButton = args => {
|
|
|
279
350
|
}));
|
|
280
351
|
};
|
|
281
352
|
|
|
282
|
-
exports.AsSocialButton = AsSocialButton;
|
|
353
|
+
exports.AsSocialButton = AsSocialButton;
|
|
354
|
+
|
|
355
|
+
const AsSlideWithSocialButton = args => {
|
|
356
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
357
|
+
onClick: (0, _addonActions.action)('button-click'),
|
|
358
|
+
centerIcon: "facebook-f",
|
|
359
|
+
hoverBgColor: "#3b5999",
|
|
360
|
+
bgColor: "#3b5999",
|
|
361
|
+
textColor: "white",
|
|
362
|
+
hoverTextColor: "black",
|
|
363
|
+
buttonType: "social",
|
|
364
|
+
url: "/",
|
|
365
|
+
buttonDesign: "slide"
|
|
366
|
+
}), "\xA0", /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
367
|
+
onClick: (0, _addonActions.action)('button-click'),
|
|
368
|
+
centerIcon: "whatsapp",
|
|
369
|
+
hoverBgColor: "#25d366",
|
|
370
|
+
bgColor: "#25d366",
|
|
371
|
+
textColor: "white",
|
|
372
|
+
hoverTextColor: "black",
|
|
373
|
+
buttonType: "social",
|
|
374
|
+
url: "/",
|
|
375
|
+
buttonDesign: "slide"
|
|
376
|
+
}), "\xA0", /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
377
|
+
onClick: (0, _addonActions.action)('button-click'),
|
|
378
|
+
centerIcon: "twitter",
|
|
379
|
+
hoverBgColor: "#55acee",
|
|
380
|
+
bgColor: "#55acee",
|
|
381
|
+
textColor: "white",
|
|
382
|
+
hoverTextColor: "black",
|
|
383
|
+
buttonType: "social",
|
|
384
|
+
url: "/",
|
|
385
|
+
buttonDesign: "slide"
|
|
386
|
+
}));
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
exports.AsSlideWithSocialButton = AsSlideWithSocialButton;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.btn {
|
|
2
|
-
border: 1px solid black;
|
|
3
2
|
-webkit-transform: translate3d(0, 0, 0);
|
|
4
3
|
transform: translate3d(0, 0, 0);
|
|
5
4
|
-webkit-transition: all 1s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
@@ -12,8 +11,6 @@
|
|
|
12
11
|
left: 0;
|
|
13
12
|
height: 100%;
|
|
14
13
|
width: 0;
|
|
15
|
-
background: #FFF;
|
|
16
|
-
border: 1px white;
|
|
17
14
|
content: '';
|
|
18
15
|
z-index: -1;
|
|
19
16
|
-webkit-transition: all 1s cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
@@ -37,12 +37,22 @@ const Button = _ref => {
|
|
|
37
37
|
hoverBorderColor,
|
|
38
38
|
hoverCtaText,
|
|
39
39
|
url,
|
|
40
|
-
buttonType
|
|
40
|
+
buttonType,
|
|
41
|
+
buttonDesign
|
|
41
42
|
} = _ref;
|
|
42
43
|
let classNames = className ? className : '';
|
|
43
44
|
let padding = buttonType === 'social' ? ' px-4 py-3 ' : ' px-8 ';
|
|
44
45
|
let externalPadding = buttonType === 'external' ? ' py-3 ' : ' py-2 ';
|
|
45
|
-
let
|
|
46
|
+
let standardClasses = 'rounded-lg text-black border-2 border-black border-gray-300 transition-background-color duration-500 transform ' + padding + externalPadding + classNames;
|
|
47
|
+
let slideClasses = 'btn px-8 text-white border-2 bg-gray hover:bg-brand-primary hover:text-black ' + padding + externalPadding + classNames;
|
|
48
|
+
let classes;
|
|
49
|
+
const design = buttonDesign ? buttonDesign : 'standard';
|
|
50
|
+
|
|
51
|
+
if (design === 'standard') {
|
|
52
|
+
classes = standardClasses;
|
|
53
|
+
} else if (design === 'slide') {
|
|
54
|
+
classes = slideClasses;
|
|
55
|
+
}
|
|
46
56
|
|
|
47
57
|
let iconLeft = leftIcon && /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
48
58
|
className: "pr-2",
|
|
@@ -87,14 +97,15 @@ const Button = _ref => {
|
|
|
87
97
|
|
|
88
98
|
if (buttonType === 'external') {
|
|
89
99
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
90
|
-
style: styles,
|
|
91
|
-
onMouseOver: () => setHoverState(true),
|
|
92
|
-
onMouseOut: () => setHoverState(false),
|
|
93
100
|
href: url,
|
|
94
101
|
target: "_blank",
|
|
95
|
-
className: classes,
|
|
96
102
|
rel: "noreferrer"
|
|
97
|
-
},
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
104
|
+
style: styles,
|
|
105
|
+
onMouseOver: () => setHoverState(true),
|
|
106
|
+
onMouseOut: () => setHoverState(false),
|
|
107
|
+
className: classes
|
|
108
|
+
}, leftIcon && iconLeft, hovering ? hoverCtaText ? hoverCtaText : ctaText : ctaText, rightIcon && iconRight));
|
|
98
109
|
} else if (buttonType === 'internal') {
|
|
99
110
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
100
111
|
href: url,
|
|
@@ -104,17 +115,18 @@ const Button = _ref => {
|
|
|
104
115
|
onMouseOver: () => setHoverState(true),
|
|
105
116
|
onMouseOut: () => setHoverState(false),
|
|
106
117
|
className: classes
|
|
107
|
-
}, hovering ? hoverCtaText ? hoverCtaText : ctaText : ctaText));
|
|
118
|
+
}, leftIcon && iconLeft, hovering ? hoverCtaText ? hoverCtaText : ctaText : ctaText, rightIcon && iconRight));
|
|
108
119
|
} else if (buttonType === 'social') {
|
|
109
120
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
110
|
-
style: styles,
|
|
111
|
-
onMouseOver: () => setHoverState(true),
|
|
112
|
-
onMouseOut: () => setHoverState(false),
|
|
113
|
-
className: classes,
|
|
114
121
|
href: url,
|
|
115
122
|
target: "_blank",
|
|
116
123
|
rel: "noreferrer"
|
|
117
|
-
},
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
125
|
+
style: styles,
|
|
126
|
+
onMouseOver: () => setHoverState(true),
|
|
127
|
+
onMouseOut: () => setHoverState(false),
|
|
128
|
+
className: classes
|
|
129
|
+
}, centerIcon && iconCenter));
|
|
118
130
|
}
|
|
119
131
|
|
|
120
132
|
return /*#__PURE__*/_react.default.createElement("button", _extends({
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.lotsOfCards = exports.default = exports._Card = exports.ImageCard = exports.CardWithText = exports.CardWithSlideButton = exports.CardWithImageBelowTitle = exports.CardWithImage = exports.CardWithButton = exports.CardTitleRight = exports.CardTitleLeft = exports.CardTitleBold = exports.CardRounded = void 0;
|
|
6
|
+
exports.lotsOfCards = exports.default = exports._Card = exports.ImageCard = exports.CardWithText = exports.CardWithSlideButton = exports.CardWithImageBelowTitle = exports.CardWithImage = exports.CardWithButtonStyles = exports.CardWithButton = exports.CardTitleRight = exports.CardTitleLeft = exports.CardTitleBold = exports.CardRounded = void 0;
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/es.symbol.description.js");
|
|
9
9
|
|
|
@@ -211,6 +211,32 @@ const CardWithButton = args => {
|
|
|
211
211
|
|
|
212
212
|
exports.CardWithButton = CardWithButton;
|
|
213
213
|
|
|
214
|
+
const CardWithButtonStyles = args => {
|
|
215
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
216
|
+
id: "card",
|
|
217
|
+
title: args.title,
|
|
218
|
+
titleClass: "text-center font-bold",
|
|
219
|
+
subTitle: args.subTitle,
|
|
220
|
+
extraText: args.extraText,
|
|
221
|
+
description: args.description,
|
|
222
|
+
image: "https://picsum.photos/500/300",
|
|
223
|
+
hasCta: args.hasCta,
|
|
224
|
+
ctaText: args.ctaText,
|
|
225
|
+
url: "/",
|
|
226
|
+
buttonType: "internal",
|
|
227
|
+
buttonStyle: args.buttonStyle,
|
|
228
|
+
bordered: true,
|
|
229
|
+
buttonBgColor: "blue",
|
|
230
|
+
buttonTextColor: "white",
|
|
231
|
+
buttonBorderColor: "blue",
|
|
232
|
+
hoverButtonBgColor: "white",
|
|
233
|
+
hoverButtonTextColor: "blue",
|
|
234
|
+
hoverButtonBorderColor: "blue"
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
exports.CardWithButtonStyles = CardWithButtonStyles;
|
|
239
|
+
|
|
214
240
|
const CardWithSlideButton = args => {
|
|
215
241
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
216
242
|
id: "card",
|
|
@@ -221,7 +247,13 @@ const CardWithSlideButton = args => {
|
|
|
221
247
|
description: args.description,
|
|
222
248
|
image: "https://picsum.photos/500/300",
|
|
223
249
|
hasCta: args.hasCta,
|
|
224
|
-
|
|
250
|
+
buttonDesign: "slide",
|
|
251
|
+
buttonBgColor: "red",
|
|
252
|
+
buttonTextColor: "white",
|
|
253
|
+
buttonBorderColor: "red",
|
|
254
|
+
hoverButtonTextColor: "red",
|
|
255
|
+
hoverButtonBgColor: "red",
|
|
256
|
+
hoverButtonBorderColor: "red",
|
|
225
257
|
ctaText: args.ctaText,
|
|
226
258
|
url: "/",
|
|
227
259
|
buttonType: "button",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.object.assign.js");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -15,6 +17,8 @@ var _index2 = _interopRequireDefault(require("../ButtonSlide/index"));
|
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
18
22
|
const Card = _ref => {
|
|
19
23
|
let {
|
|
20
24
|
id,
|
|
@@ -39,7 +43,13 @@ const Card = _ref => {
|
|
|
39
43
|
rounded,
|
|
40
44
|
bordered,
|
|
41
45
|
url,
|
|
42
|
-
|
|
46
|
+
buttonDesign,
|
|
47
|
+
buttonBgColor,
|
|
48
|
+
buttonTextColor,
|
|
49
|
+
buttonBorderColor,
|
|
50
|
+
hoverButtonBgColor,
|
|
51
|
+
hoverButtonTextColor,
|
|
52
|
+
hoverButtonBorderColor
|
|
43
53
|
} = _ref;
|
|
44
54
|
let titleWrapperClass = imageBelowTitle ? ' order-1 p-3 ' : ' p-3 ';
|
|
45
55
|
let contentWrapperClass = imageBelowTitle ? ' order-3 px-3 ' : ' px-3 ';
|
|
@@ -85,17 +95,20 @@ const Card = _ref => {
|
|
|
85
95
|
className: extraTextClass && extraTextClass
|
|
86
96
|
}, extraText))), hasCta && /*#__PURE__*/_react.default.createElement("div", {
|
|
87
97
|
className: btnClass
|
|
88
|
-
},
|
|
89
|
-
className: "w-full",
|
|
90
|
-
ctaText: ctaText,
|
|
91
|
-
buttonType: buttonType,
|
|
92
|
-
url: url
|
|
93
|
-
}) : /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_index.default, _extends({
|
|
94
99
|
className: "w-full",
|
|
95
100
|
ctaText: ctaText,
|
|
96
101
|
buttonType: buttonType,
|
|
97
|
-
url: url
|
|
98
|
-
|
|
102
|
+
url: url,
|
|
103
|
+
bgColor: buttonBgColor,
|
|
104
|
+
textColor: buttonTextColor,
|
|
105
|
+
borderColor: buttonBorderColor,
|
|
106
|
+
hoverBgColor: hoverButtonBgColor,
|
|
107
|
+
hoverTextColor: hoverButtonTextColor,
|
|
108
|
+
hoverBorderColor: hoverButtonBorderColor
|
|
109
|
+
}, buttonDesign && {
|
|
110
|
+
buttonDesign: buttonDesign
|
|
111
|
+
}))));
|
|
99
112
|
};
|
|
100
113
|
|
|
101
114
|
var _default = Card;
|
|
@@ -31,7 +31,7 @@ const CardImageLink = _ref => {
|
|
|
31
31
|
alt: altText,
|
|
32
32
|
className: "object-cover w-full h-full"
|
|
33
33
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
-
className: "absolute top-10 lg:top-20
|
|
34
|
+
className: "absolute top-10 lg:top-20 "
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
36
36
|
className: "text-white text-2xl"
|
|
37
37
|
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -27,7 +27,7 @@ const Jumbotron = _ref => {
|
|
|
27
27
|
src: image,
|
|
28
28
|
alt: altText
|
|
29
29
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
-
className: "absolute top-10 lg:top-20
|
|
30
|
+
className: "absolute top-10 lg:top-20"
|
|
31
31
|
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
32
32
|
className: "text-white text-4xl"
|
|
33
33
|
}, text), /*#__PURE__*/_react.default.createElement("div", {
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "Accordion", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Accordion.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "AlertBar", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -21,16 +27,16 @@ Object.defineProperty(exports, "BreadcrumbsBordered", {
|
|
|
21
27
|
return _BreadcrumbsBordered.default;
|
|
22
28
|
}
|
|
23
29
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "BreadcrumbsBorderedItem", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function get() {
|
|
27
|
-
return
|
|
33
|
+
return _BreadcrumbsBorderedItem.default;
|
|
28
34
|
}
|
|
29
35
|
});
|
|
30
|
-
Object.defineProperty(exports, "
|
|
36
|
+
Object.defineProperty(exports, "Button", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function get() {
|
|
33
|
-
return
|
|
39
|
+
return _Button.default;
|
|
34
40
|
}
|
|
35
41
|
});
|
|
36
42
|
Object.defineProperty(exports, "Card", {
|
|
@@ -51,24 +57,60 @@ Object.defineProperty(exports, "CardImageLinkList", {
|
|
|
51
57
|
return _CardImageLinkList.default;
|
|
52
58
|
}
|
|
53
59
|
});
|
|
60
|
+
Object.defineProperty(exports, "Collapsible", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _Collapsible.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "Form", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _Form.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
54
72
|
Object.defineProperty(exports, "Icon", {
|
|
55
73
|
enumerable: true,
|
|
56
74
|
get: function get() {
|
|
57
75
|
return _Icon.default;
|
|
58
76
|
}
|
|
59
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "Input", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function get() {
|
|
81
|
+
return _Input.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
60
84
|
Object.defineProperty(exports, "Jumbotron", {
|
|
61
85
|
enumerable: true,
|
|
62
86
|
get: function get() {
|
|
63
87
|
return _Jumbotron.default;
|
|
64
88
|
}
|
|
65
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "ListItem", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function get() {
|
|
93
|
+
return _ListItem.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "ListItemDropdown", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function get() {
|
|
99
|
+
return _ListItemDropdown.default;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
66
102
|
Object.defineProperty(exports, "Nav", {
|
|
67
103
|
enumerable: true,
|
|
68
104
|
get: function get() {
|
|
69
105
|
return _Nav.default;
|
|
70
106
|
}
|
|
71
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "NavItem", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function get() {
|
|
111
|
+
return _NavItem.default;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
72
114
|
Object.defineProperty(exports, "Profile", {
|
|
73
115
|
enumerable: true,
|
|
74
116
|
get: function get() {
|
|
@@ -81,6 +123,14 @@ Object.defineProperty(exports, "Search", {
|
|
|
81
123
|
return _Search.default;
|
|
82
124
|
}
|
|
83
125
|
});
|
|
126
|
+
Object.defineProperty(exports, "UserIcon", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function get() {
|
|
129
|
+
return _UserIcon.default;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
var _Accordion = _interopRequireDefault(require("./components/Accordion"));
|
|
84
134
|
|
|
85
135
|
var _index = _interopRequireDefault(require("./components/AlertBar/index"));
|
|
86
136
|
|
|
@@ -88,9 +138,9 @@ var _index2 = _interopRequireDefault(require("./components/Breadcrumbs/index"));
|
|
|
88
138
|
|
|
89
139
|
var _BreadcrumbsBordered = _interopRequireDefault(require("./components/BreadcrumbsBordered"));
|
|
90
140
|
|
|
91
|
-
var
|
|
141
|
+
var _BreadcrumbsBorderedItem = _interopRequireDefault(require("./components/BreadcrumbsBorderedItem"));
|
|
92
142
|
|
|
93
|
-
var
|
|
143
|
+
var _Button = _interopRequireDefault(require("./components/Button"));
|
|
94
144
|
|
|
95
145
|
var _Card = _interopRequireDefault(require("./components/Card"));
|
|
96
146
|
|
|
@@ -98,14 +148,28 @@ var _CardImageLink = _interopRequireDefault(require("./components/CardImageLink"
|
|
|
98
148
|
|
|
99
149
|
var _CardImageLinkList = _interopRequireDefault(require("./components/CardImageLinkList"));
|
|
100
150
|
|
|
151
|
+
var _Collapsible = _interopRequireDefault(require("./components/Collapsible"));
|
|
152
|
+
|
|
153
|
+
var _Form = _interopRequireDefault(require("./components/Form"));
|
|
154
|
+
|
|
101
155
|
var _Icon = _interopRequireDefault(require("./components/Icon"));
|
|
102
156
|
|
|
157
|
+
var _Input = _interopRequireDefault(require("./components/Input"));
|
|
158
|
+
|
|
103
159
|
var _Jumbotron = _interopRequireDefault(require("./components/Jumbotron"));
|
|
104
160
|
|
|
161
|
+
var _ListItem = _interopRequireDefault(require("./components/ListItem"));
|
|
162
|
+
|
|
163
|
+
var _ListItemDropdown = _interopRequireDefault(require("./components/ListItemDropdown"));
|
|
164
|
+
|
|
105
165
|
var _Nav = _interopRequireDefault(require("./components/Nav"));
|
|
106
166
|
|
|
167
|
+
var _NavItem = _interopRequireDefault(require("./components/NavItem"));
|
|
168
|
+
|
|
107
169
|
var _Profile = _interopRequireDefault(require("./components/Profile"));
|
|
108
170
|
|
|
109
171
|
var _Search = _interopRequireDefault(require("./components/Search"));
|
|
110
172
|
|
|
173
|
+
var _UserIcon = _interopRequireDefault(require("./components/UserIcon"));
|
|
174
|
+
|
|
111
175
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/package.json
CHANGED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports._Button = exports.WithOnClickMethod = exports.WithIconRight = exports.WithIconLeft = exports.WithBothIcons = exports.ButtonAsInternalLink = exports.ButtonAsExternalLink = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _addonActions = require("@storybook/addon-actions");
|
|
11
|
-
|
|
12
|
-
var _README = _interopRequireDefault(require("./README.md"));
|
|
13
|
-
|
|
14
|
-
var _index = _interopRequireDefault(require("./index"));
|
|
15
|
-
|
|
16
|
-
require("../../../index.css");
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
var _default = {
|
|
21
|
-
title: 'Components/ButtonSlide',
|
|
22
|
-
argTypes: {
|
|
23
|
-
text: {
|
|
24
|
-
name: 'Button Text',
|
|
25
|
-
control: {
|
|
26
|
-
type: 'text'
|
|
27
|
-
},
|
|
28
|
-
defaultValue: 'Button 1'
|
|
29
|
-
},
|
|
30
|
-
type: {
|
|
31
|
-
name: 'Type',
|
|
32
|
-
defaultValue: 'primary',
|
|
33
|
-
control: {
|
|
34
|
-
type: 'select'
|
|
35
|
-
},
|
|
36
|
-
options: ['primary', 'secondary', 'ghost']
|
|
37
|
-
},
|
|
38
|
-
iconPlacement: {
|
|
39
|
-
name: 'Icon',
|
|
40
|
-
defaultValue: 'none',
|
|
41
|
-
control: {
|
|
42
|
-
type: 'select'
|
|
43
|
-
},
|
|
44
|
-
options: ['left', 'right', 'both', 'none']
|
|
45
|
-
},
|
|
46
|
-
leftIcon: {
|
|
47
|
-
name: 'Left Icon',
|
|
48
|
-
defaultValue: 'thumbs-down',
|
|
49
|
-
control: {
|
|
50
|
-
type: 'select'
|
|
51
|
-
},
|
|
52
|
-
options: ['thumbs-up', 'thumbs-down', 'search', 'th']
|
|
53
|
-
},
|
|
54
|
-
rightIcon: {
|
|
55
|
-
name: 'Right Icon',
|
|
56
|
-
defaultValue: 'thumbs-up',
|
|
57
|
-
control: {
|
|
58
|
-
type: 'select'
|
|
59
|
-
},
|
|
60
|
-
options: ['thumbs-up', 'thumbs-down', 'search', 'th']
|
|
61
|
-
},
|
|
62
|
-
padded: {
|
|
63
|
-
name: 'Padded',
|
|
64
|
-
control: {
|
|
65
|
-
type: 'boolean'
|
|
66
|
-
},
|
|
67
|
-
defaultValue: false
|
|
68
|
-
},
|
|
69
|
-
social: {
|
|
70
|
-
name: 'Social',
|
|
71
|
-
defaultValue: 'None',
|
|
72
|
-
control: {
|
|
73
|
-
type: 'select'
|
|
74
|
-
},
|
|
75
|
-
options: ['Facebook', 'Twitter', 'Whatsapp', 'None']
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
-
className: "p-4"
|
|
80
|
-
}, story())],
|
|
81
|
-
parameters: {
|
|
82
|
-
readme: {
|
|
83
|
-
sidebar: _README.default
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
exports.default = _default;
|
|
88
|
-
|
|
89
|
-
const _Button = args => {
|
|
90
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
91
|
-
ctaText: args.text
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
exports._Button = _Button;
|
|
96
|
-
|
|
97
|
-
const WithIconRight = args => {
|
|
98
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
99
|
-
rightIcon: args.rightIcon,
|
|
100
|
-
ctaText: args.text
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
exports.WithIconRight = WithIconRight;
|
|
105
|
-
|
|
106
|
-
const WithIconLeft = args => {
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
108
|
-
leftIcon: args.leftIcon,
|
|
109
|
-
ctaText: args.text
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
exports.WithIconLeft = WithIconLeft;
|
|
114
|
-
|
|
115
|
-
const WithBothIcons = args => {
|
|
116
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
117
|
-
leftIcon: args.leftIcon,
|
|
118
|
-
rightIcon: args.rightIcon,
|
|
119
|
-
ctaText: args.text
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
exports.WithBothIcons = WithBothIcons;
|
|
124
|
-
|
|
125
|
-
const ButtonAsExternalLink = args => {
|
|
126
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
127
|
-
ctaText: args.text
|
|
128
|
-
});
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
exports.ButtonAsExternalLink = ButtonAsExternalLink;
|
|
132
|
-
|
|
133
|
-
const ButtonAsInternalLink = args => {
|
|
134
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
135
|
-
ctaText: args.text,
|
|
136
|
-
url: "/"
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
exports.ButtonAsInternalLink = ButtonAsInternalLink;
|
|
141
|
-
|
|
142
|
-
const WithOnClickMethod = args => {
|
|
143
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
144
|
-
ctaText: args.text,
|
|
145
|
-
onClick: (0, _addonActions.action)('button-click')
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
exports.WithOnClickMethod = WithOnClickMethod;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Button Slide
|
|
2
|
-
|
|
3
|
-
A button with a bit of styling
|
|
4
|
-
|
|
5
|
-
## Example
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
<Button ctaText={args.text}/>
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Parameters
|
|
14
|
-
`ctaText={string} (default=null)`
|
|
15
|
-
`className={string} (default=null)`
|
|
16
|
-
`onClick={function} (default=null)`
|
|
17
|
-
`leftIcon={string} (default=null)`
|
|
18
|
-
`rightIcon={string} (default=null)`
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _index = _interopRequireDefault(require("../Icon/index"));
|
|
11
|
-
|
|
12
|
-
require("./Styles.css");
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
const ButtonSlide = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
ctaText,
|
|
19
|
-
className,
|
|
20
|
-
onClick,
|
|
21
|
-
leftIcon,
|
|
22
|
-
rightIcon
|
|
23
|
-
} = _ref;
|
|
24
|
-
let classes = className + ' btn py-2 px-8 text-white border-2 bg-black hover:bg-white hover:text-black';
|
|
25
|
-
|
|
26
|
-
let iconLeft = /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
27
|
-
type: leftIcon
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
let iconRight = /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
31
|
-
type: rightIcon
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement("button", {
|
|
35
|
-
className: classes,
|
|
36
|
-
onClick: onClick
|
|
37
|
-
}, leftIcon && iconLeft, ctaText, rightIcon && iconRight);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var _default = ButtonSlide;
|
|
41
|
-
exports.default = _default;
|
package/dist/components/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.components = void 0;
|
|
9
|
-
|
|
10
|
-
var _components = _interopRequireWildcard(require("./"));
|
|
11
|
-
|
|
12
|
-
exports.components = _components;
|
|
13
|
-
|
|
14
|
-
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); }
|
|
15
|
-
|
|
16
|
-
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; }
|