trepur_components 0.1.2 → 0.1.6

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.
Files changed (53) hide show
  1. package/.babelrc +14 -0
  2. package/babel.config.js +4 -0
  3. package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +9 -5
  4. package/dist/Components/Breadcrumbs/README.md +0 -1
  5. package/dist/Components/Breadcrumbs/index.js +16 -8
  6. package/dist/Components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +11 -82
  7. package/dist/Components/BreadcrumbsBordered/README.md +0 -1
  8. package/dist/Components/BreadcrumbsBordered/index.css +67 -0
  9. package/dist/Components/BreadcrumbsBordered/index.js +16 -8
  10. package/dist/Components/Button/Button.stories.js +28 -24
  11. package/dist/Components/Button/README.md +0 -1
  12. package/dist/Components/Button/{Button.js → index.js} +13 -13
  13. package/dist/Components/ButtonSlide/ButtonSlide.stories.js +28 -24
  14. package/dist/Components/ButtonSlide/README.md +0 -1
  15. package/dist/Components/ButtonSlide/index.js +37 -0
  16. package/dist/Components/Card/Card.stories.js +32 -28
  17. package/dist/Components/Card/README.md +0 -1
  18. package/dist/Components/Card/{Card.js → index.js} +32 -30
  19. package/dist/Components/CardImageLink/CardImageLink.stories.js +20 -16
  20. package/dist/Components/CardImageLink/{CardImageLink.js → index.js} +10 -10
  21. package/dist/Components/CardImageLinkList/CardImageLinkList.stories.js +11 -7
  22. package/dist/Components/CardImageLinkList/{CardImageLinkList.js → index.js} +10 -8
  23. package/dist/Components/CardList/CardList.stories.js +14 -161
  24. package/dist/Components/CardList/README.md +0 -1
  25. package/dist/Components/CardList/{CardList.js → index.js} +11 -7
  26. package/dist/Components/Icon/Icon.stories.js +18 -14
  27. package/dist/Components/Icon/README.md +0 -1
  28. package/dist/Components/Icon/{Icon.js → index.js} +8 -8
  29. package/dist/Components/Jumbotron/Jumbotron.stories.js +18 -14
  30. package/dist/Components/Jumbotron/{Jumbotron.js → index.js} +13 -13
  31. package/dist/Components/Nav/Nav.stories.js +112 -0
  32. package/dist/Components/Nav/README.md +0 -0
  33. package/dist/Components/{Nav.js → Nav/index.js} +67 -26
  34. package/dist/Components/Profile/Profile.stories.js +50 -0
  35. package/dist/Components/Profile/README.md +0 -0
  36. package/dist/Components/Profile/index.js +82 -0
  37. package/dist/Components/Search/README.md +0 -0
  38. package/dist/Components/Search/Search.stories.js +76 -0
  39. package/dist/Components/{Search.js → Search/index.js} +16 -14
  40. package/dist/Components/SignedInLinks/README.md +0 -0
  41. package/dist/Components/SignedInLinks/SignedInLinks.stories.js +52 -0
  42. package/dist/Components/{SignedInLinks.js → SignedInLinks/index.js} +9 -5
  43. package/dist/Components/SignedOutLinks/README.md +0 -0
  44. package/dist/Components/SignedOutLinks/SignedOutLinks.stories.js +52 -0
  45. package/dist/Components/SignedOutLinks/index.js +31 -0
  46. package/dist/index.css +1 -64
  47. package/dist/index.js +31 -1
  48. package/package.json +2 -1
  49. package/src/Components/CardList/CardList.stories.js +1 -163
  50. package/babel.config.json +0 -18
  51. package/dist/Components/ButtonSlide/ButtonSlide.js +0 -37
  52. package/dist/Components/Profile.js +0 -41
  53. package/dist/Components/SignedOutLinks.js +0 -22
