@q2devel/q2-storybook 1.0.196 → 1.0.197
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/Base/blog-builder/BlogBuilder.d.ts +9 -1
- package/dist/components/Base/blog-builder/BlogBuilder.js +4 -3
- package/dist/components/Base/blog-builder/text-and-media-paragraph/TextAndMediaParagraph.d.ts +6 -1
- package/dist/components/Base/blog-builder/text-and-media-paragraph/TextAndMediaParagraph.js +4 -3
- package/dist/components/Base/image-gallery-modal/ImageGalleryModal.d.ts +12 -1
- package/dist/components/Base/image-gallery-modal/ImageGalleryModal.js +5 -4
- package/dist/components/Base/modal/Modal.d.ts +10 -1
- package/dist/components/Base/modal/Modal.js +3 -3
- package/dist/components/Base/price/Price.d.ts +6 -1
- package/dist/components/Base/price/Price.js +3 -2
- package/dist/components/Base/switch/Switch.d.ts +8 -1
- package/dist/components/Base/switch/Switch.js +6 -5
- package/dist/components/Base/tooltip/Tooltip.d.ts +10 -0
- package/dist/components/Base/tooltip/Tooltip.js +4 -3
- package/dist/components/Ecommerce/instructions-list/Instruction.d.ts +15 -1
- package/dist/components/Ecommerce/instructions-list/Instruction.js +15 -2
- package/dist/components/Ecommerce/instructions-list/InstructionsList.d.ts +6 -1
- package/dist/components/Ecommerce/instructions-list/InstructionsList.js +6 -2
- package/dist/components/Ecommerce/product-card/ProductCard.js +3 -1
- package/dist/components/Ecommerce/product-detail/ProductDetail.js +5 -5
- package/dist/components/Ecommerce/product-detail/ProductDetailGallery.js +3 -1
- package/dist/components/Ecommerce/progress-stepper/ProgressStepper.d.ts +24 -4
- package/dist/components/Ecommerce/progress-stepper/ProgressStepper.js +37 -15
- package/dist/components/Ecommerce/wishlist/DeleteButton.d.ts +7 -2
- package/dist/components/Ecommerce/wishlist/DeleteButton.js +7 -3
- package/dist/components/Ecommerce/wishlist/LikeButton.d.ts +12 -3
- package/dist/components/Ecommerce/wishlist/LikeButton.js +14 -5
- package/dist/components/Forms/checkbox/Checkbox.d.ts +14 -0
- package/dist/components/Forms/checkbox/Checkbox.js +6 -1
- package/dist/components/Forms/checkbox/CheckboxGroup.d.ts +7 -1
- package/dist/components/Forms/checkbox/CheckboxGroup.js +8 -2
- package/dist/components/Forms/contact-form/ContactForm.d.ts +12 -1
- package/dist/components/Forms/contact-form/ContactForm.js +8 -7
- package/dist/components/Forms/dropdown/Dropdown.d.ts +8 -1
- package/dist/components/Forms/dropdown/Dropdown.js +3 -3
- package/dist/components/Forms/text-field/TextField.d.ts +9 -0
- package/dist/components/Forms/text-field/TextField.js +7 -7
- package/dist/components/Forms/text-field/TextField.types.d.ts +9 -0
- package/dist/components/MIKS/ScheduleDetail/ScheduleDetail.d.ts +18 -1
- package/dist/components/MIKS/ScheduleDetail/ScheduleDetail.js +2 -2
- package/dist/components/MIKS/date-carousel/DateCarousel.d.ts +12 -0
- package/dist/components/MIKS/date-carousel/DateCarousel.js +12 -14
- package/dist/components/MIKS/event-card/EventCard.d.ts +16 -1
- package/dist/components/MIKS/event-card/EventCard.js +6 -9
- package/dist/components/MIKS/filters/FilterType.d.ts +13 -1
- package/dist/components/MIKS/filters/FilterType.js +4 -3
- package/dist/components/MIKS/filters/FilterWhen.d.ts +18 -1
- package/dist/components/MIKS/filters/FilterWhen.js +5 -10
- package/dist/components/MIKS/filters/FilterWhere.d.ts +13 -1
- package/dist/components/MIKS/filters/FilterWhere.js +4 -3
- package/dist/components/MIKS/footer/Footer.d.ts +17 -1
- package/dist/components/MIKS/footer/Footer.js +3 -2
- package/dist/components/MIKS/movie-detail/MovieDetail.d.ts +27 -1
- package/dist/components/MIKS/movie-detail/MovieDetail.js +4 -3
- package/dist/components/MIKS/navbar/NavBar.js +7 -1
- package/dist/components/MIKS/theatre-event/TheatreEvent.d.ts +18 -1
- package/dist/components/MIKS/theatre-event/TheatreEvent.js +3 -2
- package/dist/components/Tables/apartment-price-list/ApartmentPriceList.d.ts +10 -0
- package/dist/components/Tables/apartment-price-list/ApartmentPriceList.js +4 -3
- package/dist/components/Web/ScheduleDetail/ScheduleDetail.d.ts +28 -0
- package/dist/components/Web/ScheduleDetail/ScheduleDetail.js +18 -0
- package/dist/components/Web/banner/Banner.d.ts +19 -8
- package/dist/components/Web/banner/Banner.js +28 -23
- package/dist/components/Web/breadcrumb/Breadcrumb.d.ts +12 -7
- package/dist/components/Web/breadcrumb/Breadcrumb.js +13 -8
- package/dist/components/Web/dynamic-grid/DynamicLayout.d.ts +10 -0
- package/dist/components/Web/dynamic-grid/DynamicLayout.js +6 -9
- package/dist/components/Web/event-card/EventCard.d.ts +30 -0
- package/dist/components/Web/event-card/EventCard.js +18 -0
- package/dist/components/Web/event-card-horizontal/EventCardHorizontal.d.ts +30 -0
- package/dist/components/Web/event-card-horizontal/EventCardHorizontal.js +24 -0
- package/dist/components/Web/footer/Footer.d.ts +1 -1
- package/dist/components/Web/footer/Footer.js +21 -90
- package/dist/components/Web/footer/FooterProps.d.ts +17 -0
- package/dist/components/Web/nav-bar/NavBar.d.ts +15 -7
- package/dist/components/Web/nav-bar/NavBar.js +14 -2
- package/dist/components/Web/stats-card/StatsCard.d.ts +9 -1
- package/dist/components/Web/stats-card/StatsCard.js +9 -3
- package/dist/components/Web/tabs/HorizontalTab.d.ts +22 -1
- package/dist/components/Web/tabs/HorizontalTab.js +26 -5
- package/dist/components/Web/text-with-image/ImageWithText.d.ts +12 -2
- package/dist/components/Web/text-with-image/ImageWithText.js +14 -2
- package/dist/components/Web/web-section/MediaSlider.d.ts +12 -1
- package/dist/components/Web/web-section/MediaSlider.js +4 -4
- package/dist/components/Web/web-section/WebSection.d.ts +11 -2
- package/dist/components/Web/web-section/WebSection.js +13 -6
- package/dist/style.css +1 -1
- package/package.json +80 -80
|
@@ -17,6 +17,14 @@ interface BlogBuilderProps {
|
|
|
17
17
|
emptyState?: ReactNode;
|
|
18
18
|
/** Hide the meta row (date + tags) when empty. */
|
|
19
19
|
hideMetaIfEmpty?: boolean;
|
|
20
|
+
classNames?: {
|
|
21
|
+
container?: string;
|
|
22
|
+
heading?: string;
|
|
23
|
+
meta?: string;
|
|
24
|
+
tags?: string;
|
|
25
|
+
content?: string;
|
|
26
|
+
skeleton?: string;
|
|
27
|
+
};
|
|
20
28
|
}
|
|
21
|
-
export declare const BlogBuilder: ({ post, contentType, createdText, textClassName, tags: propTags, tagUrls, skeleton, emptyState, hideMetaIfEmpty, }: BlogBuilderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export declare const BlogBuilder: ({ post, contentType, createdText, textClassName, tags: propTags, tagUrls, skeleton, emptyState, hideMetaIfEmpty, classNames, }: BlogBuilderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
30
|
export {};
|
|
@@ -6,8 +6,9 @@ import Heading from '../heading/Heading';
|
|
|
6
6
|
import { VideoParagraph } from './video-paragraph/VideoParagraph';
|
|
7
7
|
import { CarouselParagraph } from './carousel-paragraph/CarouselParagraph';
|
|
8
8
|
import { formatDate } from '../../../utils/generalHelperFunction';
|
|
9
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
9
10
|
const SkeletonLine = ({ className = '' }) => (_jsx("div", { className: `animate-pulse rounded bg-gray-200 ${className}` }));
|
|
10
|
-
export const BlogBuilder = ({ post, contentType = 'l-text-r-image', createdText = 'Publikováno:', textClassName = '', tags: propTags, tagUrls, skeleton = false, emptyState = null, hideMetaIfEmpty = true, }) => {
|
|
11
|
+
export const BlogBuilder = ({ post, contentType = 'l-text-r-image', createdText = 'Publikováno:', textClassName = '', tags: propTags, tagUrls, skeleton = false, emptyState = null, hideMetaIfEmpty = true, classNames, }) => {
|
|
11
12
|
// Normalize fields so the component never explodes if post is missing/partial.
|
|
12
13
|
const title = post?.title ?? '';
|
|
13
14
|
const body = post?.body ?? '';
|
|
@@ -75,7 +76,7 @@ export const BlogBuilder = ({ post, contentType = 'l-text-r-image', createdText
|
|
|
75
76
|
const baseClass = 'inline-block px-3 py-1 text-sm rounded-full transition-colors';
|
|
76
77
|
const neutralClass = 'bg-gray-100 text-gray-700';
|
|
77
78
|
const hoverable = 'hover:bg-gray-200 cursor-pointer';
|
|
78
|
-
return (_jsx("div", { className: "flex flex-wrap items-center gap-2", children: tags.map((tag, idx) => {
|
|
79
|
+
return (_jsx("div", { className: buildClassesByJoining("flex flex-wrap items-center gap-2", classNames?.tags), children: tags.map((tag, idx) => {
|
|
79
80
|
const href = tagUrls?.[tag];
|
|
80
81
|
return href ? (_jsx("a", { href: href, className: `${baseClass} ${neutralClass} ${hoverable}`, "aria-label": `Zobrazit články s tagem ${tag}`, children: tag }, `${tag}-${idx}`)) : (_jsx("span", { className: `${baseClass} ${neutralClass}`, children: tag }, `${tag}-${idx}`));
|
|
81
82
|
}) }));
|
|
@@ -84,5 +85,5 @@ export const BlogBuilder = ({ post, contentType = 'l-text-r-image', createdText
|
|
|
84
85
|
if (!post && !skeleton) {
|
|
85
86
|
return emptyState ? _jsx(_Fragment, { children: emptyState }) : null;
|
|
86
87
|
}
|
|
87
|
-
return (_jsxs("div", { className: "mx-auto max-w-2xl lg:mx-0 lg:max-w-none", children: [skeleton ? (_jsx(SkeletonLine, { className: "h-8 w-4/5 mb-2" })) : (_jsx(Heading, { level: 1, className: "label", children: title })), (!hideMetaIfEmpty || hasMeta || skeleton) && (_jsxs("div", { className: "mb-6 space-y-3", children: [skeleton ? (_jsx(SkeletonLine, { className: "h-4 w-40" })) : created ? (_jsxs("p", { className: "text-sm text-gray-500", children: [createdText, " ", formatDate(created)] })) : null, renderTags()] })), renderContent()] }));
|
|
88
|
+
return (_jsxs("div", { className: buildClassesByJoining("mx-auto max-w-2xl lg:mx-0 lg:max-w-none", classNames?.container), children: [skeleton ? (_jsx(SkeletonLine, { className: buildClassesByJoining("h-8 w-4/5 mb-2", classNames?.skeleton) })) : (_jsx(Heading, { level: 1, className: buildClassesByJoining("label", classNames?.heading), children: title })), (!hideMetaIfEmpty || hasMeta || skeleton) && (_jsxs("div", { className: buildClassesByJoining("mb-6 space-y-3", classNames?.meta), children: [skeleton ? (_jsx(SkeletonLine, { className: "h-4 w-40" })) : created ? (_jsxs("p", { className: "text-sm text-gray-500", children: [createdText, " ", formatDate(created)] })) : null, renderTags()] })), renderContent()] }));
|
|
88
89
|
};
|
package/dist/components/Base/blog-builder/text-and-media-paragraph/TextAndMediaParagraph.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ type TextAndMediaParagraphProps = {
|
|
|
8
8
|
};
|
|
9
9
|
mediaPosition: 'left' | 'right';
|
|
10
10
|
textClassName?: string;
|
|
11
|
+
classNames?: {
|
|
12
|
+
container?: string;
|
|
13
|
+
textColumn?: string;
|
|
14
|
+
mediaColumn?: string;
|
|
15
|
+
};
|
|
11
16
|
};
|
|
12
|
-
export declare const TextAndMediaParagraph: ({ content, mediaPosition, textClassName, }: TextAndMediaParagraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const TextAndMediaParagraph: ({ content, mediaPosition, textClassName, classNames, }: TextAndMediaParagraphProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
18
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import HTMLReactParser from 'html-react-parser/lib/index';
|
|
3
3
|
import { getYoutubeEmbedUrl } from '../../../../utils/Helper';
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import cn from 'classnames';
|
|
5
|
+
import { buildClassesByJoining } from '../../../../utils/StyleHelper';
|
|
6
|
+
export const TextAndMediaParagraph = ({ content, mediaPosition, textClassName = 'mt-8', classNames, }) => {
|
|
6
7
|
const hasVideo = content.videoLink && content.videoLink.trim() !== '';
|
|
7
8
|
const hasImage = content.image && content.image.trim() !== '';
|
|
8
9
|
const renderMedia = () => {
|
|
@@ -16,5 +17,5 @@ export const TextAndMediaParagraph = ({ content, mediaPosition, textClassName =
|
|
|
16
17
|
return (_jsx("div", { className: "flex items-center justify-center h-48 bg-gray-100 text-gray-500", children: "No media content" }));
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
|
-
return (_jsxs("div", { className: "mt-10 grid max-w-xl grid-cols-1 gap-8 text-base/7 text-gray-700 lg:max-w-none lg:grid-cols-2 items-start", children: [_jsx("div", { className:
|
|
20
|
+
return (_jsxs("div", { className: buildClassesByJoining("mt-10 grid max-w-xl grid-cols-1 gap-8 text-base/7 text-gray-700 lg:max-w-none lg:grid-cols-2 items-start", classNames?.container), children: [_jsx("div", { className: cn('[&_a]:underline [&_a]:text-[var(--primary)] [&_a:hover]:text-[var(--accent)] [&_a]:transition-colors [&_a]:duration-200', mediaPosition === 'right' ? 'lg:order-1' : 'lg:order-2', textClassName, classNames?.textColumn), children: HTMLReactParser(content.text) }), _jsx("div", { className: buildClassesByJoining(mediaPosition === 'right' ? 'lg:order-2' : 'lg:order-1', classNames?.mediaColumn), children: renderMedia() })] }));
|
|
20
21
|
};
|
|
@@ -7,5 +7,16 @@ export type ImageGalleryProps = {
|
|
|
7
7
|
initialIndex?: number;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
onImageChange?: (index: number) => void;
|
|
10
|
+
classNames?: {
|
|
11
|
+
backdrop?: string;
|
|
12
|
+
container?: string;
|
|
13
|
+
closeButton?: string;
|
|
14
|
+
image?: string;
|
|
15
|
+
prevButton?: string;
|
|
16
|
+
nextButton?: string;
|
|
17
|
+
thumbnails?: string;
|
|
18
|
+
thumbnail?: string;
|
|
19
|
+
counter?: string;
|
|
20
|
+
};
|
|
10
21
|
};
|
|
11
|
-
export declare const ImageGalleryModal: ({ images, isOpen, initialIndex, onClose, onImageChange, }: ImageGalleryProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export declare const ImageGalleryModal: ({ images, isOpen, initialIndex, onClose, onImageChange, classNames, }: ImageGalleryProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -3,7 +3,8 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
3
3
|
import { Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
|
|
4
4
|
import { ChevronLeftIcon, ChevronRightIcon, XMarkIcon, } from '@heroicons/react/24/outline';
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
|
-
|
|
6
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
7
|
+
export const ImageGalleryModal = ({ images, isOpen, initialIndex = 0, onClose, onImageChange, classNames, }) => {
|
|
7
8
|
const [currentImageIndex, setCurrentImageIndex] = useState(initialIndex);
|
|
8
9
|
useEffect(() => {
|
|
9
10
|
setCurrentImageIndex(initialIndex);
|
|
@@ -43,11 +44,11 @@ export const ImageGalleryModal = ({ images, isOpen, initialIndex = 0, onClose, o
|
|
|
43
44
|
};
|
|
44
45
|
if (!isOpen || images.length === 0)
|
|
45
46
|
return null;
|
|
46
|
-
return (_jsxs(Dialog, { open: isOpen, onClose: onClose, className: "relative z-50", children: [_jsx(DialogBackdrop, { className: "fixed inset-0 bg-black/75" }), _jsx("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: _jsxs(DialogPanel, { className: "relative w-full max-w-7xl max-h-full", children: [_jsx("button", { onClick: onClose, className: "absolute top-4 right-4 z-10 bg-black/50 text-white p-2 rounded-full hover:bg-black/70 transition-colors", "aria-label": "Close gallery", children: _jsx(XMarkIcon, { className: "h-6 w-6" }) }), _jsxs("div", { className: "relative bg-white rounded-lg overflow-hidden", children: [_jsx("img", { src: images[currentImageIndex]?.href, alt: images[currentImageIndex]?.alt, className: "w-full h-auto max-h-[80vh] object-contain" }), images.length > 1 && (_jsxs(_Fragment, { children: [_jsx("button", { onClick: goToPrevImage, className: "absolute left-4 top-1/2 -translate-y-1/2 bg-black/50 text-white p-3 rounded-full hover:bg-black/70 transition-colors", "aria-label": "Previous image", children: _jsx(ChevronLeftIcon, { className: "h-6 w-6" }) }), _jsx("button", { onClick: goToNextImage, className: "absolute right-4 top-1/2 -translate-y-1/2 bg-black/50 text-white p-3 rounded-full hover:bg-black/70 transition-colors", "aria-label": "Next image", children: _jsx(ChevronRightIcon, { className: "h-6 w-6" }) })] }))] }), images.length > 1 && (_jsx("div", { className: "mt-4 flex gap-2 overflow-x-auto overflow-y-hidden pb-2 no-scrollbar", style: {
|
|
47
|
+
return (_jsxs(Dialog, { open: isOpen, onClose: onClose, className: "relative z-50", children: [_jsx(DialogBackdrop, { className: buildClassesByJoining("fixed inset-0 bg-black/75", classNames?.backdrop) }), _jsx("div", { className: "fixed inset-0 flex items-center justify-center p-4", children: _jsxs(DialogPanel, { className: "relative w-full max-w-7xl max-h-full", children: [_jsx("button", { onClick: onClose, className: buildClassesByJoining("absolute top-4 right-4 z-10 bg-black/50 text-white p-2 rounded-full hover:bg-black/70 transition-colors", classNames?.closeButton), "aria-label": "Close gallery", children: _jsx(XMarkIcon, { className: "h-6 w-6" }) }), _jsxs("div", { className: buildClassesByJoining("relative bg-white rounded-lg overflow-hidden", classNames?.container), children: [_jsx("img", { src: images[currentImageIndex]?.href, alt: images[currentImageIndex]?.alt, className: buildClassesByJoining("w-full h-auto max-h-[80vh] object-contain", classNames?.image) }), images.length > 1 && (_jsxs(_Fragment, { children: [_jsx("button", { onClick: goToPrevImage, className: buildClassesByJoining("absolute left-4 top-1/2 -translate-y-1/2 bg-black/50 text-white p-3 rounded-full hover:bg-black/70 transition-colors", classNames?.prevButton), "aria-label": "Previous image", children: _jsx(ChevronLeftIcon, { className: "h-6 w-6" }) }), _jsx("button", { onClick: goToNextImage, className: buildClassesByJoining("absolute right-4 top-1/2 -translate-y-1/2 bg-black/50 text-white p-3 rounded-full hover:bg-black/70 transition-colors", classNames?.nextButton), "aria-label": "Next image", children: _jsx(ChevronRightIcon, { className: "h-6 w-6" }) })] }))] }), images.length > 1 && (_jsx("div", { className: buildClassesByJoining("mt-4 flex gap-2 overflow-x-auto overflow-y-hidden pb-2 no-scrollbar", classNames?.thumbnails), style: {
|
|
47
48
|
scrollbarWidth: 'none',
|
|
48
49
|
msOverflowStyle: 'none',
|
|
49
50
|
WebkitOverflowScrolling: 'touch',
|
|
50
|
-
}, children: images.map((image, index) => (_jsx("button", { onClick: () => goToImage(index), className: `flex-shrink-0 w-16 h-16 border-2 rounded overflow-hidden transition-colors ${index === currentImageIndex
|
|
51
|
+
}, children: images.map((image, index) => (_jsx("button", { onClick: () => goToImage(index), className: buildClassesByJoining(`flex-shrink-0 w-16 h-16 border-2 rounded overflow-hidden transition-colors ${index === currentImageIndex
|
|
51
52
|
? 'border-[var(--primary)]'
|
|
52
|
-
: 'border-gray-300 hover:border-gray-400'}`, "aria-label": `View image ${index + 1}`, children: _jsx("img", { src: image.href, alt: image.alt, className: "w-full h-full object-contain" }) }, index))) })), _jsxs("div", { className: "absolute -bottom-[35px] left-1/2 -translate-x-1/2 bg-black/50 text-white px-3 py-1 rounded-full text-sm", children: [currentImageIndex + 1, " / ", images.length] })] }) })] }));
|
|
53
|
+
: 'border-gray-300 hover:border-gray-400'}`, classNames?.thumbnail), "aria-label": `View image ${index + 1}`, children: _jsx("img", { src: image.href, alt: image.alt, className: "w-full h-full object-contain" }) }, index))) })), _jsxs("div", { className: buildClassesByJoining("absolute -bottom-[35px] left-1/2 -translate-x-1/2 bg-black/50 text-white px-3 py-1 rounded-full text-sm", classNames?.counter), children: [currentImageIndex + 1, " / ", images.length] })] }) })] }));
|
|
53
54
|
};
|
|
@@ -21,6 +21,15 @@ interface ModalProps {
|
|
|
21
21
|
showCloseButton?: boolean;
|
|
22
22
|
closeButtonClassName?: string;
|
|
23
23
|
className?: string;
|
|
24
|
+
classNames?: {
|
|
25
|
+
backdrop?: string;
|
|
26
|
+
panel?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
content?: string;
|
|
30
|
+
closeButton?: string;
|
|
31
|
+
footer?: string;
|
|
32
|
+
};
|
|
24
33
|
}
|
|
25
|
-
export declare const Modal: ({ title, titleClassName, description, descriptionClassName, buttonText, showIcon, icon, iconBackgroundColor, iconColor, buttonClassName, secondButtonText, secondButtonClassName, onSecondButtonClick, showSecondButton, panelClassName, backdropClassName, onClose, isOpen, showCloseButton, closeButtonClassName, className, }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const Modal: ({ title, titleClassName, description, descriptionClassName, buttonText, showIcon, icon, iconBackgroundColor, iconColor, buttonClassName, secondButtonText, secondButtonClassName, onSecondButtonClick, showSecondButton, panelClassName, backdropClassName, onClose, isOpen, showCloseButton, closeButtonClassName, className, classNames, }: ModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
35
|
export default Modal;
|
|
@@ -3,11 +3,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { Dialog, DialogBackdrop, DialogPanel, DialogTitle, } from '@headlessui/react';
|
|
4
4
|
import { CheckIcon, XMarkIcon } from '@heroicons/react/24/outline';
|
|
5
5
|
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
6
|
-
export const Modal = ({ title, titleClassName, description, descriptionClassName, buttonText, showIcon = true, icon = _jsx(CheckIcon, { "aria-hidden": "true", className: "size-6" }), iconBackgroundColor = 'bg-green-100', iconColor = 'text-green-600', buttonClassName, secondButtonText, secondButtonClassName, onSecondButtonClick, showSecondButton = false, panelClassName, backdropClassName, onClose, isOpen, showCloseButton = false, closeButtonClassName, className, }) => {
|
|
6
|
+
export const Modal = ({ title, titleClassName, description, descriptionClassName, buttonText, showIcon = true, icon = _jsx(CheckIcon, { "aria-hidden": "true", className: "size-6" }), iconBackgroundColor = 'bg-green-100', iconColor = 'text-green-600', buttonClassName, secondButtonText, secondButtonClassName, onSecondButtonClick, showSecondButton = false, panelClassName, backdropClassName, onClose, isOpen, showCloseButton = false, closeButtonClassName, className, classNames, }) => {
|
|
7
7
|
const handleClose = (value) => {
|
|
8
8
|
onClose?.();
|
|
9
9
|
};
|
|
10
|
-
return (_jsxs(Dialog, { open: isOpen, onClose: handleClose, className: buildClassesByJoining('relative z-10', className), children: [_jsx(DialogBackdrop, { transition: true, className: buildClassesByJoining('fixed inset-0 bg-gray-500/75 transition-opacity data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in', backdropClassName) }), _jsx("div", { className: "fixed inset-0 z-10 w-screen overflow-y-auto", children: _jsx("div", { className: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0", children: _jsxs(DialogPanel, { transition: true, className: buildClassesByJoining('relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all data-closed:translate-y-4 data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in sm:my-8 sm:w-full sm:max-w-sm sm:p-6 data-closed:sm:translate-y-0 data-closed:sm:scale-95', panelClassName), children: [showCloseButton && (_jsxs("button", { type: "button", className: buildClassesByJoining('absolute top-4 right-4 text-gray-400 hover:text-gray-500 focus:outline-none', closeButtonClassName), onClick: () => onClose?.(), children: [_jsx("span", { className: "sr-only", children: "Close" }), _jsx(XMarkIcon, { className: "h-6 w-6", "aria-hidden": "true" })] })), _jsxs("div", { children: [showIcon && (_jsx("div", { className: buildClassesByJoining('mx-auto flex size-12 items-center justify-center rounded-full', iconBackgroundColor), children: _jsx("div", { className: iconColor, children: icon }) })), _jsxs("div", { className: "mt-3 text-center sm:mt-5", children: [title && (_jsx(DialogTitle, { as: "h3", className: buildClassesByJoining('text-base font-semibold text-gray-900', titleClassName), children: title })), _jsx("div", { className: buildClassesByJoining('mt-2', descriptionClassName), children: description })] })] }), (buttonText ||
|
|
11
|
-
(showSecondButton && secondButtonText)) && (_jsxs("div", { className: "mt-5 sm:mt-6 space-y-3", children: [buttonText && (_jsx("button", { type: "button", onClick: () => onClose?.(), className: buildClassesByJoining('inline-flex w-full justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-green-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600', buttonClassName), children: buttonText })), showSecondButton && secondButtonText && (_jsx("button", { type: "button", onClick: () => onSecondButtonClick?.(), className: buildClassesByJoining('inline-flex w-full justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-green-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600', secondButtonClassName), children: secondButtonText }))] }))] }) }) })] }));
|
|
10
|
+
return (_jsxs(Dialog, { open: isOpen, onClose: handleClose, className: buildClassesByJoining('relative z-10', className), children: [_jsx(DialogBackdrop, { transition: true, className: buildClassesByJoining('fixed inset-0 bg-gray-500/75 transition-opacity data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in', backdropClassName, classNames?.backdrop) }), _jsx("div", { className: "fixed inset-0 z-10 w-screen overflow-y-auto", children: _jsx("div", { className: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0", children: _jsxs(DialogPanel, { transition: true, className: buildClassesByJoining('relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all data-closed:translate-y-4 data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in sm:my-8 sm:w-full sm:max-w-sm sm:p-6 data-closed:sm:translate-y-0 data-closed:sm:scale-95', panelClassName, classNames?.panel), children: [showCloseButton && (_jsxs("button", { type: "button", className: buildClassesByJoining('absolute top-4 right-4 text-gray-400 hover:text-gray-500 focus:outline-none', closeButtonClassName, classNames?.closeButton), onClick: () => onClose?.(), children: [_jsx("span", { className: "sr-only", children: "Close" }), _jsx(XMarkIcon, { className: "h-6 w-6", "aria-hidden": "true" })] })), _jsxs("div", { className: buildClassesByJoining(classNames?.content), children: [showIcon && (_jsx("div", { className: buildClassesByJoining('mx-auto flex size-12 items-center justify-center rounded-full', iconBackgroundColor), children: _jsx("div", { className: iconColor, children: icon }) })), _jsxs("div", { className: "mt-3 text-center sm:mt-5", children: [title && (_jsx(DialogTitle, { as: "h3", className: buildClassesByJoining('text-base font-semibold text-gray-900', titleClassName, classNames?.title), children: title })), _jsx("div", { className: buildClassesByJoining('mt-2', descriptionClassName, classNames?.description), children: description })] })] }), (buttonText ||
|
|
11
|
+
(showSecondButton && secondButtonText)) && (_jsxs("div", { className: buildClassesByJoining("mt-5 sm:mt-6 space-y-3", classNames?.footer), children: [buttonText && (_jsx("button", { type: "button", onClick: () => onClose?.(), className: buildClassesByJoining('inline-flex w-full justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-green-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600', buttonClassName), children: buttonText })), showSecondButton && secondButtonText && (_jsx("button", { type: "button", onClick: () => onSecondButtonClick?.(), className: buildClassesByJoining('inline-flex w-full justify-center rounded-md bg-green-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-green-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600', secondButtonClassName), children: secondButtonText }))] }))] }) }) })] }));
|
|
12
12
|
};
|
|
13
13
|
export default Modal;
|
|
@@ -7,5 +7,10 @@ export type PriceProps = {
|
|
|
7
7
|
quantUnit?: string;
|
|
8
8
|
quantUnitClassName?: string;
|
|
9
9
|
containerClassName?: string;
|
|
10
|
+
classNames?: {
|
|
11
|
+
container?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
quantUnit?: string;
|
|
14
|
+
};
|
|
10
15
|
};
|
|
11
|
-
export declare const Price: ({ value, locale, options, className, quantUnit, quantUnitClassName, containerClassName, }: PriceProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Price: ({ value, locale, options, className, quantUnit, quantUnitClassName, containerClassName, classNames, }: PriceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { formatPrice, } from '../../../utils/generalHelperFunction';
|
|
3
|
-
|
|
3
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
4
|
+
export const Price = ({ value, locale = 'cs', options, className = '', quantUnit, quantUnitClassName = 'font-bold text-black', containerClassName = 'flex items-baseline gap-1', classNames, }) => {
|
|
4
5
|
const { number, currency, position } = formatPrice(value, locale, options);
|
|
5
|
-
return (_jsxs("span", { className: containerClassName, children: [position === 'before' && (_jsx("span", { className: options?.currencyClassName, children: currency })), _jsx("span", { className: `${className} ${options?.numberClassName || ''}`, children: number }), position === 'after' && (_jsxs("span", { className: options?.currencyClassName, children: [" ", currency] })), quantUnit && (_jsx("span", { className: quantUnitClassName, children: quantUnit }))] }));
|
|
6
|
+
return (_jsxs("span", { className: buildClassesByJoining(containerClassName, classNames?.container), children: [position === 'before' && (_jsx("span", { className: options?.currencyClassName, children: currency })), _jsx("span", { className: buildClassesByJoining(`${className} ${options?.numberClassName || ''}`, classNames?.value), children: number }), position === 'after' && (_jsxs("span", { className: options?.currencyClassName, children: [" ", currency] })), quantUnit && (_jsx("span", { className: buildClassesByJoining(quantUnitClassName, classNames?.quantUnit), children: quantUnit }))] }));
|
|
6
7
|
};
|
|
@@ -7,6 +7,13 @@ export interface SwitchProps {
|
|
|
7
7
|
simpleToggle?: boolean;
|
|
8
8
|
shortToggle?: boolean;
|
|
9
9
|
toggleIcon?: boolean;
|
|
10
|
+
classNames?: {
|
|
11
|
+
container?: string;
|
|
12
|
+
track?: string;
|
|
13
|
+
thumb?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
10
17
|
}
|
|
11
|
-
declare const SwitchToggle: ({ description, color, bgColor, ringColor, selected, simpleToggle, shortToggle, toggleIcon, }: SwitchProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
18
|
+
declare const SwitchToggle: ({ description, color, bgColor, ringColor, selected, simpleToggle, shortToggle, toggleIcon, classNames, }: SwitchProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
19
|
export default SwitchToggle;
|
|
@@ -2,25 +2,26 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Switch } from '@headlessui/react';
|
|
5
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
5
6
|
const SwitchToggle = ({ description, color = '#3b82f6', // default blue
|
|
6
7
|
bgColor = '#e5e7eb', // default gray-200
|
|
7
8
|
ringColor = '#2563eb', // default blue-600
|
|
8
|
-
selected = false, simpleToggle, shortToggle, toggleIcon, }) => {
|
|
9
|
+
selected = false, simpleToggle, shortToggle, toggleIcon, classNames, }) => {
|
|
9
10
|
const [enabled, setEnabled] = useState(selected);
|
|
10
11
|
if (simpleToggle) {
|
|
11
12
|
return (_jsxs(Switch, { checked: enabled, onChange: setEnabled, style: {
|
|
12
13
|
backgroundColor: enabled ? color : bgColor,
|
|
13
14
|
boxShadow: enabled ? `0 0 0 2px ${ringColor}` : 'none',
|
|
14
|
-
}, className: "group relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-offset-2", children: [_jsx("span", { className: "sr-only", children: description || 'Use setting' }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out", style: {
|
|
15
|
+
}, className: buildClassesByJoining("group relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-offset-2", classNames?.container, classNames?.track), children: [_jsx("span", { className: buildClassesByJoining("sr-only", classNames?.label, classNames?.description), children: description || 'Use setting' }), _jsx("span", { "aria-hidden": "true", className: buildClassesByJoining("pointer-events-none inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out", classNames?.thumb), style: {
|
|
15
16
|
transform: enabled
|
|
16
17
|
? 'translateX(1.25rem)'
|
|
17
18
|
: 'translateX(0)',
|
|
18
19
|
} })] }));
|
|
19
20
|
}
|
|
20
21
|
if (shortToggle) {
|
|
21
|
-
return (_jsxs(Switch, { checked: enabled, onChange: setEnabled, className: "group relative inline-flex h-5 w-10 shrink-0 cursor-pointer items-center justify-center rounded-full focus:outline-none", children: [_jsx("span", { className: "sr-only", children: description || 'Use setting' }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute size-full rounded-md bg-white" }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute mx-auto h-4 w-9 rounded-full transition-colors duration-200 ease-in-out", style: {
|
|
22
|
+
return (_jsxs(Switch, { checked: enabled, onChange: setEnabled, className: buildClassesByJoining("group relative inline-flex h-5 w-10 shrink-0 cursor-pointer items-center justify-center rounded-full focus:outline-none", classNames?.container, classNames?.track), children: [_jsx("span", { className: buildClassesByJoining("sr-only", classNames?.label, classNames?.description), children: description || 'Use setting' }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute size-full rounded-md bg-white" }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute mx-auto h-4 w-9 rounded-full transition-colors duration-200 ease-in-out", style: {
|
|
22
23
|
backgroundColor: enabled ? color : bgColor,
|
|
23
|
-
} }), _jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute left-0 inline-block size-5 transform rounded-full border border-gray-200 bg-white shadow-sm ring-0 transition-transform duration-200 ease-in-out", style: {
|
|
24
|
+
} }), _jsx("span", { "aria-hidden": "true", className: buildClassesByJoining("pointer-events-none absolute left-0 inline-block size-5 transform rounded-full border border-gray-200 bg-white shadow-sm ring-0 transition-transform duration-200 ease-in-out", classNames?.thumb), style: {
|
|
24
25
|
transform: enabled
|
|
25
26
|
? 'translateX(1.25rem)'
|
|
26
27
|
: 'translateX(0)',
|
|
@@ -30,7 +31,7 @@ selected = false, simpleToggle, shortToggle, toggleIcon, }) => {
|
|
|
30
31
|
return (_jsxs(Switch, { checked: enabled, onChange: setEnabled, style: {
|
|
31
32
|
backgroundColor: enabled ? color : bgColor,
|
|
32
33
|
boxShadow: enabled ? `0 0 0 2px ${ringColor}` : 'none',
|
|
33
|
-
}, className: "group relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-offset-2", children: [_jsx("span", { className: "sr-only", children: description || 'Use setting' }), _jsxs("span", { className: "pointer-events-none relative inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out", style: {
|
|
34
|
+
}, className: buildClassesByJoining("group relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-offset-2", classNames?.container, classNames?.track), children: [_jsx("span", { className: buildClassesByJoining("sr-only", classNames?.label, classNames?.description), children: description || 'Use setting' }), _jsxs("span", { className: buildClassesByJoining("pointer-events-none relative inline-block size-5 transform rounded-full bg-white shadow-sm ring-0 transition duration-200 ease-in-out", classNames?.thumb), style: {
|
|
34
35
|
transform: enabled
|
|
35
36
|
? 'translateX(1.25rem)'
|
|
36
37
|
: 'translateX(0)',
|
|
@@ -20,6 +20,11 @@ export type TooltipProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'co
|
|
|
20
20
|
lazy?: boolean;
|
|
21
21
|
size?: 'sm' | 'md' | 'lg';
|
|
22
22
|
variant?: 'default' | 'dark' | 'light' | 'error' | 'warning' | 'success';
|
|
23
|
+
classNames?: {
|
|
24
|
+
trigger?: string;
|
|
25
|
+
content?: string;
|
|
26
|
+
arrow?: string;
|
|
27
|
+
};
|
|
23
28
|
};
|
|
24
29
|
declare const _default: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "children" | "content"> & {
|
|
25
30
|
content: ((ref: Ref<HTMLElement>, props: Record<string, unknown>) => ReactNode) | ReactNode;
|
|
@@ -36,5 +41,10 @@ declare const _default: import("react").ForwardRefExoticComponent<Omit<HTMLAttri
|
|
|
36
41
|
lazy?: boolean;
|
|
37
42
|
size?: "sm" | "md" | "lg";
|
|
38
43
|
variant?: "default" | "dark" | "light" | "error" | "warning" | "success";
|
|
44
|
+
classNames?: {
|
|
45
|
+
trigger?: string;
|
|
46
|
+
content?: string;
|
|
47
|
+
arrow?: string;
|
|
48
|
+
};
|
|
39
49
|
} & import("react").RefAttributes<TooltipRef>>;
|
|
40
50
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import buildClassesByJoining from '../../../utils/StyleHelper';
|
|
3
3
|
import { FloatingPortal, arrow, autoUpdate, hide, offset, safePolygon, shift, useDismiss, useFloating, useFocus, useHover, useInteractions, useRole, useTransitionStyles, } from '@floating-ui/react';
|
|
4
4
|
import { forwardRef, useImperativeHandle, useRef, useState, } from 'react';
|
|
5
|
-
const Tooltip = ({ className, children, content, placement = 'top', strategy: strategyProp = 'absolute', contentClassName, zIndex = 30, portalTarget, backgroundColor, textColor, disabled = false, disableAutoHide, lazy = true, size = 'md', variant = 'default', ...props }, ref) => {
|
|
5
|
+
const Tooltip = ({ className, children, content, placement = 'top', strategy: strategyProp = 'absolute', contentClassName, zIndex = 30, portalTarget, backgroundColor, textColor, disabled = false, disableAutoHide, lazy = true, size = 'md', variant = 'default', classNames, ...props }, ref) => {
|
|
6
6
|
const [open, setOpen] = useState(false);
|
|
7
7
|
const arrowRef = useRef(null);
|
|
8
8
|
const { x, y, refs, strategy, context, middlewareData: { arrow: { x: arrowX, y: arrowY } = {}, hide: hideMiddleware, }, placement: floatingPlacement, } = useFloating({
|
|
@@ -88,6 +88,7 @@ const Tooltip = ({ className, children, content, placement = 'top', strategy: st
|
|
|
88
88
|
// Image max width
|
|
89
89
|
'[&_img]:max-w-[420px]',
|
|
90
90
|
contentClassName,
|
|
91
|
+
classNames?.content,
|
|
91
92
|
]);
|
|
92
93
|
const tooltipStyles = {
|
|
93
94
|
zIndex,
|
|
@@ -122,7 +123,7 @@ const Tooltip = ({ className, children, content, placement = 'top', strategy: st
|
|
|
122
123
|
if (typeof children === 'function') {
|
|
123
124
|
return children(refs.setReference, getReferenceProps(), disabled);
|
|
124
125
|
}
|
|
125
|
-
return (_jsx("div", { ...props, ...getAllReferenceProps(), className: buildClassesByJoining(['inline-block', className]), children: children }));
|
|
126
|
+
return (_jsx("div", { ...props, ...getAllReferenceProps(), className: buildClassesByJoining(['inline-block', className, classNames?.trigger]), children: children }));
|
|
126
127
|
};
|
|
127
128
|
const renderTooltipContent = () => {
|
|
128
129
|
if (disabled || (lazy && !isMounted)) {
|
|
@@ -136,7 +137,7 @@ const Tooltip = ({ className, children, content, placement = 'top', strategy: st
|
|
|
136
137
|
}
|
|
137
138
|
return (_jsxs("div", { className: tooltipClasses, ref: refs.setFloating, style: tooltipStyles, ...getFloatingProps(), children: [_jsx("span", { className: "relative z-10", dangerouslySetInnerHTML: typeof content === 'string'
|
|
138
139
|
? { __html: content }
|
|
139
|
-
: undefined, children: typeof content !== 'string' ? content : null }), _jsx("div", { ref: arrowRef, style: {
|
|
140
|
+
: undefined, children: typeof content !== 'string' ? content : null }), _jsx("div", { ref: arrowRef, className: buildClassesByJoining(classNames?.arrow), style: {
|
|
140
141
|
position: 'absolute',
|
|
141
142
|
width: '10px',
|
|
142
143
|
height: '10px',
|
|
@@ -6,6 +6,20 @@ interface InstructionProps {
|
|
|
6
6
|
phoneNumber?: string;
|
|
7
7
|
email?: string;
|
|
8
8
|
fontClass?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
classNames?: {
|
|
11
|
+
container?: string;
|
|
12
|
+
title?: string;
|
|
13
|
+
idNumber?: string;
|
|
14
|
+
contactBlock?: string;
|
|
15
|
+
contactInfo?: string;
|
|
16
|
+
phoneRow?: string;
|
|
17
|
+
phoneIcon?: string;
|
|
18
|
+
emailRow?: string;
|
|
19
|
+
emailIcon?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
borderLeft?: string;
|
|
22
|
+
};
|
|
9
23
|
}
|
|
10
|
-
export declare const Instruction: ({ id, title, hasContactIcons, description, phoneNumber, email, fontClass, }: InstructionProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const Instruction: ({ id, title, hasContactIcons, description, phoneNumber, email, fontClass, className, classNames, }: InstructionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
25
|
export {};
|
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { EnvelopeIcon, PhoneIcon } from '@heroicons/react/24/outline';
|
|
3
3
|
import parse from 'html-react-parser';
|
|
4
|
-
|
|
4
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
5
|
+
export const Instruction = ({ id, title, hasContactIcons, description, phoneNumber = '+420 000 000 000', email = 'info@rezidencevavrineckaka.cz', fontClass = '', className, classNames = {
|
|
6
|
+
container: '',
|
|
7
|
+
title: '',
|
|
8
|
+
idNumber: '',
|
|
9
|
+
contactBlock: '',
|
|
10
|
+
contactInfo: '',
|
|
11
|
+
phoneRow: '',
|
|
12
|
+
phoneIcon: '',
|
|
13
|
+
emailRow: '',
|
|
14
|
+
emailIcon: '',
|
|
15
|
+
description: '',
|
|
16
|
+
borderLeft: '',
|
|
17
|
+
}, }) => {
|
|
5
18
|
const renderDescription = () => {
|
|
6
19
|
if (typeof description === 'string') {
|
|
7
20
|
return parse(description);
|
|
8
21
|
}
|
|
9
22
|
return description;
|
|
10
23
|
};
|
|
11
|
-
return (_jsx("div", { className:
|
|
24
|
+
return (_jsx("div", { className: buildClassesByJoining('flex flex-col gap-4 py-6', fontClass, className, classNames?.container), children: _jsx("div", { className: "flex items-start gap-4", children: _jsxs("div", { className: buildClassesByJoining('flex flex-col gap-4 w-full', fontClass), children: [_jsxs("h2", { className: buildClassesByJoining('text-xl font-bold text-gray-800 mb-4', fontClass, classNames?.title), children: [_jsxs("span", { className: buildClassesByJoining('mr-4', classNames?.idNumber), children: [id, "."] }), title] }), hasContactIcons ? (_jsxs("div", { className: buildClassesByJoining('flex flex-col lg:flex-row! gap-6 border-l-2 border-[#C9A96E]', classNames?.contactBlock, classNames?.borderLeft), children: [_jsxs("div", { className: buildClassesByJoining('flex flex-col justify-around gap-4 w-max min-w-[310px] pl-8 text-gray-800', fontClass, classNames?.contactInfo), children: [_jsxs("div", { className: buildClassesByJoining('flex items-center gap-2', classNames?.phoneRow), children: [_jsx(PhoneIcon, { className: buildClassesByJoining('w-5 h-5', classNames?.phoneIcon) }), _jsx("a", { href: `tel:${phoneNumber}`, children: phoneNumber })] }), _jsxs("div", { className: buildClassesByJoining('flex items-center gap-2', classNames?.emailRow), children: [_jsx(EnvelopeIcon, { className: buildClassesByJoining('w-5 h-5', classNames?.emailIcon) }), _jsx("a", { href: `mailto:${email}`, children: email })] })] }), _jsx("p", { className: buildClassesByJoining('text-gray-600 pl-8 lg:pl-28!', fontClass, classNames?.description), children: renderDescription() })] })) : (_jsx("p", { className: buildClassesByJoining('text-gray-600 pl-8 border-l-2 border-[#C9A96E]', fontClass, classNames?.description, classNames?.borderLeft), children: renderDescription() }))] }) }) }));
|
|
12
25
|
};
|
|
@@ -9,6 +9,11 @@ interface InstructionData {
|
|
|
9
9
|
}
|
|
10
10
|
interface InstructionsListProps {
|
|
11
11
|
instructions: InstructionData[];
|
|
12
|
+
className?: string;
|
|
13
|
+
classNames?: {
|
|
14
|
+
container?: string;
|
|
15
|
+
item?: string;
|
|
16
|
+
};
|
|
12
17
|
}
|
|
13
|
-
export declare const InstructionsList: ({ instructions }: InstructionsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const InstructionsList: ({ instructions, className, classNames, }: InstructionsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
19
|
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
2
3
|
import { Instruction } from './Instruction';
|
|
3
|
-
export const InstructionsList = ({ instructions
|
|
4
|
-
|
|
4
|
+
export const InstructionsList = ({ instructions, className, classNames = {
|
|
5
|
+
container: '',
|
|
6
|
+
item: '',
|
|
7
|
+
}, }) => {
|
|
8
|
+
return (_jsx("div", { className: buildClassesByJoining(className, classNames?.container), children: instructions.map((item) => (_jsx(Instruction, { id: item.id, title: item.title, hasContactIcons: item.hasContactIcons, phoneNumber: item.phoneNumber, email: item.email, description: item.description, fontClass: item.fontClass, className: classNames?.item }, item.id))) }));
|
|
5
9
|
};
|
|
@@ -208,7 +208,9 @@ mainPriceFormatOptions, discountPriceFormatOptions, mainPriceClassName, discount
|
|
|
208
208
|
onDelete(product);
|
|
209
209
|
}
|
|
210
210
|
}, [onDelete, product]);
|
|
211
|
-
return (_jsxs("div", { className: buildClassesByJoining('group relative h-full', layoutClass, elevationClass, onCardClick ? 'cursor-pointer' : '', borderOnHoverClassName, className, classNames?.container), onClick: handleCardClick, children: [renderHeader && renderHeader(product), _jsxs("div", { className: buildClassesByJoining(imageLayoutClass, 'relative', classNames?.imageLayout), children: [product.badges && renderBadges && (_jsx("div", { className: buildClassesByJoining("absolute top-2 left-2 z-10 flex flex-wrap gap-1", classNames?.badges?.container), children: product.badges.map((badge, index) => (_jsx(Badge, { color: badge.color, className: classNames?.badges?.badge, children: badge.text }, index))) })), showDeleteButton ? (_jsx(DeleteButton, { show: showDeleteButton, onDelete: handleDelete,
|
|
211
|
+
return (_jsxs("div", { className: buildClassesByJoining('group relative h-full', layoutClass, elevationClass, onCardClick ? 'cursor-pointer' : '', borderOnHoverClassName, className, classNames?.container), onClick: handleCardClick, children: [renderHeader && renderHeader(product), _jsxs("div", { className: buildClassesByJoining(imageLayoutClass, 'relative', classNames?.imageLayout), children: [product.badges && renderBadges && (_jsx("div", { className: buildClassesByJoining("absolute top-2 left-2 z-10 flex flex-wrap gap-1", classNames?.badges?.container), children: product.badges.map((badge, index) => (_jsx(Badge, { color: badge.color, className: classNames?.badges?.badge, children: badge.text }, index))) })), showDeleteButton ? (_jsx(DeleteButton, { show: showDeleteButton, onDelete: handleDelete, className: buildClassesByJoining(deleteButtonClassName, classNames?.deleteButton), isDeletePending: isDeletePending, size: deleteButtonSize, position: deleteButtonPosition })) : (_jsx(LikeButton, { show: showWishlistButton, enableMultiple: enableMultipleWishlists, isInWishlist: isInWishlist, wishlists: wishlists, productWishlistIds: productWishlistIds, className: buildClassesByJoining(wishlistButtonClassName, classNames?.wishlistButton), classNames: {
|
|
212
|
+
dropdown: wishlistDropdownClassName,
|
|
213
|
+
}, isWishlistPending: isWishlistPending, handleAddToWishlist: handleAddToWishlist, handleRemoveFromWishlist: handleRemoveFromWishlist, handleCreateNewWishlist: handleCreateNewWishlist, handleWishlistToggle: handleWishlistToggle })), _jsx("img", { alt: product.all_images[0]?.alt, src: product.all_images[0]?.href, className: buildClassesByJoining(aspectRatioClass, objectFitClass, objectPositionClass, hoverEffect !== 'none' ? hoverClass : '', roundedClass, 'bg-gray-200', onImageClick ? 'cursor-pointer' : '', imageClassName, classNames?.image), onClick: handleImageClick }), addButtonPosition === 'overlay' && (_jsx(AddToCart, { buttonClassName: buildClassesByJoining(buttonClassName, classNames?.button), addButtonIcon: getButtonIcon(), handleAddToCart: handleAddToCart, showAddButton: shouldShowAddButton(), disabled: disabled, customAddButton: customAddButton }))] }), _jsxs("div", { className: buildClassesByJoining('mt-4 h-full flex flex-col justify-between grow', contentLayoutClass, compactClass, contentClassName, classNames?.content), children: [_jsxs("div", { className: "flex flex-col h-full justify-between", children: [_jsxs("div", { children: [_jsx(Heading, { level: 3, className: buildClassesByJoining('text-lg text-gray-700', classNames?.title, titleLineClampClass, titleClassName), children: _jsxs(Button, { asLink: true, unstyled: true, href: href, children: [!onCardClick && (_jsx("span", { "aria-hidden": "true", className: buildClassesByJoining("absolute inset-0", classNames?.button?.link) })), product.product_name] }) }), renderVariationName && product.variation_name && (_jsx("span", { className: buildClassesByJoining('text-md', variationNameClassName, classNames?.variationName), children: product.variation_name })), (product.country || product.field_volume) && (_jsxs("p", { className: buildClassesByJoining(classNames?.label), children: [showCountry && product.country && (_jsxs("span", { className: buildClassesByJoining('text-sm', labelClassName, classNames?.label?.country), children: [product.country, showVolume &&
|
|
212
214
|
product.field_volume &&
|
|
213
215
|
', '] })), showVolume && product.field_volume && (_jsx("span", { className: buildClassesByJoining('text-sm', labelClassName, classNames?.label?.volume), children: product.field_volume }))] })), renderDescription && product.description && (_jsx("span", { className: buildClassesByJoining('mt-1 text-sm text-gray-500 line-clamp-2', descriptionClassName, classNames?.description), children: parseHTML(product.description) }))] }), _jsx("div", { className: "flex flex-col justify-between", children: _jsxs("div", { className: buildClassesByJoining("flex flex-col justify-between", classNames?.price?.container), children: [_jsx(Price, { value: product.price, locale: locale, options: mainPriceFormatOptions, className: buildClassesByJoining('text-md font-bold text-gray-900', mainPriceClassName, classNames?.price?.mainPrice), quantUnit: quantUnit, quantUnitClassName: buildClassesByJoining('text-md font-bold text-black', mainQuantUnitClassName, classNames?.price?.mainQuantUnit) }), product?.discountPercent != null &&
|
|
214
216
|
product.discountPercent > 0 && (_jsx(Price, { value: product.price /
|
|
@@ -195,11 +195,11 @@ mainPriceFormatOptions, discountPriceFormatOptions, variationPriceFormatOptions,
|
|
|
195
195
|
variation.id && (_jsx("div", { className: buildClassesByJoining('absolute inset-0 pointer-events-none', classNames
|
|
196
196
|
?.variations
|
|
197
197
|
?.variationActiveButton), style: {
|
|
198
|
-
background: `
|
|
199
|
-
radial-gradient(circle at top left, var(--primary) 0%, transparent 20%),
|
|
200
|
-
radial-gradient(circle at top right, var(--primary) 0%, transparent 20%),
|
|
201
|
-
radial-gradient(circle at bottom left, var(--primary) 0%, transparent 20%),
|
|
202
|
-
radial-gradient(circle at bottom right, var(--primary) 0%, transparent 20%)
|
|
198
|
+
background: `
|
|
199
|
+
radial-gradient(circle at top left, var(--primary) 0%, transparent 20%),
|
|
200
|
+
radial-gradient(circle at top right, var(--primary) 0%, transparent 20%),
|
|
201
|
+
radial-gradient(circle at bottom left, var(--primary) 0%, transparent 20%),
|
|
202
|
+
radial-gradient(circle at bottom right, var(--primary) 0%, transparent 20%)
|
|
203
203
|
`,
|
|
204
204
|
opacity: 0.2,
|
|
205
205
|
} })), _jsxs("div", { className: buildClassesByJoining('flex flex-col justify-between gap-1 relative z-10 flex-1 min-w-0 pr-2', classNames?.variations
|
|
@@ -32,6 +32,8 @@ const ProductDetailGallery = ({ product, classNames, showWishlistButton, enableM
|
|
|
32
32
|
onCreateWishlist(name, product);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
return (_jsxs(_Fragment, { children: [_jsxs(TabGroup, { className: buildClassesByJoining('flex flex-col-reverse items-center', classNames?.container), children: [_jsx("div", { className: "mx-auto mt-6 hidden w-full max-w-2xl sm:block lg:max-w-none", children: _jsx(TabList, { className: buildClassesByJoining('grid grid-cols-4 gap-6', classNames?.list), children: product.all_images.map((image, i) => (_jsxs(Tab, { className: buildClassesByJoining('group relative flex h-24 cursor-pointer items-center justify-center bg-white text-sm font-medium text-gray-900 uppercase hover:bg-gray-50 focus:ring-3 focus:ring-[var(--primary)]/50 focus:ring-offset-4 focus:outline-hidden', classNames?.image), children: [_jsx("span", { className: "sr-only", children: image.alt }), _jsx("span", { className: "absolute inset-0 overflow-hidden", children: _jsx("img", { src: image.href, alt: "", className: buildClassesByJoining('size-full object-contain', classNames?.imageThumbnail) }) }), _jsx("span", { "aria-hidden": "true", className: buildClassesByJoining('pointer-events-none absolute inset-0 ring-2 ring-transparent ring-offset-2 group-data-selected:ring-[var(--primary)]', classNames?.imageActiveBorder) })] }, i))) }) }), _jsxs(TabPanels, { className: "relative w-full", children: [product.all_images.map((image, i) => (_jsx(TabPanel, { className: buildClassesByJoining('relative', classNames?.imageActivePanel), children: _jsx("img", { src: image.href, alt: image.alt, onClick: () => openGallery(i), className: buildClassesByJoining('aspect-[7/5] w-full object-contain border-1 border-gray-200 cursor-pointer hover:opacity-90 transition-opacity', classNames?.imageActive) }) }, i))), showWishlistButton && (_jsx("div", { className: "absolute top-3 right-3 z-10", children: _jsx(LikeButton, { show: true, enableMultiple: enableMultipleWishlists, isInWishlist: isInWishlist, wishlists: wishlists, productWishlistIds: productWishlistIds, isWishlistPending: isWishlistPending, handleAddToWishlist: handleAddToWishlist, handleRemoveFromWishlist: handleRemoveFromWishlist, handleCreateNewWishlist: handleCreateNewWishlist, handleWishlistToggle: handleWishlistToggle,
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsxs(TabGroup, { className: buildClassesByJoining('flex flex-col-reverse items-center', classNames?.container), children: [_jsx("div", { className: "mx-auto mt-6 hidden w-full max-w-2xl sm:block lg:max-w-none", children: _jsx(TabList, { className: buildClassesByJoining('grid grid-cols-4 gap-6', classNames?.list), children: product.all_images.map((image, i) => (_jsxs(Tab, { className: buildClassesByJoining('group relative flex h-24 cursor-pointer items-center justify-center bg-white text-sm font-medium text-gray-900 uppercase hover:bg-gray-50 focus:ring-3 focus:ring-[var(--primary)]/50 focus:ring-offset-4 focus:outline-hidden', classNames?.image), children: [_jsx("span", { className: "sr-only", children: image.alt }), _jsx("span", { className: "absolute inset-0 overflow-hidden", children: _jsx("img", { src: image.href, alt: "", className: buildClassesByJoining('size-full object-contain', classNames?.imageThumbnail) }) }), _jsx("span", { "aria-hidden": "true", className: buildClassesByJoining('pointer-events-none absolute inset-0 ring-2 ring-transparent ring-offset-2 group-data-selected:ring-[var(--primary)]', classNames?.imageActiveBorder) })] }, i))) }) }), _jsxs(TabPanels, { className: "relative w-full", children: [product.all_images.map((image, i) => (_jsx(TabPanel, { className: buildClassesByJoining('relative', classNames?.imageActivePanel), children: _jsx("img", { src: image.href, alt: image.alt, onClick: () => openGallery(i), className: buildClassesByJoining('aspect-[7/5] w-full object-contain border-1 border-gray-200 cursor-pointer hover:opacity-90 transition-opacity', classNames?.imageActive) }) }, i))), showWishlistButton && (_jsx("div", { className: "absolute top-3 right-3 z-10", children: _jsx(LikeButton, { show: true, enableMultiple: enableMultipleWishlists, isInWishlist: isInWishlist, wishlists: wishlists, productWishlistIds: productWishlistIds, isWishlistPending: isWishlistPending, handleAddToWishlist: handleAddToWishlist, handleRemoveFromWishlist: handleRemoveFromWishlist, handleCreateNewWishlist: handleCreateNewWishlist, handleWishlistToggle: handleWishlistToggle, classNames: {
|
|
36
|
+
button: 'bg-white/90 backdrop-blur-sm border border-gray-200 shadow-lg hover:shadow-xl',
|
|
37
|
+
} }) }))] })] }), _jsx(ImageGalleryModal, { images: product.all_images, isOpen: isGalleryOpen, initialIndex: galleryInitialIndex, onClose: closeGallery })] }));
|
|
36
38
|
};
|
|
37
39
|
export default ProductDetailGallery;
|
|
@@ -17,10 +17,30 @@ export interface ProgressStepperProps {
|
|
|
17
17
|
completeColor?: string;
|
|
18
18
|
currentColor?: string;
|
|
19
19
|
upcomingColor?: string;
|
|
20
|
-
completeIconClassName?: string;
|
|
21
|
-
currentIconClassName?: string;
|
|
22
|
-
upcomingIconClassName?: string;
|
|
23
20
|
showStepNumbers?: boolean;
|
|
24
21
|
renderCustomStep?: (step: Step, index: number, totalSteps: number) => ReactNode;
|
|
22
|
+
classNames?: {
|
|
23
|
+
list?: string;
|
|
24
|
+
step?: string;
|
|
25
|
+
stepLink?: {
|
|
26
|
+
complete?: string;
|
|
27
|
+
current?: string;
|
|
28
|
+
upcoming?: string;
|
|
29
|
+
};
|
|
30
|
+
stepContent?: string;
|
|
31
|
+
icon?: {
|
|
32
|
+
complete?: string;
|
|
33
|
+
current?: string;
|
|
34
|
+
upcoming?: string;
|
|
35
|
+
checkIcon?: string;
|
|
36
|
+
};
|
|
37
|
+
stepName?: {
|
|
38
|
+
complete?: string;
|
|
39
|
+
current?: string;
|
|
40
|
+
upcoming?: string;
|
|
41
|
+
};
|
|
42
|
+
arrow?: string;
|
|
43
|
+
arrowSvg?: string;
|
|
44
|
+
};
|
|
25
45
|
}
|
|
26
|
-
export declare const ProgressStepper: ({ steps, className, orientation, showArrows, clickable, completeColor, currentColor, upcomingColor,
|
|
46
|
+
export declare const ProgressStepper: ({ steps, className, orientation, showArrows, clickable, completeColor, currentColor, upcomingColor, showStepNumbers, renderCustomStep, classNames, }: ProgressStepperProps) => import("react/jsx-runtime").JSX.Element;
|