trepur_components 0.1.4 → 0.1.8
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 +16 -16
- package/dist/index.es.js +8 -0
- package/dist/index.js +8 -15
- package/package.json +8 -1
- package/rollup.config.js +37 -0
- package/src/Components/Button/{Button.stories.jsx → Button.stories.js} +0 -0
- package/src/Components/Button/{index.jsx → index.js} +0 -0
- package/src/Components/Icon/index.js +0 -7
- package/src/Components/index.js +3 -0
- package/src/Components/test/index.js +11 -0
- package/src/index.js +5 -3
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +0 -164
- package/dist/Components/Breadcrumbs/README.md +0 -0
- package/dist/Components/Breadcrumbs/index.js +0 -32
- package/dist/Components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +0 -87
- package/dist/Components/BreadcrumbsBordered/README.md +0 -0
- package/dist/Components/BreadcrumbsBordered/index.css +0 -67
- package/dist/Components/BreadcrumbsBordered/index.js +0 -49
- package/dist/Components/Button/Button.stories.js +0 -185
- package/dist/Components/Button/README.md +0 -0
- package/dist/Components/Button/index.js +0 -35
- package/dist/Components/ButtonSlide/ButtonSlide.stories.js +0 -185
- package/dist/Components/ButtonSlide/README.md +0 -0
- package/dist/Components/ButtonSlide/Styles.css +0 -25
- package/dist/Components/ButtonSlide/index.js +0 -37
- package/dist/Components/Card/Card.stories.js +0 -204
- package/dist/Components/Card/README.md +0 -0
- package/dist/Components/Card/index.js +0 -83
- package/dist/Components/CardImageLink/CardImageLink.stories.js +0 -89
- package/dist/Components/CardImageLink/README.md +0 -0
- package/dist/Components/CardImageLink/index.js +0 -36
- package/dist/Components/CardImageLinkList/CardImageLinkList.stories.js +0 -63
- package/dist/Components/CardImageLinkList/README.md +0 -0
- package/dist/Components/CardImageLinkList/index.js +0 -35
- package/dist/Components/CardList/CardList.stories.js +0 -53
- package/dist/Components/CardList/README.md +0 -0
- package/dist/Components/CardList/index.js +0 -36
- package/dist/Components/Icon/Icon.stories.js +0 -73
- package/dist/Components/Icon/README.md +0 -0
- package/dist/Components/Icon/index.js +0 -45
- package/dist/Components/Jumbotron/Jumbotron.stories.js +0 -81
- package/dist/Components/Jumbotron/README.md +0 -0
- package/dist/Components/Jumbotron/index.js +0 -43
- package/dist/Components/Nav/Nav.stories.js +0 -108
- package/dist/Components/Nav/README.md +0 -0
- package/dist/Components/Nav/index.js +0 -170
- package/dist/Components/Profile/Profile.stories.js +0 -46
- package/dist/Components/Profile/README.md +0 -0
- package/dist/Components/Profile/index.js +0 -41
- package/dist/Components/Search/README.md +0 -0
- package/dist/Components/Search/Search.stories.js +0 -72
- package/dist/Components/Search/index.js +0 -43
- package/dist/Components/SignedInLinks/README.md +0 -0
- package/dist/Components/SignedInLinks/SignedInLinks.stories.js +0 -48
- package/dist/Components/SignedInLinks/index.js +0 -27
- package/dist/Components/SignedOutLinks/README.md +0 -0
- package/dist/Components/SignedOutLinks/SignedOutLinks.stories.js +0 -48
- package/dist/Components/SignedOutLinks/index.js +0 -27
- package/dist/index.css +0 -4
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports._Nav = exports.NavWithSearchAndProfile = exports.NavWithSearch = exports.NavWithProfile = exports.NavAligned = 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 links = [{
|
|
19
|
-
name: 'link 1',
|
|
20
|
-
reference: '/'
|
|
21
|
-
}, {
|
|
22
|
-
name: 'link 2',
|
|
23
|
-
reference: '/'
|
|
24
|
-
}, {
|
|
25
|
-
name: 'link n-1',
|
|
26
|
-
reference: '/'
|
|
27
|
-
}, {
|
|
28
|
-
name: 'link n',
|
|
29
|
-
reference: '/'
|
|
30
|
-
}];
|
|
31
|
-
var _default = {
|
|
32
|
-
title: 'Components/Nav',
|
|
33
|
-
argTypes: {},
|
|
34
|
-
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
-
className: "p-4"
|
|
36
|
-
}, story())],
|
|
37
|
-
parameters: {
|
|
38
|
-
readme: {
|
|
39
|
-
sidebar: _README.default
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
exports.default = _default;
|
|
44
|
-
|
|
45
|
-
const _Nav = args => {
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
47
|
-
links: links,
|
|
48
|
-
navPosition: "1",
|
|
49
|
-
navClass: "bg-brand-light-grey pb-4 pt-2",
|
|
50
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
51
|
-
logoClass: "py-4"
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports._Nav = _Nav;
|
|
56
|
-
|
|
57
|
-
const NavWithSearch = () => {
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
59
|
-
links: links,
|
|
60
|
-
navPosition: "1",
|
|
61
|
-
navClass: "bg-brand-light-grey pb-4 pt-2",
|
|
62
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
63
|
-
logoClass: "py-4",
|
|
64
|
-
showSearch: true
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
exports.NavWithSearch = NavWithSearch;
|
|
69
|
-
|
|
70
|
-
const NavWithProfile = () => {
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
72
|
-
links: links,
|
|
73
|
-
navPosition: "1",
|
|
74
|
-
navClass: "bg-brand-light-grey pb-4 pt-2",
|
|
75
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
76
|
-
logoClass: "py-4",
|
|
77
|
-
showProfile: true
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
exports.NavWithProfile = NavWithProfile;
|
|
82
|
-
|
|
83
|
-
const NavWithSearchAndProfile = () => {
|
|
84
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
85
|
-
links: links,
|
|
86
|
-
navPosition: "1",
|
|
87
|
-
navClass: "bg-brand-light-grey pb-4 pt-2",
|
|
88
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
89
|
-
logoClass: "py-4",
|
|
90
|
-
showProfile: true,
|
|
91
|
-
showSearch: true
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
exports.NavWithSearchAndProfile = NavWithSearchAndProfile;
|
|
96
|
-
|
|
97
|
-
const NavAligned = () => {
|
|
98
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
99
|
-
links: links,
|
|
100
|
-
navPosition: "1",
|
|
101
|
-
navClass: "bg-brand-light-grey pb-4 pt-2",
|
|
102
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
103
|
-
logoClass: "py-4",
|
|
104
|
-
alignNavAndLogo: true
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
exports.NavAligned = NavAligned;
|
|
File without changes
|
|
@@ -1,170 +0,0 @@
|
|
|
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 = require("react");
|
|
11
|
-
|
|
12
|
-
var _index = _interopRequireDefault(require("../Profile/index"));
|
|
13
|
-
|
|
14
|
-
var _index2 = _interopRequireDefault(require("../Search/index"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
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 = [{
|
|
31
|
-
name: 'PROFILE ITEM 1',
|
|
32
|
-
reference: '/'
|
|
33
|
-
}, {
|
|
34
|
-
name: 'PROFILE ITEM 2',
|
|
35
|
-
reference: '/'
|
|
36
|
-
}, {
|
|
37
|
-
name: 'PROFILE ITEM 3',
|
|
38
|
-
reference: '/'
|
|
39
|
-
}, {
|
|
40
|
-
name: 'PROFILE ITEM 4',
|
|
41
|
-
reference: '/'
|
|
42
|
-
}];
|
|
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 ';
|
|
46
|
-
|
|
47
|
-
if (alignNavAndLogo) {
|
|
48
|
-
combinedLogoClass = ' hidden sm:inline-flex pl-4 pt-8 absolute inset-y-0 h-8 left-0 flex items-center';
|
|
49
|
-
} else {
|
|
50
|
-
combinedLogoClass += ' flex-1';
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (navPosition === '0') {
|
|
54
|
-
linkContainerClass += 'sm:justify-start';
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (navPosition === '1') {
|
|
58
|
-
linkContainerClass += 'sm:justify-center';
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (navPosition === '2') {
|
|
62
|
-
linkContainerClass += 'sm:justify-end';
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return /*#__PURE__*/React.createElement("nav", {
|
|
66
|
-
id: "nav",
|
|
67
|
-
className: navClass
|
|
68
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "px-4"
|
|
70
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
id: "sm-nav",
|
|
72
|
-
className: "relative flex items-center justify-between h-16 sm:hidden"
|
|
73
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
id: "nav-collapse-btn-wrapper",
|
|
75
|
-
className: "absolute inset-y-0 left-0 flex items-center"
|
|
76
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
77
|
-
onClick: () => setmobileMenuState(!mobileMenuState),
|
|
78
|
-
type: "button",
|
|
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",
|
|
80
|
-
"aria-controls": "mobile-menu",
|
|
81
|
-
"aria-expanded": "false"
|
|
82
|
-
}, /*#__PURE__*/React.createElement("svg", {
|
|
83
|
-
className: "block h-6 w-6",
|
|
84
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
85
|
-
fill: "none",
|
|
86
|
-
viewBox: "0 0 24 24",
|
|
87
|
-
stroke: "currentColor",
|
|
88
|
-
"aria-hidden": "true"
|
|
89
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
90
|
-
d: "M4 6h16M4 12h16M4 18h16"
|
|
91
|
-
})), /*#__PURE__*/React.createElement("svg", {
|
|
92
|
-
className: "hidden h-6 w-6",
|
|
93
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
-
fill: "none",
|
|
95
|
-
viewBox: "0 0 24 24",
|
|
96
|
-
stroke: "currentColor",
|
|
97
|
-
"aria-hidden": "true"
|
|
98
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
99
|
-
d: "M6 18L18 6M6 6l12 12"
|
|
100
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
101
|
-
id: "logo",
|
|
102
|
-
className: combinedMobileLogoClass
|
|
103
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
104
|
-
className: "h-8 w-auto",
|
|
105
|
-
src: "logo.png",
|
|
106
|
-
alt: " Logo "
|
|
107
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
clas: true,
|
|
109
|
-
Name: "hidden sm:block pt-2 items-center justify-between sm:items-stretch text-center"
|
|
110
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
111
|
-
id: "logo",
|
|
112
|
-
className: combinedLogoClass
|
|
113
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
114
|
-
className: "h-8 w-auto",
|
|
115
|
-
src: "logo.png",
|
|
116
|
-
alt: " Logo "
|
|
117
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
118
|
-
id: "nav-container",
|
|
119
|
-
className: linkContainerClass
|
|
120
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
id: "nav-block",
|
|
122
|
-
className: "hidden sm:inline-flex sm:ml-6"
|
|
123
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
124
|
-
id: "nav-list",
|
|
125
|
-
className: "list-none mx-auto flex flex-1"
|
|
126
|
-
}, links && links.map(link => {
|
|
127
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
128
|
-
key: link.name,
|
|
129
|
-
className: "flex px-4",
|
|
130
|
-
onClick: link.onClick
|
|
131
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
132
|
-
className: navLinkClass,
|
|
133
|
-
href: link.reference
|
|
134
|
-
}, link.name));
|
|
135
|
-
})))), showSearch && /*#__PURE__*/React.createElement(_index2.default, {
|
|
136
|
-
className: "hidden sm:inline-flex pl-4 pt-8 absolute inset-y-0 h-8 right-16 flex items-center"
|
|
137
|
-
}), showProfile && /*#__PURE__*/React.createElement(_index.default, {
|
|
138
|
-
profileLinks: profileLinks
|
|
139
|
-
}))), mobileMenuState && /*#__PURE__*/React.createElement("div", {
|
|
140
|
-
className: "sm:hidden",
|
|
141
|
-
id: "mobile-menu"
|
|
142
|
-
}, showProfile && /*#__PURE__*/React.createElement("img", {
|
|
143
|
-
className: "ml-3 h-8 w-8 rounded-full",
|
|
144
|
-
src: "user.jpeg",
|
|
145
|
-
alt: ""
|
|
146
|
-
}), showSearch && /*#__PURE__*/React.createElement(_index2.default, {
|
|
147
|
-
className: "flex flex-1 ml-4"
|
|
148
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
149
|
-
className: "px-2 pt-2 pb-3 space-y-1"
|
|
150
|
-
}, links && links.map(link => {
|
|
151
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
152
|
-
key: link.name,
|
|
153
|
-
href: link.reference,
|
|
154
|
-
className: "text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium",
|
|
155
|
-
"aria-current": "page"
|
|
156
|
-
}, link.name);
|
|
157
|
-
}), showProfile && profileLinks && profileLinks.map(link => {
|
|
158
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
159
|
-
key: link.name,
|
|
160
|
-
href: link.reference,
|
|
161
|
-
className: "text-gray-300 hover:bg-gray-700 hover:text-white block px-3 py-2 rounded-md text-base font-medium",
|
|
162
|
-
role: "menuitem",
|
|
163
|
-
tabindex: "-1",
|
|
164
|
-
id: "user-menu-item-0"
|
|
165
|
-
}, link.name);
|
|
166
|
-
}))));
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
var _default = Header;
|
|
170
|
-
exports.default = _default;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports._Breadcrumbs = 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 links = [{
|
|
19
|
-
link: '/',
|
|
20
|
-
name: 'link 1'
|
|
21
|
-
}, {
|
|
22
|
-
link: '/',
|
|
23
|
-
name: 'link 2'
|
|
24
|
-
}, {
|
|
25
|
-
link: '/',
|
|
26
|
-
name: 'Link 3'
|
|
27
|
-
}];
|
|
28
|
-
var _default = {
|
|
29
|
-
title: 'Components/Breadcrumbs',
|
|
30
|
-
argTypes: {},
|
|
31
|
-
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: "p-4"
|
|
33
|
-
}, story())],
|
|
34
|
-
parameters: {
|
|
35
|
-
readme: {
|
|
36
|
-
sidebar: _README.default
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.default = _default;
|
|
41
|
-
|
|
42
|
-
const _Breadcrumbs = args => {
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, null);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports._Breadcrumbs = _Breadcrumbs;
|
|
File without changes
|
|
@@ -1,41 +0,0 @@
|
|
|
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 = require("react");
|
|
11
|
-
|
|
12
|
-
const Profile = _ref => {
|
|
13
|
-
let {
|
|
14
|
-
profileLinks
|
|
15
|
-
} = _ref;
|
|
16
|
-
const [profileState, setProfileState] = (0, _react.useState)(false);
|
|
17
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
className: "hidden sm:inline-flex pt-8 absolute inset-y-0 h-8 right-4 flex items-center"
|
|
19
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
20
|
-
onClick: () => setProfileState(!profileState),
|
|
21
|
-
type: "button",
|
|
22
|
-
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"
|
|
23
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
24
|
-
className: "h-10 w-10 rounded-full",
|
|
25
|
-
src: "user.jpeg",
|
|
26
|
-
alt: ""
|
|
27
|
-
}))), profileState && /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
className: "w-48 right-4 absolute rounded-md shadow-lg bg-white"
|
|
29
|
-
}, profileLinks && profileLinks.map((link, i) => {
|
|
30
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
31
|
-
href: link.reference,
|
|
32
|
-
className: "block px-4 py-2 text-sm text-gray-700",
|
|
33
|
-
role: "menuitem",
|
|
34
|
-
tabindex: "-1",
|
|
35
|
-
id: "user-menu-item-" + i
|
|
36
|
-
}, link.name);
|
|
37
|
-
})));
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var _default = Profile;
|
|
41
|
-
exports.default = _default;
|
|
File without changes
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports._Search = exports.SearchWithPlaceholder = exports.SearchWithLabel = exports.SearchWithIcon = exports.SearchWithAll = 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 _index3 = _interopRequireDefault(require("../Icon/index"));
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
|
-
var _default = {
|
|
21
|
-
title: 'Components/Search',
|
|
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 _Search = args => {
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, null);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
exports._Search = _Search;
|
|
39
|
-
|
|
40
|
-
const SearchWithPlaceholder = args => {
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
42
|
-
placeholder: "Enter some search item"
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.SearchWithPlaceholder = SearchWithPlaceholder;
|
|
47
|
-
|
|
48
|
-
const SearchWithLabel = args => {
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
50
|
-
text: "Label"
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.SearchWithLabel = SearchWithLabel;
|
|
55
|
-
|
|
56
|
-
const SearchWithIcon = args => {
|
|
57
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
58
|
-
leftIcon: "search"
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
exports.SearchWithIcon = SearchWithIcon;
|
|
63
|
-
|
|
64
|
-
const SearchWithAll = args => {
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
66
|
-
text: "Label",
|
|
67
|
-
leftIcon: "search",
|
|
68
|
-
placeholder: "Enter some search item"
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
exports.SearchWithAll = SearchWithAll;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _index = _interopRequireDefault(require("../Icon/index"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
const Search = _ref => {
|
|
13
|
-
let {
|
|
14
|
-
className,
|
|
15
|
-
onChange: _onChange,
|
|
16
|
-
placeholder,
|
|
17
|
-
text,
|
|
18
|
-
leftIcon
|
|
19
|
-
} = _ref;
|
|
20
|
-
let classes = className + ' flex';
|
|
21
|
-
let iconLeft = /*#__PURE__*/React.createElement(_index.default, {
|
|
22
|
-
type: leftIcon
|
|
23
|
-
});
|
|
24
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
-
id: "search",
|
|
26
|
-
className: classes
|
|
27
|
-
}, text && /*#__PURE__*/React.createElement("h2", null, text), /*#__PURE__*/React.createElement("label", {
|
|
28
|
-
className: "relative block"
|
|
29
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
30
|
-
className: "sr-only"
|
|
31
|
-
}, "Search"), leftIcon && /*#__PURE__*/React.createElement("span", {
|
|
32
|
-
className: "absolute inset-y-0 left-5 flex items-center pl-2"
|
|
33
|
-
}, iconLeft), /*#__PURE__*/React.createElement("input", {
|
|
34
|
-
className: "ml-4 pr-32 border-2 border-gray-300 h-10 px-5 placeholder:italic placeholder:text-gray-400 rounded-md py-2 pl-9 focus:outline-none focus:border-sky-500 focus:ring-sky-500 focus:ring-1",
|
|
35
|
-
onChange: e => _onChange(e.target.value),
|
|
36
|
-
placeholder: placeholder,
|
|
37
|
-
type: "text",
|
|
38
|
-
name: "search"
|
|
39
|
-
})));
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
var _default = Search;
|
|
43
|
-
exports.default = _default;
|
|
File without changes
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports._SignedInLinks = 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 links = [{
|
|
19
|
-
link: '/',
|
|
20
|
-
name: 'link 1'
|
|
21
|
-
}, {
|
|
22
|
-
link: '/',
|
|
23
|
-
name: 'link 2'
|
|
24
|
-
}, {
|
|
25
|
-
link: '/',
|
|
26
|
-
name: 'Link 3'
|
|
27
|
-
}];
|
|
28
|
-
var _default = {
|
|
29
|
-
title: 'Components/SignedInLinks',
|
|
30
|
-
argTypes: {},
|
|
31
|
-
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: "p-4"
|
|
33
|
-
}, story())],
|
|
34
|
-
parameters: {
|
|
35
|
-
readme: {
|
|
36
|
-
sidebar: _README.default
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.default = _default;
|
|
41
|
-
|
|
42
|
-
const _SignedInLinks = args => {
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
44
|
-
links: links
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
exports._SignedInLinks = _SignedInLinks;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
const LinksList = _ref => {
|
|
9
|
-
let {
|
|
10
|
-
links
|
|
11
|
-
} = _ref;
|
|
12
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: "container flex"
|
|
14
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
15
|
-
className: "list-none mx-auto flex flex-1"
|
|
16
|
-
}, links && links.map(link => {
|
|
17
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
18
|
-
className: "flex px-4"
|
|
19
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
20
|
-
className: "flex-1",
|
|
21
|
-
href: link.url
|
|
22
|
-
}, link.name));
|
|
23
|
-
})));
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
var _default = LinksList;
|
|
27
|
-
exports.default = _default;
|
|
File without changes
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports._SignedOutLinks = 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 links = [{
|
|
19
|
-
link: '/',
|
|
20
|
-
name: 'link 1'
|
|
21
|
-
}, {
|
|
22
|
-
link: '/',
|
|
23
|
-
name: 'link 2'
|
|
24
|
-
}, {
|
|
25
|
-
link: '/',
|
|
26
|
-
name: 'Link 3'
|
|
27
|
-
}];
|
|
28
|
-
var _default = {
|
|
29
|
-
title: 'Components/SignedOutLinks',
|
|
30
|
-
argTypes: {},
|
|
31
|
-
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
className: "p-4"
|
|
33
|
-
}, story())],
|
|
34
|
-
parameters: {
|
|
35
|
-
readme: {
|
|
36
|
-
sidebar: _README.default
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
exports.default = _default;
|
|
41
|
-
|
|
42
|
-
const _SignedOutLinks = args => {
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
44
|
-
links: links
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
exports._SignedOutLinks = _SignedOutLinks;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
const SignedInLinks = _ref => {
|
|
9
|
-
let {
|
|
10
|
-
links
|
|
11
|
-
} = _ref;
|
|
12
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className: "container flex"
|
|
14
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
15
|
-
className: "list-none mx-auto flex flex-1"
|
|
16
|
-
}, links && links.map(link => {
|
|
17
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
18
|
-
className: "flex px-4"
|
|
19
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
20
|
-
className: "flex-1",
|
|
21
|
-
href: link.url
|
|
22
|
-
}, link.name));
|
|
23
|
-
})));
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
var _default = SignedInLinks;
|
|
27
|
-
exports.default = _default;
|
package/dist/index.css
DELETED