package/dist/index.js CHANGED
@@ -1,14 +1,44 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
5
+ require("core-js/modules/es.object.keys.js");
6
+
7
+ require("core-js/modules/es.symbol.js");
8
+
9
+ require("core-js/modules/es.array.filter.js");
10
+
11
+ require("core-js/modules/es.object.to-string.js");
12
+
13
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
14
+
15
+ require("core-js/modules/web.dom-collections.for-each.js");
16
+
17
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
18
+
19
+ require("core-js/modules/es.object.define-properties.js");
20
+
21
+ require("core-js/modules/es.array.iterator.js");
22
+
23
+ require("core-js/modules/es.string.iterator.js");
24
+
25
+ require("core-js/modules/es.weak-map.js");
26
+
3
27
  require("core-js/modules/web.dom-collections.iterator.js");
4
28
 
29
+ require("core-js/modules/es.symbol.description.js");
30
+
31
+ require("core-js/modules/es.symbol.iterator.js");
32
+
33
+ require("core-js/modules/es.object.define-property.js");
34
+
5
35
  require("./index.css");
6
36
 
7
37
  var components = _interopRequireWildcard(require("./Components"));
8
38
 
9
39
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
40
 
11
- 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; }
41
+ 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; }
12
42
 
13
43
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
44
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "trepur_components",
3
3
  "description": "component lib",
4
4
  "author": "trepur_ttenneb",
5
- "version": "0.1.2",
5
+ "version": "0.1.6",
6
6
  "private": false,
