@dropins/tools 2.0.0-beta.0 → 2.0.0
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 +131 -0
- package/components.js +1 -1
- package/components.js.map +1 -1
- package/lib/aem/assets.js +1 -1
- package/lib/aem/configs.js +1 -1
- package/package.json +1 -1
package/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"moBAwBA,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,EA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AS,GAAKmD,GAAA,EAE/Brd,EAAC,OACC,IAAKqa,EACL,UAAU,+BACV,cAAY,uBACZ,MAAO,CAAE,UAAW,GAAGU,CAAS,MAChC,SAAU,EACV,KAAK,SACL,aAAYvW,EAAa,sBAExB,SAAA0V,EAAgB,SAAW,EAC1BpW,EAAC,OACC,UAAU,kCACV,cAAY,0BACZ,KAAK,SACL,YAAU,SAET,UAAAgX,GAAiBtW,EAAa,cAAe,IAC7C+U,GAAc,IAAIA,CAAU,OAG/B+D,GAAA,CAAkB,EAEtB,IAKJtd,EAAC,OACC,UAAU,kEACV,YAAU,YACV,cAAY,OAEX,SAAA8Z,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","translations","useText","handleOnValue","input","VComponent","WarningWithCircle","CheckWithCircle","InputDate","label","onChange","onBlur","internalValue","setInternalValue","isPickerOpen","setIsPickerOpen","iosInputRef","useRef","dictionary","handleOnFocus","isIOSMobileDevice","_a","handleOnClick","event","handleOnBlur","handleInputChange","Field","formatCalendarDate","DateIcon","PasswordStatusIndicator","minLength","requiredCharacterClasses","uniqueSymbolsStatus","validateLengthConfig","getIcon","useMemo","PendingValidation","Check","ErrorValidation","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","getPriceFormatter","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","singleOption","Picker","options","handleSelect","disableWhenSingle","uniqueId","isRequired","isDisabled","selectRef","accessibleName","option","selectedValue","setSelectedValue","select","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","descriptionId","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","_d","Close","action","Portal","portalRoot","contentRef","useLayoutEffect","FOCUSABLE_SELECTOR","Modal","centered","backgroundDim","clickToDismiss","escapeToDismiss","onClose","showCloseButton","titleId","bodyRef","previouslyFocusedElement","handleOnClose","handleOutsideClick","modal","modalBody","handleKeyDown","scrollingElement","defaultOverflowValue","body","firstFocusable","focusable","first","last","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","contentId","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 new Error(`Failed to fetch SVG: ${response.status} ${response.statusText}`);\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 // eslint-disable-next-line react/no-danger\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 {\n CheckWithCircle,\n WarningWithCircle,\n} from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\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 const translations = useText({\n errorIconAriaLabel: 'Dropin.Input.errorIconAriaLabel',\n successIconAriaLabel: 'Dropin.Input.successIconAriaLabel',\n });\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 role=\"img\"\n aria-label={translations.errorIconAriaLabel}\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 role=\"img\"\n aria-label={translations.successIconAriaLabel}\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 { useCallback, useRef, useState } from 'preact/hooks';\nimport {\n classes,\n formatCalendarDate,\n isIOSMobileDevice,\n} from '@adobe-commerce/elsie/lib';\nimport { JSX } from 'preact/compat';\nimport {\n Field,\n Icon,\n Input,\n InputProps,\n} from '@adobe-commerce/elsie/components';\nimport { Date as DateIcon } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/InputDate/InputDate.css';\n\nexport interface InputDateProps extends Omit<InputProps, 'error' | 'value'> {\n label?: string;\n name?: string;\n error?: string;\n value?: string;\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 ?? '');\n const [isPickerOpen, setIsPickerOpen] = useState(false);\n const iosInputRef = useRef<HTMLInputElement>(null);\n const dictionary = useText({\n picker: 'Dropin.InputDate.picker',\n });\n\n const handleOnFocus: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(() => {\n setIsPickerOpen(true);\n\n if (!isIOSMobileDevice()) return;\n\n iosInputRef.current?.focus();\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 setIsPickerOpen(false);\n onBlur?.(event);\n },\n [onBlur]\n );\n\n const handleInputChange: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(\n (event) => {\n setInternalValue((event.target as HTMLInputElement).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={\n isPickerOpen ? internalValue : formatCalendarDate(internalValue)\n }\n type={isPickerOpen ? 'date' : 'text'}\n placeholder={label}\n floatingLabel={label}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n onChange={handleInputChange}\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={DateIcon} 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 { useMemo } from 'preact/hooks';\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\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 iconPendingAlt: 'Dropin.PasswordStatusIndicator.iconPendingAlt',\n iconSuccessAlt: 'Dropin.PasswordStatusIndicator.iconSuccessAlt',\n iconErrorAlt: 'Dropin.PasswordStatusIndicator.iconErrorAlt',\n });\n\n const getIcon = useMemo<{ [key: string]: JSX.Element }>(\n () => ({\n pending: (\n <PendingValidation\n role=\"img\"\n aria-label={translations.iconPendingAlt}\n />\n ),\n success: <Check role=\"img\" aria-label={translations.iconSuccessAlt} />,\n error: (\n <ErrorValidation\n style={{ fill: 'red' }}\n role=\"img\"\n aria-label={translations.iconErrorAlt}\n />\n ),\n }),\n [\n translations.iconPendingAlt,\n translations.iconSuccessAlt,\n translations.iconErrorAlt,\n ]\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, useRef, 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 disableWhenSingle?: 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 singleOption?: PickerOption\n) {\n if (value) return value;\n if (defaultOption) return defaultOption.value;\n // sole option wins over the placeholder so it stays selected, not blank\n if (singleOption) return singleOption.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 disableWhenSingle = true,\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 || (disableWhenSingle && options?.length === 1);\n const selectRef = useRef<HTMLSelectElement>(null);\n const accessibleName = name ?? floatingLabel ?? placeholder;\n\n // find the first option that is not disabled\n const firstAvailableOption = options?.find((option) => !option.disabled);\n\n // the only selectable option when the picker auto-disables; a disabled\n // <select> never fires change, so we must emit it ourselves (see below).\n // when disableWhenSingle is false the picker stays interactive, so no\n // special handling is needed.\n const singleOption =\n !disabled &&\n disableWhenSingle &&\n options?.length === 1 &&\n !options[0]?.disabled\n ? options[0]\n : undefined;\n\n const [selectedValue, setSelectedValue] = useState<PickerValue>(() => {\n return findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption,\n singleOption\n );\n });\n\n useEffect(() => {\n setSelectedValue(\n findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption,\n singleOption\n )\n );\n }, [\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption,\n singleOption,\n ]);\n\n // commit the sole option to the consumer; skip once value has come back in.\n // dispatch a real change event so handleOptionClick emits it: consumers get\n // a genuine Event (some call preventDefault) identical to a user selection.\n useEffect(() => {\n if (!singleOption || value === singleOption.value) return;\n\n const select = selectRef.current;\n if (!select) return;\n\n select.value = singleOption.value as string;\n select.dispatchEvent(new Event('change', { bubbles: true }));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [singleOption?.value, value]);\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 ref={selectRef}\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={accessibleName}\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={uniqueId}\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 const descriptionId = `${id}-description`;\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 aria-describedby={error ? descriptionId : undefined}\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'])}>{fieldContent}</div>\n\n <div\n id={descriptionId}\n role=\"status\"\n aria-live=\"polite\"\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 { ActionButtonProps } from '@adobe-commerce/elsie/components/ActionButton';\nimport '@adobe-commerce/elsie/components/ActionButtonGroup/ActionButtonGroup.css';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode, cloneElement } from 'preact';\nimport { Children, HTMLAttributes } from 'preact/compat';\nimport { useCallback, useState } from 'preact/hooks';\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 'aria-label'?: string;\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 role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? 'assertive' : 'polite'}\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={\n additionalActions[0]?.['aria-label'] ??\n additionalActions[0]?.label\n }\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 aria-label={action['aria-label'] ?? action.label}\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 useRef,\n} from 'preact/compat';\nimport { useId } from 'preact/hooks';\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\nconst FOCUSABLE_SELECTOR =\n 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])';\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 titleId = useId();\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const previouslyFocusedElement = useRef<HTMLElement | null>(null);\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 // Move focus into the modal on open, restore it to the trigger on close\n useEffect(() => {\n previouslyFocusedElement.current = document.activeElement as HTMLElement;\n\n const body = bodyRef.current as HTMLDivElement;\n const [firstFocusable] = body.querySelectorAll<HTMLElement>(\n FOCUSABLE_SELECTOR\n );\n\n (firstFocusable ?? body).focus();\n\n return () => {\n previouslyFocusedElement.current?.focus();\n };\n }, []);\n\n // Trap Tab focus inside the modal\n useEffect(() => {\n const body = bodyRef.current as HTMLDivElement;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Tab') return;\n\n const focusable = body.querySelectorAll<HTMLElement>(\n FOCUSABLE_SELECTOR\n );\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (!first || !last) return;\n\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n\n body.addEventListener('keydown', handleKeyDown);\n\n return () => {\n body.removeEventListener('keydown', handleKeyDown);\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 role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? titleId : undefined}\n tabIndex={-1}\n {...props}\n ref={bodyRef}\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\n id={titleId}\n className={classes(['dropin-modal__header-title-content'])}\n >\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 ariaLabel?: 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 ariaLabel,\n busy = false,\n disabled = false,\n children,\n className,\n icon,\n onChange,\n selected = true,\n ...props\n}) => {\n const contentId = `dropin-toggle-button__content-${name}-${value}`;\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={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : contentId}\n busy={busy}\n className={classes([className, 'dropin-toggle-button__radioButton'])}\n />\n\n <span className=\"dropin-toggle-button__content\" id={contentId}>\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 const 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":"moBAwBA,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,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,EACAI,GAAA,EACA/Y,EACCpE,EAAC,SACC,UAAU,sCACV,QAASyc,GACT,GAAIC,GAEH,SAAAtY,CAAA,GAED,QAENpE,EAAC+K,GAAA,CACC,UAAW9K,EAAQ,CACjB,+BACA,CAAC,qCAAsC+a,CAAM,EAC9C,GACH,IAGDA,GACClX,EAAC,OACC,UAAU,gCACV,cAAY,wBAEX,UAAAoW,EAAgB,OAAS,GAAKmD,GAAA,EAE/Brd,EAAC,OACC,IAAKqa,EACL,UAAU,+BACV,cAAY,uBACZ,MAAO,CAAE,UAAW,GAAGU,CAAS,MAChC,SAAU,EACV,KAAK,SACL,aAAYvW,EAAa,sBAExB,SAAA0V,EAAgB,SAAW,EAC1BpW,EAAC,OACC,UAAU,kCACV,cAAY,0BACZ,KAAK,SACL,YAAU,SAET,UAAAgX,GAAiBtW,EAAa,cAAe,IAC7C+U,GAAc,IAAIA,CAAU,OAG/B+D,GAAA,CAAkB,EAEtB,IAKJtd,EAAC,OACC,UAAU,kEACV,YAAU,YACV,cAAY,OAEX,SAAA8Z,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","translations","useText","handleOnValue","input","VComponent","WarningWithCircle","CheckWithCircle","InputDate","label","onChange","onBlur","internalValue","setInternalValue","isPickerOpen","setIsPickerOpen","iosInputRef","useRef","dictionary","handleOnFocus","isIOSMobileDevice","_a","handleOnClick","event","handleOnBlur","handleInputChange","Field","formatCalendarDate","DateIcon","PasswordStatusIndicator","minLength","requiredCharacterClasses","uniqueSymbolsStatus","validateLengthConfig","getIcon","useMemo","PendingValidation","Check","ErrorValidation","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","getPriceFormatter","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","singleOption","Picker","options","handleSelect","disableWhenSingle","uniqueId","isRequired","isDisabled","selectRef","accessibleName","option","selectedValue","setSelectedValue","select","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","descriptionId","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","_d","Close","action","Portal","portalRoot","contentRef","useLayoutEffect","FOCUSABLE_SELECTOR","Modal","centered","backgroundDim","clickToDismiss","escapeToDismiss","onClose","showCloseButton","titleId","bodyRef","previouslyFocusedElement","handleOnClose","handleOutsideClick","modal","modalBody","handleKeyDown","scrollingElement","defaultOverflowValue","body","firstFocusable","focusable","first","last","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","contentId","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 new Error(`Failed to fetch SVG: ${response.status} ${response.statusText}`);\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 // eslint-disable-next-line react/no-danger\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 {\n CheckWithCircle,\n WarningWithCircle,\n} from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\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 const translations = useText({\n errorIconAriaLabel: 'Dropin.Input.errorIconAriaLabel',\n successIconAriaLabel: 'Dropin.Input.successIconAriaLabel',\n });\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 role=\"img\"\n aria-label={translations.errorIconAriaLabel}\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 role=\"img\"\n aria-label={translations.successIconAriaLabel}\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 { useCallback, useRef, useState } from 'preact/hooks';\nimport {\n classes,\n formatCalendarDate,\n isIOSMobileDevice,\n} from '@adobe-commerce/elsie/lib';\nimport { JSX } from 'preact/compat';\nimport {\n Field,\n Icon,\n Input,\n InputProps,\n} from '@adobe-commerce/elsie/components';\nimport { Date as DateIcon } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/InputDate/InputDate.css';\n\nexport interface InputDateProps extends Omit<InputProps, 'error' | 'value'> {\n label?: string;\n name?: string;\n error?: string;\n value?: string;\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 ?? '');\n const [isPickerOpen, setIsPickerOpen] = useState(false);\n const iosInputRef = useRef<HTMLInputElement>(null);\n const dictionary = useText({\n picker: 'Dropin.InputDate.picker',\n });\n\n const handleOnFocus: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(() => {\n setIsPickerOpen(true);\n\n if (!isIOSMobileDevice()) return;\n\n iosInputRef.current?.focus();\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 setIsPickerOpen(false);\n onBlur?.(event);\n },\n [onBlur]\n );\n\n const handleInputChange: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(\n (event) => {\n setInternalValue((event.target as HTMLInputElement).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={\n isPickerOpen ? internalValue : formatCalendarDate(internalValue)\n }\n type={isPickerOpen ? 'date' : 'text'}\n placeholder={label}\n floatingLabel={label}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n onChange={handleInputChange}\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={DateIcon} 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 { useMemo } from 'preact/hooks';\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\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 iconPendingAlt: 'Dropin.PasswordStatusIndicator.iconPendingAlt',\n iconSuccessAlt: 'Dropin.PasswordStatusIndicator.iconSuccessAlt',\n iconErrorAlt: 'Dropin.PasswordStatusIndicator.iconErrorAlt',\n });\n\n const getIcon = useMemo<{ [key: string]: JSX.Element }>(\n () => ({\n pending: (\n <PendingValidation\n role=\"img\"\n aria-label={translations.iconPendingAlt}\n />\n ),\n success: <Check role=\"img\" aria-label={translations.iconSuccessAlt} />,\n error: (\n <ErrorValidation\n style={{ fill: 'red' }}\n role=\"img\"\n aria-label={translations.iconErrorAlt}\n />\n ),\n }),\n [\n translations.iconPendingAlt,\n translations.iconSuccessAlt,\n translations.iconErrorAlt,\n ]\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, useRef, 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 disableWhenSingle?: 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 singleOption?: PickerOption\n) {\n if (value) return value;\n if (defaultOption) return defaultOption.value;\n // sole option wins over the placeholder so it stays selected, not blank\n if (singleOption) return singleOption.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 disableWhenSingle = true,\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 || (disableWhenSingle && options?.length === 1);\n const selectRef = useRef<HTMLSelectElement>(null);\n const accessibleName = name ?? floatingLabel ?? placeholder;\n\n // find the first option that is not disabled\n const firstAvailableOption = options?.find((option) => !option.disabled);\n\n // the only selectable option when the picker auto-disables; a disabled\n // <select> never fires change, so we must emit it ourselves (see below).\n // when disableWhenSingle is false the picker stays interactive, so no\n // special handling is needed.\n const singleOption =\n !disabled &&\n disableWhenSingle &&\n options?.length === 1 &&\n !options[0]?.disabled\n ? options[0]\n : undefined;\n\n const [selectedValue, setSelectedValue] = useState<PickerValue>(() => {\n return findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption,\n singleOption\n );\n });\n\n useEffect(() => {\n setSelectedValue(\n findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption,\n singleOption\n )\n );\n }, [\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption,\n singleOption,\n ]);\n\n // commit the sole option to the consumer; skip once value has come back in.\n // dispatch a real change event so handleOptionClick emits it: consumers get\n // a genuine Event (some call preventDefault) identical to a user selection.\n useEffect(() => {\n if (!singleOption || value === singleOption.value) return;\n\n const select = selectRef.current;\n if (!select) return;\n\n select.value = singleOption.value as string;\n select.dispatchEvent(new Event('change', { bubbles: true }));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [singleOption?.value, value]);\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 ref={selectRef}\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={accessibleName}\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={uniqueId}\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 const descriptionId = `${id}-description`;\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 aria-describedby={error ? descriptionId : undefined}\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'])}>{fieldContent}</div>\n\n <div\n id={descriptionId}\n role=\"status\"\n aria-live=\"polite\"\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 { ActionButtonProps } from '@adobe-commerce/elsie/components/ActionButton';\nimport '@adobe-commerce/elsie/components/ActionButtonGroup/ActionButtonGroup.css';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode, cloneElement } from 'preact';\nimport { Children, HTMLAttributes } from 'preact/compat';\nimport { useCallback, useState } from 'preact/hooks';\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 'aria-label'?: string;\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 role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? 'assertive' : 'polite'}\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={\n additionalActions[0]?.['aria-label'] ??\n additionalActions[0]?.label\n }\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 aria-label={action['aria-label'] ?? action.label}\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 useRef,\n} from 'preact/compat';\nimport { useId } from 'preact/hooks';\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\nconst FOCUSABLE_SELECTOR =\n 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])';\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 titleId = useId();\n const bodyRef = useRef<HTMLDivElement | null>(null);\n const previouslyFocusedElement = useRef<HTMLElement | null>(null);\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 // Move focus into the modal on open, restore it to the trigger on close\n useEffect(() => {\n previouslyFocusedElement.current = document.activeElement as HTMLElement;\n\n const body = bodyRef.current as HTMLDivElement;\n const [firstFocusable] = body.querySelectorAll<HTMLElement>(\n FOCUSABLE_SELECTOR\n );\n\n (firstFocusable ?? body).focus();\n\n return () => {\n previouslyFocusedElement.current?.focus();\n };\n }, []);\n\n // Trap Tab focus inside the modal\n useEffect(() => {\n const body = bodyRef.current as HTMLDivElement;\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key !== 'Tab') return;\n\n const focusable = body.querySelectorAll<HTMLElement>(\n FOCUSABLE_SELECTOR\n );\n\n const first = focusable[0];\n const last = focusable[focusable.length - 1];\n\n if (!first || !last) return;\n\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault();\n last.focus();\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault();\n first.focus();\n }\n };\n\n body.addEventListener('keydown', handleKeyDown);\n\n return () => {\n body.removeEventListener('keydown', handleKeyDown);\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 role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={title ? titleId : undefined}\n tabIndex={-1}\n {...props}\n ref={bodyRef}\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\n id={titleId}\n className={classes(['dropin-modal__header-title-content'])}\n >\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 ariaLabel?: 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 ariaLabel,\n busy = false,\n disabled = false,\n children,\n className,\n icon,\n onChange,\n selected = true,\n ...props\n}) => {\n const contentId = `dropin-toggle-button__content-${name}-${value}`.replace(/\\s+/g, '-');\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={ariaLabel}\n aria-labelledby={ariaLabel ? undefined : contentId}\n busy={busy}\n className={classes([className, 'dropin-toggle-button__radioButton'])}\n />\n\n <span className=\"dropin-toggle-button__content\" id={contentId}>\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 const 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"}
|