@q2devel/q2-storybook 1.0.86 → 1.0.88
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/tooltip/Tooltip.js +1 -1
- package/dist/components/Ecommerce/basket-dialog/BasketDialog.d.ts +1 -1
- package/dist/components/Ecommerce/basket-dialog/BasketDialog.js +4 -4
- package/dist/components/Ecommerce/basket-overview/BasketOverview.d.ts +1 -1
- package/dist/components/Ecommerce/basket-overview/BasketOverview.js +4 -4
- package/dist/components/Forms/checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Forms/checkbox/Checkbox.js +2 -2
- package/dist/components/Forms/checkbox/CheckboxGroup.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import buildClassesByJoining from '
|
|
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
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) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import Heading from '@/components/Base/heading/Heading';
|
|
5
|
-
import { Price } from '@/components/Base/price/Price';
|
|
6
|
-
import Spinner from '@/components/Base/spinner/Spinner';
|
|
3
|
+
import Spinner from '../../../components/Base/spinner/Spinner';
|
|
7
4
|
import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from '@headlessui/react';
|
|
8
5
|
import { MinusIcon, PlusIcon, XMarkIcon } from '@heroicons/react/24/outline';
|
|
9
6
|
import { useEffect, useRef, useState } from 'react';
|
|
7
|
+
import Heading from '../../../components/Base/heading/Heading';
|
|
8
|
+
import Button from '../../../components/Base/button/Button';
|
|
9
|
+
import { Price } from '../../../components/Base/price/Price';
|
|
10
10
|
export const BasketDialog = ({ isOpen, onClose, products, subtotal, onQuantityChange, onRemoveProduct, onCheckout, onContinueShopping, productLink, title = 'Váš košík', checkoutText = 'Pokračovat k objednávce', continueShoppingText = 'Pokračovat v nákupu', showShippingNote = true, showQuantityControls = true, pendingUpdates = {}, processingItems = {}, isAddingToCart = false, totalItems, locale, productPriceOptions, totalPriceOptions, translations, }) => {
|
|
11
11
|
const [shouldShowAddingIndicator, setShouldShowAddingIndicator] = useState(false);
|
|
12
12
|
const initialTotalItems = useRef(null);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import Button from '
|
|
4
|
-
import Heading from '
|
|
5
|
-
import { Price } from '
|
|
3
|
+
import Button from '../../../components/Base/button/Button';
|
|
4
|
+
import Heading from '../../../components/Base/heading/Heading';
|
|
5
|
+
import { Price } from '../../../components/Base/price/Price';
|
|
6
6
|
import { CheckIcon, ClockIcon, TrashIcon } from '@heroicons/react/20/solid';
|
|
7
7
|
import { MinusIcon, PlusIcon } from '@heroicons/react/24/solid';
|
|
8
8
|
export const BasketOverview = ({ products, subtotal, onQuantityChange, onRemoveProduct, onClearBasket, onCheckout, onContinueShopping, productLink, title = 'Shopping Cart', checkoutText = 'Checkout', continueShoppingText = 'Continue Shopping', showShippingNote = true, clearBasketText = 'Clear basket', totalText, shippingNote, pendingUpdates = {}, processingItems = {}, locale, productPriceOptions, TotalPriceOptions, translations, }) => {
|
|
@@ -27,7 +27,7 @@ export const BasketOverview = ({ products, subtotal, onQuantityChange, onRemoveP
|
|
|
27
27
|
const displayQuantity = productKey in pendingUpdates
|
|
28
28
|
? pendingUpdates[productKey]
|
|
29
29
|
: product.quantity;
|
|
30
|
-
return (_jsxs("li", { className: "flex py-6", children: [_jsx("div", { className: "shrink-0", children: _jsx("img", { width: 128, height: 128, alt: product.variation_images[0]?.alt, src: product.variation_images[0]?.href, className: "size-24 rounded-md object-contain sm:size-32" }) }), _jsxs("div", { className: "ml-4 flex flex-1 flex-col sm:ml-6", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex justify-between", children: [_jsx(Heading, { level: 4, children: _jsx(Button, { asLink: true, unstyled: true, href: productLink?.(product.product_name, product.
|
|
30
|
+
return (_jsxs("li", { className: "flex py-6", children: [_jsx("div", { className: "shrink-0", children: _jsx("img", { width: 128, height: 128, alt: product.variation_images[0]?.alt, src: product.variation_images[0]?.href, className: "size-24 rounded-md object-contain sm:size-32" }) }), _jsxs("div", { className: "ml-4 flex flex-1 flex-col sm:ml-6", children: [_jsxs("div", { children: [_jsxs("div", { className: "flex justify-between", children: [_jsx(Heading, { level: 4, children: _jsx(Button, { asLink: true, unstyled: true, href: productLink?.(product.product_name, product.variation_id), className: "font-medium text-gray-700 hover:text-gray-800", children: product.product_name }) }), _jsx("span", { className: "ml-4 text-sm font-medium text-gray-900", children: _jsx(Price, { value: product.price, locale: locale, options: productPriceOptions }) })] }), product.size && (_jsx("p", { className: "mt-1 text-sm text-gray-500", children: product.size }))] }), _jsxs("div", { className: "mt-4 flex flex-1 items-end justify-between", children: [_jsx("div", { className: "flex items-center space-x-2 text-sm text-gray-700", children: product.inStock !== undefined && (_jsxs(_Fragment, { children: [product.inStock ? (_jsx(CheckIcon, { "aria-hidden": "true", className: "size-5 shrink-0 text-[var(--primary)]" })) : (_jsx(ClockIcon, { "aria-hidden": "true", className: "size-5 shrink-0 text-gray-300" })), _jsx("span", { children: product.inStock
|
|
31
31
|
? 'In stock'
|
|
32
32
|
: `Will ship in ${product.leadTime}` })] })) }), _jsxs("div", { className: "flex items-center", children: [_jsx("button", { type: "button", onClick: () => handleDecrement(product, displayQuantity), disabled: isProcessing, className: `rounded-full p-1 text-gray-600 ${isProcessing
|
|
33
33
|
? 'bg-gray-100 cursor-not-allowed opacity-50'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
-
import { TooltipRef } from '
|
|
2
|
+
import { TooltipRef } from '../../../components/Base/tooltip/Tooltip';
|
|
3
3
|
export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'type' | 'size'> & {
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
hideLabel?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useCallback, useEffect, useId, useRef, } from 'react';
|
|
3
|
-
import Tooltip from '
|
|
4
|
-
import buildClassesByJoining from '
|
|
3
|
+
import Tooltip from '../../../components/Base/tooltip/Tooltip';
|
|
4
|
+
import buildClassesByJoining from '../../../utils/StyleHelper';
|
|
5
5
|
const Checkbox = ({ label, hideLabel, valid = true, variant = 'primary', checkboxSize = 'md', indeterminate = false, renderMessageInTooltip, tooltipRef, message, inputClassName, labelClassName, disabled, checked, ...props }, ref) => {
|
|
6
6
|
const randomId = useId();
|
|
7
7
|
const defaultRef = useRef(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import buildClassesByJoining from '
|
|
2
|
+
import buildClassesByJoining from '../../../utils/StyleHelper';
|
|
3
3
|
const CheckboxGroup = ({ children, className, label, message, valid = true, checkboxSize = 'md', ...props }) => {
|
|
4
4
|
const containerClasses = buildClassesByJoining(['checkbox-group', className]);
|
|
5
5
|
const labelClasses = buildClassesByJoining([
|