7
7
  "dependencies": {
8
8
  "@babel/polyfill": "^7.12.1",
@@ -57,6 +57,7 @@
57
57
  "@babel/cli": "^7.16.8",
58
58
  "@babel/core": "^7.16.7",
59
59
  "@babel/preset-env": "^7.16.8",
60
+ "@babel/preset-react": "^7.16.7",
60
61
  "@storybook/addon-actions": "^6.3.12",
61
62
  "@storybook/addon-essentials": "^6.3.12",
62
63
  "@storybook/addon-links": "^6.3.12",
@@ -36,166 +36,4 @@ export const _Cardlist = () => {
36
36
  return (
37
37
  <CardList list={list}></CardList>
38
38
  )
39
- }
40
-
41
- // export const CardTitleLeft = () => {
42
- // return (
43
- // <Card
44
- // id='card'
45
- // title='This is a title'
46
- // titleClass='font-bold'
47
- // subTitle='This is a subtitle'
48
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
49
- // ></Card>
50
- // )
51
- // }
52
-
53
- // export const CardTitleRight = () => {
54
- // return (
55
- // <Card
56
- // id='card'
57
- // title='This is a title'
58
- // titleClass='font-bold text-right'
59
- // subTitle='This is a subtitle'
60
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
61
- // ></Card>
62
- // )
63
- // }
64
-
65
- // export const CardWithImage = () => {
66
- // return (
67
- // <Card
68
- // id='card'
69
- // title='This is a title'
70
- // titleClass='text-center font-bold'
71
- // subTitle='This is a subtitle'
72
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
73
- // image='https://picsum.photos/500/300'>
74
- // </Card>
75
- // )
76
- // }
77
-
78
- // export const CardWithExtraText = () => {
79
- // return (
80
- // <Card
81
- // id='card'
82
- // title='This is a title'
83
- // titleClass='text-center font-bold'
84
- // subTitle='This is a subtitle'
85
- // extraText='This is some extra text'
86
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
87
- // image='https://picsum.photos/500/300'>
88
- // </Card>
89
- // )
90
- // }
91
-
92
- // export const CardWithButton = () => {
93
- // return (
94
- // <Card
95
- // id='card'
96
- // title='This is a title'
97
- // titleClass='text-center font-bold'
98
- // subTitle='This is a subtitle'
99
- // extraText='This is some extra text'
100
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
101
- // image='https://picsum.photos/500/300'
102
- // hasCta
103
- // ctaText='This is a button'
104
- // >
105
- // </Card>
106
- // )
107
- // }
108
-
109
- // export const CardWithSlideButton = () => {
110
- // return (
111
- // <Card
112
- // id='card'
113
- // title='This is a title'
114
- // titleClass='text-center font-bold'
115
- // subTitle='This is a subtitle'
116
- // extraText='This is some extra text'
117
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
118
- // image='https://picsum.photos/500/300'
119
- // hasCta
120
- // btnType='slide'
121
- // ctaText='This is a button'>
122
- // </Card>
123
- // )
124
- // }
125
-
126
- // export const CardWithImageBelowTitle = () => {
127
- // return (
128
- // <Card
129
- // id='card'
130
- // title='This is a title'
131
- // titleClass='text-center font-bold'
132
- // subTitle='This is a subtitle'
133
- // extraText='This is some extra text'
134
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
135
- // image='https://picsum.photos/500/300'
136
- // hasCta
137
- // ctaText='This is a button'
138
- // imageBelowTitle>
139
- // </Card>
140
- // )
141
- // }
142
-
143
- // export const CardRounded = () => {
144
- // return (
145
- // <Card
146
- // id='card'
147
- // title='This is a title'
148
- // titleClass='text-center font-bold'
149
- // subTitle='This is a subtitle'
150
- // extraText='This is some extra text'
151
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
152
- // image='https://picsum.photos/500/300'
153
- // hasCta
154
- // ctaText='This is a button'
155
- // rounded>
156
- // </Card>
157
- // )
158
- // }
159
-
160
- // export const CardRoundedWithImageBelowTitle = () => {
161
- // return (
162
- // <Card
163
- // id='card'
164
- // title='This is a title'
165
- // titleClass='text-center font-bold'
166
- // subTitle='This is a subtitle'
167
- // extraText='This is some extra text'
168
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
169
- // image='https://picsum.photos/500/300'
170
- // hasCta
171
- // ctaText='This is a button'
172
- // imageBelowTitle
173
- // rounded>
174
- // </Card>
175
- // )
176
- // }
177
-
178
- // export const lotsOfCards = () => {
179
- // let cards = []
180
- // for (let i = 0; i < 8 ; i++) {
181
- // cards.push(<Card
182
- // id='card'
183
- // title='This is a title'
184
- // titleClass='text-center font-bold'
185
- // subTitle='This is a subtitle'
186
- // extraText='This is some extra text'
187
- // description='This is a description, it can be really long if you want it to be. The text will wrap onto a new line if it exceeds the width of the card'
188
- // image='https://picsum.photos/500/300'
189
- // hasCta
190
- // ctaText='This is a button'
191
- // imageBelowTitle
192
- // rounded>
193
- // </Card>)
194
- // }
195
- // return (
196
- // <div className="grid grid-cols-4 grid-flow-row">
197
- // {cards}
198
- // </div>
199
- // )
200
- // }
201
-
39
+ }
package/babel.config.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@babel/env",
5
- {
6
- "targets": {
7
- "edge": "17",
8
- "firefox": "60",
9
- "chrome": "67",
10
- "safari": "11.1"
11
- },
12
- "useBuiltIns": "usage",
13
- "corejs": "3.6.5"
14
- }
15
- ],
16
- "@babel/preset-react"
17
- ]
18
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _Icon = _interopRequireDefault(require("../Icon/Icon"));
9
-
10
- require("./Styles.css");
11
-
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
- const ButtonSlide = _ref => {
15
- let {
16
- ctaText,
17
- ctaLink,
18
- className,
19
- onClick,
20
- leftIcon,
21
- rightIcon
22
- } = _ref;
23
- let classes = className + ' btn py-2 px-8 text-white border-2 bg-black hover:bg-white hover:text-black';
24
- let iconLeft = /*#__PURE__*/React.createElement(_Icon.default, {
25
- type: leftIcon
26
- });
27
- let iconRight = /*#__PURE__*/React.createElement(_Icon.default, {
28
- type: rightIcon
29
- });
30
- return /*#__PURE__*/React.createElement("button", {
31
- className: classes,
32
- onClick: onClick
33
- }, leftIcon && iconLeft, ctaText, rightIcon && iconRight);
34
- };
35
-
36
- var _default = ButtonSlide;
37
- exports.default = _default;
@@ -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;
@@ -1,22 +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 mx-auto px-4 flex"
14
- }, links && links.map(link => {
15
- return /*#__PURE__*/React.createElement("li", {
16
- className: "flex-1"
17
- }, link);
18
- }));
19
- };
20
-
21
- var _default = SignedInLinks;
22
- exports.default = _default;