@dropins/tools 1.9.0-beta.3 → 2.0.0-alpha-20260608090548
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -19
- package/chunks/Image.js +1 -1
- package/chunks/Image.js.map +1 -1
- package/components.js +1 -1
- package/components.js.map +1 -1
- package/package.json +1 -1
- package/recaptcha.js +3 -3
- package/recaptcha.js.map +1 -1
- package/types/elsie/src/i18n/en_US.json.d.ts +1 -0
- package/types/elsie/src/i18n/index.d.ts +3 -0
package/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"ynBAwBA,MAAMA,GAAa,EAENC,EAAmD,CAAC,CAC/D,UAAAC,EACA,UAAAC,EAAY,GACZ,MAAAC,EAAQJ,GACR,KAAAK,EAAO,QACP,QAAAC,EAAU,MACV,SAAAC,EAAW,KACX,aAAAC,EAAe,SACf,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAgB,CACpB,CAAC,wBAAwBJ,CAAO,GAAIA,CAAO,EAC3C,CAAC,wBAAwBA,CAAO,IAAID,CAAI,GAAIC,GAAWD,CAAI,GAG7D,GAAI,CAACE,GAAYD,IAAY,QAC3B,OACEK,EAAC,OACC,UAAWC,EAAQ,CACjB,iDACAV,CAAA,CACD,IAKP,GAAIK,EAAU,CACZ,MAAMM,EAAMN,EAAS,OACrB,OACEI,EAAC,OACE,GAAGF,EACJ,MAAOG,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvCD,CAAA,CACD,EAED,wBAAyB,CAAE,OAAQW,CAAA,CAAI,EAG7C,CAIA,OAFoBT,EAAQJ,KAER,GAEhBW,EAAC,OACE,GAAGF,EACJ,MAAOG,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvC,gCACA,GAAGO,EACHR,CAAA,CACD,IAMLS,EAAC,OACE,GAAGF,EACJ,MAAO,CAAE,0BAA2B,iBAAiBD,CAAY,KACjE,M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ACA,CAAC,qCAAsCyZ,CAAM,EAC9C,GACH,IAGDA,GACC9V,EAAC,OACC,UAAU,gCACV,cAAY,wBAEX,UAAAgV,EAAgB,OAAS,GAAKmD,GAAA,EAE/B/b,EAAC,OACC,IAAK+Y,EACL,UAAU,+BACV,cAAY,uBACZ,MAAO,CAAE,UAAW,GAAGU,CAAS,MAChC,SAAU,EACV,KAAK,SACL,aAAYlT,EAAa,sBAExB,SAAAqS,EAAgB,SAAW,EAC1BhV,EAAC,OACC,UAAU,kCACV,cAAY,0BACZ,KAAK,SACL,YAAU,SAET,UAAA4V,GAAiBjT,EAAa,cAAe,IAC7C0R,GAAc,IAAIA,CAAU,OAG/B+D,GAAA,CAAkB,EAEtB,IAKJhc,EAAC,OACC,UAAU,kEACV,YAAU,YACV,cAAY,OAEX,SAAAwY,CAAA,EACH,GAGN","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","UrlSvgLoader","url","svgContent","setSvgContent","useState","loading","setLoading","error","setError","useEffect","response","content","e","processedContent","Icon","Source","stroke","viewBox","defaultProps","isLikelyUrl","Suspense","LazyIcon","isRejectedUrl","Incrementer","name","value","disabled","success","min","max","onValue","onUpdateError","showButtons","currentValue","setCurrentValue","minValue","maxValue","isInvalid","errorMessage","propValue","debouncedOnValueHandler","useCallback","debounce","newValue","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","weight","sale","formatOptions","formattedAmount","useMemo","getPriceFormatter","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","Picker","options","handleSelect","uniqueId","isRequired","isDisabled","option","selectedValue","setSelectedValue","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","fieldContent","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","rowTotalFooter","taxIncluded","taxExcluded","total","totalExcludingTax","sku","configurations","warning","alert","discount","savings","actions","removeContent","quantity","quantityContent","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","PaginationButton","anchorProps","buttonProps","Pagination","totalPages","currentPage","routePage","handleForward","nextPage","handleBackward","prevPage","handleSetPage","isNumber","createPages","pages","addPageRange","start","end","i","paginationList","item","ProductItemCardSkeleton","ProductItemCard","titleNode","actionButton","swatches","initialized","InputFile","accept","multiple","providedId","generatedId","handleChange","Table","columns","rowData","mobileLayout","caption","expandedRows","skeletonRowCount","onSortChange","handleSort","column","nextDirection","renderSortButton","iconSource","renderSkeletonRows","rowIndex","renderDataRows","row","hasDetails","isExpanded","cell","getAriaSort","filterOptions","searchTerm","getSelectedLabels","v","opt","generateIds","baseId","useAccessibilityAnnouncements","announcement","setAnnouncement","announce","useKeyboardNavigation","filteredOptions","focusedIndex","setFocusedIndex","dropdownRef","items","direction","prev","step","nextIndex","MultiSelect","selectAllText","deselectAllText","noResultsText","maxHeight","isOpen","setIsOpen","setSearchTerm","containerRef","searchInputRef","closeDropdown","resetSearch","navigate","handleClickOutside","handleContainerClick","optionValue","isCurrentlySelected","handleRemoveTag","handleSelectAll","allFilteredValues","currentValueSet","newSelections","val","handleDeselectAll","filteredValues","removedCount","handleInputKeyDown","focusedOption","selectedLabels","listboxId","searchInputId","labelId","selectedDescriptionId","currentFocusedId","hasSelection","count","renderSelectedTags","totalSelected","fieldContext","selectedItemsText","renderSearchInput","target","renderDropdownControls","renderOptionsList","isFocused","optionId"],"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/PaginationButton.tsx","/@dropins/tools/src/components/Pagination/Pagination.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCardSkeleton.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCard.tsx","/@dropins/tools/src/components/InputFile/InputFile.tsx","/@dropins/tools/src/components/Table/Table.tsx","/@dropins/tools/src/components/MultiSelect/MultiSelect.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 AddressBook: lazy(() => import('@adobe-commerce/elsie/icons/AddressBook.svg')),\n Bulk: lazy(() => import('@adobe-commerce/elsie/icons/Bulk.svg')),\n Burger: lazy(() => import('@adobe-commerce/elsie/icons/Burger.svg')),\n Business: lazy(() => import('@adobe-commerce/elsie/icons/Business.svg')),\n Card: lazy(() => import('@adobe-commerce/elsie/icons/Card.svg')),\n Cart: lazy(() => import('@adobe-commerce/elsie/icons/Cart.svg')),\n Check: lazy(() => import('@adobe-commerce/elsie/icons/Check.svg')),\n CheckWithCircle: lazy(() => import('@adobe-commerce/elsie/icons/CheckWithCircle.svg')),\n ChevronDown: lazy(() => import('@adobe-commerce/elsie/icons/ChevronDown.svg')),\n ChevronRight: lazy(() => import('@adobe-commerce/elsie/icons/ChevronRight.svg')),\n ChevronUp: lazy(() => import('@adobe-commerce/elsie/icons/ChevronUp.svg')),\n Close: lazy(() => import('@adobe-commerce/elsie/icons/Close.svg')),\n Coupon: lazy(() => import('@adobe-commerce/elsie/icons/Coupon.svg')),\n Date: lazy(() => import('@adobe-commerce/elsie/icons/Date.svg')),\n Delivery: lazy(() => import('@adobe-commerce/elsie/icons/Delivery.svg')),\n Edit: lazy(() => import('@adobe-commerce/elsie/icons/Edit.svg')),\n EmptyBox: lazy(() => import('@adobe-commerce/elsie/icons/EmptyBox.svg')),\n Eye: lazy(() => import('@adobe-commerce/elsie/icons/Eye.svg')),\n EyeClose: lazy(() => import('@adobe-commerce/elsie/icons/EyeClose.svg')),\n Gift: lazy(() => import('@adobe-commerce/elsie/icons/Gift.svg')),\n GiftCard: lazy(() => import('@adobe-commerce/elsie/icons/GiftCard.svg')),\n Heart: lazy(() => import('@adobe-commerce/elsie/icons/Heart.svg')),\n HeartFilled: lazy(() => import('@adobe-commerce/elsie/icons/HeartFilled.svg')),\n InfoFilled: lazy(() => import('@adobe-commerce/elsie/icons/InfoFilled.svg')),\n List: lazy(() => import('@adobe-commerce/elsie/icons/List.svg')),\n Locker: lazy(() => import('@adobe-commerce/elsie/icons/Locker.svg')),\n Minus: lazy(() => import('@adobe-commerce/elsie/icons/Minus.svg')),\n Order: lazy(() => import('@adobe-commerce/elsie/icons/Order.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 Placeholder: lazy(() => import('@adobe-commerce/elsie/icons/Placeholder.svg')),\n PlaceholderFilled: lazy(\n () => import('@adobe-commerce/elsie/icons/PlaceholderFilled.svg')\n ),\n Purchase: lazy(() => import('@adobe-commerce/elsie/icons/Purchase.svg')),\n Quote: lazy(() => import('@adobe-commerce/elsie/icons/Quote.svg')),\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 Structure: lazy(() => import('@adobe-commerce/elsie/icons/Structure.svg')),\n Team: lazy(() => import('@adobe-commerce/elsie/icons/Team.svg')),\n Trash: lazy(() => import('@adobe-commerce/elsie/icons/Trash.svg')),\n User: lazy(() => import('@adobe-commerce/elsie/icons/User.svg')),\n View: lazy(() => import('@adobe-commerce/elsie/icons/View.svg')),\n Wallet: lazy(() => import('@adobe-commerce/elsie/icons/Wallet.svg')),\n Warning: lazy(() => import('@adobe-commerce/elsie/icons/Warning.svg')),\n WarningFilled: lazy(() => import('@adobe-commerce/elsie/icons/WarningFilled.svg')),\n WarningWithCircle: lazy(\n () => import('@adobe-commerce/elsie/icons/WarningWithCircle.svg')\n ),\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 if (url.hostname !== window.location.hostname) {\n console.error(\n `[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`\n );\n return false;\n }\n return true;\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 try {\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, \"image/svg+xml\");\n const svg = doc.querySelector('svg');\n if (!svg) {\n throw new Error(\"No <svg> element found\");\n }\n // Success!\n } catch(e: unknown) {\n if (e instanceof Error ) {\n console.error(`[Icon] Invalid SVG content from ${url}: ${e.message}`);\n } else {\n console.error(`[Icon] Invalid SVG content from ${url}: ${String(e)}`);\n }\n setError(true);\n setLoading(false);\n }\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 if (error instanceof Error) {\n console.error(`[Icon] ${error.message}`);\n } else {\n console.error(`[Icon] ${String(error)}`);\n }\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 <span\n className={props.className}\n style={{\n width: String(props.width),\n height: String(props.height),\n display: 'inline-flex',\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 // Only validate strings that look like URLs (start with http, //, or /)\n const isLikelyUrl =\n typeof Source === 'string' &&\n (Source.startsWith('http') ||\n Source.startsWith('//') ||\n Source.startsWith('/'));\n\n if (isLikelyUrl && 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 = isLikelyUrl && !isValidUrl(Source);\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 showButtons?: boolean;\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 showButtons = true,\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--no-buttons', !showButtons],\n [`dropin-incrementer__content--error`, isInvalid],\n [`dropin-incrementer__content--success`, success],\n [`dropin-incrementer__content--disabled`, disabled],\n ])}\n >\n {/* Minus Button */}\n {showButtons && (\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\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 {showButtons && (\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 )}\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, getPriceFormatter } 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 | null;\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,\n variant = 'default',\n weight = 'bold',\n className,\n children,\n sale = false,\n formatOptions = {},\n size = 'small',\n ...props\n}) => {\n const formattedAmount = useMemo(() => {\n const formatter = getPriceFormatter({ currency, locale, formatOptions });\n return formatter.format(amount);\n }, [amount, currency, locale, formatOptions]);\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' | 'icon'> {\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 icon?:\n | VNode<HTMLAttributes<SVGSVGElement>>\n | VNode<HTMLAttributes<HTMLImageElement>>;\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 icon,\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 {icon && (\n // @ts-ignore\n <icon.type\n {...icon?.props}\n className={classes([\n 'dropin-radio-button__icon',\n icon?.props?.className,\n ])}\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 href?: string;\n type?: 'button' | 'submit' | 'reset';\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 { 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\nimport '@adobe-commerce/elsie/components/Picker/Picker.css';\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 id,\n ...props\n}) => {\n const uniqueId = id ?? name ?? `dropin-picker-${Math.random().toString(36)}`;\n const isRequired = !!props?.required;\n const isDisabled = disabled || options?.length === 1;\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', isDisabled],\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={uniqueId}\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={isDisabled}\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, VComponent } 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\n let fieldContent: VNode | string | null = null;\n\n if (children && typeof children !== 'string') {\n fieldContent = (\n <VComponent\n node={children}\n id={id}\n key={children.key}\n disabled={disabled}\n size={size}\n error={!!error}\n success={!!success && !error}\n />\n );\n }\n\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 {fieldContent}\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 useMemo,\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 const uniqueId = useMemo(() => id ?? `${name}_${id}_${Math.random().toString(36)}`, [name, id]);\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={uniqueId}\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={uniqueId}\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 rowTotalFooter?: VNode;\n taxIncluded?: boolean;\n taxExcluded?: boolean;\n total?: VNode;\n totalExcludingTax?: VNode;\n sku?: VNode;\n quantity?: number;\n quantityContent?: VNode;\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 removeContent?: 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 rowTotalFooter,\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 removeContent,\n quantity,\n quantityContent,\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 \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 \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 \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 {quantityContent ? (\n <VComponent node={quantityContent} />\n ) : onQuantity ? (\n quantityComponent\n ) : (\n quantity && (\n <span className={classes(['dropin-cart-item__quantity__value'])}>\n {labels.quantity}:{' '}\n <strong className=\"dropin-cart-item__quantity__number\">\n {Number(quantity).toLocaleString(locale)}\n </strong>\n </span>\n )\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 \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\n {/* Row Total Footer */}\n {rowTotalFooter && (\n <VComponent\n node={rowTotalFooter}\n className={classes(['dropin-cart-item__row-total-footer'])}\n />\n )}\n </div>\n\n {/* Footer */}\n {footer && (\n <VComponent\n node={footer}\n className={classes(['dropin-cart-item__footer'])}\n />\n )}\n </div>\n\n {/* Remove Item */}\n {removeContent ? (\n <VComponent node={removeContent} />\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 ) : 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 { 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 disabled?: 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 disabled = 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 ['dropin-toggle-button__disabled', disabled],\n ])}\n >\n <label className=\"dropin-toggle-button__actionButton\">\n <RadioButton\n label=\"\"\n name={name}\n value={value}\n checked={selected}\n disabled={disabled}\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, JSX } from 'preact';\n\ntype BaseProps = {\n href?: string;\n type?: 'button';\n disabled?: boolean;\n};\n\nexport type PaginationButtonProps = BaseProps &\n (\n | Omit<JSX.HTMLAttributes<HTMLAnchorElement>, 'type'>\n | Omit<JSX.HTMLAttributes<HTMLButtonElement>, 'href'>\n );\n\nexport const PaginationButton: FunctionComponent<PaginationButtonProps> = (\n props\n) => {\n if (props.href) {\n \n const { href, disabled, ...anchorProps } = props;\n return (\n <a\n href={href}\n aria-disabled={disabled}\n {...(anchorProps as JSX.HTMLAttributes<HTMLAnchorElement>)}\n />\n );\n }\n \n const { type = 'button', ...buttonProps } = props;\n return (\n <button\n type={type}\n {...(buttonProps as JSX.HTMLAttributes<HTMLButtonElement>)}\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 { 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';\nimport { PaginationButton } from './PaginationButton';\n\nexport interface PaginationProps {\n className?: string;\n currentPage?: number;\n totalPages?: number;\n onChange?: (currentPage: number, e?: Event) => void;\n routePage?: (page: number) => string;\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 routePage,\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((e?: Event) => {\n const nextPage = Math.min(currentPage + 1, totalPages);\n\n onChange?.(nextPage, e);\n }, [currentPage, onChange, totalPages]);\n\n const handleBackward = useCallback((e?: Event) => {\n const prevPage = Math.max(currentPage - 1, 1);\n\n onChange?.(prevPage, e);\n }, [currentPage, onChange]);\n\n const handleSetPage = useCallback(\n (currentPage: number | string, e?: Event) => {\n if (isNumber(currentPage)) {\n onChange?.(currentPage as number, e);\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 <PaginationButton\n data-testid=\"prev-button\"\n aria-label={translations.backwardButton}\n disabled={currentPage === 1}\n onClick={(e: Event) => handleBackward(e)}\n href={routePage?.(currentPage) ?? undefined}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--backward',\n ['dropin-pagination-arrow--disabled', currentPage === 1],\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </PaginationButton>\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 <PaginationButton\n data-testid={`set-page-button-${item.page}`}\n onClick={(e: Event) => handleSetPage(item.page, e)}\n href={routePage?.(item.page as number) ?? undefined}\n\n >\n {item.label}\n </PaginationButton>\n </li>\n ))}\n </ul>\n <PaginationButton\n data-testid=\"next-button\"\n aria-label={translations.forwardButton}\n disabled={currentPage === totalPages}\n onClick={(e: Event) => handleForward(e)}\n href={routePage?.(currentPage) ?? undefined}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--forward',\n ['dropin-pagination-arrow--disabled', currentPage === totalPages],\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </PaginationButton>\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 </Skeleton>\n <Skeleton className=\"dropin-product-item-card__content dropin-product-item-card__skeleton__content\">\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\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=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\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","/********************************************************************\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 { useId } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/InputFile/InputFile.css';\n\nexport interface InputFileProps extends Omit<HTMLAttributes<HTMLInputElement>, 'type' | 'icon'> {\n accept?: string;\n onChange?: (event: Event) => void;\n label?: string;\n multiple?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const InputFile: FunctionComponent<InputFileProps> = ({\n accept,\n onChange,\n label = 'Upload Document',\n icon,\n className,\n multiple,\n id: providedId,\n ...props\n}) => {\n \n const generatedId = useId();\n const id = providedId || generatedId;\n\n const handleChange = (e: Event) => {\n onChange?.(e);\n };\n\n return (\n <div className={classes(['dropin-input-file', className])}>\n <label htmlFor={id} className=\"dropin-input-file__label\">\n {icon && <span className=\"dropin-input-file__icon\">{icon}</span>}\n {label}\n </label>\n <input\n id={id}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n onChange={handleChange}\n className=\"dropin-input-file__input\"\n {...props}\n />\n </div>\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, Fragment } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Icon,\n Button,\n Skeleton,\n SkeletonRow,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/Table/Table.css';\n\ntype Sortable = 'asc' | 'desc' | true;\n\ntype Column =\n | { label: string; key: string; ariaLabel?: string; sortBy?: Sortable }\n | {\n label: VNode<HTMLAttributes<HTMLElement>>;\n key: string;\n ariaLabel: string;\n sortBy?: Sortable;\n };\n\ntype RowData = {\n [key: string]: VNode | string | number | undefined;\n _rowDetails?: VNode | string; // Special property for expandable row content\n};\n\nexport interface TableProps\n extends Omit<HTMLAttributes<HTMLTableElement>, 'loading'> {\n columns: Column[];\n rowData: RowData[];\n mobileLayout?: 'stacked' | 'none';\n caption?: string;\n expandedRows?: Set<number>;\n loading?: boolean;\n skeletonRowCount?: number;\n onSortChange?: (columnKey: string, direction: Sortable) => void;\n}\n\nexport const Table: FunctionComponent<TableProps> = ({\n className,\n children,\n columns = [],\n rowData = [],\n mobileLayout = 'none',\n caption,\n expandedRows = new Set(),\n loading = false,\n skeletonRowCount = 10,\n onSortChange,\n ...props\n}) => {\n const translations = useText({\n sortedAscending: 'Dropin.Table.sortedAscending',\n sortedDescending: 'Dropin.Table.sortedDescending',\n sortBy: 'Dropin.Table.sortBy',\n });\n\n const handleSort = (column: Column) => {\n if (!onSortChange) return;\n\n // Determine next sort direction\n let nextDirection: Sortable;\n if (column.sortBy === true) {\n nextDirection = 'asc';\n } else if (column.sortBy === 'asc') {\n nextDirection = 'desc';\n } else {\n nextDirection = true;\n }\n\n onSortChange(column.key, nextDirection);\n };\n\n const renderSortButton = (column: Column) => {\n if (column.sortBy === undefined) return null;\n const label = column.ariaLabel ?? (column.label as string);\n\n let iconSource: string;\n let ariaLabel: string;\n\n if (column.sortBy === 'asc') {\n iconSource = 'ChevronUp';\n ariaLabel = translations.sortedAscending.replace('{label}', label);\n } else if (column.sortBy === 'desc') {\n iconSource = 'ChevronDown';\n ariaLabel = translations.sortedDescending.replace('{label}', label);\n } else {\n // Show chevron down when sortable but not sorted\n iconSource = 'ChevronDown';\n ariaLabel = translations.sortBy.replace('{label}', label);\n }\n\n return (\n <Button\n variant=\"tertiary\"\n size=\"medium\"\n className=\"dropin-table__header__sort-button\"\n icon={<Icon source={iconSource} />}\n aria-label={ariaLabel}\n onClick={() => handleSort(column)}\n />\n );\n };\n\n const renderSkeletonRows = () => {\n return Array.from({ length: skeletonRowCount }, (_, rowIndex) => (\n <tr key={`skeleton-${rowIndex}`} className=\"dropin-table__body__row\">\n {columns.map((column) => (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={column.ariaLabel ?? column.label}\n >\n <Skeleton>\n <SkeletonRow variant=\"row\" size=\"small\" fullWidth />\n </Skeleton>\n </td>\n ))}\n </tr>\n ));\n };\n\n const renderDataRows = () => {\n return rowData.map((row, rowIndex) => {\n const hasDetails = row._rowDetails !== undefined;\n const isExpanded = expandedRows.has(rowIndex);\n\n return (\n <Fragment key={rowIndex}>\n <tr className={classes([\n 'dropin-table__body__row',\n ['dropin-table__body__row--expanded', isExpanded && hasDetails],\n ])}>\n {columns.map((column) => {\n const cell = row[column.key];\n const label = column.ariaLabel ?? column.label;\n\n if (typeof cell === 'string' || typeof cell === 'number') {\n return (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={label}\n >\n {cell}\n </td>\n );\n }\n\n return (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={label}\n >\n <VComponent node={cell!} />\n </td>\n );\n })}\n </tr>\n {hasDetails && isExpanded && (\n <tr\n key={`${rowIndex}-details`}\n className=\"dropin-table__row-details dropin-table__row-details--expanded\"\n id={`row-${rowIndex}-details`}\n >\n <td\n className=\"dropin-table__row-details__cell\"\n colSpan={columns.length}\n role=\"region\"\n aria-labelledby={`row-${rowIndex}-details`}\n >\n {typeof row._rowDetails === 'string' ? (\n row._rowDetails\n ) : (\n <VComponent node={row._rowDetails!} />\n )}\n </td>\n </tr>\n )}\n </Fragment>\n );\n });\n };\n\n const getAriaSort = (\n column: Column\n ): 'none' | 'ascending' | 'descending' | 'other' | undefined => {\n if (column.sortBy === true) return 'none';\n if (column.sortBy === 'asc') return 'ascending';\n if (column.sortBy === 'desc') return 'descending';\n return undefined;\n };\n\n return (\n <div\n className={classes([\n 'dropin-table',\n `dropin-table--mobile-layout-${mobileLayout}`,\n className,\n ])}\n >\n <table {...props} className=\"dropin-table__table\">\n {caption && (\n <caption className=\"dropin-table__caption\">{caption}</caption>\n )}\n <thead className=\"dropin-table__header\">\n <tr className=\"dropin-table__header__row\">\n {columns.map((column) => (\n <th\n key={column.key}\n className={classes([\n 'dropin-table__header__cell',\n [\n 'dropin-table__header__cell--sorted',\n column.sortBy === 'asc' || column.sortBy === 'desc',\n ],\n [\n 'dropin-table__header__cell--sortable',\n column.sortBy !== undefined,\n ],\n ])}\n aria-sort={getAriaSort(column)}\n >\n {column.label}\n {renderSortButton(column)}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className=\"dropin-table__body\">\n {loading\n ? // Render skeleton rows when loading\n renderSkeletonRows()\n : // Render actual data when not loading\n renderDataRows()}\n </tbody>\n </table>\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 { Button, Tag } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { ChevronDown, Close, Check } from '@adobe-commerce/elsie/icons';\nimport { useText } from 'preact-i18n';\nimport {\n useState,\n useCallback,\n useEffect,\n useRef,\n useMemo,\n} from 'preact/hooks';\nimport { JSX } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/MultiSelect/MultiSelect.css';\n\ntype OptionValue = string | number;\n\ninterface Option {\n label: string;\n value: OptionValue;\n disabled?: boolean;\n}\n\ntype SelectedValues = OptionValue[];\n\n// Utility functions\nconst filterOptions = (options: Option[], searchTerm: string): Option[] => {\n return options.filter((option) =>\n option.label.toLowerCase().includes(searchTerm.toLowerCase())\n );\n};\n\nconst getSelectedLabels = (\n value: SelectedValues,\n options: Option[]\n): (string | OptionValue)[] => {\n return value.map((v) => {\n const option = options.find((opt) => opt.value === v);\n return option ? option.label : v;\n });\n};\n\nconst generateIds = (id: string, name: string, floatingLabel?: string) => {\n const baseId = id || name;\n return {\n listboxId: `${baseId}-listbox`,\n searchInputId: `${baseId}-search`,\n labelId: floatingLabel ? `${baseId}-label` : undefined,\n selectedDescriptionId: `${name}-selected-description`,\n };\n};\n\nconst useAccessibilityAnnouncements = () => {\n const [announcement, setAnnouncement] = useState('');\n\n const announce = useCallback((message: string) => {\n setAnnouncement(message);\n setTimeout(() => setAnnouncement(''), 1000);\n }, []);\n\n return { announcement, announce };\n};\n\nconst useKeyboardNavigation = (\n filteredOptions: Option[],\n focusedIndex: number,\n setFocusedIndex: (value: number | ((prev: number) => number)) => void,\n dropdownRef: { current: HTMLDivElement | null }\n) => {\n // Scroll focused item into view\n useEffect(() => {\n if (focusedIndex >= 0 && dropdownRef.current) {\n const items = dropdownRef.current.querySelectorAll('[data-option-index]');\n if (items[focusedIndex]) {\n items[focusedIndex].scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n }\n }, [focusedIndex, dropdownRef]);\n\n const navigate = useCallback(\n (direction: 'up' | 'down') => {\n setFocusedIndex((prev) => {\n const step = direction === 'up' ? -1 : 1;\n let nextIndex = prev + step;\n\n // Skip disabled options in the current direction\n while (\n nextIndex >= 0 &&\n nextIndex < filteredOptions.length &&\n filteredOptions[nextIndex]?.disabled\n ) {\n nextIndex += step;\n }\n\n // If we found a valid option, return it\n if (nextIndex >= 0 && nextIndex < filteredOptions.length) {\n return nextIndex;\n }\n\n // Wrap around: find the first enabled option from the opposite end\n if (direction === 'up') {\n for (let i = filteredOptions.length - 1; i >= 0; i--) {\n if (!filteredOptions[i]?.disabled) return i;\n }\n } else {\n for (let i = 0; i < filteredOptions.length; i++) {\n if (!filteredOptions[i]?.disabled) return i;\n }\n }\n\n return -1;\n });\n },\n [filteredOptions, setFocusedIndex]\n );\n\n return { navigate };\n};\n\nexport interface MultiSelectProps {\n options: Option[];\n value: SelectedValues;\n onChange: (value: SelectedValues) => void;\n placeholder?: string;\n selectAllText?: string;\n deselectAllText?: string;\n noResultsText?: string;\n name?: string;\n disabled?: boolean;\n className?: string;\n maxHeight?: number;\n floatingLabel?: string;\n error?: boolean;\n success?: boolean;\n id?: string;\n}\n\nexport const MultiSelect: FunctionComponent<MultiSelectProps> = ({\n options = [],\n value = [],\n onChange = () => {},\n id = '',\n className = '',\n selectAllText = '',\n deselectAllText = '',\n placeholder = '',\n noResultsText = '',\n floatingLabel = '',\n name = 'multi-select-sdk',\n error = false,\n success = false,\n disabled = false,\n maxHeight = 300,\n}) => {\n const translations = useText({\n selectAll: 'Dropin.MultiSelect.selectAll',\n deselectAll: 'Dropin.MultiSelect.deselectAll',\n placeholder: 'Dropin.MultiSelect.placeholder',\n noResultsText: 'Dropin.MultiSelect.noResultsText',\n removed: 'Dropin.MultiSelect.ariaLabel.removed',\n added: 'Dropin.MultiSelect.ariaLabel.added',\n itemsSelected: 'Dropin.MultiSelect.ariaLabel.itemsSelected',\n itemsAdded: 'Dropin.MultiSelect.ariaLabel.itemsAdded',\n itemsRemoved: 'Dropin.MultiSelect.ariaLabel.itemsRemoved',\n selectedTotal: 'Dropin.MultiSelect.ariaLabel.selectedTotal',\n noResultsFor: 'Dropin.MultiSelect.ariaLabel.noResultsFor',\n optionsAvailable: 'Dropin.MultiSelect.ariaLabel.optionsAvailable',\n dropdownExpanded: 'Dropin.MultiSelect.ariaLabel.dropdownExpanded',\n useArrowKeys: 'Dropin.MultiSelect.ariaLabel.useArrowKeys',\n removeFromSelection: 'Dropin.MultiSelect.ariaLabel.removeFromSelection',\n fromSelection: 'Dropin.MultiSelect.ariaLabel.fromSelection',\n selectedItem: 'Dropin.MultiSelect.ariaLabel.selectedItem',\n inField: 'Dropin.MultiSelect.ariaLabel.inField',\n selectedItems: 'Dropin.MultiSelect.ariaLabel.selectedItems',\n scrollableOptionsList: 'Dropin.MultiSelect.ariaLabel.scrollableOptionsList',\n selectOptions: 'Dropin.MultiSelect.ariaLabel.selectOptions',\n itemAction: 'Dropin.MultiSelect.ariaLabel.itemAction',\n bulkAdded: 'Dropin.MultiSelect.ariaLabel.bulkAdded',\n bulkRemoved: 'Dropin.MultiSelect.ariaLabel.bulkRemoved',\n dropdownExpandedWithOptions:\n 'Dropin.MultiSelect.ariaLabel.dropdownExpandedWithOptions',\n selectedItemInField: 'Dropin.MultiSelect.ariaLabel.selectedItemInField',\n removeFromSelectionWithText:\n 'Dropin.MultiSelect.ariaLabel.removeFromSelectionWithText',\n itemsSelectedDescription:\n 'Dropin.MultiSelect.ariaLabel.itemsSelectedDescription',\n noItemsSelected: 'Dropin.MultiSelect.ariaLabel.noItemsSelected',\n });\n\n const [isOpen, setIsOpen] = useState(false);\n const [searchTerm, setSearchTerm] = useState('');\n const [focusedIndex, setFocusedIndex] = useState(-1);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const { announcement, announce } = useAccessibilityAnnouncements();\n\n // Helper function to close dropdown and optionally reset search state\n const closeDropdown = useCallback((resetSearch = false) => {\n setIsOpen(false);\n if (resetSearch) {\n setSearchTerm('');\n }\n setFocusedIndex(-1);\n }, []);\n\n // Filter options based on the search term\n const filteredOptions = useMemo(\n () => filterOptions(options, searchTerm),\n [options, searchTerm]\n );\n\n // Keyboard navigation\n const { navigate } = useKeyboardNavigation(\n filteredOptions,\n focusedIndex,\n setFocusedIndex,\n dropdownRef\n );\n\n // Close dropdown on the outside click\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n containerRef.current &&\n event.target &&\n !containerRef.current.contains(event.target as Node)\n ) {\n closeDropdown(true); // Reset search when clicking outside\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [closeDropdown]);\n\n // Toggle dropdown on container click (excluding tags)\n const handleContainerClick = (event: MouseEvent) => {\n if (\n !disabled &&\n searchInputRef.current &&\n event.target &&\n !(event.target as Element).closest('[data-tag]')\n ) {\n if (isOpen) {\n closeDropdown(false); // Don't reset search when clicking inside\n } else {\n searchInputRef.current.focus();\n setIsOpen(true);\n }\n }\n };\n\n // Handle option selection/deselection\n const handleSelect = useCallback(\n (optionValue: OptionValue) => {\n const option = options.find((opt) => opt.value === optionValue);\n\n const isCurrentlySelected = value.includes(optionValue);\n const newValue = isCurrentlySelected\n ? value.filter((v) => v !== optionValue)\n : [...value, optionValue];\n\n onChange(newValue);\n searchInputRef.current?.focus();\n\n // A11y - Announce the selection change\n if (option) {\n const action = isCurrentlySelected\n ? translations.removed\n : translations.added;\n announce(\n translations.itemAction\n .replace('{label}', option.label)\n .replace('{action}', action)\n .replace('{count}', newValue.length.toString())\n );\n }\n },\n [value, onChange, options, announce, translations]\n );\n\n // Handle option deselection via the Tag button\n const handleRemoveTag = (event: MouseEvent, optionValue: OptionValue) => {\n event.stopPropagation();\n const option = options.find((opt) => opt.value === optionValue);\n const newValue = value.filter((v) => v !== optionValue);\n onChange(newValue);\n searchInputRef.current?.focus();\n\n // A11y - Announce the selection change\n if (option) {\n announce(\n translations.itemAction\n .replace('{label}', option.label)\n .replace('{action}', translations.removed)\n .replace('{count}', newValue.length.toString())\n );\n }\n };\n\n const handleSelectAll = (event: MouseEvent) => {\n event.preventDefault();\n const allFilteredValues = filteredOptions.map((opt) => opt.value);\n const currentValueSet = new Set(value);\n const newSelections = allFilteredValues.filter(\n (val) => !currentValueSet.has(val)\n );\n const newValue = [...value, ...newSelections];\n onChange(newValue);\n\n // Announce the bulk selection\n if (newSelections.length > 0) {\n announce(\n translations.bulkAdded\n .replace('{count}', newSelections.length.toString())\n .replace('{total}', newValue.length.toString())\n );\n }\n };\n\n const handleDeselectAll = (event: MouseEvent) => {\n event.preventDefault();\n const filteredValues = new Set(filteredOptions.map((opt) => opt.value));\n const removedCount = value.filter((v) => filteredValues.has(v)).length;\n const newValue = value.filter((v) => !filteredValues.has(v));\n onChange(newValue);\n\n // A11y - Announce the bulk deselection\n if (removedCount > 0) {\n announce(\n translations.bulkRemoved\n .replace('{count}', removedCount.toString())\n .replace('{total}', newValue.length.toString())\n );\n }\n };\n\n // A11y - Keyboard navigation\n const handleInputKeyDown = (\n event: JSX.TargetedKeyboardEvent<HTMLInputElement>\n ) => {\n // Handle backspace to remove the last tag\n if (event.key === 'Backspace' && searchTerm === '' && value.length > 0) {\n event.preventDefault();\n const newValue = value.slice(0, -1);\n onChange(newValue);\n return;\n }\n\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault();\n setIsOpen(true);\n return;\n }\n\n if (isOpen) {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n navigate('down');\n break;\n case 'ArrowUp':\n event.preventDefault();\n navigate('up');\n break;\n case 'Enter':\n event.preventDefault();\n if (focusedIndex >= 0 && focusedIndex < filteredOptions.length) {\n const focusedOption = filteredOptions[focusedIndex];\n if (!focusedOption?.disabled) {\n handleSelect(focusedOption.value);\n }\n } else if (\n filteredOptions.length === 1 &&\n !filteredOptions[0]?.disabled\n ) {\n handleSelect(filteredOptions[0].value);\n }\n break;\n case 'Escape':\n event.preventDefault();\n closeDropdown(true); // Reset search on Escape\n break;\n case 'Tab':\n closeDropdown(true); // Reset search on Tab (leaving component)\n break;\n }\n }\n };\n\n // Array with labels of all selected options\n const selectedLabels = useMemo(\n () => getSelectedLabels(value, options),\n [value, options]\n );\n\n // A11y - Generate unique IDs\n const { listboxId, searchInputId, labelId, selectedDescriptionId } =\n generateIds(id, name, floatingLabel);\n const currentFocusedId =\n focusedIndex >= 0 ? `${listboxId}-option-${focusedIndex}` : '';\n\n // Check if any items are selected (regardless of filtering)\n const hasSelection = useMemo(() => value.length > 0, [value]);\n\n useEffect(() => {\n if (searchTerm && !isOpen) {\n setIsOpen(true);\n }\n }, [isOpen, searchTerm]);\n\n // Announce filtered results\n useEffect(() => {\n if (isOpen && searchTerm) {\n const count = filteredOptions.length;\n if (count === 0) {\n announce(`${translations.noResultsFor} \"${searchTerm}\"`);\n } else {\n announce(`${count} ${translations.optionsAvailable}`);\n }\n }\n }, [filteredOptions.length, searchTerm, isOpen, announce, translations]);\n\n useEffect(() => {\n if (isOpen && searchInputRef.current) {\n searchInputRef.current.focus();\n // Announce when dropdown opens with available options\n if (filteredOptions.length > 0) {\n announce(\n translations.dropdownExpandedWithOptions\n .replace('{count}', filteredOptions.length.toString())\n .replace('{s}', filteredOptions.length === 1 ? '' : 's')\n );\n }\n }\n }, [\n isOpen,\n selectedLabels.length,\n filteredOptions.length,\n announce,\n translations,\n ]);\n\n const renderSelectedTags = () => (\n <>\n {selectedLabels.map((label, index) => {\n const totalSelected = value.length;\n const fieldContext = floatingLabel ? `${floatingLabel}: ` : '';\n // Use i18n translations for selected items text\n const selectedItemsText =\n totalSelected === 1\n ? `${fieldContext}${translations.itemsSelected\n .replace('{count}', '1')\n .replace('{labels}', String(label))\n .replace('{s}', '')}`\n : `${fieldContext}${translations.itemsSelected\n .replace('{count}', totalSelected.toString())\n .replace('{labels}', selectedLabels.join(', '))\n .replace('{s}', totalSelected === 1 ? '' : 's')}`;\n\n return (\n <Tag\n key={value[index]}\n data-tag=\"true\"\n className=\"dropin-multi-select__tag\"\n role=\"group\"\n aria-label={\n floatingLabel\n ? translations.selectedItemInField\n .replace('{label}', String(label))\n .replace('{field}', floatingLabel)\n : `${translations.selectedItem} ${String(label)}`\n }\n >\n <span aria-hidden=\"true\">{label}</span>\n <button\n type=\"button\"\n onClick={(e) => handleRemoveTag(e, value[index])}\n className=\"dropin-multi-select__tag-remove\"\n disabled={disabled}\n aria-label={translations.removeFromSelectionWithText\n .replace('{label}', String(label))\n .replace('{text}', selectedItemsText)}\n >\n <Close size={12} aria-hidden=\"true\" />\n </button>\n </Tag>\n );\n })}\n </>\n );\n\n const renderSearchInput = () => (\n <input\n id={searchInputId}\n ref={searchInputRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n aria-controls={listboxId}\n className={classes([\n 'dropin-multi-select__search',\n ['dropin-multi-select__search--with-floating-label', !!floatingLabel],\n ])}\n placeholder={\n value.length === 0 ? placeholder || translations.placeholder : ''\n }\n value={searchTerm}\n onChange={(e: JSX.TargetedEvent<HTMLInputElement, Event>) => {\n const target = e.target as HTMLInputElement;\n setSearchTerm(target.value);\n setFocusedIndex(-1);\n }}\n onKeyDown={handleInputKeyDown}\n onFocus={() => setIsOpen(true)}\n disabled={disabled}\n style={{\n minWidth: searchTerm ? `${searchTerm.length * 8 + 20}px` : '40px',\n }}\n aria-autocomplete=\"list\"\n aria-activedescendant={\n isOpen && currentFocusedId ? currentFocusedId : undefined\n }\n {...(labelId\n ? { 'aria-labelledby': labelId }\n : {\n 'aria-label':\n floatingLabel ||\n placeholder ||\n translations.placeholder ||\n translations.selectOptions,\n })}\n aria-describedby={selectedDescriptionId}\n />\n );\n\n const renderDropdownControls = () => (\n <div className=\"dropin-multi-select__controls\">\n <Button\n variant=\"tertiary\"\n type=\"button\"\n className=\"dropin-multi-select__button dropin-multi-select__button--select-all\"\n onMouseDown={handleSelectAll}\n data-testid=\"multi-select-select-all\"\n >\n {selectAllText || translations.selectAll}\n </Button>\n {' | '}\n <Button\n variant=\"tertiary\"\n type=\"button\"\n className=\"dropin-multi-select__button dropin-multi-select__button--deselect-all\"\n onMouseDown={handleDeselectAll}\n disabled={!hasSelection}\n data-testid=\"multi-select-deselect-all\"\n >\n {deselectAllText || translations.deselectAll}\n </Button>\n </div>\n );\n\n const renderOptionsList = () => (\n <ul\n className=\"dropin-multi-select__list\"\n id={listboxId}\n role=\"listbox\"\n aria-multiselectable=\"true\"\n aria-label={floatingLabel || placeholder || translations.placeholder}\n >\n {filteredOptions.map((option, index) => {\n const isSelected = value.includes(option.value);\n const isFocused = index === focusedIndex;\n const optionId = `${listboxId}-option-${index}`;\n\n return (\n <li\n key={option.value}\n id={optionId}\n data-option-index={index}\n data-testid={`multi-select-option-${index}`}\n className={classes([\n 'dropin-multi-select__option',\n ['dropin-multi-select__option--focused', isFocused],\n ['dropin-multi-select__option--selected', isSelected],\n ['dropin-multi-select__option--disabled', option.disabled],\n ])}\n onClick={() => {\n if (!option.disabled) {\n handleSelect(option.value);\n }\n }}\n onMouseEnter={() => !option.disabled && setFocusedIndex(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n >\n <span\n className={classes([\n 'dropin-multi-select__option-label',\n [\n 'dropin-multi-select__option-label--disabled',\n option.disabled,\n ],\n ])}\n >\n {option.label}\n </span>\n {isSelected && (\n <Check\n width={16}\n height={16}\n className=\"dropin-multi-select__check-icon\"\n aria-hidden=\"true\"\n />\n )}\n </li>\n );\n })}\n </ul>\n );\n\n return (\n <div\n ref={containerRef}\n data-testid=\"multi-select\"\n className={classes(['dropin-multi-select', className])}\n >\n {/* Single hidden input with comma-separated values for form submission */}\n <input\n id={id || name}\n type=\"hidden\"\n name={name}\n data-testid=\"multi-select-hidden-input\"\n value={value.join(',')}\n disabled={disabled}\n aria-hidden=\"true\"\n />\n <div\n className={classes([\n 'dropin-multi-select__container',\n ['dropin-multi-select__container--open', isOpen],\n ['dropin-multi-select__container--disabled', disabled],\n ['dropin-multi-select__container--error', error],\n ['dropin-multi-select__container--success', success],\n [\n 'dropin-multi-select__container--with-floating-label',\n !!floatingLabel,\n ],\n [\n 'dropin-multi-select__container--has-value',\n !!(floatingLabel && (value.length > 0 || searchTerm.length > 0)),\n ],\n ])}\n onMouseDown={handleContainerClick}\n data-testid=\"multi-select-container\"\n >\n <div\n className={classes([\n 'dropin-multi-select__tags-area',\n [\n 'dropin-multi-select__tags-area--has-values',\n selectedLabels.length > 0,\n ],\n ])}\n data-testid=\"multi-select-tags-area\"\n role=\"group\"\n aria-label={translations.selectedItems}\n >\n {/* Screen-reader-only description of selected items */}\n <div\n id={selectedDescriptionId}\n className=\"dropin-multi-select__sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {value.length > 0\n ? translations.itemsSelectedDescription\n .replace('{count}', value.length.toString())\n .replace('{s}', value.length === 1 ? '' : 's')\n .replace('{labels}', selectedLabels.join(', '))\n : translations.noItemsSelected}\n </div>\n\n {renderSelectedTags()}\n {renderSearchInput()}\n {floatingLabel ? (\n <label\n className=\"dropin-multi-select__floating-label\"\n htmlFor={searchInputId}\n id={labelId}\n >\n {floatingLabel}\n </label>\n ) : null}\n </div>\n <ChevronDown\n className={classes([\n 'dropin-multi-select__chevron',\n ['dropin-multi-select__chevron--open', isOpen],\n ])}\n />\n </div>\n\n {isOpen && (\n <div\n className=\"dropin-multi-select__dropdown\"\n data-testid=\"multi-select-dropdown\"\n >\n {filteredOptions.length > 0 && renderDropdownControls()}\n\n <div\n ref={dropdownRef}\n className=\"dropin-multi-select__options\"\n data-testid=\"multi-select-options\"\n style={{ maxHeight: `${maxHeight}px` }}\n tabIndex={0}\n role=\"region\"\n aria-label={translations.scrollableOptionsList}\n >\n {filteredOptions.length === 0 ? (\n <div\n className=\"dropin-multi-select__no-results\"\n data-testid=\"multi-select-no-results\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {noResultsText || translations.noResultsText}{' '}\n {searchTerm && `\"${searchTerm}\"`}\n </div>\n ) : (\n renderOptionsList()\n )}\n </div>\n </div>\n )}\n\n {/* Live region for screen reader announcements */}\n <div\n className=\"dropin-multi-select__announcements dropin-multi-select__sr-only\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n >\n {announcement}\n </div>\n </div>\n );\n};\n"],"file":"components.js"}
|
|
1
|
+
{"version":3,"mappings":"ynBAwBA,MAAMA,GAAa,EAENC,EAAmD,CAAC,CAC/D,UAAAC,EACA,UAAAC,EAAY,GACZ,MAAAC,EAAQJ,GACR,KAAAK,EAAO,QACP,QAAAC,EAAU,MACV,SAAAC,EAAW,KACX,aAAAC,EAAe,SACf,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAgB,CACpB,CAAC,wBAAwBJ,CAAO,GAAIA,CAAO,EAC3C,CAAC,wBAAwBA,CAAO,IAAID,CAAI,GAAIC,GAAWD,CAAI,GAG7D,GAAI,CAACE,GAAYD,IAAY,QAC3B,OACEK,EAAC,OACC,UAAWC,EAAQ,CACjB,iDACAV,CAAA,CACD,IAKP,GAAIK,EAAU,CACZ,MAAMM,EAAMN,EAAS,OACrB,OACEI,EAAC,OACE,GAAGF,EACJ,MAAOG,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvCD,CAAA,CACD,EAED,wBAAyB,CAAE,OAAQW,CAAA,CAAI,EAG7C,CAIA,OAFoBT,EAAQJ,KAER,GAEhBW,EAAC,OACE,GAAGF,EACJ,MAAOG,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvC,gCACA,GAAGO,EACHR,CAAA,CACD,IAMLS,EAAC,OACE,GAAGF,EACJ,MAAO,CAAE,0BAA2B,iBAAiBD,CAAY,KACjE,MAAOI,EAAQ,CACb,iCACA,CAAC,4BAA6BT,CAAS,EACvCD,CAAA,CACD,EAEA,eAAM,KAAK,CAAE,OAAQE,EAAO,EAAE,IAAI,CAACU,EAAGC,IACrCJ,EAAC,OAEC,MAAOC,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvC,gCACA,GAAGO,CAAA,CACJ,GANIK,CAAA,CAQR,GAGP,EAOaC,GAA6C,CAAC,CACzD,UAAAd,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KmD,GAAA,EAE/Bjc,EAAC,OACC,IAAKiZ,EACL,UAAU,+BACV,cAAY,uBACZ,MAAO,CAAE,UAAW,GAAGU,CAAS,MAChC,SAAU,EACV,KAAK,SACL,aAAYlT,EAAa,sBAExB,SAAAqS,EAAgB,SAAW,EAC1BhV,EAAC,OACC,UAAU,kCACV,cAAY,0BACZ,KAAK,SACL,YAAU,SAET,UAAA4V,GAAiBjT,EAAa,cAAe,IAC7C0R,GAAc,IAAIA,CAAU,OAG/B+D,GAAA,CAAkB,EAEtB,IAKJlc,EAAC,OACC,UAAU,kEACV,YAAU,YACV,cAAY,OAEX,SAAA0Y,CAAA,EACH,GAGN","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","UrlSvgLoader","url","svgContent","setSvgContent","useState","loading","setLoading","error","setError","useEffect","response","content","e","processedContent","Icon","Source","stroke","viewBox","defaultProps","isLikelyUrl","Suspense","LazyIcon","isRejectedUrl","Incrementer","name","value","disabled","success","min","max","onValue","onUpdateError","showButtons","currentValue","setCurrentValue","isEmpty","setIsEmpty","minValue","maxValue","isInvalid","errorMessage","propValue","debouncedOnValueHandler","useCallback","debounce","newValue","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","weight","sale","formatOptions","formattedAmount","useMemo","getPriceFormatter","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","Picker","options","handleSelect","uniqueId","isRequired","isDisabled","option","selectedValue","setSelectedValue","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","fieldContent","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","rowTotalFooter","taxIncluded","taxExcluded","total","totalExcludingTax","sku","configurations","warning","alert","discount","savings","actions","removeContent","quantity","quantityContent","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","PaginationButton","anchorProps","buttonProps","Pagination","totalPages","currentPage","routePage","handleForward","nextPage","handleBackward","prevPage","handleSetPage","isNumber","createPages","pages","addPageRange","start","end","i","paginationList","item","ProductItemCardSkeleton","ProductItemCard","titleNode","actionButton","swatches","initialized","InputFile","accept","multiple","providedId","generatedId","handleChange","Table","columns","rowData","mobileLayout","caption","expandedRows","skeletonRowCount","onSortChange","handleSort","column","nextDirection","renderSortButton","iconSource","renderSkeletonRows","rowIndex","renderDataRows","row","hasDetails","isExpanded","cell","getAriaSort","filterOptions","searchTerm","getSelectedLabels","v","opt","generateIds","baseId","useAccessibilityAnnouncements","announcement","setAnnouncement","announce","useKeyboardNavigation","filteredOptions","focusedIndex","setFocusedIndex","dropdownRef","items","direction","prev","step","nextIndex","MultiSelect","selectAllText","deselectAllText","noResultsText","maxHeight","isOpen","setIsOpen","setSearchTerm","containerRef","searchInputRef","closeDropdown","resetSearch","navigate","handleClickOutside","handleContainerClick","optionValue","isCurrentlySelected","handleRemoveTag","handleSelectAll","allFilteredValues","currentValueSet","newSelections","val","handleDeselectAll","filteredValues","removedCount","handleInputKeyDown","focusedOption","selectedLabels","listboxId","searchInputId","labelId","selectedDescriptionId","currentFocusedId","hasSelection","count","renderSelectedTags","totalSelected","fieldContext","selectedItemsText","renderSearchInput","target","renderDropdownControls","renderOptionsList","isFocused","optionId"],"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/PaginationButton.tsx","/@dropins/tools/src/components/Pagination/Pagination.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCardSkeleton.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCard.tsx","/@dropins/tools/src/components/InputFile/InputFile.tsx","/@dropins/tools/src/components/Table/Table.tsx","/@dropins/tools/src/components/MultiSelect/MultiSelect.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 { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent } from 'preact';\nimport { lazy, Suspense, SVGProps } from 'preact/compat';\nimport { useEffect, useState } 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 AddressBook: lazy(() => import('@adobe-commerce/elsie/icons/AddressBook.svg')),\n Bulk: lazy(() => import('@adobe-commerce/elsie/icons/Bulk.svg')),\n Burger: lazy(() => import('@adobe-commerce/elsie/icons/Burger.svg')),\n Business: lazy(() => import('@adobe-commerce/elsie/icons/Business.svg')),\n Card: lazy(() => import('@adobe-commerce/elsie/icons/Card.svg')),\n Cart: lazy(() => import('@adobe-commerce/elsie/icons/Cart.svg')),\n Check: lazy(() => import('@adobe-commerce/elsie/icons/Check.svg')),\n CheckWithCircle: lazy(() => import('@adobe-commerce/elsie/icons/CheckWithCircle.svg')),\n ChevronDown: lazy(() => import('@adobe-commerce/elsie/icons/ChevronDown.svg')),\n ChevronRight: lazy(() => import('@adobe-commerce/elsie/icons/ChevronRight.svg')),\n ChevronUp: lazy(() => import('@adobe-commerce/elsie/icons/ChevronUp.svg')),\n Close: lazy(() => import('@adobe-commerce/elsie/icons/Close.svg')),\n Coupon: lazy(() => import('@adobe-commerce/elsie/icons/Coupon.svg')),\n Date: lazy(() => import('@adobe-commerce/elsie/icons/Date.svg')),\n Delivery: lazy(() => import('@adobe-commerce/elsie/icons/Delivery.svg')),\n Edit: lazy(() => import('@adobe-commerce/elsie/icons/Edit.svg')),\n EmptyBox: lazy(() => import('@adobe-commerce/elsie/icons/EmptyBox.svg')),\n Eye: lazy(() => import('@adobe-commerce/elsie/icons/Eye.svg')),\n EyeClose: lazy(() => import('@adobe-commerce/elsie/icons/EyeClose.svg')),\n Gift: lazy(() => import('@adobe-commerce/elsie/icons/Gift.svg')),\n GiftCard: lazy(() => import('@adobe-commerce/elsie/icons/GiftCard.svg')),\n Heart: lazy(() => import('@adobe-commerce/elsie/icons/Heart.svg')),\n HeartFilled: lazy(() => import('@adobe-commerce/elsie/icons/HeartFilled.svg')),\n InfoFilled: lazy(() => import('@adobe-commerce/elsie/icons/InfoFilled.svg')),\n List: lazy(() => import('@adobe-commerce/elsie/icons/List.svg')),\n Locker: lazy(() => import('@adobe-commerce/elsie/icons/Locker.svg')),\n Minus: lazy(() => import('@adobe-commerce/elsie/icons/Minus.svg')),\n Order: lazy(() => import('@adobe-commerce/elsie/icons/Order.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 Placeholder: lazy(() => import('@adobe-commerce/elsie/icons/Placeholder.svg')),\n PlaceholderFilled: lazy(\n () => import('@adobe-commerce/elsie/icons/PlaceholderFilled.svg')\n ),\n Purchase: lazy(() => import('@adobe-commerce/elsie/icons/Purchase.svg')),\n Quote: lazy(() => import('@adobe-commerce/elsie/icons/Quote.svg')),\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 Structure: lazy(() => import('@adobe-commerce/elsie/icons/Structure.svg')),\n Team: lazy(() => import('@adobe-commerce/elsie/icons/Team.svg')),\n Trash: lazy(() => import('@adobe-commerce/elsie/icons/Trash.svg')),\n User: lazy(() => import('@adobe-commerce/elsie/icons/User.svg')),\n View: lazy(() => import('@adobe-commerce/elsie/icons/View.svg')),\n Wallet: lazy(() => import('@adobe-commerce/elsie/icons/Wallet.svg')),\n Warning: lazy(() => import('@adobe-commerce/elsie/icons/Warning.svg')),\n WarningFilled: lazy(() => import('@adobe-commerce/elsie/icons/WarningFilled.svg')),\n WarningWithCircle: lazy(\n () => import('@adobe-commerce/elsie/icons/WarningWithCircle.svg')\n ),\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 if (url.hostname !== window.location.hostname) {\n console.error(\n `[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`\n );\n return false;\n }\n return true;\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 try {\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, \"image/svg+xml\");\n const svg = doc.querySelector('svg');\n if (!svg) {\n throw new Error(\"No <svg> element found\");\n }\n // Success!\n } catch(e: unknown) {\n if (e instanceof Error ) {\n console.error(`[Icon] Invalid SVG content from ${url}: ${e.message}`);\n } else {\n console.error(`[Icon] Invalid SVG content from ${url}: ${String(e)}`);\n }\n setError(true);\n setLoading(false);\n }\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 if (error instanceof Error) {\n console.error(`[Icon] ${error.message}`);\n } else {\n console.error(`[Icon] ${String(error)}`);\n }\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 <span\n className={props.className}\n style={{\n width: String(props.width),\n height: String(props.height),\n display: 'inline-flex',\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 // Only validate strings that look like URLs (start with http, //, or /)\n const isLikelyUrl =\n typeof Source === 'string' &&\n (Source.startsWith('http') ||\n Source.startsWith('//') ||\n Source.startsWith('/'));\n\n if (isLikelyUrl && 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 = isLikelyUrl && !isValidUrl(Source);\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 showButtons?: boolean;\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 showButtons = true,\n ...props\n}) => {\n const [currentValue, setCurrentValue] = useState<number>(Number(value));\n const [isEmpty, setIsEmpty] = useState<boolean>(false);\n const minValue = Number(min);\n const maxValue = Number(max);\n const isInvalid = error || isEmpty || currentValue < minValue || currentValue > maxValue;\n\n const errorMessage = isEmpty\n ? 'Dropin.Incrementer.requiredMessage'\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 setIsEmpty(false);\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 setIsEmpty(false);\n debouncedOnValueHandler(_value);\n setCurrentValue(_value);\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--no-buttons', !showButtons],\n [`dropin-incrementer__content--error`, isInvalid],\n [`dropin-incrementer__content--success`, success],\n [`dropin-incrementer__content--disabled`, disabled],\n ])}\n >\n {/* Minus Button */}\n {showButtons && (\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\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={isEmpty ? '' : currentValue}\n disabled={disabled}\n onBlur={() => {\n if (!isEmpty) {\n handleIncrementer(Number(currentValue));\n }\n }}\n onChange={(e) => {\n const newValue = e.currentTarget.value;\n if (newValue === '') {\n setIsEmpty(true);\n } else {\n handleIncrementer(Number(newValue));\n }\n }}\n {...props}\n />\n\n {showButtons && (\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 )}\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, getPriceFormatter } 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 | null;\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,\n variant = 'default',\n weight = 'bold',\n className,\n children,\n sale = false,\n formatOptions = {},\n size = 'small',\n ...props\n}) => {\n const formattedAmount = useMemo(() => {\n const formatter = getPriceFormatter({ currency, locale, formatOptions });\n return formatter.format(amount);\n }, [amount, currency, locale, formatOptions]);\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' | 'icon'> {\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 icon?:\n | VNode<HTMLAttributes<SVGSVGElement>>\n | VNode<HTMLAttributes<HTMLImageElement>>;\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 icon,\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 {icon && (\n // @ts-ignore\n <icon.type\n {...icon?.props}\n className={classes([\n 'dropin-radio-button__icon',\n icon?.props?.className,\n ])}\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 href?: string;\n type?: 'button' | 'submit' | 'reset';\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 { 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\nimport '@adobe-commerce/elsie/components/Picker/Picker.css';\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 id,\n ...props\n}) => {\n const uniqueId = id ?? name ?? `dropin-picker-${Math.random().toString(36)}`;\n const isRequired = !!props?.required;\n const isDisabled = disabled || options?.length === 1;\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', isDisabled],\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={uniqueId}\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={isDisabled}\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, VComponent } 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\n let fieldContent: VNode | string | null = null;\n\n if (children && typeof children !== 'string') {\n fieldContent = (\n <VComponent\n node={children}\n id={id}\n key={children.key}\n disabled={disabled}\n size={size}\n error={!!error}\n success={!!success && !error}\n />\n );\n }\n\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 {fieldContent}\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 useMemo,\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 const uniqueId = useMemo(() => id ?? `${name}_${id}_${Math.random().toString(36)}`, [name, id]);\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={uniqueId}\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={uniqueId}\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 rowTotalFooter?: VNode;\n taxIncluded?: boolean;\n taxExcluded?: boolean;\n total?: VNode;\n totalExcludingTax?: VNode;\n sku?: VNode;\n quantity?: number;\n quantityContent?: VNode;\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 removeContent?: 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 rowTotalFooter,\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 removeContent,\n quantity,\n quantityContent,\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 \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 \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 \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 {quantityContent ? (\n <VComponent node={quantityContent} />\n ) : onQuantity ? (\n quantityComponent\n ) : (\n quantity && (\n <span className={classes(['dropin-cart-item__quantity__value'])}>\n {labels.quantity}:{' '}\n <strong className=\"dropin-cart-item__quantity__number\">\n {Number(quantity).toLocaleString(locale)}\n </strong>\n </span>\n )\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 \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\n {/* Row Total Footer */}\n {rowTotalFooter && (\n <VComponent\n node={rowTotalFooter}\n className={classes(['dropin-cart-item__row-total-footer'])}\n />\n )}\n </div>\n\n {/* Footer */}\n {footer && (\n <VComponent\n node={footer}\n className={classes(['dropin-cart-item__footer'])}\n />\n )}\n </div>\n\n {/* Remove Item */}\n {removeContent ? (\n <VComponent node={removeContent} />\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 ) : 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 { 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 disabled?: 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 disabled = 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 ['dropin-toggle-button__disabled', disabled],\n ])}\n >\n <label className=\"dropin-toggle-button__actionButton\">\n <RadioButton\n label=\"\"\n name={name}\n value={value}\n checked={selected}\n disabled={disabled}\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, JSX } from 'preact';\n\ntype BaseProps = {\n href?: string;\n type?: 'button';\n disabled?: boolean;\n};\n\nexport type PaginationButtonProps = BaseProps &\n (\n | Omit<JSX.HTMLAttributes<HTMLAnchorElement>, 'type'>\n | Omit<JSX.HTMLAttributes<HTMLButtonElement>, 'href'>\n );\n\nexport const PaginationButton: FunctionComponent<PaginationButtonProps> = (\n props\n) => {\n if (props.href) {\n \n const { href, disabled, ...anchorProps } = props;\n return (\n <a\n href={href}\n aria-disabled={disabled}\n {...(anchorProps as JSX.HTMLAttributes<HTMLAnchorElement>)}\n />\n );\n }\n \n const { type = 'button', ...buttonProps } = props;\n return (\n <button\n type={type}\n {...(buttonProps as JSX.HTMLAttributes<HTMLButtonElement>)}\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 { 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';\nimport { PaginationButton } from './PaginationButton';\n\nexport interface PaginationProps {\n className?: string;\n currentPage?: number;\n totalPages?: number;\n onChange?: (currentPage: number, e?: Event) => void;\n routePage?: (page: number) => string;\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 routePage,\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((e?: Event) => {\n const nextPage = Math.min(currentPage + 1, totalPages);\n\n onChange?.(nextPage, e);\n }, [currentPage, onChange, totalPages]);\n\n const handleBackward = useCallback((e?: Event) => {\n const prevPage = Math.max(currentPage - 1, 1);\n\n onChange?.(prevPage, e);\n }, [currentPage, onChange]);\n\n const handleSetPage = useCallback(\n (currentPage: number | string, e?: Event) => {\n if (isNumber(currentPage)) {\n onChange?.(currentPage as number, e);\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 <PaginationButton\n data-testid=\"prev-button\"\n aria-label={translations.backwardButton}\n disabled={currentPage === 1}\n onClick={(e: Event) => handleBackward(e)}\n href={routePage?.(currentPage) ?? undefined}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--backward',\n ['dropin-pagination-arrow--disabled', currentPage === 1],\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </PaginationButton>\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 <PaginationButton\n data-testid={`set-page-button-${item.page}`}\n onClick={(e: Event) => handleSetPage(item.page, e)}\n href={routePage?.(item.page as number) ?? undefined}\n\n >\n {item.label}\n </PaginationButton>\n </li>\n ))}\n </ul>\n <PaginationButton\n data-testid=\"next-button\"\n aria-label={translations.forwardButton}\n disabled={currentPage === totalPages}\n onClick={(e: Event) => handleForward(e)}\n href={routePage?.(currentPage) ?? undefined}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--forward',\n ['dropin-pagination-arrow--disabled', currentPage === totalPages],\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </PaginationButton>\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 </Skeleton>\n <Skeleton className=\"dropin-product-item-card__content dropin-product-item-card__skeleton__content\">\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\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=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\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","/********************************************************************\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 { useId } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/InputFile/InputFile.css';\n\nexport interface InputFileProps extends Omit<HTMLAttributes<HTMLInputElement>, 'type' | 'icon'> {\n accept?: string;\n onChange?: (event: Event) => void;\n label?: string;\n multiple?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const InputFile: FunctionComponent<InputFileProps> = ({\n accept,\n onChange,\n label = 'Upload Document',\n icon,\n className,\n multiple,\n id: providedId,\n ...props\n}) => {\n \n const generatedId = useId();\n const id = providedId || generatedId;\n\n const handleChange = (e: Event) => {\n onChange?.(e);\n };\n\n return (\n <div className={classes(['dropin-input-file', className])}>\n <label htmlFor={id} className=\"dropin-input-file__label\">\n {icon && <span className=\"dropin-input-file__icon\">{icon}</span>}\n {label}\n </label>\n <input\n id={id}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n onChange={handleChange}\n className=\"dropin-input-file__input\"\n {...props}\n />\n </div>\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, Fragment } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Icon,\n Button,\n Skeleton,\n SkeletonRow,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/Table/Table.css';\n\ntype Sortable = 'asc' | 'desc' | true;\n\ntype Column =\n | { label: string; key: string; ariaLabel?: string; sortBy?: Sortable }\n | {\n label: VNode<HTMLAttributes<HTMLElement>>;\n key: string;\n ariaLabel: string;\n sortBy?: Sortable;\n };\n\ntype RowData = {\n [key: string]: VNode | string | number | undefined;\n _rowDetails?: VNode | string; // Special property for expandable row content\n};\n\nexport interface TableProps\n extends Omit<HTMLAttributes<HTMLTableElement>, 'loading'> {\n columns: Column[];\n rowData: RowData[];\n mobileLayout?: 'stacked' | 'none';\n caption?: string;\n expandedRows?: Set<number>;\n loading?: boolean;\n skeletonRowCount?: number;\n onSortChange?: (columnKey: string, direction: Sortable) => void;\n}\n\nexport const Table: FunctionComponent<TableProps> = ({\n className,\n children,\n columns = [],\n rowData = [],\n mobileLayout = 'none',\n caption,\n expandedRows = new Set(),\n loading = false,\n skeletonRowCount = 10,\n onSortChange,\n ...props\n}) => {\n const translations = useText({\n sortedAscending: 'Dropin.Table.sortedAscending',\n sortedDescending: 'Dropin.Table.sortedDescending',\n sortBy: 'Dropin.Table.sortBy',\n });\n\n const handleSort = (column: Column) => {\n if (!onSortChange) return;\n\n // Determine next sort direction\n let nextDirection: Sortable;\n if (column.sortBy === true) {\n nextDirection = 'asc';\n } else if (column.sortBy === 'asc') {\n nextDirection = 'desc';\n } else {\n nextDirection = true;\n }\n\n onSortChange(column.key, nextDirection);\n };\n\n const renderSortButton = (column: Column) => {\n if (column.sortBy === undefined) return null;\n const label = column.ariaLabel ?? (column.label as string);\n\n let iconSource: string;\n let ariaLabel: string;\n\n if (column.sortBy === 'asc') {\n iconSource = 'ChevronUp';\n ariaLabel = translations.sortedAscending.replace('{label}', label);\n } else if (column.sortBy === 'desc') {\n iconSource = 'ChevronDown';\n ariaLabel = translations.sortedDescending.replace('{label}', label);\n } else {\n // Show chevron down when sortable but not sorted\n iconSource = 'ChevronDown';\n ariaLabel = translations.sortBy.replace('{label}', label);\n }\n\n return (\n <Button\n variant=\"tertiary\"\n size=\"medium\"\n className=\"dropin-table__header__sort-button\"\n icon={<Icon source={iconSource} />}\n aria-label={ariaLabel}\n onClick={() => handleSort(column)}\n />\n );\n };\n\n const renderSkeletonRows = () => {\n return Array.from({ length: skeletonRowCount }, (_, rowIndex) => (\n <tr key={`skeleton-${rowIndex}`} className=\"dropin-table__body__row\">\n {columns.map((column) => (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={column.ariaLabel ?? column.label}\n >\n <Skeleton>\n <SkeletonRow variant=\"row\" size=\"small\" fullWidth />\n </Skeleton>\n </td>\n ))}\n </tr>\n ));\n };\n\n const renderDataRows = () => {\n return rowData.map((row, rowIndex) => {\n const hasDetails = row._rowDetails !== undefined;\n const isExpanded = expandedRows.has(rowIndex);\n\n return (\n <Fragment key={rowIndex}>\n <tr className={classes([\n 'dropin-table__body__row',\n ['dropin-table__body__row--expanded', isExpanded && hasDetails],\n ])}>\n {columns.map((column) => {\n const cell = row[column.key];\n const label = column.ariaLabel ?? column.label;\n\n if (typeof cell === 'string' || typeof cell === 'number') {\n return (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={label}\n >\n {cell}\n </td>\n );\n }\n\n return (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={label}\n >\n <VComponent node={cell!} />\n </td>\n );\n })}\n </tr>\n {hasDetails && isExpanded && (\n <tr\n key={`${rowIndex}-details`}\n className=\"dropin-table__row-details dropin-table__row-details--expanded\"\n id={`row-${rowIndex}-details`}\n >\n <td\n className=\"dropin-table__row-details__cell\"\n colSpan={columns.length}\n role=\"region\"\n aria-labelledby={`row-${rowIndex}-details`}\n >\n {typeof row._rowDetails === 'string' ? (\n row._rowDetails\n ) : (\n <VComponent node={row._rowDetails!} />\n )}\n </td>\n </tr>\n )}\n </Fragment>\n );\n });\n };\n\n const getAriaSort = (\n column: Column\n ): 'none' | 'ascending' | 'descending' | 'other' | undefined => {\n if (column.sortBy === true) return 'none';\n if (column.sortBy === 'asc') return 'ascending';\n if (column.sortBy === 'desc') return 'descending';\n return undefined;\n };\n\n return (\n <div\n className={classes([\n 'dropin-table',\n `dropin-table--mobile-layout-${mobileLayout}`,\n className,\n ])}\n >\n <table {...props} className=\"dropin-table__table\">\n {caption && (\n <caption className=\"dropin-table__caption\">{caption}</caption>\n )}\n <thead className=\"dropin-table__header\">\n <tr className=\"dropin-table__header__row\">\n {columns.map((column) => (\n <th\n key={column.key}\n className={classes([\n 'dropin-table__header__cell',\n [\n 'dropin-table__header__cell--sorted',\n column.sortBy === 'asc' || column.sortBy === 'desc',\n ],\n [\n 'dropin-table__header__cell--sortable',\n column.sortBy !== undefined,\n ],\n ])}\n aria-sort={getAriaSort(column)}\n >\n {column.label}\n {renderSortButton(column)}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className=\"dropin-table__body\">\n {loading\n ? // Render skeleton rows when loading\n renderSkeletonRows()\n : // Render actual data when not loading\n renderDataRows()}\n </tbody>\n </table>\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 { Button, Tag } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { ChevronDown, Close, Check } from '@adobe-commerce/elsie/icons';\nimport { useText } from 'preact-i18n';\nimport {\n useState,\n useCallback,\n useEffect,\n useRef,\n useMemo,\n} from 'preact/hooks';\nimport { JSX } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/MultiSelect/MultiSelect.css';\n\ntype OptionValue = string | number;\n\ninterface Option {\n label: string;\n value: OptionValue;\n disabled?: boolean;\n}\n\ntype SelectedValues = OptionValue[];\n\n// Utility functions\nconst filterOptions = (options: Option[], searchTerm: string): Option[] => {\n return options.filter((option) =>\n option.label.toLowerCase().includes(searchTerm.toLowerCase())\n );\n};\n\nconst getSelectedLabels = (\n value: SelectedValues,\n options: Option[]\n): (string | OptionValue)[] => {\n return value.map((v) => {\n const option = options.find((opt) => opt.value === v);\n return option ? option.label : v;\n });\n};\n\nconst generateIds = (id: string, name: string, floatingLabel?: string) => {\n const baseId = id || name;\n return {\n listboxId: `${baseId}-listbox`,\n searchInputId: `${baseId}-search`,\n labelId: floatingLabel ? `${baseId}-label` : undefined,\n selectedDescriptionId: `${name}-selected-description`,\n };\n};\n\nconst useAccessibilityAnnouncements = () => {\n const [announcement, setAnnouncement] = useState('');\n\n const announce = useCallback((message: string) => {\n setAnnouncement(message);\n setTimeout(() => setAnnouncement(''), 1000);\n }, []);\n\n return { announcement, announce };\n};\n\nconst useKeyboardNavigation = (\n filteredOptions: Option[],\n focusedIndex: number,\n setFocusedIndex: (value: number | ((prev: number) => number)) => void,\n dropdownRef: { current: HTMLDivElement | null }\n) => {\n // Scroll focused item into view\n useEffect(() => {\n if (focusedIndex >= 0 && dropdownRef.current) {\n const items = dropdownRef.current.querySelectorAll('[data-option-index]');\n if (items[focusedIndex]) {\n items[focusedIndex].scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n }\n }, [focusedIndex, dropdownRef]);\n\n const navigate = useCallback(\n (direction: 'up' | 'down') => {\n setFocusedIndex((prev) => {\n const step = direction === 'up' ? -1 : 1;\n let nextIndex = prev + step;\n\n // Skip disabled options in the current direction\n while (\n nextIndex >= 0 &&\n nextIndex < filteredOptions.length &&\n filteredOptions[nextIndex]?.disabled\n ) {\n nextIndex += step;\n }\n\n // If we found a valid option, return it\n if (nextIndex >= 0 && nextIndex < filteredOptions.length) {\n return nextIndex;\n }\n\n // Wrap around: find the first enabled option from the opposite end\n if (direction === 'up') {\n for (let i = filteredOptions.length - 1; i >= 0; i--) {\n if (!filteredOptions[i]?.disabled) return i;\n }\n } else {\n for (let i = 0; i < filteredOptions.length; i++) {\n if (!filteredOptions[i]?.disabled) return i;\n }\n }\n\n return -1;\n });\n },\n [filteredOptions, setFocusedIndex]\n );\n\n return { navigate };\n};\n\nexport interface MultiSelectProps {\n options: Option[];\n value: SelectedValues;\n onChange: (value: SelectedValues) => void;\n placeholder?: string;\n selectAllText?: string;\n deselectAllText?: string;\n noResultsText?: string;\n name?: string;\n disabled?: boolean;\n className?: string;\n maxHeight?: number;\n floatingLabel?: string;\n error?: boolean;\n success?: boolean;\n id?: string;\n}\n\nexport const MultiSelect: FunctionComponent<MultiSelectProps> = ({\n options = [],\n value = [],\n onChange = () => {},\n id = '',\n className = '',\n selectAllText = '',\n deselectAllText = '',\n placeholder = '',\n noResultsText = '',\n floatingLabel = '',\n name = 'multi-select-sdk',\n error = false,\n success = false,\n disabled = false,\n maxHeight = 300,\n}) => {\n const translations = useText({\n selectAll: 'Dropin.MultiSelect.selectAll',\n deselectAll: 'Dropin.MultiSelect.deselectAll',\n placeholder: 'Dropin.MultiSelect.placeholder',\n noResultsText: 'Dropin.MultiSelect.noResultsText',\n removed: 'Dropin.MultiSelect.ariaLabel.removed',\n added: 'Dropin.MultiSelect.ariaLabel.added',\n itemsSelected: 'Dropin.MultiSelect.ariaLabel.itemsSelected',\n itemsAdded: 'Dropin.MultiSelect.ariaLabel.itemsAdded',\n itemsRemoved: 'Dropin.MultiSelect.ariaLabel.itemsRemoved',\n selectedTotal: 'Dropin.MultiSelect.ariaLabel.selectedTotal',\n noResultsFor: 'Dropin.MultiSelect.ariaLabel.noResultsFor',\n optionsAvailable: 'Dropin.MultiSelect.ariaLabel.optionsAvailable',\n dropdownExpanded: 'Dropin.MultiSelect.ariaLabel.dropdownExpanded',\n useArrowKeys: 'Dropin.MultiSelect.ariaLabel.useArrowKeys',\n removeFromSelection: 'Dropin.MultiSelect.ariaLabel.removeFromSelection',\n fromSelection: 'Dropin.MultiSelect.ariaLabel.fromSelection',\n selectedItem: 'Dropin.MultiSelect.ariaLabel.selectedItem',\n inField: 'Dropin.MultiSelect.ariaLabel.inField',\n selectedItems: 'Dropin.MultiSelect.ariaLabel.selectedItems',\n scrollableOptionsList: 'Dropin.MultiSelect.ariaLabel.scrollableOptionsList',\n selectOptions: 'Dropin.MultiSelect.ariaLabel.selectOptions',\n itemAction: 'Dropin.MultiSelect.ariaLabel.itemAction',\n bulkAdded: 'Dropin.MultiSelect.ariaLabel.bulkAdded',\n bulkRemoved: 'Dropin.MultiSelect.ariaLabel.bulkRemoved',\n dropdownExpandedWithOptions:\n 'Dropin.MultiSelect.ariaLabel.dropdownExpandedWithOptions',\n selectedItemInField: 'Dropin.MultiSelect.ariaLabel.selectedItemInField',\n removeFromSelectionWithText:\n 'Dropin.MultiSelect.ariaLabel.removeFromSelectionWithText',\n itemsSelectedDescription:\n 'Dropin.MultiSelect.ariaLabel.itemsSelectedDescription',\n noItemsSelected: 'Dropin.MultiSelect.ariaLabel.noItemsSelected',\n });\n\n const [isOpen, setIsOpen] = useState(false);\n const [searchTerm, setSearchTerm] = useState('');\n const [focusedIndex, setFocusedIndex] = useState(-1);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const { announcement, announce } = useAccessibilityAnnouncements();\n\n // Helper function to close dropdown and optionally reset search state\n const closeDropdown = useCallback((resetSearch = false) => {\n setIsOpen(false);\n if (resetSearch) {\n setSearchTerm('');\n }\n setFocusedIndex(-1);\n }, []);\n\n // Filter options based on the search term\n const filteredOptions = useMemo(\n () => filterOptions(options, searchTerm),\n [options, searchTerm]\n );\n\n // Keyboard navigation\n const { navigate } = useKeyboardNavigation(\n filteredOptions,\n focusedIndex,\n setFocusedIndex,\n dropdownRef\n );\n\n // Close dropdown on the outside click\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n containerRef.current &&\n event.target &&\n !containerRef.current.contains(event.target as Node)\n ) {\n closeDropdown(true); // Reset search when clicking outside\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [closeDropdown]);\n\n // Toggle dropdown on container click (excluding tags)\n const handleContainerClick = (event: MouseEvent) => {\n if (\n !disabled &&\n searchInputRef.current &&\n event.target &&\n !(event.target as Element).closest('[data-tag]')\n ) {\n if (isOpen) {\n closeDropdown(false); // Don't reset search when clicking inside\n } else {\n searchInputRef.current.focus();\n setIsOpen(true);\n }\n }\n };\n\n // Handle option selection/deselection\n const handleSelect = useCallback(\n (optionValue: OptionValue) => {\n const option = options.find((opt) => opt.value === optionValue);\n\n const isCurrentlySelected = value.includes(optionValue);\n const newValue = isCurrentlySelected\n ? value.filter((v) => v !== optionValue)\n : [...value, optionValue];\n\n onChange(newValue);\n searchInputRef.current?.focus();\n\n // A11y - Announce the selection change\n if (option) {\n const action = isCurrentlySelected\n ? translations.removed\n : translations.added;\n announce(\n translations.itemAction\n .replace('{label}', option.label)\n .replace('{action}', action)\n .replace('{count}', newValue.length.toString())\n );\n }\n },\n [value, onChange, options, announce, translations]\n );\n\n // Handle option deselection via the Tag button\n const handleRemoveTag = (event: MouseEvent, optionValue: OptionValue) => {\n event.stopPropagation();\n const option = options.find((opt) => opt.value === optionValue);\n const newValue = value.filter((v) => v !== optionValue);\n onChange(newValue);\n searchInputRef.current?.focus();\n\n // A11y - Announce the selection change\n if (option) {\n announce(\n translations.itemAction\n .replace('{label}', option.label)\n .replace('{action}', translations.removed)\n .replace('{count}', newValue.length.toString())\n );\n }\n };\n\n const handleSelectAll = (event: MouseEvent) => {\n event.preventDefault();\n const allFilteredValues = filteredOptions.map((opt) => opt.value);\n const currentValueSet = new Set(value);\n const newSelections = allFilteredValues.filter(\n (val) => !currentValueSet.has(val)\n );\n const newValue = [...value, ...newSelections];\n onChange(newValue);\n\n // Announce the bulk selection\n if (newSelections.length > 0) {\n announce(\n translations.bulkAdded\n .replace('{count}', newSelections.length.toString())\n .replace('{total}', newValue.length.toString())\n );\n }\n };\n\n const handleDeselectAll = (event: MouseEvent) => {\n event.preventDefault();\n const filteredValues = new Set(filteredOptions.map((opt) => opt.value));\n const removedCount = value.filter((v) => filteredValues.has(v)).length;\n const newValue = value.filter((v) => !filteredValues.has(v));\n onChange(newValue);\n\n // A11y - Announce the bulk deselection\n if (removedCount > 0) {\n announce(\n translations.bulkRemoved\n .replace('{count}', removedCount.toString())\n .replace('{total}', newValue.length.toString())\n );\n }\n };\n\n // A11y - Keyboard navigation\n const handleInputKeyDown = (\n event: JSX.TargetedKeyboardEvent<HTMLInputElement>\n ) => {\n // Handle backspace to remove the last tag\n if (event.key === 'Backspace' && searchTerm === '' && value.length > 0) {\n event.preventDefault();\n const newValue = value.slice(0, -1);\n onChange(newValue);\n return;\n }\n\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault();\n setIsOpen(true);\n return;\n }\n\n if (isOpen) {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n navigate('down');\n break;\n case 'ArrowUp':\n event.preventDefault();\n navigate('up');\n break;\n case 'Enter':\n event.preventDefault();\n if (focusedIndex >= 0 && focusedIndex < filteredOptions.length) {\n const focusedOption = filteredOptions[focusedIndex];\n if (!focusedOption?.disabled) {\n handleSelect(focusedOption.value);\n }\n } else if (\n filteredOptions.length === 1 &&\n !filteredOptions[0]?.disabled\n ) {\n handleSelect(filteredOptions[0].value);\n }\n break;\n case 'Escape':\n event.preventDefault();\n closeDropdown(true); // Reset search on Escape\n break;\n case 'Tab':\n closeDropdown(true); // Reset search on Tab (leaving component)\n break;\n }\n }\n };\n\n // Array with labels of all selected options\n const selectedLabels = useMemo(\n () => getSelectedLabels(value, options),\n [value, options]\n );\n\n // A11y - Generate unique IDs\n const { listboxId, searchInputId, labelId, selectedDescriptionId } =\n generateIds(id, name, floatingLabel);\n const currentFocusedId =\n focusedIndex >= 0 ? `${listboxId}-option-${focusedIndex}` : '';\n\n // Check if any items are selected (regardless of filtering)\n const hasSelection = useMemo(() => value.length > 0, [value]);\n\n useEffect(() => {\n if (searchTerm && !isOpen) {\n setIsOpen(true);\n }\n }, [isOpen, searchTerm]);\n\n // Announce filtered results\n useEffect(() => {\n if (isOpen && searchTerm) {\n const count = filteredOptions.length;\n if (count === 0) {\n announce(`${translations.noResultsFor} \"${searchTerm}\"`);\n } else {\n announce(`${count} ${translations.optionsAvailable}`);\n }\n }\n }, [filteredOptions.length, searchTerm, isOpen, announce, translations]);\n\n useEffect(() => {\n if (isOpen && searchInputRef.current) {\n searchInputRef.current.focus();\n // Announce when dropdown opens with available options\n if (filteredOptions.length > 0) {\n announce(\n translations.dropdownExpandedWithOptions\n .replace('{count}', filteredOptions.length.toString())\n .replace('{s}', filteredOptions.length === 1 ? '' : 's')\n );\n }\n }\n }, [\n isOpen,\n selectedLabels.length,\n filteredOptions.length,\n announce,\n translations,\n ]);\n\n const renderSelectedTags = () => (\n <>\n {selectedLabels.map((label, index) => {\n const totalSelected = value.length;\n const fieldContext = floatingLabel ? `${floatingLabel}: ` : '';\n // Use i18n translations for selected items text\n const selectedItemsText =\n totalSelected === 1\n ? `${fieldContext}${translations.itemsSelected\n .replace('{count}', '1')\n .replace('{labels}', String(label))\n .replace('{s}', '')}`\n : `${fieldContext}${translations.itemsSelected\n .replace('{count}', totalSelected.toString())\n .replace('{labels}', selectedLabels.join(', '))\n .replace('{s}', totalSelected === 1 ? '' : 's')}`;\n\n return (\n <Tag\n key={value[index]}\n data-tag=\"true\"\n className=\"dropin-multi-select__tag\"\n role=\"group\"\n aria-label={\n floatingLabel\n ? translations.selectedItemInField\n .replace('{label}', String(label))\n .replace('{field}', floatingLabel)\n : `${translations.selectedItem} ${String(label)}`\n }\n >\n <span aria-hidden=\"true\">{label}</span>\n <button\n type=\"button\"\n onClick={(e) => handleRemoveTag(e, value[index])}\n className=\"dropin-multi-select__tag-remove\"\n disabled={disabled}\n aria-label={translations.removeFromSelectionWithText\n .replace('{label}', String(label))\n .replace('{text}', selectedItemsText)}\n >\n <Close size={12} aria-hidden=\"true\" />\n </button>\n </Tag>\n );\n })}\n </>\n );\n\n const renderSearchInput = () => (\n <input\n id={searchInputId}\n ref={searchInputRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n aria-controls={listboxId}\n className={classes([\n 'dropin-multi-select__search',\n ['dropin-multi-select__search--with-floating-label', !!floatingLabel],\n ])}\n placeholder={\n value.length === 0 ? placeholder || translations.placeholder : ''\n }\n value={searchTerm}\n onChange={(e: JSX.TargetedEvent<HTMLInputElement, Event>) => {\n const target = e.target as HTMLInputElement;\n setSearchTerm(target.value);\n setFocusedIndex(-1);\n }}\n onKeyDown={handleInputKeyDown}\n onFocus={() => setIsOpen(true)}\n disabled={disabled}\n style={{\n minWidth: searchTerm ? `${searchTerm.length * 8 + 20}px` : '40px',\n }}\n aria-autocomplete=\"list\"\n aria-activedescendant={\n isOpen && currentFocusedId ? currentFocusedId : undefined\n }\n {...(labelId\n ? { 'aria-labelledby': labelId }\n : {\n 'aria-label':\n floatingLabel ||\n placeholder ||\n translations.placeholder ||\n translations.selectOptions,\n })}\n aria-describedby={selectedDescriptionId}\n />\n );\n\n const renderDropdownControls = () => (\n <div className=\"dropin-multi-select__controls\">\n <Button\n variant=\"tertiary\"\n type=\"button\"\n className=\"dropin-multi-select__button dropin-multi-select__button--select-all\"\n onMouseDown={handleSelectAll}\n data-testid=\"multi-select-select-all\"\n >\n {selectAllText || translations.selectAll}\n </Button>\n {' | '}\n <Button\n variant=\"tertiary\"\n type=\"button\"\n className=\"dropin-multi-select__button dropin-multi-select__button--deselect-all\"\n onMouseDown={handleDeselectAll}\n disabled={!hasSelection}\n data-testid=\"multi-select-deselect-all\"\n >\n {deselectAllText || translations.deselectAll}\n </Button>\n </div>\n );\n\n const renderOptionsList = () => (\n <ul\n className=\"dropin-multi-select__list\"\n id={listboxId}\n role=\"listbox\"\n aria-multiselectable=\"true\"\n aria-label={floatingLabel || placeholder || translations.placeholder}\n >\n {filteredOptions.map((option, index) => {\n const isSelected = value.includes(option.value);\n const isFocused = index === focusedIndex;\n const optionId = `${listboxId}-option-${index}`;\n\n return (\n <li\n key={option.value}\n id={optionId}\n data-option-index={index}\n data-testid={`multi-select-option-${index}`}\n className={classes([\n 'dropin-multi-select__option',\n ['dropin-multi-select__option--focused', isFocused],\n ['dropin-multi-select__option--selected', isSelected],\n ['dropin-multi-select__option--disabled', option.disabled],\n ])}\n onClick={() => {\n if (!option.disabled) {\n handleSelect(option.value);\n }\n }}\n onMouseEnter={() => !option.disabled && setFocusedIndex(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n >\n <span\n className={classes([\n 'dropin-multi-select__option-label',\n [\n 'dropin-multi-select__option-label--disabled',\n option.disabled,\n ],\n ])}\n >\n {option.label}\n </span>\n {isSelected && (\n <Check\n width={16}\n height={16}\n className=\"dropin-multi-select__check-icon\"\n aria-hidden=\"true\"\n />\n )}\n </li>\n );\n })}\n </ul>\n );\n\n return (\n <div\n ref={containerRef}\n data-testid=\"multi-select\"\n className={classes(['dropin-multi-select', className])}\n >\n {/* Single hidden input with comma-separated values for form submission */}\n <input\n id={id || name}\n type=\"hidden\"\n name={name}\n data-testid=\"multi-select-hidden-input\"\n value={value.join(',')}\n disabled={disabled}\n aria-hidden=\"true\"\n />\n <div\n className={classes([\n 'dropin-multi-select__container',\n ['dropin-multi-select__container--open', isOpen],\n ['dropin-multi-select__container--disabled', disabled],\n ['dropin-multi-select__container--error', error],\n ['dropin-multi-select__container--success', success],\n [\n 'dropin-multi-select__container--with-floating-label',\n !!floatingLabel,\n ],\n [\n 'dropin-multi-select__container--has-value',\n !!(floatingLabel && (value.length > 0 || searchTerm.length > 0)),\n ],\n ])}\n onMouseDown={handleContainerClick}\n data-testid=\"multi-select-container\"\n >\n <div\n className={classes([\n 'dropin-multi-select__tags-area',\n [\n 'dropin-multi-select__tags-area--has-values',\n selectedLabels.length > 0,\n ],\n ])}\n data-testid=\"multi-select-tags-area\"\n role=\"group\"\n aria-label={translations.selectedItems}\n >\n {/* Screen-reader-only description of selected items */}\n <div\n id={selectedDescriptionId}\n className=\"dropin-multi-select__sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {value.length > 0\n ? translations.itemsSelectedDescription\n .replace('{count}', value.length.toString())\n .replace('{s}', value.length === 1 ? '' : 's')\n .replace('{labels}', selectedLabels.join(', '))\n : translations.noItemsSelected}\n </div>\n\n {renderSelectedTags()}\n {renderSearchInput()}\n {floatingLabel ? (\n <label\n className=\"dropin-multi-select__floating-label\"\n htmlFor={searchInputId}\n id={labelId}\n >\n {floatingLabel}\n </label>\n ) : null}\n </div>\n <ChevronDown\n className={classes([\n 'dropin-multi-select__chevron',\n ['dropin-multi-select__chevron--open', isOpen],\n ])}\n />\n </div>\n\n {isOpen && (\n <div\n className=\"dropin-multi-select__dropdown\"\n data-testid=\"multi-select-dropdown\"\n >\n {filteredOptions.length > 0 && renderDropdownControls()}\n\n <div\n ref={dropdownRef}\n className=\"dropin-multi-select__options\"\n data-testid=\"multi-select-options\"\n style={{ maxHeight: `${maxHeight}px` }}\n tabIndex={0}\n role=\"region\"\n aria-label={translations.scrollableOptionsList}\n >\n {filteredOptions.length === 0 ? (\n <div\n className=\"dropin-multi-select__no-results\"\n data-testid=\"multi-select-no-results\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {noResultsText || translations.noResultsText}{' '}\n {searchTerm && `\"${searchTerm}\"`}\n </div>\n ) : (\n renderOptionsList()\n )}\n </div>\n </div>\n )}\n\n {/* Live region for screen reader announcements */}\n <div\n className=\"dropin-multi-select__announcements dropin-multi-select__sr-only\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n >\n {announcement}\n </div>\n </div>\n );\n};\n"],"file":"components.js"}
|