@q2devel/q2-storybook 1.0.68 → 1.0.70
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HorizontalTabProps } from '@/components/Web/tabs/HorizontalTab';
|
|
2
|
-
import { PriceFormatOptions } from '@/utils/generalHelperFunction';
|
|
3
1
|
import { Product, ProductVariation } from '@q2devel/q2-core';
|
|
2
|
+
import { PriceFormatOptions } from '../../../utils/generalHelperFunction';
|
|
3
|
+
import { HorizontalTabProps } from '../../Web/tabs/HorizontalTab';
|
|
4
4
|
export type ProductDetail = {
|
|
5
5
|
name: string;
|
|
6
6
|
items: string[];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import Button from '@/components/Base/button/Button';
|
|
4
|
-
import Heading from '@/components/Base/heading/Heading';
|
|
5
|
-
import { HorizontalTab } from '@/components/Web/tabs/HorizontalTab';
|
|
6
|
-
import { formatPercentage, formatPrice, formatPriceForHTML, formatPriceString, } from '@/utils/generalHelperFunction';
|
|
7
3
|
import { Tab, TabGroup, TabList, TabPanel, TabPanels } from '@headlessui/react';
|
|
8
4
|
import { MinusIcon, PlusIcon } from '@heroicons/react/24/outline';
|
|
9
5
|
import { useRef, useState } from 'react';
|
|
6
|
+
import { formatPercentage, formatPriceForHTML, formatPriceString, } from '../../../utils/generalHelperFunction';
|
|
10
7
|
import { buildClassesByJoining } from '../../../utils/StyleHelper';
|
|
8
|
+
import Button from '../../Base/button/Button';
|
|
9
|
+
import Heading from '../../Base/heading/Heading';
|
|
11
10
|
import { ImageGalleryModal } from '../../Base/image-gallery-modal/ImageGalleryModal';
|
|
11
|
+
import { HorizontalTab } from '../../Web/tabs/HorizontalTab';
|
|
12
12
|
import LikeButton from '../wishlist/LikeButton';
|
|
13
13
|
import WishlistDropdown from '../wishlist/WishlistDropdown';
|
|
14
14
|
export const ProductDetail = ({ name = '', price = 0, href = '', discountPercent = 0, description = '', detail = { tabs: [] }, buttonText = 'Add to bag', className = '',
|
|
@@ -136,7 +136,7 @@ onShippingOptionsClick, isWatchdogEnabled = false, onWatchdogClick, onDemandClic
|
|
|
136
136
|
? `Skladem: ${variation.stock ?? 0} ks`
|
|
137
137
|
: 'Není skladem' })] }), _jsxs("div", { className: "flex flex-col justify-center items-end text-right gap-1", children: [_jsxs("span", { className: "text-xs text-gray-500", children: ["K\u00F3d: ", variation.sku] }), _jsxs("span", { className: "text-xs text-gray-500", children: ["EAN: ", variation.ean] }), shouldUseHtml ? (_jsx("span", { className: "font-semibold text-lg", dangerouslySetInnerHTML: formatPriceForHTML(variation.price, locale, priceFormatOptions) })) : (_jsx("span", { className: "font-semibold text-lg", children: formatPriceString(variation.price, locale, priceFormatOptions) }))] })] }, variation.id))) }), sortedVariations.length > numberOfVisibleVariations && (_jsx("button", { type: "button", onClick: () => setShowAll(!showAll), className: "mt-3 text-sm font-medium text-green-700 hover:underline", children: showAll
|
|
138
138
|
? 'Zobrazit méně variant'
|
|
139
|
-
: 'Zobrazit více variant' }))] })), _jsxs("div", { className: "mt-3", children: [_jsx(Heading, { level: 2, className: "sr-only", children: "Product information" }), _jsxs("div", { children: [_jsxs("span", { className: "flex items-baseline gap-1", children: [_jsx("p", { className: "text-3xl tracking-tight font-semibold text-[var(--primary)]", children:
|
|
139
|
+
: 'Zobrazit více variant' }))] })), _jsxs("div", { className: "mt-3", children: [_jsx(Heading, { level: 2, className: "sr-only", children: "Product information" }), _jsxs("div", { children: [shouldUseHtml ? (_jsxs("span", { className: "flex items-baseline gap-1", children: [_jsx("div", { className: "text-3xl tracking-tight font-semibold text-[var(--primary)]", dangerouslySetInnerHTML: formatPriceForHTML(price, locale, priceFormatOptions) }), quantUnit && (_jsx("p", { className: "text-3xl tracking-tight font-semibold text-black", children: quantUnit }))] })) : (_jsxs("span", { className: "flex items-baseline gap-1", children: [_jsx("p", { className: "text-3xl tracking-tight font-semibold text-[var(--primary)]", children: formatPriceString(price, locale, priceFormatOptions) }), quantUnit && (_jsx("p", { className: "text-3xl tracking-tight font-semibold text-black", children: quantUnit }))] })), product?.discountPercent != null &&
|
|
140
140
|
product.discountPercent > 0 && (_jsxs("p", { className: "text-sm text-gray-500", children: [translations.recommendedPrice, ' ', shouldUseHtml ? (_jsx("span", { className: "font-bold", dangerouslySetInnerHTML: formatPriceForHTML(price /
|
|
141
141
|
(1 - product.discountPercent / 100), locale, priceFormatOptions) })) : (_jsx("span", { className: "font-bold", children: formatPriceString(price /
|
|
142
142
|
(1 - product.discountPercent / 100), locale, priceFormatOptions) })), ' ', _jsx("span", { className: "text-red-500", children: discountPercent
|