trepur_components 0.1.6 → 0.1.7
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/babel.config.json +18 -0
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +5 -9
- package/dist/Components/Breadcrumbs/index.js +8 -16
- package/dist/Components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +5 -9
- package/dist/Components/BreadcrumbsBordered/index.js +8 -16
- package/dist/Components/Button/Button.stories.js +13 -17
- package/dist/Components/Button/index.js +12 -12
- package/dist/Components/ButtonSlide/ButtonSlide.stories.js +13 -17
- package/dist/Components/ButtonSlide/index.js +12 -12
- package/dist/Components/Card/Card.stories.js +16 -20
- package/dist/Components/Card/index.js +26 -28
- package/dist/Components/CardImageLink/CardImageLink.stories.js +10 -14
- package/dist/Components/CardImageLink/index.js +10 -10
- package/dist/Components/CardImageLinkList/CardImageLinkList.stories.js +5 -9
- package/dist/Components/CardImageLinkList/index.js +6 -8
- package/dist/Components/CardList/CardList.stories.js +5 -9
- package/dist/Components/CardList/index.js +5 -9
- package/dist/Components/Icon/Icon.stories.js +8 -12
- package/dist/Components/Icon/index.js +8 -8
- package/dist/Components/Jumbotron/Jumbotron.stories.js +8 -12
- package/dist/Components/Jumbotron/index.js +10 -10
- package/dist/Components/Nav/Nav.stories.js +9 -13
- package/dist/Components/Nav/index.js +21 -62
- package/dist/Components/Profile/Profile.stories.js +5 -9
- package/dist/Components/Profile/index.js +8 -49
- package/dist/Components/Search/Search.stories.js +8 -12
- package/dist/Components/Search/index.js +11 -13
- package/dist/Components/SignedInLinks/SignedInLinks.stories.js +5 -9
- package/dist/Components/SignedInLinks/index.js +5 -9
- package/dist/Components/SignedOutLinks/SignedOutLinks.stories.js +5 -9
- package/dist/Components/SignedOutLinks/index.js +5 -9
- package/dist/Components/test/index.js +20 -0
- package/dist/index.js +1 -31
- package/package.json +1 -1
- package/src/Components/test/index.js +11 -0
- package/.babelrc +0 -14
- package/babel.config.js +0 -4
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -20,11 +18,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
18
|
var _default = {
|
|
21
19
|
title: 'Components/CardImageLink',
|
|
22
20
|
argTypes: {},
|
|
23
|
-
decorators: [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, story());
|
|
27
|
-
}],
|
|
21
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
22
|
+
className: "p-4"
|
|
23
|
+
}, story())],
|
|
28
24
|
parameters: {
|
|
29
25
|
readme: {
|
|
30
26
|
sidebar: _README.default
|
|
@@ -33,7 +29,7 @@ var _default = {
|
|
|
33
29
|
};
|
|
34
30
|
exports.default = _default;
|
|
35
31
|
|
|
36
|
-
|
|
32
|
+
const _CardImageLink = args => {
|
|
37
33
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
38
34
|
altText: "image",
|
|
39
35
|
image: "https://picsum.photos/400/400"
|
|
@@ -42,7 +38,7 @@ var _CardImageLink = function _CardImageLink(args) {
|
|
|
42
38
|
|
|
43
39
|
exports._CardImageLink = _CardImageLink;
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
const JumbotronWithOneBtn = args => {
|
|
46
42
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
47
43
|
altText: "image",
|
|
48
44
|
image: "https://picsum.photos/400/400",
|
|
@@ -52,7 +48,7 @@ var JumbotronWithOneBtn = function JumbotronWithOneBtn(args) {
|
|
|
52
48
|
|
|
53
49
|
exports.JumbotronWithOneBtn = JumbotronWithOneBtn;
|
|
54
50
|
|
|
55
|
-
|
|
51
|
+
const JumbotronWithTwoBtns = args => {
|
|
56
52
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
57
53
|
altText: "image",
|
|
58
54
|
image: "https://picsum.photos/400/400",
|
|
@@ -63,7 +59,7 @@ var JumbotronWithTwoBtns = function JumbotronWithTwoBtns(args) {
|
|
|
63
59
|
|
|
64
60
|
exports.JumbotronWithTwoBtns = JumbotronWithTwoBtns;
|
|
65
61
|
|
|
66
|
-
|
|
62
|
+
const JumbotronWithCenterText = args => {
|
|
67
63
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
68
64
|
altText: "image",
|
|
69
65
|
image: "https://picsum.photos/400/400",
|
|
@@ -73,10 +69,10 @@ var JumbotronWithCenterText = function JumbotronWithCenterText(args) {
|
|
|
73
69
|
|
|
74
70
|
exports.JumbotronWithCenterText = JumbotronWithCenterText;
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
const lotsOfCardImageLinks = args => {
|
|
73
|
+
let cards = [];
|
|
78
74
|
|
|
79
|
-
for (
|
|
75
|
+
for (let i = 0; i < 6; i++) {
|
|
80
76
|
cards.push( /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
81
77
|
altText: "image",
|
|
82
78
|
image: "https://picsum.photos/400/400",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -11,14 +9,16 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
9
|
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
const CardImageLink = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
image,
|
|
15
|
+
altText,
|
|
16
|
+
text,
|
|
17
|
+
ctaText,
|
|
18
|
+
ctaLink,
|
|
19
|
+
classes
|
|
20
|
+
} = _ref;
|
|
21
|
+
const classList = "cursor-pointer relative lg:mx-3 md:mx-1 mx-1 lg:mb-5 md:mb-2 mb-2 w-auto hover:opacity-50 overflow-hidden " + classes;
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
23
|
className: classList
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -17,7 +15,7 @@ require("../../index.css");
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
const list = [{
|
|
21
19
|
"HeightRank": 1,
|
|
22
20
|
"Name": "Scafell Pike",
|
|
23
21
|
"Section": "34B: LD C&W",
|
|
@@ -45,11 +43,9 @@ var list = [{
|
|
|
45
43
|
var _default = {
|
|
46
44
|
title: 'Components/CardImageLinkList',
|
|
47
45
|
argTypes: {},
|
|
48
|
-
decorators: [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, story());
|
|
52
|
-
}],
|
|
46
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: "p-4"
|
|
48
|
+
}, story())],
|
|
53
49
|
parameters: {
|
|
54
50
|
readme: {
|
|
55
51
|
sidebar: _README.default
|
|
@@ -58,7 +54,7 @@ var _default = {
|
|
|
58
54
|
};
|
|
59
55
|
exports.default = _default;
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
const _CardImageLinkList = args => {
|
|
62
58
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
63
59
|
list: list
|
|
64
60
|
});
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
7
|
|
|
10
|
-
require("core-js/modules/es.array.map.js");
|
|
11
|
-
|
|
12
8
|
require("core-js/modules/es.regexp.exec.js");
|
|
13
9
|
|
|
14
10
|
require("core-js/modules/es.string.replace.js");
|
|
@@ -17,12 +13,14 @@ var _index = _interopRequireDefault(require("../CardImageLink/index"));
|
|
|
17
13
|
|
|
18
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
const CardImageLinkList = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
list
|
|
19
|
+
} = _ref;
|
|
22
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
21
|
className: "grid md:grid-cols-4 sm:grid-cols-2"
|
|
24
|
-
}, list && list.map(
|
|
25
|
-
|
|
22
|
+
}, list && list.map((item, i) => {
|
|
23
|
+
const link = '/wainwright/' + item.Name.replace(/\s+/g, '');
|
|
26
24
|
return /*#__PURE__*/React.createElement(_index.default, {
|
|
27
25
|
altText: "image",
|
|
28
26
|
image: '/' + item.Name.replace(/\s+/g, '') + '.jpeg' || 'https://picsum.photos/400/400',
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -19,7 +17,7 @@ require("../../index.css");
|
|
|
19
17
|
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
const list = [/*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
23
21
|
id: "card",
|
|
24
22
|
title: "This is a title",
|
|
25
23
|
titleClass: "font-bold",
|
|
@@ -35,11 +33,9 @@ var list = [/*#__PURE__*/_react.default.createElement(_index2.default, {
|
|
|
35
33
|
var _default = {
|
|
36
34
|
title: 'Components/CardList',
|
|
37
35
|
argTypes: {},
|
|
38
|
-
decorators: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, story());
|
|
42
|
-
}],
|
|
36
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
+
className: "p-4"
|
|
38
|
+
}, story())],
|
|
43
39
|
parameters: {
|
|
44
40
|
readme: {
|
|
45
41
|
sidebar: _README.default
|
|
@@ -48,7 +44,7 @@ var _default = {
|
|
|
48
44
|
};
|
|
49
45
|
exports.default = _default;
|
|
50
46
|
|
|
51
|
-
|
|
47
|
+
const _Cardlist = () => {
|
|
52
48
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
53
49
|
list: list
|
|
54
50
|
});
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
7
|
|
|
10
|
-
require("core-js/modules/es.array.map.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.function.name.js");
|
|
13
|
-
|
|
14
8
|
var _index = _interopRequireDefault(require("../Card/index"));
|
|
15
9
|
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
11
|
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
const CardList = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
list
|
|
15
|
+
} = _ref;
|
|
20
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
17
|
className: "flex"
|
|
22
|
-
}, list && list.map(
|
|
18
|
+
}, list && list.map(item => {
|
|
23
19
|
return /*#__PURE__*/React.createElement(_index.default, {
|
|
24
20
|
id: "card",
|
|
25
21
|
title: item.name,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -19,11 +17,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
17
|
|
|
20
18
|
var _default = {
|
|
21
19
|
title: 'Components/Icon',
|
|
22
|
-
decorators: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, story());
|
|
26
|
-
}],
|
|
20
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: "p-4"
|
|
22
|
+
}, story())],
|
|
27
23
|
parameters: {
|
|
28
24
|
readme: {
|
|
29
25
|
sidebar: _README.default
|
|
@@ -32,7 +28,7 @@ var _default = {
|
|
|
32
28
|
};
|
|
33
29
|
exports.default = _default;
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
const _Icon = args => {
|
|
36
32
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
37
33
|
type: "thumbs-up"
|
|
38
34
|
});
|
|
@@ -40,7 +36,7 @@ var _Icon = function _Icon(args) {
|
|
|
40
36
|
|
|
41
37
|
exports._Icon = _Icon;
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
const withSizeTwo = args => {
|
|
44
40
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
45
41
|
type: "thumbs-up",
|
|
46
42
|
size: "2"
|
|
@@ -49,7 +45,7 @@ var withSizeTwo = function withSizeTwo(args) {
|
|
|
49
45
|
|
|
50
46
|
exports.withSizeTwo = withSizeTwo;
|
|
51
47
|
|
|
52
|
-
|
|
48
|
+
const withSizeThree = args => {
|
|
53
49
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
54
50
|
type: "thumbs-up",
|
|
55
51
|
size: "3"
|
|
@@ -58,7 +54,7 @@ var withSizeThree = function withSizeThree(args) {
|
|
|
58
54
|
|
|
59
55
|
exports.withSizeThree = withSizeThree;
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
const withSizeFour = args => {
|
|
62
58
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
63
59
|
type: "thumbs-up",
|
|
64
60
|
size: "4"
|
|
@@ -67,7 +63,7 @@ var withSizeFour = function withSizeFour(args) {
|
|
|
67
63
|
|
|
68
64
|
exports.withSizeFour = withSizeFour;
|
|
69
65
|
|
|
70
|
-
|
|
66
|
+
const withSizeFive = args => {
|
|
71
67
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
72
68
|
type: "thumbs-up",
|
|
73
69
|
size: "5"
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -17,13 +15,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
15
|
|
|
18
16
|
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); }
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const Icon = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
type,
|
|
21
|
+
size,
|
|
22
|
+
className,
|
|
23
|
+
onClick
|
|
24
|
+
} = _ref;
|
|
25
25
|
if (!type) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
|
|
26
|
-
|
|
26
|
+
let classList = "fa fa-".concat(type, " fa-x ");
|
|
27
27
|
classList += size ? "fa-".concat(size, "x ") : "";
|
|
28
28
|
classList += className ? " ".concat(className) : "";
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement("span", _extends({
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -19,11 +17,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
17
|
|
|
20
18
|
var _default = {
|
|
21
19
|
title: 'Components/Jumbotron',
|
|
22
|
-
decorators: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, story());
|
|
26
|
-
}],
|
|
20
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
+
className: "p-4"
|
|
22
|
+
}, story())],
|
|
27
23
|
parameters: {
|
|
28
24
|
readme: {
|
|
29
25
|
sidebar: _README.default
|
|
@@ -32,7 +28,7 @@ var _default = {
|
|
|
32
28
|
};
|
|
33
29
|
exports.default = _default;
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
const _Jumbotron = args => {
|
|
36
32
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
37
33
|
altText: "image",
|
|
38
34
|
image: "https://picsum.photos/1500/400"
|
|
@@ -41,7 +37,7 @@ var _Jumbotron = function _Jumbotron(args) {
|
|
|
41
37
|
|
|
42
38
|
exports._Jumbotron = _Jumbotron;
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
const JumbotronWithOneBtn = args => {
|
|
45
41
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
46
42
|
altText: "image",
|
|
47
43
|
image: "https://picsum.photos/1500/400",
|
|
@@ -51,7 +47,7 @@ var JumbotronWithOneBtn = function JumbotronWithOneBtn(args) {
|
|
|
51
47
|
|
|
52
48
|
exports.JumbotronWithOneBtn = JumbotronWithOneBtn;
|
|
53
49
|
|
|
54
|
-
|
|
50
|
+
const JumbotronWithTwoBtns = args => {
|
|
55
51
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
56
52
|
altText: "image",
|
|
57
53
|
image: "https://picsum.photos/1500/400",
|
|
@@ -62,7 +58,7 @@ var JumbotronWithTwoBtns = function JumbotronWithTwoBtns(args) {
|
|
|
62
58
|
|
|
63
59
|
exports.JumbotronWithTwoBtns = JumbotronWithTwoBtns;
|
|
64
60
|
|
|
65
|
-
|
|
61
|
+
const JumbotronWithCenterText = args => {
|
|
66
62
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
67
63
|
altText: "image",
|
|
68
64
|
image: "https://picsum.photos/1500/400",
|
|
@@ -72,7 +68,7 @@ var JumbotronWithCenterText = function JumbotronWithCenterText(args) {
|
|
|
72
68
|
|
|
73
69
|
exports.JumbotronWithCenterText = JumbotronWithCenterText;
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
const JumbotronWithTextAndBtns = args => {
|
|
76
72
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
77
73
|
altText: "image",
|
|
78
74
|
image: "https://picsum.photos/1500/400",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -11,14 +9,16 @@ var _index = _interopRequireDefault(require("../Button/index"));
|
|
|
11
9
|
|
|
12
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
const Jumbotron = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
image,
|
|
15
|
+
altText,
|
|
16
|
+
text,
|
|
17
|
+
ctaText,
|
|
18
|
+
ctaText2,
|
|
19
|
+
ctaLink,
|
|
20
|
+
ctaLink2
|
|
21
|
+
} = _ref;
|
|
22
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
23
|
className: "w-screen text-center"
|
|
24
24
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.object.define-property.js");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -17,7 +15,7 @@ require("../../index.css");
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
const links = [{
|
|
21
19
|
name: 'link 1',
|
|
22
20
|
reference: '/'
|
|
23
21
|
}, {
|
|
@@ -33,11 +31,9 @@ var links = [{
|
|
|
33
31
|
var _default = {
|
|
34
32
|
title: 'Components/Nav',
|
|
35
33
|
argTypes: {},
|
|
36
|
-
decorators: [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, story());
|
|
40
|
-
}],
|
|
34
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
+
className: "p-4"
|
|
36
|
+
}, story())],
|
|
41
37
|
parameters: {
|
|
42
38
|
readme: {
|
|
43
39
|
sidebar: _README.default
|
|
@@ -46,7 +42,7 @@ var _default = {
|
|
|
46
42
|
};
|
|
47
43
|
exports.default = _default;
|
|
48
44
|
|
|
49
|
-
|
|
45
|
+
const _Nav = args => {
|
|
50
46
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
51
47
|
links: links,
|
|
52
48
|
navPosition: "1",
|
|
@@ -58,7 +54,7 @@ var _Nav = function _Nav(args) {
|
|
|
58
54
|
|
|
59
55
|
exports._Nav = _Nav;
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
const NavWithSearch = () => {
|
|
62
58
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
63
59
|
links: links,
|
|
64
60
|
navPosition: "1",
|
|
@@ -71,7 +67,7 @@ var NavWithSearch = function NavWithSearch() {
|
|
|
71
67
|
|
|
72
68
|
exports.NavWithSearch = NavWithSearch;
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
const NavWithProfile = () => {
|
|
75
71
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
76
72
|
links: links,
|
|
77
73
|
navPosition: "1",
|
|
@@ -84,7 +80,7 @@ var NavWithProfile = function NavWithProfile() {
|
|
|
84
80
|
|
|
85
81
|
exports.NavWithProfile = NavWithProfile;
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
const NavWithSearchAndProfile = () => {
|
|
88
84
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
89
85
|
links: links,
|
|
90
86
|
navPosition: "1",
|
|
@@ -98,7 +94,7 @@ var NavWithSearchAndProfile = function NavWithSearchAndProfile() {
|
|
|
98
94
|
|
|
99
95
|
exports.NavWithSearchAndProfile = NavWithSearchAndProfile;
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
const NavAligned = () => {
|
|
102
98
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
103
99
|
links: links,
|
|
104
100
|
navPosition: "1",
|
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("core-js/modules/es.symbol.js");
|
|
4
|
-
|
|
5
|
-
require("core-js/modules/es.symbol.description.js");
|
|
6
|
-
|
|
7
|
-
require("core-js/modules/es.object.to-string.js");
|
|
8
|
-
|
|
9
|
-
require("core-js/modules/es.symbol.iterator.js");
|
|
10
|
-
|
|
11
|
-
require("core-js/modules/es.array.iterator.js");
|
|
12
|
-
|
|
13
|
-
require("core-js/modules/es.string.iterator.js");
|
|
14
|
-
|
|
15
|
-
require("core-js/modules/web.dom-collections.iterator.js");
|
|
16
|
-
|
|
17
|
-
require("core-js/modules/es.array.slice.js");
|
|
18
|
-
|
|
19
|
-
require("core-js/modules/es.array.from.js");
|
|
20
|
-
|
|
21
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
22
|
-
|
|
23
|
-
require("core-js/modules/es.object.define-property.js");
|
|
24
|
-
|
|
25
3
|
Object.defineProperty(exports, "__esModule", {
|
|
26
4
|
value: true
|
|
27
5
|
});
|
|
28
6
|
exports.default = void 0;
|
|
29
7
|
|
|
30
|
-
require("core-js/modules/
|
|
31
|
-
|
|
32
|
-
require("core-js/modules/es.function.name.js");
|
|
8
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
33
9
|
|
|
34
10
|
var _react = require("react");
|
|
35
11
|
|
|
@@ -39,34 +15,19 @@ var _index2 = _interopRequireDefault(require("../Search/index"));
|
|
|
39
15
|
|
|
40
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
17
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var links = _ref.links,
|
|
56
|
-
navPosition = _ref.navPosition,
|
|
57
|
-
alignNavAndLogo = _ref.alignNavAndLogo,
|
|
58
|
-
navClass = _ref.navClass,
|
|
59
|
-
navLinkClass = _ref.navLinkClass,
|
|
60
|
-
logoClass = _ref.logoClass,
|
|
61
|
-
showSearch = _ref.showSearch,
|
|
62
|
-
showProfile = _ref.showProfile;
|
|
63
|
-
|
|
64
|
-
var _useState = (0, _react.useState)(false),
|
|
65
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
66
|
-
mobileMenuState = _useState2[0],
|
|
67
|
-
setmobileMenuState = _useState2[1];
|
|
68
|
-
|
|
69
|
-
var profileLinks = [{
|
|
18
|
+
const Header = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
links,
|
|
21
|
+
navPosition,
|
|
22
|
+
alignNavAndLogo,
|
|
23
|
+
navClass,
|
|
24
|
+
navLinkClass,
|
|
25
|
+
logoClass,
|
|
26
|
+
showSearch,
|
|
27
|
+
showProfile
|
|
28
|
+
} = _ref;
|
|
29
|
+
const [mobileMenuState, setmobileMenuState] = (0, _react.useState)(false);
|
|
30
|
+
const profileLinks = [{
|
|
70
31
|
name: 'PROFILE ITEM 1',
|
|
71
32
|
reference: '/'
|
|
72
33
|
}, {
|
|
@@ -79,9 +40,9 @@ var Header = function Header(_ref) {
|
|
|
79
40
|
name: 'PROFILE ITEM 4',
|
|
80
41
|
reference: '/'
|
|
81
42
|
}];
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
43
|
+
let combinedLogoClass = logoClass + ' hidden sm:inline-flex flex-1 flex items-center justify-center sm:items-stretch ';
|
|
44
|
+
let combinedMobileLogoClass = logoClass + ' sm:hidden block flex-1 flex items-center justify-center sm:items-stretch ';
|
|
45
|
+
let linkContainerClass = 'flex-1 flex items-center justify-center sm:items-stretch ';
|
|
85
46
|
|
|
86
47
|
if (alignNavAndLogo) {
|
|
87
48
|
combinedLogoClass = ' hidden sm:inline-flex pl-4 pt-8 absolute inset-y-0 h-8 left-0 flex items-center';
|
|
@@ -113,9 +74,7 @@ var Header = function Header(_ref) {
|
|
|
113
74
|
id: "nav-collapse-btn-wrapper",
|
|
114
75
|
className: "absolute inset-y-0 left-0 flex items-center"
|
|
115
76
|
}, /*#__PURE__*/React.createElement("button", {
|
|
116
|
-
onClick:
|
|
117
|
-
return setmobileMenuState(!mobileMenuState);
|
|
118
|
-
},
|
|
77
|
+
onClick: () => setmobileMenuState(!mobileMenuState),
|
|
119
78
|
type: "button",
|
|
120
79
|
className: "inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-black hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",
|
|
121
80
|
"aria-controls": "mobile-menu",
|
|
@@ -164,7 +123,7 @@ var Header = function Header(_ref) {
|
|
|
164
123
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
165
124
|
id: "nav-list",
|
|
166
125
|
className: "list-none mx-auto flex flex-1"
|
|
167
|
-
}, links && links.map(
|
|
126
|
+
}, links && links.map(link => {
|
|
168
127
|
return /*#__PURE__*/React.createElement("li", {
|
|
169
128
|
key: link.name,
|
|
170
129
|
className: "flex px-4",
|
|
@@ -188,14 +147,14 @@ var Header = function Header(_ref) {
|
|
|
188
147
|
className: "flex flex-1 ml-4"
|
|
189
148
|
}), /*#__PURE__*/React.createElement("div", {
|
|
190
149
|
className: "px-2 pt-2 pb-3 space-y-1"
|
|
191
|
-
}, links && links.map(
|
|
150
|
+
}, links && links.map(link => {
|
|
192
151
|
return /*#__PURE__*/React.createElement("a", {
|
|
193
152
|
key: link.name,
|
|
194
153
|
href: link.reference,
|
|
195
154
|
className: "text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium",
|
|
196
155
|
"aria-current": "page"
|
|
197
156
|
}, link.name);
|
|
198
|
-
}), showProfile && profileLinks && profileLinks.map(
|
|
157
|
+
}), showProfile && profileLinks && profileLinks.map(link => {
|
|
199
158
|
return /*#__PURE__*/React.createElement("a", {
|
|
200
159
|
key: link.name,
|
|
201
160
|
href: link.reference,
|