trepur_components 1.0.0 → 1.0.2
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/Accordion/Accordion.stories.tsx +1 -1
- package/dist/components/Accordion/index.tsx +2 -2
- package/dist/components/Carousel/index.tsx +1 -1
- package/dist/components/Collapsible/index.tsx +1 -1
- package/dist/components/FooterBar/{footerBar.stories.tsx → FooterBar.stories.tsx} +0 -0
- package/dist/components/HamburgerIcon/index.tsx +1 -1
- package/dist/components/ImageLinkList/ImageLinkList.stories.tsx +5 -3
- package/dist/components/ImageLinkList/index.tsx +1 -1
- package/dist/components/Nav/index.tsx +4 -4
- package/dist/src/lib/components/Accordion/Accordion.stories.js +19 -11
- package/dist/src/lib/components/Accordion/Accordion.stories.js.map +1 -1
- package/dist/src/lib/components/Accordion/index.d.ts +1 -2
- package/dist/src/lib/components/Accordion/index.js +1 -1
- package/dist/src/lib/components/Accordion/index.js.map +1 -1
- package/dist/src/lib/components/AlertBar/AlertBar.stories.js +1 -1
- package/dist/src/lib/components/AlertBar/AlertBar.stories.js.map +1 -1
- package/dist/src/lib/components/AlertBar/index.js +21 -19
- package/dist/src/lib/components/AlertBar/index.js.map +1 -1
- package/dist/src/lib/components/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
- package/dist/src/lib/components/Breadcrumbs/index.js +8 -10
- package/dist/src/lib/components/Breadcrumbs/index.js.map +1 -1
- package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js +1 -1
- package/dist/src/lib/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.js.map +1 -1
- package/dist/src/lib/components/BreadcrumbsBordered/index.d.ts +1 -1
- package/dist/src/lib/components/BreadcrumbsBordered/index.js +7 -7
- package/dist/src/lib/components/BreadcrumbsBordered/index.js.map +1 -1
- package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js +2 -2
- package/dist/src/lib/components/BreadcrumbsItem/BreadcrumbsItem.stories.js.map +1 -1
- package/dist/src/lib/components/BreadcrumbsItem/index.js +33 -35
- package/dist/src/lib/components/BreadcrumbsItem/index.js.map +1 -1
- package/dist/src/lib/components/Button/button.stories.js +64 -19
- package/dist/src/lib/components/Button/button.stories.js.map +1 -1
- package/dist/src/lib/components/Button/index.js +11 -11
- package/dist/src/lib/components/Button/index.js.map +1 -1
- package/dist/src/lib/components/Card/Card.stories.d.ts +4 -1
- package/dist/src/lib/components/Card/Card.stories.js +32 -32
- package/dist/src/lib/components/Card/Card.stories.js.map +1 -1
- package/dist/src/lib/components/Card/index.d.ts +3 -3
- package/dist/src/lib/components/Card/index.js +43 -40
- package/dist/src/lib/components/Card/index.js.map +1 -1
- package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js +3 -3
- package/dist/src/lib/components/CardWithTopImage/CardWithTopImage.stories.js.map +1 -1
- package/dist/src/lib/components/CardWithTopImage/index.js +1 -1
- package/dist/src/lib/components/CardWithTopImage/index.js.map +1 -1
- package/dist/src/lib/components/Carousel/Carousel.stories.js +12 -12
- package/dist/src/lib/components/Carousel/Carousel.stories.js.map +1 -1
- package/dist/src/lib/components/Carousel/index.d.ts +6 -8
- package/dist/src/lib/components/Carousel/index.js +95 -54
- package/dist/src/lib/components/Carousel/index.js.map +1 -1
- package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js +1 -1
- package/dist/src/lib/components/ChevronCard/ChevronCard.stories.js.map +1 -1
- package/dist/src/lib/components/ChevronCard/index.js +8 -8
- package/dist/src/lib/components/ChevronCard/index.js.map +1 -1
- package/dist/src/lib/components/Collapsible/Collapsible.stories.js +5 -3
- package/dist/src/lib/components/Collapsible/Collapsible.stories.js.map +1 -1
- package/dist/src/lib/components/Collapsible/index.d.ts +1 -1
- package/dist/src/lib/components/Collapsible/index.js +22 -22
- package/dist/src/lib/components/Collapsible/index.js.map +1 -1
- package/dist/src/lib/components/Column/Column.stories.js +42 -8
- package/dist/src/lib/components/Column/Column.stories.js.map +1 -1
- package/dist/src/lib/components/Column/index.js +2 -2
- package/dist/src/lib/components/Column/index.js.map +1 -1
- package/dist/src/lib/components/Container/Container.stories.js +1 -1
- package/dist/src/lib/components/Container/Container.stories.js.map +1 -1
- package/dist/src/lib/components/Container/index.js +1 -1
- package/dist/src/lib/components/Container/index.js.map +1 -1
- package/dist/src/lib/components/FooterBar/footerBar.stories.js +2 -2
- package/dist/src/lib/components/FooterBar/footerBar.stories.js.map +1 -1
- package/dist/src/lib/components/FooterBar/index.js +1 -1
- package/dist/src/lib/components/FooterBar/index.js.map +1 -1
- package/dist/src/lib/components/Form/Form.stories.js +1 -1
- package/dist/src/lib/components/Form/Form.stories.js.map +1 -1
- package/dist/src/lib/components/Form/index.js +4 -4
- package/dist/src/lib/components/Form/index.js.map +1 -1
- package/dist/src/lib/components/FyreCard/FyreCard.stories.js +3 -3
- package/dist/src/lib/components/FyreCard/FyreCard.stories.js.map +1 -1
- package/dist/src/lib/components/FyreCard/index.js +6 -7
- package/dist/src/lib/components/FyreCard/index.js.map +1 -1
- package/dist/src/lib/components/Greeting/Greeting.stories.js +1 -1
- package/dist/src/lib/components/Greeting/Greeting.stories.js.map +1 -1
- package/dist/src/lib/components/Greeting/index.js +4 -4
- package/dist/src/lib/components/Greeting/index.js.map +1 -1
- package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +6 -0
- package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js +46 -0
- package/dist/src/lib/components/HamburgerIcon/HamburgerIcon.stories.js.map +1 -0
- package/dist/src/lib/components/HamburgerIcon/index.d.ts +7 -0
- package/dist/src/lib/components/HamburgerIcon/index.js +26 -0
- package/dist/src/lib/components/HamburgerIcon/index.js.map +1 -0
- package/dist/src/lib/components/Icon/Icon.stories.d.ts +1 -1
- package/dist/src/lib/components/Icon/Icon.stories.js +4 -2
- package/dist/src/lib/components/Icon/Icon.stories.js.map +1 -1
- package/dist/src/lib/components/Icon/index.d.ts +4 -2
- package/dist/src/lib/components/Icon/index.js +17 -3
- package/dist/src/lib/components/Icon/index.js.map +1 -1
- package/dist/src/lib/components/Image/Image.stories.js +2 -2
- package/dist/src/lib/components/Image/Image.stories.js.map +1 -1
- package/dist/src/lib/components/Image/index.js +3 -3
- package/dist/src/lib/components/Image/index.js.map +1 -1
- package/dist/src/lib/components/ImageLink/ImageLink.stories.d.ts +4 -1
- package/dist/src/lib/components/ImageLink/ImageLink.stories.js +8 -7
- package/dist/src/lib/components/ImageLink/ImageLink.stories.js.map +1 -1
- package/dist/src/lib/components/ImageLink/index.js +6 -6
- package/dist/src/lib/components/ImageLink/index.js.map +1 -1
- package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.d.ts +2 -2
- package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js +5 -3
- package/dist/src/lib/components/ImageLinkList/ImageLinkList.stories.js.map +1 -1
- package/dist/src/lib/components/ImageLinkList/index.d.ts +1 -1
- package/dist/src/lib/components/ImageLinkList/index.js +3 -3
- package/dist/src/lib/components/ImageLinkList/index.js.map +1 -1
- package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js +5 -3
- package/dist/src/lib/components/InformationIcon/InformationIcon.stories.js.map +1 -1
- package/dist/src/lib/components/InformationIcon/index.d.ts +1 -1
- package/dist/src/lib/components/InformationIcon/index.js +12 -13
- package/dist/src/lib/components/InformationIcon/index.js.map +1 -1
- package/dist/src/lib/components/Input/Input.stories.js +10 -10
- package/dist/src/lib/components/Input/Input.stories.js.map +1 -1
- package/dist/src/lib/components/Input/index.d.ts +1 -1
- package/dist/src/lib/components/Input/index.js +14 -14
- package/dist/src/lib/components/Input/index.js.map +1 -1
- package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js +1 -1
- package/dist/src/lib/components/Jumbotron/Jumbotron.stories.js.map +1 -1
- package/dist/src/lib/components/Jumbotron/index.js +1 -1
- package/dist/src/lib/components/Jumbotron/index.js.map +1 -1
- package/dist/src/lib/components/Nav/Nav.stories.d.ts +6 -0
- package/dist/src/lib/components/Nav/Nav.stories.js +12 -12
- package/dist/src/lib/components/Nav/Nav.stories.js.map +1 -1
- package/dist/src/lib/components/Nav/index.d.ts +2 -2
- package/dist/src/lib/components/Nav/index.js +25 -35
- package/dist/src/lib/components/Nav/index.js.map +1 -1
- package/dist/src/lib/components/NavItem/NavItem.stories.js +1 -1
- package/dist/src/lib/components/NavItem/NavItem.stories.js.map +1 -1
- package/dist/src/lib/components/NavItem/index.js +2 -2
- package/dist/src/lib/components/NavItem/index.js.map +1 -1
- package/dist/src/lib/components/NewsCard/NewsCard.stories.js +1 -1
- package/dist/src/lib/components/NewsCard/NewsCard.stories.js.map +1 -1
- package/dist/src/lib/components/NewsCard/index.js +3 -3
- package/dist/src/lib/components/NewsCard/index.js.map +1 -1
- package/dist/src/lib/components/Profile/Profile.stories.js +2 -2
- package/dist/src/lib/components/Profile/Profile.stories.js.map +1 -1
- package/dist/src/lib/components/Profile/index.js +9 -11
- package/dist/src/lib/components/Profile/index.js.map +1 -1
- package/dist/src/lib/components/Row/Row.stories.js +4 -4
- package/dist/src/lib/components/Row/Row.stories.js.map +1 -1
- package/dist/src/lib/components/Row/index.js.map +1 -1
- package/dist/src/lib/components/Search/Search.stories.js +1 -1
- package/dist/src/lib/components/Search/Search.stories.js.map +1 -1
- package/dist/src/lib/components/Search/index.js +10 -10
- package/dist/src/lib/components/Search/index.js.map +1 -1
- package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js +9 -9
- package/dist/src/lib/components/SocialBlock/SocialBlock.stories.js.map +1 -1
- package/dist/src/lib/components/SocialBlock/index.d.ts +2 -2
- package/dist/src/lib/components/SocialBlock/index.js +20 -21
- package/dist/src/lib/components/SocialBlock/index.js.map +1 -1
- package/dist/src/lib/components/StarRating/StarRating.stories.js +1 -1
- package/dist/src/lib/components/StarRating/StarRating.stories.js.map +1 -1
- package/dist/src/lib/components/StarRating/index.js +3 -3
- package/dist/src/lib/components/StarRating/index.js.map +1 -1
- package/dist/src/lib/components/Testimonial/Testimonial.stories.js +1 -1
- package/dist/src/lib/components/Testimonial/Testimonial.stories.js.map +1 -1
- package/dist/src/lib/components/Testimonial/index.js.map +1 -1
- package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js +2 -2
- package/dist/src/lib/components/TextAndTitle/TextAndTitle.stories.js.map +1 -1
- package/dist/src/lib/components/TextAndTitle/index.d.ts +2 -2
- package/dist/src/lib/components/TextAndTitle/index.js +55 -64
- package/dist/src/lib/components/TextAndTitle/index.js.map +1 -1
- package/dist/src/lib/components/TextArea/TextArea.stories.js +3 -3
- package/dist/src/lib/components/TextArea/TextArea.stories.js.map +1 -1
- package/dist/src/lib/components/TextArea/index.js +4 -3
- package/dist/src/lib/components/TextArea/index.js.map +1 -1
- package/dist/src/lib/components/Timeline/Timeline.stories.js +12 -13
- package/dist/src/lib/components/Timeline/Timeline.stories.js.map +1 -1
- package/dist/src/lib/components/Timeline/index.d.ts +1 -1
- package/dist/src/lib/components/Timeline/index.js +57 -35
- package/dist/src/lib/components/Timeline/index.js.map +1 -1
- package/dist/src/lib/components/Tubestops/Tubestops.stories.js +4 -4
- package/dist/src/lib/components/Tubestops/Tubestops.stories.js.map +1 -1
- package/dist/src/lib/components/Tubestops/index.js +5 -5
- package/dist/src/lib/components/Tubestops/index.js.map +1 -1
- package/dist/src/lib/components/UserIcon/UserIcon.stories.js.map +1 -1
- package/dist/src/lib/components/UserIcon/index.js +5 -6
- package/dist/src/lib/components/UserIcon/index.js.map +1 -1
- package/dist/src/lib/components/Video/Video.stories.js +1 -1
- package/dist/src/lib/components/Video/Video.stories.js.map +1 -1
- package/dist/src/lib/components/Video/index.js +2 -2
- package/dist/src/lib/components/Video/index.js.map +1 -1
- package/dist/src/lib/index.js.map +1 -1
- package/dist/src/lib/typography/Fonts.stories.d.ts +2 -2
- package/dist/src/lib/typography/Fonts.stories.js +2 -32
- package/dist/src/lib/typography/Fonts.stories.js.map +1 -1
- package/dist/src/lib/typography/index.d.ts +4 -2
- package/dist/src/lib/typography/index.js.map +1 -1
- package/dist/src/lib/utils/controls.js.map +1 -1
- package/dist/src/lib/utils/theme.d.ts +3 -2
- package/dist/src/lib/utils/theme.js +20 -0
- package/dist/src/lib/utils/theme.js.map +1 -1
- package/dist/tailwind.config.d.ts +1 -0
- package/dist/tailwind.config.js +1 -0
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Image from '.';
|
|
3
|
-
import { idAndClassName } from '
|
|
4
|
-
import logo from '
|
|
3
|
+
import { idAndClassName } from '../../utils/controls';
|
|
4
|
+
import logo from '@assets/images/primary-logo.png';
|
|
5
5
|
const componentMeta = {
|
|
6
6
|
title: 'Trepur Components/Rupert Bennett/Atoms/Image',
|
|
7
7
|
component: Image,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Image/Image.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,GAAG,CAAA;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"Image.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Image/Image.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,GAAG,CAAA;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,IAAI,MAAM,iCAAiC,CAAA;AAElD,MAAM,aAAa,GAAgC;IACjD,KAAK,EAAE,8CAA8C;IACrD,SAAS,EAAE,KAAK;IAChB,QAAQ,kCACH,cAAc,KACjB,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,WAAW,EAA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AAE,QAAQ,EAAE;aAC5B;SACF,EACD,WAAW,EAAE;YACX,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,WAAW,EAAE,mDAAmD;YAChE,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aAC7B;SACF,EACD,aAAa,EAAE;YACb,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC1C,WAAW,EAAE,kCAAkC;YAC/C,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;aAC7B;SACF,GACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;QACR,WAAW,EAAE,MAAM;KACpB;CACF,CAAA;AAED,MAAM,QAAQ,GAAiC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,KAAK,oBAAK,IAAI,EAAI,CAAA;AAE5E,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAEvC,eAAe,aAAa,CAAA"}
|
|
@@ -32,7 +32,7 @@ const Image = ({ id, className, image, altText, title, rounded = false, roundedF
|
|
|
32
32
|
'h-36': height === 9,
|
|
33
33
|
'h-40': height === 10,
|
|
34
34
|
'h-44': height === 11,
|
|
35
|
-
'h-full': (height === undefined) || (![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(height))
|
|
35
|
+
'h-full': (height === undefined) || (![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].includes(height))
|
|
36
36
|
});
|
|
37
37
|
const imageClassList = classNames({
|
|
38
38
|
'rounded-2xl': rounded,
|
|
@@ -43,12 +43,12 @@ const Image = ({ id, className, image, altText, title, rounded = false, roundedF
|
|
|
43
43
|
const overlayTextWrapperClassList = classNames(widthClassList, heightClassList, opacity, 'flex absolute z-20 transition-opacity duration-700');
|
|
44
44
|
const overlayTextClassList = 'm-auto text-center text-primary';
|
|
45
45
|
return (React.createElement(React.Fragment, null,
|
|
46
|
-
overlayText &&
|
|
46
|
+
overlayText !== undefined &&
|
|
47
47
|
React.createElement(React.Fragment, null,
|
|
48
48
|
React.createElement("div", { className: overlayClassList }),
|
|
49
49
|
React.createElement("div", { className: overlayTextWrapperClassList, onMouseEnter: () => setIsHovering(true), onMouseLeave: () => setIsHovering(false) },
|
|
50
50
|
React.createElement("p", { className: overlayTextClassList }, overlayText))),
|
|
51
|
-
React.createElement("img", Object.assign({ id: id, className: imageClassList, src: image }, (altText && { alt: altText }), (title && { title
|
|
51
|
+
React.createElement("img", Object.assign({ id: id, className: imageClassList, src: image }, (altText !== undefined && { alt: altText }), (title !== undefined && { title })))));
|
|
52
52
|
};
|
|
53
53
|
export default Image;
|
|
54
54
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,UAAU,MAAM,YAAY,CAAA;AAgBnC,MAAM,KAAK,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,UAAU,MAAM,YAAY,CAAA;AAgBnC,MAAM,KAAK,GAAG,CAAC,EACb,EAAE,EACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,GAAG,KAAK,EACf,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,CAAC,EACV,KAAK,GAAG,CAAC,EACT,WAAW,EACX,aAAa,GAAG,KAAK,EACf,EAAe,EAAE;IACvB,MAA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AAC,EACtC,CACD,CACJ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
2
|
+
import ImageLink from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof ImageLink>;
|
|
3
5
|
export declare const _ImageLink: ComponentStory<({ id, className, image, altText, title, link, rounded, openInNewTab, buttonProps }: import("./index").Props) => JSX.Element>;
|
|
4
6
|
export declare const _ImageLinkWithTitle: ComponentStory<({ id, className, image, altText, title, link, rounded, openInNewTab, buttonProps }: import("./index").Props) => JSX.Element>;
|
|
5
7
|
export declare const _ImageLinkWithButton: ComponentStory<({ id, className, image, altText, title, link, rounded, openInNewTab, buttonProps }: import("./index").Props) => JSX.Element>;
|
|
6
8
|
export declare const _ImageLinkRounded: ComponentStory<({ id, className, image, altText, title, link, rounded, openInNewTab, buttonProps }: import("./index").Props) => JSX.Element>;
|
|
9
|
+
export default componentMeta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { idAndClassName } from '
|
|
2
|
+
import { idAndClassName } from '../../utils/controls';
|
|
3
3
|
import Column from '../Column';
|
|
4
4
|
import ImageLink from './index';
|
|
5
5
|
const componentMeta = {
|
|
@@ -10,19 +10,19 @@ const componentMeta = {
|
|
|
10
10
|
description: '',
|
|
11
11
|
control: 'text',
|
|
12
12
|
table: {
|
|
13
|
-
category: ''
|
|
14
|
-
}
|
|
13
|
+
category: ''
|
|
14
|
+
}
|
|
15
15
|
}, image: {
|
|
16
16
|
description: '',
|
|
17
17
|
control: 'text',
|
|
18
18
|
table: {
|
|
19
|
-
category: ''
|
|
20
|
-
}
|
|
19
|
+
category: ''
|
|
20
|
+
}
|
|
21
21
|
} }),
|
|
22
22
|
args: {
|
|
23
23
|
image: 'https://picsum.photos/400/400',
|
|
24
24
|
link: '/'
|
|
25
|
-
}
|
|
25
|
+
}
|
|
26
26
|
};
|
|
27
27
|
const Template = (args) => React.createElement(Column, { sm: 3, md: 3 },
|
|
28
28
|
React.createElement(ImageLink, Object.assign({}, args)));
|
|
@@ -44,6 +44,7 @@ _ImageLinkRounded.args = {
|
|
|
44
44
|
buttonProps: {
|
|
45
45
|
children: 'Button 1'
|
|
46
46
|
},
|
|
47
|
-
rounded: true
|
|
47
|
+
rounded: true
|
|
48
48
|
};
|
|
49
|
+
export default componentMeta;
|
|
49
50
|
//# sourceMappingURL=ImageLink.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageLink.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLink/ImageLink.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageLink.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLink/ImageLink.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,MAAM,MAAM,oBAAoB,CAAA;AACvC,OAAO,SAAS,MAAM,SAAS,CAAA;AAG/B,MAAM,aAAa,GAAoC;IACrD,KAAK,EAAE,8CAA8C;IACrD,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;IACd,QAAQ,kCACH,cAAc,KACjB,KAAK,EAAE;YACL,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,MAAM;YACf,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;aACb;SACF,EACD,KAAK,EAAE;YACL,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,MAAM;YACf,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;aACb;SACF,GACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,+BAA+B;QACtC,IAAI,EAAE,GAAG;KACV;CACF,CAAA;AAED,MAAM,QAAQ,GAAqC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,MAAM,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IAAE,oBAAC,SAAS,oBAAK,IAAI,EAAI,CAAS,CAAA;AAEnH,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3C,UAAU,CAAC,IAAI,GAAG,EAAE,CAAA;AAEpB,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACpD,mBAAmB,CAAC,IAAI,GAAG;IACzB,KAAK,EAAE,OAAO;CACf,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACrD,oBAAoB,CAAC,IAAI,GAAG;IAC1B,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;KACrB;CACF,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAClD,iBAAiB,CAAC,IAAI,GAAG;IACvB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE;QACX,QAAQ,EAAE,UAAU;KACrB;IACD,OAAO,EAAE,IAAI;CACd,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -2,17 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import Button from '../Button';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
const ImageLink = ({ id, className, image, altText, title, link, rounded, openInNewTab, buttonProps }) => {
|
|
5
|
-
const classList = classNames(
|
|
5
|
+
const classList = classNames(className, 'cursor-pointer lg:mx-3 md:mx-1 mx-1 lg:mb-5 md:mb-2 mb-2 hover:opacity-50 overflow-hidden text-center');
|
|
6
6
|
const roundedClass = classNames({
|
|
7
7
|
'rounded-full': rounded
|
|
8
8
|
});
|
|
9
|
-
return (React.createElement("a", Object.assign({
|
|
9
|
+
return (React.createElement("a", Object.assign({ id: id, href: link }, (openInNewTab !== false && { target: 'blank' })),
|
|
10
10
|
React.createElement("div", { className: roundedClass + ' ' + classList + ' relative overflow-hidden' },
|
|
11
|
-
React.createElement("img", { src: image, alt: altText, className:
|
|
12
|
-
title &&
|
|
11
|
+
React.createElement("img", { src: image, alt: altText, className: 'object-cover w-full h-full' }),
|
|
12
|
+
title !== undefined &&
|
|
13
13
|
React.createElement("h1", { className: 'absolute bg-black text-white py-2 mt-4 top-0 inset-x-0 text-center' }, title),
|
|
14
|
-
(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.children) &&
|
|
15
|
-
React.createElement(Button, { className: 'absolute mx-8 mb-4 bottom-0 inset-x-0 text-center',
|
|
14
|
+
(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.children) !== undefined &&
|
|
15
|
+
React.createElement(Button, { className: 'absolute mx-8 mb-4 bottom-0 inset-x-0 text-center' }, buttonProps.children))));
|
|
16
16
|
};
|
|
17
17
|
export default ImageLink;
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLink/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAgC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLink/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAgC,MAAM,oBAAoB,CAAA;AACjE,OAAO,UAAU,MAAM,YAAY,CAAA;AAanC,MAAM,SAAS,GAAG,CAAC,EACjB,EAAE,EACF,SAAS,EACT,KAAK,EACL,OAAO,EACP,KAAK,EACL,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAW,EACL,EAAe,EAAE;IACvB,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,uGAAuG,CAAC,CAAA;IAEhJ,MAAM,YAAY,GAAG,UAAU,CAAC;QAC9B,cAAc,EAAE,OAAO;KACxB,CAAC,CAAA;IAEF,OAAO,CACL,yCACE,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,IACN,CAAC,YAAY,KAAK,KAAK,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QAEnD,6BAAK,SAAS,EAAE,YAAY,GAAG,GAAG,GAAG,SAAS,GAAG,2BAA2B;YAC1E,6BACE,GAAG,EAAE,KAAK,EACV,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,4BAA4B,GACtC;YACD,KAAK,KAAK,SAAS;gBAClB,4BACE,SAAS,EAAC,oEAAoE,IAE7E,KAAK,CACH;YACN,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,QAAQ,MAAK,SAAS;gBAClC,oBAAC,MAAM,IACL,SAAS,EAAC,mDAAmD,IAE5D,WAAW,CAAC,QAAQ,CACd,CACP,CACJ,CACL,CAAA;AACH,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import ImageLinkList from './index';
|
|
2
|
+
import ImageLinkList, { Props as imageLinkListProps } from './index';
|
|
3
3
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
4
|
declare const componentMeta: ComponentMeta<typeof ImageLinkList>;
|
|
5
|
-
export declare const _ImageLinkList: ComponentStory<({ id, className, items }:
|
|
5
|
+
export declare const _ImageLinkList: ComponentStory<({ id, className, items }: imageLinkListProps) => JSX.Element>;
|
|
6
6
|
export default componentMeta;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { idAndClassName } from '
|
|
2
|
+
import { idAndClassName } from '../../utils/controls';
|
|
3
3
|
import ImageLinkList from './index';
|
|
4
4
|
const getLinks = () => {
|
|
5
5
|
return new Array(16).fill(null).map(() => {
|
|
6
6
|
return {
|
|
7
|
-
image:
|
|
7
|
+
image: 'https://picsum.photos/400/400',
|
|
8
8
|
title: 'Hi',
|
|
9
|
-
|
|
9
|
+
buttonProps: {
|
|
10
|
+
children: React.createElement("p", null, "button")
|
|
11
|
+
}
|
|
10
12
|
};
|
|
11
13
|
});
|
|
12
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageLinkList.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLinkList/ImageLinkList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"ImageLinkList.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLinkList/ImageLinkList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,aAA8C,MAAM,SAAS,CAAA;AAGpE,MAAM,QAAQ,GAAG,GAAQ,EAAE;IACzB,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE;QACvC,OAAO;YACL,KAAK,EAAE,+BAA+B;YACtC,KAAK,EAAE,IAAI;YACX,WAAW,EAAE;gBACX,QAAQ,EAAE,wCAAa;aACxB;SACF,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,aAAa,GAAwC;IACzD,KAAK,EAAE,mDAAmD;IAC1D,SAAS,EAAE,aAAa;IACxB,UAAU,EAAE,EAAE;IACd,QAAQ,oBACH,cAAc,CAClB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ,EAAE;KAClB;CACF,CAAA;AAED,MAAM,QAAQ,GAAyC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,aAAa,oBAAK,IAAI,EAAI,CAAA;AAE5F,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE/C,eAAe,aAAa,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ImageLink from
|
|
2
|
+
import ImageLink from '../ImageLink/index';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
const ImageLinkList = ({ id, className, items }) => {
|
|
5
|
-
const classList = classNames(
|
|
6
|
-
return (React.createElement("div",
|
|
5
|
+
const classList = classNames(className, 'grid md:grid-cols-4 sm:grid-cols-2');
|
|
6
|
+
return (React.createElement("div", { id: id, className: classList }, items === null || items === void 0 ? void 0 : items.map((item, i) => {
|
|
7
7
|
return (React.createElement(ImageLink, { key: `image_link_${i + 0}`, altText: 'image', image: item.image, title: item.title }));
|
|
8
8
|
})));
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLinkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/ImageLinkList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,SAAsC,MAAM,oBAAoB,CAAA;AACvE,OAAO,UAAU,MAAM,YAAY,CAAA;AAOnC,MAAM,aAAa,GAAG,CAAC,EACrB,EAAE,EACF,SAAS,EACT,KAAK,EACC,EAAe,EAAE;IACvB,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,EAAE,oCAAoC,CAAC,CAAA;IAE7E,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC9B,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAS,EAAE,EAAE;QAC9B,OAAO,CACL,oBAAC,SAAS,IACR,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,EAC1B,OAAO,EAAC,OAAO,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,GACjB,CACH,CAAA;IACH,CAAC,CAAC,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import InformationIcon from './index';
|
|
3
|
-
import { idAndClassName } from '
|
|
3
|
+
import { idAndClassName } from '../../utils/controls';
|
|
4
4
|
const componentMeta = {
|
|
5
5
|
title: 'Trepur Components/Rupert Bennett/Atoms/Information Icon',
|
|
6
6
|
component: InformationIcon,
|
|
@@ -60,8 +60,10 @@ const componentMeta = {
|
|
|
60
60
|
theme: 'dark',
|
|
61
61
|
iconProps: {
|
|
62
62
|
type: 'heart',
|
|
63
|
-
size:
|
|
64
|
-
className: 'mr-4 mb-8'
|
|
63
|
+
size: 2,
|
|
64
|
+
className: 'mr-4 mb-8',
|
|
65
|
+
colour: 'white',
|
|
66
|
+
bgColour: 'primary'
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationIcon.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/InformationIcon/InformationIcon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,eAAe,MAAM,SAAS,CAAA;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAEhD,MAAM,aAAa,GAA0C;
|
|
1
|
+
{"version":3,"file":"InformationIcon.st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 @@ import Icon from '../Icon';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
const InformationIcon = ({ id, className, text, number, bordered = false, rounded = false, withAnimation = false, iconProps, theme = 'light' }) => {
|
|
5
5
|
const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary';
|
|
6
|
-
|
|
6
|
+
const loaded = useRef(false);
|
|
7
7
|
useEffect(() => {
|
|
8
|
-
const element = document.getElementById(id
|
|
9
|
-
|
|
8
|
+
const element = document.getElementById(`${id}_number`);
|
|
9
|
+
const observer = new IntersectionObserver((entries, observer) => {
|
|
10
10
|
entries.forEach(entry => {
|
|
11
|
-
if (entry.intersectionRatio >= 0.1 && loaded.current
|
|
11
|
+
if (entry.intersectionRatio >= 0.1 && !loaded.current) {
|
|
12
12
|
loaded.current = true;
|
|
13
|
-
counterAnimation(document.getElementById(id
|
|
13
|
+
counterAnimation(document.getElementById(`${id}_number`), 0, number, 3000);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
}, { threshold: 1 });
|
|
17
|
-
element && withAnimation && observer.observe(element);
|
|
17
|
+
(element != null) && withAnimation && observer.observe(element);
|
|
18
18
|
}, []);
|
|
19
19
|
const wrapperClasses = 'h-96 flex items-center text-center ease-out duration-300';
|
|
20
20
|
const classList = classNames({
|
|
21
|
-
|
|
22
|
-
'rounded-2xl': rounded
|
|
21
|
+
border: bordered,
|
|
22
|
+
'rounded-2xl': rounded
|
|
23
23
|
}, className, colours, 'flex flex-col justify-center w-full h-full items-center ease-out duration-300 text-md lg:text-md hover:text-lg');
|
|
24
24
|
const counterAnimation = (obj, start, end, duration) => {
|
|
25
|
-
let startTimestamp
|
|
25
|
+
let startTimestamp;
|
|
26
26
|
const step = (timestamp) => {
|
|
27
|
-
|
|
28
|
-
startTimestamp = timestamp;
|
|
27
|
+
startTimestamp = timestamp;
|
|
29
28
|
const progress = Math.min((timestamp - startTimestamp) / duration, 1);
|
|
30
29
|
obj.innerHTML = Math.floor(progress * (end - start) + start);
|
|
31
30
|
if (progress < 1) {
|
|
@@ -36,9 +35,9 @@ const InformationIcon = ({ id, className, text, number, bordered = false, rounde
|
|
|
36
35
|
};
|
|
37
36
|
return (React.createElement("div", { id: id, className: wrapperClasses },
|
|
38
37
|
React.createElement("div", { className: classList },
|
|
39
|
-
iconProps &&
|
|
38
|
+
(iconProps != null) &&
|
|
40
39
|
React.createElement(Icon, Object.assign({}, iconProps)),
|
|
41
|
-
number &&
|
|
40
|
+
number !== undefined &&
|
|
42
41
|
React.createElement("p", null, number),
|
|
43
42
|
React.createElement("p", null, text))));
|
|
44
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/InformationIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/InformationIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,IAA4B,MAAM,kBAAkB,CAAA;AAC3D,OAAO,UAAU,MAAM,YAAY,CAAA;AAcnC,MAAM,eAAe,GAAG,CAAC,EACvB,EAAE,EACF,SAAS,EACT,IAAI,EACJ,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,aAAa,GAAG,KAAK,EACrB,SAAS,EACT,KAAK,GAAG,OAAO,EACT,EAAe,EAAE;IACvB,MAAM,OAAO,GAAG,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,yCAAyC,CAAC,CAAC,CAAC,2CAA2C,CAAA;IAC1H,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAE5B,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG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GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,CAAA;YAC5D,IAAI,QAAQ,GAAG,CAAC,EAAE;gBAChB,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;aACnC;QACH,CAAC,CAAA;QACD,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAA;IACpC,CAAC,CAAA;IAED,OAAO,CACL,6BACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,cAAc;QAEzB,6BAAK,SAAS,EAAE,SAAS;YACtB,CAAC,SAAS,IAAI,IAAI,CAAC;gBAClB,oBAAC,IAAI,oBAAK,SAAS,EAAI;YACxB,MAAM,KAAK,SAAS;gBACnB,+BAAI,MAAM,CAAK;YACjB,+BAAI,IAAI,CAAK,CACT,CACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -25,49 +25,49 @@ const componentMeta = {
|
|
|
25
25
|
description: '',
|
|
26
26
|
control: 'text',
|
|
27
27
|
table: {
|
|
28
|
-
category: ''
|
|
28
|
+
category: ''
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
placeholder: {
|
|
32
32
|
description: '',
|
|
33
33
|
control: 'text',
|
|
34
34
|
table: {
|
|
35
|
-
category: ''
|
|
35
|
+
category: ''
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
bold: {
|
|
39
39
|
description: '',
|
|
40
40
|
control: 'boolean',
|
|
41
41
|
table: {
|
|
42
|
-
category: ''
|
|
42
|
+
category: ''
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
required: {
|
|
46
46
|
description: '',
|
|
47
47
|
control: 'boolean',
|
|
48
48
|
table: {
|
|
49
|
-
category: ''
|
|
49
|
+
category: ''
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
hasValidation: {
|
|
53
53
|
description: '',
|
|
54
54
|
control: 'boolean',
|
|
55
55
|
table: {
|
|
56
|
-
category: ''
|
|
56
|
+
category: ''
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
errors: {
|
|
60
60
|
description: '',
|
|
61
61
|
control: 'array',
|
|
62
62
|
table: {
|
|
63
|
-
category: ''
|
|
63
|
+
category: ''
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
value: {
|
|
67
67
|
description: 'The default value of the input',
|
|
68
68
|
control: 'text',
|
|
69
69
|
table: {
|
|
70
|
-
category: ''
|
|
70
|
+
category: ''
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
theme: {
|
|
@@ -83,9 +83,9 @@ const componentMeta = {
|
|
|
83
83
|
label: 'This is a label',
|
|
84
84
|
placeholder: 'This is a placeholder',
|
|
85
85
|
errors: [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
'This is an error',
|
|
87
|
+
'This is another error',
|
|
88
|
+
'This is a third error'
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,SAAS,CAAA;AAG3B,MAAM,aAAa,GAAgC;
|
|
1
|
+
{"version":3,"file":"Input.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,MAAM,SAAS,CAAA;AAG3B,MAAM,aAAa,GAAgC;IACjD,KAAK,EAAE,8CAA8C;IACrD,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,EAAE;IACd,QAAQ,EAAE;QACR,EAAE,EAAE;YACF,WAAW,EAAE,iCAAiC;YAC9C,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;gBACZ,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;gBAC3B,YAAY,EA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,EAAE,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;YACvE,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,uBAAuB;QACpC,MAAM,EAAE;YACN,kBAAkB;YAClB,uBAAuB;YACvB,uBAAuB;SACxB;KACF;CACF,CAAA;AAED,MAAM,QAAQ,GAAiC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,KAAK,oBAAK,IAAI,EAAI,CAAA;AAE5E,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAEvC,eAAe,aAAa,CAAA"}
|
|
@@ -2,24 +2,24 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
const Input = ({ id, className, labelClasses, inputClasses, autoComplete, disabled, formId, height, maxLength, minLength, pattern, required, readOnly, autoFocus, label, type, name, placeholder, bold, onChange, onBlur, onFocus, hasValidation, errors, value, theme }) => {
|
|
4
4
|
const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary';
|
|
5
|
-
const classList = classNames(
|
|
5
|
+
const classList = classNames(className, colours, 'flex flex-col');
|
|
6
6
|
const labelClassList = classNames({
|
|
7
|
-
'font-bold': bold
|
|
8
|
-
},
|
|
9
|
-
const inputClassList = classNames({},
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
'font-bold': bold
|
|
8
|
+
}, labelClasses, 'w-auto pb-2');
|
|
9
|
+
const inputClassList = classNames({}, inputClasses, colours, 'border px-2 py-2 mb-2 rounded-md');
|
|
10
|
+
const newId = id !== undefined ? `-${id}` : '';
|
|
11
|
+
return (React.createElement("div", { id: id, className: classList },
|
|
12
|
+
label !== undefined &&
|
|
13
|
+
React.createElement("label", { id: `label${newId}`, className: labelClassList, htmlFor: `input${newId}` },
|
|
13
14
|
React.createElement("p", null,
|
|
14
15
|
label,
|
|
15
|
-
required &&
|
|
16
|
+
required === true &&
|
|
16
17
|
React.createElement("span", { className: 'text-red' }, "*"))),
|
|
17
|
-
React.createElement("input", { id: `input
|
|
18
|
-
hasValidation &&
|
|
19
|
-
React.createElement("div", { id:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}))));
|
|
18
|
+
React.createElement("input", { id: `input${newId}`, className: inputClassList, autoComplete: autoComplete, disabled: disabled, form: formId, height: height, maxLength: maxLength, minLength: minLength, pattern: pattern, required: required, readOnly: readOnly, type: type, name: name, value: value, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onFocus: onFocus }),
|
|
19
|
+
hasValidation === true &&
|
|
20
|
+
React.createElement("div", { id: `errors${newId}` }, errors === null || errors === void 0 ? void 0 : errors.map((error, i) => {
|
|
21
|
+
return (React.createElement("p", { key: `error_msg_${i + 0}`, className: 'text-red text-sm' }, error));
|
|
22
|
+
}))));
|
|
23
23
|
};
|
|
24
24
|
export default Input;
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AA+BnC,MAAM,KAAK,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AA+BnC,MAAM,KAAK,GAAG,CAAC,EACb,EAAE,EACF,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,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OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,GAChB;QACD,aAAa,KAAK,IAAI;YACrB,6BAAK,EAAE,EAAE,SAAS,KAAK,EAAE,IACtB,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;gBACxB,OAAO,CACL,2BACE,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,EACzB,SAAS,EAAC,kBAAkB,IAE3B,KAAK,CACJ,CACL,CAAA;YACH,CAAC,CAAC,CACE,CACJ,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Jumbotron.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Jumbotron/Jumbotron.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,SAAS,MAAM,SAAS,CAAA;AAG/B,MAAM,aAAa,GAAoC;
|
|
1
|
+
{"version":3,"file":"Jumbotron.stories.js","sourceRoot":"","sources":["../../../../../src/lib/components/Jumbotron/Jumbotron.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,SAAS,MAAM,SAAS,CAAA;AAG/B,MAAM,aAAa,GAAoC;IACrD,KAAK,EAAE,sDAAsD;IAC7D,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,EAAE;IACd,QAAQ,oBACH,cAAc,CAClB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,gCAAgC;KACxC;CACF,CAAA;AAED,MAAM,QAAQ,GAAqC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAC,SAAS,oBAAK,IAAI,EAAI,CAAA;AAEpF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAE3C,eAAe,aAAa,CAAA"}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
const Jumbotron = ({ id, className, image, altText }) => {
|
|
4
4
|
const classList = classNames(className);
|
|
5
|
-
return (React.createElement("div",
|
|
5
|
+
return (React.createElement("div", { id: id, className: classList },
|
|
6
6
|
React.createElement("img", { className: 'w-full object-cover', src: image, alt: altText })));
|
|
7
7
|
};
|
|
8
8
|
export default Jumbotron;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Jumbotron/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AAQnC,MAAM,SAAS,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/components/Jumbotron/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,UAAU,MAAM,YAAY,CAAA;AAQnC,MAAM,SAAS,GAAG,CAAC,EACjB,EAAE,EACF,SAAS,EACT,KAAK,EACL,OAAO,EACD,EAAe,EAAE;IACvB,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IAEvC,OAAO,CACL,6BAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS;QAC/B,6BAAK,SAAS,EAAC,qBAAqB,EAAC,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,GAAI,CAC7D,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import Nav from './index';
|
|
3
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
4
|
+
declare const componentMeta: ComponentMeta<typeof Nav>;
|
|
5
|
+
export declare const _Nav: ComponentStory<({ id, className, navLinks, asSideBar, dropdownNavHeight, logo, logoDarkTheme, mobileLogo, mobileLogoDarkTheme, logoLink, fixedTop, mobileClasses, getNavStatus, theme, text, textLink }: import("./index").Props) => JSX.Element>;
|
|
6
|
+
export default componentMeta;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Nav from './index';
|
|
3
|
-
import { idAndClassName } from '
|
|
4
|
-
import logoDarkTheme from '
|
|
5
|
-
import
|
|
3
|
+
import { idAndClassName } from '../../utils/controls';
|
|
4
|
+
import logoDarkTheme from '@assets/images/primary-logo-bold.png';
|
|
5
|
+
import logoImage from '@assets/images/secondary-logo-bold.png';
|
|
6
6
|
const navLinks = [
|
|
7
7
|
{ title: 'Home', href: '/', isActive: true },
|
|
8
8
|
{ title: 'Resume', href: '/', isActive: false },
|
|
@@ -108,25 +108,25 @@ const componentMeta = {
|
|
|
108
108
|
description: 'A link to navigate to when clicking on the text in the component',
|
|
109
109
|
control: 'string',
|
|
110
110
|
table: {
|
|
111
|
-
category: ''
|
|
111
|
+
category: ''
|
|
112
112
|
}
|
|
113
113
|
} }),
|
|
114
114
|
args: {
|
|
115
115
|
logoLink: '/',
|
|
116
|
-
navLinks
|
|
116
|
+
navLinks,
|
|
117
117
|
asSideBar: true,
|
|
118
118
|
dropdownNavHeight: '80',
|
|
119
|
-
logo:
|
|
120
|
-
logoDarkTheme
|
|
121
|
-
mobileLogo:
|
|
119
|
+
logo: logoImage,
|
|
120
|
+
logoDarkTheme,
|
|
121
|
+
mobileLogo: logoImage,
|
|
122
122
|
mobileLogoDarkTheme: logoDarkTheme,
|
|
123
123
|
fixedTop: true,
|
|
124
124
|
theme: 'dark',
|
|
125
125
|
text: 'rupertbennett.com',
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
126
|
+
getNavStatus: (status) => {
|
|
127
|
+
console.log(status ? 'open' : 'closed');
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
130
|
};
|
|
131
131
|
const Template = (args) => React.createElement(Nav, Object.assign({}, args));
|
|
132
132
|
export const _Nav = Template.bind({});
|