@q2devel/q2-storybook 1.0.49 → 1.0.51
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/modal/Modal.d.ts +3 -3
- package/dist/components/Base/modal/Modal.js +2 -2
- package/dist/components/Base/select/Select.d.ts +17 -0
- package/dist/components/Base/select/Select.js +45 -0
- package/dist/components/Base/switch/Switch.d.ts +12 -0
- package/dist/components/Base/switch/Switch.js +35 -0
- package/dist/components/Ecommerce/category-tree/CategoryTree.js +5 -5
- package/dist/components/Ecommerce/instructions-list/Instruction.d.ts +11 -0
- package/dist/components/Ecommerce/instructions-list/Instruction.js +5 -0
- package/dist/components/Ecommerce/instructions-list/InstructionsList.d.ts +13 -0
- package/dist/components/Ecommerce/instructions-list/InstructionsList.js +5 -0
- package/dist/components/Ecommerce/product-card/ProductCard.d.ts +3 -1
- package/dist/components/Ecommerce/product-card/ProductCard.js +3 -3
- package/dist/components/Forms/contact-form/ContactForm.d.ts +5 -0
- package/dist/components/Forms/contact-form/ContactForm.js +29 -0
- package/dist/components/Web/footer/Footer.d.ts +2 -0
- package/dist/components/Web/footer/Footer.js +17 -0
- package/dist/components/Web/footer/FooterProps.d.ts +38 -0
- package/dist/components/Web/footer/FooterProps.js +1 -0
- package/dist/components/Web/web-section/WebSection.d.ts +10 -0
- package/dist/components/Web/web-section/WebSection.js +9 -0
- package/dist/components/banner/Banner.d.ts +37 -37
- package/dist/components/banner/Banner.js +126 -126
- package/dist/components/button/Button.d.ts +18 -18
- package/dist/components/button/Button.js +38 -38
- package/dist/components/category-tree/CategoryTree.d.ts +14 -14
- package/dist/components/category-tree/CategoryTree.js +55 -55
- package/dist/components/heading/Heading.d.ts +9 -9
- package/dist/components/heading/Heading.js +16 -16
- package/dist/components/product-card/ProductCard.d.ts +66 -66
- package/dist/components/product-card/ProductCard.js +156 -156
- package/dist/components/select-field/SelectField.d.ts +29 -29
- package/dist/components/select-field/SelectField.js +142 -142
- package/dist/components/tooltip/Tooltip.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/components/breadcrumb/Breadcrumb.d.ts +0 -17
- package/dist/components/breadcrumb/Breadcrumb.js +0 -13
- package/dist/components/button/AddToCart.d.ts +0 -10
- package/dist/components/button/AddToCart.js +0 -7
- package/dist/components/like-button/DeleteButton.d.ts +0 -10
- package/dist/components/like-button/DeleteButton.js +0 -30
- package/dist/components/like-button/LikeButton.d.ts +0 -21
- package/dist/components/like-button/LikeButton.js +0 -41
- package/dist/components/like-button/WishlistDropdown.d.ts +0 -18
- package/dist/components/like-button/WishlistDropdown.js +0 -49
- package/dist/components/spinner/Spinner.d.ts +0 -10
- package/dist/components/spinner/Spinner.js +0 -12
- package/dist/components/tabs/HorizontalTab.d.ts +0 -8
- package/dist/components/tabs/HorizontalTab.js +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
interface ModalProps {
|
|
3
|
-
title:
|
|
4
|
-
description:
|
|
5
|
-
buttonText:
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
description: ReactNode;
|
|
5
|
+
buttonText: ReactNode;
|
|
6
6
|
icon?: ReactNode;
|
|
7
7
|
iconBackgroundColor?: string;
|
|
8
8
|
iconColor?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
4
3
|
import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from '@headlessui/react';
|
|
5
4
|
import { CheckIcon, XMarkIcon } from '@heroicons/react/24/outline';
|
|
5
|
+
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
6
6
|
export const Modal = ({ title, description, buttonText, icon = _jsx(CheckIcon, { "aria-hidden": "true", className: "size-6" }), iconBackgroundColor = 'bg-green-100', iconColor = 'text-green-600', buttonClassName, panelClassName, backdropClassName, onClose, isOpen, showCloseButton = false, closeButtonClassName, }) => {
|
|
7
7
|
const handleClose = (value) => {
|
|
8
8
|
onClose?.();
|
|
9
9
|
};
|
|
10
|
-
return (_jsxs(Dialog, { open: isOpen, onClose: handleClose, className: "relative z-10", 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: [_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: [_jsx(DialogTitle, { as: "h3", className: "text-base font-semibold text-gray-900", children: title }), _jsx("div", { className: "mt-2", children: _jsx("p", { className: "text-sm text-gray-500", children: description }) })] })] }), _jsx("div", { className: "mt-5 sm:mt-6", children: _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 }) })] }) }) })] }));
|
|
10
|
+
return (_jsxs(Dialog, { open: isOpen, onClose: handleClose, className: "relative z-10", 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: [_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: [_jsx(DialogTitle, { as: "h3", className: "text-base font-semibold text-gray-900", children: title }), _jsx("div", { className: "mt-2", children: _jsx("p", { className: "text-sm text-gray-500", children: description }) })] })] }), buttonText && (_jsx("div", { className: "mt-5 sm:mt-6", children: _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 }) }))] }) }) })] }));
|
|
11
11
|
};
|
|
12
12
|
export default Modal;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SelectProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
onClick?: (data: {
|
|
5
|
+
toggled: boolean;
|
|
6
|
+
event: any;
|
|
7
|
+
}) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
10
|
+
className?: string;
|
|
11
|
+
unstyled?: boolean;
|
|
12
|
+
isToggled?: boolean;
|
|
13
|
+
scaleOnHover?: boolean;
|
|
14
|
+
smoothSelect?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const Select: React.FC<SelectProps>;
|
|
17
|
+
export default Select;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
|
+
import buildClassesByJoining from "../../../utils/StyleHelper";
|
|
5
|
+
const roundedClasses = {
|
|
6
|
+
none: "rounded-none",
|
|
7
|
+
sm: "rounded-sm",
|
|
8
|
+
md: "rounded-md",
|
|
9
|
+
lg: "rounded-lg",
|
|
10
|
+
xl: "rounded-xl",
|
|
11
|
+
full: "rounded-full",
|
|
12
|
+
};
|
|
13
|
+
const variantClasses = {
|
|
14
|
+
primary: "text-white transform transition-transform duration-200 hover:scale-105",
|
|
15
|
+
smoothOnly: "transition-all duration-200 ease-in-out",
|
|
16
|
+
};
|
|
17
|
+
const Select = ({ label, onClick, disabled = false, rounded = "md", className = "", unstyled = false, isToggled, scaleOnHover = false, smoothSelect = false, }) => {
|
|
18
|
+
const isControlled = typeof isToggled === "boolean";
|
|
19
|
+
const [internalToggled, setInternalToggled] = useState(isToggled ?? false);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (isControlled) {
|
|
22
|
+
setInternalToggled(isToggled);
|
|
23
|
+
}
|
|
24
|
+
}, [isToggled]);
|
|
25
|
+
const toggled = isControlled ? isToggled : internalToggled;
|
|
26
|
+
const handleToggleClick = (event) => {
|
|
27
|
+
if (disabled)
|
|
28
|
+
return;
|
|
29
|
+
const newState = !toggled;
|
|
30
|
+
if (!isControlled) {
|
|
31
|
+
setInternalToggled(newState);
|
|
32
|
+
}
|
|
33
|
+
onClick?.({ toggled: newState, event });
|
|
34
|
+
};
|
|
35
|
+
const baseClasses = unstyled
|
|
36
|
+
? className
|
|
37
|
+
: buildClassesByJoining("inline-block px-4 py-2 font-medium transition-colors duration-200", scaleOnHover && smoothSelect && `${variantClasses.primary} ${variantClasses.smoothOnly}`, scaleOnHover && !smoothSelect && variantClasses.primary, !scaleOnHover && smoothSelect && variantClasses.smoothOnly, roundedClasses[rounded], {
|
|
38
|
+
"opacity-50 cursor-not-allowed pointer-events-none": disabled,
|
|
39
|
+
"cursor-pointer": !disabled,
|
|
40
|
+
}, toggled
|
|
41
|
+
? "brightness-110 ring-2 ring-white"
|
|
42
|
+
: "brightness-80 text-white", className);
|
|
43
|
+
return (_jsx("button", { className: baseClasses, onClick: handleToggleClick, disabled: disabled, children: label }));
|
|
44
|
+
};
|
|
45
|
+
export default Select;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface SwitchProps {
|
|
2
|
+
description: string;
|
|
3
|
+
color?: string;
|
|
4
|
+
bgColor?: string;
|
|
5
|
+
ringColor?: string;
|
|
6
|
+
selected?: boolean;
|
|
7
|
+
simpleToggle?: boolean;
|
|
8
|
+
shortToggle?: boolean;
|
|
9
|
+
toggleIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const SwitchToggle: ({ description, color, bgColor, ringColor, selected, simpleToggle, shortToggle, toggleIcon, }: SwitchProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
export default SwitchToggle;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Switch } from "@headlessui/react";
|
|
5
|
+
const SwitchToggle = ({ description, color = "#3b82f6", // default blue
|
|
6
|
+
bgColor = "#e5e7eb", // default gray-200
|
|
7
|
+
ringColor = "#2563eb", // default blue-600
|
|
8
|
+
selected = false, simpleToggle, shortToggle, toggleIcon, }) => {
|
|
9
|
+
const [enabled, setEnabled] = useState(selected);
|
|
10
|
+
if (simpleToggle) {
|
|
11
|
+
return (_jsxs(Switch, { checked: enabled, onChange: setEnabled, style: {
|
|
12
|
+
backgroundColor: enabled ? color : bgColor,
|
|
13
|
+
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
|
+
transform: enabled ? "translateX(1.25rem)" : "translateX(0)",
|
|
16
|
+
} })] }));
|
|
17
|
+
}
|
|
18
|
+
if (shortToggle) {
|
|
19
|
+
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: {
|
|
20
|
+
backgroundColor: enabled ? color : bgColor,
|
|
21
|
+
} }), _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: {
|
|
22
|
+
transform: enabled ? "translateX(1.25rem)" : "translateX(0)",
|
|
23
|
+
} })] }));
|
|
24
|
+
}
|
|
25
|
+
if (toggleIcon) {
|
|
26
|
+
return (_jsxs(Switch, { checked: enabled, onChange: setEnabled, style: {
|
|
27
|
+
backgroundColor: enabled ? color : bgColor,
|
|
28
|
+
boxShadow: enabled ? `0 0 0 2px ${ringColor}` : "none",
|
|
29
|
+
}, 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: {
|
|
30
|
+
transform: enabled ? "translateX(1.25rem)" : "translateX(0)",
|
|
31
|
+
}, children: [_jsx("span", { "aria-hidden": "true", className: "absolute inset-0 flex size-full items-center justify-center transition-opacity duration-200 ease-in group-data-checked:opacity-0 group-data-checked:duration-100 group-data-checked:ease-out", style: { opacity: enabled ? 0 : 1 }, children: _jsx("svg", { fill: "none", viewBox: "0 0 12 12", className: "size-3 text-gray-400", children: _jsx("path", { d: "M4 8l2-2m0 0l2-2M6 6L4 4m2 2l2 2", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("span", { "aria-hidden": "true", className: "absolute inset-0 flex size-full items-center justify-center transition-opacity duration-100 ease-out group-data-checked:opacity-100 group-data-checked:duration-200 group-data-checked:ease-in", style: { opacity: enabled ? 1 : 0, color: color }, children: _jsx("svg", { fill: "currentColor", viewBox: "0 0 12 12", className: "size-3", children: _jsx("path", { d: "M3.707 5.293a1 1 0 00-1.414 1.414l1.414-1.414zM5 8l-.707.707a1 1 0 001.414 0L5 8zm4.707-3.293a1 1 0 00-1.414-1.414l1.414 1.414zm-7.414 2l2 2 1.414-1.414-2-2-1.414 1.414zm3.414 2l4-4-1.414-1.414-4 4 1.414 1.414z" }) }) })] })] }));
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
};
|
|
35
|
+
export default SwitchToggle;
|
|
@@ -36,11 +36,11 @@ function CategoryNode({ term, allTerms, level, activeTerm, parentIds, onTermClic
|
|
|
36
36
|
}, [term.id, parentIds, activeTerm.id]);
|
|
37
37
|
const isActive = term.id === activeTerm.id;
|
|
38
38
|
const isParent = parentIds?.includes(term.id) && !isActive;
|
|
39
|
-
return (_jsxs("div", { className: "py-1", children: [_jsxs("div", { className: `
|
|
40
|
-
flex w-full items-center justify-between text-left text-sm border-l-2 border-transparent
|
|
41
|
-
transition-colors duration-200 cursor-pointer select-none
|
|
42
|
-
${isActive ? `font-semibold underline border-l-2 ${colorClassName}` : ''}
|
|
43
|
-
${isParent ? `font-medium ` : 'text-gray-900'}
|
|
39
|
+
return (_jsxs("div", { className: "py-1", children: [_jsxs("div", { className: `
|
|
40
|
+
flex w-full items-center justify-between text-left text-sm border-l-2 border-transparent
|
|
41
|
+
transition-colors duration-200 cursor-pointer select-none
|
|
42
|
+
${isActive ? `font-semibold underline border-l-2 ${colorClassName}` : ''}
|
|
43
|
+
${isParent ? `font-medium ` : 'text-gray-900'}
|
|
44
44
|
`, style: { paddingLeft: `${level * 16}px` }, onClick: () => {
|
|
45
45
|
if (hasChildren)
|
|
46
46
|
setIsOpen((prev) => !prev);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface InstructionProps {
|
|
2
|
+
id?: number;
|
|
3
|
+
title?: string;
|
|
4
|
+
hasContactIcons?: boolean;
|
|
5
|
+
description?: string;
|
|
6
|
+
phoneNumber?: string;
|
|
7
|
+
email?: string;
|
|
8
|
+
fontClass?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const Instruction: ({ id, title, hasContactIcons, description, phoneNumber, email, fontClass, }: InstructionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { EnvelopeIcon, PhoneIcon } from "@heroicons/react/24/outline";
|
|
3
|
+
export const Instruction = ({ id, title, hasContactIcons, description, phoneNumber = "+420 000 000 000", email = "info@rezidencevavrineckaka.cz", fontClass = "", }) => {
|
|
4
|
+
return (_jsx("div", { className: `flex flex-col gap-4 py-6 border-b border-gray-200 ${fontClass}`, children: _jsx("div", { className: "flex items-start gap-4", children: _jsxs("div", { className: `flex flex-col gap-4 w-full ${fontClass}`, children: [_jsxs("h2", { className: `text-xl font-bold text-gray-800 ${fontClass}`, children: [_jsxs("span", { className: "mr-4", children: [id, "."] }), title] }), hasContactIcons ? (_jsxs("div", { className: "flex flex-col sm:flex-row sm:gap-6", children: [_jsxs("div", { className: `flex flex-col gap-4 border-l-2 border-[#C9A96E] pl-8 min-w-[220px] text-gray-800 ${fontClass}`, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(PhoneIcon, { className: "w-5 h-5" }), _jsx("span", { children: phoneNumber })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(EnvelopeIcon, { className: "w-5 h-5" }), _jsx("span", { children: email })] })] }), _jsx("p", { className: `text-gray-600 max-w-3xl ${fontClass}`, children: description })] })) : (_jsx("p", { className: `text-gray-600 max-w-3xl ${fontClass}`, children: description }))] }) }) }));
|
|
5
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface InstructionData {
|
|
2
|
+
id: number;
|
|
3
|
+
title: string;
|
|
4
|
+
hasContactIcons?: boolean;
|
|
5
|
+
phoneNumber?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
interface InstructionsListProps {
|
|
10
|
+
instructions: InstructionData[];
|
|
11
|
+
}
|
|
12
|
+
export declare const InstructionsList: ({ instructions }: InstructionsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Instruction } from "./Instruction";
|
|
3
|
+
export const InstructionsList = ({ instructions }) => {
|
|
4
|
+
return (_jsx("div", { className: "space-y-6", children: instructions.map((item) => (_jsx(Instruction, { id: item.id, title: item.title, hasContactIcons: item.hasContactIcons, phoneNumber: item.phoneNumber, email: item.email, description: item.description }, item.id))) }));
|
|
5
|
+
};
|
|
@@ -33,6 +33,8 @@ export type ProductCardProps = {
|
|
|
33
33
|
renderHeader?: (product: Product) => React.ReactNode;
|
|
34
34
|
actionButton?: React.ReactNode;
|
|
35
35
|
showAddButton?: boolean;
|
|
36
|
+
showAddButtonOnHover?: boolean;
|
|
37
|
+
borderOnHoverClassName?: string;
|
|
36
38
|
currentQuantity: number;
|
|
37
39
|
onQuantityChange?: (product: Product, quantity: number) => void;
|
|
38
40
|
addButtonIcon?: React.ReactNode;
|
|
@@ -64,4 +66,4 @@ export type ProductCardProps = {
|
|
|
64
66
|
deleteButtonSize?: 'sm' | 'md' | 'lg';
|
|
65
67
|
deleteButtonPosition?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
66
68
|
};
|
|
67
|
-
export declare const ProductCard: ({ product, href, className, imageClassName, contentClassName, titleClassName, colorClassName, priceClassName, descriptionClassName, badgeClassName, aspectRatio, imagePosition, imageObjectFit, layout, hoverEffect, renderBadges, renderColor, renderDescription, elevationLevel, rounded, titleLines, onCardClick, onImageClick, renderFooter, renderHeader, renderVariationName, actionButton, showAddButton, currentQuantity, onQuantityChange, addButtonIcon, maxQuantity, controlsClassName, buttonClassName, quantityClassName, customAddButton, disabled, locale, cartMode, showSpinnerInAdd, showWishlistButton, isInWishlist, onWishlistToggle, wishlistButtonClassName, isWishlistPending, enableMultipleWishlists, wishlists, onAddToWishlist, onRemoveFromWishlist, onCreateWishlist, wishlistDropdownClassName, productWishlistIds, showDeleteButton, onDelete, deleteButtonClassName, isDeletePending, deleteButtonSize, deleteButtonPosition, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
export declare const ProductCard: ({ product, href, className, imageClassName, contentClassName, titleClassName, colorClassName, priceClassName, descriptionClassName, badgeClassName, aspectRatio, imagePosition, imageObjectFit, layout, hoverEffect, renderBadges, renderColor, renderDescription, elevationLevel, rounded, titleLines, onCardClick, onImageClick, renderFooter, renderHeader, renderVariationName, actionButton, showAddButton, showAddButtonOnHover, borderOnHoverClassName, currentQuantity, onQuantityChange, addButtonIcon, maxQuantity, controlsClassName, buttonClassName, quantityClassName, customAddButton, disabled, locale, cartMode, showSpinnerInAdd, showWishlistButton, isInWishlist, onWishlistToggle, wishlistButtonClassName, isWishlistPending, enableMultipleWishlists, wishlists, onAddToWishlist, onRemoveFromWishlist, onCreateWishlist, wishlistDropdownClassName, productWishlistIds, showDeleteButton, onDelete, deleteButtonClassName, isDeletePending, deleteButtonSize, deleteButtonPosition, }: ProductCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,7 +13,7 @@ import LikeButton from '../wishlist/LikeButton';
|
|
|
13
13
|
import DeleteButton from '../wishlist/DeleteButton';
|
|
14
14
|
export const ProductCard = ({ product, href, className, imageClassName, contentClassName, titleClassName, colorClassName, priceClassName, descriptionClassName, badgeClassName, aspectRatio = 'square', imagePosition = 'center', imageObjectFit = 'cover', layout = 'default', hoverEffect = 'opacity', renderBadges = true, renderColor = true, renderDescription = false, elevationLevel = 0, rounded = 'md', titleLines = 1, onCardClick, onImageClick, renderFooter, renderHeader, renderVariationName = false, actionButton,
|
|
15
15
|
// Add to cart functionality
|
|
16
|
-
showAddButton = false, currentQuantity = 0, onQuantityChange, addButtonIcon = _jsx(ShoppingBagIcon, { className: "h-4 w-4" }), maxQuantity = 99, controlsClassName = '', buttonClassName = '', quantityClassName = '', customAddButton, disabled = false, locale, cartMode = 'full', showSpinnerInAdd = false,
|
|
16
|
+
showAddButton = false, showAddButtonOnHover = false, borderOnHoverClassName = '', currentQuantity = 0, onQuantityChange, addButtonIcon = _jsx(ShoppingBagIcon, { className: "h-4 w-4" }), maxQuantity = 99, controlsClassName = '', buttonClassName = '', quantityClassName = '', customAddButton, disabled = false, locale, cartMode = 'full', showSpinnerInAdd = false,
|
|
17
17
|
// Wishlist functionality
|
|
18
18
|
showWishlistButton = false, isInWishlist = false, onWishlistToggle, wishlistButtonClassName = '', isWishlistPending = false,
|
|
19
19
|
// Multiple wishlists support
|
|
@@ -94,7 +94,7 @@ showDeleteButton = false, onDelete, deleteButtonClassName = '', isDeletePending
|
|
|
94
94
|
3: 'line-clamp-3',
|
|
95
95
|
}[titleLines];
|
|
96
96
|
// Create layout class
|
|
97
|
-
const layoutClass = layout === 'horizontal' ? 'flex gap-4' : '';
|
|
97
|
+
const layoutClass = layout === 'horizontal' ? 'flex gap-4' : 'flex flex-col';
|
|
98
98
|
const imageLayoutClass = layout === 'horizontal' ? 'w-1/3' : 'w-full';
|
|
99
99
|
const contentLayoutClass = layout === 'horizontal' ? 'w-2/3' : 'w-full';
|
|
100
100
|
const compactClass = layout === 'compact' ? 'space-y-1' : 'space-y-2';
|
|
@@ -152,6 +152,6 @@ showDeleteButton = false, onDelete, deleteButtonClassName = '', isDeletePending
|
|
|
152
152
|
onDelete(product);
|
|
153
153
|
}
|
|
154
154
|
}, [onDelete, product]);
|
|
155
|
-
return (_jsxs("div", { className: buildClassesByJoining('group relative', layoutClass, elevationClass, onCardClick ? 'cursor-pointer' : '', className), onClick: handleCardClick, children: [renderHeader && renderHeader(product), _jsxs("div", { className: buildClassesByJoining(imageLayoutClass, 'relative'), children: [product.badges && renderBadges && (_jsx("div", { className: "absolute top-2 left-2 z-10 flex flex-wrap gap-1", children: product.badges.map((badge, index) => (_jsx(Badge, { color: badge.color, children: badge.text }, index))) })), showDeleteButton ? (_jsx(DeleteButton, { show: showDeleteButton, onDelete: handleDelete, deleteButtonClassName: deleteButtonClassName, isDeletePending: isDeletePending, size: deleteButtonSize, position: deleteButtonPosition })) : (_jsx(LikeButton, { show: showWishlistButton, enableMultiple: enableMultipleWishlists, isInWishlist: isInWishlist, wishlists: wishlists, productWishlistIds: productWishlistIds, wishlistButtonClassName: wishlistButtonClassName, wishlistDropdownClassName: wishlistDropdownClassName, isWishlistPending: isWishlistPending, handleAddToWishlist: handleAddToWishlist, handleRemoveFromWishlist: handleRemoveFromWishlist, handleCreateNewWishlist: handleCreateNewWishlist, handleWishlistToggle: handleWishlistToggle })), _jsx("img", { alt: product.variation_images[0]?.alt, src: product.variation_images[0]?.href, className: buildClassesByJoining(aspectRatioClass, objectFitClass, objectPositionClass, hoverEffect !== 'none' ? hoverClass : '', roundedClass, 'bg-gray-200', onImageClick ? 'cursor-pointer' : '', imageClassName), onClick: handleImageClick }), _jsx("div", { children: _jsx(AddToCart, { buttonClassName: buttonClassName, addButtonIcon: _jsx(ShoppingBagIcon, { className: "h-4 w-4" }), handleAddToCart: handleAddToCart, showAddButton: true, disabled: disabled }) })] }), _jsxs("div", { className: buildClassesByJoining('mt-4', contentLayoutClass, compactClass, contentClassName), children: [_jsxs("div", { className: "flex flex-col justify-between
|
|
155
|
+
return (_jsxs("div", { className: buildClassesByJoining('group relative h-full', layoutClass, elevationClass, onCardClick ? 'cursor-pointer' : '', borderOnHoverClassName, className), onClick: handleCardClick, children: [renderHeader && renderHeader(product), _jsxs("div", { className: buildClassesByJoining(imageLayoutClass, 'relative'), children: [product.badges && renderBadges && (_jsx("div", { className: "absolute top-2 left-2 z-10 flex flex-wrap gap-1", children: product.badges.map((badge, index) => (_jsx(Badge, { color: badge.color, children: badge.text }, index))) })), showDeleteButton ? (_jsx(DeleteButton, { show: showDeleteButton, onDelete: handleDelete, deleteButtonClassName: deleteButtonClassName, isDeletePending: isDeletePending, size: deleteButtonSize, position: deleteButtonPosition })) : (_jsx(LikeButton, { show: showWishlistButton, enableMultiple: enableMultipleWishlists, isInWishlist: isInWishlist, wishlists: wishlists, productWishlistIds: productWishlistIds, wishlistButtonClassName: wishlistButtonClassName, wishlistDropdownClassName: wishlistDropdownClassName, isWishlistPending: isWishlistPending, handleAddToWishlist: handleAddToWishlist, handleRemoveFromWishlist: handleRemoveFromWishlist, handleCreateNewWishlist: handleCreateNewWishlist, handleWishlistToggle: handleWishlistToggle })), _jsx("img", { alt: product.variation_images[0]?.alt, src: product.variation_images[0]?.href, className: buildClassesByJoining(aspectRatioClass, objectFitClass, objectPositionClass, hoverEffect !== 'none' ? hoverClass : '', roundedClass, 'bg-gray-200', onImageClick ? 'cursor-pointer' : '', imageClassName), onClick: handleImageClick }), _jsx("div", { className: showAddButtonOnHover === true ? 'opacity-0 group-hover:opacity-100 transition-opacity duration-300' : '', children: _jsx(AddToCart, { buttonClassName: buttonClassName, addButtonIcon: _jsx(ShoppingBagIcon, { className: "h-4 w-4" }), handleAddToCart: handleAddToCart, showAddButton: true, disabled: disabled }) })] }), _jsxs("div", { className: buildClassesByJoining('mt-4 h-full flex flex-col justify-between grow', contentLayoutClass, compactClass, contentClassName), 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', titleLineClampClass, titleClassName), children: _jsxs(Button, { asLink: true, unstyled: true, href: href, children: [!onCardClick && (_jsx("span", { "aria-hidden": "true", className: "absolute inset-0" })), product.product_name] }) }), renderVariationName && product.variation_name && (_jsx(Heading, { className: 'text-md', level: 4, children: product.variation_name })), renderDescription && product.description && (_jsx("p", { className: buildClassesByJoining('mt-1 text-sm text-gray-500 line-clamp-2', descriptionClassName), children: product.description }))] }), _jsxs("div", { className: 'flex flex-col justify-between', children: [_jsx("p", { className: buildClassesByJoining('text-md font-bold text-gray-900', priceClassName), children: formatPrice(product.price, locale) }), _jsx("p", { className: buildClassesByJoining('text-sm font-normal text-gray-900 line-through', priceClassName), children: product?.discountPercent != null && product.discountPercent > 0 &&
|
|
156
156
|
formatPrice(product.price / (1 - product.discountPercent / 100), locale) })] })] }), actionButton && _jsx("div", { className: "mt-2", children: actionButton }), renderFooter && renderFooter(product)] })] }));
|
|
157
157
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { EnvelopeIcon, PhoneIcon, UserIcon, ChatBubbleLeftIcon, BuildingOffice2Icon, } from "@heroicons/react/24/outline";
|
|
5
|
+
export default function ContactForm({ title, color = "gray", }) {
|
|
6
|
+
const [agreed, setAgreed] = useState(false);
|
|
7
|
+
const colorMap = {
|
|
8
|
+
white: {
|
|
9
|
+
background: "bg-white",
|
|
10
|
+
text: "text-gray-800",
|
|
11
|
+
border: "border-gray-400",
|
|
12
|
+
icon: "text-gray-500",
|
|
13
|
+
checkbox: "accent-gray-700",
|
|
14
|
+
button: "border border-white bg-[#2c2f36] text-white",
|
|
15
|
+
titleStyle: "text-3xl font-sans uppercase text-center",
|
|
16
|
+
},
|
|
17
|
+
gray: {
|
|
18
|
+
background: "bg-[#2c2f36]",
|
|
19
|
+
text: "text-white",
|
|
20
|
+
border: "border-gray-400",
|
|
21
|
+
icon: "text-gray-400",
|
|
22
|
+
checkbox: "accent-white",
|
|
23
|
+
button: "border border-white bg-[#2c2f36] text-white",
|
|
24
|
+
titleStyle: "text-3xl font-sans uppercase text-center",
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const styles = colorMap[color] ?? colorMap.gray;
|
|
28
|
+
return (_jsxs("form", { className: `${styles.background} ${styles.text} p-6 md:p-10 rounded-md w-[400px] md:w-[500px] mx-auto space-y-6`, children: [title && (_jsxs("h2", { className: styles.titleStyle, children: [title.split(" ").slice(0, -1).join(" "), " ", _jsx("span", { className: "text-[#c26b38]", children: title.split(" ").slice(-1) })] })), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "relative", children: [_jsx(UserIcon, { className: `absolute left-2 top-1/2 transform -translate-y-1/2 h-5 w-5 ${styles.icon}` }), _jsx("input", { type: "text", className: `bg-transparent border-b ${styles.border} focus:outline-none pl-8 py-2 w-full placeholder-gray-400`, placeholder: "Jm\u00E9no", required: true })] }), _jsxs("div", { className: "relative", children: [_jsx(BuildingOffice2Icon, { className: `absolute left-2 top-1/2 transform -translate-y-1/2 h-5 w-5 ${styles.icon}` }), _jsx("input", { type: "text", className: `bg-transparent border-b ${styles.border} focus:outline-none pl-8 py-2 w-full placeholder-gray-400`, placeholder: "Firma" })] }), _jsxs("div", { className: "relative", children: [_jsx(EnvelopeIcon, { className: `absolute left-2 top-1/2 transform -translate-y-1/2 h-5 w-5 ${styles.icon}` }), _jsx("input", { type: "email", className: `bg-transparent border-b ${styles.border} focus:outline-none pl-8 py-2 w-full placeholder-gray-400`, placeholder: "Email", required: true })] }), _jsxs("div", { className: "relative", children: [_jsx(PhoneIcon, { className: `absolute left-2 top-1/2 transform -translate-y-1/2 h-5 w-5 ${styles.icon}` }), _jsx("input", { type: "tel", className: `bg-transparent border-b ${styles.border} focus:outline-none pl-8 py-2 w-full placeholder-gray-400`, placeholder: "Telefon", required: true })] }), _jsxs("div", { className: "md:col-span-2 relative", children: [_jsx(ChatBubbleLeftIcon, { className: `absolute left-2 top-3 h-5 w-5 ${styles.icon}` }), _jsx("textarea", { className: `bg-transparent border-b ${styles.border} focus:outline-none pl-8 py-2 w-full placeholder-gray-400`, placeholder: "Zpr\u00E1va..." })] })] }), _jsxs("div", { className: "flex items-center space-x-3", children: [_jsx("input", { id: "agree", type: "checkbox", checked: agreed, onChange: () => setAgreed(!agreed), className: `bg-transparent border ${styles.border} rounded-sm ${styles.checkbox}` }), _jsx("label", { htmlFor: "agree", className: "text-sm", children: "Souhlas s pou\u017Eit\u00EDm osobn\u00EDch \u00FAdaj\u016F" })] }), _jsx("button", { type: "submit", className: `px-6 py-2 uppercase text-sm ${styles.button}`, children: "ODESLAT" })] }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
export const Footer = ({ navigation, simpleCentered, simpleSocialLinks, fourColumnVariant, fourColumnVariantMap, logoSrc, mapPath, mapWidth, mapHeight, }) => {
|
|
4
|
+
if (simpleCentered && navigation) {
|
|
5
|
+
return (_jsx("footer", { className: "bg-white", children: _jsxs("div", { className: "mx-auto max-w-7xl overflow-hidden px-6 py-20 sm:py-24 lg:px-8", children: [_jsx("nav", { "aria-label": "Footer", className: "-mb-6 flex flex-wrap justify-center gap-x-12 gap-y-3 text-sm/6", children: navigation.main.map((item) => (_jsx("a", { href: item.href, className: "text-gray-600 hover:text-gray-900", children: item.name }, item.name))) }), _jsx("div", { className: "mt-16 flex justify-center gap-x-10", children: navigation.social.map((item) => (_jsxs("a", { href: item.href, className: "text-gray-600 hover:text-gray-800", children: [_jsx("span", { className: "sr-only", children: item.name }), _jsx(item.icon, { "aria-hidden": "true", className: "size-6" })] }, item.name))) }), _jsx("p", { className: "mt-10 text-center text-sm/6 text-gray-600", children: "\u00A9 2024 Your Company, Inc. All rights reserved." })] }) }));
|
|
6
|
+
}
|
|
7
|
+
if (simpleSocialLinks && navigation) {
|
|
8
|
+
return (_jsx("footer", { className: "bg-white", children: _jsxs("div", { className: "mx-auto max-w-7xl px-6 py-12 md:flex md:items-center md:justify-between lg:px-8", children: [_jsx("div", { className: "flex justify-center gap-x-6 md:order-2", children: navigation.social.map((item) => (_jsxs("a", { href: item.href, className: "text-gray-600 hover:text-gray-800", children: [_jsx("span", { className: "sr-only", children: item.name }), _jsx(item.icon, { "aria-hidden": "true", className: "size-6" })] }, item.name))) }), _jsx("p", { className: "mt-8 text-center text-sm/6 text-gray-600 md:order-1 md:mt-0", children: "\u00A9 2024 Your Company, Inc. All rights reserved." })] }) }));
|
|
9
|
+
}
|
|
10
|
+
if (fourColumnVariant && navigation) {
|
|
11
|
+
return (_jsx("footer", { className: "bg-white", children: _jsx("div", { className: "mx-auto max-w-7xl px-6 pt-16 pb-8 sm:pt-24 lg:px-8 lg:pt-32", children: _jsxs("div", { className: "xl:grid xl:grid-cols-3 xl:gap-8", children: [_jsx("img", { alt: "Company name", src: logoSrc, className: "h-9" }), _jsxs("div", { className: "mt-16 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0", children: [_jsxs("div", { className: "md:grid md:grid-cols-2 md:gap-8", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Solutions" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.solutions.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] }), _jsxs("div", { className: "mt-10 md:mt-0", children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Support" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.support.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] })] }), _jsxs("div", { className: "md:grid md:grid-cols-2 md:gap-8", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Company" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.company.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] }), _jsxs("div", { className: "mt-10 md:mt-0", children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Legal" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.legal.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] })] })] })] }) }) }));
|
|
12
|
+
}
|
|
13
|
+
if (fourColumnVariantMap && navigation) {
|
|
14
|
+
return (_jsx("footer", { className: "bg-white", children: _jsx("div", { className: "mx-auto max-w-7xl px-6 pt-16 pb-8 sm:pt-24 lg:px-8 lg:pt-32", children: _jsxs("div", { className: "flex flex-col lg:flex-row lg:justify-between lg:items-start gap-12", children: [_jsx("div", { className: "flex-shrink-0", children: _jsx("img", { alt: "Company name", src: logoSrc, className: "h-9" }) }), _jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-8 flex-grow", children: [_jsxs("div", { children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Solutions" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.solutions.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Support" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.support.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Company" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.company.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm/6 font-semibold text-gray-900", children: "Legal" }), _jsx("ul", { role: "list", className: "mt-6 space-y-4", children: navigation.legal.map((item) => (_jsx("li", { children: _jsx("a", { href: item.href, className: "text-sm/6 text-gray-600 hover:text-gray-900", children: item.name }) }, item.name))) })] })] }), _jsx("div", { className: "flex-shrink-0", children: _jsx("iframe", { src: mapPath, width: mapWidth, height: mapHeight, style: { border: 0 }, allowFullScreen: true, loading: "lazy", referrerPolicy: "no-referrer-when-downgrade" }) })] }) }) }));
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SVGProps, JSX } from "react";
|
|
2
|
+
export interface FooterLinkItem {
|
|
3
|
+
name: string;
|
|
4
|
+
href: string;
|
|
5
|
+
}
|
|
6
|
+
export interface FooterSocialItem {
|
|
7
|
+
name: string;
|
|
8
|
+
href: string;
|
|
9
|
+
icon: (props: SVGProps<SVGSVGElement>) => JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export interface FooterFourColumnItem {
|
|
12
|
+
title: string;
|
|
13
|
+
links: FooterLinkItem[];
|
|
14
|
+
}
|
|
15
|
+
export interface FooterFourColumnMapItem {
|
|
16
|
+
[key: string]: FooterLinkItem[];
|
|
17
|
+
}
|
|
18
|
+
export interface FooterNavigation {
|
|
19
|
+
main: FooterLinkItem[];
|
|
20
|
+
social: FooterSocialItem[];
|
|
21
|
+
fourclmn: FooterFourColumnItem[];
|
|
22
|
+
solutions: FooterLinkItem[];
|
|
23
|
+
support: FooterLinkItem[];
|
|
24
|
+
company: FooterLinkItem[];
|
|
25
|
+
legal: FooterLinkItem[];
|
|
26
|
+
fourclmnmap: FooterFourColumnMapItem[];
|
|
27
|
+
}
|
|
28
|
+
export interface FooterProps {
|
|
29
|
+
navigation?: FooterNavigation;
|
|
30
|
+
simpleCentered?: boolean;
|
|
31
|
+
simpleSocialLinks?: boolean;
|
|
32
|
+
fourColumnVariant?: boolean;
|
|
33
|
+
fourColumnVariantMap?: boolean;
|
|
34
|
+
logoSrc?: string;
|
|
35
|
+
mapPath?: string;
|
|
36
|
+
mapWidth?: number;
|
|
37
|
+
mapHeight?: number;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type WebSectionProps = {
|
|
2
|
+
imagePosition?: "left" | "right";
|
|
3
|
+
imagePath?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
paragraphs?: string[];
|
|
7
|
+
fontFamilyClass?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function WebSection({ imagePosition, imagePath, title, subtitle, paragraphs, fontFamilyClass, }: WebSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default WebSection;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from "next/image";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
function WebSection({ imagePosition, imagePath, title, subtitle, paragraphs = [], fontFamilyClass, }) {
|
|
6
|
+
const isImageLeft = imagePosition === "left";
|
|
7
|
+
return (_jsxs("div", { className: "flex flex-col md:flex-row bg-white w-full", children: [_jsx("div", { className: clsx("w-full md:w-1/2", isImageLeft ? "order-1" : "order-2"), children: _jsx(Image, { src: imagePath || "/placeholder.jpg", alt: "Stylov\u00E9 bydlen\u00ED", width: 1000, height: 600, className: "object-cover w-full h-full" }) }), _jsxs("div", { className: clsx(fontFamilyClass, "w-full md:w-1/2 p-10 flex flex-col justify-center", isImageLeft ? "order-2" : "order-1"), children: [_jsx("h2", { className: "text-4xl font-bold mb-2", children: title }), _jsx("h3", { className: "text-3xl font-bold text-[#9B5726] mb-4", children: subtitle }), paragraphs.map((text, index) => (_jsx("p", { className: clsx("text-gray-700", index !== paragraphs.length - 1 && "mb-4"), children: text }, index)))] })] }));
|
|
8
|
+
}
|
|
9
|
+
export default WebSection;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BannerItem } from '@q2devel/q2-core';
|
|
3
|
-
export type ControlsType = 'arrows' | 'dots' | 'both' | 'none';
|
|
4
|
-
export type BannerProps = {
|
|
5
|
-
items: BannerItem[];
|
|
6
|
-
height?: 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'auto';
|
|
7
|
-
autoplay?: boolean;
|
|
8
|
-
autoplayInterval?: number;
|
|
9
|
-
controls?: ControlsType;
|
|
10
|
-
overlayStyle?: 'dark' | 'light' | 'gradient' | 'none';
|
|
11
|
-
textAlignment?: 'left' | 'center' | 'right';
|
|
12
|
-
textPosition?: 'top' | 'center' | 'bottom';
|
|
13
|
-
className?: string;
|
|
14
|
-
imageClassName?: string;
|
|
15
|
-
titleClassName?: string;
|
|
16
|
-
subtitleClassName?: string;
|
|
17
|
-
buttonClassName?: string;
|
|
18
|
-
indicatorsClassName?: string;
|
|
19
|
-
controlsClassName?: string;
|
|
20
|
-
contentClassName?: string;
|
|
21
|
-
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
22
|
-
buttonRounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
23
|
-
arrowBackgroundless?: boolean;
|
|
24
|
-
animation?: 'slide' | 'fade' | 'zoom' | 'none';
|
|
25
|
-
animationDuration?: number;
|
|
26
|
-
pauseOnHover?: boolean;
|
|
27
|
-
infiniteLoop?: boolean;
|
|
28
|
-
objectFit?: 'cover' | 'contain' | 'fill' | 'none';
|
|
29
|
-
objectPosition?: 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
30
|
-
renderItem?: (item: BannerItem, index: number) => ReactNode;
|
|
31
|
-
renderControls?: (goToNext: () => void, goToPrev: () => void) => ReactNode;
|
|
32
|
-
renderIndicators?: (current: number, total: number, goToSlide: (index: number) => void) => ReactNode;
|
|
33
|
-
onSlideChange?: (currentIndex: number, previousIndex: number) => void;
|
|
34
|
-
withOverlay?: boolean;
|
|
35
|
-
overlayOpacity?: number;
|
|
36
|
-
};
|
|
37
|
-
export declare const Banner: ({ items, height, autoplay, autoplayInterval, controls, overlayStyle, textAlignment, textPosition, className, imageClassName, titleClassName, subtitleClassName, buttonClassName, indicatorsClassName, controlsClassName, contentClassName, rounded, buttonRounded, arrowBackgroundless, animation, animationDuration, pauseOnHover, infiniteLoop, objectFit, objectPosition, renderItem, renderControls, renderIndicators, onSlideChange, withOverlay, overlayOpacity, }: BannerProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BannerItem } from '@q2devel/q2-core';
|
|
3
|
+
export type ControlsType = 'arrows' | 'dots' | 'both' | 'none';
|
|
4
|
+
export type BannerProps = {
|
|
5
|
+
items: BannerItem[];
|
|
6
|
+
height?: 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'auto';
|
|
7
|
+
autoplay?: boolean;
|
|
8
|
+
autoplayInterval?: number;
|
|
9
|
+
controls?: ControlsType;
|
|
10
|
+
overlayStyle?: 'dark' | 'light' | 'gradient' | 'none';
|
|
11
|
+
textAlignment?: 'left' | 'center' | 'right';
|
|
12
|
+
textPosition?: 'top' | 'center' | 'bottom';
|
|
13
|
+
className?: string;
|
|
14
|
+
imageClassName?: string;
|
|
15
|
+
titleClassName?: string;
|
|
16
|
+
subtitleClassName?: string;
|
|
17
|
+
buttonClassName?: string;
|
|
18
|
+
indicatorsClassName?: string;
|
|
19
|
+
controlsClassName?: string;
|
|
20
|
+
contentClassName?: string;
|
|
21
|
+
rounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
22
|
+
buttonRounded?: 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
23
|
+
arrowBackgroundless?: boolean;
|
|
24
|
+
animation?: 'slide' | 'fade' | 'zoom' | 'none';
|
|
25
|
+
animationDuration?: number;
|
|
26
|
+
pauseOnHover?: boolean;
|
|
27
|
+
infiniteLoop?: boolean;
|
|
28
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'none';
|
|
29
|
+
objectPosition?: 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
30
|
+
renderItem?: (item: BannerItem, index: number) => ReactNode;
|
|
31
|
+
renderControls?: (goToNext: () => void, goToPrev: () => void) => ReactNode;
|
|
32
|
+
renderIndicators?: (current: number, total: number, goToSlide: (index: number) => void) => ReactNode;
|
|
33
|
+
onSlideChange?: (currentIndex: number, previousIndex: number) => void;
|
|
34
|
+
withOverlay?: boolean;
|
|
35
|
+
overlayOpacity?: number;
|
|
36
|
+
};
|
|
37
|
+
export declare const Banner: ({ items, height, autoplay, autoplayInterval, controls, overlayStyle, textAlignment, textPosition, className, imageClassName, titleClassName, subtitleClassName, buttonClassName, indicatorsClassName, controlsClassName, contentClassName, rounded, buttonRounded, arrowBackgroundless, animation, animationDuration, pauseOnHover, infiniteLoop, objectFit, objectPosition, renderItem, renderControls, renderIndicators, onSlideChange, withOverlay, overlayOpacity, }: BannerProps) => import("react/jsx-runtime").JSX.Element | null;
|