trepur_components 0.1.39 → 0.1.43
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/Column/index.js +1 -1
- package/dist/components/Image/Image.stories.js +62 -0
- package/dist/components/Image/README.md +12 -0
- package/dist/components/Image/index.js +31 -0
- package/dist/components/Nav/Nav.stories.js +253 -129
- package/dist/components/Nav/README.md +11 -26
- package/dist/components/Nav/index.js +88 -179
- package/dist/components/Profile/index.js +10 -3
- package/dist/components/Search/Search.stories.js +13 -2
- package/dist/components/Search/index.js +2 -2
- package/dist/components/TextAndTitle/index.js +9 -3
- package/dist/index.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Image = 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
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
17
|
+
|
|
18
|
+
var _logoWhite = _interopRequireDefault(require("../../Assets/Images/logoWhite.png"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: 'Components/Image',
|
|
24
|
+
argTypes: {
|
|
25
|
+
width: {
|
|
26
|
+
name: 'Type',
|
|
27
|
+
description: 'The name of the icon you wish to use',
|
|
28
|
+
control: {
|
|
29
|
+
type: 'text'
|
|
30
|
+
},
|
|
31
|
+
defaultValue: 'search'
|
|
32
|
+
},
|
|
33
|
+
height: {
|
|
34
|
+
name: 'Size',
|
|
35
|
+
description: 'an integer between 1 and 5 to dictage the magnification of the icon',
|
|
36
|
+
control: {
|
|
37
|
+
type: 'number'
|
|
38
|
+
},
|
|
39
|
+
defaultValue: 1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: "p-4"
|
|
44
|
+
}, story())],
|
|
45
|
+
parameters: {
|
|
46
|
+
readme: {
|
|
47
|
+
content: _README.default
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.default = _default;
|
|
52
|
+
|
|
53
|
+
const _Image = args => {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
55
|
+
altText: "logo",
|
|
56
|
+
image: _logoWhite.default,
|
|
57
|
+
height: "32",
|
|
58
|
+
width: "32"
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
exports._Image = _Image;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const Image = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
image,
|
|
15
|
+
altText,
|
|
16
|
+
height,
|
|
17
|
+
width,
|
|
18
|
+
classNames
|
|
19
|
+
} = _ref;
|
|
20
|
+
const imgWidth = width && 'w-' + width;
|
|
21
|
+
const imgHeight = height && 'h-' + height;
|
|
22
|
+
const classes = imgWidth + ' ' + imgHeight + ' ' + classNames;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
24
|
+
className: classes,
|
|
25
|
+
src: image,
|
|
26
|
+
alt: altText
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _default = Image;
|
|
31
|
+
exports.default = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports._NavWithTwoRows = exports._NavWithThreeRows = exports._NavWithOneRow = exports._Nav = exports.WithTwoRowsAsSideBar = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,12 +11,22 @@ var _README = _interopRequireDefault(require("./README.md"));
|
|
|
11
11
|
|
|
12
12
|
var _index = _interopRequireDefault(require("./index"));
|
|
13
13
|
|
|
14
|
-
require("../../../index.css");
|
|
15
|
-
|
|
16
14
|
var _user = _interopRequireDefault(require("../../Assets/Images/user.jpeg"));
|
|
17
15
|
|
|
18
16
|
var _logoWhite = _interopRequireDefault(require("../../Assets/Images/logoWhite.png"));
|
|
19
17
|
|
|
18
|
+
var _Image = _interopRequireDefault(require("../Image"));
|
|
19
|
+
|
|
20
|
+
var _Profile = _interopRequireDefault(require("../Profile"));
|
|
21
|
+
|
|
22
|
+
var _TextAndTitle = _interopRequireDefault(require("../TextAndTitle"));
|
|
23
|
+
|
|
24
|
+
var _Search = _interopRequireDefault(require("../Search"));
|
|
25
|
+
|
|
26
|
+
var _NavItem = _interopRequireDefault(require("../NavItem"));
|
|
27
|
+
|
|
28
|
+
require("../../../index.css");
|
|
29
|
+
|
|
20
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
31
|
|
|
22
32
|
const links = [{
|
|
@@ -32,6 +42,211 @@ const links = [{
|
|
|
32
42
|
name: 'link n',
|
|
33
43
|
reference: '/'
|
|
34
44
|
}];
|
|
45
|
+
const rowOneOfOne = [{
|
|
46
|
+
classNames: 'mx-auto h-full flex-none',
|
|
47
|
+
xsColumnWidth: 3,
|
|
48
|
+
smColumnWidth: 2,
|
|
49
|
+
mdColumnWidth: 1,
|
|
50
|
+
lgColumnWidth: 1,
|
|
51
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
52
|
+
classNames: "mx-auto",
|
|
53
|
+
height: "full",
|
|
54
|
+
width: "auto",
|
|
55
|
+
image: _logoWhite.default,
|
|
56
|
+
altText: "Logo"
|
|
57
|
+
})
|
|
58
|
+
}, {
|
|
59
|
+
columnClasses: 'hidden lg:inline-flex',
|
|
60
|
+
classNames: '',
|
|
61
|
+
mdColumnWidth: 3,
|
|
62
|
+
lgColumnWidth: 2,
|
|
63
|
+
component: null
|
|
64
|
+
}, {
|
|
65
|
+
classNames: 'pt-5 ',
|
|
66
|
+
xsColumnWidth: 9,
|
|
67
|
+
smColumnWidth: 10,
|
|
68
|
+
mdColumnWidth: 4,
|
|
69
|
+
lgColumnWidth: 5,
|
|
70
|
+
component: /*#__PURE__*/_react.default.createElement("ul", {
|
|
71
|
+
id: "nav-list",
|
|
72
|
+
className: "flex justify-center items-center"
|
|
73
|
+
}, links && links.map(link => {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_NavItem.default, {
|
|
75
|
+
name: link.name,
|
|
76
|
+
url: link.reference,
|
|
77
|
+
borderColor: "black",
|
|
78
|
+
textColor: "black",
|
|
79
|
+
bgColor: "",
|
|
80
|
+
hoverBorderColor: "blue",
|
|
81
|
+
hoverTextColor: "blue",
|
|
82
|
+
hoverBgColor: "white",
|
|
83
|
+
bordered: true,
|
|
84
|
+
rounded: true
|
|
85
|
+
});
|
|
86
|
+
}))
|
|
87
|
+
}, {
|
|
88
|
+
columnClasses: 'hidden lg:inline-flex',
|
|
89
|
+
classNames: 'pt-2 mx-auto',
|
|
90
|
+
smColumnWidth: 1,
|
|
91
|
+
mdColumnWidth: 3,
|
|
92
|
+
lgColumnWidth: 4,
|
|
93
|
+
component: /*#__PURE__*/_react.default.createElement(_TextAndTitle.default, {
|
|
94
|
+
classNames: "md:pr-4 text-white",
|
|
95
|
+
title: "irupertbennett@gmail.com"
|
|
96
|
+
})
|
|
97
|
+
}];
|
|
98
|
+
const firstRowClasses = 'py-2';
|
|
99
|
+
const secondRowClasses = '';
|
|
100
|
+
const thirdRowClasses = 'py-2';
|
|
101
|
+
const rowOneOfTwo = [{
|
|
102
|
+
columnClasses: 'xs:hidden md:inline-flex',
|
|
103
|
+
classNames: 'pt-2 mx-auto',
|
|
104
|
+
smColumnWidth: 5,
|
|
105
|
+
mdColumnWidth: 5,
|
|
106
|
+
lgColumnWidth: 5,
|
|
107
|
+
component: null
|
|
108
|
+
}, {
|
|
109
|
+
classNames: 'mx-auto h-full',
|
|
110
|
+
smColumnWidth: 2,
|
|
111
|
+
mdColumnWidth: 2,
|
|
112
|
+
lgColumnWidth: 2,
|
|
113
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
114
|
+
classNames: "mx-auto",
|
|
115
|
+
height: "full",
|
|
116
|
+
width: "auto",
|
|
117
|
+
image: _logoWhite.default,
|
|
118
|
+
altText: "Logo"
|
|
119
|
+
})
|
|
120
|
+
}, {
|
|
121
|
+
columnClasses: 'lg:inline-flex hidden',
|
|
122
|
+
classNames: '',
|
|
123
|
+
mdColumnWidth: 1,
|
|
124
|
+
lgColumnWidth: 2,
|
|
125
|
+
component: null
|
|
126
|
+
}, {
|
|
127
|
+
classNames: 'pt-3',
|
|
128
|
+
smColumnWidth: 3,
|
|
129
|
+
mdColumnWidth: 3,
|
|
130
|
+
lgColumnWidth: 2,
|
|
131
|
+
component: /*#__PURE__*/_react.default.createElement(_Search.default, {
|
|
132
|
+
placeholder: "search"
|
|
133
|
+
})
|
|
134
|
+
}, {
|
|
135
|
+
classNames: 'h-full pt-2 mx-auto pr-4 ',
|
|
136
|
+
smColumnWidth: 2,
|
|
137
|
+
mdColumnWidth: 1,
|
|
138
|
+
lgColumnWidth: 1,
|
|
139
|
+
component: /*#__PURE__*/_react.default.createElement(_Profile.default, {
|
|
140
|
+
imageHeight: "12",
|
|
141
|
+
imageWidth: "auto",
|
|
142
|
+
profileLinks: links,
|
|
143
|
+
userImage: _user.default,
|
|
144
|
+
rounded: true
|
|
145
|
+
})
|
|
146
|
+
}];
|
|
147
|
+
const rowTwoOfTwo = [{
|
|
148
|
+
columnClasses: 'hidden',
|
|
149
|
+
classNames: '',
|
|
150
|
+
component: null
|
|
151
|
+
}, {
|
|
152
|
+
classNames: '',
|
|
153
|
+
smColumnWidth: 12,
|
|
154
|
+
mdColumnWidth: 12,
|
|
155
|
+
lgColumnWidth: 12,
|
|
156
|
+
component: /*#__PURE__*/_react.default.createElement("ul", {
|
|
157
|
+
id: "nav-list",
|
|
158
|
+
className: "flex justify-center items-center pt-5"
|
|
159
|
+
}, links && links.map(link => {
|
|
160
|
+
return /*#__PURE__*/_react.default.createElement(_NavItem.default, {
|
|
161
|
+
name: link.name,
|
|
162
|
+
url: link.reference,
|
|
163
|
+
borderColor: "black",
|
|
164
|
+
textColor: "black",
|
|
165
|
+
bgColor: "",
|
|
166
|
+
hoverBorderColor: "blue",
|
|
167
|
+
hoverTextColor: "blue",
|
|
168
|
+
hoverBgColor: "white",
|
|
169
|
+
bordered: true,
|
|
170
|
+
rounded: true
|
|
171
|
+
});
|
|
172
|
+
}))
|
|
173
|
+
}, {
|
|
174
|
+
columnClasses: 'hidden',
|
|
175
|
+
classNames: '',
|
|
176
|
+
component: null
|
|
177
|
+
}];
|
|
178
|
+
const mobileItems = [{
|
|
179
|
+
classNames: 'pt-3',
|
|
180
|
+
component: /*#__PURE__*/_react.default.createElement(_Search.default, {
|
|
181
|
+
placeholder: "search"
|
|
182
|
+
})
|
|
183
|
+
}, {
|
|
184
|
+
classNames: '',
|
|
185
|
+
component: /*#__PURE__*/_react.default.createElement(_Profile.default, {
|
|
186
|
+
imageHeight: "12",
|
|
187
|
+
imageWidth: "auto",
|
|
188
|
+
profileLinks: links,
|
|
189
|
+
userImage: _user.default,
|
|
190
|
+
rounded: true
|
|
191
|
+
})
|
|
192
|
+
}, {
|
|
193
|
+
classNames: '',
|
|
194
|
+
component: /*#__PURE__*/_react.default.createElement("ul", {
|
|
195
|
+
id: "nav-list",
|
|
196
|
+
className: ""
|
|
197
|
+
}, links && links.map(link => {
|
|
198
|
+
return /*#__PURE__*/_react.default.createElement(_NavItem.default, {
|
|
199
|
+
name: link.name,
|
|
200
|
+
url: link.reference,
|
|
201
|
+
bgColor: "#38B6FF",
|
|
202
|
+
textColor: "white",
|
|
203
|
+
hoverTextColor: "#38B6FF",
|
|
204
|
+
hoverBgColor: "white",
|
|
205
|
+
rounded: true
|
|
206
|
+
});
|
|
207
|
+
}))
|
|
208
|
+
}];
|
|
209
|
+
const thirdRow = [{
|
|
210
|
+
smColumnWidth: 6,
|
|
211
|
+
mdColumnWidth: 4,
|
|
212
|
+
lgColumnWidth: 4,
|
|
213
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
214
|
+
classNames: "mx-auto h-full",
|
|
215
|
+
height: "32",
|
|
216
|
+
width: "auto",
|
|
217
|
+
image: _logoWhite.default,
|
|
218
|
+
altText: "Logo"
|
|
219
|
+
})
|
|
220
|
+
}, {
|
|
221
|
+
smColumnWidth: 0,
|
|
222
|
+
mdColumnWidth: 4,
|
|
223
|
+
lgColumnWidth: 4,
|
|
224
|
+
component: null
|
|
225
|
+
}, {
|
|
226
|
+
smColumnWidth: 6,
|
|
227
|
+
mdColumnWidth: 4,
|
|
228
|
+
lgColumnWidth: 4,
|
|
229
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
230
|
+
classNames: "mx-auto h-full",
|
|
231
|
+
height: "32",
|
|
232
|
+
width: "auto",
|
|
233
|
+
image: _logoWhite.default,
|
|
234
|
+
altText: "Logo"
|
|
235
|
+
})
|
|
236
|
+
}];
|
|
237
|
+
const profileLinks = [{
|
|
238
|
+
name: 'PROFILE ITEM 1',
|
|
239
|
+
reference: '/'
|
|
240
|
+
}, {
|
|
241
|
+
name: 'PROFILE ITEM 2',
|
|
242
|
+
reference: '/'
|
|
243
|
+
}, {
|
|
244
|
+
name: 'PROFILE ITEM 3',
|
|
245
|
+
reference: '/'
|
|
246
|
+
}, {
|
|
247
|
+
name: 'PROFILE ITEM 4',
|
|
248
|
+
reference: '/'
|
|
249
|
+
}];
|
|
35
250
|
var _default = {
|
|
36
251
|
title: 'Components/Nav',
|
|
37
252
|
argTypes: {},
|
|
@@ -46,153 +261,62 @@ exports.default = _default;
|
|
|
46
261
|
|
|
47
262
|
const _Nav = args => {
|
|
48
263
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
navItemRounded: false
|
|
264
|
+
firstRow: rowOneOfTwo,
|
|
265
|
+
secondRow: rowTwoOfTwo,
|
|
266
|
+
thirdRow: thirdRow,
|
|
267
|
+
mobileItems: mobileItems
|
|
54
268
|
});
|
|
55
269
|
};
|
|
56
270
|
|
|
57
271
|
exports._Nav = _Nav;
|
|
58
272
|
|
|
59
|
-
const
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
61
|
-
links: links,
|
|
62
|
-
navPosition: "1" //center
|
|
63
|
-
,
|
|
64
|
-
navClass: "py-4",
|
|
65
|
-
logoImage: _logoWhite.default,
|
|
66
|
-
icon: _user.default,
|
|
67
|
-
navItemBorderColor: "white",
|
|
68
|
-
navItemTextColor: "white",
|
|
69
|
-
navItemBgColor: "#38B6FF",
|
|
70
|
-
hoverNavItemBorderColor: "#38B6FF",
|
|
71
|
-
hoverNavItemTextColor: "#38B6FF",
|
|
72
|
-
hoverNavItemBgColor: "white",
|
|
73
|
-
bgColor: "#38B6FF",
|
|
74
|
-
navItemBordered: true,
|
|
75
|
-
navItemRounded: true,
|
|
76
|
-
showProfile: false,
|
|
77
|
-
showSearch: false,
|
|
78
|
-
alignNavAndLogo: false,
|
|
79
|
-
navItemLinkClassNames: "py-1",
|
|
80
|
-
mobileNavItemBordered: false,
|
|
81
|
-
mobileNavItemRounded: true,
|
|
82
|
-
mobileNavItemLinkClassNames: "",
|
|
83
|
-
mobileNavItemClassNames: "",
|
|
84
|
-
mobileNavButtonBgColor: "#38B6FF",
|
|
85
|
-
mobileNavButtonColor: "white",
|
|
86
|
-
hoverMobileNavButtonBgColor: "white",
|
|
87
|
-
hoverMobileNavButtonColor: "#38B6FF"
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
exports._NavWithColors = _NavWithColors;
|
|
92
|
-
|
|
93
|
-
const NavWithSearch = () => {
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
95
|
-
links: links,
|
|
96
|
-
navPosition: "1",
|
|
97
|
-
navClass: "bg-brand-primary",
|
|
98
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
99
|
-
logoClass: "py-4",
|
|
100
|
-
showSearch: true,
|
|
101
|
-
logoImage: _logoWhite.default
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
exports.NavWithSearch = NavWithSearch;
|
|
106
|
-
|
|
107
|
-
const NavWithProfile = () => {
|
|
108
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
109
|
-
links: links,
|
|
110
|
-
navPosition: "1",
|
|
111
|
-
navClass: "bg-brand-primary",
|
|
112
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
113
|
-
logoClass: "py-4",
|
|
114
|
-
showProfile: true,
|
|
115
|
-
icon: _user.default,
|
|
116
|
-
logoImage: _logoWhite.default
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
exports.NavWithProfile = NavWithProfile;
|
|
121
|
-
|
|
122
|
-
const NavWithSearchAndProfile = () => {
|
|
273
|
+
const _NavWithOneRow = args => {
|
|
123
274
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
128
|
-
logoClass: "py-4",
|
|
129
|
-
showProfile: true,
|
|
130
|
-
showSearch: true,
|
|
131
|
-
logoImage: _logoWhite.default,
|
|
132
|
-
icon: _user.default
|
|
275
|
+
firstRow: rowOneOfOne,
|
|
276
|
+
firstRowClasses: firstRowClasses,
|
|
277
|
+
mobileItems: mobileItems
|
|
133
278
|
});
|
|
134
279
|
};
|
|
135
280
|
|
|
136
|
-
exports.
|
|
281
|
+
exports._NavWithOneRow = _NavWithOneRow;
|
|
137
282
|
|
|
138
|
-
const
|
|
283
|
+
const _NavWithTwoRows = args => {
|
|
139
284
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
logoImage: _logoWhite.default,
|
|
146
|
-
icon: _user.default
|
|
285
|
+
firstRow: rowOneOfTwo,
|
|
286
|
+
firstRowClasses: firstRowClasses,
|
|
287
|
+
secondRow: rowTwoOfTwo,
|
|
288
|
+
secondRowClasses: secondRowClasses,
|
|
289
|
+
mobileItems: mobileItems
|
|
147
290
|
});
|
|
148
291
|
};
|
|
149
292
|
|
|
150
|
-
exports.
|
|
293
|
+
exports._NavWithTwoRows = _NavWithTwoRows;
|
|
151
294
|
|
|
152
|
-
const
|
|
295
|
+
const _NavWithThreeRows = args => {
|
|
153
296
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
showProfile: false,
|
|
162
|
-
showSearch: true
|
|
297
|
+
firstRow: rowOneOfTwo,
|
|
298
|
+
firstRowClasses: firstRowClasses,
|
|
299
|
+
secondRow: rowTwoOfTwo,
|
|
300
|
+
secondRowClasses: secondRowClasses,
|
|
301
|
+
thirdRow: thirdRow,
|
|
302
|
+
thirdRowClasses: thirdRowClasses,
|
|
303
|
+
mobileItems: mobileItems
|
|
163
304
|
});
|
|
164
305
|
};
|
|
165
306
|
|
|
166
|
-
exports.
|
|
307
|
+
exports._NavWithThreeRows = _NavWithThreeRows;
|
|
167
308
|
|
|
168
|
-
const
|
|
309
|
+
const WithTwoRowsAsSideBar = args => {
|
|
169
310
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
showSearch: false
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
exports.NavAlignedWithProfile = NavAlignedWithProfile;
|
|
183
|
-
|
|
184
|
-
const NavAlignedWithSearchAndProfile = () => {
|
|
185
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
186
|
-
links: links,
|
|
187
|
-
navPosition: "1",
|
|
188
|
-
navClass: "bg-brand-primary",
|
|
189
|
-
navLinkClass: "hover:text-white hover:bg-black",
|
|
190
|
-
alignNavAndLogo: true,
|
|
191
|
-
logoImage: _logoWhite.default,
|
|
192
|
-
icon: _user.default,
|
|
193
|
-
showProfile: true,
|
|
194
|
-
showSearch: true
|
|
311
|
+
firstRow: rowOneOfTwo,
|
|
312
|
+
firstRowClasses: firstRowClasses,
|
|
313
|
+
secondRow: rowTwoOfTwo,
|
|
314
|
+
secondRowClasses: secondRowClasses,
|
|
315
|
+
mobileItems: mobileItems,
|
|
316
|
+
asSideBar: true,
|
|
317
|
+
bgColor: "#38B6FF",
|
|
318
|
+
logo: _logoWhite.default
|
|
195
319
|
});
|
|
196
320
|
};
|
|
197
321
|
|
|
198
|
-
exports.
|
|
322
|
+
exports.WithTwoRowsAsSideBar = WithTwoRowsAsSideBar;
|
|
@@ -14,32 +14,17 @@ A personalisable naviagtion bar, suitable for desktop and mobile
|
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Parameters
|
|
17
|
-
`
|
|
18
|
-
`
|
|
19
|
-
`
|
|
20
|
-
`
|
|
21
|
-
`
|
|
22
|
-
`
|
|
23
|
-
`
|
|
24
|
-
`showProfile={boolean} (default=null)`
|
|
25
|
-
`icon={string} (default=null)`
|
|
26
|
-
`logoImage={string} (default=null)`
|
|
27
|
-
`navItemBorderColor={string} (default=null)`
|
|
28
|
-
`navItemTextColor={string} (default=null)`
|
|
29
|
-
`navItemBgColor={string} (default=null)`
|
|
30
|
-
`hoverNavItemBorderColor={string} (default=null)`
|
|
31
|
-
`hoverNavItemTextColor={string} (default=null)`
|
|
32
|
-
`hoverNavItemBgColor={string} (default=null)`
|
|
33
|
-
`bgColor={string} (default=null)`
|
|
34
|
-
`navItemBordered={string} (default=null)`
|
|
35
|
-
`navItemRounded={string} (default=null)`
|
|
36
|
-
`navItemClassNames={string} (default=null)`
|
|
37
|
-
`navItemLinkClassNames={string} (default=null)`
|
|
38
|
-
`mobileNavItemBordered={string} (default=null)`
|
|
39
|
-
`mobileNavItemRounded={string} (default=null)`
|
|
40
|
-
`mobileNavItemClassNames={string} (default=null)`
|
|
41
|
-
`mobileNavItemLinkClassNames={string} (default=null)`
|
|
17
|
+
`firstRow={array} (default=null)`
|
|
18
|
+
`firstRowClasses={string} (default=null)`
|
|
19
|
+
`secondRow={array} (default=null)`
|
|
20
|
+
`secondRowClasses={string} (default=null)`
|
|
21
|
+
`thirdRow={array} (default=null)`
|
|
22
|
+
`thirdRowClass={string} (default=null)`
|
|
23
|
+
`mobileItems={array} (default=null)`
|
|
42
24
|
`mobileNavButtonBgColor={string} (default=null)`
|
|
43
25
|
`mobileNavButtonColor={string} (default=null)`
|
|
44
26
|
`hoverMobileNavButtonBgColor={string} (default=null)`
|
|
45
|
-
`hoverMobileNavButtonColor={string} (default=null)`
|
|
27
|
+
`hoverMobileNavButtonColor={string} (default=null)`
|
|
28
|
+
`bgColor={string} (default=null)`
|
|
29
|
+
`logo={string} (default=null)`
|
|
30
|
+
`asSideBar={boolean} (default=null)`
|
|
@@ -7,19 +7,11 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
|
|
10
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.string.split.js");
|
|
13
|
-
|
|
14
|
-
require("core-js/modules/es.string.replace.js");
|
|
15
|
-
|
|
16
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
11
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _index2 = _interopRequireDefault(require("../Search/index"));
|
|
12
|
+
var _Column = _interopRequireDefault(require("../Column"));
|
|
21
13
|
|
|
22
|
-
var
|
|
14
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
23
15
|
|
|
24
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
17
|
|
|
@@ -27,84 +19,24 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
19
|
|
|
28
20
|
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; }
|
|
29
21
|
|
|
30
|
-
const
|
|
22
|
+
const Nav = _ref => {
|
|
31
23
|
let {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
showProfile,
|
|
40
|
-
icon,
|
|
41
|
-
logoImage,
|
|
42
|
-
navItemBorderColor,
|
|
43
|
-
navItemTextColor,
|
|
44
|
-
navItemBgColor,
|
|
45
|
-
hoverNavItemBorderColor,
|
|
46
|
-
hoverNavItemTextColor,
|
|
47
|
-
hoverNavItemBgColor,
|
|
24
|
+
firstRow,
|
|
25
|
+
firstRowClasses,
|
|
26
|
+
secondRow,
|
|
27
|
+
secondRowClasses,
|
|
28
|
+
thirdRow,
|
|
29
|
+
thirdRowClasses,
|
|
30
|
+
mobileItems,
|
|
48
31
|
bgColor,
|
|
49
|
-
navItemBordered,
|
|
50
|
-
navItemRounded,
|
|
51
|
-
navItemClassNames,
|
|
52
|
-
navItemLinkClassNames,
|
|
53
|
-
mobileNavItemBordered,
|
|
54
|
-
mobileNavItemRounded,
|
|
55
|
-
mobileNavItemClassNames,
|
|
56
|
-
mobileNavItemLinkClassNames,
|
|
57
32
|
mobileNavButtonBgColor,
|
|
58
33
|
mobileNavButtonColor,
|
|
59
34
|
hoverMobileNavButtonBgColor,
|
|
60
35
|
hoverMobileNavButtonColor,
|
|
61
|
-
|
|
36
|
+
asSideBar,
|
|
37
|
+
logo
|
|
62
38
|
} = _ref;
|
|
63
|
-
const
|
|
64
|
-
const [mobileMenuState, setmobileMenuState] = (0, _react.useState)(false);
|
|
65
|
-
const profileLinks = [{
|
|
66
|
-
name: 'PROFILE ITEM 1',
|
|
67
|
-
reference: '/'
|
|
68
|
-
}, {
|
|
69
|
-
name: 'PROFILE ITEM 2',
|
|
70
|
-
reference: '/'
|
|
71
|
-
}, {
|
|
72
|
-
name: 'PROFILE ITEM 3',
|
|
73
|
-
reference: '/'
|
|
74
|
-
}, {
|
|
75
|
-
name: 'PROFILE ITEM 4',
|
|
76
|
-
reference: '/'
|
|
77
|
-
}];
|
|
78
|
-
const pathArray = window.location.pathname.split('/');
|
|
79
|
-
let slug = pathArray[pathArray.length - 1];
|
|
80
|
-
let containerClass = margin ? ' container mx-auto' : '';
|
|
81
|
-
let backgroundColor = bgColor ? bgColor : 'grey';
|
|
82
|
-
let containsSearchOrProfile = showSearch ? showSearch : showProfile;
|
|
83
|
-
let flexType = containsSearchOrProfile ? 'flex-col w-full' : 'flex-1 ';
|
|
84
|
-
let combinedLogoClass = logoClass;
|
|
85
|
-
let navItemTopPadding = 'pt-2';
|
|
86
|
-
let combinedMobileLogoClass = logoClass + ' sm:hidden block flex-1 flex items-center justify-center sm:items-stretch ';
|
|
87
|
-
let linkContainerClass = 'flex-1 flex ';
|
|
88
|
-
let logoHeight = 16;
|
|
89
|
-
|
|
90
|
-
if (!alignNavAndLogo) {
|
|
91
|
-
combinedLogoClass += ' flex justify-center ';
|
|
92
|
-
} else {
|
|
93
|
-
navItemTopPadding = containsSearchOrProfile ? '' : 'pt-' + logoHeight / 4;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (navPosition === '0') {
|
|
97
|
-
linkContainerClass += 'sm:justify-start';
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (navPosition === '1') {
|
|
101
|
-
linkContainerClass += 'sm:justify-center';
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
if (navPosition === '2') {
|
|
105
|
-
linkContainerClass += 'sm:justify-end';
|
|
106
|
-
} //---------- Styling ---------------
|
|
107
|
-
|
|
39
|
+
const [mobileMenuState, setmobileMenuState] = (0, _react.useState)(false); //---------- Styling ---------------
|
|
108
40
|
|
|
109
41
|
const [styles, setStyles] = (0, _react.useState)({
|
|
110
42
|
'background-color': mobileNavButtonBgColor ? mobileNavButtonBgColor : 'white',
|
|
@@ -123,26 +55,46 @@ const Header = _ref => {
|
|
|
123
55
|
color: mobileNavButtonColor ? mobileNavButtonColor : 'black'
|
|
124
56
|
});
|
|
125
57
|
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const [sideNavWidth, setSideNavWidth] = (0, _react.useState)({
|
|
61
|
+
'width': '0px',
|
|
62
|
+
'background-color': bgColor
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const openSideNav = () => {
|
|
66
|
+
setSideNavWidth({
|
|
67
|
+
'width': '200px',
|
|
68
|
+
'background-color': bgColor,
|
|
69
|
+
'border-right': '3px solid black',
|
|
70
|
+
'padding-right': '10px'
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const closeNav = () => {
|
|
75
|
+
setSideNavWidth({
|
|
76
|
+
'width': '0px',
|
|
77
|
+
'background-color': bgColor
|
|
78
|
+
});
|
|
126
79
|
}; //-----------------------------------
|
|
127
80
|
|
|
128
81
|
|
|
129
82
|
return /*#__PURE__*/_react.default.createElement("nav", {
|
|
130
83
|
style: {
|
|
131
|
-
'background-color':
|
|
84
|
+
'background-color': bgColor
|
|
132
85
|
},
|
|
133
|
-
id: "nav"
|
|
134
|
-
className: navClass
|
|
86
|
+
id: "nav"
|
|
135
87
|
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
136
88
|
id: "sm-nav",
|
|
137
|
-
className: "relative flex items-center
|
|
89
|
+
className: "relative flex items-center lg:hidden py-2"
|
|
138
90
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
139
91
|
id: "nav-collapse-btn-wrapper",
|
|
140
|
-
className: "absolute inset-y-0 left-
|
|
92
|
+
className: "absolute inset-y-0 left-2 flex items-center"
|
|
141
93
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
142
94
|
style: styles,
|
|
143
95
|
onMouseOver: () => setHoverState(true),
|
|
144
96
|
onMouseOut: () => setHoverState(false),
|
|
145
|
-
onClick: () => setmobileMenuState(!mobileMenuState),
|
|
97
|
+
onClick: asSideBar ? () => openSideNav() : () => setmobileMenuState(!mobileMenuState),
|
|
146
98
|
type: "button",
|
|
147
99
|
className: "inline-flex items-center justify-center p-2 rounded-md focus:ring-2 focus:ring-inset focus:ring-white",
|
|
148
100
|
"aria-controls": "mobile-menu",
|
|
@@ -167,107 +119,64 @@ const Header = _ref => {
|
|
|
167
119
|
d: "M6 18L18 6M6 6l12 12"
|
|
168
120
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
169
121
|
id: "logo",
|
|
170
|
-
className:
|
|
122
|
+
className: "mx-auto"
|
|
171
123
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
172
124
|
className: "h-16 w-auto",
|
|
173
|
-
src:
|
|
125
|
+
src: logo,
|
|
174
126
|
alt: " Logo "
|
|
175
127
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
-
className: 'hidden
|
|
177
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
-
className: alignNavAndLogo ? 'flex' : ''
|
|
128
|
+
className: 'hidden lg:block items-center justify-between sm:items-stretch text-center '
|
|
179
129
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
130
|
+
className: 'flex ' + firstRowClasses
|
|
131
|
+
}, firstRow && firstRow.map(rowItem => {
|
|
132
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
133
|
+
className: 'h-16 ' + rowItem.columnClasses,
|
|
134
|
+
xs: rowItem.xsColumnWidth,
|
|
135
|
+
sm: rowItem.smColumnWidth,
|
|
136
|
+
md: rowItem.columnWidth,
|
|
137
|
+
lg: rowItem.lgColumnWidth
|
|
138
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
139
|
+
className: rowItem.classNames
|
|
140
|
+
}, rowItem.component));
|
|
186
141
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
187
|
-
className: 'flex ' +
|
|
188
|
-
},
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
classNames: navItemClassNames,
|
|
219
|
-
linkClassNames: navItemLinkClassNames
|
|
220
|
-
});
|
|
221
|
-
})))))))), mobileMenuState && /*#__PURE__*/_react.default.createElement("div", {
|
|
222
|
-
className: "sm:hidden",
|
|
142
|
+
className: 'flex ' + secondRowClasses
|
|
143
|
+
}, secondRow && secondRow.map(rowItem => {
|
|
144
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
145
|
+
className: "h-16 ",
|
|
146
|
+
xs: rowItem.xsColumnWidth,
|
|
147
|
+
sm: rowItem.smColumnWidth,
|
|
148
|
+
md: rowItem.columnWidth
|
|
149
|
+
}, rowItem.component);
|
|
150
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
+
className: 'flex ' + thirdRowClasses
|
|
152
|
+
}, thirdRow && thirdRow.map(rowItem => {
|
|
153
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
154
|
+
className: "h-16",
|
|
155
|
+
xs: rowItem.xsColumnWidth,
|
|
156
|
+
sm: rowItem.smColumnWidth,
|
|
157
|
+
md: rowItem.columnWidth
|
|
158
|
+
}, rowItem.component);
|
|
159
|
+
})))), asSideBar ? /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
+
style: sideNavWidth,
|
|
161
|
+
className: "lg:hidden pt-12 fixed top-0 left-0 z-1 overflow-hidden h-full w-0 duration-500"
|
|
162
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
163
|
+
className: "text-white absolute top-1 right-3",
|
|
164
|
+
onClick: () => closeNav(),
|
|
165
|
+
type: "times",
|
|
166
|
+
size: "2"
|
|
167
|
+
}), mobileItems && mobileItems.map(item => {
|
|
168
|
+
return /*#__PURE__*/_react.default.createElement("div", null, item.component);
|
|
169
|
+
})) :
|
|
170
|
+
/* dropdown */
|
|
171
|
+
mobileMenuState && /*#__PURE__*/_react.default.createElement("div", {
|
|
172
|
+
className: "lg:hidden py-2",
|
|
223
173
|
id: "mobile-menu"
|
|
224
|
-
},
|
|
225
|
-
className: "ml-4 py-4 flex flex-1",
|
|
226
|
-
placeholder: 'Search'
|
|
227
|
-
}), showProfile && /*#__PURE__*/_react.default.createElement("img", {
|
|
228
|
-
className: "ml-8 h-8 w-8 rounded-full",
|
|
229
|
-
src: user,
|
|
230
|
-
alt: ""
|
|
231
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
232
175
|
className: "px-2 pt-2 pb-3 space-y-1"
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
return /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
236
|
-
name: link.name,
|
|
237
|
-
url: link.reference,
|
|
238
|
-
borderColor: slug === slugReference ? hoverNavItemBorderColor : navItemBorderColor,
|
|
239
|
-
textColor: slug === slugReference ? hoverNavItemTextColor : navItemTextColor,
|
|
240
|
-
bgColor: slug === slugReference ? hoverNavItemBgColor : navItemBgColor,
|
|
241
|
-
hoverBorderColor: hoverNavItemBorderColor,
|
|
242
|
-
hoverTextColor: hoverNavItemTextColor,
|
|
243
|
-
hoverBgColor: hoverNavItemBgColor,
|
|
244
|
-
bordered: mobileNavItemBordered,
|
|
245
|
-
rounded: mobileNavItemRounded,
|
|
246
|
-
classNames: mobileNavItemClassNames,
|
|
247
|
-
linkClassNames: mobileNavItemLinkClassNames
|
|
248
|
-
});
|
|
249
|
-
}), /*#__PURE__*/_react.default.createElement("hr", {
|
|
250
|
-
style: {
|
|
251
|
-
'color': navItemTextColor
|
|
252
|
-
}
|
|
253
|
-
}), showProfile && profileLinks && profileLinks.map(link => {
|
|
254
|
-
const slugReference = link.reference.replace('/', '');
|
|
255
|
-
return /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
256
|
-
name: link.name,
|
|
257
|
-
url: link.reference,
|
|
258
|
-
borderColor: slug === slugReference ? hoverNavItemBorderColor : navItemBorderColor,
|
|
259
|
-
textColor: slug === slugReference ? hoverNavItemTextColor : navItemTextColor,
|
|
260
|
-
bgColor: slug === slugReference ? hoverNavItemBgColor : navItemBgColor,
|
|
261
|
-
hoverBorderColor: hoverNavItemBorderColor,
|
|
262
|
-
hoverTextColor: hoverNavItemTextColor,
|
|
263
|
-
hoverBgColor: hoverNavItemBgColor,
|
|
264
|
-
bordered: mobileNavItemBordered,
|
|
265
|
-
rounded: mobileNavItemRounded,
|
|
266
|
-
classNames: mobileNavItemClassNames,
|
|
267
|
-
linkClassNames: mobileNavItemLinkClassNames
|
|
268
|
-
});
|
|
176
|
+
}, mobileItems && mobileItems.map(item => {
|
|
177
|
+
return /*#__PURE__*/_react.default.createElement("div", null, item.component);
|
|
269
178
|
}))));
|
|
270
179
|
};
|
|
271
180
|
|
|
272
|
-
var _default =
|
|
181
|
+
var _default = Nav;
|
|
273
182
|
exports.default = _default;
|
|
@@ -19,11 +19,18 @@ const Profile = _ref => {
|
|
|
19
19
|
alignRight,
|
|
20
20
|
alignLeft,
|
|
21
21
|
userImage,
|
|
22
|
-
|
|
22
|
+
imageHeight,
|
|
23
|
+
imageWidth,
|
|
24
|
+
classNames,
|
|
25
|
+
rounded
|
|
23
26
|
} = _ref;
|
|
24
27
|
let profileAlignment = alignRight ? ' float-right ' : alignLeft ? ' float-left ' : '';
|
|
25
28
|
let dropdownAlignement = alignRight ? ' mt-16 -mr-16 ' : alignLeft ? ' mt-16 -ml-16 ' : '';
|
|
26
29
|
let dropdownTextAlignement = alignRight ? ' ' : alignLeft ? ' ' : 'text-center';
|
|
30
|
+
const height = imageHeight && 'h-' + imageHeight;
|
|
31
|
+
const width = imageWidth && 'w-' + imageWidth;
|
|
32
|
+
const round = rounded ? 'rounded-full' : '';
|
|
33
|
+
const classes = width + ' ' + height + ' ' + round;
|
|
27
34
|
const [profileState, setProfileState] = (0, _react.useState)(false);
|
|
28
35
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
36
|
className: 'text-center ' + classNames
|
|
@@ -34,13 +41,13 @@ const Profile = _ref => {
|
|
|
34
41
|
type: "button",
|
|
35
42
|
className: "bg-gray-800 flex rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"
|
|
36
43
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
37
|
-
className:
|
|
44
|
+
className: classes,
|
|
38
45
|
src: userImage,
|
|
39
46
|
alt: ""
|
|
40
47
|
})))), profileState && /*#__PURE__*/_react.default.createElement("div", {
|
|
41
48
|
className: dropdownTextAlignement
|
|
42
49
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: "w-48 sm:inline-block shadow-lg " + profileAlignment + dropdownAlignement
|
|
50
|
+
className: "w-48 sm:inline-block shadow-lg bg-brand-highlight text-white z-10 hover:bg-brand-border-light hover:text-black " + profileAlignment + dropdownAlignement
|
|
44
51
|
}, profileLinks && profileLinks.map((link, i) => {
|
|
45
52
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
46
53
|
href: link.link,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports._Search = exports.SearchWithRightIcon = exports.SearchWithLeftIcon = exports.SearchWithLabel = exports.SearchWithBothIcons = void 0;
|
|
6
|
+
exports.default = exports._Search = exports.SearchWithRightIcon = exports.SearchWithLeftIcon = exports.SearchWithLabel = exports.SearchWithBothIconsAndLabel = exports.SearchWithBothIcons = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -108,4 +108,15 @@ const SearchWithBothIcons = args => {
|
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
exports.SearchWithBothIcons = SearchWithBothIcons;
|
|
111
|
+
exports.SearchWithBothIcons = SearchWithBothIcons;
|
|
112
|
+
|
|
113
|
+
const SearchWithBothIconsAndLabel = args => {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
115
|
+
placeholder: args.placeholder,
|
|
116
|
+
leftIcon: args.leftIcon,
|
|
117
|
+
rightIcon: args.rightIcon,
|
|
118
|
+
text: "Search"
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
exports.SearchWithBothIconsAndLabel = SearchWithBothIconsAndLabel;
|
|
@@ -34,11 +34,11 @@ const Search = _ref => {
|
|
|
34
34
|
}, text && /*#__PURE__*/_react.default.createElement("h2", {
|
|
35
35
|
className: "font-base-lg pt-2"
|
|
36
36
|
}, text), /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className: "relative block"
|
|
37
|
+
className: "relative block w-full"
|
|
38
38
|
}, leftIcon && /*#__PURE__*/_react.default.createElement("span", {
|
|
39
39
|
className: "absolute inset-y-0 left-5 flex items-center pl-2"
|
|
40
40
|
}, iconLeft), /*#__PURE__*/_react.default.createElement("input", {
|
|
41
|
-
className: "
|
|
41
|
+
className: "w-full border-2 border-gray-300 placeholder:italic placeholder:text-gray-400 rounded-md py-1 focus:outline-none focus:border-sky-500 focus:ring-sky-500 focus:ring-1 " + leftPadding,
|
|
42
42
|
onChange: e => _onChange(e.target.value),
|
|
43
43
|
placeholder: placeholder,
|
|
44
44
|
type: "text",
|
|
@@ -15,8 +15,12 @@ const TextAndTitle = _ref => {
|
|
|
15
15
|
text,
|
|
16
16
|
title,
|
|
17
17
|
bgColor,
|
|
18
|
-
textColor
|
|
18
|
+
textColor,
|
|
19
|
+
titleClass,
|
|
20
|
+
textClass
|
|
19
21
|
} = _ref;
|
|
22
|
+
const titleClasses = titleClass + ' text-2xl';
|
|
23
|
+
const textClasses = textClass + '';
|
|
20
24
|
const classes = classNames + ' text-center'; //---------- Styling ---------------
|
|
21
25
|
|
|
22
26
|
const styles = {
|
|
@@ -28,8 +32,10 @@ const TextAndTitle = _ref => {
|
|
|
28
32
|
style: styles,
|
|
29
33
|
className: classes
|
|
30
34
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
31
|
-
className:
|
|
32
|
-
}, title), /*#__PURE__*/_react.default.createElement("p",
|
|
35
|
+
className: titleClasses
|
|
36
|
+
}, title), /*#__PURE__*/_react.default.createElement("p", {
|
|
37
|
+
className: textClasses
|
|
38
|
+
}, text));
|
|
33
39
|
};
|
|
34
40
|
|
|
35
41
|
var _default = TextAndTitle;
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,12 @@ Object.defineProperty(exports, "Icon", {
|
|
|
87
87
|
return _Icon.default;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "Image", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function get() {
|
|
93
|
+
return _Image.default;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
90
96
|
Object.defineProperty(exports, "InformationIcon", {
|
|
91
97
|
enumerable: true,
|
|
92
98
|
get: function get() {
|
|
@@ -194,6 +200,8 @@ var _Form = _interopRequireDefault(require("./components/Form"));
|
|
|
194
200
|
|
|
195
201
|
var _Icon = _interopRequireDefault(require("./components/Icon"));
|
|
196
202
|
|
|
203
|
+
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
204
|
+
|
|
197
205
|
var _InformationIcon = _interopRequireDefault(require("./components/InformationIcon"));
|
|
198
206
|
|
|
199
207
|
var _Input = _interopRequireDefault(require("./components/Input"));
|