@dropins/tools 1.6.0-alpha7 → 1.6.0-alpha77
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/chunks/Image.js +1 -1
- package/chunks/cjs.js +1 -1
- package/chunks/get-path-value.js +1 -1
- package/chunks/get-price-formatter.js +1 -1
- package/chunks/icons/Add.js +1 -1
- package/chunks/icons/AddressBook.js +1 -1
- package/chunks/icons/Bulk.js +1 -1
- package/chunks/icons/Burger.js +1 -1
- package/chunks/icons/Business.js +4 -0
- package/chunks/icons/Business.js.map +1 -0
- package/chunks/icons/Card.js +1 -1
- package/chunks/icons/Cart.js +1 -1
- package/chunks/icons/Check.js +1 -1
- package/chunks/icons/CheckWithCircle.js +1 -1
- package/chunks/icons/ChevronDown.js +2 -2
- package/chunks/icons/ChevronDown.js.map +1 -1
- package/chunks/icons/ChevronRight.js +1 -1
- package/chunks/icons/ChevronUp.js +2 -2
- package/chunks/icons/ChevronUp.js.map +1 -1
- package/chunks/icons/Close.js +1 -1
- package/chunks/icons/Coupon.js +1 -1
- package/chunks/icons/Date.js +1 -1
- package/chunks/icons/Delivery.js +1 -1
- package/chunks/icons/Edit.js +2 -2
- package/chunks/icons/Edit.js.map +1 -1
- package/chunks/icons/EmptyBox.js +1 -1
- package/chunks/icons/Eye.js +2 -2
- package/chunks/icons/Eye.js.map +1 -1
- package/chunks/icons/EyeClose.js +2 -2
- package/chunks/icons/EyeClose.js.map +1 -1
- package/chunks/icons/Gift.js +2 -2
- package/chunks/icons/Gift.js.map +1 -1
- package/chunks/icons/GiftCard.js +2 -2
- package/chunks/icons/GiftCard.js.map +1 -1
- package/chunks/icons/Heart.js +2 -2
- package/chunks/icons/Heart.js.map +1 -1
- package/chunks/icons/HeartFilled.js +1 -1
- package/chunks/icons/InfoFilled.js +1 -1
- package/chunks/icons/List.js +4 -0
- package/chunks/icons/List.js.map +1 -0
- package/chunks/icons/Locker.js +2 -2
- package/chunks/icons/Locker.js.map +1 -1
- package/chunks/icons/Minus.js +2 -2
- package/chunks/icons/Minus.js.map +1 -1
- package/chunks/icons/Order.js +1 -1
- package/chunks/icons/OrderError.js +2 -2
- package/chunks/icons/OrderError.js.map +1 -1
- package/chunks/icons/OrderSuccess.js +2 -2
- package/chunks/icons/OrderSuccess.js.map +1 -1
- package/chunks/icons/PaymentError.js +2 -2
- package/chunks/icons/PaymentError.js.map +1 -1
- package/chunks/icons/Placeholder.js +2 -2
- package/chunks/icons/Placeholder.js.map +1 -1
- package/chunks/icons/PlaceholderFilled.js +1 -1
- package/chunks/icons/Purchase.js +4 -0
- package/chunks/icons/Purchase.js.map +1 -0
- package/chunks/icons/Quote.js +4 -0
- package/chunks/icons/Quote.js.map +1 -0
- package/chunks/icons/Search.js +1 -1
- package/chunks/icons/SearchFilled.js +1 -1
- package/chunks/icons/Sort.js +2 -2
- package/chunks/icons/Sort.js.map +1 -1
- package/chunks/icons/Star.js +1 -1
- package/chunks/icons/Structure.js +4 -0
- package/chunks/icons/Structure.js.map +1 -0
- package/chunks/icons/Team.js +4 -0
- package/chunks/icons/Team.js.map +1 -0
- package/chunks/icons/Trash.js +2 -2
- package/chunks/icons/Trash.js.map +1 -1
- package/chunks/icons/User.js +1 -1
- package/chunks/icons/View.js +1 -1
- package/chunks/icons/Wallet.js +1 -1
- package/chunks/icons/Warning.js +2 -2
- package/chunks/icons/Warning.js.map +1 -1
- package/chunks/icons/WarningFilled.js +1 -1
- package/chunks/icons/WarningWithCircle.js +1 -1
- package/chunks/image-params-keymap.js +1 -1
- package/chunks/initializer.js +2 -2
- package/chunks/locale-config.js +1 -1
- package/chunks/vcomponent.js +1 -1
- package/components.js +2 -2
- package/components.js.map +1 -1
- package/event-bus.js +1 -1
- package/fetch-graphql.js +1 -1
- package/i18n.js +1 -1
- package/initializer.js +2 -2
- package/lib/aem/assets.js +1 -1
- package/lib/aem/configs.js +2 -2
- package/lib/aem/configs.js.map +1 -1
- package/lib.js +1 -1
- package/package.json +1 -1
- package/preact-compat.js +1 -1
- package/preact-hooks.js +1 -1
- package/preact-jsx-runtime.js +1 -1
- package/preact.js +1 -1
- package/recaptcha.js +1 -1
- package/shims/importmap.js +1 -1
- package/signals.js +1 -1
- package/types/elsie/src/components/Pagination/Pagination.d.ts +2 -1
- package/types/elsie/src/components/Pagination/PaginationButton.d.ts +11 -0
- package/types/elsie/src/icons/index.d.ts +30 -24
package/components.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"kiCAwBA,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,CAC7D,EAEI,IAACE,GAAYD,IAAY,QAEzB,OAAAK,EAAC,OACC,UAAWC,EAAQ,CACjB,iDACAV,CACD,GACH,EAIJ,GAAIK,EAAU,CACN,MAAAM,EAAMN,EAAS,KAAK,EAExB,OAAAI,EAAC,OACE,GAAGF,EACJ,MAAOG,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvCD,CAAA,CACD,EAED,wBAAyB,CAAE,OAAQW,CAAI,EACzC,EAMJ,OAFoBT,EAAQJ,KAER,GAEhBW,EAAC,OACE,GAAGF,EACJ,MAAOG,EAAQ,CACb,sBACA,CAAC,4BAA6BT,CAAS,EACvC,gCACA,GAAGO,EACHR,CACD,GACH,EAKFS,EAAC,OACE,GAAGF,EACJ,MAAO,CAAE,0BAA2B,iBAAiBD,CAAY,GAAI,EACrE,MAAOI,EAAQ,CACb,iCACA,CAAC,4BAA6BT,CAAS,EACvCD,CAAA,CACD,EAEA,eAAM,KAAK,CAAE,OAAQE,E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,EAAe,KAAK,IAAI,CAAC,EAChDpU,EAAa,gBACnB,EAEC4U,GAAmB,EACnBI,GAAkB,EAClBrX,EACClE,EAAC,SACC,UAAU,sCACV,QAAS6a,GACT,GAAIC,GAEH,SAAA5W,CAAA,GAED,MACN,EACAlE,EAACoK,GAAA,CACC,UAAWnK,EAAQ,CACjB,+BACA,CAAC,qCAAsCmZ,CAAM,CAC9C,IACH,EACF,EAECA,GACCxV,EAAC,OACC,UAAU,gCACV,cAAY,wBAEX,UAAgB0U,EAAA,OAAS,GAAKmD,GAAuB,EAEtDzb,EAAC,OACC,IAAKyY,EACL,UAAU,+BACV,cAAY,uBACZ,MAAO,CAAE,UAAW,GAAGU,CAAS,IAAK,EACrC,SAAU,EACV,KAAK,SACL,aAAY5S,EAAa,sBAExB,SAAA+R,EAAgB,SAAW,EAC1B1U,EAAC,OACC,UAAU,kCACV,cAAY,0BACZ,KAAK,SACL,YAAU,SAET,UAAAsV,GAAiB3S,EAAa,cAAe,IAC7CoR,GAAc,IAAIA,CAAU,OAG/B+D,GAAkB,GAEtB,EACF,EAIF1b,EAAC,OACC,UAAU,kEACV,YAAU,YACV,cAAY,OAEX,SAAAkY,CAAA,EACH,EACF,CAEJ","names":["SINGLELINE","SkeletonRow","className","fullWidth","lines","size","variant","children","multilineGap","props","sharedClasses","jsx","classes","svg","_","index","Skeleton","rowGap","lazyIcons","lazy","__vitePreload","n","isValidUrl","source","absoluteUrl","UrlSvgLoader","url","svgContent","setSvgContent","useState","loading","setLoading","error","setError","useEffect","response","content","e","processedContent","Icon","Source","stroke","viewBox","defaultProps","isLikelyUrl","Suspense","LazyIcon","isRejectedUrl","Incrementer","name","value","disabled","success","min","max","onValue","onUpdateError","showButtons","currentValue","setCurrentValue","minValue","maxValue","isInvalid","errorMessage","propValue","debouncedOnValueHandler","useCallback","debounce","newValue","handleIncrementer","_value","jsxs","Localizer","Text","Minus","Add","Input","floatingLabel","icon","maxLength","id","handleOnValue","input","VComponent","WarningWithCircle","CheckWithCircle","InputDate","label","onChange","onBlur","internalValue","setInternalValue","iosInputRef","useRef","dictionary","useText","handleOnFocus","event","isIOSMobileDevice","handleOnClick","_a","handleOnBlur","handleInputChange","Field","Date","getIcon","PendingValidation","Check","ErrorValidation","PasswordStatusIndicator","minLength","requiredCharacterClasses","uniqueSymbolsStatus","validateLengthConfig","translations","getMessage","chart","InputPassword","placeholder","required","autoComplete","defaultValue","hideStatusIndicator","showPassword","setShowPassword","toggleShowPassword","prevShowPassword","title","Locker","Button","Eye","EyeClose","TextArea","textareaRef","useId","textArea","Divider","Price","amount","currency","locale","weight","sale","formatOptions","formattedAmount","useMemo","getPriceFormatter","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","Picker","options","handleSelect","uniqueId","isRequired","option","selectedValue","setSelectedValue","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","fieldContent","ActionButton","ActionButtonGroup","activeOption","dividers","activeOptionState","setActiveOptionState","handleClick","buttonGroupOptions","Children","child","isOptionDisabled","isOptionActive","cloneElement","Card","Checkbox","isChecked","setIsChecked","ref","handleCheckboxChange","handleOnKeyDown","ColorSwatch","groupAriaLabel","color","selected","outOfStock","multi","outOfStockLabel","selectedLabel","swatchLabel","onValueHandler","validColor","colorStyle","handleAriaLabel","TextSwatch","isOverflowing","setIsOverflowing","spanRef","ProgressSpinner","ariaLabel","style","commonClasses","ImageSwatch","src","alt","imageNode","imageProps","Image","AccordionSection","ariaLabelTitle","secondaryText","actionIconPosition","iconOpen","iconClose","iconLeft","showIconLeft","renderContentWhenClosed","defaultOpen","onStateChange","open","setOpen","onClickHandler","next","buttonLabel","openIcon","closeIcon","leftIcon","Accordion","divider","renderAccordionSection","Fragment","InLineAlert","type","additionalActions","onDismiss","heading","itemList","actionButtonPosition","_b","_c","Close","action","Portal","portalRoot","contentRef","useLayoutEffect","Modal","centered","backgroundDim","clickToDismiss","escapeToDismiss","onClose","showCloseButton","handleOnClose","handleOutsideClick","modal","modalBody","handleKeyDown","scrollingElement","defaultOverflowValue","CloseSVG","CartItem","image","price","taxIncluded","taxExcluded","total","totalExcludingTax","sku","configurations","warning","alert","discount","savings","actions","removeContent","quantity","quantityContent","footer","updating","quantityType","dropdownOptions","onQuantity","onRemove","useContext","UIContext","labels","CartItemSkeleton","quantityComponent","key","Trash","CartList","PriceRange","minimumAmount","maximumAmount","display","specialPrice","isSimpleProduct","Dashed","FromTo","SpecialPrice","Breadcrumbs","categories","separator","category","AlertBanner","message","IllustratedMessage","headingLevel","Heading","ToggleButton","level","HeadingTag","Header","cta","Tag","ContentGrid","maxColumns","columnWidth","emptyGridContent","hasChildren","additionalStyles","Pagination","totalPages","currentPage","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/Pagination.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCardSkeleton.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCard.tsx","/@dropins/tools/src/components/InputFile/InputFile.tsx","/@dropins/tools/src/components/Table/Table.tsx","/@dropins/tools/src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Skeleton/Skeleton.css';\n\nexport interface SkeletonRowProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n fullWidth?: boolean;\n lines?: number;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n variant?: 'heading' | 'row' | 'empty';\n multilineGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n children?: string;\n}\n\nconst SINGLELINE = 1;\n\nexport const SkeletonRow: FunctionComponent<SkeletonRowProps> = ({\n className,\n fullWidth = false,\n lines = SINGLELINE,\n size = 'small',\n variant = 'row',\n children = null,\n multilineGap = 'medium',\n ...props\n}) => {\n const sharedClasses = [\n [`dropin-skeleton-row__${variant}`, variant],\n [`dropin-skeleton-row__${variant}-${size}`, variant && size],\n ];\n\n if (!children && variant === 'empty') {\n return (\n <div\n className={classes([\n 'dropin-skeleton-row dropin-skeleton-row__empty',\n className,\n ])}\n />\n );\n }\n\n if (children) {\n const svg = children.trim();\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n }\n\n const isMultiline = lines > SINGLELINE;\n\n if (isMultiline === false) {\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n className,\n ])}\n />\n );\n }\n\n return (\n <div\n {...props}\n style={{ '--multiline-gap-spacing': `var(--spacing-${multilineGap})` }}\n class={classes([\n 'dropin-skeleton-row--multiline',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n >\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n ])}\n />\n ))}\n </div>\n );\n};\n\nexport interface SkeletonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n rowGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n}\n\nexport const Skeleton: FunctionComponent<SkeletonProps> = ({\n className,\n children,\n rowGap = 'medium',\n ...props\n}) => {\n return (\n <div\n style={{ '--row-gap-spacing': `var(--spacing-${rowGap})` }}\n {...props}\n className={classes(['dropin-skeleton', className])}\n role=\"status\"\n aria-label=\"Loading...\"\n >\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib/classes';\nimport { lazy, Suspense, SVGProps } from 'preact/compat';\nimport { useState, useEffect } from 'preact/hooks';\n\nimport '@adobe-commerce/elsie/components/Icon/Icon.css';\n\nexport type IconType = keyof typeof import('@adobe-commerce/elsie/icons');\n\nconst lazyIcons = {\n Add: lazy(() => import('@adobe-commerce/elsie/icons/Add.svg')),\n Bulk: lazy(() => import('@adobe-commerce/elsie/icons/Bulk.svg')),\n Burger: lazy(() => import('@adobe-commerce/elsie/icons/Burger.svg')),\n Cart: lazy(() => import('@adobe-commerce/elsie/icons/Cart.svg')),\n Check: lazy(() => import('@adobe-commerce/elsie/icons/Check.svg')),\n ChevronDown: lazy(() => import('@adobe-commerce/elsie/icons/ChevronDown.svg')),\n ChevronUp: lazy(() => import('@adobe-commerce/elsie/icons/ChevronUp.svg')),\n ChevronRight: lazy(() => import('@adobe-commerce/elsie/icons/ChevronRight.svg')),\n Close: lazy(() => import('@adobe-commerce/elsie/icons/Close.svg')),\n Heart: lazy(() => import('@adobe-commerce/elsie/icons/Heart.svg')),\n Minus: lazy(() => import('@adobe-commerce/elsie/icons/Minus.svg')),\n Placeholder: lazy(() => import('@adobe-commerce/elsie/icons/Placeholder.svg')),\n PlaceholderFilled: lazy(\n () => import('@adobe-commerce/elsie/icons/PlaceholderFilled.svg')\n ),\n Search: lazy(() => import('@adobe-commerce/elsie/icons/Search.svg')),\n SearchFilled: lazy(() => import('@adobe-commerce/elsie/icons/SearchFilled.svg')),\n Sort: lazy(() => import('@adobe-commerce/elsie/icons/Sort.svg')),\n Star: lazy(() => import('@adobe-commerce/elsie/icons/Star.svg')),\n View: lazy(() => import('@adobe-commerce/elsie/icons/View.svg')),\n User: lazy(() => import('@adobe-commerce/elsie/icons/User.svg')),\n Warning: lazy(() => import('@adobe-commerce/elsie/icons/Warning.svg')),\n Locker: lazy(() => import('@adobe-commerce/elsie/icons/Locker.svg')),\n Wallet: lazy(() => import('@adobe-commerce/elsie/icons/Wallet.svg')),\n Card: lazy(() => import('@adobe-commerce/elsie/icons/Card.svg')),\n Order: lazy(() => import('@adobe-commerce/elsie/icons/Order.svg')),\n Delivery: lazy(() => import('@adobe-commerce/elsie/icons/Delivery.svg')),\n OrderError: lazy(() => import('@adobe-commerce/elsie/icons/OrderError.svg')),\n OrderSuccess: lazy(() => import('@adobe-commerce/elsie/icons/OrderSuccess.svg')),\n PaymentError: lazy(() => import('@adobe-commerce/elsie/icons/PaymentError.svg')),\n CheckWithCircle: lazy(() => import('@adobe-commerce/elsie/icons/CheckWithCircle.svg')),\n WarningWithCircle: lazy(\n () => import('@adobe-commerce/elsie/icons/WarningWithCircle.svg')\n ),\n WarningFilled: lazy(() => import('@adobe-commerce/elsie/icons/WarningFilled.svg')),\n InfoFilled: lazy(() => import('@adobe-commerce/elsie/icons/InfoFilled.svg')),\n HeartFilled: lazy(() => import('@adobe-commerce/elsie/icons/HeartFilled.svg')),\n Trash: lazy(() => import('@adobe-commerce/elsie/icons/Trash.svg')),\n Eye: lazy(() => import('@adobe-commerce/elsie/icons/Eye.svg')),\n EyeClose: lazy(() => import('@adobe-commerce/elsie/icons/EyeClose.svg')),\n Date: lazy(() => import('@adobe-commerce/elsie/icons/Date.svg')),\n AddressBook: lazy(() => import('@adobe-commerce/elsie/icons/AddressBook.svg')),\n EmptyBox: lazy(() => import('@adobe-commerce/elsie/icons/EmptyBox.svg')),\n Coupon: lazy(() => import('@adobe-commerce/elsie/icons/Coupon.svg')),\n Gift: lazy(() => import('@adobe-commerce/elsie/icons/Gift.svg')),\n GiftCard: lazy(() => import('@adobe-commerce/elsie/icons/GiftCard.svg')),\n Edit: lazy(() => import('@adobe-commerce/elsie/icons/Edit.svg')),\n};\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'size'> {\n source?:\n | FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>\n | IconType\n | string;\n size?: '12' | '16' | '24' | '32' | '64' | '80';\n stroke?: '1' | '2' | '3' | '4';\n className?: string;\n title?: string;\n}\n\nexport type IconNode = FunctionComponent<\n SVGProps<SVGSVGElement> & { title?: string }\n>;\n\nfunction isValidUrl(source: string): boolean { // check for URL from same domain\n try {\n if (source.startsWith('//')) {\n const absoluteUrl = `${window.location.protocol}${source}`;\n const url = new URL(absoluteUrl);\n if (url.hostname !== window.location.hostname) {\n console.error(\n `[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`\n );\n return false;\n }\n return true;\n }\n const url = new URL(source);\n \n if (url.hostname !== window.location.hostname) {\n console.error(`[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`);\n return false;\n }\n \n return true;\n } catch {\n console.error(`[Icon] Invalid URL format: ${source}`);\n return false;\n }\n}\n\nfunction UrlSvgLoader({\n url,\n ...props\n}: SVGProps<SVGSVGElement> & { url: string }) {\n const [svgContent, setSvgContent] = useState<string>('');\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n\n useEffect(() => {\n fetch(url)\n .then(response => {\n if (!response.ok) {\n console.error(`[Icon] Failed to fetch SVG: ${response.status} ${response.statusText}`);\n throw error;\n }\n return response.text();\n })\n .then(content => {\n // Check if content is valid SVG\n try {\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, \"image/svg+xml\");\n const svg = doc.querySelector('svg');\n if (!svg) {\n throw new Error(\"No <svg> element found\");\n }\n // Success!\n } catch(e: unknown) {\n if (e instanceof Error ) {\n console.error(`[Icon] Invalid SVG content from ${url}: ${e.message}`);\n } else {\n console.error(`[Icon] Invalid SVG content from ${url}: ${String(e)}`);\n }\n setError(true);\n setLoading(false);\n }\n \n\n // Process SVG content to ensure proper sizing and accessibility\n let processedContent = content;\n\n if (props.width) {\n processedContent = processedContent.replace(\n /<svg([^>]*)\\s+width\\s*=\\s*[\"'][^\"']*[\"']/gi,\n '<svg$1'\n );\n processedContent = processedContent.replace(\n /<svg/i,\n `<svg width=\"${props.width}\"`\n );\n }\n\n if (props.height) {\n processedContent = processedContent.replace(\n /<svg([^>]*)\\s+height\\s*=\\s*[\"'][^\"']*[\"']/gi,\n '<svg$1'\n );\n processedContent = processedContent.replace(\n /<svg/i,\n `<svg height=\"${props.height}\"`\n );\n }\n \n if (props.title) {\n processedContent = processedContent.replace(/<title[^>]*>.*?<\\/title>/gi, '');\n processedContent = processedContent.replace(\n /<svg([^>]*)>/i,\n `<svg$1><title>${props.title}</title>`\n );\n }\n \n setSvgContent(processedContent);\n setLoading(false);\n })\n .catch((error) => {\n if (error instanceof Error) {\n console.error(`[Icon] ${error.message}`);\n } else {\n console.error(`[Icon] ${String(error)}`);\n }\n setError(true);\n setLoading(false);\n });\n }, [url, props.width, props.height, props.title]);\n\n if (loading || error) {\n return <svg {...props} />;\n }\n\n return (\n <span\n className={props.className}\n style={{\n width: String(props.width),\n height: String(props.height),\n display: 'inline-flex',\n lineHeight: 0,\n }}\n dangerouslySetInnerHTML={{ __html: svgContent }}\n />\n );\n}\n\nexport function Icon({\n source: Source,\n size = '24',\n stroke = '2',\n viewBox = '0 0 24 24',\n className,\n ...props\n}: IconProps) {\n\n const defaultProps = {\n className: classes([\n 'dropin-icon',\n `dropin-icon--shape-stroke-${stroke}`,\n className,\n ]),\n width: size,\n height: size,\n viewBox,\n };\n\n // Only validate strings that look like URLs (start with http, //, or /)\n const isLikelyUrl =\n typeof Source === 'string' &&\n (Source.startsWith('http') ||\n Source.startsWith('//') ||\n Source.startsWith('/'));\n\n if (isLikelyUrl && isValidUrl(Source)) {\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n <UrlSvgLoader url={Source} {...props} {...defaultProps}/>\n </Suspense>\n );\n }\n\n const LazyIcon = typeof Source === 'string' && Source in lazyIcons\n ? lazyIcons[Source as IconType]\n : null;\n\n const isRejectedUrl = isLikelyUrl && !isValidUrl(Source);\n\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n {LazyIcon ? (\n <LazyIcon {...props} {...defaultProps} />\n ) : isRejectedUrl ? (\n <svg {...props} {...defaultProps} />\n ) : (\n // @ts-ignore\n <Source {...props} {...defaultProps} />\n )}\n </Suspense>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { Localizer, Text } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Incrementer/Incrementer.css';\n\nexport interface IncrementerProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size'> {\n name?: string;\n size?: 'medium' | 'large';\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n error?: boolean;\n success?: boolean;\n min?: number;\n max?: number;\n disabled?: boolean;\n maxLength?: number;\n showButtons?: boolean;\n}\n\nexport const Incrementer: FunctionComponent<IncrementerProps> = ({\n name,\n value = '1',\n className,\n disabled,\n error,\n success,\n min,\n max,\n onValue,\n onUpdateError,\n size = 'medium',\n showButtons = true,\n ...props\n}) => {\n const [currentValue, setCurrentValue] = useState<number>(Number(value));\n const minValue = Number(min);\n const maxValue = Number(max);\n const isInvalid = error || currentValue < minValue || currentValue > maxValue;\n\n const errorMessage =\n currentValue < minValue\n ? 'Dropin.Incrementer.minQuantityMessage'\n : currentValue > maxValue\n ? 'Dropin.Incrementer.maxQuantityMessage'\n : 'Dropin.Incrementer.errorMessage';\n\n // Add this effect to synchronize internal state with external value prop\n useEffect(() => {\n const propValue = Number(value);\n if (propValue !== currentValue) {\n setCurrentValue(propValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleIncrementer = (_value: number) => {\n let newValue = _value;\n debouncedOnValueHandler(newValue);\n setCurrentValue(newValue);\n };\n\n return (\n <div\n className={classes([\n 'dropin-incrementer',\n `dropin-incrementer--${size}`,\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-incrementer__content',\n `dropin-incrementer__content--${size}`,\n ['dropin-incrementer__content--no-buttons', !showButtons],\n [`dropin-incrementer__content--error`, isInvalid],\n [`dropin-incrementer__content--success`, success],\n [`dropin-incrementer__content--disabled`, disabled],\n ])}\n >\n {/* Minus Button */}\n {showButtons && (\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__decrease-button',\n [`dropin-incrementer__decrease-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue - 1)}\n disabled={disabled || currentValue < minValue + 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.decreaseLabel\" />) as any\n }\n >\n <Icon\n source={Minus}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__down\"\n />\n </button>\n </Localizer>\n </div>\n )}\n\n {/* Input Field */}\n <input\n className=\"dropin-incrementer__input\"\n max={max}\n min={min}\n step={1}\n type=\"number\"\n name={name}\n value={currentValue}\n disabled={disabled}\n onBlur={() => {\n handleIncrementer(Number(currentValue));\n }}\n onChange={(e) => {\n const newValue = e.currentTarget.value;\n if (newValue !== '') {\n handleIncrementer(Number(newValue));\n }\n }}\n {...props}\n />\n\n {showButtons && (\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n {/* Plus/Add button */}\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__increase-button',\n [`dropin-incrementer__increase-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue + 1)}\n disabled={disabled || currentValue > maxValue - 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.increaseLabel\" />) as any\n }\n >\n <Icon\n source={Add}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__add\"\n />\n </button>\n </Localizer>\n </div>\n )}\n </div>\n {isInvalid && (\n <p className=\"dropin-incrementer__content--error-message\">\n <Text\n id={errorMessage}\n fields={{ minQuantity: min, maxQuantity: max }}\n />\n </p>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Input/Input.css';\nimport { CheckWithCircle, WarningWithCircle } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useCallback } from 'preact/hooks';\n\nexport interface InputProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'icon'> {\n id?: string;\n name?: string;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n error?: boolean;\n floatingLabel?: string;\n onUpdateError?: (error: Error) => void;\n onValue?: (value: any) => void;\n size?: 'medium' | 'large';\n success?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n maxLength?: number;\n}\n\nexport const Input: FunctionComponent<InputProps> = ({\n name,\n value,\n variant = 'primary',\n className,\n disabled,\n error,\n floatingLabel,\n onValue,\n onUpdateError,\n size = 'medium',\n icon,\n maxLength,\n success,\n ...props\n}) => {\n const id = props?.id || name || `dropin-input-${Math.random().toString(36)}`;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n debouncedOnValueHandler(input.value.trim());\n };\n\n return (\n <div\n className={classes([\n 'dropin-input-container',\n `dropin-input-container--${variant}`,\n [`dropin-input-container--floating`, !!floatingLabel],\n ['dropin-input-container--disabled', disabled],\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes([\n 'dropin-input__field-icon--left',\n icon.props.className,\n ])}\n />\n )}\n <div className=\"dropin-input-label-container\">\n {/* Input */}\n <input\n id={id}\n onChange={handleOnValue}\n type=\"text\"\n maxLength={maxLength}\n name={name}\n value={value}\n {...props}\n className={classes([\n 'dropin-input',\n `dropin-input--${size}`,\n `dropin-input--${variant}`,\n [`dropin-input--error`, !!error],\n [`dropin-input--success`, !!success],\n ['dropin-input--disabled', disabled],\n [`dropin-input--floating`, !!floatingLabel],\n [`dropin-input--icon-left`, !!icon],\n className,\n ])}\n disabled={disabled}\n />\n\n {/* Floating Label */}\n {floatingLabel && (\n <label\n htmlFor={id}\n className={classes([\n [`dropin-input__label--floating`, !!floatingLabel],\n [`dropin-input__label--floating--icon-left`, !!icon],\n [`dropin-input__label--floating--error`, !!error],\n ])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n\n {error && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--error',\n ])}\n >\n <Icon\n source={WarningWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--warning-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n\n {success && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--success',\n ])}\n >\n <Icon\n source={CheckWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--success-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { classes, isIOSMobileDevice } from '@adobe-commerce/elsie/lib';\nimport { JSX } from 'preact/compat';\nimport { Field, Icon, Input, InputProps } from '@adobe-commerce/elsie/components';\nimport { Date } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/InputDate/InputDate.css';\nimport { useCallback } from 'react';\n\nexport interface InputDateProps extends Omit<InputProps, 'error' | 'value'> {\n label?: string;\n name?: string;\n error?: string;\n value?: Date;\n}\n\nexport const InputDate: FunctionComponent<InputDateProps> = ({\n name = '',\n error,\n value,\n label,\n onChange,\n onBlur,\n ...props\n}) => {\n const [internalValue, setInternalValue] = useState(value?.toString() ?? '');\n const iosInputRef = useRef<HTMLInputElement>(null);\n const dictionary = useText({\n picker: 'Dropin.InputDate.picker',\n });\n\n const handleOnFocus: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'date');\n\n if (!isIOSMobileDevice()) return;\n\n iosInputRef.current.focus();\n },\n []\n );\n\n const handleOnClick: JSX.MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const input = event.currentTarget.parentElement?.querySelector('input');\n input?.focus();\n input?.showPicker();\n },\n []\n );\n\n const handleOnBlur: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'text');\n onBlur?.(event);\n },\n [onBlur]\n );\n\n const handleInputChange: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(\n (event) => {\n setInternalValue(event.target.value);\n onChange?.(event);\n },\n [onChange]\n );\n\n return (\n <div className={classes(['dropin-input-date'])}>\n {/* This simple input is needed only for iOS devices to trigger the date picker. */}\n {isIOSMobileDevice() ? (\n <input\n ref={iosInputRef}\n data-testid=\"inputDateIos\"\n className=\"dropin-input-date__input--ios\"\n type=\"date\"\n onChange={handleInputChange}\n />\n ) : null}\n <Field error={error}>\n <Input\n data-testid=\"input-date\"\n error={!!error}\n name={name}\n value={internalValue}\n placeholder={label}\n floatingLabel={label}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n onChange={handleInputChange}\n aria-labelledby={label}\n className=\"dropin-input-date__input\"\n {...props}\n />\n </Field>\n\n <button\n type=\"button\"\n data-testid=\"dropin-input-date__icon\"\n className=\"dropin-input-date__icon\"\n aria-label={dictionary.picker}\n onClick={handleOnClick}\n >\n <Icon source={Date} size=\"24\" />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n Check,\n Close as ErrorValidation,\n Minus as PendingValidation,\n} from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.css';\n\ntype statusTypes = '' | 'success' | 'error' | 'pending';\n\nexport interface ValidateLengthConfigProps {\n status?: statusTypes;\n icon?: statusTypes;\n message?: string;\n}\n\nexport interface PasswordStatusIndicatorProps {\n validateLengthConfig?: ValidateLengthConfigProps;\n uniqueSymbolsStatus?: statusTypes;\n minLength?: number;\n requiredCharacterClasses?: number;\n}\n\nconst getIcon: { [key: string]: JSX.Element } = {\n pending: <PendingValidation />,\n success: <Check />,\n error: <ErrorValidation style={{ fill: 'red' }} />,\n};\n\nexport const PasswordStatusIndicator: FunctionComponent<\n PasswordStatusIndicatorProps & HTMLAttributes<HTMLDivElement>\n> = ({\n minLength = 0,\n requiredCharacterClasses = 0,\n uniqueSymbolsStatus = 'pending',\n validateLengthConfig = { status: '', icon: '', message: '' },\n}) => {\n const translations = useText({\n chartTwoSymbols: 'Dropin.PasswordStatusIndicator.chartTwoSymbols',\n chartThreeSymbols: 'Dropin.PasswordStatusIndicator.chartThreeSymbols',\n chartFourSymbols: 'Dropin.PasswordStatusIndicator.chartFourSymbols',\n });\n\n const getMessage = (chart: number) => {\n switch (chart) {\n case 2:\n return translations.chartTwoSymbols;\n case 3:\n return translations.chartThreeSymbols;\n case 4:\n return translations.chartFourSymbols;\n default:\n return '';\n }\n };\n\n return (\n <div className={classes(['dropin-password-status-indicator'])}>\n {minLength > 0 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${validateLengthConfig.status}`}\n data-testid={`dropin-password-status-indicator__item--${validateLengthConfig.icon}`}\n >\n {getIcon[validateLengthConfig.icon as string]}\n <span className={`${validateLengthConfig.status}`}>\n {validateLengthConfig.message}\n </span>\n </div>\n ) : null}\n {requiredCharacterClasses >= 2 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n data-testid={`dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n >\n {getIcon[uniqueSymbolsStatus]}\n <span className={`pending`}>\n {getMessage(requiredCharacterClasses)}\n </span>\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Locker, EyeClose, Eye } from '@adobe-commerce/elsie/icons';\nimport { Button, Field, Input, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n PasswordStatusIndicator,\n PasswordStatusIndicatorProps,\n} from './PasswordStatusIndicator';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InputPassword/InputPassword.css';\n\nexport interface InputPasswordProps\n extends PasswordStatusIndicatorProps,\n Omit<HTMLAttributes<HTMLDivElement>, 'minLength'> {\n placeholder?: string;\n floatingLabel?: string;\n defaultValue?: string;\n className?: string;\n name?: string;\n autoComplete?: string;\n errorMessage?: string | undefined;\n required?: boolean;\n hideStatusIndicator?: boolean;\n onValue?: (value: any) => void;\n onBlur?: (event: Event) => void;\n}\n\nexport const InputPassword: FunctionComponent<InputPasswordProps> = ({\n placeholder,\n floatingLabel,\n children,\n name,\n required,\n className,\n minLength,\n autoComplete,\n defaultValue = '',\n hideStatusIndicator = false,\n uniqueSymbolsStatus,\n validateLengthConfig,\n requiredCharacterClasses,\n errorMessage,\n onValue,\n onBlur,\n ...props\n}) => {\n const translations = useText({\n placeholder: 'Dropin.InputPassword.placeholder',\n floatingLabel: 'Dropin.InputPassword.floatingLabel',\n buttonShowTitle: 'Dropin.InputPassword.buttonShowTitle',\n buttonHideTitle: 'Dropin.InputPassword.buttonHideTitle',\n });\n\n const [showPassword, setShowPassword] = useState(false);\n\n const toggleShowPassword = useCallback(() => {\n setShowPassword((prevShowPassword) => !prevShowPassword);\n }, []);\n\n const title = !showPassword\n ? translations.buttonShowTitle\n : translations.buttonHideTitle;\n\n return (\n <div\n data-testid=\"passwordFieldInput\"\n className={classes([\n 'dropin-input-password',\n ['dropin-input-password--error', errorMessage],\n className,\n ])}\n {...props}\n >\n <Field error={errorMessage}>\n <Input\n autoComplete={autoComplete}\n name={name ?? 'password'}\n type={!showPassword ? 'password' : 'text'}\n placeholder={placeholder || translations.placeholder}\n floatingLabel={floatingLabel || translations.floatingLabel}\n aria-label={translations.placeholder}\n aria-required={required || true}\n aria-invalid={!!errorMessage}\n aria-describedby=\"password-feedback\"\n required={required || false}\n value={defaultValue}\n onValue={onValue}\n icon={<Locker />}\n onBlur={onBlur}\n data-testid=\"passwordInput\"\n />\n </Field>\n <Button\n aria-label={title}\n title={title}\n type={'button'}\n data-testid=\"toggle-password-icon\"\n variant=\"tertiary\"\n className={classes([\n 'dropin-input-password__eye-icon',\n `dropin-input-password__eye-icon--${showPassword ? 'show' : 'hide'}`,\n className,\n ])}\n onClick={toggleShowPassword}\n >\n <Icon\n focusable={false}\n aria-hidden={showPassword}\n source={!showPassword ? EyeClose : Eye}\n />\n </Button>\n {hideStatusIndicator ? null : (\n <PasswordStatusIndicator\n minLength={minLength}\n requiredCharacterClasses={requiredCharacterClasses}\n validateLengthConfig={validateLengthConfig}\n uniqueSymbolsStatus={uniqueSymbolsStatus}\n />\n )}\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/TextArea/TextArea.css';\nimport { useRef, useEffect, useId } from 'preact/hooks';\n\nexport interface TextAreaProps extends HTMLAttributes<HTMLTextAreaElement> {\n id?: string;\n name?: string;\n disabled?: boolean;\n errorMessage?: string;\n}\n\nexport const TextArea: FunctionComponent<TextAreaProps> = ({\n disabled,\n name = '',\n errorMessage,\n value,\n label,\n className,\n onChange,\n onBlur,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const id = useId();\n const error = !!errorMessage?.length;\n\n useEffect(() => {\n const textArea = textareaRef.current;\n if (!textArea) return;\n\n textArea.style.height = 'auto';\n textArea.style.height = `${textArea.scrollHeight}px`;\n }, [value]);\n\n return (\n <div\n className={classes(['dropin-textarea-container', className])}\n data-testid=\"dropin-textarea-container\"\n >\n <textarea\n ref={textareaRef}\n data-testid=\"dropin-textarea-field\"\n className={classes([\n 'dropin-textarea',\n [`dropin-textarea--error`, error],\n ['dropin-textarea--disabled', !!disabled],\n ])}\n id={id}\n placeholder={label}\n name={name}\n value={value}\n disabled={disabled}\n onBlur={onBlur}\n onChange={onChange}\n {...props}\n />\n <label\n htmlFor={id}\n className={classes([\n `dropin-textarea__label--floating`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {label}\n </label>\n {error ? (\n <div\n className={classes([\n `dropin-textarea__label--floating--text`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {errorMessage}\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Divider/Divider.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLHRElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Divider: FunctionComponent<DividerProps> = ({\n variant = 'primary',\n className,\n}) => {\n return (\n <hr\n role=\"separator\"\n className={classes([\n 'dropin-divider',\n `dropin-divider--${variant}`,\n className,\n ])}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes, getPriceFormatter } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Price/Price.css';\n\nexport interface PriceProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'size'> {\n amount?: number;\n currency?: string | null;\n locale?: string;\n formatOptions?: {\n [key: string]: any;\n };\n variant?: 'default' | 'strikethrough';\n weight?: 'bold' | 'normal';\n sale?: boolean;\n size?: 'small' | 'medium' | 'large';\n}\n\nexport const Price: FunctionComponent<PriceProps> = ({\n amount = 0,\n currency,\n locale,\n variant = 'default',\n weight = 'bold',\n className,\n children,\n sale = false,\n formatOptions = {},\n size = 'small',\n ...props\n}) => {\n const formattedAmount = useMemo(() => {\n const formatter = getPriceFormatter({ currency, locale, formatOptions });\n return formatter.format(amount);\n }, [amount, currency, locale, formatOptions]);\n\n return (\n <span\n {...props}\n className={classes([\n 'dropin-price',\n `dropin-price--${variant}`,\n `dropin-price--${size}`,\n `dropin-price--${weight}`,\n ['dropin-price--sale', sale],\n className,\n ])}\n >\n {formattedAmount}\n </span>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/RadioButton/RadioButton.css';\n\nexport interface RadioButtonProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n size?: 'medium' | 'large';\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n description?: string;\n busy?: boolean;\n}\n\nexport const RadioButton: FunctionComponent<RadioButtonProps> = ({\n name,\n label,\n value,\n size = 'medium',\n checked = false,\n disabled = false,\n error = false,\n description = '',\n busy = false,\n className,\n children,\n ...props\n}) => {\n return (\n <label\n className={classes([\n className,\n 'dropin-radio-button',\n ['dropin-radio-button--error', error],\n ['dropin-radio-button--disabled', disabled],\n ])}\n >\n <input\n name={name}\n value={value}\n checked={checked}\n disabled={disabled}\n type=\"radio\"\n className={classes([\n 'dropin-radio-button__input',\n ['dropin-radio-button__input--error', error],\n ['dropin-radio-button__input--disabled', disabled],\n ])}\n aria-busy={busy}\n {...props}\n />\n <span\n className={classes([\n 'dropin-radio-button__label',\n `dropin-radio-button__label--${size}`,\n ['dropin-radio-button__label--error', error],\n ['dropin-radio-button__label--disabled', disabled],\n ])}\n >\n {label}\n </span>\n <span\n className={classes([\n 'dropin-radio-button__description',\n `dropin-radio-button__description--${size}`,\n ['dropin-radio-button__description--disabled', disabled],\n ])}\n >\n {description}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Button/Button.css';\n\nexport interface ButtonProps\n extends Omit<\n HTMLAttributes<HTMLButtonElement | HTMLAnchorElement>,\n 'size' | 'icon'\n > {\n variant?: 'primary' | 'secondary' | 'tertiary';\n size?: 'medium' | 'large';\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n active?: boolean;\n activeChildren?: ComponentChildren;\n activeIcon?: VNode<HTMLAttributes<SVGSVGElement>>;\n href?: string;\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport const Button: FunctionComponent<ButtonProps> = ({\n value,\n variant = 'primary',\n size = 'medium',\n icon,\n className,\n children,\n disabled = false,\n active = false,\n activeChildren,\n activeIcon,\n href,\n ...props\n}) => {\n let buttonType = 'dropin-button';\n\n if (\n (icon && !children) ||\n (icon && active && !activeChildren) ||\n (!icon && active && activeIcon)\n ) {\n buttonType = 'dropin-iconButton';\n }\n\n if (active && activeChildren) {\n buttonType = 'dropin-button';\n }\n\n className = classes([\n buttonType,\n `${buttonType}--${size}`,\n `${buttonType}--${variant}`,\n [`${buttonType}--${variant}--disabled`, disabled],\n children && icon && `${buttonType}--with-icon`,\n !children && activeChildren && icon && `${buttonType}--with-icon`,\n active && activeIcon && `${buttonType}--with-icon`,\n className,\n ]);\n\n const iconClassName = classes([\n 'dropin-button-icon',\n `dropin-button-icon--${variant}`,\n [`dropin-button-icon--${variant}--disabled`, disabled],\n icon?.props.className,\n ]);\n\n const attributes = href\n ? {\n node: <a />,\n role: 'link',\n href,\n ...props,\n disabled,\n active,\n onKeyDown: (event: KeyboardEvent) => {\n if (disabled) {\n event.preventDefault();\n }\n },\n tabIndex: disabled ? -1 : 0,\n }\n : {\n node: <button />,\n role: 'button',\n ...props,\n value,\n disabled,\n active,\n };\n\n return (\n <VComponent {...attributes} className={className}>\n {icon && !active && <VComponent node={icon} className={iconClassName} />}\n\n {activeIcon && active && (\n <VComponent node={activeIcon} className={iconClassName} />\n )}\n\n {children &&\n !active &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n\n {active &&\n activeChildren &&\n (typeof activeChildren === 'string' ? (\n <span>{activeChildren}</span>\n ) : (\n activeChildren\n ))}\n </VComponent>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/Picker/Picker.css';\n\ntype PickerValue = string | null;\n\nexport interface PickerOption {\n value: PickerValue;\n text?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n}\n\nexport interface PickerProps\n extends Omit<HTMLAttributes<HTMLSelectElement>, 'value' | 'size' | 'icon'> {\n id?: string;\n name?: string;\n value?: PickerValue;\n placeholder?: string;\n variant?: 'primary' | 'secondary';\n size?: 'medium' | 'large';\n floatingLabel?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n options?: PickerOption[];\n defaultOption?: PickerOption;\n disabled?: boolean;\n error?: boolean;\n handleSelect?: (event: Event) => void;\n}\n\nfunction findSelectedValue(\n value?: PickerValue,\n defaultOption?: PickerOption,\n placeholder?: string,\n floatingLabel?: string,\n firstAvailableOption?: PickerOption\n) {\n if (value) return value;\n if (defaultOption) return defaultOption.value;\n if (placeholder || floatingLabel) return '';\n if (firstAvailableOption) return firstAvailableOption.value;\n return null;\n}\n\nexport const Picker: FunctionComponent<PickerProps> = ({\n name,\n value = null,\n options,\n variant = 'primary',\n floatingLabel,\n size = 'medium',\n handleSelect = () => {},\n disabled = false,\n error = false,\n placeholder,\n defaultOption,\n icon,\n className,\n id,\n ...props\n}) => {\n const uniqueId = id ?? name ?? `dropin-picker-${Math.random().toString(36)}`;\n const isRequired = !!props?.required;\n\n // find the first option that is not disabled\n const firstAvailableOption = options?.find((option) => !option.disabled);\n\n const [selectedValue, setSelectedValue] = useState<PickerValue>(() => {\n return findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n );\n });\n\n useEffect(() => {\n setSelectedValue(\n findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n )\n );\n }, [value, defaultOption, placeholder, floatingLabel, firstAvailableOption]);\n\n const handleOptionClick = (event: Event) => {\n const { options, value } = event.target as HTMLSelectElement;\n\n for (const element of options) {\n if (element.selected) {\n setSelectedValue(value);\n handleSelect(event);\n }\n }\n };\n\n const optionsListItems = options?.map((option) => {\n const { value, text, disabled } = option;\n const selected = value === selectedValue;\n\n return (\n <option\n value={value as string}\n key={value}\n selected={selected}\n disabled={disabled}\n className={classes(['dropin-picker__option'])}\n >\n {text}\n </option>\n );\n });\n\n const isSelected = !!selectedValue;\n\n const hasToDisplayPlaceholder = () => {\n return (!isRequired || !isSelected) && (floatingLabel || placeholder);\n };\n\n return (\n <div\n className={classes([\n className,\n 'dropin-picker',\n `dropin-picker__${size}`,\n ['dropin-picker__floating', !!floatingLabel],\n ['dropin-picker__selected', isSelected],\n ['dropin-picker__error', error],\n ['dropin-picker__disabled', disabled],\n ['dropin-picker__icon', icon],\n ])}\n >\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon.props}\n className={'dropin-picker__icon--placeholder'}\n />\n )}\n\n <select\n id={uniqueId}\n className={classes([\n 'dropin-picker__select',\n `dropin-picker__select--${variant}`,\n `dropin-picker__select--${size}`,\n ['dropin-picker__select--floating', !!floatingLabel],\n ])}\n name={name}\n aria-label={name}\n disabled={disabled}\n onChange={handleOptionClick}\n {...props}\n >\n {hasToDisplayPlaceholder() && (\n <option\n selected={!isSelected}\n value={''}\n key={value}\n className={classes([\n 'dropin-picker__option dropin-picker__placeholder',\n ])}\n >\n {floatingLabel ?? placeholder}\n </option>\n )}\n\n {optionsListItems}\n </select>\n\n <Icon\n source={ChevronDown}\n size=\"24\"\n stroke=\"2\"\n className=\"dropin-picker__chevronDown\"\n />\n\n {floatingLabel && isSelected && (\n <label\n htmlFor={id}\n className={classes(['dropin-picker__floatingLabel', !!floatingLabel])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport '@adobe-commerce/elsie/components/Field/Field.css';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nexport interface FieldProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n label?: string;\n error?: string;\n hint?: string;\n success?: string;\n disabled?: boolean;\n children?: VNode;\n size?: 'medium' | 'large';\n}\n\nexport const Field: FunctionComponent<FieldProps> = ({\n className,\n label,\n error,\n hint,\n success,\n size = 'medium',\n disabled = false,\n children,\n ...props\n}) => {\n const id =\n children?.props?.id ?? `dropin-field-${Math.random().toString(36)}`;\n\n let fieldContent: VNode | string | null = null;\n\n if (children && typeof children !== 'string') {\n fieldContent = (\n <VComponent\n node={children}\n id={id}\n key={children.key}\n disabled={disabled}\n size={size}\n error={!!error}\n success={!!success && !error}\n />\n );\n }\n\n\n return (\n <div {...props} className={classes(['dropin-field', className])}>\n {label && (\n <label\n className={classes([\n 'dropin-field__label',\n ['dropin-field__label--disabled', disabled],\n `dropin-field__label--${size}`,\n ])}\n htmlFor={id}\n >\n {label}\n </label>\n )}\n\n <div className={classes(['dropin-field__content'])}>\n {fieldContent}\n </div>\n\n <div\n className={classes([\n 'dropin-field__hint',\n [`dropin-field__hint--${size}`, size],\n ['dropin-field__hint--error', !!error],\n ['dropin-field__hint--success', !!success && !error],\n ['dropin-field__hint--disabled', !!disabled],\n ])}\n >\n {error || success || hint}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButton/ActionButton.css';\n\nexport interface ActionButtonProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, 'icon'> {\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n active?: boolean;\n disabled?: boolean;\n}\n\nexport const ActionButton: FunctionComponent<ActionButtonProps> = ({\n icon,\n className,\n children,\n active = false,\n disabled = false,\n ...props\n}) => {\n return (\n <button\n role=\"button\"\n disabled={disabled}\n {...props}\n className={classes([\n 'dropin-action-button',\n ['dropin-action-button--active', active],\n ['dropin-action-button--disabled', disabled],\n className,\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes(['dropin-action-button-icon'])}\n />\n )}\n {children &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n </button>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode, cloneElement } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButtonGroup/ActionButtonGroup.css';\nimport { useCallback, useState } from 'preact/hooks';\nimport { Children } from 'react';\nimport { ActionButtonProps } from '@adobe-commerce/elsie/components/ActionButton';\n\nexport interface ActionButtonGroupOption {\n value: string | null;\n text: string;\n icon?: VNode<SVGElement>;\n disabled?: boolean;\n}\n\nexport interface ActionButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n activeOption?: string;\n disabled?: boolean;\n dividers?: boolean;\n children: VNode<ActionButtonProps>[] | VNode<ActionButtonProps>;\n handleSelect?(value: string): void;\n}\n\nexport const ActionButtonGroup: FunctionComponent<ActionButtonGroupProps> = ({\n className,\n variant = 'primary',\n activeOption,\n disabled = false,\n dividers = true,\n children,\n handleSelect,\n ...props\n}) => {\n const [activeOptionState, setActiveOptionState] = useState(activeOption);\n\n const handleClick = useCallback(\n (option: any) => {\n const isOptionDisabled = disabled || option.props.disabled;\n if (!isOptionDisabled) {\n setActiveOptionState(option.props.value);\n if (handleSelect) {\n handleSelect(option.props.value);\n }\n }\n },\n [handleSelect, setActiveOptionState, disabled]\n );\n\n const buttonGroupOptions = Children.map(\n children,\n (child: VNode<ActionButtonProps>) => {\n const isOptionDisabled = disabled || child.props.disabled;\n const isOptionActive = child.props.value === activeOptionState;\n return cloneElement(child, {\n disabled: isOptionDisabled,\n active: isOptionActive,\n onClick: () => handleClick(child),\n className: classes([\n 'dropin-action-button-group__option',\n `dropin-action-button-group__option--${variant}`,\n ['dropin-action-button-group__option--active', isOptionActive],\n ['dropin-action-button-group__option--with-dividers', dividers],\n ]),\n });\n }\n );\n\n return (\n <div\n role=\"group\"\n {...props}\n className={classes([\n 'dropin-action-button-group',\n `dropin-action-button-group--${variant}`,\n className,\n ])}\n >\n {buttonGroupOptions}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Card/Card.css';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n children: ComponentChildren | ComponentChildren[];\n}\n\nexport const Card: FunctionComponent<CardProps> = ({\n variant = 'primary',\n className,\n children,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes(['dropin-card', `dropin-card--${variant}`, className])}\n >\n <div class=\"dropin-card__content\">{children}</div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { ChangeEvent, HTMLAttributes, useRef, useState } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Check } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Checkbox/Checkbox.css';\nimport { useEffect } from 'preact/hooks';\n\nexport interface CheckboxProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n name: string;\n size?: 'medium' | 'large';\n disabled?: boolean;\n error?: boolean;\n label?: string | VNode | VNode[];\n description?: string | VNode | VNode[];\n}\n\nexport const Checkbox: FunctionComponent<CheckboxProps> = ({\n name,\n value,\n size = 'medium',\n disabled = false,\n error = false,\n label = '',\n description = '',\n className,\n checked,\n ...props\n}) => {\n const [isChecked, setIsChecked] = useState(\n checked === undefined ? false : checked\n );\n const ref = useRef<HTMLInputElement>(null);\n\n const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {\n props.onChange?.(e);\n setIsChecked(e.currentTarget.checked);\n };\n\n const handleOnKeyDown = (e: KeyboardEvent) => {\n if (e.key === ' ') {\n e.preventDefault();\n ref?.current?.click();\n }\n };\n\n useEffect(() => {\n if (typeof checked === 'boolean') {\n setIsChecked(checked);\n }\n }, [checked]);\n\n return (\n <label\n className={classes([\n 'dropin-checkbox',\n ['dropin-checkbox--disabled', disabled],\n ])}\n >\n <input\n ref={ref}\n name={name}\n value={value}\n type=\"checkbox\"\n disabled={disabled}\n className={classes([\n 'dropin-checkbox__checkbox',\n ['dropin-checkbox__checkbox--error', error],\n className,\n ])}\n {...props}\n onChange={handleCheckboxChange}\n checked={isChecked}\n />\n\n <div className=\"dropin-checkbox__checkbox-icon\">\n {/*Zero-width space character, used to align checkbox properly*/}\n {'\\u200B'}\n <span\n aria-checked={isChecked ? 'true' : 'false'}\n aria-labelledby={`${name}-label`}\n aria-describedby={description ? `${name}-description` : undefined}\n className={classes([\n 'dropin-checkbox__box',\n ['dropin-checkbox__box--error', error],\n ['dropin-checkbox__box--disabled', disabled],\n ])}\n role=\"checkbox\"\n tabIndex={disabled ? -1 : 0}\n onKeyDown={handleOnKeyDown}\n >\n <Icon\n className={classes(['dropin-checkbox__checkmark'])}\n source={Check}\n size=\"16\"\n stroke=\"3\"\n />\n </span>\n </div>\n\n <div\n id={`${name}-label`}\n className={classes([\n 'dropin-checkbox__label',\n `dropin-checkbox__label--${size}`,\n ['dropin-checkbox__label--disabled', disabled],\n ])}\n >\n {label}\n </div>\n\n <div />\n {description && (\n <div\n id={`${name}-description`}\n role={'note'}\n className={classes([\n 'dropin-checkbox__description',\n `dropin-checkbox__description--${size}`,\n ['dropin-checkbox__description--disabled', disabled],\n ])}\n >\n {description}\n </div>\n )}\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useCallback } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ColorSwatch/ColorSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ColorSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label' | 'size'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n size?: 'medium' | 'large';\n color?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ColorSwatch: FunctionComponent<ColorSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n size = 'medium',\n color,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const isValidColor = (color: string) => {\n const colorStyle = new Option().style;\n colorStyle.color = color;\n return colorStyle.color !== ''; // Returns true if the browser accepts this as a valid color\n };\n\n const defaultColor = 'var(--color-gray-300);';\n\n const validColor = color && isValidColor(color) ? color : defaultColor;\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n return (\n <label\n className={classes([\n 'dropin-color-swatch__container',\n `dropin-color-swatch__container--${size}`,\n className,\n ])}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-color-swatch',\n ['dropin-color-swatch--selected', selected],\n ['dropin-color-swatch--disabled', disabled],\n className,\n ])}\n />\n <span\n style={{ '--bg-color': validColor }}\n className={classes([\n 'dropin-color-swatch__span',\n ['dropin-color-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n />\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport {\n HTMLAttributes,\n useState,\n useEffect,\n useRef,\n useCallback,\n useMemo,\n} from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/TextSwatch/TextSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface TextSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label: string;\n groupAriaLabel?: string;\n value?: string;\n id: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const TextSwatch: FunctionComponent<TextSwatchProps> = ({\n className,\n name,\n value,\n label,\n groupAriaLabel,\n id,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const [isOverflowing, setIsOverflowing] = useState(false);\n const spanRef = useRef<HTMLLabelElement>(null);\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n useEffect(() => {\n if (\n spanRef.current &&\n spanRef.current.scrollWidth > spanRef.current.clientWidth\n ) {\n setIsOverflowing(true);\n }\n }, [label]);\n\n const uniqueId = useMemo(() => id ?? `${name}_${id}_${Math.random().toString(36)}`, [name, id]);\n\n return (\n <div\n className=\"dropin-text-swatch__container\"\n {...(isOverflowing ? { 'data-tooltip': label } : {})}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={uniqueId}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-text-swatch',\n ['dropin-text-swatch--selected', selected],\n ['dropin-text-swatch--disabled', disabled],\n className,\n ])}\n />\n <label\n htmlFor={uniqueId}\n ref={spanRef}\n className={classes([\n 'dropin-text-swatch__label',\n ['dropin-text-swatch__label--out-of-stock', outOfStock],\n className,\n ])}\n >\n {label}\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/ProgressSpinner/ProgressSpinner.css';\n\n/**\n * @param size this is the size of the spinner ranging in [12px, 24px, 36px, 48px]\n * @param stroke this is the stroke of the spinner ranging in [1px, 2px, 3px, 4px]\n */\nexport interface ProgressSpinnerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n ariaLabel?: string;\n size?: 'small' | 'medium' | 'big' | 'large';\n stroke?: '1' | '2' | '3' | '4';\n}\n\nexport const ProgressSpinner: FunctionComponent<ProgressSpinnerProps> = ({\n ariaLabel,\n size = 'small',\n stroke = '4',\n children,\n className,\n style,\n ...props\n}) => {\n const commonClasses = [\n 'dropin-progress-spinner',\n `dropin-progress-spinner--shape-size-${size}`,\n `dropin-progress-spinner--shape-stroke-${stroke}`,\n ];\n\n const translations = useText({\n updating: 'Dropin.ProgressSpinner.updating.label',\n updatingChildren: 'Dropin.ProgressSpinner.updatingChildren.label',\n });\n\n const handleAriaLabel = () => {\n if (ariaLabel) return ariaLabel;\n return children ? translations.updatingChildren : translations.updating;\n };\n\n return children ? (\n // if we provide children to this component, it should act as a provider in order to add background with low opacity\n <div\n {...props}\n className={classes(['dropin-progress-spinner-provider'])}\n aria-live=\"polite\"\n role=\"status\"\n >\n <div aria-hidden={true}>{children}</div>\n <div\n aria-label={handleAriaLabel()}\n role=\"status\"\n className={classes(['dropin-progress-spinner-background', className])}\n style={style}\n />\n <div\n className={classes([\n 'dropin-progress-spinner-with-provider',\n ...commonClasses,\n ])}\n aria-hidden={true}\n />\n </div>\n ) : (\n // if there are no children, it should be able to be standalone and have no background\n <div\n {...props}\n className={classes([className, ...commonClasses])}\n aria-live=\"polite\"\n role=\"status\"\n aria-label={handleAriaLabel()}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useCallback, JSX, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ImageSwatch/ImageSwatch.css';\nimport { Image, ImageProps } from '@adobe-commerce/elsie/components/Image';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ImageNodeRenderProps extends ImageProps {\n imageSwatchContext: {\n disabled?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n selected?: boolean;\n value?: string;\n label?: string;\n groupAriaLabel?: string;\n name?: string;\n id?: string;\n };\n}\n\nexport interface ImageSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n src: string;\n alt?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n imageNode?: VNode | ((props: ImageNodeRenderProps) => JSX.Element);\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ImageSwatch: FunctionComponent<ImageSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n src,\n alt,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n imageNode,\n onValue,\n onUpdateError,\n ...props\n}) => {\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n const imageProps: ImageProps = useMemo(() => {\n return {\n src,\n alt,\n loading: 'lazy',\n params: { width: 100, fit: 'bounds', crop: true },\n onError: (e: any) => (e.target.style.display = 'none'),\n };\n }, [src, alt]);\n\n return (\n <label className={classes(['dropin-image-swatch__container', className])}>\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-image-swatch',\n ['dropin-image-swatch--selected', selected],\n ['dropin-image-swatch--disabled', disabled],\n className,\n ])}\n />\n\n <span\n className={classes([\n 'dropin-image-swatch__span',\n ['dropin-image-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n >\n {typeof imageNode === 'function' ? (\n imageNode({\n ...imageProps,\n imageSwatchContext: {\n disabled,\n outOfStock,\n selected,\n value,\n label,\n groupAriaLabel,\n name,\n id,\n },\n })\n ) : imageNode || (\n <Image\n {...imageProps}\n className={classes(['dropin-image-swatch__content'])}\n />\n )}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useState, useEffect } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Divider, Icon, IconNode } from '@adobe-commerce/elsie/components';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Accordion/Accordion.css';\nexport interface AccordionSectionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n defaultOpen?: boolean;\n actionIconPosition?: 'left' | 'right';\n ariaLabelTitle: string;\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n renderContentWhenClosed?: boolean;\n onStateChange?: (open: boolean) => void;\n}\n\nexport const AccordionSection: FunctionComponent<AccordionSectionProps> = ({\n className,\n children,\n title,\n ariaLabelTitle,\n secondaryText,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n iconLeft = Add,\n showIconLeft = false,\n renderContentWhenClosed = true,\n defaultOpen,\n onStateChange,\n ...props\n}) => {\n const [open, setOpen] = useState<boolean>(false);\n const onClickHandler = (e: { stopImmediatePropagation: () => void }) => {\n e.stopImmediatePropagation();\n\n const next = !open;\n setOpen(next);\n onStateChange?.(next);\n };\n\n useEffect(() => {\n if (typeof defaultOpen !== 'undefined') {\n setOpen(defaultOpen);\n }\n }, [defaultOpen]);\n\n const buttonLabel = useText(\n `Dropin.Accordion.${open ? 'close' : 'open'}.label`\n ).label;\n\n const openIcon = (\n <Icon\n source={iconOpen}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__open-icon'}\n />\n );\n\n const closeIcon = (\n <Icon\n source={iconClose}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__close-icon'}\n />\n );\n\n const leftIcon = <Icon source={iconLeft} size=\"24\" />;\n\n return (\n <div\n {...props}\n className={classes(['dropin-accordion-section', className])}\n >\n <div className={'dropin-accordion-section__heading'}>\n <div\n className={'dropin-accordion-section__flex'}\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n role=\"button\"\n aria-label={`${buttonLabel} ${ariaLabelTitle ?? title}`}\n tabIndex={0}\n >\n <div className={'dropin-accordion-section__title-container'}>\n {actionIconPosition === 'left' && (open ? closeIcon : openIcon)}\n\n {showIconLeft && leftIcon}\n\n <h3 className={'dropin-accordion-section__title'}>{title}</h3>\n </div>\n </div>\n\n <div className={'dropin-accordion-section__secondary-text-container'}>\n {secondaryText && (\n <h4 className={'dropin-accordion-section__secondary-text'}>\n {secondaryText}\n </h4>\n )}\n\n {actionIconPosition === 'right' && (open ? closeIcon : openIcon)}\n </div>\n </div>\n\n <div\n className={'dropin-accordion-section__content-container'}\n style={{ display: open ? 'grid' : 'none' }}\n >\n {(open || (renderContentWhenClosed && !open)) && children}\n </div>\n </div>\n );\n};\n\nexport interface AccordionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n actionIconPosition?: 'left' | 'right';\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n children: VNode<AccordionSectionProps>[] | VNode<AccordionSectionProps>;\n}\n\nexport const Accordion: FunctionComponent<AccordionProps> = ({\n className,\n children,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n ...props\n}) => {\n const divider = <Divider variant=\"secondary\" />;\n\n const renderAccordionSection = (child: VNode<AccordionSectionProps>) => (\n <>\n <AccordionSection\n {...child.props}\n actionIconPosition={actionIconPosition}\n iconOpen={iconOpen}\n iconClose={iconClose}\n />\n {divider}\n </>\n );\n\n return (\n <div {...props} className={classes(['dropin-accordion', className])}>\n {[\n divider,\n ...(\n (Array.isArray(children)\n ? children\n : [children]) as VNode<AccordionSectionProps>[]\n ).map(renderAccordionSection),\n ]}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InLineAlert/InLineAlert.css';\nexport interface InLineAlertProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n variant?: 'primary' | 'secondary';\n heading: string;\n description?: string;\n type?: 'error' | 'warning' | 'success';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n additionalActions?: Array<{\n label: string;\n onClick: (event: Event) => void;\n }>;\n onDismiss?: (event: Event) => void;\n itemList?: VNode;\n actionButtonPosition?: 'top' | 'bottom';\n}\n\nexport const InLineAlert: FunctionComponent<InLineAlertProps> = ({\n variant = 'primary',\n className,\n type = 'warning',\n additionalActions,\n onDismiss,\n heading,\n description,\n icon,\n itemList,\n actionButtonPosition,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n 'dropin-in-line-alert',\n `dropin-in-line-alert--${type}`,\n `dropin-in-line-alert--${variant}`,\n className,\n ])}\n >\n <div className={'dropin-in-line-alert__heading'}>\n <div className={'dropin-in-line-alert__title-container'}>\n {icon && (\n <VComponent node={icon} className={'dropin-in-line-alert__icon'} />\n )}\n\n <span className={'dropin-in-line-alert__title'}>{heading}</span>\n </div>\n\n <div className={'dropin-in-line-alert__actions-container'}>\n {additionalActions &&\n (actionButtonPosition === 'top' ||\n (!actionButtonPosition && additionalActions.length <= 1)) && (\n <Button\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={\n additionalActions.length > 0\n ? additionalActions[0]?.onClick\n : undefined\n }\n aria-label={additionalActions[0]?.label}\n >\n {additionalActions[0]?.label}\n </Button>\n )}\n {onDismiss && (\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className={'dropin-in-line-alert__dismiss-button'}\n variant=\"tertiary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n )}\n </div>\n </div>\n\n {description && (\n <p className={'dropin-in-line-alert__description'}>{description}</p>\n )}\n <div className={'dropin-in-line-alert__item-list-container'}>\n {itemList && (\n <VComponent\n node={itemList}\n className={classes(['dropin-in-line-alert__item-list'])}\n />\n )}\n </div>\n {additionalActions &&\n (actionButtonPosition === 'bottom' ||\n (!actionButtonPosition && additionalActions.length > 1)) && (\n <div className={'dropin-in-line-alert__additional-actions-container'}>\n {additionalActions.map((action) => (\n <Button\n key={action.label}\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren } from 'preact';\nimport { FunctionComponent, useLayoutEffect, useRef } from 'preact/compat';\n\ninterface PortalProps {\n children: ComponentChildren;\n}\n\nexport const Portal: FunctionComponent<PortalProps> = ({ children }) => {\n const portalRoot = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n\n useLayoutEffect(() => {\n // Create portal root if it doesn't exist\n if (!portalRoot.current) {\n portalRoot.current = document.createElement('div');\n portalRoot.current.setAttribute('data-portal-root', '');\n document.body.appendChild(portalRoot.current);\n }\n\n // Move content to portal root\n if (contentRef.current && portalRoot.current) {\n portalRoot.current.appendChild(contentRef.current);\n }\n\n // Cleanup\n return () => {\n if (portalRoot.current) {\n portalRoot.current.remove();\n portalRoot.current = null;\n }\n };\n }, []);\n\n // Return a div that contains the children\n return (\n <div ref={contentRef} className=\"dropin-design\">\n {children}\n </div>\n );\n}; ","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport {\n FunctionComponent,\n HTMLAttributes,\n useCallback,\n useEffect,\n} from 'preact/compat';\nimport { Button } from '../Button';\nimport { Close as CloseSVG } from '@adobe-commerce/elsie/icons';\nimport { VNode } from 'preact';\nimport { Portal } from '../Portal/Portal';\n\nimport '@adobe-commerce/elsie/components/Modal/Modal.css';\n\nexport interface ModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size' | 'title'> {\n size?: 'small' | 'medium' | 'full';\n title?: VNode;\n centered?: boolean;\n onClose?: () => void;\n backgroundDim?: boolean;\n clickToDismiss?: boolean;\n escapeToDismiss?: boolean;\n showCloseButton?: boolean;\n}\n\nexport const Modal: FunctionComponent<ModalProps> = ({\n size = 'small',\n title = null,\n centered = false,\n backgroundDim = true,\n clickToDismiss = true,\n escapeToDismiss = true,\n onClose,\n showCloseButton = true,\n className,\n children = null,\n ...props\n}) => {\n const handleOnClose = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const translations = useText({\n modalCloseLabel: 'Dropin.Modal.Close.label',\n });\n\n // Close on background click\n useEffect(() => {\n const handleOutsideClick = (event: MouseEvent) => {\n const modal = document.querySelector('.dropin-modal');\n const modalBody = document.querySelector('.dropin-modal__body');\n\n if (\n clickToDismiss &&\n modal &&\n modalBody &&\n !modalBody.contains(event.target as Node)\n ) {\n handleOnClose();\n }\n };\n\n document.addEventListener('mousedown', handleOutsideClick);\n\n return () => {\n document.removeEventListener('mousedown', handleOutsideClick);\n };\n }, [handleOnClose, clickToDismiss]);\n\n // Close on ESC\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && escapeToDismiss) {\n handleOnClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleOnClose, escapeToDismiss]);\n\n // Prevent document scrolling\n useEffect(() => {\n const scrollingElement = document.scrollingElement as HTMLElement;\n\n const defaultOverflowValue = scrollingElement.style.overflow;\n\n scrollingElement.style.overflow = 'hidden';\n\n return () => {\n scrollingElement.style.overflow = defaultOverflowValue;\n };\n }, []);\n\n return (\n <Portal>\n <div\n className={classes([\n 'dropin-modal',\n ['dropin-modal--dim', backgroundDim],\n ])}\n >\n <div\n {...props}\n className={classes([\n 'dropin-modal__body',\n [`dropin-modal__body--${size}`, size],\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-modal__header',\n ['dropin-modal__header-title', !!title],\n ])}\n >\n {title && (\n <div className={classes(['dropin-modal__header-title-content'])}>\n {title}\n </div>\n )}\n\n {showCloseButton && (\n <Button\n aria-label={translations.modalCloseLabel}\n variant=\"tertiary\"\n className=\"dropin-modal__header-close-button\"\n onClick={handleOnClose}\n icon={<CloseSVG />}\n />\n )}\n </div>\n\n <div\n className={classes([\n 'dropin-modal__content',\n ['dropin-modal__body--centered', centered],\n ])}\n >\n {children}\n </div>\n </div>\n </div>\n </Portal>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useContext } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Button,\n CartItemSkeleton,\n Icon,\n Incrementer,\n UIContext,\n ProgressSpinner,\n Picker,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Trash } from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/CartItem/CartItem.css';\n\nexport interface CartItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'loading'> {\n ariaLabel?: string;\n image?: VNode;\n title?: VNode;\n price?: VNode;\n 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 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 </div>\n\n {/* Footer */}\n {footer && (\n <VComponent\n node={footer}\n className={classes(['dropin-cart-item__footer'])}\n />\n )}\n </div>\n\n {/* Remove Item */}\n {removeContent ? (\n <VComponent node={removeContent} />\n ) : onRemove ? (\n <Button\n data-testid=\"cart-item-remove-button\"\n className={classes(['dropin-cart-item__remove'])}\n variant=\"tertiary\"\n onClick={() => onRemove?.()}\n icon={\n <Icon\n data-testid=\"cart-item-remove-icon\"\n source={Trash}\n size=\"24\"\n stroke=\"2\"\n viewBox=\"0 0 24 24\"\n aria-label={\n ariaLabel\n ? labels.remove?.replace('{product}', ariaLabel)\n : labels.removeDefault\n }\n />\n }\n disabled={updating}\n />\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport const CartItemSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-cart-item dropin-cart-item-skeleton\">\n <Skeleton className=\"dropin-cart-item__skeleton dropin-cart-item__wrapper\">\n <div className=\"dropin-cart-item__image\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__title\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__sku\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__price\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__quantity\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__total\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, Children } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/CartList/CartList.css';\n\nexport interface CartListProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport const CartList: FunctionComponent<CartListProps> = ({\n className,\n children,\n ...props\n}) => {\n return (\n <div {...props} className={classes(['dropin-cart-list', className])}>\n <div\n className=\"dropin-cart-list__wrapper\"\n aria-live=\"assertive\"\n aria-relevant=\"all\"\n >\n {Children.map(children, (child, key) => {\n return (\n <div key={key} className=\"dropin-cart-list__item\">\n {child}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/PriceRange/PriceRange.css';\nimport { Price } from '@adobe-commerce/elsie/components/Price';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface PriceRangeProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n locale?: string;\n currency?: string;\n amount?: number; // simple product\n variant?: 'default' | 'strikethrough';\n minimumAmount?: number; // configurable product\n maximumAmount?: number; // configurable product\n display?: 'dash' | 'from to' | 'as low as';\n size?: 'small' | 'medium' | 'large';\n specialPrice?: number;\n sale?: boolean;\n}\n\nexport const PriceRange: FunctionComponent<PriceRangeProps> = ({\n className,\n children,\n locale,\n currency,\n amount,\n variant = 'default',\n minimumAmount,\n maximumAmount,\n size = 'small',\n display = 'dash',\n specialPrice,\n sale = false,\n ...props\n}) => {\n const isSimpleProduct = useMemo(\n () =>\n amount ||\n minimumAmount === maximumAmount ||\n (minimumAmount && !maximumAmount) ||\n (maximumAmount && !minimumAmount),\n [amount, maximumAmount, minimumAmount]\n );\n\n return (\n <div>\n {/* Simple product price or when configurable product minimum price equals to maximum price */}\n {isSimpleProduct ? (\n <div {...props} className={classes(['dropin-price-range', className])}>\n <Price\n amount={amount ?? minimumAmount ?? maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant={variant}\n sale={sale}\n />\n </div>\n ) : (\n <div {...props} className={classes(['dropin-price-range', className])}>\n {display === 'dash' ? (\n <Dashed\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'from to' ? (\n <FromTo\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'as low as' ? (\n <SpecialPrice\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n </div>\n )}\n </div>\n );\n};\n\n// Variations\n\nfunction Dashed({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n return (\n <>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span className=\"dropin-price-range__separator\">-</span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction FromTo({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__from',\n `dropin-price-range__from--${size}`,\n ])}\n >\n {translations.from}\n </span>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span\n className={classes([\n 'dropin-price-range__to',\n `dropin-price-range__to--${size}`,\n ])}\n >\n {translations.to}\n </span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction SpecialPrice({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__as-low-as',\n `dropin-price-range__as-low-as--${size}`,\n ])}\n >\n {translations.asLowAs}\n </span>\n {specialPrice ? (\n <div>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant=\"strikethrough\"\n />\n <Price\n amount={specialPrice}\n currency={currency}\n locale={locale}\n size={size}\n className=\"dropin-price-range__special\"\n sale={!!specialPrice && sale}\n />\n </div>\n ) : (\n <Price\n amount={minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n )}\n </>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes } from 'preact/compat';\nimport { FunctionComponent, VNode } from 'preact';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Breadcrumbs/Breadcrumbs.css';\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {\n categories: VNode[];\n separator?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const Breadcrumbs: FunctionComponent<BreadcrumbsProps> = ({\n className,\n categories,\n separator,\n ...props\n}) => {\n return (\n <>\n {categories?.length > 1 && (\n <nav\n role=\"navigation\"\n {...props}\n className={classes(['dropin-breadcrumbs__container', className])}\n >\n <ul className=\"dropin-breadcrumbs__items\">\n {categories?.map((category: VNode, index: number) => {\n return (\n <li\n key={index}\n className={classes([\n 'dropin-breadcrumbs__item',\n [\n 'dropin-breadcrumbs__item--last',\n index === categories.length - 1,\n ],\n ])}\n >\n <VComponent\n node={category}\n className=\"dropin-breadcrumbs__link\"\n />\n {!separator && index !== categories.length - 1 && (\n <span className=\"dropin-breadcrumbs__separator--default\">\n {' '}\n /{' '}\n </span>\n )}\n {separator && index !== categories.length - 1 && (\n <VComponent\n node={separator}\n className=\"dropin-breadcrumbs__separator--icon\"\n />\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n )}\n </>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/AlertBanner/AlertBanner.css';\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface AlertBannerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n variant: 'brand' | 'neutral' | 'success' | 'warning';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n message: VNode;\n onDismiss: () => void;\n action?: {\n label: string;\n onClick: (event: Event) => void;\n };\n}\n\nexport const AlertBanner: FunctionComponent<AlertBannerProps> = ({\n className,\n variant,\n icon,\n message,\n onDismiss,\n action,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n className,\n 'dropin-alert-banner',\n `dropin-alert-banner--${variant}`,\n ])}\n >\n <div className={'dropin-alert-banner__content'}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n className={'dropin-alert-banner__icon'}\n />\n )}\n\n {/* Message */}\n <VComponent\n node={message}\n className={classes(['dropin-alert-banner__message'])}\n />\n </div>\n\n <div className={'dropin-alert-banner__actions'}>\n {action && (\n <Button\n variant=\"tertiary\"\n className={'dropin-alert-banner__action'}\n onClick={action.onClick}\n aria-label={action.label}\n >\n {action.label}\n </Button>\n )}\n\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className=\"dropin-alert-banner__dismiss-button\"\n variant=\"primary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, JSX } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/IllustratedMessage/IllustratedMessage.css';\nimport { Card } from '@adobe-commerce/elsie/components';\n\nexport interface IllustratedMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n heading?: string;\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n message?: VNode<HTMLAttributes<HTMLElement>>;\n action?: VNode;\n variant?: 'primary' | 'secondary';\n}\n\nexport const IllustratedMessage: FunctionComponent<IllustratedMessageProps> = ({\n className,\n icon,\n heading,\n headingLevel = 2,\n message,\n action,\n variant = 'secondary',\n ...props\n}) => {\n const Heading =\n headingLevel >= 1 && headingLevel <= 6\n ? (`h${headingLevel}` as keyof JSX.IntrinsicElements)\n : 'h2';\n\n return (\n <div\n {...props}\n className={classes(['dropin-illustrated-message', className])}\n >\n <Card variant={variant}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n size=\"80\"\n className=\"dropin-illustrated-message__icon\"\n />\n )}\n\n {heading && (\n <Heading className=\"dropin-illustrated-message__heading\">\n {heading}\n </Heading>\n )}\n\n {message && (\n <VComponent\n node={message}\n className=\"dropin-illustrated-message__message\"\n />\n )}\n\n {action && (\n <VComponent\n node={action}\n className=\"dropin-illustrated-message__action\"\n />\n )}\n </Card>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ToggleButton/ToggleButton.css';\nimport { RadioButton } from '@adobe-commerce/elsie/components';\n\nexport interface ToggleButtonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n busy?: boolean;\n disabled?: boolean;\n icon?:\n | VNode<HTMLAttributes<SVGSVGElement>>\n | VNode<HTMLAttributes<HTMLImageElement>>;\n onChange?: (value: string) => void;\n selected?: boolean;\n}\n\nexport const ToggleButton: FunctionComponent<ToggleButtonProps> = ({\n label,\n name,\n value,\n busy = false,\n disabled = false,\n children,\n className,\n icon,\n onChange,\n selected = true,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes([\n 'dropin-toggle-button',\n className,\n ['dropin-toggle-button__selected', selected],\n ['dropin-toggle-button__disabled', disabled],\n ])}\n >\n <label className=\"dropin-toggle-button__actionButton\">\n <RadioButton\n label=\"\"\n name={name}\n value={value}\n checked={selected}\n disabled={disabled}\n onChange={() => onChange && onChange(value)}\n aria-label={name}\n busy={busy}\n className={classes([className, 'dropin-toggle-button__radioButton'])}\n />\n\n <span className=\"dropin-toggle-button__content\">\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon?.props}\n className=\"dropin-toggle-button__icon\"\n />\n )}\n {label}\n </span>\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { Divider } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/Header/Header.css';\n\nexport interface HeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n title: string;\n size?: 'medium' | 'large';\n divider?: boolean;\n cta?: VNode;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nconst Heading = ({\n level,\n className,\n children,\n}: {\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n className?: string;\n children?: ComponentChildren;\n}) => {\n const HeadingTag = level && level >= 1 && level <= 6\n ? `h${level}` as keyof JSX.IntrinsicElements\n : 'span';\n\n return <HeadingTag className={className}>{children as any}</HeadingTag>;\n};\n\nexport const Header: FunctionComponent<HeaderProps> = ({\n title = null,\n size = 'medium',\n cta,\n divider = true,\n className,\n level,\n ...props\n}) => {\n if (!title) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-header-container', className])}\n data-testid=\"dropin-header-container\"\n >\n <Heading\n className={classes([\n 'dropin-header-container__title',\n ['dropin-header-container__title--medium', size === 'medium'],\n ['dropin-header-container__title--large', size === 'large'],\n ])}\n level={level}\n >\n {title}\n </Heading>\n {cta ? (\n <VComponent node={cta} className=\"dropin-header-container__actions\" />\n ) : null}\n {divider ? (\n <Divider\n className={classes([\n 'dropin-header-container__divider',\n ['dropin-header-container__divider--medium', size === 'medium'],\n ['dropin-header-container__divider--large', size === 'large'],\n ])}\n />\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/Tag/Tag.css';\n\nexport interface TagProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon'> {\n label?: string;\n children?: VNode | VNode[];\n}\n\nexport const Tag: FunctionComponent<TagProps> = ({\n label,\n className,\n children,\n ...props\n}) => {\n if (!label && !children) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-tag-container', className])}\n data-testid=\"dropin-tag-container\"\n >\n {children ?? <span className=\"dropin-tag-container__label\">{label}</span>}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ContentGrid/ContentGrid.css';\n\nexport interface ContentGridProps extends HTMLAttributes<HTMLDivElement> {\n emptyGridContent: VNode;\n maxColumns?: number;\n columnWidth?: string;\n}\n\nexport const ContentGrid: FunctionComponent<ContentGridProps> = ({\n className,\n children,\n maxColumns,\n columnWidth = '1fr',\n emptyGridContent,\n ...props\n}) => {\n const hasChildren =\n !!children && (Array.isArray(children) ? children.length > 0 : true);\n\n const additionalStyles = hasChildren\n ? {\n gridTemplateColumns: `repeat(${maxColumns}, ${columnWidth})`,\n }\n : undefined;\n\n return (\n <div\n {...props}\n className={classes(['dropin-content-grid', className])}\n tabindex={0}\n >\n <div\n data-testid=\"content-grid-content\"\n className={classes([\n 'dropin-content-grid__content',\n ['dropin-content-grid__dynamic-columns-content', !maxColumns],\n ['dropin-content-grid__content--empty', !hasChildren],\n ])}\n style={additionalStyles}\n >\n {hasChildren ? children : emptyGridContent}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes, isNumber } from '@adobe-commerce/elsie/lib';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Pagination/Pagination.css';\n\nexport interface PaginationProps {\n className?: string;\n currentPage?: number;\n totalPages?: number;\n onChange?: (currentPage: number) => void;\n}\n\nexport type PaginationList = {\n page: number | string;\n isActive: boolean;\n label: number | string;\n};\n\nexport const Pagination: FunctionComponent<PaginationProps> = ({\n totalPages = 10,\n currentPage = 1,\n onChange,\n className,\n ...props\n}) => {\n const translations = useText({\n backwardButton: 'Dropin.Pagination.backwardButton.ariaLabel',\n forwardButton: 'Dropin.Pagination.forwardButton.ariaLabel',\n });\n\n const handleForward = useCallback(() => {\n const nextPage = Math.min(currentPage + 1, totalPages);\n\n onChange?.(nextPage);\n }, [currentPage, onChange, totalPages]);\n\n const handleBackward = useCallback(() => {\n const prevPage = Math.max(currentPage - 1, 1);\n\n onChange?.(prevPage);\n }, [currentPage, onChange]);\n\n const handleSetPage = useCallback(\n (currentPage: number | string) => {\n if (isNumber(currentPage)) {\n onChange?.(currentPage as number);\n }\n },\n [onChange]\n );\n\n const createPages = useCallback(\n (currentPage: number, totalPages: number): PaginationList[] => {\n let pages: PaginationList[] = [];\n\n const addPageRange = (start: number, end: number) => {\n for (let i = start; i <= end; i++) {\n pages.push({ page: i, isActive: i === currentPage, label: i });\n }\n };\n\n if (totalPages <= 5) {\n addPageRange(1, totalPages);\n } else if (currentPage <= 2) {\n addPageRange(1, 2);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n } else if (currentPage >= totalPages - 3) {\n addPageRange(totalPages - 4, totalPages);\n } else {\n addPageRange(currentPage - 1, currentPage);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n }\n\n return pages;\n },\n []\n );\n\n const paginationList: PaginationList[] = useMemo(\n () => createPages(currentPage, totalPages),\n [createPages, currentPage, totalPages]\n );\n\n return (\n <div {...props} className={classes(['dropin-pagination', className])}>\n <button\n type=\"button\"\n data-testid=\"prev-button\"\n aria-label={translations.backwardButton}\n disabled={currentPage === 1}\n onClick={handleBackward}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--backward',\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </button>\n <ul className=\"dropin-pagination_list\">\n {(paginationList as PaginationList[]).map((item, index) => (\n <li\n data-testid={`dropin-pagination_list-item--${item.page}`}\n key={`${item.page}_${index}`}\n className={classes([\n 'dropin-pagination_list-item',\n `dropin-pagination_list-item--${item.page}`,\n [`dropin-pagination_list-item--active`, item.isActive],\n ])}\n >\n <button\n type=\"button\"\n data-testid={`set-page-button-${item.page}`}\n onClick={() => handleSetPage(item.page)}\n >\n {item.label}\n </button>\n </li>\n ))}\n </ul>\n <button\n type=\"button\"\n data-testid=\"next-button\"\n aria-label={translations.forwardButton}\n disabled={currentPage === totalPages}\n onClick={handleForward}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--forward',\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton.css';\n\nexport const ProductItemCardSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-product-item-card dropin-product-item-card-skeleton\">\n <Skeleton className=\"dropin-product-item-card__skeleton dropin-product-item-card__image-container\">\n <SkeletonRow\n fullWidth={true}\n className=\"dropin-product-item-card__skeleton__image\"\n />\n </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 iconSource = 'Sort';\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=\"dropin-table__body__row\">\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":"kiCAwBA,MAAMA,GAAa,EAENC,EAAmD,CAAC,CAC/D,UAAAC,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UAAA0V,GAAiB/S,EAAa,cAAe,IAC7CwR,GAAc,IAAIA,CAAU,OAG/B+D,GAAkB,GAEtB,EACF,EAIF9b,EAAC,OACC,UAAU,kEACV,YAAU,YACV,cAAY,OAEX,SAAAsY,CAAA,EACH,EACF,CAEJ","names":["SINGLELINE","SkeletonRow","className","fullWidth","lines","size","variant","children","multilineGap","props","sharedClasses","jsx","classes","svg","_","index","Skeleton","rowGap","lazyIcons","lazy","__vitePreload","n","isValidUrl","source","absoluteUrl","UrlSvgLoader","url","svgContent","setSvgContent","useState","loading","setLoading","error","setError","useEffect","response","content","e","processedContent","Icon","Source","stroke","viewBox","defaultProps","isLikelyUrl","Suspense","LazyIcon","isRejectedUrl","Incrementer","name","value","disabled","success","min","max","onValue","onUpdateError","showButtons","currentValue","setCurrentValue","minValue","maxValue","isInvalid","errorMessage","propValue","debouncedOnValueHandler","useCallback","debounce","newValue","handleIncrementer","_value","jsxs","Localizer","Text","Minus","Add","Input","floatingLabel","icon","maxLength","id","handleOnValue","input","VComponent","WarningWithCircle","CheckWithCircle","InputDate","label","onChange","onBlur","internalValue","setInternalValue","iosInputRef","useRef","dictionary","useText","handleOnFocus","event","isIOSMobileDevice","handleOnClick","_a","handleOnBlur","handleInputChange","Field","Date","getIcon","PendingValidation","Check","ErrorValidation","PasswordStatusIndicator","minLength","requiredCharacterClasses","uniqueSymbolsStatus","validateLengthConfig","translations","getMessage","chart","InputPassword","placeholder","required","autoComplete","defaultValue","hideStatusIndicator","showPassword","setShowPassword","toggleShowPassword","prevShowPassword","title","Locker","Button","Eye","EyeClose","TextArea","textareaRef","useId","textArea","Divider","Price","amount","currency","locale","weight","sale","formatOptions","formattedAmount","useMemo","getPriceFormatter","RadioButton","checked","description","busy","active","activeChildren","activeIcon","href","buttonType","iconClassName","attributes","findSelectedValue","defaultOption","firstAvailableOption","Picker","options","handleSelect","uniqueId","isRequired","option","selectedValue","setSelectedValue","handleOptionClick","element","optionsListItems","text","isSelected","hasToDisplayPlaceholder","ChevronDown","hint","fieldContent","ActionButton","ActionButtonGroup","activeOption","dividers","activeOptionState","setActiveOptionState","handleClick","buttonGroupOptions","Children","child","isOptionDisabled","isOptionActive","cloneElement","Card","Checkbox","isChecked","setIsChecked","ref","handleCheckboxChange","handleOnKeyDown","ColorSwatch","groupAriaLabel","color","selected","outOfStock","multi","outOfStockLabel","selectedLabel","swatchLabel","onValueHandler","validColor","colorStyle","handleAriaLabel","TextSwatch","isOverflowing","setIsOverflowing","spanRef","ProgressSpinner","ariaLabel","style","commonClasses","ImageSwatch","src","alt","imageNode","imageProps","Image","AccordionSection","ariaLabelTitle","secondaryText","actionIconPosition","iconOpen","iconClose","iconLeft","showIconLeft","renderContentWhenClosed","defaultOpen","onStateChange","open","setOpen","onClickHandler","next","buttonLabel","openIcon","closeIcon","leftIcon","Accordion","divider","renderAccordionSection","Fragment","InLineAlert","type","additionalActions","onDismiss","heading","itemList","actionButtonPosition","_b","_c","Close","action","Portal","portalRoot","contentRef","useLayoutEffect","Modal","centered","backgroundDim","clickToDismiss","escapeToDismiss","onClose","showCloseButton","handleOnClose","handleOutsideClick","modal","modalBody","handleKeyDown","scrollingElement","defaultOverflowValue","CloseSVG","CartItem","image","price","taxIncluded","taxExcluded","total","totalExcludingTax","sku","configurations","warning","alert","discount","savings","actions","removeContent","quantity","quantityContent","footer","updating","quantityType","dropdownOptions","onQuantity","onRemove","useContext","UIContext","labels","CartItemSkeleton","quantityComponent","key","Trash","CartList","PriceRange","minimumAmount","maximumAmount","display","specialPrice","isSimpleProduct","Dashed","FromTo","SpecialPrice","Breadcrumbs","categories","separator","category","AlertBanner","message","IllustratedMessage","headingLevel","Heading","ToggleButton","level","HeadingTag","Header","cta","Tag","ContentGrid","maxColumns","columnWidth","emptyGridContent","hasChildren","additionalStyles","PaginationButton","anchorProps","buttonProps","Pagination","totalPages","currentPage","routePage","handleForward","nextPage","handleBackward","prevPage","handleSetPage","isNumber","createPages","pages","addPageRange","start","end","i","paginationList","item","ProductItemCardSkeleton","ProductItemCard","titleNode","actionButton","swatches","initialized","InputFile","accept","multiple","providedId","generatedId","handleChange","Table","columns","rowData","mobileLayout","caption","expandedRows","skeletonRowCount","onSortChange","handleSort","column","nextDirection","renderSortButton","iconSource","renderSkeletonRows","rowIndex","renderDataRows","row","hasDetails","isExpanded","cell","getAriaSort","filterOptions","searchTerm","getSelectedLabels","v","opt","generateIds","baseId","useAccessibilityAnnouncements","announcement","setAnnouncement","announce","useKeyboardNavigation","filteredOptions","focusedIndex","setFocusedIndex","dropdownRef","items","direction","prev","step","nextIndex","MultiSelect","selectAllText","deselectAllText","noResultsText","maxHeight","isOpen","setIsOpen","setSearchTerm","containerRef","searchInputRef","closeDropdown","resetSearch","navigate","handleClickOutside","handleContainerClick","optionValue","isCurrentlySelected","handleRemoveTag","handleSelectAll","allFilteredValues","currentValueSet","newSelections","val","handleDeselectAll","filteredValues","removedCount","handleInputKeyDown","focusedOption","selectedLabels","listboxId","searchInputId","labelId","selectedDescriptionId","currentFocusedId","hasSelection","count","renderSelectedTags","totalSelected","fieldContext","selectedItemsText","renderSearchInput","target","renderDropdownControls","renderOptionsList","isFocused","optionId"],"ignoreList":[],"sources":["/@dropins/tools/src/components/Skeleton/Skeleton.tsx","/@dropins/tools/src/components/Icon/Icon.tsx","/@dropins/tools/src/components/Incrementer/Incrementer.tsx","/@dropins/tools/src/components/Input/Input.tsx","/@dropins/tools/src/components/InputDate/InputDate.tsx","/@dropins/tools/src/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.tsx","/@dropins/tools/src/components/InputPassword/InputPassword.tsx","/@dropins/tools/src/components/TextArea/TextArea.tsx","/@dropins/tools/src/components/Divider/Divider.tsx","/@dropins/tools/src/components/Price/Price.tsx","/@dropins/tools/src/components/RadioButton/RadioButton.tsx","/@dropins/tools/src/components/Button/Button.tsx","/@dropins/tools/src/components/Picker/Picker.tsx","/@dropins/tools/src/components/Field/Field.tsx","/@dropins/tools/src/components/ActionButton/ActionButton.tsx","/@dropins/tools/src/components/ActionButtonGroup/ActionButtonGroup.tsx","/@dropins/tools/src/components/Card/Card.tsx","/@dropins/tools/src/components/Checkbox/Checkbox.tsx","/@dropins/tools/src/components/ColorSwatch/ColorSwatch.tsx","/@dropins/tools/src/components/TextSwatch/TextSwatch.tsx","/@dropins/tools/src/components/ProgressSpinner/ProgressSpinner.tsx","/@dropins/tools/src/components/ImageSwatch/ImageSwatch.tsx","/@dropins/tools/src/components/Accordion/Accordion.tsx","/@dropins/tools/src/components/InLineAlert/InLineAlert.tsx","/@dropins/tools/src/components/Portal/Portal.tsx","/@dropins/tools/src/components/Modal/Modal.tsx","/@dropins/tools/src/components/CartItem/CartItem.tsx","/@dropins/tools/src/components/CartItem/CartItemSkeleton.tsx","/@dropins/tools/src/components/CartList/CartList.tsx","/@dropins/tools/src/components/PriceRange/PriceRange.tsx","/@dropins/tools/src/components/Breadcrumbs/Breadcrumbs.tsx","/@dropins/tools/src/components/AlertBanner/AlertBanner.tsx","/@dropins/tools/src/components/IllustratedMessage/IllustratedMessage.tsx","/@dropins/tools/src/components/ToggleButton/ToggleButton.tsx","/@dropins/tools/src/components/Header/Header.tsx","/@dropins/tools/src/components/Tag/Tag.tsx","/@dropins/tools/src/components/ContentGrid/ContentGrid.tsx","/@dropins/tools/src/components/Pagination/PaginationButton.tsx","/@dropins/tools/src/components/Pagination/Pagination.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCardSkeleton.tsx","/@dropins/tools/src/components/ProductItemCard/ProductItemCard.tsx","/@dropins/tools/src/components/InputFile/InputFile.tsx","/@dropins/tools/src/components/Table/Table.tsx","/@dropins/tools/src/components/MultiSelect/MultiSelect.tsx"],"sourcesContent":["/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Skeleton/Skeleton.css';\n\nexport interface SkeletonRowProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n fullWidth?: boolean;\n lines?: number;\n size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';\n variant?: 'heading' | 'row' | 'empty';\n multilineGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n children?: string;\n}\n\nconst SINGLELINE = 1;\n\nexport const SkeletonRow: FunctionComponent<SkeletonRowProps> = ({\n className,\n fullWidth = false,\n lines = SINGLELINE,\n size = 'small',\n variant = 'row',\n children = null,\n multilineGap = 'medium',\n ...props\n}) => {\n const sharedClasses = [\n [`dropin-skeleton-row__${variant}`, variant],\n [`dropin-skeleton-row__${variant}-${size}`, variant && size],\n ];\n\n if (!children && variant === 'empty') {\n return (\n <div\n className={classes([\n 'dropin-skeleton-row dropin-skeleton-row__empty',\n className,\n ])}\n />\n );\n }\n\n if (children) {\n const svg = children.trim();\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n }\n\n const isMultiline = lines > SINGLELINE;\n\n if (isMultiline === false) {\n return (\n <div\n {...props}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n className,\n ])}\n />\n );\n }\n\n return (\n <div\n {...props}\n style={{ '--multiline-gap-spacing': `var(--spacing-${multilineGap})` }}\n class={classes([\n 'dropin-skeleton-row--multiline',\n [`dropin-skeleton-row--full`, fullWidth],\n className,\n ])}\n >\n {Array.from({ length: lines }).map((_, index) => (\n <div\n key={index}\n class={classes([\n 'dropin-skeleton-row',\n [`dropin-skeleton-row--full`, fullWidth],\n 'dropin-skeleton--row__content',\n ...sharedClasses,\n ])}\n />\n ))}\n </div>\n );\n};\n\nexport interface SkeletonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n rowGap?: 'xsmall' | 'small' | 'medium' | 'big' | 'xbig';\n}\n\nexport const Skeleton: FunctionComponent<SkeletonProps> = ({\n className,\n children,\n rowGap = 'medium',\n ...props\n}) => {\n return (\n <div\n style={{ '--row-gap-spacing': `var(--spacing-${rowGap})` }}\n {...props}\n className={classes(['dropin-skeleton', className])}\n role=\"status\"\n aria-label=\"Loading...\"\n >\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib/classes';\nimport { lazy, Suspense, SVGProps } from 'preact/compat';\nimport { useState, useEffect } from 'preact/hooks';\n\nimport '@adobe-commerce/elsie/components/Icon/Icon.css';\n\nexport type IconType = keyof typeof import('@adobe-commerce/elsie/icons');\n\nconst lazyIcons = {\n Add: lazy(() => import('@adobe-commerce/elsie/icons/Add.svg')),\n AddressBook: lazy(() => import('@adobe-commerce/elsie/icons/AddressBook.svg')),\n Bulk: lazy(() => import('@adobe-commerce/elsie/icons/Bulk.svg')),\n Burger: lazy(() => import('@adobe-commerce/elsie/icons/Burger.svg')),\n Business: lazy(() => import('@adobe-commerce/elsie/icons/Business.svg')),\n Card: lazy(() => import('@adobe-commerce/elsie/icons/Card.svg')),\n Cart: lazy(() => import('@adobe-commerce/elsie/icons/Cart.svg')),\n Check: lazy(() => import('@adobe-commerce/elsie/icons/Check.svg')),\n CheckWithCircle: lazy(() => import('@adobe-commerce/elsie/icons/CheckWithCircle.svg')),\n ChevronDown: lazy(() => import('@adobe-commerce/elsie/icons/ChevronDown.svg')),\n ChevronRight: lazy(() => import('@adobe-commerce/elsie/icons/ChevronRight.svg')),\n ChevronUp: lazy(() => import('@adobe-commerce/elsie/icons/ChevronUp.svg')),\n Close: lazy(() => import('@adobe-commerce/elsie/icons/Close.svg')),\n Coupon: lazy(() => import('@adobe-commerce/elsie/icons/Coupon.svg')),\n Date: lazy(() => import('@adobe-commerce/elsie/icons/Date.svg')),\n Delivery: lazy(() => import('@adobe-commerce/elsie/icons/Delivery.svg')),\n Edit: lazy(() => import('@adobe-commerce/elsie/icons/Edit.svg')),\n EmptyBox: lazy(() => import('@adobe-commerce/elsie/icons/EmptyBox.svg')),\n Eye: lazy(() => import('@adobe-commerce/elsie/icons/Eye.svg')),\n EyeClose: lazy(() => import('@adobe-commerce/elsie/icons/EyeClose.svg')),\n Gift: lazy(() => import('@adobe-commerce/elsie/icons/Gift.svg')),\n GiftCard: lazy(() => import('@adobe-commerce/elsie/icons/GiftCard.svg')),\n Heart: lazy(() => import('@adobe-commerce/elsie/icons/Heart.svg')),\n HeartFilled: lazy(() => import('@adobe-commerce/elsie/icons/HeartFilled.svg')),\n InfoFilled: lazy(() => import('@adobe-commerce/elsie/icons/InfoFilled.svg')),\n List: lazy(() => import('@adobe-commerce/elsie/icons/List.svg')),\n Locker: lazy(() => import('@adobe-commerce/elsie/icons/Locker.svg')),\n Minus: lazy(() => import('@adobe-commerce/elsie/icons/Minus.svg')),\n Order: lazy(() => import('@adobe-commerce/elsie/icons/Order.svg')),\n OrderError: lazy(() => import('@adobe-commerce/elsie/icons/OrderError.svg')),\n OrderSuccess: lazy(() => import('@adobe-commerce/elsie/icons/OrderSuccess.svg')),\n PaymentError: lazy(() => import('@adobe-commerce/elsie/icons/PaymentError.svg')),\n Placeholder: lazy(() => import('@adobe-commerce/elsie/icons/Placeholder.svg')),\n PlaceholderFilled: lazy(\n () => import('@adobe-commerce/elsie/icons/PlaceholderFilled.svg')\n ),\n Purchase: lazy(() => import('@adobe-commerce/elsie/icons/Purchase.svg')),\n Quote: lazy(() => import('@adobe-commerce/elsie/icons/Quote.svg')),\n Search: lazy(() => import('@adobe-commerce/elsie/icons/Search.svg')),\n SearchFilled: lazy(() => import('@adobe-commerce/elsie/icons/SearchFilled.svg')),\n Sort: lazy(() => import('@adobe-commerce/elsie/icons/Sort.svg')),\n Star: lazy(() => import('@adobe-commerce/elsie/icons/Star.svg')),\n Structure: lazy(() => import('@adobe-commerce/elsie/icons/Structure.svg')),\n Team: lazy(() => import('@adobe-commerce/elsie/icons/Team.svg')),\n Trash: lazy(() => import('@adobe-commerce/elsie/icons/Trash.svg')),\n User: lazy(() => import('@adobe-commerce/elsie/icons/User.svg')),\n View: lazy(() => import('@adobe-commerce/elsie/icons/View.svg')),\n Wallet: lazy(() => import('@adobe-commerce/elsie/icons/Wallet.svg')),\n Warning: lazy(() => import('@adobe-commerce/elsie/icons/Warning.svg')),\n WarningFilled: lazy(() => import('@adobe-commerce/elsie/icons/WarningFilled.svg')),\n WarningWithCircle: lazy(\n () => import('@adobe-commerce/elsie/icons/WarningWithCircle.svg')\n ),\n};\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'size'> {\n source?:\n | FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>\n | IconType\n | string;\n size?: '12' | '16' | '24' | '32' | '64' | '80';\n stroke?: '1' | '2' | '3' | '4';\n className?: string;\n title?: string;\n}\n\nexport type IconNode = FunctionComponent<\n SVGProps<SVGSVGElement> & { title?: string }\n>;\n\nfunction isValidUrl(source: string): boolean { // check for URL from same domain\n try {\n if (source.startsWith('//')) {\n const absoluteUrl = `${window.location.protocol}${source}`;\n const url = new URL(absoluteUrl);\n if (url.hostname !== window.location.hostname) {\n console.error(\n `[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`\n );\n return false;\n }\n return true;\n }\n const url = new URL(source);\n \n if (url.hostname !== window.location.hostname) {\n console.error(`[Icon] External URL rejected for security: ${source} - Only same-domain URLs are allowed`);\n return false;\n }\n \n return true;\n } catch {\n console.error(`[Icon] Invalid URL format: ${source}`);\n return false;\n }\n}\n\nfunction UrlSvgLoader({\n url,\n ...props\n}: SVGProps<SVGSVGElement> & { url: string }) {\n const [svgContent, setSvgContent] = useState<string>('');\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState(false);\n\n useEffect(() => {\n fetch(url)\n .then(response => {\n if (!response.ok) {\n console.error(`[Icon] Failed to fetch SVG: ${response.status} ${response.statusText}`);\n throw error;\n }\n return response.text();\n })\n .then(content => {\n // Check if content is valid SVG\n try {\n const parser = new DOMParser();\n const doc = parser.parseFromString(content, \"image/svg+xml\");\n const svg = doc.querySelector('svg');\n if (!svg) {\n throw new Error(\"No <svg> element found\");\n }\n // Success!\n } catch(e: unknown) {\n if (e instanceof Error ) {\n console.error(`[Icon] Invalid SVG content from ${url}: ${e.message}`);\n } else {\n console.error(`[Icon] Invalid SVG content from ${url}: ${String(e)}`);\n }\n setError(true);\n setLoading(false);\n }\n \n\n // Process SVG content to ensure proper sizing and accessibility\n let processedContent = content;\n\n if (props.width) {\n processedContent = processedContent.replace(\n /<svg([^>]*)\\s+width\\s*=\\s*[\"'][^\"']*[\"']/gi,\n '<svg$1'\n );\n processedContent = processedContent.replace(\n /<svg/i,\n `<svg width=\"${props.width}\"`\n );\n }\n\n if (props.height) {\n processedContent = processedContent.replace(\n /<svg([^>]*)\\s+height\\s*=\\s*[\"'][^\"']*[\"']/gi,\n '<svg$1'\n );\n processedContent = processedContent.replace(\n /<svg/i,\n `<svg height=\"${props.height}\"`\n );\n }\n \n if (props.title) {\n processedContent = processedContent.replace(/<title[^>]*>.*?<\\/title>/gi, '');\n processedContent = processedContent.replace(\n /<svg([^>]*)>/i,\n `<svg$1><title>${props.title}</title>`\n );\n }\n \n setSvgContent(processedContent);\n setLoading(false);\n })\n .catch((error) => {\n if (error instanceof Error) {\n console.error(`[Icon] ${error.message}`);\n } else {\n console.error(`[Icon] ${String(error)}`);\n }\n setError(true);\n setLoading(false);\n });\n }, [url, props.width, props.height, props.title]);\n\n if (loading || error) {\n return <svg {...props} />;\n }\n\n return (\n <span\n className={props.className}\n style={{\n width: String(props.width),\n height: String(props.height),\n display: 'inline-flex',\n lineHeight: 0,\n }}\n dangerouslySetInnerHTML={{ __html: svgContent }}\n />\n );\n}\n\nexport function Icon({\n source: Source,\n size = '24',\n stroke = '2',\n viewBox = '0 0 24 24',\n className,\n ...props\n}: IconProps) {\n\n const defaultProps = {\n className: classes([\n 'dropin-icon',\n `dropin-icon--shape-stroke-${stroke}`,\n className,\n ]),\n width: size,\n height: size,\n viewBox,\n };\n\n // Only validate strings that look like URLs (start with http, //, or /)\n const isLikelyUrl =\n typeof Source === 'string' &&\n (Source.startsWith('http') ||\n Source.startsWith('//') ||\n Source.startsWith('/'));\n\n if (isLikelyUrl && isValidUrl(Source)) {\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n <UrlSvgLoader url={Source} {...props} {...defaultProps}/>\n </Suspense>\n );\n }\n\n const LazyIcon = typeof Source === 'string' && Source in lazyIcons\n ? lazyIcons[Source as IconType]\n : null;\n\n const isRejectedUrl = isLikelyUrl && !isValidUrl(Source);\n\n return (\n <Suspense fallback={<svg {...props} {...defaultProps} />}>\n {LazyIcon ? (\n <LazyIcon {...props} {...defaultProps} />\n ) : isRejectedUrl ? (\n <svg {...props} {...defaultProps} />\n ) : (\n // @ts-ignore\n <Source {...props} {...defaultProps} />\n )}\n </Suspense>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useState, useCallback, useEffect } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { Localizer, Text } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Incrementer/Incrementer.css';\n\nexport interface IncrementerProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size'> {\n name?: string;\n size?: 'medium' | 'large';\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n error?: boolean;\n success?: boolean;\n min?: number;\n max?: number;\n disabled?: boolean;\n maxLength?: number;\n showButtons?: boolean;\n}\n\nexport const Incrementer: FunctionComponent<IncrementerProps> = ({\n name,\n value = '1',\n className,\n disabled,\n error,\n success,\n min,\n max,\n onValue,\n onUpdateError,\n size = 'medium',\n showButtons = true,\n ...props\n}) => {\n const [currentValue, setCurrentValue] = useState<number>(Number(value));\n const minValue = Number(min);\n const maxValue = Number(max);\n const isInvalid = error || currentValue < minValue || currentValue > maxValue;\n\n const errorMessage =\n currentValue < minValue\n ? 'Dropin.Incrementer.minQuantityMessage'\n : currentValue > maxValue\n ? 'Dropin.Incrementer.maxQuantityMessage'\n : 'Dropin.Incrementer.errorMessage';\n\n // Add this effect to synchronize internal state with external value prop\n useEffect(() => {\n const propValue = Number(value);\n if (propValue !== currentValue) {\n setCurrentValue(propValue);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleIncrementer = (_value: number) => {\n let newValue = _value;\n debouncedOnValueHandler(newValue);\n setCurrentValue(newValue);\n };\n\n return (\n <div\n className={classes([\n 'dropin-incrementer',\n `dropin-incrementer--${size}`,\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-incrementer__content',\n `dropin-incrementer__content--${size}`,\n ['dropin-incrementer__content--no-buttons', !showButtons],\n [`dropin-incrementer__content--error`, isInvalid],\n [`dropin-incrementer__content--success`, success],\n [`dropin-incrementer__content--disabled`, disabled],\n ])}\n >\n {/* Minus Button */}\n {showButtons && (\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__decrease-button',\n [`dropin-incrementer__decrease-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue - 1)}\n disabled={disabled || currentValue < minValue + 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.decreaseLabel\" />) as any\n }\n >\n <Icon\n source={Minus}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__down\"\n />\n </button>\n </Localizer>\n </div>\n )}\n\n {/* Input Field */}\n <input\n className=\"dropin-incrementer__input\"\n max={max}\n min={min}\n step={1}\n type=\"number\"\n name={name}\n value={currentValue}\n disabled={disabled}\n onBlur={() => {\n handleIncrementer(Number(currentValue));\n }}\n onChange={(e) => {\n const newValue = e.currentTarget.value;\n if (newValue !== '') {\n handleIncrementer(Number(newValue));\n }\n }}\n {...props}\n />\n\n {showButtons && (\n <div\n className={classes([\n 'dropin-incrementer__button-container',\n [`dropin-incrementer__button-container--disabled`, disabled],\n ])}\n >\n {/* Plus/Add button */}\n <Localizer>\n <button\n type=\"button\"\n className={classes([\n 'dropin-incrementer__increase-button',\n [`dropin-incrementer__increase-button--disabled`, disabled],\n ])}\n onClick={() => handleIncrementer(currentValue + 1)}\n disabled={disabled || currentValue > maxValue - 1}\n aria-label={\n (<Text id=\"Dropin.Incrementer.increaseLabel\" />) as any\n }\n >\n <Icon\n source={Add}\n size=\"16\"\n stroke=\"1\"\n viewBox=\"4 2 20 20\"\n className=\"dropin-incrementer__add\"\n />\n </button>\n </Localizer>\n </div>\n )}\n </div>\n {isInvalid && (\n <p className=\"dropin-incrementer__content--error-message\">\n <Text\n id={errorMessage}\n fields={{ minQuantity: min, maxQuantity: max }}\n />\n </p>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Input/Input.css';\nimport { CheckWithCircle, WarningWithCircle } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes, debounce } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useCallback } from 'preact/hooks';\n\nexport interface InputProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'icon'> {\n id?: string;\n name?: string;\n variant?: 'primary' | 'secondary';\n disabled?: boolean;\n error?: boolean;\n floatingLabel?: string;\n onUpdateError?: (error: Error) => void;\n onValue?: (value: any) => void;\n size?: 'medium' | 'large';\n success?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n maxLength?: number;\n}\n\nexport const Input: FunctionComponent<InputProps> = ({\n name,\n value,\n variant = 'primary',\n className,\n disabled,\n error,\n floatingLabel,\n onValue,\n onUpdateError,\n size = 'medium',\n icon,\n maxLength,\n success,\n ...props\n}) => {\n const id = props?.id || name || `dropin-input-${Math.random().toString(36)}`;\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const debouncedOnValueHandler = useCallback(\n debounce(async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n }, 200),\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n debouncedOnValueHandler(input.value.trim());\n };\n\n return (\n <div\n className={classes([\n 'dropin-input-container',\n `dropin-input-container--${variant}`,\n [`dropin-input-container--floating`, !!floatingLabel],\n ['dropin-input-container--disabled', disabled],\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes([\n 'dropin-input__field-icon--left',\n icon.props.className,\n ])}\n />\n )}\n <div className=\"dropin-input-label-container\">\n {/* Input */}\n <input\n id={id}\n onChange={handleOnValue}\n type=\"text\"\n maxLength={maxLength}\n name={name}\n value={value}\n {...props}\n className={classes([\n 'dropin-input',\n `dropin-input--${size}`,\n `dropin-input--${variant}`,\n [`dropin-input--error`, !!error],\n [`dropin-input--success`, !!success],\n ['dropin-input--disabled', disabled],\n [`dropin-input--floating`, !!floatingLabel],\n [`dropin-input--icon-left`, !!icon],\n className,\n ])}\n disabled={disabled}\n />\n\n {/* Floating Label */}\n {floatingLabel && (\n <label\n htmlFor={id}\n className={classes([\n [`dropin-input__label--floating`, !!floatingLabel],\n [`dropin-input__label--floating--icon-left`, !!icon],\n [`dropin-input__label--floating--error`, !!error],\n ])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n\n {error && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--error',\n ])}\n >\n <Icon\n source={WarningWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--warning-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n\n {success && (\n <div\n className={classes([\n 'dropin-input__field-icon--right',\n 'dropin-input__field-icon--success',\n ])}\n >\n <Icon\n source={CheckWithCircle}\n size=\"16\"\n stroke=\"2\"\n className=\"dropin-input--success-icon\"\n viewBox=\"-1 -1 26 26\"\n />\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { classes, isIOSMobileDevice } from '@adobe-commerce/elsie/lib';\nimport { JSX } from 'preact/compat';\nimport { Field, Icon, Input, InputProps } from '@adobe-commerce/elsie/components';\nimport { Date } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/InputDate/InputDate.css';\nimport { useCallback } from 'react';\n\nexport interface InputDateProps extends Omit<InputProps, 'error' | 'value'> {\n label?: string;\n name?: string;\n error?: string;\n value?: Date;\n}\n\nexport const InputDate: FunctionComponent<InputDateProps> = ({\n name = '',\n error,\n value,\n label,\n onChange,\n onBlur,\n ...props\n}) => {\n const [internalValue, setInternalValue] = useState(value?.toString() ?? '');\n const iosInputRef = useRef<HTMLInputElement>(null);\n const dictionary = useText({\n picker: 'Dropin.InputDate.picker',\n });\n\n const handleOnFocus: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'date');\n\n if (!isIOSMobileDevice()) return;\n\n iosInputRef.current.focus();\n },\n []\n );\n\n const handleOnClick: JSX.MouseEventHandler<HTMLButtonElement> = useCallback(\n (event) => {\n const input = event.currentTarget.parentElement?.querySelector('input');\n input?.focus();\n input?.showPicker();\n },\n []\n );\n\n const handleOnBlur: JSX.MouseEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n event.currentTarget.setAttribute('type', 'text');\n onBlur?.(event);\n },\n [onBlur]\n );\n\n const handleInputChange: JSX.MouseEventHandler<HTMLInputElement> =\n useCallback(\n (event) => {\n setInternalValue(event.target.value);\n onChange?.(event);\n },\n [onChange]\n );\n\n return (\n <div className={classes(['dropin-input-date'])}>\n {/* This simple input is needed only for iOS devices to trigger the date picker. */}\n {isIOSMobileDevice() ? (\n <input\n ref={iosInputRef}\n data-testid=\"inputDateIos\"\n className=\"dropin-input-date__input--ios\"\n type=\"date\"\n onChange={handleInputChange}\n />\n ) : null}\n <Field error={error}>\n <Input\n data-testid=\"input-date\"\n error={!!error}\n name={name}\n value={internalValue}\n placeholder={label}\n floatingLabel={label}\n onFocus={handleOnFocus}\n onBlur={handleOnBlur}\n onChange={handleInputChange}\n aria-labelledby={label}\n className=\"dropin-input-date__input\"\n {...props}\n />\n </Field>\n\n <button\n type=\"button\"\n data-testid=\"dropin-input-date__icon\"\n className=\"dropin-input-date__icon\"\n aria-label={dictionary.picker}\n onClick={handleOnClick}\n >\n <Icon source={Date} size=\"24\" />\n </button>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n Check,\n Close as ErrorValidation,\n Minus as PendingValidation,\n} from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/InputPassword/PasswordStatusIndicator/PasswordStatusIndicator.css';\n\ntype statusTypes = '' | 'success' | 'error' | 'pending';\n\nexport interface ValidateLengthConfigProps {\n status?: statusTypes;\n icon?: statusTypes;\n message?: string;\n}\n\nexport interface PasswordStatusIndicatorProps {\n validateLengthConfig?: ValidateLengthConfigProps;\n uniqueSymbolsStatus?: statusTypes;\n minLength?: number;\n requiredCharacterClasses?: number;\n}\n\nconst getIcon: { [key: string]: JSX.Element } = {\n pending: <PendingValidation />,\n success: <Check />,\n error: <ErrorValidation style={{ fill: 'red' }} />,\n};\n\nexport const PasswordStatusIndicator: FunctionComponent<\n PasswordStatusIndicatorProps & HTMLAttributes<HTMLDivElement>\n> = ({\n minLength = 0,\n requiredCharacterClasses = 0,\n uniqueSymbolsStatus = 'pending',\n validateLengthConfig = { status: '', icon: '', message: '' },\n}) => {\n const translations = useText({\n chartTwoSymbols: 'Dropin.PasswordStatusIndicator.chartTwoSymbols',\n chartThreeSymbols: 'Dropin.PasswordStatusIndicator.chartThreeSymbols',\n chartFourSymbols: 'Dropin.PasswordStatusIndicator.chartFourSymbols',\n });\n\n const getMessage = (chart: number) => {\n switch (chart) {\n case 2:\n return translations.chartTwoSymbols;\n case 3:\n return translations.chartThreeSymbols;\n case 4:\n return translations.chartFourSymbols;\n default:\n return '';\n }\n };\n\n return (\n <div className={classes(['dropin-password-status-indicator'])}>\n {minLength > 0 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${validateLengthConfig.status}`}\n data-testid={`dropin-password-status-indicator__item--${validateLengthConfig.icon}`}\n >\n {getIcon[validateLengthConfig.icon as string]}\n <span className={`${validateLengthConfig.status}`}>\n {validateLengthConfig.message}\n </span>\n </div>\n ) : null}\n {requiredCharacterClasses >= 2 ? (\n <div\n className={`dropin-password-status-indicator__item dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n data-testid={`dropin-password-status-indicator__item--${uniqueSymbolsStatus}`}\n >\n {getIcon[uniqueSymbolsStatus]}\n <span className={`pending`}>\n {getMessage(requiredCharacterClasses)}\n </span>\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Locker, EyeClose, Eye } from '@adobe-commerce/elsie/icons';\nimport { Button, Field, Input, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport {\n PasswordStatusIndicator,\n PasswordStatusIndicatorProps,\n} from './PasswordStatusIndicator';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InputPassword/InputPassword.css';\n\nexport interface InputPasswordProps\n extends PasswordStatusIndicatorProps,\n Omit<HTMLAttributes<HTMLDivElement>, 'minLength'> {\n placeholder?: string;\n floatingLabel?: string;\n defaultValue?: string;\n className?: string;\n name?: string;\n autoComplete?: string;\n errorMessage?: string | undefined;\n required?: boolean;\n hideStatusIndicator?: boolean;\n onValue?: (value: any) => void;\n onBlur?: (event: Event) => void;\n}\n\nexport const InputPassword: FunctionComponent<InputPasswordProps> = ({\n placeholder,\n floatingLabel,\n children,\n name,\n required,\n className,\n minLength,\n autoComplete,\n defaultValue = '',\n hideStatusIndicator = false,\n uniqueSymbolsStatus,\n validateLengthConfig,\n requiredCharacterClasses,\n errorMessage,\n onValue,\n onBlur,\n ...props\n}) => {\n const translations = useText({\n placeholder: 'Dropin.InputPassword.placeholder',\n floatingLabel: 'Dropin.InputPassword.floatingLabel',\n buttonShowTitle: 'Dropin.InputPassword.buttonShowTitle',\n buttonHideTitle: 'Dropin.InputPassword.buttonHideTitle',\n });\n\n const [showPassword, setShowPassword] = useState(false);\n\n const toggleShowPassword = useCallback(() => {\n setShowPassword((prevShowPassword) => !prevShowPassword);\n }, []);\n\n const title = !showPassword\n ? translations.buttonShowTitle\n : translations.buttonHideTitle;\n\n return (\n <div\n data-testid=\"passwordFieldInput\"\n className={classes([\n 'dropin-input-password',\n ['dropin-input-password--error', errorMessage],\n className,\n ])}\n {...props}\n >\n <Field error={errorMessage}>\n <Input\n autoComplete={autoComplete}\n name={name ?? 'password'}\n type={!showPassword ? 'password' : 'text'}\n placeholder={placeholder || translations.placeholder}\n floatingLabel={floatingLabel || translations.floatingLabel}\n aria-label={translations.placeholder}\n aria-required={required || true}\n aria-invalid={!!errorMessage}\n aria-describedby=\"password-feedback\"\n required={required || false}\n value={defaultValue}\n onValue={onValue}\n icon={<Locker />}\n onBlur={onBlur}\n data-testid=\"passwordInput\"\n />\n </Field>\n <Button\n aria-label={title}\n title={title}\n type={'button'}\n data-testid=\"toggle-password-icon\"\n variant=\"tertiary\"\n className={classes([\n 'dropin-input-password__eye-icon',\n `dropin-input-password__eye-icon--${showPassword ? 'show' : 'hide'}`,\n className,\n ])}\n onClick={toggleShowPassword}\n >\n <Icon\n focusable={false}\n aria-hidden={showPassword}\n source={!showPassword ? EyeClose : Eye}\n />\n </Button>\n {hideStatusIndicator ? null : (\n <PasswordStatusIndicator\n minLength={minLength}\n requiredCharacterClasses={requiredCharacterClasses}\n validateLengthConfig={validateLengthConfig}\n uniqueSymbolsStatus={uniqueSymbolsStatus}\n />\n )}\n {children}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/TextArea/TextArea.css';\nimport { useRef, useEffect, useId } from 'preact/hooks';\n\nexport interface TextAreaProps extends HTMLAttributes<HTMLTextAreaElement> {\n id?: string;\n name?: string;\n disabled?: boolean;\n errorMessage?: string;\n}\n\nexport const TextArea: FunctionComponent<TextAreaProps> = ({\n disabled,\n name = '',\n errorMessage,\n value,\n label,\n className,\n onChange,\n onBlur,\n ...props\n}) => {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const id = useId();\n const error = !!errorMessage?.length;\n\n useEffect(() => {\n const textArea = textareaRef.current;\n if (!textArea) return;\n\n textArea.style.height = 'auto';\n textArea.style.height = `${textArea.scrollHeight}px`;\n }, [value]);\n\n return (\n <div\n className={classes(['dropin-textarea-container', className])}\n data-testid=\"dropin-textarea-container\"\n >\n <textarea\n ref={textareaRef}\n data-testid=\"dropin-textarea-field\"\n className={classes([\n 'dropin-textarea',\n [`dropin-textarea--error`, error],\n ['dropin-textarea--disabled', !!disabled],\n ])}\n id={id}\n placeholder={label}\n name={name}\n value={value}\n disabled={disabled}\n onBlur={onBlur}\n onChange={onChange}\n {...props}\n />\n <label\n htmlFor={id}\n className={classes([\n `dropin-textarea__label--floating`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {label}\n </label>\n {error ? (\n <div\n className={classes([\n `dropin-textarea__label--floating--text`,\n [`dropin-textarea__label--floating--error`, error],\n ])}\n >\n {errorMessage}\n </div>\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Divider/Divider.css';\n\nexport interface DividerProps extends HTMLAttributes<HTMLHRElement> {\n variant?: 'primary' | 'secondary';\n}\n\nexport const Divider: FunctionComponent<DividerProps> = ({\n variant = 'primary',\n className,\n}) => {\n return (\n <hr\n role=\"separator\"\n className={classes([\n 'dropin-divider',\n `dropin-divider--${variant}`,\n className,\n ])}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes, getPriceFormatter } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Price/Price.css';\n\nexport interface PriceProps\n extends Omit<HTMLAttributes<HTMLSpanElement>, 'size'> {\n amount?: number;\n currency?: string | null;\n locale?: string;\n formatOptions?: {\n [key: string]: any;\n };\n variant?: 'default' | 'strikethrough';\n weight?: 'bold' | 'normal';\n sale?: boolean;\n size?: 'small' | 'medium' | 'large';\n}\n\nexport const Price: FunctionComponent<PriceProps> = ({\n amount = 0,\n currency,\n locale,\n variant = 'default',\n weight = 'bold',\n className,\n children,\n sale = false,\n formatOptions = {},\n size = 'small',\n ...props\n}) => {\n const formattedAmount = useMemo(() => {\n const formatter = getPriceFormatter({ currency, locale, formatOptions });\n return formatter.format(amount);\n }, [amount, currency, locale, formatOptions]);\n\n return (\n <span\n {...props}\n className={classes([\n 'dropin-price',\n `dropin-price--${variant}`,\n `dropin-price--${size}`,\n `dropin-price--${weight}`,\n ['dropin-price--sale', sale],\n className,\n ])}\n >\n {formattedAmount}\n </span>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/RadioButton/RadioButton.css';\n\nexport interface RadioButtonProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n size?: 'medium' | 'large';\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n description?: string;\n busy?: boolean;\n}\n\nexport const RadioButton: FunctionComponent<RadioButtonProps> = ({\n name,\n label,\n value,\n size = 'medium',\n checked = false,\n disabled = false,\n error = false,\n description = '',\n busy = false,\n className,\n children,\n ...props\n}) => {\n return (\n <label\n className={classes([\n className,\n 'dropin-radio-button',\n ['dropin-radio-button--error', error],\n ['dropin-radio-button--disabled', disabled],\n ])}\n >\n <input\n name={name}\n value={value}\n checked={checked}\n disabled={disabled}\n type=\"radio\"\n className={classes([\n 'dropin-radio-button__input',\n ['dropin-radio-button__input--error', error],\n ['dropin-radio-button__input--disabled', disabled],\n ])}\n aria-busy={busy}\n {...props}\n />\n <span\n className={classes([\n 'dropin-radio-button__label',\n `dropin-radio-button__label--${size}`,\n ['dropin-radio-button__label--error', error],\n ['dropin-radio-button__label--disabled', disabled],\n ])}\n >\n {label}\n </span>\n <span\n className={classes([\n 'dropin-radio-button__description',\n `dropin-radio-button__description--${size}`,\n ['dropin-radio-button__description--disabled', disabled],\n ])}\n >\n {description}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Button/Button.css';\n\nexport interface ButtonProps\n extends Omit<\n HTMLAttributes<HTMLButtonElement | HTMLAnchorElement>,\n 'size' | 'icon'\n > {\n variant?: 'primary' | 'secondary' | 'tertiary';\n size?: 'medium' | 'large';\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n active?: boolean;\n activeChildren?: ComponentChildren;\n activeIcon?: VNode<HTMLAttributes<SVGSVGElement>>;\n href?: string;\n type?: 'button' | 'submit' | 'reset';\n}\n\nexport const Button: FunctionComponent<ButtonProps> = ({\n value,\n variant = 'primary',\n size = 'medium',\n icon,\n className,\n children,\n disabled = false,\n active = false,\n activeChildren,\n activeIcon,\n href,\n ...props\n}) => {\n let buttonType = 'dropin-button';\n\n if (\n (icon && !children) ||\n (icon && active && !activeChildren) ||\n (!icon && active && activeIcon)\n ) {\n buttonType = 'dropin-iconButton';\n }\n\n if (active && activeChildren) {\n buttonType = 'dropin-button';\n }\n\n className = classes([\n buttonType,\n `${buttonType}--${size}`,\n `${buttonType}--${variant}`,\n [`${buttonType}--${variant}--disabled`, disabled],\n children && icon && `${buttonType}--with-icon`,\n !children && activeChildren && icon && `${buttonType}--with-icon`,\n active && activeIcon && `${buttonType}--with-icon`,\n className,\n ]);\n\n const iconClassName = classes([\n 'dropin-button-icon',\n `dropin-button-icon--${variant}`,\n [`dropin-button-icon--${variant}--disabled`, disabled],\n icon?.props.className,\n ]);\n\n const attributes = href\n ? {\n node: <a />,\n role: 'link',\n href,\n ...props,\n disabled,\n active,\n onKeyDown: (event: KeyboardEvent) => {\n if (disabled) {\n event.preventDefault();\n }\n },\n tabIndex: disabled ? -1 : 0,\n }\n : {\n node: <button />,\n role: 'button',\n ...props,\n value,\n disabled,\n active,\n };\n\n return (\n <VComponent {...attributes} className={className}>\n {icon && !active && <VComponent node={icon} className={iconClassName} />}\n\n {activeIcon && active && (\n <VComponent node={activeIcon} className={iconClassName} />\n )}\n\n {children &&\n !active &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n\n {active &&\n activeChildren &&\n (typeof activeChildren === 'string' ? (\n <span>{activeChildren}</span>\n ) : (\n activeChildren\n ))}\n </VComponent>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Icon } from '@adobe-commerce/elsie/components';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useEffect, useState } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/Picker/Picker.css';\n\ntype PickerValue = string | null;\n\nexport interface PickerOption {\n value: PickerValue;\n text?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n disabled?: boolean;\n}\n\nexport interface PickerProps\n extends Omit<HTMLAttributes<HTMLSelectElement>, 'value' | 'size' | 'icon'> {\n id?: string;\n name?: string;\n value?: PickerValue;\n placeholder?: string;\n variant?: 'primary' | 'secondary';\n size?: 'medium' | 'large';\n floatingLabel?: string;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n options?: PickerOption[];\n defaultOption?: PickerOption;\n disabled?: boolean;\n error?: boolean;\n handleSelect?: (event: Event) => void;\n}\n\nfunction findSelectedValue(\n value?: PickerValue,\n defaultOption?: PickerOption,\n placeholder?: string,\n floatingLabel?: string,\n firstAvailableOption?: PickerOption\n) {\n if (value) return value;\n if (defaultOption) return defaultOption.value;\n if (placeholder || floatingLabel) return '';\n if (firstAvailableOption) return firstAvailableOption.value;\n return null;\n}\n\nexport const Picker: FunctionComponent<PickerProps> = ({\n name,\n value = null,\n options,\n variant = 'primary',\n floatingLabel,\n size = 'medium',\n handleSelect = () => {},\n disabled = false,\n error = false,\n placeholder,\n defaultOption,\n icon,\n className,\n id,\n ...props\n}) => {\n const uniqueId = id ?? name ?? `dropin-picker-${Math.random().toString(36)}`;\n const isRequired = !!props?.required;\n\n // find the first option that is not disabled\n const firstAvailableOption = options?.find((option) => !option.disabled);\n\n const [selectedValue, setSelectedValue] = useState<PickerValue>(() => {\n return findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n );\n });\n\n useEffect(() => {\n setSelectedValue(\n findSelectedValue(\n value,\n defaultOption,\n placeholder,\n floatingLabel,\n firstAvailableOption\n )\n );\n }, [value, defaultOption, placeholder, floatingLabel, firstAvailableOption]);\n\n const handleOptionClick = (event: Event) => {\n const { options, value } = event.target as HTMLSelectElement;\n\n for (const element of options) {\n if (element.selected) {\n setSelectedValue(value);\n handleSelect(event);\n }\n }\n };\n\n const optionsListItems = options?.map((option) => {\n const { value, text, disabled } = option;\n const selected = value === selectedValue;\n\n return (\n <option\n value={value as string}\n key={value}\n selected={selected}\n disabled={disabled}\n className={classes(['dropin-picker__option'])}\n >\n {text}\n </option>\n );\n });\n\n const isSelected = !!selectedValue;\n\n const hasToDisplayPlaceholder = () => {\n return (!isRequired || !isSelected) && (floatingLabel || placeholder);\n };\n\n return (\n <div\n className={classes([\n className,\n 'dropin-picker',\n `dropin-picker__${size}`,\n ['dropin-picker__floating', !!floatingLabel],\n ['dropin-picker__selected', isSelected],\n ['dropin-picker__error', error],\n ['dropin-picker__disabled', disabled],\n ['dropin-picker__icon', icon],\n ])}\n >\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon.props}\n className={'dropin-picker__icon--placeholder'}\n />\n )}\n\n <select\n id={uniqueId}\n className={classes([\n 'dropin-picker__select',\n `dropin-picker__select--${variant}`,\n `dropin-picker__select--${size}`,\n ['dropin-picker__select--floating', !!floatingLabel],\n ])}\n name={name}\n aria-label={name}\n disabled={disabled}\n onChange={handleOptionClick}\n {...props}\n >\n {hasToDisplayPlaceholder() && (\n <option\n selected={!isSelected}\n value={''}\n key={value}\n className={classes([\n 'dropin-picker__option dropin-picker__placeholder',\n ])}\n >\n {floatingLabel ?? placeholder}\n </option>\n )}\n\n {optionsListItems}\n </select>\n\n <Icon\n source={ChevronDown}\n size=\"24\"\n stroke=\"2\"\n className=\"dropin-picker__chevronDown\"\n />\n\n {floatingLabel && isSelected && (\n <label\n htmlFor={id}\n className={classes(['dropin-picker__floatingLabel', !!floatingLabel])}\n >\n {floatingLabel}\n </label>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport '@adobe-commerce/elsie/components/Field/Field.css';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nexport interface FieldProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n label?: string;\n error?: string;\n hint?: string;\n success?: string;\n disabled?: boolean;\n children?: VNode;\n size?: 'medium' | 'large';\n}\n\nexport const Field: FunctionComponent<FieldProps> = ({\n className,\n label,\n error,\n hint,\n success,\n size = 'medium',\n disabled = false,\n children,\n ...props\n}) => {\n const id =\n children?.props?.id ?? `dropin-field-${Math.random().toString(36)}`;\n\n let fieldContent: VNode | string | null = null;\n\n if (children && typeof children !== 'string') {\n fieldContent = (\n <VComponent\n node={children}\n id={id}\n key={children.key}\n disabled={disabled}\n size={size}\n error={!!error}\n success={!!success && !error}\n />\n );\n }\n\n\n return (\n <div {...props} className={classes(['dropin-field', className])}>\n {label && (\n <label\n className={classes([\n 'dropin-field__label',\n ['dropin-field__label--disabled', disabled],\n `dropin-field__label--${size}`,\n ])}\n htmlFor={id}\n >\n {label}\n </label>\n )}\n\n <div className={classes(['dropin-field__content'])}>\n {fieldContent}\n </div>\n\n <div\n className={classes([\n 'dropin-field__hint',\n [`dropin-field__hint--${size}`, size],\n ['dropin-field__hint--error', !!error],\n ['dropin-field__hint--success', !!success && !error],\n ['dropin-field__hint--disabled', !!disabled],\n ])}\n >\n {error || success || hint}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButton/ActionButton.css';\n\nexport interface ActionButtonProps\n extends Omit<HTMLAttributes<HTMLButtonElement>, 'icon'> {\n children?: ComponentChildren;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n active?: boolean;\n disabled?: boolean;\n}\n\nexport const ActionButton: FunctionComponent<ActionButtonProps> = ({\n icon,\n className,\n children,\n active = false,\n disabled = false,\n ...props\n}) => {\n return (\n <button\n role=\"button\"\n disabled={disabled}\n {...props}\n className={classes([\n 'dropin-action-button',\n ['dropin-action-button--active', active],\n ['dropin-action-button--disabled', disabled],\n className,\n ])}\n >\n {icon && (\n <VComponent\n node={icon}\n className={classes(['dropin-action-button-icon'])}\n />\n )}\n {children &&\n (typeof children === 'string' ? <span>{children}</span> : children)}\n </button>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode, cloneElement } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ActionButtonGroup/ActionButtonGroup.css';\nimport { useCallback, useState } from 'preact/hooks';\nimport { Children } from 'react';\nimport { ActionButtonProps } from '@adobe-commerce/elsie/components/ActionButton';\n\nexport interface ActionButtonGroupOption {\n value: string | null;\n text: string;\n icon?: VNode<SVGElement>;\n disabled?: boolean;\n}\n\nexport interface ActionButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n activeOption?: string;\n disabled?: boolean;\n dividers?: boolean;\n children: VNode<ActionButtonProps>[] | VNode<ActionButtonProps>;\n handleSelect?(value: string): void;\n}\n\nexport const ActionButtonGroup: FunctionComponent<ActionButtonGroupProps> = ({\n className,\n variant = 'primary',\n activeOption,\n disabled = false,\n dividers = true,\n children,\n handleSelect,\n ...props\n}) => {\n const [activeOptionState, setActiveOptionState] = useState(activeOption);\n\n const handleClick = useCallback(\n (option: any) => {\n const isOptionDisabled = disabled || option.props.disabled;\n if (!isOptionDisabled) {\n setActiveOptionState(option.props.value);\n if (handleSelect) {\n handleSelect(option.props.value);\n }\n }\n },\n [handleSelect, setActiveOptionState, disabled]\n );\n\n const buttonGroupOptions = Children.map(\n children,\n (child: VNode<ActionButtonProps>) => {\n const isOptionDisabled = disabled || child.props.disabled;\n const isOptionActive = child.props.value === activeOptionState;\n return cloneElement(child, {\n disabled: isOptionDisabled,\n active: isOptionActive,\n onClick: () => handleClick(child),\n className: classes([\n 'dropin-action-button-group__option',\n `dropin-action-button-group__option--${variant}`,\n ['dropin-action-button-group__option--active', isOptionActive],\n ['dropin-action-button-group__option--with-dividers', dividers],\n ]),\n });\n }\n );\n\n return (\n <div\n role=\"group\"\n {...props}\n className={classes([\n 'dropin-action-button-group',\n `dropin-action-button-group--${variant}`,\n className,\n ])}\n >\n {buttonGroupOptions}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Card/Card.css';\n\nexport interface CardProps extends HTMLAttributes<HTMLDivElement> {\n variant?: 'primary' | 'secondary';\n children: ComponentChildren | ComponentChildren[];\n}\n\nexport const Card: FunctionComponent<CardProps> = ({\n variant = 'primary',\n className,\n children,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes(['dropin-card', `dropin-card--${variant}`, className])}\n >\n <div class=\"dropin-card__content\">{children}</div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { ChangeEvent, HTMLAttributes, useRef, useState } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Check } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport '@adobe-commerce/elsie/components/Checkbox/Checkbox.css';\nimport { useEffect } from 'preact/hooks';\n\nexport interface CheckboxProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'size' | 'label'> {\n name: string;\n size?: 'medium' | 'large';\n disabled?: boolean;\n error?: boolean;\n label?: string | VNode | VNode[];\n description?: string | VNode | VNode[];\n}\n\nexport const Checkbox: FunctionComponent<CheckboxProps> = ({\n name,\n value,\n size = 'medium',\n disabled = false,\n error = false,\n label = '',\n description = '',\n className,\n checked,\n ...props\n}) => {\n const [isChecked, setIsChecked] = useState(\n checked === undefined ? false : checked\n );\n const ref = useRef<HTMLInputElement>(null);\n\n const handleCheckboxChange = (e: ChangeEvent<HTMLInputElement>) => {\n props.onChange?.(e);\n setIsChecked(e.currentTarget.checked);\n };\n\n const handleOnKeyDown = (e: KeyboardEvent) => {\n if (e.key === ' ') {\n e.preventDefault();\n ref?.current?.click();\n }\n };\n\n useEffect(() => {\n if (typeof checked === 'boolean') {\n setIsChecked(checked);\n }\n }, [checked]);\n\n return (\n <label\n className={classes([\n 'dropin-checkbox',\n ['dropin-checkbox--disabled', disabled],\n ])}\n >\n <input\n ref={ref}\n name={name}\n value={value}\n type=\"checkbox\"\n disabled={disabled}\n className={classes([\n 'dropin-checkbox__checkbox',\n ['dropin-checkbox__checkbox--error', error],\n className,\n ])}\n {...props}\n onChange={handleCheckboxChange}\n checked={isChecked}\n />\n\n <div className=\"dropin-checkbox__checkbox-icon\">\n {/*Zero-width space character, used to align checkbox properly*/}\n {'\\u200B'}\n <span\n aria-checked={isChecked ? 'true' : 'false'}\n aria-labelledby={`${name}-label`}\n aria-describedby={description ? `${name}-description` : undefined}\n className={classes([\n 'dropin-checkbox__box',\n ['dropin-checkbox__box--error', error],\n ['dropin-checkbox__box--disabled', disabled],\n ])}\n role=\"checkbox\"\n tabIndex={disabled ? -1 : 0}\n onKeyDown={handleOnKeyDown}\n >\n <Icon\n className={classes(['dropin-checkbox__checkmark'])}\n source={Check}\n size=\"16\"\n stroke=\"3\"\n />\n </span>\n </div>\n\n <div\n id={`${name}-label`}\n className={classes([\n 'dropin-checkbox__label',\n `dropin-checkbox__label--${size}`,\n ['dropin-checkbox__label--disabled', disabled],\n ])}\n >\n {label}\n </div>\n\n <div />\n {description && (\n <div\n id={`${name}-description`}\n role={'note'}\n className={classes([\n 'dropin-checkbox__description',\n `dropin-checkbox__description--${size}`,\n ['dropin-checkbox__description--disabled', disabled],\n ])}\n >\n {description}\n </div>\n )}\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useCallback } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ColorSwatch/ColorSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ColorSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label' | 'size'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n size?: 'medium' | 'large';\n color?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ColorSwatch: FunctionComponent<ColorSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n size = 'medium',\n color,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const isValidColor = (color: string) => {\n const colorStyle = new Option().style;\n colorStyle.color = color;\n return colorStyle.color !== ''; // Returns true if the browser accepts this as a valid color\n };\n\n const defaultColor = 'var(--color-gray-300);';\n\n const validColor = color && isValidColor(color) ? color : defaultColor;\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n return (\n <label\n className={classes([\n 'dropin-color-swatch__container',\n `dropin-color-swatch__container--${size}`,\n className,\n ])}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-color-swatch',\n ['dropin-color-swatch--selected', selected],\n ['dropin-color-swatch--disabled', disabled],\n className,\n ])}\n />\n <span\n style={{ '--bg-color': validColor }}\n className={classes([\n 'dropin-color-swatch__span',\n ['dropin-color-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n />\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport {\n HTMLAttributes,\n useState,\n useEffect,\n useRef,\n useCallback,\n useMemo,\n} from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/TextSwatch/TextSwatch.css';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface TextSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label: string;\n groupAriaLabel?: string;\n value?: string;\n id: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const TextSwatch: FunctionComponent<TextSwatchProps> = ({\n className,\n name,\n value,\n label,\n groupAriaLabel,\n id,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n onValue,\n onUpdateError,\n ...props\n}) => {\n // i18n\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const [isOverflowing, setIsOverflowing] = useState(false);\n const spanRef = useRef<HTMLLabelElement>(null);\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n useEffect(() => {\n if (\n spanRef.current &&\n spanRef.current.scrollWidth > spanRef.current.clientWidth\n ) {\n setIsOverflowing(true);\n }\n }, [label]);\n\n const uniqueId = useMemo(() => id ?? `${name}_${id}_${Math.random().toString(36)}`, [name, id]);\n\n return (\n <div\n className=\"dropin-text-swatch__container\"\n {...(isOverflowing ? { 'data-tooltip': label } : {})}\n >\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={uniqueId}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-text-swatch',\n ['dropin-text-swatch--selected', selected],\n ['dropin-text-swatch--disabled', disabled],\n className,\n ])}\n />\n <label\n htmlFor={uniqueId}\n ref={spanRef}\n className={classes([\n 'dropin-text-swatch__label',\n ['dropin-text-swatch__label--out-of-stock', outOfStock],\n className,\n ])}\n >\n {label}\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/ProgressSpinner/ProgressSpinner.css';\n\n/**\n * @param size this is the size of the spinner ranging in [12px, 24px, 36px, 48px]\n * @param stroke this is the stroke of the spinner ranging in [1px, 2px, 3px, 4px]\n */\nexport interface ProgressSpinnerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n ariaLabel?: string;\n size?: 'small' | 'medium' | 'big' | 'large';\n stroke?: '1' | '2' | '3' | '4';\n}\n\nexport const ProgressSpinner: FunctionComponent<ProgressSpinnerProps> = ({\n ariaLabel,\n size = 'small',\n stroke = '4',\n children,\n className,\n style,\n ...props\n}) => {\n const commonClasses = [\n 'dropin-progress-spinner',\n `dropin-progress-spinner--shape-size-${size}`,\n `dropin-progress-spinner--shape-stroke-${stroke}`,\n ];\n\n const translations = useText({\n updating: 'Dropin.ProgressSpinner.updating.label',\n updatingChildren: 'Dropin.ProgressSpinner.updatingChildren.label',\n });\n\n const handleAriaLabel = () => {\n if (ariaLabel) return ariaLabel;\n return children ? translations.updatingChildren : translations.updating;\n };\n\n return children ? (\n // if we provide children to this component, it should act as a provider in order to add background with low opacity\n <div\n {...props}\n className={classes(['dropin-progress-spinner-provider'])}\n aria-live=\"polite\"\n role=\"status\"\n >\n <div aria-hidden={true}>{children}</div>\n <div\n aria-label={handleAriaLabel()}\n role=\"status\"\n className={classes(['dropin-progress-spinner-background', className])}\n style={style}\n />\n <div\n className={classes([\n 'dropin-progress-spinner-with-provider',\n ...commonClasses,\n ])}\n aria-hidden={true}\n />\n </div>\n ) : (\n // if there are no children, it should be able to be standalone and have no background\n <div\n {...props}\n className={classes([className, ...commonClasses])}\n aria-live=\"polite\"\n role=\"status\"\n aria-label={handleAriaLabel()}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useCallback, JSX, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ImageSwatch/ImageSwatch.css';\nimport { Image, ImageProps } from '@adobe-commerce/elsie/components/Image';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface ImageNodeRenderProps extends ImageProps {\n imageSwatchContext: {\n disabled?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n selected?: boolean;\n value?: string;\n label?: string;\n groupAriaLabel?: string;\n name?: string;\n id?: string;\n };\n}\n\nexport interface ImageSwatchProps\n extends Omit<HTMLAttributes<HTMLInputElement>, 'label'> {\n name?: string;\n label?: string;\n groupAriaLabel?: string;\n id?: string;\n src: string;\n alt?: string;\n value?: string;\n disabled?: boolean;\n selected?: boolean;\n outOfStock?: boolean;\n multi?: boolean;\n imageNode?: VNode | ((props: ImageNodeRenderProps) => JSX.Element);\n onValue?: (value: any) => void;\n onUpdateError?: (error: Error) => void;\n}\n\nexport const ImageSwatch: FunctionComponent<ImageSwatchProps> = ({\n className,\n name,\n value,\n id,\n label,\n groupAriaLabel,\n src,\n alt,\n disabled = false,\n selected = false,\n outOfStock = false,\n multi = false,\n imageNode,\n onValue,\n onUpdateError,\n ...props\n}) => {\n const outOfStockLabel = useText('Dropin.Swatches.outOfStock.label').label;\n const selectedLabel = useText('Dropin.Swatches.selected.label').label;\n const swatchLabel = useText('Dropin.Swatches.swatch.label').label;\n\n const onValueHandler = useCallback(\n async (newValue: any) => {\n if (onValue) {\n try {\n await onValue(newValue);\n } catch (e) {\n if (onUpdateError) {\n onUpdateError(e as Error);\n }\n }\n }\n },\n [onValue, onUpdateError]\n );\n\n const handleOnValue = (e: Event) => {\n const input = e.target as HTMLInputElement;\n\n onValueHandler(input.value);\n };\n\n const handleAriaLabel = () => {\n if (outOfStock) return `${groupAriaLabel}: ${label} ${outOfStockLabel}`;\n if (selected) return `${groupAriaLabel}: ${label} ${selectedLabel}`;\n return `${groupAriaLabel}: ${label} ${swatchLabel}`;\n };\n\n const imageProps: ImageProps = useMemo(() => {\n return {\n src,\n alt,\n loading: 'lazy',\n params: { width: 100, fit: 'bounds', crop: true },\n onError: (e: any) => (e.target.style.display = 'none'),\n };\n }, [src, alt]);\n\n return (\n <label className={classes(['dropin-image-swatch__container', className])}>\n <input\n type={multi ? 'checkbox' : 'radio'}\n name={name}\n id={id}\n value={value}\n aria-label={handleAriaLabel()}\n checked={selected}\n disabled={disabled}\n onChange={handleOnValue}\n {...props}\n className={classes([\n 'dropin-image-swatch',\n ['dropin-image-swatch--selected', selected],\n ['dropin-image-swatch--disabled', disabled],\n className,\n ])}\n />\n\n <span\n className={classes([\n 'dropin-image-swatch__span',\n ['dropin-image-swatch__span--out-of-stock', outOfStock],\n className,\n ])}\n >\n {typeof imageNode === 'function' ? (\n imageNode({\n ...imageProps,\n imageSwatchContext: {\n disabled,\n outOfStock,\n selected,\n value,\n label,\n groupAriaLabel,\n name,\n id,\n },\n })\n ) : imageNode || (\n <Image\n {...imageProps}\n className={classes(['dropin-image-swatch__content'])}\n />\n )}\n </span>\n </label>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useState, useEffect } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { Divider, Icon, IconNode } from '@adobe-commerce/elsie/components';\nimport { Add, Minus } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Accordion/Accordion.css';\nexport interface AccordionSectionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n defaultOpen?: boolean;\n actionIconPosition?: 'left' | 'right';\n ariaLabelTitle: string;\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n renderContentWhenClosed?: boolean;\n onStateChange?: (open: boolean) => void;\n}\n\nexport const AccordionSection: FunctionComponent<AccordionSectionProps> = ({\n className,\n children,\n title,\n ariaLabelTitle,\n secondaryText,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n iconLeft = Add,\n showIconLeft = false,\n renderContentWhenClosed = true,\n defaultOpen,\n onStateChange,\n ...props\n}) => {\n const [open, setOpen] = useState<boolean>(false);\n const onClickHandler = (e: { stopImmediatePropagation: () => void }) => {\n e.stopImmediatePropagation();\n\n const next = !open;\n setOpen(next);\n onStateChange?.(next);\n };\n\n useEffect(() => {\n if (typeof defaultOpen !== 'undefined') {\n setOpen(defaultOpen);\n }\n }, [defaultOpen]);\n\n const buttonLabel = useText(\n `Dropin.Accordion.${open ? 'close' : 'open'}.label`\n ).label;\n\n const openIcon = (\n <Icon\n source={iconOpen}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__open-icon'}\n />\n );\n\n const closeIcon = (\n <Icon\n source={iconClose}\n size=\"24\"\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n className={'dropin-accordion-section__close-icon'}\n />\n );\n\n const leftIcon = <Icon source={iconLeft} size=\"24\" />;\n\n return (\n <div\n {...props}\n className={classes(['dropin-accordion-section', className])}\n >\n <div className={'dropin-accordion-section__heading'}>\n <div\n className={'dropin-accordion-section__flex'}\n onClick={onClickHandler}\n onKeyPress={onClickHandler}\n role=\"button\"\n aria-label={`${buttonLabel} ${ariaLabelTitle ?? title}`}\n tabIndex={0}\n >\n <div className={'dropin-accordion-section__title-container'}>\n {actionIconPosition === 'left' && (open ? closeIcon : openIcon)}\n\n {showIconLeft && leftIcon}\n\n <h3 className={'dropin-accordion-section__title'}>{title}</h3>\n </div>\n </div>\n\n <div className={'dropin-accordion-section__secondary-text-container'}>\n {secondaryText && (\n <h4 className={'dropin-accordion-section__secondary-text'}>\n {secondaryText}\n </h4>\n )}\n\n {actionIconPosition === 'right' && (open ? closeIcon : openIcon)}\n </div>\n </div>\n\n <div\n className={'dropin-accordion-section__content-container'}\n style={{ display: open ? 'grid' : 'none' }}\n >\n {(open || (renderContentWhenClosed && !open)) && children}\n </div>\n </div>\n );\n};\n\nexport interface AccordionProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n actionIconPosition?: 'left' | 'right';\n iconOpen?: IconNode;\n iconClose?: IconNode;\n iconLeft?: IconNode;\n showIconLeft?: boolean;\n secondaryText?: string | VNode<HTMLAttributes<HTMLSpanElement>>;\n children: VNode<AccordionSectionProps>[] | VNode<AccordionSectionProps>;\n}\n\nexport const Accordion: FunctionComponent<AccordionProps> = ({\n className,\n children,\n actionIconPosition = 'left',\n iconOpen = Add,\n iconClose = Minus,\n ...props\n}) => {\n const divider = <Divider variant=\"secondary\" />;\n\n const renderAccordionSection = (child: VNode<AccordionSectionProps>) => (\n <>\n <AccordionSection\n {...child.props}\n actionIconPosition={actionIconPosition}\n iconOpen={iconOpen}\n iconClose={iconClose}\n />\n {divider}\n </>\n );\n\n return (\n <div {...props} className={classes(['dropin-accordion', className])}>\n {[\n divider,\n ...(\n (Array.isArray(children)\n ? children\n : [children]) as VNode<AccordionSectionProps>[]\n ).map(renderAccordionSection),\n ]}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\n\nimport '@adobe-commerce/elsie/components/InLineAlert/InLineAlert.css';\nexport interface InLineAlertProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon'> {\n variant?: 'primary' | 'secondary';\n heading: string;\n description?: string;\n type?: 'error' | 'warning' | 'success';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n additionalActions?: Array<{\n label: string;\n onClick: (event: Event) => void;\n }>;\n onDismiss?: (event: Event) => void;\n itemList?: VNode;\n actionButtonPosition?: 'top' | 'bottom';\n}\n\nexport const InLineAlert: FunctionComponent<InLineAlertProps> = ({\n variant = 'primary',\n className,\n type = 'warning',\n additionalActions,\n onDismiss,\n heading,\n description,\n icon,\n itemList,\n actionButtonPosition,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n 'dropin-in-line-alert',\n `dropin-in-line-alert--${type}`,\n `dropin-in-line-alert--${variant}`,\n className,\n ])}\n >\n <div className={'dropin-in-line-alert__heading'}>\n <div className={'dropin-in-line-alert__title-container'}>\n {icon && (\n <VComponent node={icon} className={'dropin-in-line-alert__icon'} />\n )}\n\n <span className={'dropin-in-line-alert__title'}>{heading}</span>\n </div>\n\n <div className={'dropin-in-line-alert__actions-container'}>\n {additionalActions &&\n (actionButtonPosition === 'top' ||\n (!actionButtonPosition && additionalActions.length <= 1)) && (\n <Button\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={\n additionalActions.length > 0\n ? additionalActions[0]?.onClick\n : undefined\n }\n aria-label={additionalActions[0]?.label}\n >\n {additionalActions[0]?.label}\n </Button>\n )}\n {onDismiss && (\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className={'dropin-in-line-alert__dismiss-button'}\n variant=\"tertiary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n )}\n </div>\n </div>\n\n {description && (\n <p className={'dropin-in-line-alert__description'}>{description}</p>\n )}\n <div className={'dropin-in-line-alert__item-list-container'}>\n {itemList && (\n <VComponent\n node={itemList}\n className={classes(['dropin-in-line-alert__item-list'])}\n />\n )}\n </div>\n {additionalActions &&\n (actionButtonPosition === 'bottom' ||\n (!actionButtonPosition && additionalActions.length > 1)) && (\n <div className={'dropin-in-line-alert__additional-actions-container'}>\n {additionalActions.map((action) => (\n <Button\n key={action.label}\n variant=\"tertiary\"\n className={'dropin-in-line-alert__additional-action'}\n onClick={action.onClick}\n >\n {action.label}\n </Button>\n ))}\n </div>\n )}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren } from 'preact';\nimport { FunctionComponent, useLayoutEffect, useRef } from 'preact/compat';\n\ninterface PortalProps {\n children: ComponentChildren;\n}\n\nexport const Portal: FunctionComponent<PortalProps> = ({ children }) => {\n const portalRoot = useRef<HTMLDivElement | null>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n\n useLayoutEffect(() => {\n // Create portal root if it doesn't exist\n if (!portalRoot.current) {\n portalRoot.current = document.createElement('div');\n portalRoot.current.setAttribute('data-portal-root', '');\n document.body.appendChild(portalRoot.current);\n }\n\n // Move content to portal root\n if (contentRef.current && portalRoot.current) {\n portalRoot.current.appendChild(contentRef.current);\n }\n\n // Cleanup\n return () => {\n if (portalRoot.current) {\n portalRoot.current.remove();\n portalRoot.current = null;\n }\n };\n }, []);\n\n // Return a div that contains the children\n return (\n <div ref={contentRef} className=\"dropin-design\">\n {children}\n </div>\n );\n}; ","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport {\n FunctionComponent,\n HTMLAttributes,\n useCallback,\n useEffect,\n} from 'preact/compat';\nimport { Button } from '../Button';\nimport { Close as CloseSVG } from '@adobe-commerce/elsie/icons';\nimport { VNode } from 'preact';\nimport { Portal } from '../Portal/Portal';\n\nimport '@adobe-commerce/elsie/components/Modal/Modal.css';\n\nexport interface ModalProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size' | 'title'> {\n size?: 'small' | 'medium' | 'full';\n title?: VNode;\n centered?: boolean;\n onClose?: () => void;\n backgroundDim?: boolean;\n clickToDismiss?: boolean;\n escapeToDismiss?: boolean;\n showCloseButton?: boolean;\n}\n\nexport const Modal: FunctionComponent<ModalProps> = ({\n size = 'small',\n title = null,\n centered = false,\n backgroundDim = true,\n clickToDismiss = true,\n escapeToDismiss = true,\n onClose,\n showCloseButton = true,\n className,\n children = null,\n ...props\n}) => {\n const handleOnClose = useCallback(() => {\n onClose?.();\n }, [onClose]);\n\n const translations = useText({\n modalCloseLabel: 'Dropin.Modal.Close.label',\n });\n\n // Close on background click\n useEffect(() => {\n const handleOutsideClick = (event: MouseEvent) => {\n const modal = document.querySelector('.dropin-modal');\n const modalBody = document.querySelector('.dropin-modal__body');\n\n if (\n clickToDismiss &&\n modal &&\n modalBody &&\n !modalBody.contains(event.target as Node)\n ) {\n handleOnClose();\n }\n };\n\n document.addEventListener('mousedown', handleOutsideClick);\n\n return () => {\n document.removeEventListener('mousedown', handleOutsideClick);\n };\n }, [handleOnClose, clickToDismiss]);\n\n // Close on ESC\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && escapeToDismiss) {\n handleOnClose();\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleOnClose, escapeToDismiss]);\n\n // Prevent document scrolling\n useEffect(() => {\n const scrollingElement = document.scrollingElement as HTMLElement;\n\n const defaultOverflowValue = scrollingElement.style.overflow;\n\n scrollingElement.style.overflow = 'hidden';\n\n return () => {\n scrollingElement.style.overflow = defaultOverflowValue;\n };\n }, []);\n\n return (\n <Portal>\n <div\n className={classes([\n 'dropin-modal',\n ['dropin-modal--dim', backgroundDim],\n ])}\n >\n <div\n {...props}\n className={classes([\n 'dropin-modal__body',\n [`dropin-modal__body--${size}`, size],\n className,\n ])}\n >\n <div\n className={classes([\n 'dropin-modal__header',\n ['dropin-modal__header-title', !!title],\n ])}\n >\n {title && (\n <div className={classes(['dropin-modal__header-title-content'])}>\n {title}\n </div>\n )}\n\n {showCloseButton && (\n <Button\n aria-label={translations.modalCloseLabel}\n variant=\"tertiary\"\n className=\"dropin-modal__header-close-button\"\n onClick={handleOnClose}\n icon={<CloseSVG />}\n />\n )}\n </div>\n\n <div\n className={classes([\n 'dropin-modal__content',\n ['dropin-modal__body--centered', centered],\n ])}\n >\n {children}\n </div>\n </div>\n </div>\n </Portal>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, useContext } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Button,\n CartItemSkeleton,\n Icon,\n Incrementer,\n UIContext,\n ProgressSpinner,\n Picker,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Trash } from '@adobe-commerce/elsie/icons';\n\nimport '@adobe-commerce/elsie/components/CartItem/CartItem.css';\n\nexport interface CartItemProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'loading'> {\n ariaLabel?: string;\n image?: VNode;\n title?: VNode;\n price?: VNode;\n 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 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 </div>\n\n {/* Footer */}\n {footer && (\n <VComponent\n node={footer}\n className={classes(['dropin-cart-item__footer'])}\n />\n )}\n </div>\n\n {/* Remove Item */}\n {removeContent ? (\n <VComponent node={removeContent} />\n ) : onRemove ? (\n <Button\n data-testid=\"cart-item-remove-button\"\n className={classes(['dropin-cart-item__remove'])}\n variant=\"tertiary\"\n onClick={() => onRemove?.()}\n icon={\n <Icon\n data-testid=\"cart-item-remove-icon\"\n source={Trash}\n size=\"24\"\n stroke=\"2\"\n viewBox=\"0 0 24 24\"\n aria-label={\n ariaLabel\n ? labels.remove?.replace('{product}', ariaLabel)\n : labels.removeDefault\n }\n />\n }\n disabled={updating}\n />\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\n\nexport const CartItemSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-cart-item dropin-cart-item-skeleton\">\n <Skeleton className=\"dropin-cart-item__skeleton dropin-cart-item__wrapper\">\n <div className=\"dropin-cart-item__image\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__title\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__sku\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__price\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__quantity\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n <div className=\"dropin-cart-item__total\">\n <SkeletonRow className=\"dropin-cart-item__skeleton__item\" />\n </div>\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, Children } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\n\nimport '@adobe-commerce/elsie/components/CartList/CartList.css';\n\nexport interface CartListProps extends HTMLAttributes<HTMLDivElement> {}\n\nexport const CartList: FunctionComponent<CartListProps> = ({\n className,\n children,\n ...props\n}) => {\n return (\n <div {...props} className={classes(['dropin-cart-list', className])}>\n <div\n className=\"dropin-cart-list__wrapper\"\n aria-live=\"assertive\"\n aria-relevant=\"all\"\n >\n {Children.map(children, (child, key) => {\n return (\n <div key={key} className=\"dropin-cart-list__item\">\n {child}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { HTMLAttributes, useMemo } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/PriceRange/PriceRange.css';\nimport { Price } from '@adobe-commerce/elsie/components/Price';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface PriceRangeProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n locale?: string;\n currency?: string;\n amount?: number; // simple product\n variant?: 'default' | 'strikethrough';\n minimumAmount?: number; // configurable product\n maximumAmount?: number; // configurable product\n display?: 'dash' | 'from to' | 'as low as';\n size?: 'small' | 'medium' | 'large';\n specialPrice?: number;\n sale?: boolean;\n}\n\nexport const PriceRange: FunctionComponent<PriceRangeProps> = ({\n className,\n children,\n locale,\n currency,\n amount,\n variant = 'default',\n minimumAmount,\n maximumAmount,\n size = 'small',\n display = 'dash',\n specialPrice,\n sale = false,\n ...props\n}) => {\n const isSimpleProduct = useMemo(\n () =>\n amount ||\n minimumAmount === maximumAmount ||\n (minimumAmount && !maximumAmount) ||\n (maximumAmount && !minimumAmount),\n [amount, maximumAmount, minimumAmount]\n );\n\n return (\n <div>\n {/* Simple product price or when configurable product minimum price equals to maximum price */}\n {isSimpleProduct ? (\n <div {...props} className={classes(['dropin-price-range', className])}>\n <Price\n amount={amount ?? minimumAmount ?? maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant={variant}\n sale={sale}\n />\n </div>\n ) : (\n <div {...props} className={classes(['dropin-price-range', className])}>\n {display === 'dash' ? (\n <Dashed\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'from to' ? (\n <FromTo\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n\n {display === 'as low as' ? (\n <SpecialPrice\n specialPrice={specialPrice}\n minimumAmount={minimumAmount}\n maximumAmount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={sale}\n />\n ) : null}\n </div>\n )}\n </div>\n );\n};\n\n// Variations\n\nfunction Dashed({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n return (\n <>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span className=\"dropin-price-range__separator\">-</span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction FromTo({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__from',\n `dropin-price-range__from--${size}`,\n ])}\n >\n {translations.from}\n </span>\n <Price\n amount={specialPrice ?? minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n sale={!!specialPrice && sale}\n />\n <span\n className={classes([\n 'dropin-price-range__to',\n `dropin-price-range__to--${size}`,\n ])}\n >\n {translations.to}\n </span>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n </>\n );\n}\n\nfunction SpecialPrice({\n specialPrice,\n minimumAmount,\n maximumAmount,\n currency,\n locale,\n size,\n sale,\n}: PriceRangeProps) {\n // Translations\n const translations = useText({\n from: 'Dropin.PriceRange.from.label',\n to: 'Dropin.PriceRange.to.label',\n asLowAs: 'Dropin.PriceRange.asLowAs.label',\n });\n\n return (\n <>\n <span\n className={classes([\n 'dropin-price-range__as-low-as',\n `dropin-price-range__as-low-as--${size}`,\n ])}\n >\n {translations.asLowAs}\n </span>\n {specialPrice ? (\n <div>\n <Price\n amount={maximumAmount}\n currency={currency}\n locale={locale}\n size={size}\n variant=\"strikethrough\"\n />\n <Price\n amount={specialPrice}\n currency={currency}\n locale={locale}\n size={size}\n className=\"dropin-price-range__special\"\n sale={!!specialPrice && sale}\n />\n </div>\n ) : (\n <Price\n amount={minimumAmount}\n currency={currency}\n locale={locale}\n size={size}\n />\n )}\n </>\n );\n}\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { HTMLAttributes } from 'preact/compat';\nimport { FunctionComponent, VNode } from 'preact';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/Breadcrumbs/Breadcrumbs.css';\n\nexport interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {\n categories: VNode[];\n separator?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const Breadcrumbs: FunctionComponent<BreadcrumbsProps> = ({\n className,\n categories,\n separator,\n ...props\n}) => {\n return (\n <>\n {categories?.length > 1 && (\n <nav\n role=\"navigation\"\n {...props}\n className={classes(['dropin-breadcrumbs__container', className])}\n >\n <ul className=\"dropin-breadcrumbs__items\">\n {categories?.map((category: VNode, index: number) => {\n return (\n <li\n key={index}\n className={classes([\n 'dropin-breadcrumbs__item',\n [\n 'dropin-breadcrumbs__item--last',\n index === categories.length - 1,\n ],\n ])}\n >\n <VComponent\n node={category}\n className=\"dropin-breadcrumbs__link\"\n />\n {!separator && index !== categories.length - 1 && (\n <span className=\"dropin-breadcrumbs__separator--default\">\n {' '}\n /{' '}\n </span>\n )}\n {separator && index !== categories.length - 1 && (\n <VComponent\n node={separator}\n className=\"dropin-breadcrumbs__separator--icon\"\n />\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n )}\n </>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/AlertBanner/AlertBanner.css';\nimport { Button, Icon } from '@adobe-commerce/elsie/components';\nimport { Close } from '@adobe-commerce/elsie/icons';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nexport interface AlertBannerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n variant: 'brand' | 'neutral' | 'success' | 'warning';\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n message: VNode;\n onDismiss: () => void;\n action?: {\n label: string;\n onClick: (event: Event) => void;\n };\n}\n\nexport const AlertBanner: FunctionComponent<AlertBannerProps> = ({\n className,\n variant,\n icon,\n message,\n onDismiss,\n action,\n ...props\n}) => {\n const translations = useText({\n dismiss: 'Dropin.InlineAlert.dismissLabel',\n });\n\n return (\n <div\n {...props}\n className={classes([\n className,\n 'dropin-alert-banner',\n `dropin-alert-banner--${variant}`,\n ])}\n >\n <div className={'dropin-alert-banner__content'}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n className={'dropin-alert-banner__icon'}\n />\n )}\n\n {/* Message */}\n <VComponent\n node={message}\n className={classes(['dropin-alert-banner__message'])}\n />\n </div>\n\n <div className={'dropin-alert-banner__actions'}>\n {action && (\n <Button\n variant=\"tertiary\"\n className={'dropin-alert-banner__action'}\n onClick={action.onClick}\n aria-label={action.label}\n >\n {action.label}\n </Button>\n )}\n\n <Button\n icon={<Icon source={Close} size=\"24\" stroke=\"2\" />}\n className=\"dropin-alert-banner__dismiss-button\"\n variant=\"primary\"\n onClick={onDismiss}\n aria-label={translations.dismiss}\n />\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes, JSX } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/IllustratedMessage/IllustratedMessage.css';\nimport { Card } from '@adobe-commerce/elsie/components';\n\nexport interface IllustratedMessageProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'icon' | 'action'> {\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n heading?: string;\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n message?: VNode<HTMLAttributes<HTMLElement>>;\n action?: VNode;\n variant?: 'primary' | 'secondary';\n}\n\nexport const IllustratedMessage: FunctionComponent<IllustratedMessageProps> = ({\n className,\n icon,\n heading,\n headingLevel = 2,\n message,\n action,\n variant = 'secondary',\n ...props\n}) => {\n const Heading =\n headingLevel >= 1 && headingLevel <= 6\n ? (`h${headingLevel}` as keyof JSX.IntrinsicElements)\n : 'h2';\n\n return (\n <div\n {...props}\n className={classes(['dropin-illustrated-message', className])}\n >\n <Card variant={variant}>\n {icon && (\n <VComponent\n node={icon}\n aria-hidden=\"true\"\n size=\"80\"\n className=\"dropin-illustrated-message__icon\"\n />\n )}\n\n {heading && (\n <Heading className=\"dropin-illustrated-message__heading\">\n {heading}\n </Heading>\n )}\n\n {message && (\n <VComponent\n node={message}\n className=\"dropin-illustrated-message__message\"\n />\n )}\n\n {action && (\n <VComponent\n node={action}\n className=\"dropin-illustrated-message__action\"\n />\n )}\n </Card>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ToggleButton/ToggleButton.css';\nimport { RadioButton } from '@adobe-commerce/elsie/components';\n\nexport interface ToggleButtonProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon' | 'label'> {\n label: string | VNode<HTMLAttributes<HTMLElement>>;\n name: string;\n value: string;\n busy?: boolean;\n disabled?: boolean;\n icon?:\n | VNode<HTMLAttributes<SVGSVGElement>>\n | VNode<HTMLAttributes<HTMLImageElement>>;\n onChange?: (value: string) => void;\n selected?: boolean;\n}\n\nexport const ToggleButton: FunctionComponent<ToggleButtonProps> = ({\n label,\n name,\n value,\n busy = false,\n disabled = false,\n children,\n className,\n icon,\n onChange,\n selected = true,\n ...props\n}) => {\n return (\n <div\n {...props}\n className={classes([\n 'dropin-toggle-button',\n className,\n ['dropin-toggle-button__selected', selected],\n ['dropin-toggle-button__disabled', disabled],\n ])}\n >\n <label className=\"dropin-toggle-button__actionButton\">\n <RadioButton\n label=\"\"\n name={name}\n value={value}\n checked={selected}\n disabled={disabled}\n onChange={() => onChange && onChange(value)}\n aria-label={name}\n busy={busy}\n className={classes([className, 'dropin-toggle-button__radioButton'])}\n />\n\n <span className=\"dropin-toggle-button__content\">\n {icon && (\n // @ts-ignore\n <icon.type\n {...icon?.props}\n className=\"dropin-toggle-button__icon\"\n />\n )}\n {label}\n </span>\n </label>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { ComponentChildren, FunctionComponent, VNode, JSX } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport { Divider } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/Header/Header.css';\n\nexport interface HeaderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'size'> {\n title: string;\n size?: 'medium' | 'large';\n divider?: boolean;\n cta?: VNode;\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n}\n\nconst Heading = ({\n level,\n className,\n children,\n}: {\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n className?: string;\n children?: ComponentChildren;\n}) => {\n const HeadingTag = level && level >= 1 && level <= 6\n ? `h${level}` as keyof JSX.IntrinsicElements\n : 'span';\n\n return <HeadingTag className={className}>{children as any}</HeadingTag>;\n};\n\nexport const Header: FunctionComponent<HeaderProps> = ({\n title = null,\n size = 'medium',\n cta,\n divider = true,\n className,\n level,\n ...props\n}) => {\n if (!title) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-header-container', className])}\n data-testid=\"dropin-header-container\"\n >\n <Heading\n className={classes([\n 'dropin-header-container__title',\n ['dropin-header-container__title--medium', size === 'medium'],\n ['dropin-header-container__title--large', size === 'large'],\n ])}\n level={level}\n >\n {title}\n </Heading>\n {cta ? (\n <VComponent node={cta} className=\"dropin-header-container__actions\" />\n ) : null}\n {divider ? (\n <Divider\n className={classes([\n 'dropin-header-container__divider',\n ['dropin-header-container__divider--medium', size === 'medium'],\n ['dropin-header-container__divider--large', size === 'large'],\n ])}\n />\n ) : null}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { HTMLAttributes } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/Tag/Tag.css';\n\nexport interface TagProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'icon'> {\n label?: string;\n children?: VNode | VNode[];\n}\n\nexport const Tag: FunctionComponent<TagProps> = ({\n label,\n className,\n children,\n ...props\n}) => {\n if (!label && !children) return null;\n\n return (\n <div\n {...props}\n className={classes(['dropin-tag-container', className])}\n data-testid=\"dropin-tag-container\"\n >\n {children ?? <span className=\"dropin-tag-container__label\">{label}</span>}\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/ContentGrid/ContentGrid.css';\n\nexport interface ContentGridProps extends HTMLAttributes<HTMLDivElement> {\n emptyGridContent: VNode;\n maxColumns?: number;\n columnWidth?: string;\n}\n\nexport const ContentGrid: FunctionComponent<ContentGridProps> = ({\n className,\n children,\n maxColumns,\n columnWidth = '1fr',\n emptyGridContent,\n ...props\n}) => {\n const hasChildren =\n !!children && (Array.isArray(children) ? children.length > 0 : true);\n\n const additionalStyles = hasChildren\n ? {\n gridTemplateColumns: `repeat(${maxColumns}, ${columnWidth})`,\n }\n : undefined;\n\n return (\n <div\n {...props}\n className={classes(['dropin-content-grid', className])}\n tabindex={0}\n >\n <div\n data-testid=\"content-grid-content\"\n className={classes([\n 'dropin-content-grid__content',\n ['dropin-content-grid__dynamic-columns-content', !maxColumns],\n ['dropin-content-grid__content--empty', !hasChildren],\n ])}\n style={additionalStyles}\n >\n {hasChildren ? children : emptyGridContent}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, JSX } from 'preact';\n\ntype BaseProps = {\n href?: string;\n type?: 'button';\n disabled?: boolean;\n};\n\nexport type PaginationButtonProps = BaseProps &\n (\n | Omit<JSX.HTMLAttributes<HTMLAnchorElement>, 'type'>\n | Omit<JSX.HTMLAttributes<HTMLButtonElement>, 'href'>\n );\n\nexport const PaginationButton: FunctionComponent<PaginationButtonProps> = (\n props\n) => {\n if (props.href) {\n \n const { href, disabled, ...anchorProps } = props;\n return (\n <a\n href={href}\n aria-disabled={disabled}\n {...(anchorProps as JSX.HTMLAttributes<HTMLAnchorElement>)}\n />\n );\n }\n \n const { type = 'button', ...buttonProps } = props;\n return (\n <button\n type={type}\n {...(buttonProps as JSX.HTMLAttributes<HTMLButtonElement>)}\n />\n );\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { classes, isNumber } from '@adobe-commerce/elsie/lib';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { ChevronDown } from '@adobe-commerce/elsie/icons';\nimport { Icon } from '@adobe-commerce/elsie/components/Icon';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport '@adobe-commerce/elsie/components/Pagination/Pagination.css';\nimport { PaginationButton } from './PaginationButton';\n\nexport interface PaginationProps {\n className?: string;\n currentPage?: number;\n totalPages?: number;\n onChange?: (currentPage: number, e?: Event) => void;\n routePage?: (page: number) => string;\n}\n\nexport type PaginationList = {\n page: number | string;\n isActive: boolean;\n label: number | string;\n};\n\nexport const Pagination: FunctionComponent<PaginationProps> = ({\n totalPages = 10,\n currentPage = 1,\n onChange,\n routePage,\n className,\n ...props\n}) => {\n const translations = useText({\n backwardButton: 'Dropin.Pagination.backwardButton.ariaLabel',\n forwardButton: 'Dropin.Pagination.forwardButton.ariaLabel',\n });\n\n const handleForward = useCallback((e?: Event) => {\n const nextPage = Math.min(currentPage + 1, totalPages);\n\n onChange?.(nextPage, e);\n }, [currentPage, onChange, totalPages]);\n\n const handleBackward = useCallback((e?: Event) => {\n const prevPage = Math.max(currentPage - 1, 1);\n\n onChange?.(prevPage, e);\n }, [currentPage, onChange]);\n\n const handleSetPage = useCallback(\n (currentPage: number | string, e?: Event) => {\n if (isNumber(currentPage)) {\n onChange?.(currentPage as number, e);\n }\n },\n [onChange]\n );\n\n const createPages = useCallback(\n (currentPage: number, totalPages: number): PaginationList[] => {\n let pages: PaginationList[] = [];\n\n const addPageRange = (start: number, end: number) => {\n for (let i = start; i <= end; i++) {\n pages.push({ page: i, isActive: i === currentPage, label: i });\n }\n };\n\n if (totalPages <= 5) {\n addPageRange(1, totalPages);\n } else if (currentPage <= 2) {\n addPageRange(1, 2);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n } else if (currentPage >= totalPages - 3) {\n addPageRange(totalPages - 4, totalPages);\n } else {\n addPageRange(currentPage - 1, currentPage);\n pages.push({ page: 'ellipsis', isActive: false, label: '...' });\n addPageRange(totalPages - 1, totalPages);\n }\n\n return pages;\n },\n []\n );\n\n const paginationList: PaginationList[] = useMemo(\n () => createPages(currentPage, totalPages),\n [createPages, currentPage, totalPages]\n );\n\n return (\n <div {...props} className={classes(['dropin-pagination', className])}>\n <PaginationButton\n data-testid=\"prev-button\"\n aria-label={translations.backwardButton}\n disabled={currentPage === 1}\n onClick={(e: Event) => handleBackward(e)}\n href={routePage?.(currentPage) ?? undefined}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--backward',\n ['dropin-pagination-arrow--disabled', currentPage === 1],\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </PaginationButton>\n <ul className=\"dropin-pagination_list\">\n {(paginationList as PaginationList[]).map((item, index) => (\n <li\n data-testid={`dropin-pagination_list-item--${item.page}`}\n key={`${item.page}_${index}`}\n className={classes([\n 'dropin-pagination_list-item',\n `dropin-pagination_list-item--${item.page}`,\n [`dropin-pagination_list-item--active`, item.isActive],\n ])}\n >\n <PaginationButton\n data-testid={`set-page-button-${item.page}`}\n onClick={(e: Event) => handleSetPage(item.page, e)}\n href={routePage?.(item.page as number) ?? undefined}\n\n >\n {item.label}\n </PaginationButton>\n </li>\n ))}\n </ul>\n <PaginationButton\n data-testid=\"next-button\"\n aria-label={translations.forwardButton}\n disabled={currentPage === totalPages}\n onClick={(e: Event) => handleForward(e)}\n href={routePage?.(currentPage) ?? undefined}\n className={classes([\n 'dropin-pagination-arrow',\n 'dropin-pagination-arrow--forward',\n ['dropin-pagination-arrow--disabled', currentPage === totalPages],\n ])}\n >\n <Icon size=\"24\" source={ChevronDown} />\n </PaginationButton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Skeleton, SkeletonRow } from '@adobe-commerce/elsie/components';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton.css';\n\nexport const ProductItemCardSkeleton: FunctionComponent = () => {\n return (\n <div className=\"dropin-product-item-card dropin-product-item-card-skeleton\">\n <Skeleton className=\"dropin-product-item-card__skeleton dropin-product-item-card__image-container\">\n <SkeletonRow\n fullWidth={true}\n className=\"dropin-product-item-card__skeleton__image\"\n />\n </Skeleton>\n <Skeleton className=\"dropin-product-item-card__content dropin-product-item-card__skeleton__content\">\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n <SkeletonRow\n fullWidth={true}\n size=\"xsmall\"\n className=\"dropin-product-item-card__skeleton__item\"\n />\n </Skeleton>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { ProductItemCardSkeleton } from '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCardSkeleton';\nimport '@adobe-commerce/elsie/components/ProductItemCard/ProductItemCard.css';\n\nexport interface ProductItemCardProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {\n image?: VNode;\n titleNode?: VNode;\n price?: VNode;\n sku?: VNode;\n actionButton?: VNode;\n swatches?: VNode;\n initialized?: boolean;\n}\n\nexport const ProductItemCard: FunctionComponent<ProductItemCardProps> = ({\n className,\n image,\n titleNode,\n price,\n sku,\n actionButton,\n swatches,\n initialized = false,\n ...props\n}) => {\n if (!initialized) {\n return <ProductItemCardSkeleton />;\n }\n return (\n <div\n {...props}\n className={classes(['dropin-product-item-card', className])}\n >\n <div className=\"dropin-product-item-card__image-container\">\n {image && (\n <VComponent\n node={image}\n className={classes(['dropin-product-item-card__image'])}\n />\n )}\n </div>\n <div className=\"dropin-product-item-card__content\">\n {titleNode && (\n <VComponent\n node={titleNode}\n className={classes(['dropin-product-item-card__title'])}\n />\n )}\n {sku && (\n <VComponent\n node={sku}\n className={classes(['dropin-product-item-card__sku'])}\n />\n )}\n {price && (\n <div className=\"dropin-product-item-card__price\">\n <VComponent\n node={price}\n className={classes(['dropin-product-item-card__price'])}\n />\n </div>\n )}\n {swatches && (\n <div className=\"dropin-product-item-card__swatches\">\n <VComponent\n node={swatches}\n className={classes(['dropin-product-item-card__swatches'])}\n />\n </div>\n )}\n {actionButton && (\n <div className=\"dropin-product-item-card__action\">\n <VComponent\n node={actionButton}\n className={classes(['dropin-product-item-card__action'])}\n />\n </div>\n )}\n </div>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { useId } from 'preact/hooks';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport '@adobe-commerce/elsie/components/InputFile/InputFile.css';\n\nexport interface InputFileProps extends Omit<HTMLAttributes<HTMLInputElement>, 'type' | 'icon'> {\n accept?: string;\n onChange?: (event: Event) => void;\n label?: string;\n multiple?: boolean;\n icon?: VNode<HTMLAttributes<SVGSVGElement>>;\n}\n\nexport const InputFile: FunctionComponent<InputFileProps> = ({\n accept,\n onChange,\n label = 'Upload Document',\n icon,\n className,\n multiple,\n id: providedId,\n ...props\n}) => {\n \n const generatedId = useId();\n const id = providedId || generatedId;\n\n const handleChange = (e: Event) => {\n onChange?.(e);\n };\n\n return (\n <div className={classes(['dropin-input-file', className])}>\n <label htmlFor={id} className=\"dropin-input-file__label\">\n {icon && <span className=\"dropin-input-file__icon\">{icon}</span>}\n {label}\n </label>\n <input\n id={id}\n type=\"file\"\n accept={accept}\n multiple={multiple}\n onChange={handleChange}\n className=\"dropin-input-file__input\"\n {...props}\n />\n </div>\n );\n};","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent, VNode, Fragment } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { classes, VComponent } from '@adobe-commerce/elsie/lib';\nimport {\n Icon,\n Button,\n Skeleton,\n SkeletonRow,\n} from '@adobe-commerce/elsie/components';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@adobe-commerce/elsie/components/Table/Table.css';\n\ntype Sortable = 'asc' | 'desc' | true;\n\ntype Column =\n | { label: string; key: string; ariaLabel?: string; sortBy?: Sortable }\n | {\n label: VNode<HTMLAttributes<HTMLElement>>;\n key: string;\n ariaLabel: string;\n sortBy?: Sortable;\n };\n\ntype RowData = {\n [key: string]: VNode | string | number | undefined;\n _rowDetails?: VNode | string; // Special property for expandable row content\n};\n\nexport interface TableProps\n extends Omit<HTMLAttributes<HTMLTableElement>, 'loading'> {\n columns: Column[];\n rowData: RowData[];\n mobileLayout?: 'stacked' | 'none';\n caption?: string;\n expandedRows?: Set<number>;\n loading?: boolean;\n skeletonRowCount?: number;\n onSortChange?: (columnKey: string, direction: Sortable) => void;\n}\n\nexport const Table: FunctionComponent<TableProps> = ({\n className,\n children,\n columns = [],\n rowData = [],\n mobileLayout = 'none',\n caption,\n expandedRows = new Set(),\n loading = false,\n skeletonRowCount = 10,\n onSortChange,\n ...props\n}) => {\n const translations = useText({\n sortedAscending: 'Dropin.Table.sortedAscending',\n sortedDescending: 'Dropin.Table.sortedDescending',\n sortBy: 'Dropin.Table.sortBy',\n });\n\n const handleSort = (column: Column) => {\n if (!onSortChange) return;\n\n // Determine next sort direction\n let nextDirection: Sortable;\n if (column.sortBy === true) {\n nextDirection = 'asc';\n } else if (column.sortBy === 'asc') {\n nextDirection = 'desc';\n } else {\n nextDirection = true;\n }\n\n onSortChange(column.key, nextDirection);\n };\n\n const renderSortButton = (column: Column) => {\n if (column.sortBy === undefined) return null;\n const label = column.ariaLabel ?? (column.label as string);\n\n let iconSource: string;\n let ariaLabel: string;\n\n if (column.sortBy === 'asc') {\n iconSource = 'ChevronUp';\n ariaLabel = translations.sortedAscending.replace('{label}', label);\n } else if (column.sortBy === 'desc') {\n iconSource = 'ChevronDown';\n ariaLabel = translations.sortedDescending.replace('{label}', label);\n } else {\n // Show chevron down when sortable but not sorted\n iconSource = 'ChevronDown';\n ariaLabel = translations.sortBy.replace('{label}', label);\n }\n\n return (\n <Button\n variant=\"tertiary\"\n size=\"medium\"\n className=\"dropin-table__header__sort-button\"\n icon={<Icon source={iconSource} />}\n aria-label={ariaLabel}\n onClick={() => handleSort(column)}\n />\n );\n };\n\n const renderSkeletonRows = () => {\n return Array.from({ length: skeletonRowCount }, (_, rowIndex) => (\n <tr key={`skeleton-${rowIndex}`} className=\"dropin-table__body__row\">\n {columns.map((column) => (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={column.ariaLabel ?? column.label}\n >\n <Skeleton>\n <SkeletonRow variant=\"row\" size=\"small\" fullWidth />\n </Skeleton>\n </td>\n ))}\n </tr>\n ));\n };\n\n const renderDataRows = () => {\n return rowData.map((row, rowIndex) => {\n const hasDetails = row._rowDetails !== undefined;\n const isExpanded = expandedRows.has(rowIndex);\n\n return (\n <Fragment key={rowIndex}>\n <tr className={classes([\n 'dropin-table__body__row',\n ['dropin-table__body__row--expanded', isExpanded && hasDetails],\n ])}>\n {columns.map((column) => {\n const cell = row[column.key];\n const label = column.ariaLabel ?? column.label;\n\n if (typeof cell === 'string' || typeof cell === 'number') {\n return (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={label}\n >\n {cell}\n </td>\n );\n }\n\n return (\n <td\n key={column.key}\n className=\"dropin-table__body__cell\"\n data-label={label}\n >\n <VComponent node={cell!} />\n </td>\n );\n })}\n </tr>\n {hasDetails && isExpanded && (\n <tr\n key={`${rowIndex}-details`}\n className=\"dropin-table__row-details dropin-table__row-details--expanded\"\n id={`row-${rowIndex}-details`}\n >\n <td\n className=\"dropin-table__row-details__cell\"\n colSpan={columns.length}\n role=\"region\"\n aria-labelledby={`row-${rowIndex}-details`}\n >\n {typeof row._rowDetails === 'string' ? (\n row._rowDetails\n ) : (\n <VComponent node={row._rowDetails!} />\n )}\n </td>\n </tr>\n )}\n </Fragment>\n );\n });\n };\n\n const getAriaSort = (\n column: Column\n ): 'none' | 'ascending' | 'descending' | 'other' | undefined => {\n if (column.sortBy === true) return 'none';\n if (column.sortBy === 'asc') return 'ascending';\n if (column.sortBy === 'desc') return 'descending';\n return undefined;\n };\n\n return (\n <div\n className={classes([\n 'dropin-table',\n `dropin-table--mobile-layout-${mobileLayout}`,\n className,\n ])}\n >\n <table {...props} className=\"dropin-table__table\">\n {caption && (\n <caption className=\"dropin-table__caption\">{caption}</caption>\n )}\n <thead className=\"dropin-table__header\">\n <tr className=\"dropin-table__header__row\">\n {columns.map((column) => (\n <th\n key={column.key}\n className={classes([\n 'dropin-table__header__cell',\n [\n 'dropin-table__header__cell--sorted',\n column.sortBy === 'asc' || column.sortBy === 'desc',\n ],\n [\n 'dropin-table__header__cell--sortable',\n column.sortBy !== undefined,\n ],\n ])}\n aria-sort={getAriaSort(column)}\n >\n {column.label}\n {renderSortButton(column)}\n </th>\n ))}\n </tr>\n </thead>\n <tbody className=\"dropin-table__body\">\n {loading\n ? // Render skeleton rows when loading\n renderSkeletonRows()\n : // Render actual data when not loading\n renderDataRows()}\n </tbody>\n </table>\n </div>\n );\n};\n","/********************************************************************\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this\n * file in accordance with the terms of the Adobe license agreement\n * accompanying it.\n *******************************************************************/\n\nimport { FunctionComponent } from 'preact';\nimport { Button, Tag } from '@adobe-commerce/elsie/components';\nimport { classes } from '@adobe-commerce/elsie/lib';\nimport { ChevronDown, Close, Check } from '@adobe-commerce/elsie/icons';\nimport { useText } from 'preact-i18n';\nimport {\n useState,\n useCallback,\n useEffect,\n useRef,\n useMemo,\n} from 'preact/hooks';\nimport { JSX } from 'preact/compat';\nimport '@adobe-commerce/elsie/components/MultiSelect/MultiSelect.css';\n\ntype OptionValue = string | number;\n\ninterface Option {\n label: string;\n value: OptionValue;\n disabled?: boolean;\n}\n\ntype SelectedValues = OptionValue[];\n\n// Utility functions\nconst filterOptions = (options: Option[], searchTerm: string): Option[] => {\n return options.filter((option) =>\n option.label.toLowerCase().includes(searchTerm.toLowerCase())\n );\n};\n\nconst getSelectedLabels = (\n value: SelectedValues,\n options: Option[]\n): (string | OptionValue)[] => {\n return value.map((v) => {\n const option = options.find((opt) => opt.value === v);\n return option ? option.label : v;\n });\n};\n\nconst generateIds = (id: string, name: string, floatingLabel?: string) => {\n const baseId = id || name;\n return {\n listboxId: `${baseId}-listbox`,\n searchInputId: `${baseId}-search`,\n labelId: floatingLabel ? `${baseId}-label` : undefined,\n selectedDescriptionId: `${name}-selected-description`,\n };\n};\n\nconst useAccessibilityAnnouncements = () => {\n const [announcement, setAnnouncement] = useState('');\n\n const announce = useCallback((message: string) => {\n setAnnouncement(message);\n setTimeout(() => setAnnouncement(''), 1000);\n }, []);\n\n return { announcement, announce };\n};\n\nconst useKeyboardNavigation = (\n filteredOptions: Option[],\n focusedIndex: number,\n setFocusedIndex: (value: number | ((prev: number) => number)) => void,\n dropdownRef: { current: HTMLDivElement | null }\n) => {\n // Scroll focused item into view\n useEffect(() => {\n if (focusedIndex >= 0 && dropdownRef.current) {\n const items = dropdownRef.current.querySelectorAll('[data-option-index]');\n if (items[focusedIndex]) {\n items[focusedIndex].scrollIntoView({\n block: 'nearest',\n behavior: 'smooth',\n });\n }\n }\n }, [focusedIndex, dropdownRef]);\n\n const navigate = useCallback(\n (direction: 'up' | 'down') => {\n setFocusedIndex((prev) => {\n const step = direction === 'up' ? -1 : 1;\n let nextIndex = prev + step;\n\n // Skip disabled options in the current direction\n while (\n nextIndex >= 0 &&\n nextIndex < filteredOptions.length &&\n filteredOptions[nextIndex]?.disabled\n ) {\n nextIndex += step;\n }\n\n // If we found a valid option, return it\n if (nextIndex >= 0 && nextIndex < filteredOptions.length) {\n return nextIndex;\n }\n\n // Wrap around: find the first enabled option from the opposite end\n if (direction === 'up') {\n for (let i = filteredOptions.length - 1; i >= 0; i--) {\n if (!filteredOptions[i]?.disabled) return i;\n }\n } else {\n for (let i = 0; i < filteredOptions.length; i++) {\n if (!filteredOptions[i]?.disabled) return i;\n }\n }\n\n return -1;\n });\n },\n [filteredOptions, setFocusedIndex]\n );\n\n return { navigate };\n};\n\nexport interface MultiSelectProps {\n options: Option[];\n value: SelectedValues;\n onChange: (value: SelectedValues) => void;\n placeholder?: string;\n selectAllText?: string;\n deselectAllText?: string;\n noResultsText?: string;\n name?: string;\n disabled?: boolean;\n className?: string;\n maxHeight?: number;\n floatingLabel?: string;\n error?: boolean;\n success?: boolean;\n id?: string;\n}\n\nexport const MultiSelect: FunctionComponent<MultiSelectProps> = ({\n options = [],\n value = [],\n onChange = () => {},\n id = '',\n className = '',\n selectAllText = '',\n deselectAllText = '',\n placeholder = '',\n noResultsText = '',\n floatingLabel = '',\n name = 'multi-select-sdk',\n error = false,\n success = false,\n disabled = false,\n maxHeight = 300,\n}) => {\n const translations = useText({\n selectAll: 'Dropin.MultiSelect.selectAll',\n deselectAll: 'Dropin.MultiSelect.deselectAll',\n placeholder: 'Dropin.MultiSelect.placeholder',\n noResultsText: 'Dropin.MultiSelect.noResultsText',\n removed: 'Dropin.MultiSelect.ariaLabel.removed',\n added: 'Dropin.MultiSelect.ariaLabel.added',\n itemsSelected: 'Dropin.MultiSelect.ariaLabel.itemsSelected',\n itemsAdded: 'Dropin.MultiSelect.ariaLabel.itemsAdded',\n itemsRemoved: 'Dropin.MultiSelect.ariaLabel.itemsRemoved',\n selectedTotal: 'Dropin.MultiSelect.ariaLabel.selectedTotal',\n noResultsFor: 'Dropin.MultiSelect.ariaLabel.noResultsFor',\n optionsAvailable: 'Dropin.MultiSelect.ariaLabel.optionsAvailable',\n dropdownExpanded: 'Dropin.MultiSelect.ariaLabel.dropdownExpanded',\n useArrowKeys: 'Dropin.MultiSelect.ariaLabel.useArrowKeys',\n removeFromSelection: 'Dropin.MultiSelect.ariaLabel.removeFromSelection',\n fromSelection: 'Dropin.MultiSelect.ariaLabel.fromSelection',\n selectedItem: 'Dropin.MultiSelect.ariaLabel.selectedItem',\n inField: 'Dropin.MultiSelect.ariaLabel.inField',\n selectedItems: 'Dropin.MultiSelect.ariaLabel.selectedItems',\n scrollableOptionsList: 'Dropin.MultiSelect.ariaLabel.scrollableOptionsList',\n selectOptions: 'Dropin.MultiSelect.ariaLabel.selectOptions',\n itemAction: 'Dropin.MultiSelect.ariaLabel.itemAction',\n bulkAdded: 'Dropin.MultiSelect.ariaLabel.bulkAdded',\n bulkRemoved: 'Dropin.MultiSelect.ariaLabel.bulkRemoved',\n dropdownExpandedWithOptions:\n 'Dropin.MultiSelect.ariaLabel.dropdownExpandedWithOptions',\n selectedItemInField: 'Dropin.MultiSelect.ariaLabel.selectedItemInField',\n removeFromSelectionWithText:\n 'Dropin.MultiSelect.ariaLabel.removeFromSelectionWithText',\n itemsSelectedDescription:\n 'Dropin.MultiSelect.ariaLabel.itemsSelectedDescription',\n noItemsSelected: 'Dropin.MultiSelect.ariaLabel.noItemsSelected',\n });\n\n const [isOpen, setIsOpen] = useState(false);\n const [searchTerm, setSearchTerm] = useState('');\n const [focusedIndex, setFocusedIndex] = useState(-1);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n const { announcement, announce } = useAccessibilityAnnouncements();\n\n // Helper function to close dropdown and optionally reset search state\n const closeDropdown = useCallback((resetSearch = false) => {\n setIsOpen(false);\n if (resetSearch) {\n setSearchTerm('');\n }\n setFocusedIndex(-1);\n }, []);\n\n // Filter options based on the search term\n const filteredOptions = useMemo(\n () => filterOptions(options, searchTerm),\n [options, searchTerm]\n );\n\n // Keyboard navigation\n const { navigate } = useKeyboardNavigation(\n filteredOptions,\n focusedIndex,\n setFocusedIndex,\n dropdownRef\n );\n\n // Close dropdown on the outside click\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n containerRef.current &&\n event.target &&\n !containerRef.current.contains(event.target as Node)\n ) {\n closeDropdown(true); // Reset search when clicking outside\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [closeDropdown]);\n\n // Toggle dropdown on container click (excluding tags)\n const handleContainerClick = (event: MouseEvent) => {\n if (\n !disabled &&\n searchInputRef.current &&\n event.target &&\n !(event.target as Element).closest('[data-tag]')\n ) {\n if (isOpen) {\n closeDropdown(false); // Don't reset search when clicking inside\n } else {\n searchInputRef.current.focus();\n setIsOpen(true);\n }\n }\n };\n\n // Handle option selection/deselection\n const handleSelect = useCallback(\n (optionValue: OptionValue) => {\n const option = options.find((opt) => opt.value === optionValue);\n\n const isCurrentlySelected = value.includes(optionValue);\n const newValue = isCurrentlySelected\n ? value.filter((v) => v !== optionValue)\n : [...value, optionValue];\n\n onChange(newValue);\n searchInputRef.current?.focus();\n\n // A11y - Announce the selection change\n if (option) {\n const action = isCurrentlySelected\n ? translations.removed\n : translations.added;\n announce(\n translations.itemAction\n .replace('{label}', option.label)\n .replace('{action}', action)\n .replace('{count}', newValue.length.toString())\n );\n }\n },\n [value, onChange, options, announce, translations]\n );\n\n // Handle option deselection via the Tag button\n const handleRemoveTag = (event: MouseEvent, optionValue: OptionValue) => {\n event.stopPropagation();\n const option = options.find((opt) => opt.value === optionValue);\n const newValue = value.filter((v) => v !== optionValue);\n onChange(newValue);\n searchInputRef.current?.focus();\n\n // A11y - Announce the selection change\n if (option) {\n announce(\n translations.itemAction\n .replace('{label}', option.label)\n .replace('{action}', translations.removed)\n .replace('{count}', newValue.length.toString())\n );\n }\n };\n\n const handleSelectAll = (event: MouseEvent) => {\n event.preventDefault();\n const allFilteredValues = filteredOptions.map((opt) => opt.value);\n const currentValueSet = new Set(value);\n const newSelections = allFilteredValues.filter(\n (val) => !currentValueSet.has(val)\n );\n const newValue = [...value, ...newSelections];\n onChange(newValue);\n\n // Announce the bulk selection\n if (newSelections.length > 0) {\n announce(\n translations.bulkAdded\n .replace('{count}', newSelections.length.toString())\n .replace('{total}', newValue.length.toString())\n );\n }\n };\n\n const handleDeselectAll = (event: MouseEvent) => {\n event.preventDefault();\n const filteredValues = new Set(filteredOptions.map((opt) => opt.value));\n const removedCount = value.filter((v) => filteredValues.has(v)).length;\n const newValue = value.filter((v) => !filteredValues.has(v));\n onChange(newValue);\n\n // A11y - Announce the bulk deselection\n if (removedCount > 0) {\n announce(\n translations.bulkRemoved\n .replace('{count}', removedCount.toString())\n .replace('{total}', newValue.length.toString())\n );\n }\n };\n\n // A11y - Keyboard navigation\n const handleInputKeyDown = (\n event: JSX.TargetedKeyboardEvent<HTMLInputElement>\n ) => {\n // Handle backspace to remove the last tag\n if (event.key === 'Backspace' && searchTerm === '' && value.length > 0) {\n event.preventDefault();\n const newValue = value.slice(0, -1);\n onChange(newValue);\n return;\n }\n\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault();\n setIsOpen(true);\n return;\n }\n\n if (isOpen) {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n navigate('down');\n break;\n case 'ArrowUp':\n event.preventDefault();\n navigate('up');\n break;\n case 'Enter':\n event.preventDefault();\n if (focusedIndex >= 0 && focusedIndex < filteredOptions.length) {\n const focusedOption = filteredOptions[focusedIndex];\n if (!focusedOption?.disabled) {\n handleSelect(focusedOption.value);\n }\n } else if (\n filteredOptions.length === 1 &&\n !filteredOptions[0]?.disabled\n ) {\n handleSelect(filteredOptions[0].value);\n }\n break;\n case 'Escape':\n event.preventDefault();\n closeDropdown(true); // Reset search on Escape\n break;\n case 'Tab':\n closeDropdown(true); // Reset search on Tab (leaving component)\n break;\n }\n }\n };\n\n // Array with labels of all selected options\n const selectedLabels = useMemo(\n () => getSelectedLabels(value, options),\n [value, options]\n );\n\n // A11y - Generate unique IDs\n const { listboxId, searchInputId, labelId, selectedDescriptionId } =\n generateIds(id, name, floatingLabel);\n const currentFocusedId =\n focusedIndex >= 0 ? `${listboxId}-option-${focusedIndex}` : '';\n\n // Check if any items are selected (regardless of filtering)\n const hasSelection = useMemo(() => value.length > 0, [value]);\n\n useEffect(() => {\n if (searchTerm && !isOpen) {\n setIsOpen(true);\n }\n }, [isOpen, searchTerm]);\n\n // Announce filtered results\n useEffect(() => {\n if (isOpen && searchTerm) {\n const count = filteredOptions.length;\n if (count === 0) {\n announce(`${translations.noResultsFor} \"${searchTerm}\"`);\n } else {\n announce(`${count} ${translations.optionsAvailable}`);\n }\n }\n }, [filteredOptions.length, searchTerm, isOpen, announce, translations]);\n\n useEffect(() => {\n if (isOpen && searchInputRef.current) {\n searchInputRef.current.focus();\n // Announce when dropdown opens with available options\n if (filteredOptions.length > 0) {\n announce(\n translations.dropdownExpandedWithOptions\n .replace('{count}', filteredOptions.length.toString())\n .replace('{s}', filteredOptions.length === 1 ? '' : 's')\n );\n }\n }\n }, [\n isOpen,\n selectedLabels.length,\n filteredOptions.length,\n announce,\n translations,\n ]);\n\n const renderSelectedTags = () => (\n <>\n {selectedLabels.map((label, index) => {\n const totalSelected = value.length;\n const fieldContext = floatingLabel ? `${floatingLabel}: ` : '';\n // Use i18n translations for selected items text\n const selectedItemsText =\n totalSelected === 1\n ? `${fieldContext}${translations.itemsSelected\n .replace('{count}', '1')\n .replace('{labels}', String(label))\n .replace('{s}', '')}`\n : `${fieldContext}${translations.itemsSelected\n .replace('{count}', totalSelected.toString())\n .replace('{labels}', selectedLabels.join(', '))\n .replace('{s}', totalSelected === 1 ? '' : 's')}`;\n\n return (\n <Tag\n key={value[index]}\n data-tag=\"true\"\n className=\"dropin-multi-select__tag\"\n role=\"group\"\n aria-label={\n floatingLabel\n ? translations.selectedItemInField\n .replace('{label}', String(label))\n .replace('{field}', floatingLabel)\n : `${translations.selectedItem} ${String(label)}`\n }\n >\n <span aria-hidden=\"true\">{label}</span>\n <button\n type=\"button\"\n onClick={(e) => handleRemoveTag(e, value[index])}\n className=\"dropin-multi-select__tag-remove\"\n disabled={disabled}\n aria-label={translations.removeFromSelectionWithText\n .replace('{label}', String(label))\n .replace('{text}', selectedItemsText)}\n >\n <Close size={12} aria-hidden=\"true\" />\n </button>\n </Tag>\n );\n })}\n </>\n );\n\n const renderSearchInput = () => (\n <input\n id={searchInputId}\n ref={searchInputRef}\n type=\"text\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n aria-controls={listboxId}\n className={classes([\n 'dropin-multi-select__search',\n ['dropin-multi-select__search--with-floating-label', !!floatingLabel],\n ])}\n placeholder={\n value.length === 0 ? placeholder || translations.placeholder : ''\n }\n value={searchTerm}\n onChange={(e: JSX.TargetedEvent<HTMLInputElement, Event>) => {\n const target = e.target as HTMLInputElement;\n setSearchTerm(target.value);\n setFocusedIndex(-1);\n }}\n onKeyDown={handleInputKeyDown}\n onFocus={() => setIsOpen(true)}\n disabled={disabled}\n style={{\n minWidth: searchTerm ? `${searchTerm.length * 8 + 20}px` : '40px',\n }}\n aria-autocomplete=\"list\"\n aria-activedescendant={\n isOpen && currentFocusedId ? currentFocusedId : undefined\n }\n {...(labelId\n ? { 'aria-labelledby': labelId }\n : {\n 'aria-label':\n floatingLabel ||\n placeholder ||\n translations.placeholder ||\n translations.selectOptions,\n })}\n aria-describedby={selectedDescriptionId}\n />\n );\n\n const renderDropdownControls = () => (\n <div className=\"dropin-multi-select__controls\">\n <Button\n variant=\"tertiary\"\n type=\"button\"\n className=\"dropin-multi-select__button dropin-multi-select__button--select-all\"\n onMouseDown={handleSelectAll}\n data-testid=\"multi-select-select-all\"\n >\n {selectAllText || translations.selectAll}\n </Button>\n {' | '}\n <Button\n variant=\"tertiary\"\n type=\"button\"\n className=\"dropin-multi-select__button dropin-multi-select__button--deselect-all\"\n onMouseDown={handleDeselectAll}\n disabled={!hasSelection}\n data-testid=\"multi-select-deselect-all\"\n >\n {deselectAllText || translations.deselectAll}\n </Button>\n </div>\n );\n\n const renderOptionsList = () => (\n <ul\n className=\"dropin-multi-select__list\"\n id={listboxId}\n role=\"listbox\"\n aria-multiselectable=\"true\"\n aria-label={floatingLabel || placeholder || translations.placeholder}\n >\n {filteredOptions.map((option, index) => {\n const isSelected = value.includes(option.value);\n const isFocused = index === focusedIndex;\n const optionId = `${listboxId}-option-${index}`;\n\n return (\n <li\n key={option.value}\n id={optionId}\n data-option-index={index}\n data-testid={`multi-select-option-${index}`}\n className={classes([\n 'dropin-multi-select__option',\n ['dropin-multi-select__option--focused', isFocused],\n ['dropin-multi-select__option--selected', isSelected],\n ['dropin-multi-select__option--disabled', option.disabled],\n ])}\n onClick={() => {\n if (!option.disabled) {\n handleSelect(option.value);\n }\n }}\n onMouseEnter={() => !option.disabled && setFocusedIndex(index)}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={option.disabled}\n >\n <span\n className={classes([\n 'dropin-multi-select__option-label',\n [\n 'dropin-multi-select__option-label--disabled',\n option.disabled,\n ],\n ])}\n >\n {option.label}\n </span>\n {isSelected && (\n <Check\n width={16}\n height={16}\n className=\"dropin-multi-select__check-icon\"\n aria-hidden=\"true\"\n />\n )}\n </li>\n );\n })}\n </ul>\n );\n\n return (\n <div\n ref={containerRef}\n data-testid=\"multi-select\"\n className={classes(['dropin-multi-select', className])}\n >\n {/* Single hidden input with comma-separated values for form submission */}\n <input\n id={id || name}\n type=\"hidden\"\n name={name}\n data-testid=\"multi-select-hidden-input\"\n value={value.join(',')}\n disabled={disabled}\n aria-hidden=\"true\"\n />\n <div\n className={classes([\n 'dropin-multi-select__container',\n ['dropin-multi-select__container--open', isOpen],\n ['dropin-multi-select__container--disabled', disabled],\n ['dropin-multi-select__container--error', error],\n ['dropin-multi-select__container--success', success],\n [\n 'dropin-multi-select__container--with-floating-label',\n !!floatingLabel,\n ],\n [\n 'dropin-multi-select__container--has-value',\n !!(floatingLabel && (value.length > 0 || searchTerm.length > 0)),\n ],\n ])}\n onMouseDown={handleContainerClick}\n data-testid=\"multi-select-container\"\n >\n <div\n className={classes([\n 'dropin-multi-select__tags-area',\n [\n 'dropin-multi-select__tags-area--has-values',\n selectedLabels.length > 0,\n ],\n ])}\n data-testid=\"multi-select-tags-area\"\n role=\"group\"\n aria-label={translations.selectedItems}\n >\n {/* Screen-reader-only description of selected items */}\n <div\n id={selectedDescriptionId}\n className=\"dropin-multi-select__sr-only\"\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {value.length > 0\n ? translations.itemsSelectedDescription\n .replace('{count}', value.length.toString())\n .replace('{s}', value.length === 1 ? '' : 's')\n .replace('{labels}', selectedLabels.join(', '))\n : translations.noItemsSelected}\n </div>\n\n {renderSelectedTags()}\n {renderSearchInput()}\n {floatingLabel ? (\n <label\n className=\"dropin-multi-select__floating-label\"\n htmlFor={searchInputId}\n id={labelId}\n >\n {floatingLabel}\n </label>\n ) : null}\n </div>\n <ChevronDown\n className={classes([\n 'dropin-multi-select__chevron',\n ['dropin-multi-select__chevron--open', isOpen],\n ])}\n />\n </div>\n\n {isOpen && (\n <div\n className=\"dropin-multi-select__dropdown\"\n data-testid=\"multi-select-dropdown\"\n >\n {filteredOptions.length > 0 && renderDropdownControls()}\n\n <div\n ref={dropdownRef}\n className=\"dropin-multi-select__options\"\n data-testid=\"multi-select-options\"\n style={{ maxHeight: `${maxHeight}px` }}\n tabIndex={0}\n role=\"region\"\n aria-label={translations.scrollableOptionsList}\n >\n {filteredOptions.length === 0 ? (\n <div\n className=\"dropin-multi-select__no-results\"\n data-testid=\"multi-select-no-results\"\n role=\"status\"\n aria-live=\"polite\"\n >\n {noResultsText || translations.noResultsText}{' '}\n {searchTerm && `\"${searchTerm}\"`}\n </div>\n ) : (\n renderOptionsList()\n )}\n </div>\n </div>\n )}\n\n {/* Live region for screen reader announcements */}\n <div\n className=\"dropin-multi-select__announcements dropin-multi-select__sr-only\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n >\n {announcement}\n </div>\n </div>\n );\n};\n"],"file":"components.js"}
|