@pixelated-tech/components 3.1.6 → 3.2.0
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/callout/callout.js +10 -9
- package/dist/components/callout/callout.scss +43 -43
- package/dist/components/carousel/carousel.css +24 -22
- package/dist/components/carousel/carousel.drag.js +1 -1
- package/dist/components/carousel/carousel.js +10 -10
- package/dist/components/{tiles → carousel}/tiles.css +10 -10
- package/dist/components/{tiles → carousel}/tiles.js +3 -3
- package/dist/components/cms/contentful.items.components.js +12 -12
- package/dist/components/cms/contentful.items.css +24 -24
- package/dist/components/cms/gravatar.components.js +87 -5
- package/dist/components/cms/instagram.components.js +1 -1
- package/dist/components/cms/wordpress.components.js +3 -3
- package/dist/components/cms/wordpress.css +3 -3
- package/dist/components/general/microinteractions.css +7 -7
- package/dist/components/general/modal.css +5 -5
- package/dist/components/general/modal.js +1 -1
- package/dist/components/general/semantic.js +282 -0
- package/dist/components/general/semantic.scss +359 -0
- package/dist/components/menu/menu-accordion.css +27 -21
- package/dist/components/menu/menu-accordion.js +1 -1
- package/dist/components/menu/menu-simple.css +8 -8
- package/dist/components/menu/menu-simple.js +3 -3
- package/dist/components/nerdjoke/nerdjoke.js +85 -77
- package/dist/components/pagebuilder/components/PageBuilderUI.js +1 -1
- package/dist/components/pagebuilder/components/PageEngine.js +21 -14
- package/dist/components/pagebuilder/lib/componentMap.js +5 -5
- package/dist/components/pagebuilder/lib/componentMetadata.js +1 -1
- package/dist/components/seo/404.css +5 -5
- package/dist/components/seo/404.js +2 -2
- package/dist/components/seo/googlemap.js +2 -1
- package/dist/components/seo/googlesearch.css +11 -0
- package/dist/components/shoppingcart/ebay.css +5 -5
- package/dist/components/shoppingcart/shoppingcart.css +1 -1
- package/dist/components/{resume → structured}/resume.css +4 -0
- package/dist/components/{resume → structured}/resume.js +3 -3
- package/dist/components/{timeline → structured}/timeline.css +14 -14
- package/dist/components/{timeline → structured}/timeline.js +3 -3
- package/dist/css/pixelated.global.css +25 -164
- package/dist/index.js +11 -12
- package/dist/types/components/callout/callout.d.ts.map +1 -1
- package/dist/types/components/carousel/carousel.d.ts.map +1 -1
- package/dist/types/components/{tiles → carousel}/tiles.d.ts +1 -1
- package/dist/types/components/carousel/tiles.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.items.components.d.ts.map +1 -1
- package/dist/types/components/cms/gravatar.components.d.ts +53 -24
- package/dist/types/components/cms/gravatar.components.d.ts.map +1 -1
- package/dist/types/components/cms/pixelated.linkedin.d.ts.map +1 -0
- package/dist/types/components/cms/pixelated.linkedin1.d.ts.map +1 -0
- package/dist/types/components/cms/pixelated.linkedin2.d.ts.map +1 -0
- package/dist/types/components/cms/yelp.d.ts.map +1 -0
- package/dist/types/components/general/semantic.d.ts +153 -0
- package/dist/types/components/general/semantic.d.ts.map +1 -0
- package/dist/types/components/general/sidepanel.d.ts.map +1 -0
- package/dist/types/components/nerdjoke/nerdjoke.d.ts +15 -20
- package/dist/types/components/nerdjoke/nerdjoke.d.ts.map +1 -1
- package/dist/types/components/pagebuilder/components/PageEngine.d.ts.map +1 -1
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts +6 -6
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts.map +1 -1
- package/dist/types/components/seo/404.d.ts.map +1 -1
- package/dist/types/components/seo/googlemap.d.ts +1 -0
- package/dist/types/components/seo/googlemap.d.ts.map +1 -1
- package/dist/types/components/{buzzwordbingo → structured}/buzzwordbingo.d.ts +1 -1
- package/dist/types/components/structured/buzzwordbingo.d.ts.map +1 -0
- package/dist/types/components/structured/markdown.d.ts.map +1 -0
- package/dist/types/components/structured/recipe.d.ts.map +1 -0
- package/dist/types/components/{resume → structured}/resume.d.ts +1 -1
- package/dist/types/components/structured/resume.d.ts.map +1 -0
- package/dist/types/components/{socialcard → structured}/socialcard.d.ts +1 -1
- package/dist/types/components/{socialcard → structured}/socialcard.d.ts.map +1 -1
- package/dist/types/components/{timeline → structured}/timeline.d.ts +1 -1
- package/dist/types/components/structured/timeline.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -10
- package/dist/types/stories/callout/callout.many.stories.d.ts.map +1 -0
- package/dist/types/stories/{callout.stories.d.ts → callout/callout.stories.d.ts} +1 -1
- package/dist/types/stories/callout/callout.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel-hero.stories.d.ts → carousel/carousel-hero.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel-hero.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel-reviews.stories.d.ts → carousel/carousel-reviews.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel-reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel-workportfolio.stories.d.ts → carousel/carousel-workportfolio.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel-workportfolio.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel.stories.d.ts → carousel/carousel.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel.stories.d.ts.map +1 -0
- package/dist/types/stories/{tiles.stories.d.ts → carousel/tiles.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/tiles.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.contentful.item.stories.d.ts → cms/contentful.item.stories.d.ts} +2 -2
- package/dist/types/stories/cms/contentful.item.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.contentful.items.stories.d.ts → cms/contentful.items.stories.d.ts} +2 -2
- package/dist/types/stories/cms/contentful.items.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.contentful.stories.d.ts → cms/contentful.stories.d.ts} +2 -2
- package/dist/types/stories/cms/contentful.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.google.reviews.stories.d.ts → cms/google.reviews.stories.d.ts} +2 -2
- package/dist/types/stories/cms/google.reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.gravatar.stories.d.ts → cms/gravatar.stories.d.ts} +2 -2
- package/dist/types/stories/cms/gravatar.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.instagram.stories.d.ts → cms/instagram.stories.d.ts} +2 -2
- package/dist/types/stories/cms/instagram.stories.d.ts.map +1 -0
- package/dist/types/stories/cms/wordpress.stories.d.ts +9 -0
- package/dist/types/stories/cms/wordpress.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.headers.stories.d.ts → general/headers.stories.d.ts} +5 -5
- package/dist/types/stories/general/headers.stories.d.ts.map +1 -0
- package/dist/types/stories/{layout.stories.d.ts → general/layout.stories.d.ts} +1 -1
- package/dist/types/stories/general/layout.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.loading.stories.d.ts → general/loading.stories.d.ts} +2 -2
- package/dist/types/stories/general/loading.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.microinteractions.stories.d.ts → general/microinteractions.stories.d.ts} +2 -2
- package/dist/types/stories/general/microinteractions.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.modal.stories.d.ts → general/modal.stories.d.ts} +2 -2
- package/dist/types/stories/general/modal.stories.d.ts.map +1 -0
- package/dist/types/stories/{sidepanel.stories.d.ts → general/sidepanel.stories.d.ts} +1 -1
- package/dist/types/stories/general/sidepanel.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.table.stories.d.ts → general/table.stories.d.ts} +3 -3
- package/dist/types/stories/general/table.stories.d.ts.map +1 -0
- package/dist/types/stories/{menu-accordion.stories.d.ts → menu/menu-accordion.stories.d.ts} +1 -1
- package/dist/types/stories/menu/menu-accordion.stories.d.ts.map +1 -0
- package/dist/types/stories/{menu-simple.stories.d.ts → menu/menu-simple.stories.d.ts} +1 -1
- package/dist/types/stories/menu/menu-simple.stories.d.ts.map +1 -0
- package/dist/types/stories/nerdjoke.stories.d.ts +1 -1
- package/dist/types/stories/nerdjoke.stories.d.ts.map +1 -1
- package/dist/types/stories/{pagebuilder.form-builder.stories.d.ts → pagebuilder/form-builder.stories.d.ts} +2 -2
- package/dist/types/stories/pagebuilder/form-builder.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.form-engine.stories.d.ts → pagebuilder/form-engine.stories.d.ts} +3 -3
- package/dist/types/stories/pagebuilder/form-engine.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.form-extractor.stories.d.ts → pagebuilder/form-extractor.stories.d.ts} +2 -2
- package/dist/types/stories/pagebuilder/form-extractor.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.stories.d.ts → pagebuilder/pagebuilder.stories.d.ts} +1 -1
- package/dist/types/stories/pagebuilder/pagebuilder.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.usageguide.stories.d.ts → pagebuilder/pagebuilder.usageguide.stories.d.ts} +1 -1
- package/dist/types/stories/pagebuilder/pagebuilder.usageguide.stories.d.ts.map +1 -0
- package/dist/types/stories/{pageengine.stories.d.ts → pagebuilder/pageengine.stories.d.ts} +1 -1
- package/dist/types/stories/pagebuilder/pageengine.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.404.stories.d.ts → seo/seo.404.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.404.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.googleanalytics.stories.d.ts → seo/seo.googleanalytics.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.googleanalytics.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.googlesearch.stories.d.ts → seo/seo.googlesearch.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.googlesearch.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.metadata.stories.d.ts → seo/seo.metadata.stories.d.ts} +2 -2
- package/dist/types/stories/seo/seo.metadata.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.sitemap.stories.d.ts → seo/seo.sitemap.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.sitemap.stories.d.ts.map +1 -0
- package/dist/types/stories/{shoppingcart.ebay.item.stories.d.ts → shoppingcart/shoppingcart.ebay.item.stories.d.ts} +1 -1
- package/dist/types/stories/shoppingcart/shoppingcart.ebay.item.stories.d.ts.map +1 -0
- package/dist/types/stories/{shoppingcart.ebay.items.stories.d.ts → shoppingcart/shoppingcart.ebay.items.stories.d.ts} +1 -1
- package/dist/types/stories/shoppingcart/shoppingcart.ebay.items.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart/shoppingcart.stories.d.ts.map +1 -0
- package/dist/types/stories/{buzzword-bingo.stories.d.ts → structured/buzzword-bingo.stories.d.ts} +2 -2
- package/dist/types/stories/structured/buzzword-bingo.stories.d.ts.map +1 -0
- package/dist/types/stories/{markdown.stories.d.ts → structured/markdown.stories.d.ts} +1 -1
- package/dist/types/stories/structured/markdown.stories.d.ts.map +1 -0
- package/dist/types/stories/{recipe.stories.d.ts → structured/recipe.stories.d.ts} +2 -2
- package/dist/types/stories/structured/recipe.stories.d.ts.map +1 -0
- package/dist/types/stories/{resume.stories.d.ts → structured/resume.stories.d.ts} +1 -1
- package/dist/types/stories/{resume.stories.d.ts.map → structured/resume.stories.d.ts.map} +1 -1
- package/dist/types/stories/{socialcard.stories.d.ts → structured/socialcard.stories.d.ts} +1 -1
- package/dist/types/stories/structured/socialcard.stories.d.ts.map +1 -0
- package/dist/types/stories/{timeline.stories.d.ts → structured/timeline.stories.d.ts} +1 -1
- package/dist/types/stories/structured/timeline.stories.d.ts.map +1 -0
- package/package.json +9 -6
- package/dist/components/general/headers.css +0 -16
- package/dist/components/general/headers.js +0 -27
- package/dist/components/general/layout.js +0 -147
- package/dist/components/general/layout.scss +0 -47
- package/dist/types/components/buzzwordbingo/buzzwordbingo.d.ts.map +0 -1
- package/dist/types/components/general/headers.d.ts +0 -19
- package/dist/types/components/general/headers.d.ts.map +0 -1
- package/dist/types/components/general/layout.d.ts +0 -73
- package/dist/types/components/general/layout.d.ts.map +0 -1
- package/dist/types/components/linkedin/pixelated.linkedin.d.ts.map +0 -1
- package/dist/types/components/linkedin/pixelated.linkedin1.d.ts.map +0 -1
- package/dist/types/components/linkedin/pixelated.linkedin2.d.ts.map +0 -1
- package/dist/types/components/markdown/markdown.d.ts.map +0 -1
- package/dist/types/components/recipe/recipe.d.ts.map +0 -1
- package/dist/types/components/resume/resume.d.ts.map +0 -1
- package/dist/types/components/sidepanel/sidepanel.d.ts.map +0 -1
- package/dist/types/components/tiles/tiles.d.ts.map +0 -1
- package/dist/types/components/timeline/timeline.d.ts.map +0 -1
- package/dist/types/components/yelp/yelp.d.ts.map +0 -1
- package/dist/types/stories/buzzword-bingo.stories.d.ts.map +0 -1
- package/dist/types/stories/callout.many.stories.d.ts.map +0 -1
- package/dist/types/stories/callout.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel-hero.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel-reviews.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel-workportfolio.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.contentful.item.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.contentful.items.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.contentful.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.google.reviews.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.gravatar.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.instagram.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.wordpress.stories.d.ts +0 -26
- package/dist/types/stories/cms.wordpress.stories.d.ts.map +0 -1
- package/dist/types/stories/general.headers.stories.d.ts.map +0 -1
- package/dist/types/stories/general.loading.stories.d.ts.map +0 -1
- package/dist/types/stories/general.microinteractions.stories.d.ts.map +0 -1
- package/dist/types/stories/general.modal.stories.d.ts.map +0 -1
- package/dist/types/stories/general.table.stories.d.ts.map +0 -1
- package/dist/types/stories/layout.stories.d.ts.map +0 -1
- package/dist/types/stories/markdown.stories.d.ts.map +0 -1
- package/dist/types/stories/menu-accordion.stories.d.ts.map +0 -1
- package/dist/types/stories/menu-simple.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.form-builder.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.form-engine.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.form-extractor.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.usageguide.stories.d.ts.map +0 -1
- package/dist/types/stories/pageengine.stories.d.ts.map +0 -1
- package/dist/types/stories/recipe.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.404.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.googleanalytics.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.googlesearch.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.metadata.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.sitemap.stories.d.ts.map +0 -1
- package/dist/types/stories/shoppingcart.ebay.item.stories.d.ts.map +0 -1
- package/dist/types/stories/shoppingcart.ebay.items.stories.d.ts.map +0 -1
- package/dist/types/stories/shoppingcart.stories.d.ts.map +0 -1
- package/dist/types/stories/sidepanel.stories.d.ts.map +0 -1
- package/dist/types/stories/socialcard.stories.d.ts.map +0 -1
- package/dist/types/stories/tiles.stories.d.ts.map +0 -1
- package/dist/types/stories/timeline.stories.d.ts.map +0 -1
- package/dist/components/{linkedin → cms}/pixelated.linkedin.js +0 -0
- package/dist/components/{linkedin → cms}/pixelated.linkedin1.js +0 -0
- package/dist/components/{linkedin → cms}/pixelated.linkedin2.js +0 -0
- package/dist/components/{yelp → cms}/yelp.js +0 -0
- package/dist/components/{sidepanel → general}/sidepanel.css +0 -0
- package/dist/components/{sidepanel → general}/sidepanel.js +0 -0
- package/dist/components/{buzzwordbingo → structured}/buzzwordbingo.css +0 -0
- package/dist/components/{buzzwordbingo → structured}/buzzwordbingo.js +1 -1
- package/dist/components/{markdown → structured}/markdown.css +0 -0
- package/dist/components/{markdown → structured}/markdown.js +0 -0
- package/dist/components/{recipe → structured}/recipe.css +0 -0
- package/dist/components/{recipe → structured}/recipe.js +0 -0
- package/dist/components/{socialcard → structured}/socialcard.css +0 -0
- package/dist/components/{socialcard → structured}/socialcard.js +1 -1
- /package/dist/types/components/{linkedin → cms}/pixelated.linkedin.d.ts +0 -0
- /package/dist/types/components/{linkedin → cms}/pixelated.linkedin1.d.ts +0 -0
- /package/dist/types/components/{linkedin → cms}/pixelated.linkedin2.d.ts +0 -0
- /package/dist/types/components/{yelp → cms}/yelp.d.ts +0 -0
- /package/dist/types/components/{sidepanel → general}/sidepanel.d.ts +0 -0
- /package/dist/types/components/{markdown → structured}/markdown.d.ts +0 -0
- /package/dist/types/components/{recipe → structured}/recipe.d.ts +0 -0
- /package/dist/types/stories/{callout.many.stories.d.ts → callout/callout.many.stories.d.ts} +0 -0
- /package/dist/types/stories/{shoppingcart.stories.d.ts → shoppingcart/shoppingcart.stories.d.ts} +0 -0
|
@@ -51,25 +51,26 @@ export function Callout({ variant = 'default', boxShape = "squircle", layout = "
|
|
|
51
51
|
cloudinaryDomain,
|
|
52
52
|
cloudinaryTransforms */ }) {
|
|
53
53
|
const target = url && url.substring(0, 4).toLowerCase() === 'http' ? '_blank' : '_self';
|
|
54
|
-
const
|
|
54
|
+
const friendlyTitle = title ? title.toLowerCase().replace(/\s+/g, '-') : undefined;
|
|
55
|
+
const body = _jsxs("div", { className: "callout-body", children: [(title) ? _jsx(CalloutHeader, { title: title, url: url, target: target }) : null, (subtitle) ? _jsx("div", { className: "callout-subtitle", children: _jsx("h3", { children: subtitle }) }) : null, content ? _jsx("div", { className: "callout-content", children: _jsx(_Fragment, { children: content }) }) : null, url && buttonText
|
|
55
56
|
? _jsx(CalloutButton, { title: buttonText, url: url, target: target })
|
|
56
57
|
: url && title
|
|
57
58
|
? _jsx(CalloutButton, { title: title || "", url: url, target: target })
|
|
58
59
|
: null] });
|
|
59
60
|
const config = usePixelatedConfig();
|
|
60
61
|
const image = (img) ?
|
|
61
|
-
_jsx("div", { className: "
|
|
62
|
+
_jsx("div", { className: "callout-image" + (imgShape ? " " + imgShape : ""), children: (url && !imgClick)
|
|
62
63
|
? _jsx("a", { href: url, target: target, rel: target == "_blank" ? "noopener noreferrer" : "", children: _jsx(SmartImage, { src: img, title: title ?? imgAlt ?? undefined, alt: imgAlt ?? title ?? "", aboveFold: aboveFold, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined, suppressHydrationWarning: true }) })
|
|
63
64
|
: (url && imgClick)
|
|
64
65
|
? _jsx(SmartImage, { src: img, title: title ?? imgAlt ?? undefined, alt: imgAlt ?? title ?? "", onClick: (event) => imgClick(event, url), aboveFold: aboveFold, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined, suppressHydrationWarning: true })
|
|
65
66
|
/* <img src={img} title={title ?? imgAlt ?? undefined} alt={imgAlt ?? title ?? undefined} onClick={(event) => imgClick(event, url)} /> */
|
|
66
67
|
: _jsx(SmartImage, { src: img, title: title ?? imgAlt ?? undefined, alt: imgAlt ?? title ?? "", aboveFold: aboveFold, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined, suppressHydrationWarning: true }) }) : null;
|
|
67
|
-
return (_jsx("div", { className: "callout" +
|
|
68
|
+
return (_jsx("div", { id: friendlyTitle ? "callout-" + friendlyTitle : undefined, className: "callout" +
|
|
68
69
|
(variant ? " " + variant : "") +
|
|
69
70
|
((variant === 'boxed' || variant === 'boxed grid') && boxShape ? " " + boxShape : "") +
|
|
70
71
|
(layout && variant !== 'split' ? " " + layout : "") +
|
|
71
72
|
(direction && layout !== 'vertical' ? " " + direction : "") +
|
|
72
|
-
(variant && (variant === 'boxed grid' || variant === 'grid') && gridColumns ? `
|
|
73
|
+
(variant && (variant === 'boxed grid' || variant === 'grid') && gridColumns ? ` callout-grid-${gridColumns.left}-${gridColumns.right}` : ''), children: (direction === "right") ? _jsxs(_Fragment, { children: [body, image] }) : _jsxs(_Fragment, { children: [image, body] }) }));
|
|
73
74
|
}
|
|
74
75
|
/* ========== CALLOUT HEADER ========== */
|
|
75
76
|
CalloutHeader.propTypes = {
|
|
@@ -78,9 +79,9 @@ CalloutHeader.propTypes = {
|
|
|
78
79
|
target: PropTypes.string
|
|
79
80
|
};
|
|
80
81
|
export function CalloutHeader({ title, url, target }) {
|
|
81
|
-
return (_jsx("div", { className: "
|
|
82
|
-
? _jsx("a", { href: url, target: target ? target : "", rel: target == "_blank" ? "noopener noreferrer" : "", children: _jsx("h2", { className: "
|
|
83
|
-
: _jsx("h2", { className: "
|
|
82
|
+
return (_jsx("div", { className: "callout-header", children: (url)
|
|
83
|
+
? _jsx("a", { href: url, target: target ? target : "", rel: target == "_blank" ? "noopener noreferrer" : "", children: _jsx("h2", { className: "callout-title", children: title }) })
|
|
84
|
+
: _jsx("h2", { className: "callout-title", children: title }) }));
|
|
84
85
|
}
|
|
85
86
|
/* ========== CALLOUT BUTTON ========== */
|
|
86
87
|
CalloutButton.propTypes = {
|
|
@@ -89,7 +90,7 @@ CalloutButton.propTypes = {
|
|
|
89
90
|
target: PropTypes.string
|
|
90
91
|
};
|
|
91
92
|
export function CalloutButton({ title, url, target }) {
|
|
92
|
-
return (_jsx("div", { className: "
|
|
93
|
-
? _jsx("button", { type: "button", className: "
|
|
93
|
+
return (_jsx("div", { className: "callout-button", children: (url)
|
|
94
|
+
? _jsx("button", { type: "button", className: "callout-button", children: _jsx("a", { href: url || "", target: target || "", rel: target == "_blank" ? "noopener noreferrer" : "", children: title }) })
|
|
94
95
|
: null }));
|
|
95
96
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
padding: 0;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.callout .
|
|
25
|
+
.callout .callout-image {
|
|
26
26
|
overflow: hidden;
|
|
27
27
|
width: 100%;
|
|
28
28
|
background-color: white;
|
|
@@ -32,41 +32,41 @@
|
|
|
32
32
|
/* aspect-ratio: 1/1; */
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.callout.vertical .
|
|
35
|
+
.callout.vertical .callout-image {
|
|
36
36
|
width: 70%;
|
|
37
37
|
margin: 0 auto;
|
|
38
38
|
aspect-ratio: 1;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.callout .
|
|
42
|
-
.callout .
|
|
41
|
+
.callout .callout-image a,
|
|
42
|
+
.callout .callout-image img {
|
|
43
43
|
width: 100%;
|
|
44
44
|
height: 100%;
|
|
45
45
|
object-fit: cover;
|
|
46
46
|
object-position: top;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.callout .
|
|
49
|
+
.callout .callout-image.square {
|
|
50
50
|
border-radius: 0%;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.callout .
|
|
53
|
+
.callout .callout-image.bevel {
|
|
54
54
|
clip-path: rect(1% 98% 98% 1% round 5%);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.callout .
|
|
57
|
+
.callout .callout-image.squircle {
|
|
58
58
|
clip-path: rect(1% 98% 98% 1% round 25%);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.callout .
|
|
61
|
+
.callout .callout-image.round {
|
|
62
62
|
clip-path: rect(1% 98% 98% 1% round 100%);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.callout .
|
|
65
|
+
.callout .callout-body {
|
|
66
66
|
flex-flow: column;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.callout .
|
|
69
|
+
.callout .callout-body > * {
|
|
70
70
|
padding: 5px 20px;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -75,58 +75,58 @@
|
|
|
75
75
|
float: unset !important; /* OVERRIDE pixelated.global.css */
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.callout.left .
|
|
78
|
+
.callout.left .callout-body > * {
|
|
79
79
|
text-align: left;
|
|
80
80
|
margin-left: 0;
|
|
81
81
|
margin-right: auto;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.callout.right .
|
|
84
|
+
.callout.right .callout-body > * {
|
|
85
85
|
text-align: right;
|
|
86
86
|
margin-right: 0;
|
|
87
87
|
margin-left: auto;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.callout .
|
|
90
|
+
.callout .callout-header {
|
|
91
91
|
text-align: center;
|
|
92
92
|
margin: 0 auto;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
.callout .
|
|
95
|
+
.callout .callout-header a {
|
|
96
96
|
--do-nothing: true;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.callout .
|
|
99
|
+
.callout .callout-header h2 {
|
|
100
100
|
--do-nothing: true;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.callout .
|
|
103
|
+
.callout .callout-title {
|
|
104
104
|
text-align: center;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.callout .
|
|
107
|
+
.callout .callout-subtitle {
|
|
108
108
|
text-align: left;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.callout.vertical .
|
|
111
|
+
.callout.vertical .callout-subtitle {
|
|
112
112
|
text-align: center;
|
|
113
113
|
margin: 0 auto;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.callout .
|
|
116
|
+
.callout .callout-subtitle h3 {
|
|
117
117
|
padding: 0;
|
|
118
118
|
--do-nothing: true;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.callout .
|
|
121
|
+
.callout .callout-content {
|
|
122
122
|
--do-nothing: true;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.callout .
|
|
125
|
+
.callout .callout-button {
|
|
126
126
|
--do-nothing: true;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.callout .
|
|
129
|
+
.callout .callout-button button {
|
|
130
130
|
display: inline-block;
|
|
131
131
|
max-width: 250px;
|
|
132
132
|
margin: 10px auto !important;
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
/* cursor: pointer */
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
.callout .
|
|
145
|
+
.callout .callout-button a {
|
|
146
146
|
display: inline-block;
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -174,19 +174,19 @@
|
|
|
174
174
|
border-radius: 100%;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
.callout.boxed .
|
|
177
|
+
.callout.boxed .callout-image {
|
|
178
178
|
clip-path: none;
|
|
179
179
|
aspect-ratio: 1/1;
|
|
180
180
|
background-color: white;
|
|
181
181
|
width: 100% !important;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.callout.boxed .
|
|
184
|
+
.callout.boxed .callout-body {
|
|
185
185
|
--do-nothing: true;
|
|
186
186
|
padding: 5px 20px;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
.callout.boxed.vertical .
|
|
189
|
+
.callout.boxed.vertical .callout-body {
|
|
190
190
|
--do-nothing: true;
|
|
191
191
|
padding: 20px 0px;
|
|
192
192
|
}
|
|
@@ -199,11 +199,11 @@
|
|
|
199
199
|
padding: 0px;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
.callout.full.vertical .
|
|
202
|
+
.callout.full.vertical .callout-image {
|
|
203
203
|
width: 100%;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
.callout.full .
|
|
206
|
+
.callout.full .callout-body > * {
|
|
207
207
|
padding: 5px 5px;
|
|
208
208
|
}
|
|
209
209
|
|
|
@@ -218,9 +218,9 @@
|
|
|
218
218
|
|
|
219
219
|
@for $i from 1 through 11 {
|
|
220
220
|
@for $k from 1 through 11 {
|
|
221
|
-
.
|
|
221
|
+
.callout-grid-#{$i}-#{$k} { grid-template-columns: #{$i}fr #{$k}fr; }
|
|
222
222
|
@media screen and (max-width: 480px) {
|
|
223
|
-
.
|
|
223
|
+
.callout-grid-#{$i}-#{$k} { grid-template-columns: 1fr; }
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}
|
|
@@ -242,15 +242,15 @@
|
|
|
242
242
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
.callout.grid .
|
|
246
|
-
/* duplicate of .callout .
|
|
245
|
+
.callout.grid .callout-image img {
|
|
246
|
+
/* duplicate of .callout .callout-image img */
|
|
247
247
|
width: 100%;
|
|
248
248
|
height: 100%;
|
|
249
249
|
object-fit: cover;
|
|
250
250
|
object-position: top;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
.callout.grid .
|
|
253
|
+
.callout.grid .callout-body {
|
|
254
254
|
grid-auto-rows: min-content;
|
|
255
255
|
}
|
|
256
256
|
|
|
@@ -264,12 +264,12 @@
|
|
|
264
264
|
overflow: hidden;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
.callout.overlay .
|
|
267
|
+
.callout.overlay .callout-image {
|
|
268
268
|
width: 100%;
|
|
269
269
|
height: 100%;
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.callout.overlay .
|
|
272
|
+
.callout.overlay .callout-body {
|
|
273
273
|
position: absolute;
|
|
274
274
|
top: 50%;
|
|
275
275
|
left: 50%;
|
|
@@ -287,12 +287,12 @@
|
|
|
287
287
|
padding: 0px;
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
.callout.split .
|
|
291
|
-
.callout.split .
|
|
290
|
+
.callout.split .callout-image,
|
|
291
|
+
.callout.split .callout-body {
|
|
292
292
|
flex: 1;
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.callout.split .
|
|
295
|
+
.callout.split .callout-body > * {
|
|
296
296
|
padding: 5px 20px;
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -312,20 +312,20 @@
|
|
|
312
312
|
.callout.grid {
|
|
313
313
|
grid-template-columns: 1fr;
|
|
314
314
|
}
|
|
315
|
-
.callout .
|
|
315
|
+
.callout .callout-image {
|
|
316
316
|
width: 70%;
|
|
317
317
|
margin: 0 auto;
|
|
318
318
|
}
|
|
319
|
-
.callout.full .
|
|
320
|
-
.callout.split .
|
|
319
|
+
.callout.full .callout-image,
|
|
320
|
+
.callout.split .callout-image {
|
|
321
321
|
width: 100%;
|
|
322
322
|
margin: 0 auto;
|
|
323
323
|
}
|
|
324
|
-
.callout .
|
|
324
|
+
.callout .callout-body > * {
|
|
325
325
|
margin: 0 auto !important;
|
|
326
326
|
text-align: center !important;
|
|
327
327
|
}
|
|
328
|
-
.callout .
|
|
328
|
+
.callout .callout-content {
|
|
329
329
|
text-align: left !important;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
=============== CAROUSEL ===============
|
|
3
3
|
======================================== */
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
.carousel-container {
|
|
6
6
|
height: 600px;
|
|
7
7
|
background: #FFF;
|
|
8
8
|
border: 1px solid #AAA;
|
|
9
9
|
}
|
|
10
|
-
.
|
|
10
|
+
.carousel-cards-container {
|
|
11
11
|
height: 550px;
|
|
12
12
|
position: relative;
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
}
|
|
15
15
|
@media screen and (max-width: 480px) {
|
|
16
|
-
.
|
|
16
|
+
.carousel-container {
|
|
17
17
|
height: 350px;
|
|
18
18
|
}
|
|
19
|
-
.
|
|
19
|
+
.carousel-cards-container {
|
|
20
20
|
height: 300px;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
#carousel-cards-container {
|
|
25
25
|
--do-nothing: true;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
user-select: none;
|
|
37
37
|
} */
|
|
38
38
|
|
|
39
|
-
.
|
|
39
|
+
.carousel-card-wrapper {
|
|
40
40
|
display: inline-block;
|
|
41
41
|
position: absolute;
|
|
42
42
|
top: 0;
|
|
@@ -49,19 +49,19 @@
|
|
|
49
49
|
overflow: hidden;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.carousel-card {
|
|
53
53
|
width: 100%;
|
|
54
54
|
margin: 0 auto;
|
|
55
55
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
/* .
|
|
58
|
+
/* .carousel-card {
|
|
59
59
|
width: 100%;
|
|
60
60
|
height: 100%;
|
|
61
61
|
margin: 0 auto;
|
|
62
62
|
} */
|
|
63
63
|
|
|
64
|
-
.
|
|
64
|
+
.carousel-card-header {
|
|
65
65
|
font-size: 1.5em;
|
|
66
66
|
font-weight: bold;
|
|
67
67
|
text-align: center;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
width: 100%;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.
|
|
72
|
+
.carousel-card-subheader {
|
|
73
73
|
font-size: 1.1em;
|
|
74
74
|
font-weight: bold;
|
|
75
75
|
text-align: center;
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
width: 100%;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.
|
|
80
|
+
.carousel-card-body {
|
|
81
81
|
margin: 5px auto;
|
|
82
82
|
width: 90%;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.
|
|
85
|
+
.carousel-card-image {
|
|
86
86
|
margin: 0 auto;
|
|
87
87
|
max-width: 100%;
|
|
88
88
|
max-height: 100%;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
overflow: clip;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.
|
|
96
|
+
.carousel-card-image {
|
|
97
97
|
img {
|
|
98
98
|
/* max-height: auto;
|
|
99
99
|
max-width: 100%;
|
|
@@ -131,22 +131,24 @@
|
|
|
131
131
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
.
|
|
134
|
+
.carousel-buttons {
|
|
135
135
|
width: 100%;
|
|
136
136
|
height: 50px;
|
|
137
137
|
text-align: center;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
.
|
|
140
|
+
.carousel-button {
|
|
141
141
|
font-size: 24px;
|
|
142
142
|
z-index: 900;
|
|
143
143
|
padding: 5px;
|
|
144
144
|
display: inline-block;
|
|
145
|
+
border: none;
|
|
146
|
+
background-color: transparent;
|
|
145
147
|
}
|
|
146
148
|
|
|
147
|
-
.
|
|
148
|
-
.
|
|
149
|
-
.
|
|
149
|
+
.carousel-arrow,
|
|
150
|
+
.carousel-arrow-left,
|
|
151
|
+
.carousel-arrow-right {
|
|
150
152
|
position: absolute;
|
|
151
153
|
font-size: 24px;
|
|
152
154
|
top: 50%;
|
|
@@ -155,15 +157,15 @@
|
|
|
155
157
|
padding: 5px;
|
|
156
158
|
}
|
|
157
159
|
|
|
158
|
-
.
|
|
160
|
+
.carousel-arrow-left {
|
|
159
161
|
left: 0;
|
|
160
162
|
}
|
|
161
163
|
|
|
162
|
-
.
|
|
164
|
+
.carousel-arrow-right {
|
|
163
165
|
right: 0;
|
|
164
166
|
}
|
|
165
167
|
|
|
166
|
-
.
|
|
168
|
+
.carousel-details {
|
|
167
169
|
position: absolute;
|
|
168
170
|
bottom: 20px;
|
|
169
171
|
z-index: 1000;
|
|
@@ -172,7 +174,7 @@
|
|
|
172
174
|
text-align: center;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
|
-
.
|
|
177
|
+
.carousel-loading {
|
|
176
178
|
column-span: all;
|
|
177
179
|
text-align: center;
|
|
178
180
|
}
|
|
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
/*
|
|
4
4
|
if (props.draggable && props.draggable === true) {
|
|
5
5
|
if (debug) console.log('CarouselSimple: Dragging enabled');
|
|
6
|
-
DragHandler(cardIndex, '
|
|
6
|
+
DragHandler(cardIndex, 'carousel-card-wrapper', nextCard, previousCard);
|
|
7
7
|
} else {
|
|
8
8
|
if (debug) console.log('CarouselSimple: Dragging disabled');
|
|
9
9
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
4
|
import PropTypes /* , { InferProps } */ from 'prop-types';
|
|
5
|
-
import { DragHandler } from './carousel.drag';
|
|
6
|
-
import './carousel.css';
|
|
7
5
|
import { SmartImage } from '../cms/cloudinary.image';
|
|
8
6
|
import { usePixelatedConfig } from '../config/config.client';
|
|
7
|
+
import { DragHandler } from './carousel.drag';
|
|
8
|
+
import './carousel.css';
|
|
9
9
|
function capitalize(str) {
|
|
10
10
|
return str && String(str[0]).toUpperCase() + String(str).slice(1);
|
|
11
11
|
}
|
|
@@ -64,7 +64,7 @@ export function Carousel(props) {
|
|
|
64
64
|
console.log('CarouselSimple: Dragging enabled');
|
|
65
65
|
DragHandler({
|
|
66
66
|
activeIndex: cardIndex,
|
|
67
|
-
targetDiv: '
|
|
67
|
+
targetDiv: 'carousel-card-wrapper',
|
|
68
68
|
nextImage: nextCard,
|
|
69
69
|
previousImage: previousCard
|
|
70
70
|
});
|
|
@@ -74,10 +74,10 @@ export function Carousel(props) {
|
|
|
74
74
|
console.log('CarouselSimple: Dragging disabled');
|
|
75
75
|
}
|
|
76
76
|
if (props.cards && props.cards.length > 0) {
|
|
77
|
-
return (_jsxs("div", { className: "
|
|
77
|
+
return (_jsxs("div", { className: "carousel-container", children: [_jsx("div", { className: "carousel-cards-container", children: props.cards.map((card, i) => (_jsx(CarouselCard, { index: i, cardIndex: cardIndex, cardLength: props.cards.length, link: card.link, linkTarget: card.linkTarget || '_self', image: card.image, imageAlt: card.imageAlt, imgFit: props.imgFit ? props.imgFit : 'fill', headerText: card.headerText, subHeaderText: card.subHeaderText, bodyText: card.bodyText }, i))) }), _jsxs("div", { className: "carousel-buttons", children: [_jsx(CarouselButton, { clickFunction: previousCard, glyph: '\u25C0' }), _jsx(CarouselButton, { clickFunction: stopTimer, glyph: '\u23F8' }), _jsx(CarouselButton, { clickFunction: nextCard, glyph: '\u25B6' })] })] }));
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
|
-
return (_jsx("div", { className: 'section-container', children: _jsx("div", { className: "
|
|
80
|
+
return (_jsx("div", { className: 'section-container', children: _jsx("div", { className: "carousel-container", children: _jsx(CarouselLoading, {}) }) }));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
/* ========== CAROUSEL CARD ========== */
|
|
@@ -98,8 +98,8 @@ function CarouselCard(props) {
|
|
|
98
98
|
}
|
|
99
99
|
const imgFit = props.imgFit ? "img" + capitalize(props.imgFit) : 'imgFill';
|
|
100
100
|
const config = usePixelatedConfig();
|
|
101
|
-
const cardBody = (_jsxs("div", { draggable: 'false', children: [(props.link) ? _jsx("div", { draggable: 'false', className: "
|
|
102
|
-
return (_jsx("div", { draggable: 'true', id: 'c-' + props.index, className: "
|
|
101
|
+
const cardBody = (_jsxs("div", { draggable: 'false', children: [(props.link) ? _jsx("div", { draggable: 'false', className: "carousel-card-link" }) : null, (props.image) ? _jsx("div", { draggable: 'false', className: "carousel-card-image", children: _jsx(SmartImage, { draggable: false, src: props.image, title: props?.imageAlt, alt: props?.imageAlt || "", className: imgFit, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined, cloudinaryDomain: config?.cloudinary?.baseUrl ?? undefined, cloudinaryTransforms: config?.cloudinary?.transforms ?? undefined }) }) : null, (props.headerText) ? _jsx("div", { draggable: 'false', className: "carousel-card-header", children: _jsx("h3", { draggable: 'false', children: props.headerText }) }) : null, (props.subHeaderText) ? _jsx("div", { draggable: 'false', className: "carousel-card-subheader", children: _jsx("h4", { draggable: 'false', children: props.subHeaderText }) }) : null, (props.bodyText) ? _jsx("div", { draggable: 'false', className: "carousel-card-body", children: props.bodyText }) : null] }));
|
|
102
|
+
return (_jsx("div", { draggable: 'true', id: 'c-' + props.index, className: "carousel-card-wrapper", style: styles, children: _jsx("div", { draggable: 'false', className: "carousel-card", children: (props.link) ? _jsx("a", { draggable: 'false', href: props.link, target: props.linkTarget, children: cardBody }) : cardBody }) }));
|
|
103
103
|
}
|
|
104
104
|
// REMOVED PROPTYPE AS TYPESCRIPT TYPE COVERS THIS
|
|
105
105
|
/* ========== CAROUSEL ARROW ========== */
|
|
@@ -108,7 +108,7 @@ CarouselButton.propTypes = {
|
|
|
108
108
|
glyph: PropTypes.string.isRequired
|
|
109
109
|
};
|
|
110
110
|
function CarouselButton(props) {
|
|
111
|
-
return (_jsx("
|
|
111
|
+
return (_jsx("button", { className: `carousel-button text-outline`, onClick: props.clickFunction, children: props.glyph }));
|
|
112
112
|
}
|
|
113
113
|
CarouselArrow.propTypes = {
|
|
114
114
|
direction: PropTypes.string.isRequired,
|
|
@@ -116,9 +116,9 @@ CarouselArrow.propTypes = {
|
|
|
116
116
|
glyph: PropTypes.string.isRequired
|
|
117
117
|
};
|
|
118
118
|
function CarouselArrow(props) {
|
|
119
|
-
return (_jsx("
|
|
119
|
+
return (_jsx("button", { className: `carousel-button${capitalize(props.direction)} text-outline`, onClick: props.clickFunction, children: props.glyph }));
|
|
120
120
|
}
|
|
121
121
|
/* ========== CAROUSEL LOADING ========== */
|
|
122
122
|
function CarouselLoading() {
|
|
123
|
-
return (_jsx("div", { className: "
|
|
123
|
+
return (_jsx("div", { className: "carousel-loading horizontal-centered vertical-centered centered", children: _jsx("div", { children: "Loading..." }) }));
|
|
124
124
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.
|
|
1
|
+
.tiles-container {
|
|
2
2
|
--do-nothing: true;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.
|
|
5
|
+
.tile-container {
|
|
6
6
|
--do-nothing: true;
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
--do-nothing: true;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.
|
|
13
|
+
.tile-image {
|
|
14
14
|
position: relative;
|
|
15
15
|
aspect-ratio: 1;
|
|
16
16
|
border: 2px solid #CCC;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
margin: 10px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.tile-image img {
|
|
23
23
|
width: 100%;
|
|
24
24
|
height: 100% !important;
|
|
25
25
|
position: relative;
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
object-fit: cover;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
.tile-image-overlay {
|
|
32
32
|
visibility: hidden;
|
|
33
33
|
position: absolute;
|
|
34
34
|
width: 0%;
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
.
|
|
47
|
+
.tile-image:hover .tile-image-overlay {
|
|
48
48
|
visibility: visible;
|
|
49
49
|
width: 100% !important;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.tile-image-overlay-text {
|
|
53
53
|
position: absolute;
|
|
54
54
|
padding: 20px;
|
|
55
55
|
left: 0;
|
|
@@ -62,16 +62,16 @@
|
|
|
62
62
|
transition-delay: 0s;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.tile-image:hover .tile-image-overlay-text {
|
|
66
66
|
visibility: visible;
|
|
67
67
|
transition-delay: 0.25s;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.
|
|
70
|
+
.tile-image-overlay-title{
|
|
71
71
|
margin-bottom: 10px;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.
|
|
74
|
+
.tile-image-overlay-body{
|
|
75
75
|
font-size: 16px;
|
|
76
76
|
font-weight: initial;
|
|
77
77
|
}
|
|
@@ -4,8 +4,8 @@ import PropTypes from "prop-types";
|
|
|
4
4
|
import { Loading } from "../general/loading";
|
|
5
5
|
import { SmartImage } from "../cms/cloudinary.image";
|
|
6
6
|
import { usePixelatedConfig } from '../config/config.client';
|
|
7
|
-
import "./tiles.css";
|
|
8
7
|
import "../../css/pixelated.grid.scss";
|
|
8
|
+
import "./tiles.css";
|
|
9
9
|
Tiles.propTypes = {
|
|
10
10
|
cards: PropTypes.object.isRequired,
|
|
11
11
|
rowCount: PropTypes.number,
|
|
@@ -13,7 +13,7 @@ Tiles.propTypes = {
|
|
|
13
13
|
export function Tiles(props) {
|
|
14
14
|
const rowCount = props.rowCount ?? 2;
|
|
15
15
|
if (props.cards && props.cards.length > 0) {
|
|
16
|
-
return (_jsx("div", { className: "
|
|
16
|
+
return (_jsx("div", { className: "tiles-container", children: _jsx("div", { className: `tile-container row-${rowCount}col`, children: props.cards.map((card, i) => (_jsx("div", { className: "gridItem", children: _jsx(Tile, { index: i, cardLength: props.cards.length, link: card.link, image: card.image, imageAlt: card.imageAlt, bodyText: card.bodyText }) }, i))) }) }));
|
|
17
17
|
}
|
|
18
18
|
else {
|
|
19
19
|
return (_jsx(Loading, {}));
|
|
@@ -30,7 +30,7 @@ Tile.propTypes = {
|
|
|
30
30
|
};
|
|
31
31
|
function Tile(props) {
|
|
32
32
|
const config = usePixelatedConfig();
|
|
33
|
-
const tileBody = _jsxs("div", { className: "
|
|
33
|
+
const tileBody = _jsxs("div", { className: "tile-image", children: [_jsx(SmartImage, { src: props.image, title: props?.imageAlt ?? undefined, alt: props?.imageAlt ?? "", cloudinaryEnv: config?.cloudinary?.product_env ?? undefined }), _jsx("div", { className: "tile-image-overlay", children: _jsxs("div", { className: "tile-image-overlay-text", children: [_jsx("div", { className: "tile-image-overlay-title", children: props.imageAlt }), _jsx("div", { className: "tile-image-overlay-body", children: props.bodyText })] }) })] });
|
|
34
34
|
return (_jsx("div", { className: "tile", id: 'tile-' + props.index, children: props.link ?
|
|
35
35
|
_jsx("a", { href: props.link, className: "tileLink", children: tileBody })
|
|
36
36
|
:
|