@dropins/tools 1.3.1-alpha013 → 1.3.1-alpha014

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.
Files changed (35) hide show
  1. package/chunks/Image.js +1 -1
  2. package/chunks/icons/Add.js +1 -1
  3. package/chunks/initializer.js +2 -2
  4. package/components.js +1 -1
  5. package/components.js.map +1 -1
  6. package/initializer.js +2 -2
  7. package/lib/aem/assets.js +1 -1
  8. package/lib/aem/assets.js.map +1 -1
  9. package/lib/aem/assets.test.d.ts +1 -0
  10. package/lib/aem/assets.test.js +4 -0
  11. package/lib/aem/assets.test.js.map +1 -0
  12. package/lib/aem/configs.js +1 -1
  13. package/lib/aem/configs.test.d.ts +1 -0
  14. package/lib/aem/configs.test.js +4 -0
  15. package/lib/aem/configs.test.js.map +1 -0
  16. package/package.json +1 -1
  17. package/preact-compat.js +1 -1
  18. package/preact-hooks.js +1 -1
  19. package/recaptcha.js +2 -2
  20. package/recaptcha.js.map +1 -1
  21. package/types/elsie/src/components/Icon/Icon.d.ts +2 -2
  22. package/types/elsie/src/lib/aem/assets.d.ts +30 -77
  23. package/types/fetch-graphql/src/index.d.ts +166 -0
  24. package/types/recaptcha/src/configs/index.d.ts +12 -0
  25. package/types/recaptcha/src/configs/message.config.d.ts +16 -0
  26. package/types/recaptcha/src/configs/recaptchaBadgeSelector.config.d.ts +10 -0
  27. package/types/recaptcha/src/configs/typeForms.config.d.ts +10 -0
  28. package/types/recaptcha/src/graphql/recaptchaConfig.graphql.d.ts +10 -0
  29. package/types/recaptcha/src/index.d.ts +44 -0
  30. package/types/recaptcha/src/lib/_checkRecaptchaBadge.d.ts +10 -0
  31. package/types/recaptcha/src/lib/_convertKeysToCamelCase.d.ts +14 -0
  32. package/types/recaptcha/src/lib/_extendConfig.d.ts +4 -0
  33. package/types/recaptcha/src/lib/_storageConfig.d.ts +6 -0
  34. package/types/recaptcha/src/lib/index.d.ts +13 -0
  35. package/types/recaptcha/src/services/rec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,UAAA5C,EAACV,EAAA,CACC,UAAW,GACX,KAAK,QACL,UAAU,2CACZ,EACAU,EAACV,EAAA,CACC,UAAW,GACX,KAAK,SACL,UAAU,2CACZ,EACAU,EAACV,EAAA,CACC,UAAW,GACX,KAAK,QACL,UAAU,4CACZ,EACF,EAAO,KACT,CACF,GCbSoV,GAA2D,CAAC,CACvE,UAAAnV,EACA,MAAAsQ,EACA,UAAA8E,EACA,MAAA7E,EACA,IAAAK,EACA,aAAAyE,EACA,SAAAC,EACA,YAAAC,EAAc,GACd,GAAGhV,CACL,IACOgV,EAIHlS,EAAC,OACE,GAAG9C,EACJ,UAAWG,EAAQ,CAAC,2BAA4BV,CAAS,CAAC,EAE1D,UAACS,EAAA,OAAI,UAAU,4CACZ,SACC6P,GAAA7P,EAACwD,EAAA,CACC,KAAMqM,EACN,UAAW5P,EAAQ,CAAC,iCAAiC,CAAC,IAG5D,EACA2C,EAAC,MAAI,WAAU,oCACZ,UACC+R,GAAA3U,EAACwD,EAAA,CACC,KAAMmR,EACN,UAAW1U,EAAQ,CAAC,iCAAiC,CAAC,EACxD,EAEDkQ,GACCnQ,EAACwD,EAAA,CACC,KAAM2M,EACN,UAAWlQ,EAAQ,CAAC,+BAA+B,CAAC,EACtD,EAED6P,GACC9P,EAAC,MAAI,WAAU,kCACb,SAAAA,EAACwD,EAAA,CACC,KAAMsM,EACN,UAAW7P,EAAQ,CAAC,iCAAiC,CAAC,IAE1D,EAED4U,GACC7U,EAAC,MAAI,WAAU,qCACb,SAAAA,EAACwD,EAAA,CACC,KAAMqR,EACN,UAAW5U,EAAQ,CAAC,oCAAoC,CAAC,IAE7D,EAED2U,GACC5U,EAAC,MAAI,WAAU,mCACb,SAAAA,EAACwD,EAAA,CACC,KAAMoR,EACN,UAAW3U,EAAQ,CAAC,kCAAkC,CAAC,GAE3D,GAEJ,IACF,IArDQwU,GAAwB","names":["SINGLELINE","SkeletonRow","className","fullWidth","lines","size","variant","children","multilineGap","props","sharedClasses","jsx","classes","svg","_","index","Skeleton","rowGap","lazyIcons","lazy","__vitePreload","n","Icon","Source","stroke","viewBox","LazyIcon","defaultProps","Suspense","Incrementer","name","value","disabled","error","success","min","max","onValue","onUpdateError","currentValue","setCurrentValue","useState","minValue","maxValue","isInvalid","errorMessage","useEffect","propValue","debouncedOnValueHandler","useCallback","debounce","newValue","e","handleIncrementer","_value","jsxs","Localizer","Text","Minus","Add","Input","floatingLabel","icon","maxLength","id","handleOnValue","input","VComponent","WarningWithCircle","CheckWithCircle","InputDate","label","onChange","onBlur","internalValue","setInternalValue","iosInputRef","useRef","dictionary","useText","handleOnFocus","event","isIOSMobileDevice","handleOnClick","_a","handleOnBlur","handleInputChange","Field","Date","getIcon","PendingValidation","Check","ErrorValidation","PasswordStatusIndicator","minLength","requiredCharacterClasses","uniqueSymbolsStatus","validateLengthConfig","translations","getMessage","chart","InputPassword","placeholder","required","autoComplete","defaultValue","hideStatusIndicator","showPassword","setShowPassword","toggleShowPassword","prevShowPassword","title","Locker","Button","Eye","EyeClose","TextArea","textareaRef","useId","textArea","Divider","Price","amount","currency","locale","define_process_env_default","weight","sale","formatOptions","formatter","useMemo","formattedAmount","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","Picker","options","handleSelect","isRequired","option","selectedValue","setSelectedValue","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","ChildComponent","createElement","ActionButton","ActionButtonGroup","activeOption","dividers","activeOptionState","setActiveOptionState","handleClick","buttonGroupOptions","Children","child","isOptionDisabled","isOptionActive","cloneElement","Card","Checkbox","isChecked","setIsChecked","ref","handleCheckboxChange","handleOnKeyDown","ColorSwatch","groupAriaLabel","color","selected","outOfStock","multi","outOfStockLabel","selectedLabel","swatchLabel","onValueHandler","validColor","colorStyle","handleAriaLabel","TextSwatch","isOverflowing","setIsOverflowing","spanRef","ProgressSpinner","ariaLabel","style","commonClasses","ImageSwatch","src","alt","imageNode","imageProps","Image","AccordionSection","ariaLabelTitle","secondaryText","actionIconPosition","iconOpen","iconClose","iconLeft","showIconLeft","renderContentWhenClosed","defaultOpen","onStateChange","open","setOpen","onClickHandler","next","buttonLabel","openIcon","closeIcon","leftIcon","Accordion","divider","renderAccordionSection","Fragment","InLineAlert","type","additionalActions","onDismiss","heading","itemList","actionButtonPosition","_b","_c","Close","action","Portal","portalRoot","contentRef","useLayoutEffect","Modal","centered","backgroundDim","clickToDismiss","escapeToDismiss","onClose","showCloseButton","handleOnClose","handleOutsideClick","modal","modalBody","handleKeyDown","scrollingElement","defaultOverflowValue","CloseSVG","CartItem","image","price","taxIncluded","taxExcluded","total","totalExcludingTax","sku","configurations","warning","alert","discount","savings","actions","quantity","footer","loading","updating","quantityType","dropdownOptions","onQuantity","onRemove","useContext","UIContext","labels","CartItemSkeleton","quantityComponent","key","Trash","CartList","PriceRange","minimumAmount","maximumAmount","display","specialPrice","isSimpleProduct","Dashed","FromTo","SpecialPrice","Breadcrumbs","categories","separator","category","AlertBanner","message","IllustratedMessage","headingLevel","Heading","ToggleButton","level","HeadingTag","Header","cta","Tag","ContentGrid","maxColumns","columnWidth","emptyGridContent","hasChildren","additionalStyles","Pagination","totalPages","currentPage","handleForward","nextPage","handleBackward","prevPage","handleSetPage","isNumber","createPages","pages","addPageRange","start","end","i","paginationList","item","ProductItemCardSkeleton","ProductItemCard","titleNode","actionButton","swatches","initialized"],"ignoreList":[],"sources":["/@dropins/tools/src/components/Skeleton/Skeleton.tsx","/@dropins/tools/src/components/Icon/Icon.tsx","/@dropins/tools/src/components/Incrementer/Incrementer.tsx","/@dropins/tools/src/components/Input/Input.tsx","/@dropins/tools/src/components/InputDate/InputDate.tsx","/@dropins/tools/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.tsx","/@dropins/tools/src/components/InputPassword/InputPassword.tsx","/@dropins/tools/src/components/TextArea/TextArea.tsx","/@dropins/tools/src/components/Divider/Divider.tsx","/@dropins/tools/src/components/Price/Price.tsx","/@dropins/tools/src/components/RadioButton/RadioButton.tsx","/@dropins/tools/src/components/Button/Button.tsx","/@dropins/tools/src/components/Picker/Picker.tsx","/@dropins/tools/src/components/Field/Field.tsx","/@dropins/tools/src/components/ActionButton/ActionButton.tsx","/@dropins/tools/src/components/ActionButtonGroup/ActionButtonGroup.tsx","/@dropins/tools/src/components/Card/Card.tsx","/@dropins/tools/src/components/Checkbox/Checkbox.tsx","/@dropins/tools/src/components/ColorSwatch/ColorSwatch.tsx","/@dropins/tools/src/components/TextSwatch/TextSwatch.tsx","/@dropins/tools/src/components/ProgressSpinner/ProgressSpinner.tsx","/@dropins/tools/src/components/ImageSwatch/ImageSwatch.tsx","/@dropins/tools/src/components/Accordion/Accordion.tsx","/@dropins/tools/src/components/InLineAlert/InLineAlert.tsx","/@dropins/tools/src/components/Portal/Portal.tsx","/@dropins/tools/src/components/Modal/Modal.tsx","/@dropins/tools/src/components/CartItem/CartItem.tsx","/@dropins/tools/src/components/CartItem/CartItemSkeleton.tsx","/@dropins/tools/src/components/CartList/CartList.tsx","/@dropins/tools/src/components/PriceRange/PriceRange.tsx","/@dropins/tools/src/components/Breadcrumbs/Breadcrumbs.tsx","/@dropins/tools/src/components/AlertBanner/AlertBanner.tsx","/@dropins/tools/src/components/IllustratedMessage/IllustratedMessage.tsx","/@dropins/tools/src/components/ToggleButton/ToggleButton.tsx","/@dropins/tools/src/components/Header/Header.tsx","/@dropins/tools/src/components/Tag/Tag.tsx","/@dropins/tools/src/components/ContentGrid/ContentGrid.tsx","/@dropins/tools/src/components/Pagination/Pagination.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCardSkeleton.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCard.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Skeleton/Skeleton.css';\n\nexport interface SkeletonRowProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n fullWidth?: boolean;\n lines?: number;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n variant?: 'heading' | 'row' | 'empty';\n multilineGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n children?: string;\n}\n\nconst SINGLELINE = 1;\n\nexport const SkeletonRow: FunctionComponent<SkeletonRowProps> = ({\n className,\n fullWidth = false,\n lines = SINGLELINE,\n size = 'small',\n variant = 'row',\n children = null,\n multilineGap = 'medium',\n ...props\n}) => {\n const sharedClasses = [\n [`dropin-skeleton-row__${variant}`, variant],\n [`dropin-skeleton-row__${variant}-${size}`, variant && size],\n ];\n\n if (!children && variant === 'empty') {\n return (\n <div\n className={classes([\n 'dropin-skeleton-row dropin-skeleton-row__empty',\n className,\n ])}\n />\n );\n }\n\n if (children) {\n const svg = children.trim();\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n }\n\n const isMultiline = lines > SINGLELINE;\n\n if (isMultiline === false) {\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n className,\n ])}\n />\n );\n }\n\n return (\n <div\n {...props}\n style={{ '--multiline-gap-spacing': `var(--spacing-${multilineGap})` }}\n class={classes([\n 'dropin-skeleton-row--multiline',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n >\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n ])}\n />\n ))}\n </div>\n );\n};\n\nexport interface SkeletonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n rowGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n}\n\nexport const Skeleton: FunctionComponent<SkeletonProps> = ({\n className,\n children,\n rowGap = 'medium',\n ...props\n}) => {\n return (\n <div\n style={{ '--row-gap-spacing': `var(--spacing-${rowGap})` }}\n {...props}\n className={classes(['dropin-skeleton', className])}\n role=\"status\"\n aria-label=\"Loading...\"\n >\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib/classes';\nimport { lazy, Suspense, SVGProps } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/Icon/Icon.css';\n\nexport type IconType = keyof typeof import('@adobe-commerce/elsie/icons');\n\nconst lazyIcons = {\n Add: lazy(() => import('@adobe-commerce/elsie/icons/Add.svg')),\n Bulk: lazy(() => import('@adobe-commerce/elsie/icons/Bulk.svg')),\n Burger: lazy(() => import('@adobe-commerce/elsie/icons/Burger.svg')),\n Cart: lazy(() => import('@adobe-commerce/elsie/icons/Cart.svg')),\n Check: lazy(() => import('@adobe-commerce/elsie/icons/Check.svg')),\n ChevronDown: lazy(() => import('@adobe-commerce/elsie/icons/ChevronDown.svg')),\n ChevronUp: lazy(() => import('@adobe-commerce/elsie/icons/ChevronUp.svg')),\n ChevronRight: lazy(() => import('@adobe-commerce/elsie/icons/ChevronRight.svg')),\n Close: lazy(() => import('@adobe-commerce/elsie/icons/Close.svg')),\n Heart: lazy(() => import('@adobe-commerce/elsie/icons/Heart.svg')),\n Minus: lazy(() => import('@adobe-commerce/elsie/icons/Minus.svg')),\n Placeholder: lazy(() => import('@adobe-commerce/elsie/icons/Placeholder.svg')),\n PlaceholderFilled: lazy(\n () => import('@adobe-commerce/elsie/icons/PlaceholderFilled.svg')\n ),\n Search: lazy(() => import('@adobe-commerce/elsie/icons/Search.svg')),\n SearchFilled: lazy(() => import('@adobe-commerce/elsie/icons/SearchFilled.svg')),\n Sort: lazy(() => import('@adobe-commerce/elsie/icons/Sort.svg')),\n Star: lazy(() => import('@adobe-commerce/elsie/icons/Star.svg')),\n View: lazy(() => import('@adobe-commerce/elsie/icons/View.svg')),\n User: lazy(() => import('@adobe-commerce/elsie/icons/User.svg')),\n Warning: lazy(() => import('@adobe-commerce/elsie/icons/Warning.svg')),\n Locker: lazy(() => import('@adobe-commerce/elsie/icons/Locker.svg')),\n Wallet: lazy(() => import('@adobe-commerce/elsie/icons/Wallet.svg')),\n Card: lazy(() => import('@adobe-commerce/elsie/icons/Card.svg')),\n Order: lazy(() => import('@adobe-commerce/elsie/icons/Order.svg')),\n Delivery: lazy(() => import('@adobe-commerce/elsie/icons/Delivery.svg')),\n OrderError: lazy(() => import('@adobe-commerce/elsie/icons/OrderError.svg')),\n OrderSuccess: lazy(() => import('@adobe-commerce/elsie/icons/OrderSuccess.svg')),\n PaymentError: lazy(() => import('@adobe-commerce/elsie/icons/PaymentError.svg')),\n CheckWithCircle: lazy(() => import('@adobe-commerce/elsie/icons/CheckWithCircle.svg')),\n WarningWithCircle: lazy(\n () => import('@adobe-commerce/elsie/icons/WarningWithCircle.svg')\n ),\n WarningFilled: lazy(() => import('@adobe-commerce/elsie/icons/WarningFilled.svg')),\n InfoFilled: lazy(() => import('@adobe-commerce/elsie/icons/InfoFilled.svg')),\n HeartFilled: lazy(() => import('@adobe-commerce/elsie/icons/HeartFilled.svg')),\n Trash: lazy(() => import('@adobe-commerce/elsie/icons/Trash.svg')),\n Eye: lazy(() => import('@adobe-commerce/elsie/icons/Eye.svg')),\n EyeClose: lazy(() => import('@adobe-commerce/elsie/icons/EyeClose.svg')),\n Date: lazy(() => import('@adobe-commerce/elsie/icons/Date.svg')),\n AddressBook: lazy(() => import('@adobe-commerce/elsie/icons/AddressBook.svg')),\n EmptyBox: lazy(() => import('@adobe-commerce/elsie/icons/EmptyBox.svg')),\n Coupon: lazy(() => import('@adobe-commerce/elsie/icons/Coupon.svg')),\n Gift: lazy(() => import('@adobe-commerce/elsie/icons/Gift.svg')),\n GiftCard: lazy(() => import('@adobe-commerce/elsie/icons/GiftCard.svg')),\n Edit: lazy(() => import('@adobe-commerce/elsie/icons/Edit.svg')),\n};\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'size'> {\n source:\n | FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>\n | IconType;\n size?: '12' | '16' | '24' | '32' | '64' | '80';\n stroke?: '1' | '2' | '3' | '4';\n className?: string;\n title?: string;\n}\n\nexport type IconNode = FunctionComponent<\n SVGProps<SVGSVGElement> & { title?: string }\n>;\n\nexport function Icon({\n source: Source,\n size = '24',\n stroke = '2',\n viewBox = '0 0 24 24',\n className,\n ...props\n}: IconProps) {\n const LazyIcon = typeof Source === 'string' ? lazyIcons[Source] : null;\n\n const defaultProps = {\n className: classes([\n 'dropin-icon',\n `dropin-icon--shape-stroke-${stroke}`,\n className,\n ]),\n width: size,\n height: size,\n viewBox,\n };\n\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n {LazyIcon ? (\n <LazyIcon {...props} {...defaultProps} />\n ) : (\n // @ts-ignore\n <Source {...props} {...defaultProps} />\n )}\n </Suspense>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { Localizer, Text } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Incrementer/Incrementer.css';\n\nexport interface IncrementerProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size'> {\n name?: string;\n size?: 'medium' | 'large';\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n error?: boolean;\n success?: boolean;\n min?: number;\n max?: number;\n disabled?: boolean;\n maxLength?: number;\n}\n\nexport const Incrementer: FunctionComponent<IncrementerProps> = ({\n name,\n value = '1',\n className,\n disabled,\n error,\n success,\n min,\n max,\n onValue,\n onUpdateError,\n size = 'medium',\n ...props\n}) => {\n const [currentValue, setCurrentValue] = useState<number>(Number(value));\n const minValue = Number(min);\n const maxValue = Number(max);\n const isInvalid = error || currentValue < minValue || currentValue > maxValue;\n\n const errorMessage =\n currentValue < minValue\n ? 'Dropin.Incrementer.minQuantityMessage'\n : currentValue > maxValue\n ? 'Dropin.Incrementer.maxQuantityMessage'\n : 'Dropin.Incrementer.errorMessage';\n\n // Add this effect to synchronize internal state with external value prop\n useEffect(() => {\n const propValue = Number(value);\n if (propValue !== currentValue) {\n setCurrentValue(propValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleIncrementer = (_value: number) => {\n let newValue = _value;\n debouncedOnValueHandler(newValue);\n setCurrentValue(newValue);\n };\n\n return (\n <div\n className={classes([\n 'dropin-incrementer',\n `dropin-incrementer--${size}`,\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-incrementer__content',\n `dropin-incrementer__content--${size}`,\n [`dropin-incrementer__content--error`, isInvalid],\n [`dropin-incrementer__content--success`, success],\n [`dropin-incrementer__content--disabled`, disabled],\n ])}\n >\n {/* Minus Button */}\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__decrease-button',\n [`dropin-incrementer__decrease-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue - 1)}\n disabled={disabled || currentValue < minValue + 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.decreaseLabel\" />) as any\n }\n >\n <Icon\n source={Minus}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__down\"\n />\n </button>\n </Localizer>\n </div>\n\n {/* Input Field */}\n <input\n className=\"dropin-incrementer__input\"\n max={max}\n min={min}\n step={1}\n type=\"number\"\n name={name}\n value={currentValue}\n disabled={disabled}\n onBlur={() => {\n handleIncrementer(Number(currentValue));\n }}\n onChange={(e) => {\n const newValue = e.currentTarget.value;\n if (newValue !== '') {\n handleIncrementer(Number(newValue));\n }\n }}\n {...props}\n />\n\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n {/* Plus/Add button */}\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__increase-button',\n [`dropin-incrementer__increase-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue + 1)}\n disabled={disabled || currentValue > maxValue - 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.increaseLabel\" />) as any\n }\n >\n <Icon\n source={Add}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__add\"\n />\n </button>\n </Localizer>\n </div>\n </div>\n {isInvalid && (\n <p className=\"dropin-incrementer__content--error-message\">\n <Text\n id={errorMessage}\n fields={{ minQuantity: min, maxQuantity: max }}\n />\n </p>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Input/Input.css';\nimport { CheckWithCircle, WarningWithCircle } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useCallback } from 'preact/hooks';\n\nexport interface InputProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'icon'> {\n id?: string;\n name?: string;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n error?: boolean;\n floatingLabel?: string;\n onUpdateError?: (error: Error) => void;\n onValue?: (value: any) => void;\n size?: 'medium' | 'large';\n success?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n maxLength?: number;\n}\n\nexport const Input: FunctionComponent<InputProps> = ({\n name,\n value,\n variant = 'primary',\n className,\n disabled,\n error,\n floatingLabel,\n onValue,\n onUpdateError,\n size = 'medium',\n icon,\n maxLength,\n success,\n ...props\n}) => {\n const id = props?.id || name || `dropin-input-${Math.random().toString(36)}`;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n debouncedOnValueHandler(input.value.trim());\n };\n\n return (\n <div\n className={classes([\n 'dropin-input-container',\n `dropin-input-container--${variant}`,\n [`dropin-input-container--floating`, !!floatingLabel],\n ['dropin-input-container--disabled', disabled],\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes([\n 'dropin-input__field-icon--left',\n icon.props.className,\n ])}\n />\n )}\n <div className=\"dropin-input-label-container\">\n {/* Input */}\n <input\n id={id}\n onChange={handleOnValue}\n type=\"text\"\n maxLength={maxLength}\n name={name}\n value={value}\n {...props}\n className={classes([\n 'dropin-input',\n `dropin-input--${size}`,\n `dropin-input--${variant}`,\n [`dropin-input--error`, !!error],\n [`dropin-input--success`, !!success],\n ['dropin-input--disabled', disabled],\n [`dropin-input--floating`, !!floatingLabel],\n [`dropin-input--icon-left`, !!icon],\n className,\n ])}\n disabled={disabled}\n />\n\n {/* Floating Label */}\n {floatingLabel && (\n <label\n htmlFor={id}\n className={classes([\n [`dropin-input__label--floating`, !!floatingLabel],\n [`dropin-input__label--floating--icon-left`, !!icon],\n [`dropin-input__label--floating--error`, !!error],\n ])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n\n {error && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--error',\n ])}\n >\n <Icon\n source={WarningWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--warning-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n\n {success && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--success',\n ])}\n >\n <Icon\n source={CheckWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--success-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { classes, isIOSMobileDevice } from '@adobe-commerce/elsie/lib';\nimport { JSX } from 'preact/compat';\nimport { Field, Icon, Input, InputProps } from '@adobe-commerce/elsie/components';\nimport { Date } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/InputDate/InputDate.css';\nimport { useCallback } from 'react';\n\nexport interface InputDateProps extends Omit<InputProps, 'error' | 'value'> {\n label?: string;\n name?: string;\n error?: string;\n value?: Date;\n}\n\nexport const InputDate: FunctionComponent<InputDateProps> = ({\n name = '',\n error,\n value,\n label,\n onChange,\n onBlur,\n ...props\n}) => {\n const [internalValue, setInternalValue] = useState(value?.toString() ?? '');\n const iosInputRef = useRef<HTMLInputElement>(null);\n const dictionary = useText({\n picker: 'Dropin.InputDate.picker',\n });\n\n const handleOnFocus: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'date');\n\n if (!isIOSMobileDevice()) return;\n\n iosInputRef.current.focus();\n },\n []\n );\n\n const handleOnClick: JSX.MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const input = event.currentTarget.parentElement?.querySelector('input');\n input?.focus();\n input?.showPicker();\n },\n []\n );\n\n const handleOnBlur: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'text');\n onBlur?.(event);\n },\n [onBlur]\n );\n\n const handleInputChange: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(\n (event) => {\n setInternalValue(event.target.value);\n onChange?.(event);\n },\n [onChange]\n );\n\n return (\n <div className={classes(['dropin-input-date'])}>\n {/* This simple input is needed only for iOS devices to trigger the date picker. */}\n {isIOSMobileDevice() ? (\n <input\n ref={iosInputRef}\n data-testid=\"inputDateIos\"\n className=\"dropin-input-date__input--ios\"\n type=\"date\"\n onChange={handleInputChange}\n />\n ) : null}\n <Field error={error}>\n <Input\n data-testid=\"input-date\"\n error={!!error}\n name={name}\n value={internalValue}\n placeholder={label}\n floatingLabel={label}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n onChange={handleInputChange}\n aria-labelledby={label}\n className=\"dropin-input-date__input\"\n {...props}\n />\n </Field>\n\n <button\n type=\"button\"\n data-testid=\"dropin-input-date__icon\"\n className=\"dropin-input-date__icon\"\n aria-label={dictionary.picker}\n onClick={handleOnClick}\n >\n <Icon source={Date} size=\"24\" />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n Check,\n Close as ErrorValidation,\n Minus as PendingValidation,\n} from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.css';\n\ntype statusTypes = '' | 'success' | 'error' | 'pending';\n\nexport interface ValidateLengthConfigProps {\n status?: statusTypes;\n icon?: statusTypes;\n message?: string;\n}\n\nexport interface PasswordStatusIndicatorProps {\n validateLengthConfig?: ValidateLengthConfigProps;\n uniqueSymbolsStatus?: statusTypes;\n minLength?: number;\n requiredCharacterClasses?: number;\n}\n\nconst getIcon: { [key: string]: JSX.Element } = {\n pending: <PendingValidation />,\n success: <Check />,\n error: <ErrorValidation style={{ fill: 'red' }} />,\n};\n\nexport const PasswordStatusIndicator: FunctionComponent<\n PasswordStatusIndicatorProps & HTMLAttributes<HTMLDivElement>\n> = ({\n minLength = 0,\n requiredCharacterClasses = 0,\n uniqueSymbolsStatus = 'pending',\n validateLengthConfig = { status: '', icon: '', message: '' },\n}) => {\n const translations = useText({\n chartTwoSymbols: 'Dropin.PasswordStatusIndicator.chartTwoSymbols',\n chartThreeSymbols: 'Dropin.PasswordStatusIndicator.chartThreeSymbols',\n chartFourSymbols: 'Dropin.PasswordStatusIndicator.chartFourSymbols',\n });\n\n const getMessage = (chart: number) => {\n switch (chart) {\n case 2:\n return translations.chartTwoSymbols;\n case 3:\n return translations.chartThreeSymbols;\n case 4:\n return translations.chartFourSymbols;\n default:\n return '';\n }\n };\n\n return (\n <div className={classes(['dropin-password-status-indicator'])}>\n {minLength > 0 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${validateLengthConfig.status}`}\n data-testid={`dropin-password-status-indicator__item--${validateLengthConfig.icon}`}\n >\n {getIcon[validateLengthConfig.icon as string]}\n <span className={`${validateLengthConfig.status}`}>\n {validateLengthConfig.message}\n </span>\n </div>\n ) : null}\n {requiredCharacterClasses >= 2 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n data-testid={`dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n >\n {getIcon[uniqueSymbolsStatus]}\n <span className={`pending`}>\n {getMessage(requiredCharacterClasses)}\n </span>\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Locker, EyeClose, Eye } from '@adobe-commerce/elsie/icons';\nimport { Button, Field, Input, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n PasswordStatusIndicator,\n PasswordStatusIndicatorProps,\n} from './PasswordStatusIndicator';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InputPassword/InputPassword.css';\n\nexport interface InputPasswordProps\n extends PasswordStatusIndicatorProps,\n Omit<HTMLAttributes<HTMLDivElement>, 'minLength'> {\n placeholder?: string;\n floatingLabel?: string;\n defaultValue?: string;\n className?: string;\n name?: string;\n autoComplete?: string;\n errorMessage?: string | undefined;\n required?: boolean;\n hideStatusIndicator?: boolean;\n onValue?: (value: any) => void;\n onBlur?: (event: Event) => void;\n}\n\nexport const InputPassword: FunctionComponent<InputPasswordProps> = ({\n placeholder,\n floatingLabel,\n children,\n name,\n required,\n className,\n minLength,\n autoComplete,\n defaultValue = '',\n hideStatusIndicator = false,\n uniqueSymbolsStatus,\n validateLengthConfig,\n requiredCharacterClasses,\n errorMessage,\n onValue,\n onBlur,\n ...props\n}) => {\n const translations = useText({\n placeholder: 'Dropin.InputPassword.placeholder',\n floatingLabel: 'Dropin.InputPassword.floatingLabel',\n buttonShowTitle: 'Dropin.InputPassword.buttonShowTitle',\n buttonHideTitle: 'Dropin.InputPassword.buttonHideTitle',\n });\n\n const [showPassword, setShowPassword] = useState(false);\n\n const toggleShowPassword = useCallback(() => {\n setShowPassword((prevShowPassword) => !prevShowPassword);\n }, []);\n\n const title = !showPassword\n ? translations.buttonShowTitle\n : translations.buttonHideTitle;\n\n return (\n <div\n data-testid=\"passwordFieldInput\"\n className={classes([\n 'dropin-input-password',\n ['dropin-input-password--error', errorMessage],\n className,\n ])}\n {...props}\n >\n <Field error={errorMessage}>\n <Input\n autoComplete={autoComplete}\n name={name ?? 'password'}\n type={!showPassword ? 'password' : 'text'}\n placeholder={placeholder || translations.placeholder}\n floatingLabel={floatingLabel || translations.floatingLabel}\n aria-label={translations.placeholder}\n aria-required={required || true}\n aria-invalid={!!errorMessage}\n aria-describedby=\"password-feedback\"\n required={required || false}\n value={defaultValue}\n onValue={onValue}\n icon={<Locker />}\n onBlur={onBlur}\n data-testid=\"passwordInput\"\n />\n </Field>\n <Button\n aria-label={title}\n title={title}\n type={'button'}\n data-testid=\"toggle-password-icon\"\n variant=\"tertiary\"\n className={classes([\n 'dropin-input-password__eye-icon',\n `dropin-input-password__eye-icon--${showPassword ? 'show' : 'hide'}`,\n className,\n ])}\n onClick={toggleShowPassword}\n >\n <Icon\n focusable={false}\n aria-hidden={showPassword}\n source={!showPassword ? EyeClose : Eye}\n />\n </Button>\n {hideStatusIndicator ? null : (\n <PasswordStatusIndicator\n minLength={minLength}\n requiredCharacterClasses={requiredCharacterClasses}\n validateLengthConfig={validateLengthConfig}\n uniqueSymbolsStatus={uniqueSymbolsStatus}\n />\n )}\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/TextArea/TextArea.css';\nimport { useRef, useEffect, useId } from 'preact/hooks';\n\nexport interface TextAreaProps extends HTMLAttributes<HTMLTextAreaElement> {\n id?: string;\n name?: string;\n disabled?: boolean;\n errorMessage?: string;\n}\n\nexport const TextArea: FunctionComponent<TextAreaProps> = ({\n disabled,\n name = '',\n errorMessage,\n value,\n label,\n className,\n onChange,\n onBlur,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const id = useId();\n const error = !!errorMessage?.length;\n\n useEffect(() => {\n const textArea = textareaRef.current;\n if (!textArea) return;\n\n textArea.style.height = 'auto';\n textArea.style.height = `${textArea.scrollHeight}px`;\n }, [value]);\n\n return (\n <div\n className={classes(['dropin-textarea-container', className])}\n data-testid=\"dropin-textarea-container\"\n >\n <textarea\n ref={textareaRef}\n data-testid=\"dropin-textarea-field\"\n className={classes([\n 'dropin-textarea',\n [`dropin-textarea--error`, error],\n ['dropin-textarea--disabled', !!disabled],\n ])}\n id={id}\n placeholder={label}\n name={name}\n value={value}\n disabled={disabled}\n onBlur={onBlur}\n onChange={onChange}\n {...props}\n />\n <label\n htmlFor={id}\n className={classes([\n `dropin-textarea__label--floating`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {label}\n </label>\n {error ? (\n <div\n className={classes([\n `dropin-textarea__label--floating--text`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {errorMessage}\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Divider/Divider.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLHRElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Divider: FunctionComponent<DividerProps> = ({\n variant = 'primary',\n className,\n}) => {\n return (\n <hr\n role=\"separator\"\n className={classes([\n 'dropin-divider',\n `dropin-divider--${variant}`,\n className,\n ])}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Price/Price.css';\n\nexport interface PriceProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'size'> {\n amount?: number;\n currency?: string;\n locale?: string;\n formatOptions?: {\n [key: string]: any;\n };\n variant?: 'default' | 'strikethrough';\n weight?: 'bold' | 'normal';\n sale?: boolean;\n size?: 'small' | 'medium' | 'large';\n}\n\nexport const Price: FunctionComponent<PriceProps> = ({\n amount = 0,\n currency,\n locale = process.env.LOCALE ?? undefined,\n variant = 'default',\n weight = 'bold',\n className,\n children,\n sale = false,\n formatOptions = {},\n size = 'small',\n ...props\n}) => {\n const formatter = useMemo(\n () =>\n new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currency || 'USD',\n // These options are needed to round to whole numbers if that's what you want.\n minimumFractionDigits: 2, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)\n maximumFractionDigits: 2, // (causes 2500.99 to be printed as $2,501)\n ...formatOptions,\n }),\n [locale, currency, formatOptions]\n );\n\n const formattedAmount = useMemo(\n () => formatter.format(amount),\n [amount, formatter]\n );\n\n return (\n <span\n {...props}\n className={classes([\n 'dropin-price',\n `dropin-price--${variant}`,\n `dropin-price--${size}`,\n `dropin-price--${weight}`,\n ['dropin-price--sale', sale],\n className,\n ])}\n >\n {formattedAmount}\n </span>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/RadioButton/RadioButton.css';\n\nexport interface RadioButtonProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n size?: 'medium' | 'large';\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n description?: string;\n busy?: boolean;\n}\n\nexport const RadioButton: FunctionComponent<RadioButtonProps> = ({\n name,\n label,\n value,\n size = 'medium',\n checked = false,\n disabled = false,\n error = false,\n description = '',\n busy = false,\n className,\n children,\n ...props\n}) => {\n return (\n <label\n className={classes([\n className,\n 'dropin-radio-button',\n ['dropin-radio-button--error', error],\n ['dropin-radio-button--disabled', disabled],\n ])}\n >\n <input\n name={name}\n value={value}\n checked={checked}\n disabled={disabled}\n type=\"radio\"\n className={classes([\n 'dropin-radio-button__input',\n ['dropin-radio-button__input--error', error],\n ['dropin-radio-button__input--disabled', disabled],\n ])}\n aria-busy={busy}\n {...props}\n />\n <span\n className={classes([\n 'dropin-radio-button__label',\n `dropin-radio-button__label--${size}`,\n ['dropin-radio-button__label--error', error],\n ['dropin-radio-button__label--disabled', disabled],\n ])}\n >\n {label}\n </span>\n <span\n className={classes([\n 'dropin-radio-button__description',\n `dropin-radio-button__description--${size}`,\n ['dropin-radio-button__description--disabled', disabled],\n ])}\n >\n {description}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Button/Button.css';\n\nexport interface ButtonProps\n extends Omit<\n HTMLAttributes<HTMLButtonElement | HTMLAnchorElement>,\n 'size' | 'icon'\n > {\n variant?: 'primary' | 'secondary' | 'tertiary';\n size?: 'medium' | 'large';\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n active?: boolean;\n activeChildren?: ComponentChildren;\n activeIcon?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const Button: FunctionComponent<ButtonProps> = ({\n value,\n variant = 'primary',\n size = 'medium',\n icon,\n className,\n children,\n disabled = false,\n active = false,\n activeChildren,\n activeIcon,\n href,\n ...props\n}) => {\n let buttonType = 'dropin-button';\n\n if (\n (icon && !children) ||\n (icon && active && !activeChildren) ||\n (!icon && active && activeIcon)\n ) {\n buttonType = 'dropin-iconButton';\n }\n\n if (active && activeChildren) {\n buttonType = 'dropin-button';\n }\n\n className = classes([\n buttonType,\n `${buttonType}--${size}`,\n `${buttonType}--${variant}`,\n [`${buttonType}--${variant}--disabled`, disabled],\n children && icon && `${buttonType}--with-icon`,\n !children && activeChildren && icon && `${buttonType}--with-icon`,\n active && activeIcon && `${buttonType}--with-icon`,\n className,\n ]);\n\n const iconClassName = classes([\n 'dropin-button-icon',\n `dropin-button-icon--${variant}`,\n [`dropin-button-icon--${variant}--disabled`, disabled],\n icon?.props.className,\n ]);\n\n const attributes = href\n ? {\n node: <a />,\n role: 'link',\n href,\n ...props,\n disabled,\n active,\n onKeyDown: (event: KeyboardEvent) => {\n if (disabled) {\n event.preventDefault();\n }\n },\n tabIndex: disabled ? -1 : 0,\n }\n : {\n node: <button />,\n role: 'button',\n ...props,\n value,\n disabled,\n active,\n };\n\n return (\n <VComponent {...attributes} className={className}>\n {icon && !active && <VComponent node={icon} className={iconClassName} />}\n\n {activeIcon && active && (\n <VComponent node={activeIcon} className={iconClassName} />\n )}\n\n {children &&\n !active &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n\n {active &&\n activeChildren &&\n (typeof activeChildren === 'string' ? (\n <span>{activeChildren}</span>\n ) : (\n activeChildren\n ))}\n </VComponent>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/Picker/Picker.css';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\n\ntype PickerValue = string | null;\n\nexport interface PickerOption {\n value: PickerValue;\n text?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n}\n\nexport interface PickerProps\n extends Omit<HTMLAttributes<HTMLSelectElement>, 'value' | 'size' | 'icon'> {\n id?: string;\n name?: string;\n value?: PickerValue;\n placeholder?: string;\n variant?: 'primary' | 'secondary';\n size?: 'medium' | 'large';\n floatingLabel?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n options?: PickerOption[];\n defaultOption?: PickerOption;\n disabled?: boolean;\n error?: boolean;\n handleSelect?: (event: Event) => void;\n}\n\nfunction findSelectedValue(\n value?: PickerValue,\n defaultOption?: PickerOption,\n placeholder?: string,\n floatingLabel?: string,\n firstAvailableOption?: PickerOption\n) {\n if (value) return value;\n if (defaultOption) return defaultOption.value;\n if (placeholder || floatingLabel) return '';\n if (firstAvailableOption) return firstAvailableOption.value;\n return null;\n}\n\nexport const Picker: FunctionComponent<PickerProps> = ({\n name,\n value = null,\n options,\n variant = 'primary',\n floatingLabel,\n size = 'medium',\n handleSelect = () => {},\n disabled = false,\n error = false,\n placeholder,\n defaultOption,\n icon,\n className,\n ...props\n}) => {\n const id = props?.id || name || `dropin-picker-${Math.random().toString(36)}`;\n const isRequired = !!props?.required;\n\n // find the first option that is not disabled\n const firstAvailableOption = options?.find((option) => !option.disabled);\n\n const [selectedValue, setSelectedValue] = useState<PickerValue>(() => {\n return findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n );\n });\n\n useEffect(() => {\n setSelectedValue(\n findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n )\n );\n }, [value, defaultOption, placeholder, floatingLabel, firstAvailableOption]);\n\n const handleOptionClick = (event: Event) => {\n const { options, value } = event.target as HTMLSelectElement;\n\n for (const element of options) {\n if (element.selected) {\n setSelectedValue(value);\n handleSelect(event);\n }\n }\n };\n\n const optionsListItems = options?.map((option) => {\n const { value, text, disabled } = option;\n const selected = value === selectedValue;\n\n return (\n <option\n value={value as string}\n key={value}\n selected={selected}\n disabled={disabled}\n className={classes(['dropin-picker__option'])}\n >\n {text}\n </option>\n );\n });\n\n const isSelected = !!selectedValue;\n\n const hasToDisplayPlaceholder = () => {\n return (!isRequired || !isSelected) && (floatingLabel || placeholder);\n };\n\n return (\n <div\n className={classes([\n className,\n 'dropin-picker',\n `dropin-picker__${size}`,\n ['dropin-picker__floating', !!floatingLabel],\n ['dropin-picker__selected', isSelected],\n ['dropin-picker__error', error],\n ['dropin-picker__disabled', disabled],\n ['dropin-picker__icon', icon],\n ])}\n >\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon.props}\n className={'dropin-picker__icon--placeholder'}\n />\n )}\n\n <select\n id={id}\n className={classes([\n 'dropin-picker__select',\n `dropin-picker__select--${variant}`,\n `dropin-picker__select--${size}`,\n ['dropin-picker__select--floating', !!floatingLabel],\n ])}\n name={name}\n aria-label={name}\n disabled={disabled}\n onChange={handleOptionClick}\n {...props}\n >\n {hasToDisplayPlaceholder() && (\n <option\n selected={!isSelected}\n value={''}\n key={value}\n className={classes([\n 'dropin-picker__option dropin-picker__placeholder',\n ])}\n >\n {floatingLabel ?? placeholder}\n </option>\n )}\n\n {optionsListItems}\n </select>\n\n <Icon\n source={ChevronDown}\n size=\"24\"\n stroke=\"2\"\n className=\"dropin-picker__chevronDown\"\n />\n\n {floatingLabel && isSelected && (\n <label\n htmlFor={id}\n className={classes(['dropin-picker__floatingLabel', !!floatingLabel])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport '@adobe-commerce/elsie/components/Field/Field.css';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nexport interface FieldProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n label?: string;\n error?: string;\n hint?: string;\n success?: string;\n disabled?: boolean;\n children?: VNode;\n size?: 'medium' | 'large';\n}\n\nexport const Field: FunctionComponent<FieldProps> = ({\n className,\n label,\n error,\n hint,\n success,\n size = 'medium',\n disabled = false,\n children,\n ...props\n}) => {\n const id =\n children?.props?.id ?? `dropin-field-${Math.random().toString(36)}`;\n const ChildComponent =\n children && typeof children.type !== 'string' ? children.type : null;\n\n return (\n <div {...props} className={classes(['dropin-field', className])}>\n {label && (\n <label\n className={classes([\n 'dropin-field__label',\n ['dropin-field__label--disabled', disabled],\n `dropin-field__label--${size}`,\n ])}\n htmlFor={id}\n >\n {label}\n </label>\n )}\n\n <div className={classes(['dropin-field__content'])}>\n {ChildComponent && children && (\n <ChildComponent\n {...children.props}\n id={id}\n key={children.key}\n disabled={disabled}\n size={size}\n error={!!error}\n success={!!success && !error}\n />\n )}\n </div>\n\n <div\n className={classes([\n 'dropin-field__hint',\n [`dropin-field__hint--${size}`, size],\n ['dropin-field__hint--error', !!error],\n ['dropin-field__hint--success', !!success && !error],\n ['dropin-field__hint--disabled', !!disabled],\n ])}\n >\n {error || success || hint}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButton/ActionButton.css';\n\nexport interface ActionButtonProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, 'icon'> {\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n active?: boolean;\n disabled?: boolean;\n}\n\nexport const ActionButton: FunctionComponent<ActionButtonProps> = ({\n icon,\n className,\n children,\n active = false,\n disabled = false,\n ...props\n}) => {\n return (\n <button\n role=\"button\"\n disabled={disabled}\n {...props}\n className={classes([\n 'dropin-action-button',\n ['dropin-action-button--active', active],\n ['dropin-action-button--disabled', disabled],\n className,\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes(['dropin-action-button-icon'])}\n />\n )}\n {children &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n </button>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode, cloneElement } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButtonGroup/ActionButtonGroup.css';\nimport { useCallback, useState } from 'preact/hooks';\nimport { Children } from 'react';\nimport { ActionButtonProps } from '@adobe-commerce/elsie/components/ActionButton';\n\nexport interface ActionButtonGroupOption {\n value: string | null;\n text: string;\n icon?: VNode<SVGElement>;\n disabled?: boolean;\n}\n\nexport interface ActionButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n activeOption?: string;\n disabled?: boolean;\n dividers?: boolean;\n children: VNode<ActionButtonProps>[] | VNode<ActionButtonProps>;\n handleSelect?(value: string): void;\n}\n\nexport const ActionButtonGroup: FunctionComponent<ActionButtonGroupProps> = ({\n className,\n variant = 'primary',\n activeOption,\n disabled = false,\n dividers = true,\n children,\n handleSelect,\n ...props\n}) => {\n const [activeOptionState, setActiveOptionState] = useState(activeOption);\n\n const handleClick = useCallback(\n (option: any) => {\n const isOptionDisabled = disabled || option.props.disabled;\n if (!isOptionDisabled) {\n setActiveOptionState(option.props.value);\n if (handleSelect) {\n handleSelect(option.props.value);\n }\n }\n },\n [handleSelect, setActiveOptionState, disabled]\n );\n\n const buttonGroupOptions = Children.map(\n children,\n (child: VNode<ActionButtonProps>) => {\n const isOptionDisabled = disabled || child.props.disabled;\n const isOptionActive = child.props.value === activeOptionState;\n return cloneElement(child, {\n disabled: isOptionDisabled,\n active: isOptionActive,\n onClick: () => handleClick(child),\n className: classes([\n 'dropin-action-button-group__option',\n `dropin-action-button-group__option--${variant}`,\n ['dropin-action-button-group__option--active', isOptionActive],\n ['dropin-action-button-group__option--with-dividers', dividers],\n ]),\n });\n }\n );\n\n return (\n <div\n role=\"group\"\n {...props}\n className={classes([\n 'dropin-action-button-group',\n `dropin-action-button-group--${variant}`,\n className,\n ])}\n >\n {buttonGroupOptions}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Card/Card.css';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n children: ComponentChildren | ComponentChildren[];\n}\n\nexport const Card: FunctionComponent<CardProps> = ({\n variant = 'primary',\n className,\n children,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes(['dropin-card', `dropin-card--${variant}`, className])}\n >\n <div class=\"dropin-card__content\">{children}</div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { ChangeEvent, HTMLAttributes, useRef, useState } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Check } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Checkbox/Checkbox.css';\nimport { useEffect } from 'preact/hooks';\n\nexport interface CheckboxProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n name: string;\n size?: 'medium' | 'large';\n disabled?: boolean;\n error?: boolean;\n label?: string | VNode | VNode[];\n description?: string | VNode | VNode[];\n}\n\nexport const Checkbox: FunctionComponent<CheckboxProps> = ({\n name,\n value,\n size = 'medium',\n disabled = false,\n error = false,\n label = '',\n description = '',\n className,\n checked,\n ...props\n}) => {\n const [isChecked, setIsChecked] = useState(\n checked === undefined ? false : checked\n );\n const ref = useRef<HTMLInputElement>(null);\n\n const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {\n props.onChange?.(e);\n setIsChecked(e.currentTarget.checked);\n };\n\n const handleOnKeyDown = (e: KeyboardEvent) => {\n if (e.key === ' ') {\n e.preventDefault();\n ref?.current?.click();\n }\n };\n\n useEffect(() => {\n if (typeof checked === 'boolean') {\n setIsChecked(checked);\n }\n }, [checked]);\n\n return (\n <label\n className={classes([\n 'dropin-checkbox',\n ['dropin-checkbox--disabled', disabled],\n ])}\n >\n <input\n ref={ref}\n name={name}\n value={value}\n type=\"checkbox\"\n disabled={disabled}\n className={classes([\n 'dropin-checkbox__checkbox',\n ['dropin-checkbox__checkbox--error', error],\n className,\n ])}\n {...props}\n onChange={handleCheckboxChange}\n checked={isChecked}\n />\n\n <div className=\"dropin-checkbox__checkbox-icon\">\n {/*Zero-width space character, used to align checkbox properly*/}\n {'\\u200B'}\n <span\n aria-checked={isChecked ? 'true' : 'false'}\n aria-labelledby={`${name}-label`}\n aria-describedby={description ? `${name}-description` : undefined}\n className={classes([\n 'dropin-checkbox__box',\n ['dropin-checkbox__box--error', error],\n ['dropin-checkbox__box--disabled', disabled],\n ])}\n role=\"checkbox\"\n tabIndex={disabled ? -1 : 0}\n onKeyDown={handleOnKeyDown}\n >\n <Icon\n className={classes(['dropin-checkbox__checkmark'])}\n source={Check}\n size=\"16\"\n stroke=\"3\"\n />\n </span>\n </div>\n\n <div\n id={`${name}-label`}\n className={classes([\n 'dropin-checkbox__label',\n `dropin-checkbox__label--${size}`,\n ['dropin-checkbox__label--disabled', disabled],\n ])}\n >\n {label}\n </div>\n\n <div />\n {description && (\n <div\n id={`${name}-description`}\n role={'note'}\n className={classes([\n 'dropin-checkbox__description',\n `dropin-checkbox__description--${size}`,\n ['dropin-checkbox__description--disabled', disabled],\n ])}\n >\n {description}\n </div>\n )}\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useCallback } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ColorSwatch/ColorSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ColorSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label' | 'size'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n size?: 'medium' | 'large';\n color?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ColorSwatch: FunctionComponent<ColorSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n size = 'medium',\n color,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const isValidColor = (color: string) => {\n const colorStyle = new Option().style;\n colorStyle.color = color;\n return colorStyle.color !== ''; // Returns true if the browser accepts this as a valid color\n };\n\n const defaultColor = 'var(--color-gray-300);';\n\n const validColor = color && isValidColor(color) ? color : defaultColor;\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n return (\n <label\n className={classes([\n 'dropin-color-swatch__container',\n `dropin-color-swatch__container--${size}`,\n className,\n ])}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-color-swatch',\n ['dropin-color-swatch--selected', selected],\n ['dropin-color-swatch--disabled', disabled],\n className,\n ])}\n />\n <span\n style={{ '--bg-color': validColor }}\n className={classes([\n 'dropin-color-swatch__span',\n ['dropin-color-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n />\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport {\n HTMLAttributes,\n useState,\n useEffect,\n useRef,\n useCallback,\n} from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/TextSwatch/TextSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface TextSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label: string;\n groupAriaLabel?: string;\n value?: string;\n id: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const TextSwatch: FunctionComponent<TextSwatchProps> = ({\n className,\n name,\n value,\n label,\n groupAriaLabel,\n id,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const [isOverflowing, setIsOverflowing] = useState(false);\n const spanRef = useRef<HTMLLabelElement>(null);\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n useEffect(() => {\n if (\n spanRef.current &&\n spanRef.current.scrollWidth > spanRef.current.clientWidth\n ) {\n setIsOverflowing(true);\n }\n }, [label]);\n\n return (\n <div\n className=\"dropin-text-swatch__container\"\n {...(isOverflowing ? { 'data-tooltip': label } : {})}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-text-swatch',\n ['dropin-text-swatch--selected', selected],\n ['dropin-text-swatch--disabled', disabled],\n className,\n ])}\n />\n <label\n htmlFor={id}\n ref={spanRef}\n className={classes([\n 'dropin-text-swatch__label',\n ['dropin-text-swatch__label--out-of-stock', outOfStock],\n className,\n ])}\n >\n {label}\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/ProgressSpinner/ProgressSpinner.css';\n\n/**\n * @param size this is the size of the spinner ranging in [12px, 24px, 36px, 48px]\n * @param stroke this is the stroke of the spinner ranging in [1px, 2px, 3px, 4px]\n */\nexport interface ProgressSpinnerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n ariaLabel?: string;\n size?: 'small' | 'medium' | 'big' | 'large';\n stroke?: '1' | '2' | '3' | '4';\n}\n\nexport const ProgressSpinner: FunctionComponent<ProgressSpinnerProps> = ({\n ariaLabel,\n size = 'small',\n stroke = '4',\n children,\n className,\n style,\n ...props\n}) => {\n const commonClasses = [\n 'dropin-progress-spinner',\n `dropin-progress-spinner--shape-size-${size}`,\n `dropin-progress-spinner--shape-stroke-${stroke}`,\n ];\n\n const translations = useText({\n updating: 'Dropin.ProgressSpinner.updating.label',\n updatingChildren: 'Dropin.ProgressSpinner.updatingChildren.label',\n });\n\n const handleAriaLabel = () => {\n if (ariaLabel) return ariaLabel;\n return children ? translations.updatingChildren : translations.updating;\n };\n\n return children ? (\n // if we provide children to this component, it should act as a provider in order to add background with low opacity\n <div\n {...props}\n className={classes(['dropin-progress-spinner-provider'])}\n aria-live=\"polite\"\n role=\"status\"\n >\n <div aria-hidden={true}>{children}</div>\n <div\n aria-label={handleAriaLabel()}\n role=\"status\"\n className={classes(['dropin-progress-spinner-background', className])}\n style={style}\n />\n <div\n className={classes([\n 'dropin-progress-spinner-with-provider',\n ...commonClasses,\n ])}\n aria-hidden={true}\n />\n </div>\n ) : (\n // if there are no children, it should be able to be standalone and have no background\n <div\n {...props}\n className={classes([className, ...commonClasses])}\n aria-live=\"polite\"\n role=\"status\"\n aria-label={handleAriaLabel()}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useCallback, JSX, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ImageSwatch/ImageSwatch.css';\nimport { Image, ImageProps } from '@adobe-commerce/elsie/components/Image';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ImageNodeRenderProps extends ImageProps {\n imageSwatchContext: {\n disabled?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n selected?: boolean;\n value?: string;\n label?: string;\n groupAriaLabel?: string;\n name?: string;\n id?: string;\n };\n}\n\nexport interface ImageSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n src: string;\n alt?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n imageNode?: VNode | ((props: ImageNodeRenderProps) => JSX.Element);\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ImageSwatch: FunctionComponent<ImageSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n src,\n alt,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n imageNode,\n onValue,\n onUpdateError,\n ...props\n}) => {\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n const imageProps: ImageProps = useMemo(() => {\n return {\n src,\n alt,\n loading: 'lazy',\n params: { width: 100, fit: 'bounds', crop: true },\n onError: (e: any) => (e.target.style.display = 'none'),\n };\n }, [src, alt]);\n\n return (\n <label className={classes(['dropin-image-swatch__container', className])}>\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-image-swatch',\n ['dropin-image-swatch--selected', selected],\n ['dropin-image-swatch--disabled', disabled],\n className,\n ])}\n />\n\n <span\n className={classes([\n 'dropin-image-swatch__span',\n ['dropin-image-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n >\n {typeof imageNode === 'function' ? (\n imageNode({\n ...imageProps,\n imageSwatchContext: {\n disabled,\n outOfStock,\n selected,\n value,\n label,\n groupAriaLabel,\n name,\n id,\n },\n })\n ) : imageNode || (\n <Image\n {...imageProps}\n className={classes(['dropin-image-swatch__content'])}\n />\n )}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useState, useEffect } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Divider, Icon, IconNode } from '@adobe-commerce/elsie/components';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Accordion/Accordion.css';\nexport interface AccordionSectionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n defaultOpen?: boolean;\n actionIconPosition?: 'left' | 'right';\n ariaLabelTitle: string;\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n renderContentWhenClosed?: boolean;\n onStateChange?: (open: boolean) => void;\n}\n\nexport const AccordionSection: FunctionComponent<AccordionSectionProps> = ({\n className,\n children,\n title,\n ariaLabelTitle,\n secondaryText,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n iconLeft = Add,\n showIconLeft = false,\n renderContentWhenClosed = true,\n defaultOpen,\n onStateChange,\n ...props\n}) => {\n const [open, setOpen] = useState<boolean>(false);\n const onClickHandler = (e: { stopImmediatePropagation: () => void }) => {\n e.stopImmediatePropagation();\n\n const next = !open;\n setOpen(next);\n onStateChange?.(next);\n };\n\n useEffect(() => {\n if (typeof defaultOpen !== 'undefined') {\n setOpen(defaultOpen);\n }\n }, [defaultOpen]);\n\n const buttonLabel = useText(\n `Dropin.Accordion.${open ? 'close' : 'open'}.label`\n ).label;\n\n const openIcon = (\n <Icon\n source={iconOpen}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__open-icon'}\n />\n );\n\n const closeIcon = (\n <Icon\n source={iconClose}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__close-icon'}\n />\n );\n\n const leftIcon = <Icon source={iconLeft} size=\"24\" />;\n\n return (\n <div\n {...props}\n className={classes(['dropin-accordion-section', className])}\n >\n <div className={'dropin-accordion-section__heading'}>\n <div\n className={'dropin-accordion-section__flex'}\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n role=\"button\"\n aria-label={`${buttonLabel} ${ariaLabelTitle ?? title}`}\n tabIndex={0}\n >\n <div className={'dropin-accordion-section__title-container'}>\n {actionIconPosition === 'left' && (open ? closeIcon : openIcon)}\n\n {showIconLeft && leftIcon}\n\n <h3 className={'dropin-accordion-section__title'}>{title}</h3>\n </div>\n </div>\n\n <div className={'dropin-accordion-section__secondary-text-container'}>\n {secondaryText && (\n <h4 className={'dropin-accordion-section__secondary-text'}>\n {secondaryText}\n </h4>\n )}\n\n {actionIconPosition === 'right' && (open ? closeIcon : openIcon)}\n </div>\n </div>\n\n <div\n className={'dropin-accordion-section__content-container'}\n style={{ display: open ? 'grid' : 'none' }}\n >\n {(open || (renderContentWhenClosed && !open)) && children}\n </div>\n </div>\n );\n};\n\nexport interface AccordionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n actionIconPosition?: 'left' | 'right';\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n children: VNode<AccordionSectionProps>[] | VNode<AccordionSectionProps>;\n}\n\nexport const Accordion: FunctionComponent<AccordionProps> = ({\n className,\n children,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n ...props\n}) => {\n const divider = <Divider variant=\"secondary\" />;\n\n const renderAccordionSection = (child: VNode<AccordionSectionProps>) => (\n <>\n <AccordionSection\n {...child.props}\n actionIconPosition={actionIconPosition}\n iconOpen={iconOpen}\n iconClose={iconClose}\n />\n {divider}\n </>\n );\n\n return (\n <div {...props} className={classes(['dropin-accordion', className])}>\n {[\n divider,\n ...(\n (Array.isArray(children)\n ? children\n : [children]) as VNode<AccordionSectionProps>[]\n ).map(renderAccordionSection),\n ]}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InLineAlert/InLineAlert.css';\nexport interface InLineAlertProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n variant?: 'primary' | 'secondary';\n heading: string;\n description?: string;\n type?: 'error' | 'warning' | 'success';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n additionalActions?: Array<{\n label: string;\n onClick: (event: Event) => void;\n }>;\n onDismiss?: (event: Event) => void;\n itemList?: VNode;\n actionButtonPosition?: 'top' | 'bottom';\n}\n\nexport const InLineAlert: FunctionComponent<InLineAlertProps> = ({\n variant = 'primary',\n className,\n type = 'warning',\n additionalActions,\n onDismiss,\n heading,\n description,\n icon,\n itemList,\n actionButtonPosition,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n 'dropin-in-line-alert',\n `dropin-in-line-alert--${type}`,\n `dropin-in-line-alert--${variant}`,\n className,\n ])}\n >\n <div className={'dropin-in-line-alert__heading'}>\n <div className={'dropin-in-line-alert__title-container'}>\n {icon && (\n <VComponent node={icon} className={'dropin-in-line-alert__icon'} />\n )}\n\n <span className={'dropin-in-line-alert__title'}>{heading}</span>\n </div>\n\n <div className={'dropin-in-line-alert__actions-container'}>\n {additionalActions &&\n (actionButtonPosition === 'top' ||\n (!actionButtonPosition && additionalActions.length <= 1)) && (\n <Button\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={\n additionalActions.length > 0\n ? additionalActions[0]?.onClick\n : undefined\n }\n aria-label={additionalActions[0]?.label}\n >\n {additionalActions[0]?.label}\n </Button>\n )}\n {onDismiss && (\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className={'dropin-in-line-alert__dismiss-button'}\n variant=\"tertiary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n )}\n </div>\n </div>\n\n {description && (\n <p className={'dropin-in-line-alert__description'}>{description}</p>\n )}\n <div className={'dropin-in-line-alert__item-list-container'}>\n {itemList && (\n <VComponent\n node={itemList}\n className={classes(['dropin-in-line-alert__item-list'])}\n />\n )}\n </div>\n {additionalActions &&\n (actionButtonPosition === 'bottom' ||\n (!actionButtonPosition && additionalActions.length > 1)) && (\n <div className={'dropin-in-line-alert__additional-actions-container'}>\n {additionalActions.map((action) => (\n <Button\n key={action.label}\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren } from 'preact';\nimport { FunctionComponent, useLayoutEffect, useRef } from 'preact/compat';\n\ninterface PortalProps {\n children: ComponentChildren;\n}\n\nexport const Portal: FunctionComponent<PortalProps> = ({ children }) => {\n const portalRoot = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n\n useLayoutEffect(() => {\n // Create portal root if it doesn't exist\n if (!portalRoot.current) {\n portalRoot.current = document.createElement('div');\n portalRoot.current.setAttribute('data-portal-root', '');\n document.body.appendChild(portalRoot.current);\n }\n\n // Move content to portal root\n if (contentRef.current && portalRoot.current) {\n portalRoot.current.appendChild(contentRef.current);\n }\n\n // Cleanup\n return () => {\n if (portalRoot.current) {\n portalRoot.current.remove();\n portalRoot.current = null;\n }\n };\n }, []);\n\n // Return a div that contains the children\n return (\n <div ref={contentRef} className=\"dropin-design\">\n {children}\n </div>\n );\n}; ","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport {\n FunctionComponent,\n HTMLAttributes,\n useCallback,\n useEffect,\n} from 'preact/compat';\nimport { Button } from '../Button';\nimport { Close as CloseSVG } from '@adobe-commerce/elsie/icons';\nimport { VNode } from 'preact';\nimport { Portal } from '../Portal/Portal';\n\nimport '@adobe-commerce/elsie/components/Modal/Modal.css';\n\nexport interface ModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size' | 'title'> {\n size?: 'small' | 'medium' | 'full';\n title?: VNode;\n centered?: boolean;\n onClose?: () => void;\n backgroundDim?: boolean;\n clickToDismiss?: boolean;\n escapeToDismiss?: boolean;\n showCloseButton?: boolean;\n}\n\nexport const Modal: FunctionComponent<ModalProps> = ({\n size = 'small',\n title = null,\n centered = false,\n backgroundDim = true,\n clickToDismiss = true,\n escapeToDismiss = true,\n onClose,\n showCloseButton = true,\n className,\n children = null,\n ...props\n}) => {\n const handleOnClose = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const translations = useText({\n modalCloseLabel: 'Dropin.Modal.Close.label',\n });\n\n // Close on background click\n useEffect(() => {\n const handleOutsideClick = (event: MouseEvent) => {\n const modal = document.querySelector('.dropin-modal');\n const modalBody = document.querySelector('.dropin-modal__body');\n\n if (\n clickToDismiss &&\n modal &&\n modalBody &&\n !modalBody.contains(event.target as Node)\n ) {\n handleOnClose();\n }\n };\n\n document.addEventListener('mousedown', handleOutsideClick);\n\n return () => {\n document.removeEventListener('mousedown', handleOutsideClick);\n };\n }, [handleOnClose, clickToDismiss]);\n\n // Close on ESC\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && escapeToDismiss) {\n handleOnClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleOnClose, escapeToDismiss]);\n\n // Prevent document scrolling\n useEffect(() => {\n const scrollingElement = document.scrollingElement as HTMLElement;\n\n const defaultOverflowValue = scrollingElement.style.overflow;\n\n scrollingElement.style.overflow = 'hidden';\n\n return () => {\n scrollingElement.style.overflow = defaultOverflowValue;\n };\n }, []);\n\n return (\n <Portal>\n <div\n className={classes([\n 'dropin-modal',\n ['dropin-modal--dim', backgroundDim],\n ])}\n >\n <div\n {...props}\n className={classes([\n 'dropin-modal__body',\n [`dropin-modal__body--${size}`, size],\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-modal__header',\n ['dropin-modal__header-title', !!title],\n ])}\n >\n {title && (\n <div className={classes(['dropin-modal__header-title-content'])}>\n {title}\n </div>\n )}\n\n {showCloseButton && (\n <Button\n aria-label={translations.modalCloseLabel}\n variant=\"tertiary\"\n className=\"dropin-modal__header-close-button\"\n onClick={handleOnClose}\n icon={<CloseSVG />}\n />\n )}\n </div>\n\n <div\n className={classes([\n 'dropin-modal__content',\n ['dropin-modal__body--centered', centered],\n ])}\n >\n {children}\n </div>\n </div>\n </div>\n </Portal>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useContext } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Button,\n CartItemSkeleton,\n Icon,\n Incrementer,\n UIContext,\n ProgressSpinner,\n Picker,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Trash } from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/CartItem/CartItem.css';\n\nexport interface CartItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'loading'> {\n ariaLabel?: string;\n image?: VNode;\n title?: VNode;\n price?: VNode;\n taxIncluded?: boolean;\n taxExcluded?: boolean;\n total?: VNode;\n totalExcludingTax?: VNode;\n sku?: VNode;\n quantity?: number;\n description?: VNode;\n attributes?: VNode;\n footer?: VNode;\n configurations?: { [key: string]: any };\n warning?: VNode;\n alert?: VNode;\n discount?: VNode;\n savings?: VNode;\n actions?: VNode;\n loading?: boolean;\n updating?: boolean;\n onRemove?: () => void;\n onQuantity?: (value: number) => void;\n quantityType?: 'stepper' | 'dropdown';\n dropdownOptions?: { value: string; text: string }[];\n}\n\nexport const CartItem: FunctionComponent<CartItemProps> = ({\n className,\n children,\n ariaLabel,\n image,\n title,\n price,\n taxIncluded = false,\n taxExcluded = false,\n total,\n totalExcludingTax,\n sku,\n configurations,\n warning,\n alert,\n discount,\n savings,\n actions,\n quantity,\n description,\n attributes,\n footer,\n loading = false,\n updating = false,\n quantityType,\n dropdownOptions,\n onQuantity,\n onRemove,\n ...props\n}) => {\n const { locale } = useContext(UIContext);\n\n const labels = useText({\n each: 'Dropin.CartItem.each.label',\n pricePerItem: 'Dropin.CartItem.pricePerItem.label',\n quantity: 'Dropin.CartItem.quantity.label',\n remove: 'Dropin.CartItem.remove.label',\n removeDefault: 'Dropin.CartItem.removeDefault.label',\n taxIncluded: 'Dropin.CartItem.taxIncluded.label',\n taxExcluded: 'Dropin.CartItem.taxExcluded.label',\n updating: 'Dropin.CartItem.updating.label',\n updatingDefault: 'Dropin.ProgressSpinner.updating.label',\n });\n\n if (loading) return <CartItemSkeleton />;\n\n const quantityComponent =\n quantityType === 'dropdown' ? (\n <Picker\n className={classes(['dropin-cart-item__quantity__picker'])}\n value={String(quantity)}\n name=\"quantity\"\n aria-label={labels.quantity}\n disabled={updating}\n variant={'primary'}\n options={dropdownOptions}\n handleSelect={(event) =>\n onQuantity?.(Number((event.target as HTMLSelectElement).value))\n }\n />\n ) : (\n <Incrementer\n className={classes(['dropin-cart-item__quantity__incrementer'])}\n value={quantity}\n min={1}\n onValue={(value) => onQuantity?.(Number(value))}\n name=\"quantity\"\n aria-label={labels.quantity}\n disabled={updating}\n />\n );\n\n return (\n <div\n {...props}\n className={classes([\n 'dropin-cart-item',\n ['dropin-cart-item--updating', updating],\n className,\n ])}\n >\n {updating && (\n <ProgressSpinner\n className={classes(['dropin-cart-item__spinner'])}\n ariaLabel={\n ariaLabel\n ? labels.updating?.replace('{product}', ariaLabel)\n : labels.updatingDefault\n }\n />\n )}\n <div className=\"dropin-cart-item__wrapper\">\n {\n /* Image */\n image && (\n <VComponent\n node={image}\n className={classes(['dropin-cart-item__image'])}\n />\n )\n }\n\n {\n /* Title */\n title && (\n <VComponent\n node={title}\n className={classes([\n 'dropin-cart-item__title',\n ['dropin-cart-item__title--edit', !!onQuantity || !!onRemove],\n ])}\n />\n )\n }\n\n {\n /* Description */\n description && (\n <VComponent\n node={description}\n className={classes(['dropin-cart-item__description'])}\n />\n )\n }\n\n {\n /* SKU */\n sku && (\n <VComponent\n node={sku}\n className={classes(['dropin-cart-item__sku'])}\n />\n )\n }\n <div className={classes(['dropin-cart-item__savings__wrapper'])}>\n {/* Discount amount */}\n {discount && (\n <VComponent\n node={discount}\n className={classes([\n 'dropin-cart-item__discount',\n 'dropin-cart-item__discount__large-screen',\n ])}\n />\n )}\n\n {/* Savings amount */}\n {savings && (\n <VComponent\n node={savings}\n className={classes([\n 'dropin-cart-item__savings',\n 'dropin-cart-item__savings__large-screen',\n ])}\n />\n )}\n </div>\n\n {/* Product Attributes */}\n {attributes && (\n <div className={classes(['dropin-cart-item__attributes'])}>\n <VComponent node={attributes} />\n </div>\n )}\n\n {\n /* Configurations */\n configurations && (\n <ul className={classes(['dropin-cart-item__configurations'])}>\n {Object.entries(configurations).map(([key, value]) => (\n <li\n key={key}\n className={classes([\n 'dropin-cart-item__configurations__item',\n ])}\n >\n {key}:{' '}\n <strong\n className={classes([\n 'dropin-cart-item__configurations__item__value',\n ])}\n >\n {value}\n </strong>\n </li>\n ))}\n </ul>\n )\n }\n\n {\n /* Price */\n price && (\n <span\n className={classes(['dropin-cart-item__price'])}\n aria-label={labels.pricePerItem}\n >\n {quantity && !onQuantity && (\n <>\n <span\n className=\"dropin-cart-item__price__quantity\"\n aria-hidden={true}\n >\n {quantity.toLocaleString(locale)} x{' '}\n </span>\n\n <div className=\"dropin-cart-item__sr-only\">\n {labels.quantity}: {quantity?.toLocaleString(locale)};\n </div>\n </>\n )}\n\n <VComponent node={price} role=\"text\" />\n\n {quantity && quantity > 1 && (\n <>\n &nbsp;\n {labels.each}\n </>\n )}\n\n {taxIncluded && (\n <span\n data-testid=\"tax-message\"\n className=\"dropin-cart-item__price-tax-message\"\n >\n &nbsp;\n {labels.taxIncluded}\n </span>\n )}\n\n {taxExcluded && (\n <span\n data-testid=\"tax-message\"\n className=\"dropin-cart-item__price-tax-message\"\n >\n &nbsp;\n {labels.taxExcluded}\n </span>\n )}\n </span>\n )\n }\n\n {/* Quantity */}\n <div\n className={classes([\n 'dropin-cart-item__quantity',\n ['dropin-cart-item__quantity--edit', !!onQuantity],\n ])}\n >\n {onQuantity\n ? quantityComponent\n : quantity && (\n <span\n className={classes(['dropin-cart-item__quantity__value'])}\n >\n {labels.quantity}:{' '}\n <strong className=\"dropin-cart-item__quantity__number\">\n {Number(quantity).toLocaleString(locale)}\n </strong>\n </span>\n )}\n\n {/* Warning */}\n {warning && (\n <VComponent\n node={warning}\n className={classes([\n 'dropin-cart-item__warning',\n 'dropin-cart-item__warning--quantity',\n ])}\n />\n )}\n\n {/* Alert */}\n {alert && (\n <VComponent\n node={alert}\n className={classes([\n 'dropin-cart-item__alert',\n 'dropin-cart-item__alert--quantity',\n ])}\n />\n )}\n </div>\n\n {/* Actions */}\n {actions && (\n <div className={classes(['dropin-cart-item__actions'])}>\n {\n <VComponent\n node={actions}\n className={classes(['dropin-cart-item__buttons'])}\n />\n }\n </div>\n )}\n\n {/* Warning */}\n {warning && (\n <VComponent\n node={warning}\n className={classes(['dropin-cart-item__warning'])}\n />\n )}\n\n {/* Alert */}\n {alert && (\n <VComponent\n node={alert}\n className={classes(['dropin-cart-item__alert'])}\n />\n )}\n\n {/* Total */}\n <div\n className={classes([\n 'dropin-cart-item__total',\n ['dropin-cart-item__total--edit', !!onRemove],\n ])}\n >\n <div className=\"dropin-cart-item__row-total__wrapper\">\n {\n /* Total */\n total && (\n <div className=\"dropin-cart-item__row-total\">\n <VComponent node={total} role=\"text\" />\n </div>\n )\n }\n\n {taxIncluded && (\n <div className=\"dropin-cart-item__total-tax-included\">\n <span\n data-testid=\"tax-message\"\n className={classes(['dropin-cart-item__total-tax-message'])}\n >\n {labels.taxIncluded}\n </span>\n </div>\n )}\n </div>\n {taxExcluded && (\n <div className=\"dropin-cart-item__total-tax-excluded\">\n <span\n data-testid=\"tax-message\"\n className={classes([\n 'dropin-cart-item__total-tax-excluded-message',\n ])}\n >\n {totalExcludingTax && (\n <VComponent node={totalExcludingTax} role=\"text\" />\n )}\n &nbsp;\n {labels.taxExcluded}\n </span>\n </div>\n )}\n\n {/* Discount amount */}\n {discount && (\n <VComponent\n node={discount}\n className={classes(['dropin-cart-item__discount'])}\n />\n )}\n\n {/* Savings amount */}\n {savings && (\n <VComponent\n node={savings}\n className={classes(['dropin-cart-item__savings'])}\n />\n )}\n </div>\n\n {/* Footer */}\n {footer && (\n <VComponent node={footer} className={classes(['dropin-cart-item__footer'])} />\n )}\n </div>\n\n {/* Remove Item */}\n {onRemove && (\n <Button\n data-testid=\"cart-item-remove-button\"\n className={classes(['dropin-cart-item__remove'])}\n variant=\"tertiary\"\n onClick={() => onRemove?.()}\n icon={\n <Icon\n data-testid=\"cart-item-remove-icon\"\n source={Trash}\n size=\"24\"\n stroke=\"2\"\n viewBox=\"0 0 24 24\"\n aria-label={\n ariaLabel\n ? labels.remove?.replace('{product}', ariaLabel)\n : labels.removeDefault\n }\n />\n }\n disabled={updating}\n />\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport const CartItemSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-cart-item dropin-cart-item-skeleton\">\n <Skeleton className=\"dropin-cart-item__skeleton dropin-cart-item__wrapper\">\n <div className=\"dropin-cart-item__image\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__title\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__sku\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__price\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__quantity\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__total\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, Children } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/CartList/CartList.css';\n\nexport interface CartListProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport const CartList: FunctionComponent<CartListProps> = ({\n className,\n children,\n ...props\n}) => {\n return (\n <div {...props} className={classes(['dropin-cart-list', className])}>\n <div\n className=\"dropin-cart-list__wrapper\"\n aria-live=\"assertive\"\n aria-relevant=\"all\"\n >\n {Children.map(children, (child, key) => {\n return (\n <div key={key} className=\"dropin-cart-list__item\">\n {child}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/PriceRange/PriceRange.css';\nimport { Price } from '@adobe-commerce/elsie/components/Price';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface PriceRangeProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n locale?: string;\n currency?: string;\n amount?: number; // simple product\n variant?: 'default' | 'strikethrough';\n minimumAmount?: number; // configurable product\n maximumAmount?: number; // configurable product\n display?: 'dash' | 'from to' | 'as low as';\n size?: 'small' | 'medium' | 'large';\n specialPrice?: number;\n sale?: boolean;\n}\n\nexport const PriceRange: FunctionComponent<PriceRangeProps> = ({\n className,\n children,\n locale,\n currency,\n amount,\n variant = 'default',\n minimumAmount,\n maximumAmount,\n size = 'small',\n display = 'dash',\n specialPrice,\n sale = false,\n ...props\n}) => {\n const isSimpleProduct = useMemo(\n () =>\n amount ||\n minimumAmount === maximumAmount ||\n (minimumAmount && !maximumAmount) ||\n (maximumAmount && !minimumAmount),\n [amount, maximumAmount, minimumAmount]\n );\n\n return (\n <div>\n {/* Simple product price or when configurable product minimum price equals to maximum price */}\n {isSimpleProduct ? (\n <div {...props} className={classes(['dropin-price-range', className])}>\n <Price\n amount={amount ?? minimumAmount ?? maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant={variant}\n sale={sale}\n />\n </div>\n ) : (\n <div {...props} className={classes(['dropin-price-range', className])}>\n {display === 'dash' ? (\n <Dashed\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'from to' ? (\n <FromTo\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'as low as' ? (\n <SpecialPrice\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n </div>\n )}\n </div>\n );\n};\n\n// Variations\n\nfunction Dashed({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n return (\n <>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span className=\"dropin-price-range__separator\">-</span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction FromTo({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__from',\n `dropin-price-range__from--${size}`,\n ])}\n >\n {translations.from}\n </span>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span\n className={classes([\n 'dropin-price-range__to',\n `dropin-price-range__to--${size}`,\n ])}\n >\n {translations.to}\n </span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction SpecialPrice({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__as-low-as',\n `dropin-price-range__as-low-as--${size}`,\n ])}\n >\n {translations.asLowAs}\n </span>\n {specialPrice ? (\n <div>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant=\"strikethrough\"\n />\n <Price\n amount={specialPrice}\n currency={currency}\n locale={locale}\n size={size}\n className=\"dropin-price-range__special\"\n sale={!!specialPrice && sale}\n />\n </div>\n ) : (\n <Price\n amount={minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n )}\n </>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes } from 'preact/compat';\nimport { FunctionComponent, VNode } from 'preact';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Breadcrumbs/Breadcrumbs.css';\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {\n categories: VNode[];\n separator?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const Breadcrumbs: FunctionComponent<BreadcrumbsProps> = ({\n className,\n categories,\n separator,\n ...props\n}) => {\n return (\n <>\n {categories?.length > 1 && (\n <nav\n role=\"navigation\"\n {...props}\n className={classes(['dropin-breadcrumbs__container', className])}\n >\n <ul className=\"dropin-breadcrumbs__items\">\n {categories?.map((category: VNode, index: number) => {\n return (\n <li\n key={index}\n className={classes([\n 'dropin-breadcrumbs__item',\n [\n 'dropin-breadcrumbs__item--last',\n index === categories.length - 1,\n ],\n ])}\n >\n <VComponent\n node={category}\n className=\"dropin-breadcrumbs__link\"\n />\n {!separator && index !== categories.length - 1 && (\n <span className=\"dropin-breadcrumbs__separator--default\">\n {' '}\n /{' '}\n </span>\n )}\n {separator && index !== categories.length - 1 && (\n <VComponent\n node={separator}\n className=\"dropin-breadcrumbs__separator--icon\"\n />\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n )}\n </>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/AlertBanner/AlertBanner.css';\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface AlertBannerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n variant: 'brand' | 'neutral' | 'success' | 'warning';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n message: VNode;\n onDismiss: () => void;\n action?: {\n label: string;\n onClick: (event: Event) => void;\n };\n}\n\nexport const AlertBanner: FunctionComponent<AlertBannerProps> = ({\n className,\n variant,\n icon,\n message,\n onDismiss,\n action,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n className,\n 'dropin-alert-banner',\n `dropin-alert-banner--${variant}`,\n ])}\n >\n <div className={'dropin-alert-banner__content'}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n className={'dropin-alert-banner__icon'}\n />\n )}\n\n {/* Message */}\n <VComponent\n node={message}\n className={classes(['dropin-alert-banner__message'])}\n />\n </div>\n\n <div className={'dropin-alert-banner__actions'}>\n {action && (\n <Button\n variant=\"tertiary\"\n className={'dropin-alert-banner__action'}\n onClick={action.onClick}\n aria-label={action.label}\n >\n {action.label}\n </Button>\n )}\n\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className=\"dropin-alert-banner__dismiss-button\"\n variant=\"primary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, JSX } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/IllustratedMessage/IllustratedMessage.css';\nimport { Card } from '@adobe-commerce/elsie/components';\n\nexport interface IllustratedMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n heading?: string;\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n message?: VNode<HTMLAttributes<HTMLElement>>;\n action?: VNode;\n variant?: 'primary' | 'secondary';\n}\n\nexport const IllustratedMessage: FunctionComponent<IllustratedMessageProps> = ({\n className,\n icon,\n heading,\n headingLevel = 2,\n message,\n action,\n variant = 'secondary',\n ...props\n}) => {\n const Heading =\n headingLevel >= 1 && headingLevel <= 6\n ? (`h${headingLevel}` as keyof JSX.IntrinsicElements)\n : 'h2';\n\n return (\n <div\n {...props}\n className={classes(['dropin-illustrated-message', className])}\n >\n <Card variant={variant}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n size=\"80\"\n className=\"dropin-illustrated-message__icon\"\n />\n )}\n\n {heading && (\n <Heading className=\"dropin-illustrated-message__heading\">\n {heading}\n </Heading>\n )}\n\n {message && (\n <VComponent\n node={message}\n className=\"dropin-illustrated-message__message\"\n />\n )}\n\n {action && (\n <VComponent\n node={action}\n className=\"dropin-illustrated-message__action\"\n />\n )}\n </Card>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ToggleButton/ToggleButton.css';\nimport { RadioButton } from '@adobe-commerce/elsie/components';\n\nexport interface ToggleButtonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n busy?: boolean;\n icon?:\n | VNode<HTMLAttributes<SVGSVGElement>>\n | VNode<HTMLAttributes<HTMLImageElement>>;\n onChange?: (value: string) => void;\n selected?: boolean;\n}\n\nexport const ToggleButton: FunctionComponent<ToggleButtonProps> = ({\n label,\n name,\n value,\n busy = false,\n children,\n className,\n icon,\n onChange,\n selected = true,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes([\n 'dropin-toggle-button',\n className,\n ['dropin-toggle-button__selected', selected],\n ])}\n >\n <label className=\"dropin-toggle-button__actionButton\">\n <RadioButton\n label=\"\"\n name={name}\n value={value}\n checked={selected}\n onChange={() => onChange && onChange(value)}\n aria-label={name}\n busy={busy}\n className={classes([className, 'dropin-toggle-button__radioButton'])}\n />\n\n <span className=\"dropin-toggle-button__content\">\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon?.props}\n className=\"dropin-toggle-button__icon\"\n />\n )}\n {label}\n </span>\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { Divider } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/Header/Header.css';\n\nexport interface HeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n title: string;\n size?: 'medium' | 'large';\n divider?: boolean;\n cta?: VNode;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nconst Heading = ({\n level,\n className,\n children,\n}: {\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n className?: string;\n children?: ComponentChildren;\n}) => {\n const HeadingTag = level && level >= 1 && level <= 6\n ? `h${level}` as keyof JSX.IntrinsicElements\n : 'span';\n\n return <HeadingTag className={className}>{children as any}</HeadingTag>;\n};\n\nexport const Header: FunctionComponent<HeaderProps> = ({\n title = null,\n size = 'medium',\n cta,\n divider = true,\n className,\n level,\n ...props\n}) => {\n if (!title) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-header-container', className])}\n data-testid=\"dropin-header-container\"\n >\n <Heading\n className={classes([\n 'dropin-header-container__title',\n ['dropin-header-container__title--medium', size === 'medium'],\n ['dropin-header-container__title--large', size === 'large'],\n ])}\n level={level}\n >\n {title}\n </Heading>\n {cta ? (\n <VComponent node={cta} className=\"dropin-header-container__actions\" />\n ) : null}\n {divider ? (\n <Divider\n className={classes([\n 'dropin-header-container__divider',\n ['dropin-header-container__divider--medium', size === 'medium'],\n ['dropin-header-container__divider--large', size === 'large'],\n ])}\n />\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/Tag/Tag.css';\n\nexport interface TagProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon'> {\n label?: string;\n children?: VNode | VNode[];\n}\n\nexport const Tag: FunctionComponent<TagProps> = ({\n label,\n className,\n children,\n ...props\n}) => {\n if (!label && !children) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-tag-container', className])}\n data-testid=\"dropin-tag-container\"\n >\n {children ?? <span className=\"dropin-tag-container__label\">{label}</span>}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ContentGrid/ContentGrid.css';\n\nexport interface ContentGridProps extends HTMLAttributes<HTMLDivElement> {\n emptyGridContent: VNode;\n maxColumns?: number;\n columnWidth?: string;\n}\n\nexport const ContentGrid: FunctionComponent<ContentGridProps> = ({\n className,\n children,\n maxColumns,\n columnWidth = '1fr',\n emptyGridContent,\n ...props\n}) => {\n const hasChildren =\n !!children && (Array.isArray(children) ? children.length > 0 : true);\n\n const additionalStyles = hasChildren\n ? {\n gridTemplateColumns: `repeat(${maxColumns}, ${columnWidth})`,\n }\n : undefined;\n\n return (\n <div\n {...props}\n className={classes(['dropin-content-grid', className])}\n tabindex={0}\n >\n <div\n data-testid=\"content-grid-content\"\n className={classes([\n 'dropin-content-grid__content',\n ['dropin-content-grid__dynamic-columns-content', !maxColumns],\n ['dropin-content-grid__content--empty', !hasChildren],\n ])}\n style={additionalStyles}\n >\n {hasChildren ? children : emptyGridContent}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes, isNumber } from '@adobe-commerce/elsie/lib';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Pagination/Pagination.css';\n\nexport interface PaginationProps {\n className?: string;\n currentPage?: number;\n totalPages?: number;\n onChange?: (currentPage: number) => void;\n}\n\nexport type PaginationList = {\n page: number | string;\n isActive: boolean;\n label: number | string;\n};\n\nexport const Pagination: FunctionComponent<PaginationProps> = ({\n totalPages = 10,\n currentPage = 1,\n onChange,\n className,\n ...props\n}) => {\n const translations = useText({\n backwardButton: 'Dropin.Pagination.backwardButton.ariaLabel',\n forwardButton: 'Dropin.Pagination.forwardButton.ariaLabel',\n });\n\n const handleForward = useCallback(() => {\n const nextPage = Math.min(currentPage + 1, totalPages);\n\n onChange?.(nextPage);\n }, [currentPage, onChange, totalPages]);\n\n const handleBackward = useCallback(() => {\n const prevPage = Math.max(currentPage - 1, 1);\n\n onChange?.(prevPage);\n }, [currentPage, onChange]);\n\n const handleSetPage = useCallback(\n (currentPage: number | string) => {\n if (isNumber(currentPage)) {\n onChange?.(currentPage as number);\n }\n },\n [onChange]\n );\n\n const createPages = useCallback(\n (currentPage: number, totalPages: number): PaginationList[] => {\n let pages: PaginationList[] = [];\n\n const addPageRange = (start: number, end: number) => {\n for (let i = start; i <= end; i++) {\n pages.push({ page: i, isActive: i === currentPage, label: i });\n }\n };\n\n if (totalPages <= 5) {\n addPageRange(1, totalPages);\n } else if (currentPage <= 2) {\n addPageRange(1, 2);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n } else if (currentPage >= totalPages - 3) {\n addPageRange(totalPages - 4, totalPages);\n } else {\n addPageRange(currentPage - 1, currentPage);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n }\n\n return pages;\n },\n []\n );\n\n const paginationList: PaginationList[] = useMemo(\n () => createPages(currentPage, totalPages),\n [createPages, currentPage, totalPages]\n );\n\n return (\n <div {...props} className={classes(['dropin-pagination', className])}>\n <button\n type=\"button\"\n data-testid=\"prev-button\"\n aria-label={translations.backwardButton}\n disabled={currentPage === 1}\n onClick={handleBackward}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--backward',\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </button>\n <ul className=\"dropin-pagination_list\">\n {(paginationList as PaginationList[]).map((item, index) => (\n <li\n data-testid={`dropin-pagination_list-item--${item.page}`}\n key={`${item.page}_${index}`}\n className={classes([\n 'dropin-pagination_list-item',\n `dropin-pagination_list-item--${item.page}`,\n [`dropin-pagination_list-item--active`, item.isActive],\n ])}\n >\n <button\n type=\"button\"\n data-testid={`set-page-button-${item.page}`}\n onClick={() => handleSetPage(item.page)}\n >\n {item.label}\n </button>\n </li>\n ))}\n </ul>\n <button\n type=\"button\"\n data-testid=\"next-button\"\n aria-label={translations.forwardButton}\n disabled={currentPage === totalPages}\n onClick={handleForward}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--forward',\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton.css';\n\nexport const ProductItemCardSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-product-item-card dropin-product-item-card-skeleton\">\n <Skeleton className=\"dropin-product-item-card__skeleton dropin-product-item-card__image-container\">\n <SkeletonRow\n fullWidth={true}\n className=\"dropin-product-item-card__skeleton__image\"\n />\n <div className=\"dropin-product-item-card__content dropin-product-item-card__skeleton__content\">\n <SkeletonRow\n fullWidth={true}\n size=\"large\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n <SkeletonRow\n fullWidth={true}\n size=\"small\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n </div>{' '}\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { ProductItemCardSkeleton } from '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCard.css';\n\nexport interface ProductItemCardProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n image?: VNode;\n titleNode?: VNode;\n price?: VNode;\n sku?: VNode;\n actionButton?: VNode;\n swatches?: VNode;\n initialized?: boolean;\n}\n\nexport const ProductItemCard: FunctionComponent<ProductItemCardProps> = ({\n className,\n image,\n titleNode,\n price,\n sku,\n actionButton,\n swatches,\n initialized = false,\n ...props\n}) => {\n if (!initialized) {\n return <ProductItemCardSkeleton />;\n }\n return (\n <div\n {...props}\n className={classes(['dropin-product-item-card', className])}\n >\n <div className=\"dropin-product-item-card__image-container\">\n {image && (\n <VComponent\n node={image}\n className={classes(['dropin-product-item-card__image'])}\n />\n )}\n </div>\n <div className=\"dropin-product-item-card__content\">\n {titleNode && (\n <VComponent\n node={titleNode}\n className={classes(['dropin-product-item-card__title'])}\n />\n )}\n {sku && (\n <VComponent\n node={sku}\n className={classes(['dropin-product-item-card__sku'])}\n />\n )}\n {price && (\n <div className=\"dropin-product-item-card__price\">\n <VComponent\n node={price}\n className={classes(['dropin-product-item-card__price'])}\n />\n </div>\n )}\n {swatches && (\n <div className=\"dropin-product-item-card__swatches\">\n <VComponent\n node={swatches}\n className={classes(['dropin-product-item-card__swatches'])}\n />\n </div>\n )}\n {actionButton && (\n <div className=\"dropin-product-item-card__action\">\n <VComponent\n node={actionButton}\n className={classes(['dropin-product-item-card__action'])}\n />\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"file":"components.js"}
1
+ {"version":3,"mappings":"m/BAwBA,MAAMA,GAAa,EAENC,EA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ACJ,UAAWG,EAAQ,CAAC,2BAA4BV,CAAS,CAAC,EAE1D,UAACS,EAAA,OAAI,UAAU,4CACZ,SACC0Q,GAAA1Q,EAACsE,EAAA,CACC,KAAMoM,EACN,UAAWzQ,EAAQ,CAAC,iCAAiC,CAAC,IAG5D,EACAyD,EAAC,MAAI,WAAU,oCACZ,UACC6R,GAAAvV,EAACsE,EAAA,CACC,KAAMiR,EACN,UAAWtV,EAAQ,CAAC,iCAAiC,CAAC,EACxD,EAED+Q,GACChR,EAACsE,EAAA,CACC,KAAM0M,EACN,UAAW/Q,EAAQ,CAAC,+BAA+B,CAAC,EACtD,EAED0Q,GACC3Q,EAAC,MAAI,WAAU,kCACb,SAAAA,EAACsE,EAAA,CACC,KAAMqM,EACN,UAAW1Q,EAAQ,CAAC,iCAAiC,CAAC,IAE1D,EAEDwV,GACCzV,EAAC,MAAI,WAAU,qCACb,SAAAA,EAACsE,EAAA,CACC,KAAMmR,EACN,UAAWxV,EAAQ,CAAC,oCAAoC,CAAC,IAE7D,EAEDuV,GACCxV,EAAC,MAAI,WAAU,mCACb,SAAAA,EAACsE,EAAA,CACC,KAAMkR,EACN,UAAWvV,EAAQ,CAAC,kCAAkC,CAAC,GAE3D,GAEJ,IACF,IArDQoV,GAAwB","names":["SINGLELINE","SkeletonRow","className","fullWidth","lines","size","variant","children","multilineGap","props","sharedClasses","jsx","classes","svg","_","index","Skeleton","rowGap","lazyIcons","lazy","__vitePreload","n","isValidUrl","source","absoluteUrl","url","UrlSvgLoader","svgContent","setSvgContent","useState","loading","setLoading","error","setError","useEffect","response","content","processedContent","Icon","Source","stroke","viewBox","defaultProps","Suspense","LazyIcon","isRejectedUrl","Incrementer","name","value","disabled","success","min","max","onValue","onUpdateError","currentValue","setCurrentValue","minValue","maxValue","isInvalid","errorMessage","propValue","debouncedOnValueHandler","useCallback","debounce","newValue","e","handleIncrementer","_value","jsxs","Localizer","Text","Minus","Add","Input","floatingLabel","icon","maxLength","id","handleOnValue","input","VComponent","WarningWithCircle","CheckWithCircle","InputDate","label","onChange","onBlur","internalValue","setInternalValue","iosInputRef","useRef","dictionary","useText","handleOnFocus","event","isIOSMobileDevice","handleOnClick","_a","handleOnBlur","handleInputChange","Field","Date","getIcon","PendingValidation","Check","ErrorValidation","PasswordStatusIndicator","minLength","requiredCharacterClasses","uniqueSymbolsStatus","validateLengthConfig","translations","getMessage","chart","InputPassword","placeholder","required","autoComplete","defaultValue","hideStatusIndicator","showPassword","setShowPassword","toggleShowPassword","prevShowPassword","title","Locker","Button","Eye","EyeClose","TextArea","textareaRef","useId","textArea","Divider","Price","amount","currency","locale","define_process_env_default","weight","sale","formatOptions","formatter","useMemo","formattedAmount","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","Picker","options","handleSelect","isRequired","option","selectedValue","setSelectedValue","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","ChildComponent","createElement","ActionButton","ActionButtonGroup","activeOption","dividers","activeOptionState","setActiveOptionState","handleClick","buttonGroupOptions","Children","child","isOptionDisabled","isOptionActive","cloneElement","Card","Checkbox","isChecked","setIsChecked","ref","handleCheckboxChange","handleOnKeyDown","ColorSwatch","groupAriaLabel","color","selected","outOfStock","multi","outOfStockLabel","selectedLabel","swatchLabel","onValueHandler","validColor","colorStyle","handleAriaLabel","TextSwatch","isOverflowing","setIsOverflowing","spanRef","ProgressSpinner","ariaLabel","style","commonClasses","ImageSwatch","src","alt","imageNode","imageProps","Image","AccordionSection","ariaLabelTitle","secondaryText","actionIconPosition","iconOpen","iconClose","iconLeft","showIconLeft","renderContentWhenClosed","defaultOpen","onStateChange","open","setOpen","onClickHandler","next","buttonLabel","openIcon","closeIcon","leftIcon","Accordion","divider","renderAccordionSection","Fragment","InLineAlert","type","additionalActions","onDismiss","heading","itemList","actionButtonPosition","_b","_c","Close","action","Portal","portalRoot","render","Modal","centered","backgroundDim","clickToDismiss","escapeToDismiss","onClose","showCloseButton","handleOnClose","handleOutsideClick","modal","modalBody","handleKeyDown","scrollingElement","defaultOverflowValue","CloseSVG","CartItem","image","price","taxIncluded","taxExcluded","total","totalExcludingTax","sku","configurations","warning","alert","discount","savings","actions","quantity","footer","updating","quantityType","dropdownOptions","onQuantity","onRemove","useContext","UIContext","labels","CartItemSkeleton","quantityComponent","key","Trash","CartList","PriceRange","minimumAmount","maximumAmount","display","specialPrice","isSimpleProduct","Dashed","FromTo","SpecialPrice","Breadcrumbs","categories","separator","category","AlertBanner","message","IllustratedMessage","headingLevel","Heading","ToggleButton","level","HeadingTag","Header","cta","Tag","ContentGrid","maxColumns","columnWidth","emptyGridContent","hasChildren","additionalStyles","Pagination","totalPages","currentPage","handleForward","nextPage","handleBackward","prevPage","handleSetPage","isNumber","createPages","pages","addPageRange","start","end","i","paginationList","item","ProductItemCardSkeleton","ProductItemCard","titleNode","actionButton","swatches","initialized"],"ignoreList":[],"sources":["/@dropins/tools/src/components/Skeleton/Skeleton.tsx","/@dropins/tools/src/components/Icon/Icon.tsx","/@dropins/tools/src/components/Incrementer/Incrementer.tsx","/@dropins/tools/src/components/Input/Input.tsx","/@dropins/tools/src/components/InputDate/InputDate.tsx","/@dropins/tools/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.tsx","/@dropins/tools/src/components/InputPassword/InputPassword.tsx","/@dropins/tools/src/components/TextArea/TextArea.tsx","/@dropins/tools/src/components/Divider/Divider.tsx","/@dropins/tools/src/components/Price/Price.tsx","/@dropins/tools/src/components/RadioButton/RadioButton.tsx","/@dropins/tools/src/components/Button/Button.tsx","/@dropins/tools/src/components/Picker/Picker.tsx","/@dropins/tools/src/components/Field/Field.tsx","/@dropins/tools/src/components/ActionButton/ActionButton.tsx","/@dropins/tools/src/components/ActionButtonGroup/ActionButtonGroup.tsx","/@dropins/tools/src/components/Card/Card.tsx","/@dropins/tools/src/components/Checkbox/Checkbox.tsx","/@dropins/tools/src/components/ColorSwatch/ColorSwatch.tsx","/@dropins/tools/src/components/TextSwatch/TextSwatch.tsx","/@dropins/tools/src/components/ProgressSpinner/ProgressSpinner.tsx","/@dropins/tools/src/components/ImageSwatch/ImageSwatch.tsx","/@dropins/tools/src/components/Accordion/Accordion.tsx","/@dropins/tools/src/components/InLineAlert/InLineAlert.tsx","/@dropins/tools/src/components/Portal/Portal.tsx","/@dropins/tools/src/components/Modal/Modal.tsx","/@dropins/tools/src/components/CartItem/CartItem.tsx","/@dropins/tools/src/components/CartItem/CartItemSkeleton.tsx","/@dropins/tools/src/components/CartList/CartList.tsx","/@dropins/tools/src/components/PriceRange/PriceRange.tsx","/@dropins/tools/src/components/Breadcrumbs/Breadcrumbs.tsx","/@dropins/tools/src/components/AlertBanner/AlertBanner.tsx","/@dropins/tools/src/components/IllustratedMessage/IllustratedMessage.tsx","/@dropins/tools/src/components/ToggleButton/ToggleButton.tsx","/@dropins/tools/src/components/Header/Header.tsx","/@dropins/tools/src/components/Tag/Tag.tsx","/@dropins/tools/src/components/ContentGrid/ContentGrid.tsx","/@dropins/tools/src/components/Pagination/Pagination.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCardSkeleton.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCard.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Skeleton/Skeleton.css';\n\nexport interface SkeletonRowProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n fullWidth?: boolean;\n lines?: number;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n variant?: 'heading' | 'row' | 'empty';\n multilineGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n children?: string;\n}\n\nconst SINGLELINE = 1;\n\nexport const SkeletonRow: FunctionComponent<SkeletonRowProps> = ({\n className,\n fullWidth = false,\n lines = SINGLELINE,\n size = 'small',\n variant = 'row',\n children = null,\n multilineGap = 'medium',\n ...props\n}) => {\n const sharedClasses = [\n [`dropin-skeleton-row__${variant}`, variant],\n [`dropin-skeleton-row__${variant}-${size}`, variant && size],\n ];\n\n if (!children && variant === 'empty') {\n return (\n <div\n className={classes([\n 'dropin-skeleton-row dropin-skeleton-row__empty',\n className,\n ])}\n />\n );\n }\n\n if (children) {\n const svg = children.trim();\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n }\n\n const isMultiline = lines > SINGLELINE;\n\n if (isMultiline === false) {\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n className,\n ])}\n />\n );\n }\n\n return (\n <div\n {...props}\n style={{ '--multiline-gap-spacing': `var(--spacing-${multilineGap})` }}\n class={classes([\n 'dropin-skeleton-row--multiline',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n >\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n ])}\n />\n ))}\n </div>\n );\n};\n\nexport interface SkeletonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n rowGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n}\n\nexport const Skeleton: FunctionComponent<SkeletonProps> = ({\n className,\n children,\n rowGap = 'medium',\n ...props\n}) => {\n return (\n <div\n style={{ '--row-gap-spacing': `var(--spacing-${rowGap})` }}\n {...props}\n className={classes(['dropin-skeleton', className])}\n role=\"status\"\n aria-label=\"Loading...\"\n >\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib/classes';\nimport { lazy, Suspense, SVGProps } from 'preact/compat';\nimport { useState, useEffect } from 'preact/hooks';\n\nimport '@adobe-commerce/elsie/components/Icon/Icon.css';\n\nexport type IconType = keyof typeof import('@adobe-commerce/elsie/icons');\n\nconst lazyIcons = {\n Add: lazy(() => import('@adobe-commerce/elsie/icons/Add.svg')),\n Bulk: lazy(() => import('@adobe-commerce/elsie/icons/Bulk.svg')),\n Burger: lazy(() => import('@adobe-commerce/elsie/icons/Burger.svg')),\n Cart: lazy(() => import('@adobe-commerce/elsie/icons/Cart.svg')),\n Check: lazy(() => import('@adobe-commerce/elsie/icons/Check.svg')),\n ChevronDown: lazy(() => import('@adobe-commerce/elsie/icons/ChevronDown.svg')),\n ChevronUp: lazy(() => import('@adobe-commerce/elsie/icons/ChevronUp.svg')),\n ChevronRight: lazy(() => import('@adobe-commerce/elsie/icons/ChevronRight.svg')),\n Close: lazy(() => import('@adobe-commerce/elsie/icons/Close.svg')),\n Heart: lazy(() => import('@adobe-commerce/elsie/icons/Heart.svg')),\n Minus: lazy(() => import('@adobe-commerce/elsie/icons/Minus.svg')),\n Placeholder: lazy(() => import('@adobe-commerce/elsie/icons/Placeholder.svg')),\n PlaceholderFilled: lazy(\n () => import('@adobe-commerce/elsie/icons/PlaceholderFilled.svg')\n ),\n Search: lazy(() => import('@adobe-commerce/elsie/icons/Search.svg')),\n SearchFilled: lazy(() => import('@adobe-commerce/elsie/icons/SearchFilled.svg')),\n Sort: lazy(() => import('@adobe-commerce/elsie/icons/Sort.svg')),\n Star: lazy(() => import('@adobe-commerce/elsie/icons/Star.svg')),\n View: lazy(() => import('@adobe-commerce/elsie/icons/View.svg')),\n User: lazy(() => import('@adobe-commerce/elsie/icons/User.svg')),\n Warning: lazy(() => import('@adobe-commerce/elsie/icons/Warning.svg')),\n Locker: lazy(() => import('@adobe-commerce/elsie/icons/Locker.svg')),\n Wallet: lazy(() => import('@adobe-commerce/elsie/icons/Wallet.svg')),\n Card: lazy(() => import('@adobe-commerce/elsie/icons/Card.svg')),\n Order: lazy(() => import('@adobe-commerce/elsie/icons/Order.svg')),\n Delivery: lazy(() => import('@adobe-commerce/elsie/icons/Delivery.svg')),\n OrderError: lazy(() => import('@adobe-commerce/elsie/icons/OrderError.svg')),\n OrderSuccess: lazy(() => import('@adobe-commerce/elsie/icons/OrderSuccess.svg')),\n PaymentError: lazy(() => import('@adobe-commerce/elsie/icons/PaymentError.svg')),\n CheckWithCircle: lazy(() => import('@adobe-commerce/elsie/icons/CheckWithCircle.svg')),\n WarningWithCircle: lazy(\n () => import('@adobe-commerce/elsie/icons/WarningWithCircle.svg')\n ),\n WarningFilled: lazy(() => import('@adobe-commerce/elsie/icons/WarningFilled.svg')),\n InfoFilled: lazy(() => import('@adobe-commerce/elsie/icons/InfoFilled.svg')),\n HeartFilled: lazy(() => import('@adobe-commerce/elsie/icons/HeartFilled.svg')),\n Trash: lazy(() => import('@adobe-commerce/elsie/icons/Trash.svg')),\n Eye: lazy(() => import('@adobe-commerce/elsie/icons/Eye.svg')),\n EyeClose: lazy(() => import('@adobe-commerce/elsie/icons/EyeClose.svg')),\n Date: lazy(() => import('@adobe-commerce/elsie/icons/Date.svg')),\n AddressBook: lazy(() => import('@adobe-commerce/elsie/icons/AddressBook.svg')),\n EmptyBox: lazy(() => import('@adobe-commerce/elsie/icons/EmptyBox.svg')),\n Coupon: lazy(() => import('@adobe-commerce/elsie/icons/Coupon.svg')),\n Gift: lazy(() => import('@adobe-commerce/elsie/icons/Gift.svg')),\n GiftCard: lazy(() => import('@adobe-commerce/elsie/icons/GiftCard.svg')),\n Edit: lazy(() => import('@adobe-commerce/elsie/icons/Edit.svg')),\n};\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'size'> {\n source?:\n | FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>\n | IconType\n | string;\n size?: '12' | '16' | '24' | '32' | '64' | '80';\n stroke?: '1' | '2' | '3' | '4';\n className?: string;\n title?: string;\n}\n\nexport type IconNode = FunctionComponent<\n SVGProps<SVGSVGElement> & { title?: string }\n>;\n\nfunction isValidUrl(source: string): boolean { // check for URL from same domain\n try {\n if (source.startsWith('//')) {\n const absoluteUrl = `${window.location.protocol}${source}`;\n const url = new URL(absoluteUrl);\n return url.hostname === window.location.hostname;\n }\n const url = new URL(source);\n \n if (url.hostname !== window.location.hostname) {\n console.error(`[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`);\n return false;\n }\n \n return true;\n } catch {\n console.error(`[Icon] Invalid URL format: ${source}`);\n return false;\n }\n}\n\nfunction UrlSvgLoader({\n url,\n ...props\n}: SVGProps<SVGSVGElement> & { url: string }) {\n const [svgContent, setSvgContent] = useState<string>('');\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n\n useEffect(() => {\n fetch(url)\n .then(response => {\n if (!response.ok) {\n console.error(`[Icon] Failed to fetch SVG: ${response.status} ${response.statusText}`);\n throw error;\n }\n return response.text();\n })\n .then(content => {\n // Check if content is valid SVG\n if (!content.trim().toLowerCase().startsWith('<?xml') && \n !content.trim().toLowerCase().startsWith('<svg')) {\n console.error(`[Icon] Invalid SVG content from ${url} - Content must be a valid SVG file`);\n setError(true);\n setLoading(false);\n return;\n }\n\n // Process SVG content to ensure proper sizing and accessibility\n let processedContent = content;\n\n if (props.width) {\n processedContent = processedContent.replace(\n /<svg([^>]*)\\s+width\\s*=\\s*[\"'][^\"']*[\"']/gi,\n '<svg$1'\n );\n processedContent = processedContent.replace(\n /<svg/i,\n `<svg width=\"${props.width}\"`\n );\n }\n\n if (props.height) {\n processedContent = processedContent.replace(\n /<svg([^>]*)\\s+height\\s*=\\s*[\"'][^\"']*[\"']/gi,\n '<svg$1'\n );\n processedContent = processedContent.replace(\n /<svg/i,\n `<svg height=\"${props.height}\"`\n );\n }\n \n if (props.title) {\n processedContent = processedContent.replace(/<title[^>]*>.*?<\\/title>/gi, '');\n processedContent = processedContent.replace(\n /<svg([^>]*)>/i,\n `<svg$1><title>${props.title}</title>`\n );\n }\n \n setSvgContent(processedContent);\n setLoading(false);\n })\n .catch((error) => {\n console.error(`[Icon] ${error.message}`);\n setError(true);\n setLoading(false);\n });\n }, [url, props.width, props.height, props.title]);\n\n if (loading || error) {\n return <svg {...props} />;\n }\n\n return (\n <div\n className={props.className}\n style={{\n width: String(props.width),\n height: String(props.height),\n display: 'inline-block',\n lineHeight: 0,\n }}\n dangerouslySetInnerHTML={{ __html: svgContent }}\n />\n );\n}\n\nexport function Icon({\n source: Source,\n size = '24',\n stroke = '2',\n viewBox = '0 0 24 24',\n className,\n ...props\n}: IconProps) {\n\n const defaultProps = {\n className: classes([\n 'dropin-icon',\n `dropin-icon--shape-stroke-${stroke}`,\n className,\n ]),\n width: size,\n height: size,\n viewBox,\n };\n\n if (typeof Source === 'string' && isValidUrl(Source)) {\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n <UrlSvgLoader url={Source} {...props} {...defaultProps}/>\n </Suspense>\n );\n }\n\n const LazyIcon = typeof Source === 'string' && Source in lazyIcons\n ? lazyIcons[Source as IconType]\n : null;\n\n const isRejectedUrl = typeof Source === 'string' && \n (Source.startsWith('http') || Source.startsWith('//') || Source.startsWith('/'));\n\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n {LazyIcon ? (\n <LazyIcon {...props} {...defaultProps} />\n ) : isRejectedUrl ? (\n <svg {...props} {...defaultProps} />\n ) : (\n // @ts-ignore\n <Source {...props} {...defaultProps} />\n )}\n </Suspense>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { Localizer, Text } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Incrementer/Incrementer.css';\n\nexport interface IncrementerProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size'> {\n name?: string;\n size?: 'medium' | 'large';\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n error?: boolean;\n success?: boolean;\n min?: number;\n max?: number;\n disabled?: boolean;\n maxLength?: number;\n}\n\nexport const Incrementer: FunctionComponent<IncrementerProps> = ({\n name,\n value = '1',\n className,\n disabled,\n error,\n success,\n min,\n max,\n onValue,\n onUpdateError,\n size = 'medium',\n ...props\n}) => {\n const [currentValue, setCurrentValue] = useState<number>(Number(value));\n const minValue = Number(min);\n const maxValue = Number(max);\n const isInvalid = error || currentValue < minValue || currentValue > maxValue;\n\n const errorMessage =\n currentValue < minValue\n ? 'Dropin.Incrementer.minQuantityMessage'\n : currentValue > maxValue\n ? 'Dropin.Incrementer.maxQuantityMessage'\n : 'Dropin.Incrementer.errorMessage';\n\n // Add this effect to synchronize internal state with external value prop\n useEffect(() => {\n const propValue = Number(value);\n if (propValue !== currentValue) {\n setCurrentValue(propValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleIncrementer = (_value: number) => {\n let newValue = _value;\n debouncedOnValueHandler(newValue);\n setCurrentValue(newValue);\n };\n\n return (\n <div\n className={classes([\n 'dropin-incrementer',\n `dropin-incrementer--${size}`,\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-incrementer__content',\n `dropin-incrementer__content--${size}`,\n [`dropin-incrementer__content--error`, isInvalid],\n [`dropin-incrementer__content--success`, success],\n [`dropin-incrementer__content--disabled`, disabled],\n ])}\n >\n {/* Minus Button */}\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__decrease-button',\n [`dropin-incrementer__decrease-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue - 1)}\n disabled={disabled || currentValue < minValue + 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.decreaseLabel\" />) as any\n }\n >\n <Icon\n source={Minus}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__down\"\n />\n </button>\n </Localizer>\n </div>\n\n {/* Input Field */}\n <input\n className=\"dropin-incrementer__input\"\n max={max}\n min={min}\n step={1}\n type=\"number\"\n name={name}\n value={currentValue}\n disabled={disabled}\n onBlur={() => {\n handleIncrementer(Number(currentValue));\n }}\n onChange={(e) => {\n const newValue = e.currentTarget.value;\n if (newValue !== '') {\n handleIncrementer(Number(newValue));\n }\n }}\n {...props}\n />\n\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n {/* Plus/Add button */}\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__increase-button',\n [`dropin-incrementer__increase-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue + 1)}\n disabled={disabled || currentValue > maxValue - 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.increaseLabel\" />) as any\n }\n >\n <Icon\n source={Add}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__add\"\n />\n </button>\n </Localizer>\n </div>\n </div>\n {isInvalid && (\n <p className=\"dropin-incrementer__content--error-message\">\n <Text\n id={errorMessage}\n fields={{ minQuantity: min, maxQuantity: max }}\n />\n </p>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Input/Input.css';\nimport { CheckWithCircle, WarningWithCircle } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useCallback } from 'preact/hooks';\n\nexport interface InputProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'icon'> {\n id?: string;\n name?: string;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n error?: boolean;\n floatingLabel?: string;\n onUpdateError?: (error: Error) => void;\n onValue?: (value: any) => void;\n size?: 'medium' | 'large';\n success?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n maxLength?: number;\n}\n\nexport const Input: FunctionComponent<InputProps> = ({\n name,\n value,\n variant = 'primary',\n className,\n disabled,\n error,\n floatingLabel,\n onValue,\n onUpdateError,\n size = 'medium',\n icon,\n maxLength,\n success,\n ...props\n}) => {\n const id = props?.id || name || `dropin-input-${Math.random().toString(36)}`;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n debouncedOnValueHandler(input.value.trim());\n };\n\n return (\n <div\n className={classes([\n 'dropin-input-container',\n `dropin-input-container--${variant}`,\n [`dropin-input-container--floating`, !!floatingLabel],\n ['dropin-input-container--disabled', disabled],\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes([\n 'dropin-input__field-icon--left',\n icon.props.className,\n ])}\n />\n )}\n <div className=\"dropin-input-label-container\">\n {/* Input */}\n <input\n id={id}\n onChange={handleOnValue}\n type=\"text\"\n maxLength={maxLength}\n name={name}\n value={value}\n {...props}\n className={classes([\n 'dropin-input',\n `dropin-input--${size}`,\n `dropin-input--${variant}`,\n [`dropin-input--error`, !!error],\n [`dropin-input--success`, !!success],\n ['dropin-input--disabled', disabled],\n [`dropin-input--floating`, !!floatingLabel],\n [`dropin-input--icon-left`, !!icon],\n className,\n ])}\n disabled={disabled}\n />\n\n {/* Floating Label */}\n {floatingLabel && (\n <label\n htmlFor={id}\n className={classes([\n [`dropin-input__label--floating`, !!floatingLabel],\n [`dropin-input__label--floating--icon-left`, !!icon],\n [`dropin-input__label--floating--error`, !!error],\n ])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n\n {error && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--error',\n ])}\n >\n <Icon\n source={WarningWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--warning-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n\n {success && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--success',\n ])}\n >\n <Icon\n source={CheckWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--success-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { classes, isIOSMobileDevice } from '@adobe-commerce/elsie/lib';\nimport { JSX } from 'preact/compat';\nimport { Field, Icon, Input, InputProps } from '@adobe-commerce/elsie/components';\nimport { Date } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/InputDate/InputDate.css';\nimport { useCallback } from 'react';\n\nexport interface InputDateProps extends Omit<InputProps, 'error' | 'value'> {\n label?: string;\n name?: string;\n error?: string;\n value?: Date;\n}\n\nexport const InputDate: FunctionComponent<InputDateProps> = ({\n name = '',\n error,\n value,\n label,\n onChange,\n onBlur,\n ...props\n}) => {\n const [internalValue, setInternalValue] = useState(value?.toString() ?? '');\n const iosInputRef = useRef<HTMLInputElement>(null);\n const dictionary = useText({\n picker: 'Dropin.InputDate.picker',\n });\n\n const handleOnFocus: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'date');\n\n if (!isIOSMobileDevice()) return;\n\n iosInputRef.current.focus();\n },\n []\n );\n\n const handleOnClick: JSX.MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const input = event.currentTarget.parentElement?.querySelector('input');\n input?.focus();\n input?.showPicker();\n },\n []\n );\n\n const handleOnBlur: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'text');\n onBlur?.(event);\n },\n [onBlur]\n );\n\n const handleInputChange: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(\n (event) => {\n setInternalValue(event.target.value);\n onChange?.(event);\n },\n [onChange]\n );\n\n return (\n <div className={classes(['dropin-input-date'])}>\n {/* This simple input is needed only for iOS devices to trigger the date picker. */}\n {isIOSMobileDevice() ? (\n <input\n ref={iosInputRef}\n data-testid=\"inputDateIos\"\n className=\"dropin-input-date__input--ios\"\n type=\"date\"\n onChange={handleInputChange}\n />\n ) : null}\n <Field error={error}>\n <Input\n data-testid=\"input-date\"\n error={!!error}\n name={name}\n value={internalValue}\n placeholder={label}\n floatingLabel={label}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n onChange={handleInputChange}\n aria-labelledby={label}\n className=\"dropin-input-date__input\"\n {...props}\n />\n </Field>\n\n <button\n type=\"button\"\n data-testid=\"dropin-input-date__icon\"\n className=\"dropin-input-date__icon\"\n aria-label={dictionary.picker}\n onClick={handleOnClick}\n >\n <Icon source={Date} size=\"24\" />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n Check,\n Close as ErrorValidation,\n Minus as PendingValidation,\n} from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.css';\n\ntype statusTypes = '' | 'success' | 'error' | 'pending';\n\nexport interface ValidateLengthConfigProps {\n status?: statusTypes;\n icon?: statusTypes;\n message?: string;\n}\n\nexport interface PasswordStatusIndicatorProps {\n validateLengthConfig?: ValidateLengthConfigProps;\n uniqueSymbolsStatus?: statusTypes;\n minLength?: number;\n requiredCharacterClasses?: number;\n}\n\nconst getIcon: { [key: string]: JSX.Element } = {\n pending: <PendingValidation />,\n success: <Check />,\n error: <ErrorValidation style={{ fill: 'red' }} />,\n};\n\nexport const PasswordStatusIndicator: FunctionComponent<\n PasswordStatusIndicatorProps & HTMLAttributes<HTMLDivElement>\n> = ({\n minLength = 0,\n requiredCharacterClasses = 0,\n uniqueSymbolsStatus = 'pending',\n validateLengthConfig = { status: '', icon: '', message: '' },\n}) => {\n const translations = useText({\n chartTwoSymbols: 'Dropin.PasswordStatusIndicator.chartTwoSymbols',\n chartThreeSymbols: 'Dropin.PasswordStatusIndicator.chartThreeSymbols',\n chartFourSymbols: 'Dropin.PasswordStatusIndicator.chartFourSymbols',\n });\n\n const getMessage = (chart: number) => {\n switch (chart) {\n case 2:\n return translations.chartTwoSymbols;\n case 3:\n return translations.chartThreeSymbols;\n case 4:\n return translations.chartFourSymbols;\n default:\n return '';\n }\n };\n\n return (\n <div className={classes(['dropin-password-status-indicator'])}>\n {minLength > 0 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${validateLengthConfig.status}`}\n data-testid={`dropin-password-status-indicator__item--${validateLengthConfig.icon}`}\n >\n {getIcon[validateLengthConfig.icon as string]}\n <span className={`${validateLengthConfig.status}`}>\n {validateLengthConfig.message}\n </span>\n </div>\n ) : null}\n {requiredCharacterClasses >= 2 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n data-testid={`dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n >\n {getIcon[uniqueSymbolsStatus]}\n <span className={`pending`}>\n {getMessage(requiredCharacterClasses)}\n </span>\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Locker, EyeClose, Eye } from '@adobe-commerce/elsie/icons';\nimport { Button, Field, Input, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n PasswordStatusIndicator,\n PasswordStatusIndicatorProps,\n} from './PasswordStatusIndicator';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InputPassword/InputPassword.css';\n\nexport interface InputPasswordProps\n extends PasswordStatusIndicatorProps,\n Omit<HTMLAttributes<HTMLDivElement>, 'minLength'> {\n placeholder?: string;\n floatingLabel?: string;\n defaultValue?: string;\n className?: string;\n name?: string;\n autoComplete?: string;\n errorMessage?: string | undefined;\n required?: boolean;\n hideStatusIndicator?: boolean;\n onValue?: (value: any) => void;\n onBlur?: (event: Event) => void;\n}\n\nexport const InputPassword: FunctionComponent<InputPasswordProps> = ({\n placeholder,\n floatingLabel,\n children,\n name,\n required,\n className,\n minLength,\n autoComplete,\n defaultValue = '',\n hideStatusIndicator = false,\n uniqueSymbolsStatus,\n validateLengthConfig,\n requiredCharacterClasses,\n errorMessage,\n onValue,\n onBlur,\n ...props\n}) => {\n const translations = useText({\n placeholder: 'Dropin.InputPassword.placeholder',\n floatingLabel: 'Dropin.InputPassword.floatingLabel',\n buttonShowTitle: 'Dropin.InputPassword.buttonShowTitle',\n buttonHideTitle: 'Dropin.InputPassword.buttonHideTitle',\n });\n\n const [showPassword, setShowPassword] = useState(false);\n\n const toggleShowPassword = useCallback(() => {\n setShowPassword((prevShowPassword) => !prevShowPassword);\n }, []);\n\n const title = !showPassword\n ? translations.buttonShowTitle\n : translations.buttonHideTitle;\n\n return (\n <div\n data-testid=\"passwordFieldInput\"\n className={classes([\n 'dropin-input-password',\n ['dropin-input-password--error', errorMessage],\n className,\n ])}\n {...props}\n >\n <Field error={errorMessage}>\n <Input\n autoComplete={autoComplete}\n name={name ?? 'password'}\n type={!showPassword ? 'password' : 'text'}\n placeholder={placeholder || translations.placeholder}\n floatingLabel={floatingLabel || translations.floatingLabel}\n aria-label={translations.placeholder}\n aria-required={required || true}\n aria-invalid={!!errorMessage}\n aria-describedby=\"password-feedback\"\n required={required || false}\n value={defaultValue}\n onValue={onValue}\n icon={<Locker />}\n onBlur={onBlur}\n data-testid=\"passwordInput\"\n />\n </Field>\n <Button\n aria-label={title}\n title={title}\n type={'button'}\n data-testid=\"toggle-password-icon\"\n variant=\"tertiary\"\n className={classes([\n 'dropin-input-password__eye-icon',\n `dropin-input-password__eye-icon--${showPassword ? 'show' : 'hide'}`,\n className,\n ])}\n onClick={toggleShowPassword}\n >\n <Icon\n focusable={false}\n aria-hidden={showPassword}\n source={!showPassword ? EyeClose : Eye}\n />\n </Button>\n {hideStatusIndicator ? null : (\n <PasswordStatusIndicator\n minLength={minLength}\n requiredCharacterClasses={requiredCharacterClasses}\n validateLengthConfig={validateLengthConfig}\n uniqueSymbolsStatus={uniqueSymbolsStatus}\n />\n )}\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/TextArea/TextArea.css';\nimport { useRef, useEffect, useId } from 'preact/hooks';\n\nexport interface TextAreaProps extends HTMLAttributes<HTMLTextAreaElement> {\n id?: string;\n name?: string;\n disabled?: boolean;\n errorMessage?: string;\n}\n\nexport const TextArea: FunctionComponent<TextAreaProps> = ({\n disabled,\n name = '',\n errorMessage,\n value,\n label,\n className,\n onChange,\n onBlur,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const id = useId();\n const error = !!errorMessage?.length;\n\n useEffect(() => {\n const textArea = textareaRef.current;\n if (!textArea) return;\n\n textArea.style.height = 'auto';\n textArea.style.height = `${textArea.scrollHeight}px`;\n }, [value]);\n\n return (\n <div\n className={classes(['dropin-textarea-container', className])}\n data-testid=\"dropin-textarea-container\"\n >\n <textarea\n ref={textareaRef}\n data-testid=\"dropin-textarea-field\"\n className={classes([\n 'dropin-textarea',\n [`dropin-textarea--error`, error],\n ['dropin-textarea--disabled', !!disabled],\n ])}\n id={id}\n placeholder={label}\n name={name}\n value={value}\n disabled={disabled}\n onBlur={onBlur}\n onChange={onChange}\n {...props}\n />\n <label\n htmlFor={id}\n className={classes([\n `dropin-textarea__label--floating`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {label}\n </label>\n {error ? (\n <div\n className={classes([\n `dropin-textarea__label--floating--text`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {errorMessage}\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Divider/Divider.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLHRElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Divider: FunctionComponent<DividerProps> = ({\n variant = 'primary',\n className,\n}) => {\n return (\n <hr\n role=\"separator\"\n className={classes([\n 'dropin-divider',\n `dropin-divider--${variant}`,\n className,\n ])}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Price/Price.css';\n\nexport interface PriceProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'size'> {\n amount?: number;\n currency?: string;\n locale?: string;\n formatOptions?: {\n [key: string]: any;\n };\n variant?: 'default' | 'strikethrough';\n weight?: 'bold' | 'normal';\n sale?: boolean;\n size?: 'small' | 'medium' | 'large';\n}\n\nexport const Price: FunctionComponent<PriceProps> = ({\n amount = 0,\n currency,\n locale = process.env.LOCALE ?? undefined,\n variant = 'default',\n weight = 'bold',\n className,\n children,\n sale = false,\n formatOptions = {},\n size = 'small',\n ...props\n}) => {\n const formatter = useMemo(\n () =>\n new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: currency || 'USD',\n // These options are needed to round to whole numbers if that's what you want.\n minimumFractionDigits: 2, // (this suffices for whole numbers, but will print 2500.10 as $2,500.1)\n maximumFractionDigits: 2, // (causes 2500.99 to be printed as $2,501)\n ...formatOptions,\n }),\n [locale, currency, formatOptions]\n );\n\n const formattedAmount = useMemo(\n () => formatter.format(amount),\n [amount, formatter]\n );\n\n return (\n <span\n {...props}\n className={classes([\n 'dropin-price',\n `dropin-price--${variant}`,\n `dropin-price--${size}`,\n `dropin-price--${weight}`,\n ['dropin-price--sale', sale],\n className,\n ])}\n >\n {formattedAmount}\n </span>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/RadioButton/RadioButton.css';\n\nexport interface RadioButtonProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n size?: 'medium' | 'large';\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n description?: string;\n busy?: boolean;\n}\n\nexport const RadioButton: FunctionComponent<RadioButtonProps> = ({\n name,\n label,\n value,\n size = 'medium',\n checked = false,\n disabled = false,\n error = false,\n description = '',\n busy = false,\n className,\n children,\n ...props\n}) => {\n return (\n <label\n className={classes([\n className,\n 'dropin-radio-button',\n ['dropin-radio-button--error', error],\n ['dropin-radio-button--disabled', disabled],\n ])}\n >\n <input\n name={name}\n value={value}\n checked={checked}\n disabled={disabled}\n type=\"radio\"\n className={classes([\n 'dropin-radio-button__input',\n ['dropin-radio-button__input--error', error],\n ['dropin-radio-button__input--disabled', disabled],\n ])}\n aria-busy={busy}\n {...props}\n />\n <span\n className={classes([\n 'dropin-radio-button__label',\n `dropin-radio-button__label--${size}`,\n ['dropin-radio-button__label--error', error],\n ['dropin-radio-button__label--disabled', disabled],\n ])}\n >\n {label}\n </span>\n <span\n className={classes([\n 'dropin-radio-button__description',\n `dropin-radio-button__description--${size}`,\n ['dropin-radio-button__description--disabled', disabled],\n ])}\n >\n {description}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Button/Button.css';\n\nexport interface ButtonProps\n extends Omit<\n HTMLAttributes<HTMLButtonElement | HTMLAnchorElement>,\n 'size' | 'icon'\n > {\n variant?: 'primary' | 'secondary' | 'tertiary';\n size?: 'medium' | 'large';\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n active?: boolean;\n activeChildren?: ComponentChildren;\n activeIcon?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const Button: FunctionComponent<ButtonProps> = ({\n value,\n variant = 'primary',\n size = 'medium',\n icon,\n className,\n children,\n disabled = false,\n active = false,\n activeChildren,\n activeIcon,\n href,\n ...props\n}) => {\n let buttonType = 'dropin-button';\n\n if (\n (icon && !children) ||\n (icon && active && !activeChildren) ||\n (!icon && active && activeIcon)\n ) {\n buttonType = 'dropin-iconButton';\n }\n\n if (active && activeChildren) {\n buttonType = 'dropin-button';\n }\n\n className = classes([\n buttonType,\n `${buttonType}--${size}`,\n `${buttonType}--${variant}`,\n [`${buttonType}--${variant}--disabled`, disabled],\n children && icon && `${buttonType}--with-icon`,\n !children && activeChildren && icon && `${buttonType}--with-icon`,\n active && activeIcon && `${buttonType}--with-icon`,\n className,\n ]);\n\n const iconClassName = classes([\n 'dropin-button-icon',\n `dropin-button-icon--${variant}`,\n [`dropin-button-icon--${variant}--disabled`, disabled],\n icon?.props.className,\n ]);\n\n const attributes = href\n ? {\n node: <a />,\n role: 'link',\n href,\n ...props,\n disabled,\n active,\n onKeyDown: (event: KeyboardEvent) => {\n if (disabled) {\n event.preventDefault();\n }\n },\n tabIndex: disabled ? -1 : 0,\n }\n : {\n node: <button />,\n role: 'button',\n ...props,\n value,\n disabled,\n active,\n };\n\n return (\n <VComponent {...attributes} className={className}>\n {icon && !active && <VComponent node={icon} className={iconClassName} />}\n\n {activeIcon && active && (\n <VComponent node={activeIcon} className={iconClassName} />\n )}\n\n {children &&\n !active &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n\n {active &&\n activeChildren &&\n (typeof activeChildren === 'string' ? (\n <span>{activeChildren}</span>\n ) : (\n activeChildren\n ))}\n </VComponent>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/Picker/Picker.css';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\n\ntype PickerValue = string | null;\n\nexport interface PickerOption {\n value: PickerValue;\n text?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n}\n\nexport interface PickerProps\n extends Omit<HTMLAttributes<HTMLSelectElement>, 'value' | 'size' | 'icon'> {\n id?: string;\n name?: string;\n value?: PickerValue;\n placeholder?: string;\n variant?: 'primary' | 'secondary';\n size?: 'medium' | 'large';\n floatingLabel?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n options?: PickerOption[];\n defaultOption?: PickerOption;\n disabled?: boolean;\n error?: boolean;\n handleSelect?: (event: Event) => void;\n}\n\nfunction findSelectedValue(\n value?: PickerValue,\n defaultOption?: PickerOption,\n placeholder?: string,\n floatingLabel?: string,\n firstAvailableOption?: PickerOption\n) {\n if (value) return value;\n if (defaultOption) return defaultOption.value;\n if (placeholder || floatingLabel) return '';\n if (firstAvailableOption) return firstAvailableOption.value;\n return null;\n}\n\nexport const Picker: FunctionComponent<PickerProps> = ({\n name,\n value = null,\n options,\n variant = 'primary',\n floatingLabel,\n size = 'medium',\n handleSelect = () => {},\n disabled = false,\n error = false,\n placeholder,\n defaultOption,\n icon,\n className,\n ...props\n}) => {\n const id = props?.id || name || `dropin-picker-${Math.random().toString(36)}`;\n const isRequired = !!props?.required;\n\n // find the first option that is not disabled\n const firstAvailableOption = options?.find((option) => !option.disabled);\n\n const [selectedValue, setSelectedValue] = useState<PickerValue>(() => {\n return findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n );\n });\n\n useEffect(() => {\n setSelectedValue(\n findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n )\n );\n }, [value, defaultOption, placeholder, floatingLabel, firstAvailableOption]);\n\n const handleOptionClick = (event: Event) => {\n const { options, value } = event.target as HTMLSelectElement;\n\n for (const element of options) {\n if (element.selected) {\n setSelectedValue(value);\n handleSelect(event);\n }\n }\n };\n\n const optionsListItems = options?.map((option) => {\n const { value, text, disabled } = option;\n const selected = value === selectedValue;\n\n return (\n <option\n value={value as string}\n key={value}\n selected={selected}\n disabled={disabled}\n className={classes(['dropin-picker__option'])}\n >\n {text}\n </option>\n );\n });\n\n const isSelected = !!selectedValue;\n\n const hasToDisplayPlaceholder = () => {\n return (!isRequired || !isSelected) && (floatingLabel || placeholder);\n };\n\n return (\n <div\n className={classes([\n className,\n 'dropin-picker',\n `dropin-picker__${size}`,\n ['dropin-picker__floating', !!floatingLabel],\n ['dropin-picker__selected', isSelected],\n ['dropin-picker__error', error],\n ['dropin-picker__disabled', disabled],\n ['dropin-picker__icon', icon],\n ])}\n >\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon.props}\n className={'dropin-picker__icon--placeholder'}\n />\n )}\n\n <select\n id={id}\n className={classes([\n 'dropin-picker__select',\n `dropin-picker__select--${variant}`,\n `dropin-picker__select--${size}`,\n ['dropin-picker__select--floating', !!floatingLabel],\n ])}\n name={name}\n aria-label={name}\n disabled={disabled}\n onChange={handleOptionClick}\n {...props}\n >\n {hasToDisplayPlaceholder() && (\n <option\n selected={!isSelected}\n value={''}\n key={value}\n className={classes([\n 'dropin-picker__option dropin-picker__placeholder',\n ])}\n >\n {floatingLabel ?? placeholder}\n </option>\n )}\n\n {optionsListItems}\n </select>\n\n <Icon\n source={ChevronDown}\n size=\"24\"\n stroke=\"2\"\n className=\"dropin-picker__chevronDown\"\n />\n\n {floatingLabel && isSelected && (\n <label\n htmlFor={id}\n className={classes(['dropin-picker__floatingLabel', !!floatingLabel])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport '@adobe-commerce/elsie/components/Field/Field.css';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nexport interface FieldProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n label?: string;\n error?: string;\n hint?: string;\n success?: string;\n disabled?: boolean;\n children?: VNode;\n size?: 'medium' | 'large';\n}\n\nexport const Field: FunctionComponent<FieldProps> = ({\n className,\n label,\n error,\n hint,\n success,\n size = 'medium',\n disabled = false,\n children,\n ...props\n}) => {\n const id =\n children?.props?.id ?? `dropin-field-${Math.random().toString(36)}`;\n const ChildComponent =\n children && typeof children.type !== 'string' ? children.type : null;\n\n return (\n <div {...props} className={classes(['dropin-field', className])}>\n {label && (\n <label\n className={classes([\n 'dropin-field__label',\n ['dropin-field__label--disabled', disabled],\n `dropin-field__label--${size}`,\n ])}\n htmlFor={id}\n >\n {label}\n </label>\n )}\n\n <div className={classes(['dropin-field__content'])}>\n {ChildComponent && children && (\n <ChildComponent\n {...children.props}\n id={id}\n key={children.key}\n disabled={disabled}\n size={size}\n error={!!error}\n success={!!success && !error}\n />\n )}\n </div>\n\n <div\n className={classes([\n 'dropin-field__hint',\n [`dropin-field__hint--${size}`, size],\n ['dropin-field__hint--error', !!error],\n ['dropin-field__hint--success', !!success && !error],\n ['dropin-field__hint--disabled', !!disabled],\n ])}\n >\n {error || success || hint}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButton/ActionButton.css';\n\nexport interface ActionButtonProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, 'icon'> {\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n active?: boolean;\n disabled?: boolean;\n}\n\nexport const ActionButton: FunctionComponent<ActionButtonProps> = ({\n icon,\n className,\n children,\n active = false,\n disabled = false,\n ...props\n}) => {\n return (\n <button\n role=\"button\"\n disabled={disabled}\n {...props}\n className={classes([\n 'dropin-action-button',\n ['dropin-action-button--active', active],\n ['dropin-action-button--disabled', disabled],\n className,\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes(['dropin-action-button-icon'])}\n />\n )}\n {children &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n </button>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode, cloneElement } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButtonGroup/ActionButtonGroup.css';\nimport { useCallback, useState } from 'preact/hooks';\nimport { Children } from 'react';\nimport { ActionButtonProps } from '@adobe-commerce/elsie/components/ActionButton';\n\nexport interface ActionButtonGroupOption {\n value: string | null;\n text: string;\n icon?: VNode<SVGElement>;\n disabled?: boolean;\n}\n\nexport interface ActionButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n activeOption?: string;\n disabled?: boolean;\n dividers?: boolean;\n children: VNode<ActionButtonProps>[] | VNode<ActionButtonProps>;\n handleSelect?(value: string): void;\n}\n\nexport const ActionButtonGroup: FunctionComponent<ActionButtonGroupProps> = ({\n className,\n variant = 'primary',\n activeOption,\n disabled = false,\n dividers = true,\n children,\n handleSelect,\n ...props\n}) => {\n const [activeOptionState, setActiveOptionState] = useState(activeOption);\n\n const handleClick = useCallback(\n (option: any) => {\n const isOptionDisabled = disabled || option.props.disabled;\n if (!isOptionDisabled) {\n setActiveOptionState(option.props.value);\n if (handleSelect) {\n handleSelect(option.props.value);\n }\n }\n },\n [handleSelect, setActiveOptionState, disabled]\n );\n\n const buttonGroupOptions = Children.map(\n children,\n (child: VNode<ActionButtonProps>) => {\n const isOptionDisabled = disabled || child.props.disabled;\n const isOptionActive = child.props.value === activeOptionState;\n return cloneElement(child, {\n disabled: isOptionDisabled,\n active: isOptionActive,\n onClick: () => handleClick(child),\n className: classes([\n 'dropin-action-button-group__option',\n `dropin-action-button-group__option--${variant}`,\n ['dropin-action-button-group__option--active', isOptionActive],\n ['dropin-action-button-group__option--with-dividers', dividers],\n ]),\n });\n }\n );\n\n return (\n <div\n role=\"group\"\n {...props}\n className={classes([\n 'dropin-action-button-group',\n `dropin-action-button-group--${variant}`,\n className,\n ])}\n >\n {buttonGroupOptions}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Card/Card.css';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n children: ComponentChildren | ComponentChildren[];\n}\n\nexport const Card: FunctionComponent<CardProps> = ({\n variant = 'primary',\n className,\n children,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes(['dropin-card', `dropin-card--${variant}`, className])}\n >\n <div class=\"dropin-card__content\">{children}</div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { ChangeEvent, HTMLAttributes, useRef, useState } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Check } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Checkbox/Checkbox.css';\nimport { useEffect } from 'preact/hooks';\n\nexport interface CheckboxProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n name: string;\n size?: 'medium' | 'large';\n disabled?: boolean;\n error?: boolean;\n label?: string | VNode | VNode[];\n description?: string | VNode | VNode[];\n}\n\nexport const Checkbox: FunctionComponent<CheckboxProps> = ({\n name,\n value,\n size = 'medium',\n disabled = false,\n error = false,\n label = '',\n description = '',\n className,\n checked,\n ...props\n}) => {\n const [isChecked, setIsChecked] = useState(\n checked === undefined ? false : checked\n );\n const ref = useRef<HTMLInputElement>(null);\n\n const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {\n props.onChange?.(e);\n setIsChecked(e.currentTarget.checked);\n };\n\n const handleOnKeyDown = (e: KeyboardEvent) => {\n if (e.key === ' ') {\n e.preventDefault();\n ref?.current?.click();\n }\n };\n\n useEffect(() => {\n if (typeof checked === 'boolean') {\n setIsChecked(checked);\n }\n }, [checked]);\n\n return (\n <label\n className={classes([\n 'dropin-checkbox',\n ['dropin-checkbox--disabled', disabled],\n ])}\n >\n <input\n ref={ref}\n name={name}\n value={value}\n type=\"checkbox\"\n disabled={disabled}\n className={classes([\n 'dropin-checkbox__checkbox',\n ['dropin-checkbox__checkbox--error', error],\n className,\n ])}\n {...props}\n onChange={handleCheckboxChange}\n checked={isChecked}\n />\n\n <div className=\"dropin-checkbox__checkbox-icon\">\n {/*Zero-width space character, used to align checkbox properly*/}\n {'\\u200B'}\n <span\n aria-checked={isChecked ? 'true' : 'false'}\n aria-labelledby={`${name}-label`}\n aria-describedby={description ? `${name}-description` : undefined}\n className={classes([\n 'dropin-checkbox__box',\n ['dropin-checkbox__box--error', error],\n ['dropin-checkbox__box--disabled', disabled],\n ])}\n role=\"checkbox\"\n tabIndex={disabled ? -1 : 0}\n onKeyDown={handleOnKeyDown}\n >\n <Icon\n className={classes(['dropin-checkbox__checkmark'])}\n source={Check}\n size=\"16\"\n stroke=\"3\"\n />\n </span>\n </div>\n\n <div\n id={`${name}-label`}\n className={classes([\n 'dropin-checkbox__label',\n `dropin-checkbox__label--${size}`,\n ['dropin-checkbox__label--disabled', disabled],\n ])}\n >\n {label}\n </div>\n\n <div />\n {description && (\n <div\n id={`${name}-description`}\n role={'note'}\n className={classes([\n 'dropin-checkbox__description',\n `dropin-checkbox__description--${size}`,\n ['dropin-checkbox__description--disabled', disabled],\n ])}\n >\n {description}\n </div>\n )}\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useCallback } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ColorSwatch/ColorSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ColorSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label' | 'size'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n size?: 'medium' | 'large';\n color?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ColorSwatch: FunctionComponent<ColorSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n size = 'medium',\n color,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const isValidColor = (color: string) => {\n const colorStyle = new Option().style;\n colorStyle.color = color;\n return colorStyle.color !== ''; // Returns true if the browser accepts this as a valid color\n };\n\n const defaultColor = 'var(--color-gray-300);';\n\n const validColor = color && isValidColor(color) ? color : defaultColor;\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n return (\n <label\n className={classes([\n 'dropin-color-swatch__container',\n `dropin-color-swatch__container--${size}`,\n className,\n ])}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-color-swatch',\n ['dropin-color-swatch--selected', selected],\n ['dropin-color-swatch--disabled', disabled],\n className,\n ])}\n />\n <span\n style={{ '--bg-color': validColor }}\n className={classes([\n 'dropin-color-swatch__span',\n ['dropin-color-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n />\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport {\n HTMLAttributes,\n useState,\n useEffect,\n useRef,\n useCallback,\n} from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/TextSwatch/TextSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface TextSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label: string;\n groupAriaLabel?: string;\n value?: string;\n id: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const TextSwatch: FunctionComponent<TextSwatchProps> = ({\n className,\n name,\n value,\n label,\n groupAriaLabel,\n id,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const [isOverflowing, setIsOverflowing] = useState(false);\n const spanRef = useRef<HTMLLabelElement>(null);\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n useEffect(() => {\n if (\n spanRef.current &&\n spanRef.current.scrollWidth > spanRef.current.clientWidth\n ) {\n setIsOverflowing(true);\n }\n }, [label]);\n\n return (\n <div\n className=\"dropin-text-swatch__container\"\n {...(isOverflowing ? { 'data-tooltip': label } : {})}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-text-swatch',\n ['dropin-text-swatch--selected', selected],\n ['dropin-text-swatch--disabled', disabled],\n className,\n ])}\n />\n <label\n htmlFor={id}\n ref={spanRef}\n className={classes([\n 'dropin-text-swatch__label',\n ['dropin-text-swatch__label--out-of-stock', outOfStock],\n className,\n ])}\n >\n {label}\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/ProgressSpinner/ProgressSpinner.css';\n\n/**\n * @param size this is the size of the spinner ranging in [12px, 24px, 36px, 48px]\n * @param stroke this is the stroke of the spinner ranging in [1px, 2px, 3px, 4px]\n */\nexport interface ProgressSpinnerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n ariaLabel?: string;\n size?: 'small' | 'medium' | 'big' | 'large';\n stroke?: '1' | '2' | '3' | '4';\n}\n\nexport const ProgressSpinner: FunctionComponent<ProgressSpinnerProps> = ({\n ariaLabel,\n size = 'small',\n stroke = '4',\n children,\n className,\n style,\n ...props\n}) => {\n const commonClasses = [\n 'dropin-progress-spinner',\n `dropin-progress-spinner--shape-size-${size}`,\n `dropin-progress-spinner--shape-stroke-${stroke}`,\n ];\n\n const translations = useText({\n updating: 'Dropin.ProgressSpinner.updating.label',\n updatingChildren: 'Dropin.ProgressSpinner.updatingChildren.label',\n });\n\n const handleAriaLabel = () => {\n if (ariaLabel) return ariaLabel;\n return children ? translations.updatingChildren : translations.updating;\n };\n\n return children ? (\n // if we provide children to this component, it should act as a provider in order to add background with low opacity\n <div\n {...props}\n className={classes(['dropin-progress-spinner-provider'])}\n aria-live=\"polite\"\n role=\"status\"\n >\n <div aria-hidden={true}>{children}</div>\n <div\n aria-label={handleAriaLabel()}\n role=\"status\"\n className={classes(['dropin-progress-spinner-background', className])}\n style={style}\n />\n <div\n className={classes([\n 'dropin-progress-spinner-with-provider',\n ...commonClasses,\n ])}\n aria-hidden={true}\n />\n </div>\n ) : (\n // if there are no children, it should be able to be standalone and have no background\n <div\n {...props}\n className={classes([className, ...commonClasses])}\n aria-live=\"polite\"\n role=\"status\"\n aria-label={handleAriaLabel()}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useCallback, JSX, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ImageSwatch/ImageSwatch.css';\nimport { Image, ImageProps } from '@adobe-commerce/elsie/components/Image';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ImageNodeRenderProps extends ImageProps {\n imageSwatchContext: {\n disabled?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n selected?: boolean;\n value?: string;\n label?: string;\n groupAriaLabel?: string;\n name?: string;\n id?: string;\n };\n}\n\nexport interface ImageSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n src: string;\n alt?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n imageNode?: VNode | ((props: ImageNodeRenderProps) => JSX.Element);\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ImageSwatch: FunctionComponent<ImageSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n src,\n alt,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n imageNode,\n onValue,\n onUpdateError,\n ...props\n}) => {\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n const imageProps: ImageProps = useMemo(() => {\n return {\n src,\n alt,\n loading: 'lazy',\n params: { width: 100, fit: 'bounds', crop: true },\n onError: (e: any) => (e.target.style.display = 'none'),\n };\n }, [src, alt]);\n\n return (\n <label className={classes(['dropin-image-swatch__container', className])}>\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-image-swatch',\n ['dropin-image-swatch--selected', selected],\n ['dropin-image-swatch--disabled', disabled],\n className,\n ])}\n />\n\n <span\n className={classes([\n 'dropin-image-swatch__span',\n ['dropin-image-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n >\n {typeof imageNode === 'function' ? (\n imageNode({\n ...imageProps,\n imageSwatchContext: {\n disabled,\n outOfStock,\n selected,\n value,\n label,\n groupAriaLabel,\n name,\n id,\n },\n })\n ) : imageNode || (\n <Image\n {...imageProps}\n className={classes(['dropin-image-swatch__content'])}\n />\n )}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useState, useEffect } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Divider, Icon, IconNode } from '@adobe-commerce/elsie/components';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Accordion/Accordion.css';\nexport interface AccordionSectionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n defaultOpen?: boolean;\n actionIconPosition?: 'left' | 'right';\n ariaLabelTitle: string;\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n renderContentWhenClosed?: boolean;\n onStateChange?: (open: boolean) => void;\n}\n\nexport const AccordionSection: FunctionComponent<AccordionSectionProps> = ({\n className,\n children,\n title,\n ariaLabelTitle,\n secondaryText,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n iconLeft = Add,\n showIconLeft = false,\n renderContentWhenClosed = true,\n defaultOpen,\n onStateChange,\n ...props\n}) => {\n const [open, setOpen] = useState<boolean>(false);\n const onClickHandler = (e: { stopImmediatePropagation: () => void }) => {\n e.stopImmediatePropagation();\n\n const next = !open;\n setOpen(next);\n onStateChange?.(next);\n };\n\n useEffect(() => {\n if (typeof defaultOpen !== 'undefined') {\n setOpen(defaultOpen);\n }\n }, [defaultOpen]);\n\n const buttonLabel = useText(\n `Dropin.Accordion.${open ? 'close' : 'open'}.label`\n ).label;\n\n const openIcon = (\n <Icon\n source={iconOpen}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__open-icon'}\n />\n );\n\n const closeIcon = (\n <Icon\n source={iconClose}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__close-icon'}\n />\n );\n\n const leftIcon = <Icon source={iconLeft} size=\"24\" />;\n\n return (\n <div\n {...props}\n className={classes(['dropin-accordion-section', className])}\n >\n <div className={'dropin-accordion-section__heading'}>\n <div\n className={'dropin-accordion-section__flex'}\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n role=\"button\"\n aria-label={`${buttonLabel} ${ariaLabelTitle ?? title}`}\n tabIndex={0}\n >\n <div className={'dropin-accordion-section__title-container'}>\n {actionIconPosition === 'left' && (open ? closeIcon : openIcon)}\n\n {showIconLeft && leftIcon}\n\n <h3 className={'dropin-accordion-section__title'}>{title}</h3>\n </div>\n </div>\n\n <div className={'dropin-accordion-section__secondary-text-container'}>\n {secondaryText && (\n <h4 className={'dropin-accordion-section__secondary-text'}>\n {secondaryText}\n </h4>\n )}\n\n {actionIconPosition === 'right' && (open ? closeIcon : openIcon)}\n </div>\n </div>\n\n <div\n className={'dropin-accordion-section__content-container'}\n style={{ display: open ? 'grid' : 'none' }}\n >\n {(open || (renderContentWhenClosed && !open)) && children}\n </div>\n </div>\n );\n};\n\nexport interface AccordionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n actionIconPosition?: 'left' | 'right';\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n children: VNode<AccordionSectionProps>[] | VNode<AccordionSectionProps>;\n}\n\nexport const Accordion: FunctionComponent<AccordionProps> = ({\n className,\n children,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n ...props\n}) => {\n const divider = <Divider variant=\"secondary\" />;\n\n const renderAccordionSection = (child: VNode<AccordionSectionProps>) => (\n <>\n <AccordionSection\n {...child.props}\n actionIconPosition={actionIconPosition}\n iconOpen={iconOpen}\n iconClose={iconClose}\n />\n {divider}\n </>\n );\n\n return (\n <div {...props} className={classes(['dropin-accordion', className])}>\n {[\n divider,\n ...(\n (Array.isArray(children)\n ? children\n : [children]) as VNode<AccordionSectionProps>[]\n ).map(renderAccordionSection),\n ]}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InLineAlert/InLineAlert.css';\nexport interface InLineAlertProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n variant?: 'primary' | 'secondary';\n heading: string;\n description?: string;\n type?: 'error' | 'warning' | 'success';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n additionalActions?: Array<{\n label: string;\n onClick: (event: Event) => void;\n }>;\n onDismiss?: (event: Event) => void;\n itemList?: VNode;\n actionButtonPosition?: 'top' | 'bottom';\n}\n\nexport const InLineAlert: FunctionComponent<InLineAlertProps> = ({\n variant = 'primary',\n className,\n type = 'warning',\n additionalActions,\n onDismiss,\n heading,\n description,\n icon,\n itemList,\n actionButtonPosition,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n 'dropin-in-line-alert',\n `dropin-in-line-alert--${type}`,\n `dropin-in-line-alert--${variant}`,\n className,\n ])}\n >\n <div className={'dropin-in-line-alert__heading'}>\n <div className={'dropin-in-line-alert__title-container'}>\n {icon && (\n <VComponent node={icon} className={'dropin-in-line-alert__icon'} />\n )}\n\n <span className={'dropin-in-line-alert__title'}>{heading}</span>\n </div>\n\n <div className={'dropin-in-line-alert__actions-container'}>\n {additionalActions &&\n (actionButtonPosition === 'top' ||\n (!actionButtonPosition && additionalActions.length <= 1)) && (\n <Button\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={\n additionalActions.length > 0\n ? additionalActions[0]?.onClick\n : undefined\n }\n aria-label={additionalActions[0]?.label}\n >\n {additionalActions[0]?.label}\n </Button>\n )}\n {onDismiss && (\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className={'dropin-in-line-alert__dismiss-button'}\n variant=\"tertiary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n )}\n </div>\n </div>\n\n {description && (\n <p className={'dropin-in-line-alert__description'}>{description}</p>\n )}\n <div className={'dropin-in-line-alert__item-list-container'}>\n {itemList && (\n <VComponent\n node={itemList}\n className={classes(['dropin-in-line-alert__item-list'])}\n />\n )}\n </div>\n {additionalActions &&\n (actionButtonPosition === 'bottom' ||\n (!actionButtonPosition && additionalActions.length > 1)) && (\n <div className={'dropin-in-line-alert__additional-actions-container'}>\n {additionalActions.map((action) => (\n <Button\n key={action.label}\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, render } from 'preact';\nimport { FunctionComponent, useEffect, useRef } from 'preact/compat';\n\ninterface PortalProps {\n children: ComponentChildren;\n}\n\nexport const Portal: FunctionComponent<PortalProps> = ({ children }) => {\n const portalRoot = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n // Create portal root if it doesn't exist\n if (!portalRoot.current) {\n portalRoot.current = document.createElement('div');\n portalRoot.current.setAttribute('data-portal-root', '');\n portalRoot.current.classList.add('dropin-design');\n document.body.appendChild(portalRoot.current);\n }\n\n // Render children into portal root\n render(children, portalRoot.current);\n\n // Cleanup\n return () => {\n if (portalRoot.current) {\n render(null, portalRoot.current);\n portalRoot.current.remove();\n portalRoot.current = null;\n }\n };\n }, [children]);\n\n return null;\n}; ","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport {\n FunctionComponent,\n HTMLAttributes,\n useCallback,\n useEffect,\n} from 'preact/compat';\nimport { Button } from '../Button';\nimport { Close as CloseSVG } from '@adobe-commerce/elsie/icons';\nimport { VNode } from 'preact';\nimport { Portal } from '../Portal/Portal';\n\nimport '@adobe-commerce/elsie/components/Modal/Modal.css';\n\nexport interface ModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size' | 'title'> {\n size?: 'small' | 'medium' | 'full';\n title?: VNode;\n centered?: boolean;\n onClose?: () => void;\n backgroundDim?: boolean;\n clickToDismiss?: boolean;\n escapeToDismiss?: boolean;\n showCloseButton?: boolean;\n}\n\nexport const Modal: FunctionComponent<ModalProps> = ({\n size = 'small',\n title = null,\n centered = false,\n backgroundDim = true,\n clickToDismiss = true,\n escapeToDismiss = true,\n onClose,\n showCloseButton = true,\n className,\n children = null,\n ...props\n}) => {\n const handleOnClose = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const translations = useText({\n modalCloseLabel: 'Dropin.Modal.Close.label',\n });\n\n // Close on background click\n useEffect(() => {\n const handleOutsideClick = (event: MouseEvent) => {\n const modal = document.querySelector('.dropin-modal');\n const modalBody = document.querySelector('.dropin-modal__body');\n\n if (\n clickToDismiss &&\n modal &&\n modalBody &&\n !modalBody.contains(event.target as Node)\n ) {\n handleOnClose();\n }\n };\n\n document.addEventListener('mousedown', handleOutsideClick);\n\n return () => {\n document.removeEventListener('mousedown', handleOutsideClick);\n };\n }, [handleOnClose, clickToDismiss]);\n\n // Close on ESC\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && escapeToDismiss) {\n handleOnClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleOnClose, escapeToDismiss]);\n\n // Prevent document scrolling\n useEffect(() => {\n const scrollingElement = document.scrollingElement as HTMLElement;\n\n const defaultOverflowValue = scrollingElement.style.overflow;\n\n scrollingElement.style.overflow = 'hidden';\n\n return () => {\n scrollingElement.style.overflow = defaultOverflowValue;\n };\n }, []);\n\n return (\n <Portal>\n <div\n className={classes([\n 'dropin-modal',\n ['dropin-modal--dim', backgroundDim],\n ])}\n >\n <div\n {...props}\n className={classes([\n 'dropin-modal__body',\n [`dropin-modal__body--${size}`, size],\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-modal__header',\n ['dropin-modal__header-title', !!title],\n ])}\n >\n {title && (\n <div className={classes(['dropin-modal__header-title-content'])}>\n {title}\n </div>\n )}\n\n {showCloseButton && (\n <Button\n aria-label={translations.modalCloseLabel}\n variant=\"tertiary\"\n className=\"dropin-modal__header-close-button\"\n onClick={handleOnClose}\n icon={<CloseSVG />}\n />\n )}\n </div>\n\n <div\n className={classes([\n 'dropin-modal__content',\n ['dropin-modal__body--centered', centered],\n ])}\n >\n {children}\n </div>\n </div>\n </div>\n </Portal>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useContext } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Button,\n CartItemSkeleton,\n Icon,\n Incrementer,\n UIContext,\n ProgressSpinner,\n Picker,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Trash } from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/CartItem/CartItem.css';\n\nexport interface CartItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'loading'> {\n ariaLabel?: string;\n image?: VNode;\n title?: VNode;\n price?: VNode;\n taxIncluded?: boolean;\n taxExcluded?: boolean;\n total?: VNode;\n totalExcludingTax?: VNode;\n sku?: VNode;\n quantity?: number;\n description?: VNode;\n attributes?: VNode;\n footer?: VNode;\n configurations?: { [key: string]: any };\n warning?: VNode;\n alert?: VNode;\n discount?: VNode;\n savings?: VNode;\n actions?: VNode;\n loading?: boolean;\n updating?: boolean;\n onRemove?: () => void;\n onQuantity?: (value: number) => void;\n quantityType?: 'stepper' | 'dropdown';\n dropdownOptions?: { value: string; text: string }[];\n}\n\nexport const CartItem: FunctionComponent<CartItemProps> = ({\n className,\n children,\n ariaLabel,\n image,\n title,\n price,\n taxIncluded = false,\n taxExcluded = false,\n total,\n totalExcludingTax,\n sku,\n configurations,\n warning,\n alert,\n discount,\n savings,\n actions,\n quantity,\n description,\n attributes,\n footer,\n loading = false,\n updating = false,\n quantityType,\n dropdownOptions,\n onQuantity,\n onRemove,\n ...props\n}) => {\n const { locale } = useContext(UIContext);\n\n const labels = useText({\n each: 'Dropin.CartItem.each.label',\n pricePerItem: 'Dropin.CartItem.pricePerItem.label',\n quantity: 'Dropin.CartItem.quantity.label',\n remove: 'Dropin.CartItem.remove.label',\n removeDefault: 'Dropin.CartItem.removeDefault.label',\n taxIncluded: 'Dropin.CartItem.taxIncluded.label',\n taxExcluded: 'Dropin.CartItem.taxExcluded.label',\n updating: 'Dropin.CartItem.updating.label',\n updatingDefault: 'Dropin.ProgressSpinner.updating.label',\n });\n\n if (loading) return <CartItemSkeleton />;\n\n const quantityComponent =\n quantityType === 'dropdown' ? (\n <Picker\n className={classes(['dropin-cart-item__quantity__picker'])}\n value={String(quantity)}\n name=\"quantity\"\n aria-label={labels.quantity}\n disabled={updating}\n variant={'primary'}\n options={dropdownOptions}\n handleSelect={(event) =>\n onQuantity?.(Number((event.target as HTMLSelectElement).value))\n }\n />\n ) : (\n <Incrementer\n className={classes(['dropin-cart-item__quantity__incrementer'])}\n value={quantity}\n min={1}\n onValue={(value) => onQuantity?.(Number(value))}\n name=\"quantity\"\n aria-label={labels.quantity}\n disabled={updating}\n />\n );\n\n return (\n <div\n {...props}\n className={classes([\n 'dropin-cart-item',\n ['dropin-cart-item--updating', updating],\n className,\n ])}\n >\n {updating && (\n <ProgressSpinner\n className={classes(['dropin-cart-item__spinner'])}\n ariaLabel={\n ariaLabel\n ? labels.updating?.replace('{product}', ariaLabel)\n : labels.updatingDefault\n }\n />\n )}\n <div className=\"dropin-cart-item__wrapper\">\n {\n /* Image */\n image && (\n <VComponent\n node={image}\n className={classes(['dropin-cart-item__image'])}\n />\n )\n }\n\n {\n /* Title */\n title && (\n <VComponent\n node={title}\n className={classes([\n 'dropin-cart-item__title',\n ['dropin-cart-item__title--edit', !!onQuantity || !!onRemove],\n ])}\n />\n )\n }\n\n {\n /* Description */\n description && (\n <VComponent\n node={description}\n className={classes(['dropin-cart-item__description'])}\n />\n )\n }\n\n {\n /* SKU */\n sku && (\n <VComponent\n node={sku}\n className={classes(['dropin-cart-item__sku'])}\n />\n )\n }\n <div className={classes(['dropin-cart-item__savings__wrapper'])}>\n {/* Discount amount */}\n {discount && (\n <VComponent\n node={discount}\n className={classes([\n 'dropin-cart-item__discount',\n 'dropin-cart-item__discount__large-screen',\n ])}\n />\n )}\n\n {/* Savings amount */}\n {savings && (\n <VComponent\n node={savings}\n className={classes([\n 'dropin-cart-item__savings',\n 'dropin-cart-item__savings__large-screen',\n ])}\n />\n )}\n </div>\n\n {/* Product Attributes */}\n {attributes && (\n <div className={classes(['dropin-cart-item__attributes'])}>\n <VComponent node={attributes} />\n </div>\n )}\n\n {\n /* Configurations */\n configurations && (\n <ul className={classes(['dropin-cart-item__configurations'])}>\n {Object.entries(configurations).map(([key, value]) => (\n <li\n key={key}\n className={classes([\n 'dropin-cart-item__configurations__item',\n ])}\n >\n {key}:{' '}\n <strong\n className={classes([\n 'dropin-cart-item__configurations__item__value',\n ])}\n >\n {value}\n </strong>\n </li>\n ))}\n </ul>\n )\n }\n\n {\n /* Price */\n price && (\n <span\n className={classes(['dropin-cart-item__price'])}\n aria-label={labels.pricePerItem}\n >\n {quantity && !onQuantity && (\n <>\n <span\n className=\"dropin-cart-item__price__quantity\"\n aria-hidden={true}\n >\n {quantity.toLocaleString(locale)} x{' '}\n </span>\n\n <div className=\"dropin-cart-item__sr-only\">\n {labels.quantity}: {quantity?.toLocaleString(locale)};\n </div>\n </>\n )}\n\n <VComponent node={price} role=\"text\" />\n\n {quantity && quantity > 1 && (\n <>\n &nbsp;\n {labels.each}\n </>\n )}\n\n {taxIncluded && (\n <span\n data-testid=\"tax-message\"\n className=\"dropin-cart-item__price-tax-message\"\n >\n &nbsp;\n {labels.taxIncluded}\n </span>\n )}\n\n {taxExcluded && (\n <span\n data-testid=\"tax-message\"\n className=\"dropin-cart-item__price-tax-message\"\n >\n &nbsp;\n {labels.taxExcluded}\n </span>\n )}\n </span>\n )\n }\n\n {/* Quantity */}\n <div\n className={classes([\n 'dropin-cart-item__quantity',\n ['dropin-cart-item__quantity--edit', !!onQuantity],\n ])}\n >\n {onQuantity\n ? quantityComponent\n : quantity && (\n <span\n className={classes(['dropin-cart-item__quantity__value'])}\n >\n {labels.quantity}:{' '}\n <strong className=\"dropin-cart-item__quantity__number\">\n {Number(quantity).toLocaleString(locale)}\n </strong>\n </span>\n )}\n\n {/* Warning */}\n {warning && (\n <VComponent\n node={warning}\n className={classes([\n 'dropin-cart-item__warning',\n 'dropin-cart-item__warning--quantity',\n ])}\n />\n )}\n\n {/* Alert */}\n {alert && (\n <VComponent\n node={alert}\n className={classes([\n 'dropin-cart-item__alert',\n 'dropin-cart-item__alert--quantity',\n ])}\n />\n )}\n </div>\n\n {/* Actions */}\n {actions && (\n <div className={classes(['dropin-cart-item__actions'])}>\n {\n <VComponent\n node={actions}\n className={classes(['dropin-cart-item__buttons'])}\n />\n }\n </div>\n )}\n\n {/* Warning */}\n {warning && (\n <VComponent\n node={warning}\n className={classes(['dropin-cart-item__warning'])}\n />\n )}\n\n {/* Alert */}\n {alert && (\n <VComponent\n node={alert}\n className={classes(['dropin-cart-item__alert'])}\n />\n )}\n\n {/* Total */}\n <div\n className={classes([\n 'dropin-cart-item__total',\n ['dropin-cart-item__total--edit', !!onRemove],\n ])}\n >\n <div className=\"dropin-cart-item__row-total__wrapper\">\n {\n /* Total */\n total && (\n <div className=\"dropin-cart-item__row-total\">\n <VComponent node={total} role=\"text\" />\n </div>\n )\n }\n\n {taxIncluded && (\n <div className=\"dropin-cart-item__total-tax-included\">\n <span\n data-testid=\"tax-message\"\n className={classes(['dropin-cart-item__total-tax-message'])}\n >\n {labels.taxIncluded}\n </span>\n </div>\n )}\n </div>\n {taxExcluded && (\n <div className=\"dropin-cart-item__total-tax-excluded\">\n <span\n data-testid=\"tax-message\"\n className={classes([\n 'dropin-cart-item__total-tax-excluded-message',\n ])}\n >\n {totalExcludingTax && (\n <VComponent node={totalExcludingTax} role=\"text\" />\n )}\n &nbsp;\n {labels.taxExcluded}\n </span>\n </div>\n )}\n\n {/* Discount amount */}\n {discount && (\n <VComponent\n node={discount}\n className={classes(['dropin-cart-item__discount'])}\n />\n )}\n\n {/* Savings amount */}\n {savings && (\n <VComponent\n node={savings}\n className={classes(['dropin-cart-item__savings'])}\n />\n )}\n </div>\n\n {/* Footer */}\n {footer && (\n <VComponent node={footer} className={classes(['dropin-cart-item__footer'])} />\n )}\n </div>\n\n {/* Remove Item */}\n {onRemove && (\n <Button\n data-testid=\"cart-item-remove-button\"\n className={classes(['dropin-cart-item__remove'])}\n variant=\"tertiary\"\n onClick={() => onRemove?.()}\n icon={\n <Icon\n data-testid=\"cart-item-remove-icon\"\n source={Trash}\n size=\"24\"\n stroke=\"2\"\n viewBox=\"0 0 24 24\"\n aria-label={\n ariaLabel\n ? labels.remove?.replace('{product}', ariaLabel)\n : labels.removeDefault\n }\n />\n }\n disabled={updating}\n />\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport const CartItemSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-cart-item dropin-cart-item-skeleton\">\n <Skeleton className=\"dropin-cart-item__skeleton dropin-cart-item__wrapper\">\n <div className=\"dropin-cart-item__image\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__title\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__sku\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__price\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__quantity\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__total\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, Children } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/CartList/CartList.css';\n\nexport interface CartListProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport const CartList: FunctionComponent<CartListProps> = ({\n className,\n children,\n ...props\n}) => {\n return (\n <div {...props} className={classes(['dropin-cart-list', className])}>\n <div\n className=\"dropin-cart-list__wrapper\"\n aria-live=\"assertive\"\n aria-relevant=\"all\"\n >\n {Children.map(children, (child, key) => {\n return (\n <div key={key} className=\"dropin-cart-list__item\">\n {child}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/PriceRange/PriceRange.css';\nimport { Price } from '@adobe-commerce/elsie/components/Price';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface PriceRangeProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n locale?: string;\n currency?: string;\n amount?: number; // simple product\n variant?: 'default' | 'strikethrough';\n minimumAmount?: number; // configurable product\n maximumAmount?: number; // configurable product\n display?: 'dash' | 'from to' | 'as low as';\n size?: 'small' | 'medium' | 'large';\n specialPrice?: number;\n sale?: boolean;\n}\n\nexport const PriceRange: FunctionComponent<PriceRangeProps> = ({\n className,\n children,\n locale,\n currency,\n amount,\n variant = 'default',\n minimumAmount,\n maximumAmount,\n size = 'small',\n display = 'dash',\n specialPrice,\n sale = false,\n ...props\n}) => {\n const isSimpleProduct = useMemo(\n () =>\n amount ||\n minimumAmount === maximumAmount ||\n (minimumAmount && !maximumAmount) ||\n (maximumAmount && !minimumAmount),\n [amount, maximumAmount, minimumAmount]\n );\n\n return (\n <div>\n {/* Simple product price or when configurable product minimum price equals to maximum price */}\n {isSimpleProduct ? (\n <div {...props} className={classes(['dropin-price-range', className])}>\n <Price\n amount={amount ?? minimumAmount ?? maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant={variant}\n sale={sale}\n />\n </div>\n ) : (\n <div {...props} className={classes(['dropin-price-range', className])}>\n {display === 'dash' ? (\n <Dashed\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'from to' ? (\n <FromTo\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'as low as' ? (\n <SpecialPrice\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n </div>\n )}\n </div>\n );\n};\n\n// Variations\n\nfunction Dashed({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n return (\n <>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span className=\"dropin-price-range__separator\">-</span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction FromTo({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__from',\n `dropin-price-range__from--${size}`,\n ])}\n >\n {translations.from}\n </span>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span\n className={classes([\n 'dropin-price-range__to',\n `dropin-price-range__to--${size}`,\n ])}\n >\n {translations.to}\n </span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction SpecialPrice({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__as-low-as',\n `dropin-price-range__as-low-as--${size}`,\n ])}\n >\n {translations.asLowAs}\n </span>\n {specialPrice ? (\n <div>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant=\"strikethrough\"\n />\n <Price\n amount={specialPrice}\n currency={currency}\n locale={locale}\n size={size}\n className=\"dropin-price-range__special\"\n sale={!!specialPrice && sale}\n />\n </div>\n ) : (\n <Price\n amount={minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n )}\n </>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes } from 'preact/compat';\nimport { FunctionComponent, VNode } from 'preact';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Breadcrumbs/Breadcrumbs.css';\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {\n categories: VNode[];\n separator?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const Breadcrumbs: FunctionComponent<BreadcrumbsProps> = ({\n className,\n categories,\n separator,\n ...props\n}) => {\n return (\n <>\n {categories?.length > 1 && (\n <nav\n role=\"navigation\"\n {...props}\n className={classes(['dropin-breadcrumbs__container', className])}\n >\n <ul className=\"dropin-breadcrumbs__items\">\n {categories?.map((category: VNode, index: number) => {\n return (\n <li\n key={index}\n className={classes([\n 'dropin-breadcrumbs__item',\n [\n 'dropin-breadcrumbs__item--last',\n index === categories.length - 1,\n ],\n ])}\n >\n <VComponent\n node={category}\n className=\"dropin-breadcrumbs__link\"\n />\n {!separator && index !== categories.length - 1 && (\n <span className=\"dropin-breadcrumbs__separator--default\">\n {' '}\n /{' '}\n </span>\n )}\n {separator && index !== categories.length - 1 && (\n <VComponent\n node={separator}\n className=\"dropin-breadcrumbs__separator--icon\"\n />\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n )}\n </>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/AlertBanner/AlertBanner.css';\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface AlertBannerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n variant: 'brand' | 'neutral' | 'success' | 'warning';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n message: VNode;\n onDismiss: () => void;\n action?: {\n label: string;\n onClick: (event: Event) => void;\n };\n}\n\nexport const AlertBanner: FunctionComponent<AlertBannerProps> = ({\n className,\n variant,\n icon,\n message,\n onDismiss,\n action,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n className,\n 'dropin-alert-banner',\n `dropin-alert-banner--${variant}`,\n ])}\n >\n <div className={'dropin-alert-banner__content'}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n className={'dropin-alert-banner__icon'}\n />\n )}\n\n {/* Message */}\n <VComponent\n node={message}\n className={classes(['dropin-alert-banner__message'])}\n />\n </div>\n\n <div className={'dropin-alert-banner__actions'}>\n {action && (\n <Button\n variant=\"tertiary\"\n className={'dropin-alert-banner__action'}\n onClick={action.onClick}\n aria-label={action.label}\n >\n {action.label}\n </Button>\n )}\n\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className=\"dropin-alert-banner__dismiss-button\"\n variant=\"primary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, JSX } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/IllustratedMessage/IllustratedMessage.css';\nimport { Card } from '@adobe-commerce/elsie/components';\n\nexport interface IllustratedMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n heading?: string;\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n message?: VNode<HTMLAttributes<HTMLElement>>;\n action?: VNode;\n variant?: 'primary' | 'secondary';\n}\n\nexport const IllustratedMessage: FunctionComponent<IllustratedMessageProps> = ({\n className,\n icon,\n heading,\n headingLevel = 2,\n message,\n action,\n variant = 'secondary',\n ...props\n}) => {\n const Heading =\n headingLevel >= 1 && headingLevel <= 6\n ? (`h${headingLevel}` as keyof JSX.IntrinsicElements)\n : 'h2';\n\n return (\n <div\n {...props}\n className={classes(['dropin-illustrated-message', className])}\n >\n <Card variant={variant}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n size=\"80\"\n className=\"dropin-illustrated-message__icon\"\n />\n )}\n\n {heading && (\n <Heading className=\"dropin-illustrated-message__heading\">\n {heading}\n </Heading>\n )}\n\n {message && (\n <VComponent\n node={message}\n className=\"dropin-illustrated-message__message\"\n />\n )}\n\n {action && (\n <VComponent\n node={action}\n className=\"dropin-illustrated-message__action\"\n />\n )}\n </Card>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ToggleButton/ToggleButton.css';\nimport { RadioButton } from '@adobe-commerce/elsie/components';\n\nexport interface ToggleButtonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n busy?: boolean;\n icon?:\n | VNode<HTMLAttributes<SVGSVGElement>>\n | VNode<HTMLAttributes<HTMLImageElement>>;\n onChange?: (value: string) => void;\n selected?: boolean;\n}\n\nexport const ToggleButton: FunctionComponent<ToggleButtonProps> = ({\n label,\n name,\n value,\n busy = false,\n children,\n className,\n icon,\n onChange,\n selected = true,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes([\n 'dropin-toggle-button',\n className,\n ['dropin-toggle-button__selected', selected],\n ])}\n >\n <label className=\"dropin-toggle-button__actionButton\">\n <RadioButton\n label=\"\"\n name={name}\n value={value}\n checked={selected}\n onChange={() => onChange && onChange(value)}\n aria-label={name}\n busy={busy}\n className={classes([className, 'dropin-toggle-button__radioButton'])}\n />\n\n <span className=\"dropin-toggle-button__content\">\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon?.props}\n className=\"dropin-toggle-button__icon\"\n />\n )}\n {label}\n </span>\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { Divider } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/Header/Header.css';\n\nexport interface HeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n title: string;\n size?: 'medium' | 'large';\n divider?: boolean;\n cta?: VNode;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nconst Heading = ({\n level,\n className,\n children,\n}: {\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n className?: string;\n children?: ComponentChildren;\n}) => {\n const HeadingTag = level && level >= 1 && level <= 6\n ? `h${level}` as keyof JSX.IntrinsicElements\n : 'span';\n\n return <HeadingTag className={className}>{children as any}</HeadingTag>;\n};\n\nexport const Header: FunctionComponent<HeaderProps> = ({\n title = null,\n size = 'medium',\n cta,\n divider = true,\n className,\n level,\n ...props\n}) => {\n if (!title) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-header-container', className])}\n data-testid=\"dropin-header-container\"\n >\n <Heading\n className={classes([\n 'dropin-header-container__title',\n ['dropin-header-container__title--medium', size === 'medium'],\n ['dropin-header-container__title--large', size === 'large'],\n ])}\n level={level}\n >\n {title}\n </Heading>\n {cta ? (\n <VComponent node={cta} className=\"dropin-header-container__actions\" />\n ) : null}\n {divider ? (\n <Divider\n className={classes([\n 'dropin-header-container__divider',\n ['dropin-header-container__divider--medium', size === 'medium'],\n ['dropin-header-container__divider--large', size === 'large'],\n ])}\n />\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/Tag/Tag.css';\n\nexport interface TagProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon'> {\n label?: string;\n children?: VNode | VNode[];\n}\n\nexport const Tag: FunctionComponent<TagProps> = ({\n label,\n className,\n children,\n ...props\n}) => {\n if (!label && !children) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-tag-container', className])}\n data-testid=\"dropin-tag-container\"\n >\n {children ?? <span className=\"dropin-tag-container__label\">{label}</span>}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ContentGrid/ContentGrid.css';\n\nexport interface ContentGridProps extends HTMLAttributes<HTMLDivElement> {\n emptyGridContent: VNode;\n maxColumns?: number;\n columnWidth?: string;\n}\n\nexport const ContentGrid: FunctionComponent<ContentGridProps> = ({\n className,\n children,\n maxColumns,\n columnWidth = '1fr',\n emptyGridContent,\n ...props\n}) => {\n const hasChildren =\n !!children && (Array.isArray(children) ? children.length > 0 : true);\n\n const additionalStyles = hasChildren\n ? {\n gridTemplateColumns: `repeat(${maxColumns}, ${columnWidth})`,\n }\n : undefined;\n\n return (\n <div\n {...props}\n className={classes(['dropin-content-grid', className])}\n tabindex={0}\n >\n <div\n data-testid=\"content-grid-content\"\n className={classes([\n 'dropin-content-grid__content',\n ['dropin-content-grid__dynamic-columns-content', !maxColumns],\n ['dropin-content-grid__content--empty', !hasChildren],\n ])}\n style={additionalStyles}\n >\n {hasChildren ? children : emptyGridContent}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes, isNumber } from '@adobe-commerce/elsie/lib';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Pagination/Pagination.css';\n\nexport interface PaginationProps {\n className?: string;\n currentPage?: number;\n totalPages?: number;\n onChange?: (currentPage: number) => void;\n}\n\nexport type PaginationList = {\n page: number | string;\n isActive: boolean;\n label: number | string;\n};\n\nexport const Pagination: FunctionComponent<PaginationProps> = ({\n totalPages = 10,\n currentPage = 1,\n onChange,\n className,\n ...props\n}) => {\n const translations = useText({\n backwardButton: 'Dropin.Pagination.backwardButton.ariaLabel',\n forwardButton: 'Dropin.Pagination.forwardButton.ariaLabel',\n });\n\n const handleForward = useCallback(() => {\n const nextPage = Math.min(currentPage + 1, totalPages);\n\n onChange?.(nextPage);\n }, [currentPage, onChange, totalPages]);\n\n const handleBackward = useCallback(() => {\n const prevPage = Math.max(currentPage - 1, 1);\n\n onChange?.(prevPage);\n }, [currentPage, onChange]);\n\n const handleSetPage = useCallback(\n (currentPage: number | string) => {\n if (isNumber(currentPage)) {\n onChange?.(currentPage as number);\n }\n },\n [onChange]\n );\n\n const createPages = useCallback(\n (currentPage: number, totalPages: number): PaginationList[] => {\n let pages: PaginationList[] = [];\n\n const addPageRange = (start: number, end: number) => {\n for (let i = start; i <= end; i++) {\n pages.push({ page: i, isActive: i === currentPage, label: i });\n }\n };\n\n if (totalPages <= 5) {\n addPageRange(1, totalPages);\n } else if (currentPage <= 2) {\n addPageRange(1, 2);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n } else if (currentPage >= totalPages - 3) {\n addPageRange(totalPages - 4, totalPages);\n } else {\n addPageRange(currentPage - 1, currentPage);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n }\n\n return pages;\n },\n []\n );\n\n const paginationList: PaginationList[] = useMemo(\n () => createPages(currentPage, totalPages),\n [createPages, currentPage, totalPages]\n );\n\n return (\n <div {...props} className={classes(['dropin-pagination', className])}>\n <button\n type=\"button\"\n data-testid=\"prev-button\"\n aria-label={translations.backwardButton}\n disabled={currentPage === 1}\n onClick={handleBackward}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--backward',\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </button>\n <ul className=\"dropin-pagination_list\">\n {(paginationList as PaginationList[]).map((item, index) => (\n <li\n data-testid={`dropin-pagination_list-item--${item.page}`}\n key={`${item.page}_${index}`}\n className={classes([\n 'dropin-pagination_list-item',\n `dropin-pagination_list-item--${item.page}`,\n [`dropin-pagination_list-item--active`, item.isActive],\n ])}\n >\n <button\n type=\"button\"\n data-testid={`set-page-button-${item.page}`}\n onClick={() => handleSetPage(item.page)}\n >\n {item.label}\n </button>\n </li>\n ))}\n </ul>\n <button\n type=\"button\"\n data-testid=\"next-button\"\n aria-label={translations.forwardButton}\n disabled={currentPage === totalPages}\n onClick={handleForward}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--forward',\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton.css';\n\nexport const ProductItemCardSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-product-item-card dropin-product-item-card-skeleton\">\n <Skeleton className=\"dropin-product-item-card__skeleton dropin-product-item-card__image-container\">\n <SkeletonRow\n fullWidth={true}\n className=\"dropin-product-item-card__skeleton__image\"\n />\n <div className=\"dropin-product-item-card__content dropin-product-item-card__skeleton__content\">\n <SkeletonRow\n fullWidth={true}\n size=\"large\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n <SkeletonRow\n fullWidth={true}\n size=\"small\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n </div>{' '}\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { ProductItemCardSkeleton } from '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCard.css';\n\nexport interface ProductItemCardProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n image?: VNode;\n titleNode?: VNode;\n price?: VNode;\n sku?: VNode;\n actionButton?: VNode;\n swatches?: VNode;\n initialized?: boolean;\n}\n\nexport const ProductItemCard: FunctionComponent<ProductItemCardProps> = ({\n className,\n image,\n titleNode,\n price,\n sku,\n actionButton,\n swatches,\n initialized = false,\n ...props\n}) => {\n if (!initialized) {\n return <ProductItemCardSkeleton />;\n }\n return (\n <div\n {...props}\n className={classes(['dropin-product-item-card', className])}\n >\n <div className=\"dropin-product-item-card__image-container\">\n {image && (\n <VComponent\n node={image}\n className={classes(['dropin-product-item-card__image'])}\n />\n )}\n </div>\n <div className=\"dropin-product-item-card__content\">\n {titleNode && (\n <VComponent\n node={titleNode}\n className={classes(['dropin-product-item-card__title'])}\n />\n )}\n {sku && (\n <VComponent\n node={sku}\n className={classes(['dropin-product-item-card__sku'])}\n />\n )}\n {price && (\n <div className=\"dropin-product-item-card__price\">\n <VComponent\n node={price}\n className={classes(['dropin-product-item-card__price'])}\n />\n </div>\n )}\n {swatches && (\n <div className=\"dropin-product-item-card__swatches\">\n <VComponent\n node={swatches}\n className={classes(['dropin-product-item-card__swatches'])}\n />\n </div>\n )}\n {actionButton && (\n <div className=\"dropin-product-item-card__action\">\n <VComponent\n node={actionButton}\n className={classes(['dropin-product-item-card__action'])}\n />\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"file":"components.js"}