@clicktap/ui 0.41.1 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion.d.ts +1 -0
- package/components/Accordion.js +1 -0
- package/components/AssetRenderer/renderers/DownloadLink.d.ts +1 -1
- package/components/AssetRenderer/renderers.d.ts +1 -0
- package/components/AssetRenderer/renderers.js +1 -0
- package/components/AssetRenderer.d.ts +1 -0
- package/components/AssetRenderer.js +1 -0
- package/components/Avatar/Avatar.js +1 -1
- package/components/Avatar.d.ts +1 -0
- package/components/Avatar.js +1 -0
- package/components/Badge/Badge.js +1 -1
- package/components/Badge.d.ts +1 -0
- package/components/Badge.js +1 -0
- package/components/Breadcrumbs/BreadcrumbLink.js +1 -1
- package/components/Breadcrumbs.d.ts +1 -0
- package/components/Breadcrumbs.js +1 -0
- package/components/Button/Button.js +1 -1
- package/components/Button/ButtonLoadingContent.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/Button.d.ts +1 -0
- package/components/Button.js +1 -0
- package/components/Card.d.ts +1 -0
- package/components/Card.js +1 -0
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checkbox.d.ts +1 -0
- package/components/Checkbox.js +1 -0
- package/components/Collapsible.d.ts +1 -0
- package/components/Collapsible.js +1 -0
- package/components/Collection/AttributeDataProvider.d.ts +1 -0
- package/components/Collection/AttributeDataProvider.js +1 -0
- package/components/Collection/CollectionFilterChips/CollectionFilterChips.js +1 -1
- package/components/Collection/CollectionFilterChips/index.js +1 -1
- package/components/Collection/CollectionFilterChips.d.ts +1 -0
- package/components/Collection/CollectionFilterChips.js +1 -0
- package/components/Collection/CollectionFilters/CollectionFilters.js +1 -1
- package/components/Collection/CollectionFilters/index.js +1 -1
- package/components/Collection/CollectionFilters.d.ts +1 -0
- package/components/Collection/CollectionFilters.js +1 -0
- package/components/Collection/CollectionToolbar/CollectionToolbar.js +1 -1
- package/components/Collection/CollectionToolbar/index.js +1 -1
- package/components/Collection/CollectionToolbar.d.ts +1 -0
- package/components/Collection/CollectionToolbar.js +1 -0
- package/components/Collection/EmptyResults/EmptyResults.js +1 -1
- package/components/Collection/EmptyResults.d.ts +1 -0
- package/components/Collection/EmptyResults.js +1 -0
- package/components/Collection/FilterAccordionTitle/FilterAccordionTitle.js +1 -1
- package/components/Collection/FilterAccordionTitle.d.ts +1 -0
- package/components/Collection/FilterAccordionTitle.js +1 -0
- package/components/Collection/FilterRenderer/Renderer/Boolean.js +1 -1
- package/components/Collection/FilterRenderer/Renderer/Option.js +1 -1
- package/components/Collection/FilterRenderer/Renderer/Range.js +1 -1
- package/components/Collection/FilterRenderer/Renderer/Swatch/SwatchColor.js +1 -1
- package/components/Collection/FilterRenderer/Renderer/Swatch/SwatchImage.js +1 -1
- package/components/Collection/FilterRenderer/Renderer/Swatch/SwatchText.js +1 -1
- package/components/Collection/FilterRenderer/Renderer.d.ts +1 -0
- package/components/Collection/FilterRenderer/Renderer.js +1 -0
- package/components/Collection/FilterRenderer.d.ts +1 -0
- package/components/Collection/FilterRenderer.js +1 -0
- package/components/Collection/ProductCardSwatches/ProductCardSwatches.js +1 -1
- package/components/Collection/ProductCardSwatches.d.ts +1 -0
- package/components/Collection/ProductCardSwatches.js +1 -0
- package/components/Collection/ProductPrice.d.ts +1 -0
- package/components/Collection/ProductPrice.js +1 -0
- package/components/Collection/index.js +1 -1
- package/components/Collection.d.ts +1 -0
- package/components/Collection.js +1 -0
- package/components/Container.d.ts +1 -0
- package/components/Container.js +1 -0
- package/components/ContextMenu/ContextMenu.js +1 -1
- package/components/ContextMenu.d.ts +1 -0
- package/components/ContextMenu.js +1 -0
- package/components/CreditCardExpirationInput/CreditCardExpirationInput.js +1 -1
- package/components/CreditCardExpirationInput.d.ts +1 -0
- package/components/CreditCardExpirationInput.js +1 -0
- package/components/CreditCardInput/CreditCardInput.js +1 -1
- package/components/CreditCardInput.d.ts +1 -0
- package/components/CreditCardInput.js +1 -0
- package/components/DateInput/DateInput.js +1 -1
- package/components/DateInput.d.ts +1 -0
- package/components/DateInput.js +1 -0
- package/components/DateTimeFormat/DateTimeFormat.d.ts +1 -1
- package/components/DateTimeFormat.d.ts +1 -0
- package/components/DateTimeFormat.js +1 -0
- package/components/Dialog/Dialog.js +1 -1
- package/components/Dialog.d.ts +1 -0
- package/components/Dialog.js +1 -0
- package/components/DialogTrigger.d.ts +1 -0
- package/components/DialogTrigger.js +1 -0
- package/components/Divider.d.ts +1 -0
- package/components/Divider.js +1 -0
- package/components/DobInput/DobInput.js +1 -1
- package/components/DobInput.d.ts +1 -0
- package/components/DobInput.js +1 -0
- package/components/Drawer/Drawer.js +1 -1
- package/components/Drawer.d.ts +1 -0
- package/components/Drawer.js +1 -0
- package/components/FeatureGate/AccessDenied.d.ts +2 -2
- package/components/FeatureGate/AccessDenied.js +1 -1
- package/components/FeatureGate/FeatureGate.d.ts +1 -1
- package/components/FeatureGate/FeatureGate.js +1 -1
- package/components/FeatureGate/PermissionRequired.d.ts +1 -1
- package/components/FeatureGate/PermissionRequired.js +1 -1
- package/components/FeatureGate/UpgradePrompt.d.ts +1 -1
- package/components/FeatureGate/UpgradePrompt.js +1 -1
- package/components/Icon/NoEntryIcon.js +1 -1
- package/components/Icon/StarIcon.js +1 -1
- package/components/Icon.d.ts +1 -0
- package/components/Icon.js +1 -0
- package/components/Image/Image.d.ts +44 -3
- package/components/Image/Image.js +1 -1
- package/components/Image/ImageContext.d.ts +30 -0
- package/components/Image/ImageContext.js +1 -0
- package/components/Image/imageShared.d.ts +74 -0
- package/components/Image/imageShared.js +1 -0
- package/components/Image/index.d.ts +3 -1
- package/components/Image/index.js +1 -1
- package/components/Image.d.ts +1 -0
- package/components/Image.js +1 -0
- package/components/Input/Input.js +1 -1
- package/components/Input.d.ts +1 -0
- package/components/Input.js +1 -0
- package/components/Link/Link.js +1 -1
- package/components/Link.d.ts +1 -0
- package/components/Link.js +1 -0
- package/components/LinkAsButton/LinkAsButton.js +1 -1
- package/components/LinkAsButton/index.js +1 -1
- package/components/LinkAsButton.d.ts +1 -0
- package/components/LinkAsButton.js +1 -0
- package/components/Loader/CircularEasing.js +1 -1
- package/components/Loader/Pulse.js +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Loader.d.ts +1 -0
- package/components/Loader.js +1 -0
- package/components/Menu.d.ts +1 -0
- package/components/Menu.js +1 -0
- package/components/Meter/Meter.js +1 -1
- package/components/Meter.d.ts +1 -0
- package/components/Meter.js +1 -0
- package/components/Modal.d.ts +1 -0
- package/components/Modal.js +1 -0
- package/components/ModalOverlay.d.ts +1 -0
- package/components/ModalOverlay.js +1 -0
- package/components/NumberFormat/NumberFormat.d.ts +1 -1
- package/components/NumberFormat.d.ts +1 -0
- package/components/NumberFormat.js +1 -0
- package/components/NumberInput/NumberInput.js +1 -1
- package/components/NumberInput.d.ts +1 -0
- package/components/NumberInput.js +1 -0
- package/components/NumberTicker.d.ts +1 -0
- package/components/NumberTicker.js +1 -0
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination.d.ts +1 -0
- package/components/Pagination.js +1 -0
- package/components/PasswordCheck/PasswordCheck.js +1 -1
- package/components/PasswordCheck.d.ts +1 -0
- package/components/PasswordCheck.js +1 -0
- package/components/PhoneInput/PhoneInput.js +1 -1
- package/components/PhoneInput.d.ts +1 -0
- package/components/PhoneInput.js +1 -0
- package/components/PinInput/PinInput.js +1 -1
- package/components/PinInput.d.ts +1 -0
- package/components/PinInput.js +1 -0
- package/components/Progressbar/LinearProgressbar.js +1 -1
- package/components/Progressbar.d.ts +1 -0
- package/components/Progressbar.js +1 -0
- package/components/Radio/Radio.js +1 -1
- package/components/Radio.d.ts +1 -0
- package/components/Radio.js +1 -0
- package/components/RadioGroup/RadioGroup.js +1 -1
- package/components/RadioGroup.d.ts +1 -0
- package/components/RadioGroup.js +1 -0
- package/components/ResendCode.d.ts +1 -0
- package/components/ResendCode.js +1 -0
- package/components/Select/ButtonSelect.js +1 -1
- package/components/Select/ComboBoxSelect.js +1 -1
- package/components/Select/MultiButtonSelect.js +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/index.js +1 -1
- package/components/Select/parts.js +1 -1
- package/components/Select.d.ts +1 -0
- package/components/Select.js +1 -0
- package/components/Skeleton.d.ts +1 -0
- package/components/Skeleton.js +1 -0
- package/components/Slider/Slider.js +1 -1
- package/components/Slider.d.ts +1 -0
- package/components/Slider.js +1 -0
- package/components/Switch/Switch.js +1 -1
- package/components/Switch.d.ts +1 -0
- package/components/Switch.js +1 -0
- package/components/Table.d.ts +1 -0
- package/components/Table.js +1 -0
- package/components/Tabs/Tab.js +1 -1
- package/components/Tabs/TabList.js +1 -1
- package/components/Tabs.d.ts +1 -0
- package/components/Tabs.js +1 -0
- package/components/Time.d.ts +1 -0
- package/components/Time.js +1 -0
- package/components/TimeInput/TimeInput.js +1 -1
- package/components/TimeInput.d.ts +1 -0
- package/components/TimeInput.js +1 -0
- package/components/Timezone.d.ts +1 -0
- package/components/Timezone.js +1 -0
- package/components/ToggleButton/ToggleButton.js +1 -1
- package/components/ToggleButton.d.ts +1 -0
- package/components/ToggleButton.js +1 -0
- package/components/Tooltip.d.ts +1 -0
- package/components/Tooltip.js +1 -0
- package/components/UploadImage/UploadImage.js +1 -1
- package/components/UploadImage/index.js +1 -1
- package/components/UploadImage.d.ts +1 -0
- package/components/UploadImage.js +1 -0
- package/docs/migrations/2026/04/2026-04-24-image-placeholder-frontend-fallback.md +3 -3
- package/docs/migrations/2026/04/2026-04-30-prune-invalid-pdp-selections.md +2 -2
- package/docs/migrations/2026/04/2026-04-30-top-down-pdp-option-dependency.md +2 -2
- package/docs/migrations/2026/08/2026-08-06-clicktap-ui-image-next-subpath.md +101 -0
- package/docs/migrations/2026/08/2026-08-06-clicktap-ui-loaders-drop-framer-motion.md +77 -0
- package/docs/migrations/2026/08/2026-08-06-clicktap-ui-semantic-tokens.md +106 -0
- package/docs/migrations/README.md +1 -0
- package/hooks/useCollectionState.d.ts +1 -0
- package/hooks/useCollectionState.js +1 -0
- package/hooks/useRoute/RouteContext.d.ts +8 -0
- package/hooks/useRoute/index.js +1 -1
- package/hooks/useRoute/useRoute.js +1 -1
- package/hooks/useRoute.d.ts +1 -0
- package/hooks/useRoute.js +1 -0
- package/next/Image.d.ts +11 -0
- package/next/Image.js +1 -0
- package/next/index.d.ts +8 -0
- package/next/index.js +1 -0
- package/package.json +62 -6
- package/theme.css +162 -0
- package/utils/collection.d.ts +1 -0
- package/utils/collection.js +1 -0
- package/utils/variantOptions.d.ts +1 -0
- package/utils/variantOptions.js +1 -0
- package/tailwind.config.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as d}from"react/jsx-runtime";import{Accordion as
|
|
1
|
+
"use client";import{jsx as d}from"react/jsx-runtime";import{Accordion as u}from"@heroui/accordion";import{cn as r}from"../../utils/cn.js";import{DownArrow as i}from"../Icon/DownArrow.js";function f({children:n,variant:t,isCompact:o,className:l,itemClasses:e,...b}){return d(u,{variant:t,isCompact:o,dividerProps:{className:r("my-2 border-solid border-border-subtle",t==="shadow"&&"border-border")},className:r("px-0",t==="bordered"&&["px-4 py-4 rounded-xl border-2 border-border-subtle"],t==="shadow"&&["px-4 py-4 rounded-xl bg-surface-subtle shadow-slate-200 border border-border-subtle"],l),itemClasses:{base:r("w-full py-2",'data-[disabled="true"]:pointer-events-none data-[disabled="true"]:opacity-50',t==="bordered"&&["rounded-xl py-0"],t==="splitted"&&["flex flex-col bg-surface-subtle rounded-xl border border-border-subtle"],o&&"py-0",e?.base),trigger:r("w-full h-full flex items-center gap-3 py-0 appearance-none cursor-pointer select-none",'data-[focus-visible="true"]:outline-2 data-[focus-visible="true"]:outline data-[focus-visible="true"]:outline-slate-100',"bg-transparent text-inherit",o&&["py-2"],e?.trigger),title:r("text-xl font-semibold",o&&"text-base",e?.title),subtitle:r("text-base",o&&"text-sm",e?.subtitle),titleWrapper:r("text-left",e?.titleWrapper),startContent:r("shrink-0",e?.startContent),content:r([o?"py-1":"py-2"],e?.content),indicator:e?.indicator,heading:e?.heading},...b,children:n})}function x(){return d(i,{className:"w-4 h-4"})}export{f as Accordion,x as AccordionItemArrow,f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Accordion/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Accordion/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './renderers/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './renderers/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AssetRenderer/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AssetRenderer/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as
|
|
1
|
+
"use client";import{jsx as e,jsxs as u}from"react/jsx-runtime";import{cn as n}from"../../utils/cn.js";function a(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M20 21C20 19.6044 20 18.9067 19.8278 18.3389C19.44 17.0605 18.4395 16.06 17.1611 15.6722C16.5933 15.5 15.8956 15.5 14.5 15.5H9.5C8.10444 15.5 7.40665 15.5 6.83886 15.6722C5.56045 16.06 4.56004 17.0605 4.17224 18.3389C4 18.9067 4 19.6044 4 21M16.5 7.5C16.5 9.98528 14.4853 12 12 12C9.51472 12 7.5 9.98528 7.5 7.5C7.5 5.01472 9.51472 3 12 3C14.4853 3 16.5 5.01472 16.5 7.5Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function h({icon:f,className:d,isDisabled:x,size:i="md",classNames:o,isBordered:c,radius:t="full",name:r,src:l,alt:s}){return e("div",{className:n("group","z-10","first:ms-0",d),children:u("div",{className:n("transition-transform duration-300 ease-in-out","bg-surface-subtle","flex items-center justify-center","relative","z-10","overflow-hidden",x?"opacity-50":"opacity-100",[i==="sm"&&"h-8 w-8 text-xs",i==="md"&&"h-10 w-10 text-sm",i==="lg"&&"h-12 w-12 text-base"],[t==="full"&&"rounded-full",t==="lg"&&"rounded-2xl",t==="md"&&"rounded-xl",t==="sm"&&"rounded-lg",t==="none"&&"rounded-none"],c&&"shadow-[#fff_0px_0px_0px_2px,_#f1f5f9_0px_0px_0px_4px,_#00000000_0px_0px_0px_0px]",o?.base),children:[l&&e("img",{src:l,alt:s||r||"Avatar",className:n("absolute","w-full","h-full","overflow-hidden","object-cover","object-center",o?.icon)}),!l&&r&&e("span",{className:n("flex items-center justify-center","text-center","max-w-full","overflow-hidden","font-medium",o?.name),children:r}),!l&&!r&&e("span",{className:n("flex items-center justify-center",o?.fallback),children:f||e(a,{})})]})})}export{h as Avatar,h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Avatar/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Avatar/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as a}from"react/jsx-runtime";import{useId as y}from"react";import{AnimatePresence as V,motion as z}from"framer-motion";import{Badge as C}from"@heroui/badge";import{cn as n}from"../../utils/cn.js";const B={hidden:{opacity:0,scale:0},show:{opacity:1,scale:1}};function P({children:h,isInvisible:l,disableAnimation:d,placement:t="top-right",shape:r="rectangle",className:f,classNames:g,showOutline:b=!1,content:o,isDot:s,isOneChar:x,size:i="md",variant:e="solid",...c}){const m=y(),p=d?{duration:0}:{type:"spring",bounce:.3},_=String(o)?.length===1||x,w={sm:"text-xs",md:"text-sm",lg:"text-sm"},u=_?{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[i]:{sm:"min-w-4 h-4",md:"min-w-5 h-5",lg:"min-w-6 h-6"}[i];return a(C,{...c,size:i,variant:e,isInvisible:l,isDot:s,classNames:{base:n("relative","inline-flex shrink-0",g?.base),badge:n("p-0","border-0","absolute z-10",[t==="top-right"&&r==="rectangle"&&"top-0.5 right-px",t==="top-right"&&r==="circle"&&"top-1 right-1",t==="bottom-right"&&r==="rectangle"&&"bottom-0.5 right-px",t==="bottom-right"&&r==="circle"&&"bottom-1 right-1",t==="top-left"&&r==="rectangle"&&"top-0.5 left-px",t==="top-left"&&r==="circle"&&"top-1 left-1",t==="bottom-left"&&r==="rectangle"&&"bottom-0.5 left-px",t==="bottom-left"&&r==="circle"&&"bottom-1 left-1"],[t==="top-right"&&"translate-x-1/2 -translate-y-1/2",t==="bottom-right"&&"translate-x-1/2 translate-y-1/2",t==="bottom-left"&&"-translate-x-1/2 translate-y-1/2",t==="top-left"&&"-translate-x-1/2 -translate-y-1/2"],g?.badge)},content:a(V,{children:!l&&a(z.span,{layout:!0,variants:B,initial:d?"show":"hidden",transition:p,animate:"show",exit:"hidden",className:n("flex flex-wrap","place-content-center","z-10","box-border","rounded-full","py-0 px-1","font-normal text-fg","select-none","whitespace-normal",e==="faded"?"text-slate-800":"text-white",!o||s?"w-3.5 h-3.5":u,typeof o=="string"&&o.length>1||s?"text-xs":w[i],[e==="solid"&&"bg-surface-inverse-hover",e==="shadow"&&"bg-surface-inverse-hover",e==="flat"&&"bg-surface-inverse-hover/55",e==="faded"&&"bg-white"],[e==="faded"&&"border-2 border-solid border-surface-inverse-hover",b&&e!=="faded"&&"border-2 border-solid border-white"],e==="shadow"&&"shadow-[0_0_0_0_rgba(0,0,0,0),_0_0_0_0_rgba(0,0,0,0),_0_10px_15px_-3px_rgba(30,41,59,0.3),_0_4px_6px_-4px_rgba(30,41,59,0.3)]",f),children:o},`badge-${m}`)}),children:h})}export{P as Badge,P as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Badge/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as o}from"react/jsx-runtime";import{Link as u}from"react-aria-components";import{cn as i}from"../../utils/cn.js";function c({children:e,className:r,...t}){return o(u,{className:i("text-slate-600 no-underline cursor-pointer","focus-visible:outline-2 focus-visible:outline focus-visible:outline-border-subtle","hover:text-fg hover:underline","current:cursor-default current:text-fg current:font-semibold","disabled:cursor-default disabled:text-fg-subtle disabled:current:text-fg",r),...t,children:e})}export{c as BreadcrumbLink,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Breadcrumbs/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Breadcrumbs/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as f}from"react/jsx-runtime";import{forwardRef as c}from"react";import{Button as p}from"react-aria-components";import{cn as
|
|
1
|
+
"use client";import{jsx as f}from"react/jsx-runtime";import{forwardRef as c}from"react";import{Button as p}from"react-aria-components";import{cn as g}from"../../utils/cn.js";function h(e){switch(e){case"primary":return"solid";case"secondary":return"outline";case"tertiary":return"ghost";default:return e}}const w=c(function({className:r,isDisabled:d=!1,isLoading:t=!1,size:s="md",variant:n="solid",...a},b){const o=h(n),u=["flex items-center justify-center","rounded-md border-solid border","font-semibold text-sm","py-2 px-8","transition-all duration-200 ease-in-out","focus:outline-2 focus:outline focus:outline-border-subtle pressed:scale-95",s==="sm"&&"h-8",s==="md"&&"h-10",s==="lg"&&"h-12",o==="ghost"&&["bg-transparent hover:bg-transparent focus:bg-transparent disabled:bg-transparent","border-transparent hover:border-transparent focus:border-transparent disabled:border-transparent","text-fg disabled:text-fg-subtle",t&&"disabled:text-fg"],o==="outline"&&["bg-transparent hover:bg-transparent focus:bg-transparent disabled:bg-transparent","border-border hover:border-border-emphasis focus:border-border-emphasis disabled:border-border-subtle","text-fg disabled:text-fg-muted",t&&["disabled:border-border","disabled:text-fg"]],o==="solid"&&["bg-surface-inverse-hover hover:bg-surface-inverse focus:bg-surface-inverse disabled:bg-surface-inverse","border-surface-inverse-hover hover:border-fg focus:border-fg disabled:border-border-subtle","text-white disabled:text-fg-subtle",t&&["disabled:border-fg","disabled:text-white"]]];return f(p,{ref:b,type:"button",isDisabled:d,className:i=>{const l=typeof r=="function"?r(i):r;return g(u,l)},...a})});export{w as Button,w as default,h as resolveVariant};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as n,jsx as a}from"react/jsx-runtime";import{CircularEasing as s}from"../Loader/CircularEasing.js";import"
|
|
1
|
+
"use client";import{jsxs as n,jsx as a}from"react/jsx-runtime";import{CircularEasing as s}from"../Loader/CircularEasing.js";import"../../utils/cn.js";function l({isLoading:e=!1,spinnerStroke:t="#FFFFFF",children:i}){return n("span",{className:"inline-flex items-center gap-2",children:[a("span",{className:"w-5","aria-hidden":"true"}),i,a("span",{className:e?"opacity-100":"opacity-0",children:a(s,{stroke:t,width:20})})]})}export{l as ButtonLoadingContent,l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as
|
|
1
|
+
import{Button as e,resolveVariant as a}from"./Button.js";import{ButtonLoadingContent as u}from"./ButtonLoadingContent.js";import"react/jsx-runtime";import"react";import"react-aria-components";import"../../utils/cn.js";import"../Loader/CircularEasing.js";export{e as Button,u as ButtonLoadingContent,a as resolveVariant};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Button/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Card/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Card/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as n,jsxs as c,Fragment as h}from"react/jsx-runtime";import{Checkbox as s}from"react-aria-components";import{cn as f}from"../../utils/cn.js";function x({control:t,isHovered:a,isFocused:l,isDisabled:e,isIndeterminate:r,isInvalid:o,isSelected:b,isPressed:u,classNames:g,...d}){return t?typeof t=="function"?t({isHovered:a,isFocused:l,isDisabled:e,isIndeterminate:r,isInvalid:o,isSelected:b,isPressed:u,...d}):t:n("div",{className:f("flex items-center justify-center","w-6 h-6","border border-solid border-border rounded","transition-all duration-200 ease-in-out","checkbox-control",a&&["border-border-emphasis"],l&&["border-border-emphasis outline-2 outline outline-border-subtle"],(e||e&&r)&&["border-border-subtle bg-surface-subtle"],o&&["bg-surface-subtle text-danger border-danger-soft"],o&&a&&["border-danger"],o&&l&&["border-danger outline-danger-ring"],o&&b&&r&&["bg-danger-soft border-danger-soft"],o&&b&&r&&u&&["bg-danger border-danger"],(b||r)&&["border-border bg-slate-300"],(b||r)&&u&&["border-border-emphasis bg-slate-400"],g?.control),children:n("svg",{viewBox:"0 0 18 18","aria-hidden":"true",style:{strokeDasharray:"22px",strokeDashoffset:b||r?44:66},className:f("w-4 h-4 fill-none","stroke-white stroke-[3px]","transition-all duration-200 ease-in-out",e&&r&&["stroke-none fill-slate-300"],r&&["stroke-none fill-white"]),children:r?n("rect",{x:1,y:7.5,width:15,height:3}):n("polyline",{points:"1 9 7 14 15 4"})})})}function w({children:t,slots:a,className:l,classNames:e,...r}){return n(s,{className:f("flex items-center gap-2 cursor-pointer","text-xs text-fg-muted forced-color-adjust-none disabled:text-fg-subtle disabled:cursor-not-allowed group","invalid:text-danger-soft",l),...r,children:o=>c(h,{children:[n(x,{control:a?.control,classNames:e,...o}),typeof t=="function"?t(o):t]})})}export{w as Checkbox,w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Checkbox/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Collapsible/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Collapsible/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AttributeDataProvider/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AttributeDataProvider/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as
|
|
1
|
+
"use client";import{jsxs as m,jsx as o}from"react/jsx-runtime";import{useMemo as i}from"react";import{Button as s}from"../../Button/Button.js";import"../../../utils/cn.js";import{CrossSmall as n}from"../../Icon/CrossSmall.js";import{getAppliedFilterChips as a}from"../../../utils/collection/getAppliedFilterChips.js";import{removeFilterChip as p}from"../../../utils/collection/removeFilterChip.js";import"react-aria-components";function C({appliedFilters:e,onFilterChange:t}){const l=i(()=>a(e),[e]);return l.length===0?null:m("div",{className:"pt-6 mt-5 border-t border-solid border-gray-100",children:[o("div",{className:"flex gap-3 flex-wrap mb-3",children:l.map(r=>m(s,{variant:"outline",className:"px-2 py-1 h-6 font-medium text-xs flex items-center gap-x-1 rounded-md",onPress:()=>t(p(e,r)),children:[r.label,o(n,{})]},`${r.filterCode}-${r.optionId??"bool"}`))}),o(s,{variant:"ghost",className:"px-2 py-1 h-6 font-bold text-xs text-danger-soft",onPress:()=>t([]),children:"Clear All"})]})}export{C as CollectionFilterChips};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CollectionFilterChips as
|
|
1
|
+
import{CollectionFilterChips as f}from"./CollectionFilterChips.js";import"react/jsx-runtime";import"react";import"../../Button/Button.js";import"react-aria-components";import"../../../utils/cn.js";import"../../Icon/CrossSmall.js";import"../../../utils/collection/getAppliedFilterChips.js";import"../../../utils/collection/removeFilterChip.js";export{f as CollectionFilterChips};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CollectionFilterChips/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CollectionFilterChips/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as
|
|
1
|
+
"use client";import{jsxs as l,Fragment as h,jsx as e}from"react/jsx-runtime";import{useMemo as b,Suspense as x,useState as v}from"react";import{Accordion as g}from"../../Accordion/Accordion.js";import{AccordionItem as w}from"@heroui/accordion";import{Button as f}from"../../Button/Button.js";import"../../../utils/cn.js";import{ModalOverlay as y}from"../../ModalOverlay/ModalOverlay.js";import{Modal as N}from"../../Modal/Modal.js";import{Drawer as k}from"../../Drawer/Drawer.js";import{Cross as C}from"../../Icon/Cross.js";import{CrossSmall as A}from"../../Icon/CrossSmall.js";import{Search as D}from"../../Icon/Search.js";import{FilterRenderer as I}from"../FilterRenderer/FilterRenderer.js";import{mergeFilters as S}from"../../../utils/collection/mergeFilters.js";import{FilterAccordionTitle as j}from"../FilterAccordionTitle/FilterAccordionTitle.js";import{EmptyResults as L}from"../EmptyResults/EmptyResults.js";import"../../Icon/DownArrow.js";import"react-aria-components";import"framer-motion";import"../../DialogTrigger/DialogTrigger.js";import"../../../utils/env.js";import"../../../utils/swatch.js";import"../FilterRenderer/Renderer/Option.js";import"../../Checkbox/Checkbox.js";import"../FilterRenderer/Renderer/useOptionFilterToggle.js";import"../FilterRenderer/Renderer/Swatch.js";import"../FilterRenderer/Renderer/Swatch/SwatchColor.js";import"../../Icon/CheckIcon.js";import"../../../utils/color.js";import"../FilterRenderer/Renderer/Swatch/SwatchImage.js";import"../FilterRenderer/Renderer/Swatch/SwatchText.js";import"../FilterRenderer/Renderer/Boolean.js";import"../../RadioGroup/RadioGroup.js";import"../../Radio/Radio.js";import"../FilterRenderer/Renderer/Range.js";function M(){return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function V({value:a,onChange:r}){const[o,c]=v(a),m=()=>{r(o.trim())};return l("div",{className:"relative",children:[e("input",{type:"search",value:o,onChange:i=>c(i.target.value),onKeyDown:i=>{i.key==="Enter"&&(i.preventDefault(),m())},onBlur:m,placeholder:"Search products...","aria-label":"Search products",autoComplete:"off",className:"w-full h-9 pl-8 pr-8 rounded-md border border-border bg-white text-sm text-fg placeholder:text-fg-subtle focus:outline-none focus:border-border-emphasis [&::-webkit-search-cancel-button]:hidden"}),o&&e("button",{type:"button",onClick:()=>{c(""),r("")},"aria-label":"Clear search",className:"absolute right-2 top-1/2 -translate-y-1/2 p-0.5 rounded-full hover:bg-surface-subtle transition-colors",children:e(A,{})}),e("span",{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 [&>svg]:w-full [&>svg]:h-full text-fg-subtle",children:e(D,{})})]})}function fe({availableFilters:a,appliedFilters:r,onFilterChange:o,showMobileFilters:c,setShowMobileFilters:m,searchQuery:s,onSearchChange:n,totalItems:i}){const u=b(()=>S(r,a).filter(t=>t.includeInFilters!==!1),[r,a]),d=n&&e(V,{value:s??"",onChange:n},s),p=()=>u.length>0&&e(g,{selectionMode:"multiple",defaultSelectedKeys:"all",className:"pt-2 mt-3",showDivider:!1,itemClasses:{base:"py-1",title:"text-sm font-medium leading-7",trigger:"py-2 border-b border-gray-200",indicator:'data-[open="true"]:rotate-180',content:"pt-2 pb-3"},children:u.map(t=>e(w,{textValue:t.label,title:e(j,{filter:t,appliedFilters:r,onFilterChange:o}),disableIndicatorAnimation:!0,indicator:M,children:e("div",{className:"pt-2",children:e(I,{filter:t,onFilterChange:o,appliedFilters:r,variant:"sidebar"})})},t.code))});return l(h,{children:[l("div",{className:"hidden lg:flex lg:flex-col lg:basis-[16.5rem] lg:shrink-0",children:[d,p(),r.length>0&&e("button",{type:"button",className:"text-sm text-fg-muted hover:text-slate-700 transition-colors mt-4 mb-8",onClick:()=>o([]),children:"Clear all filters"})]}),e("div",{className:"lg:hidden",children:e(x,{children:e(y,{isOpen:c,onOpenChange:t=>m(t),isDismissable:!0,children:e(N,{children:e(k,{size:"30rem",direction:"left","aria-label":"Filters",className:"p-5",children:({close:t})=>l("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[l("div",{className:"flex items-center w-full justify-between",children:[e("span",{className:"text-xl font-bold text-slate-800",children:"Filters"}),e(f,{variant:"ghost","aria-label":"Close",onPress:()=>t(),className:"justify-start size-auto p-0",children:e(C,{})})]}),l("div",{className:"flex flex-col flex-1 overflow-x-hidden overflow-y-auto [scrollbar-width:none] [-webkit-overflow-scrolling:touch] [&::-webkit-scrollbar]:hidden",children:[d&&e("div",{className:"mt-3",children:d}),p(),i===0&&e(L,{searchQuery:s,hasFilters:r.length>0,onClearFilters:()=>o([]),onClearSearch:s&&n?()=>n(""):void 0})]}),l("div",{className:"shrink-0 pt-3 flex flex-col gap-3 border-t border-gray-200",children:[r.length>0&&e("button",{type:"button",className:"text-sm py-2 text-fg-muted hover:text-slate-700 transition-colors",onClick:()=>o([]),children:"Clear all"}),e(f,{className:"w-full py-6 text-base rounded-xl",variant:"primary",onPress:()=>t(),children:"View Results"})]})]})})})})})})]})}export{fe as CollectionFilters};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CollectionFilters as L}from"./CollectionFilters.js";import"react/jsx-runtime";import"react";import"../../Accordion/Accordion.js";import"@heroui/accordion";import"../../../utils/cn.js";import"../../Icon/DownArrow.js";import"../../Button/Button.js";import"react-aria-components";import"
|
|
1
|
+
import{CollectionFilters as L}from"./CollectionFilters.js";import"react/jsx-runtime";import"react";import"../../Accordion/Accordion.js";import"@heroui/accordion";import"../../../utils/cn.js";import"../../Icon/DownArrow.js";import"../../Button/Button.js";import"react-aria-components";import"../../ModalOverlay/ModalOverlay.js";import"framer-motion";import"../../DialogTrigger/DialogTrigger.js";import"../../Modal/Modal.js";import"../../Drawer/Drawer.js";import"../../Icon/Cross.js";import"../../Icon/CrossSmall.js";import"../../Icon/Search.js";import"../FilterRenderer/FilterRenderer.js";import"../../../utils/env.js";import"../../../utils/swatch.js";import"../FilterRenderer/Renderer/Option.js";import"../../Checkbox/Checkbox.js";import"../FilterRenderer/Renderer/useOptionFilterToggle.js";import"../FilterRenderer/Renderer/Swatch.js";import"../FilterRenderer/Renderer/Swatch/SwatchColor.js";import"../../Icon/CheckIcon.js";import"../../../utils/color.js";import"../FilterRenderer/Renderer/Swatch/SwatchImage.js";import"../FilterRenderer/Renderer/Swatch/SwatchText.js";import"../FilterRenderer/Renderer/Boolean.js";import"../../RadioGroup/RadioGroup.js";import"../../Radio/Radio.js";import"../FilterRenderer/Renderer/Range.js";import"../../../utils/collection/mergeFilters.js";import"../FilterAccordionTitle/FilterAccordionTitle.js";import"../EmptyResults/EmptyResults.js";export{L as CollectionFilters};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CollectionFilters/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CollectionFilters/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as i,jsx as l}from"react/jsx-runtime";import{Option as p}from"../../Select/Option.js";import{Select as x}from"../../Select/Select.js";import{Button as h}from"../../Button/Button.js";import"
|
|
1
|
+
"use client";import{jsxs as i,jsx as l}from"react/jsx-runtime";import{Option as p}from"../../Select/Option.js";import{Select as x}from"../../Select/Select.js";import{Button as h}from"../../Button/Button.js";import"../../../utils/cn.js";import{FilterIcon as d}from"../../Icon/FilterIcon.js";import"react-stately";import"react";import"../../Select/ButtonSelect.js";import"react-aria";import"@react-aria/interactions";import"../../Select/parts.js";import"react-aria-components";import"../../Select/ComboBoxSelect.js";import"../../Loader/Pulse.js";import"../../Select/MultiButtonSelect.js";function D({totalItems:o,startItem:s,endItem:r,setShowMobileFilters:m,availableSortOrders:a,appliedSortOrder:e,onSortChange:n}){const c=[...e?[e]:[],...a];return i("div",{className:"flex flex-col gap-y-5 mb-3",children:[i("div",{className:"flex items-center justify-between lg:justify-end gap-x-2",children:[i(h,{className:"lg:hidden grow-0 shrink-0 basis-auto gap-x-3 px-4",size:"sm",variant:"outline",onPress:()=>m(!0),"aria-details":"show filters",children:[l(d,{className:"w-3 h-3"}),"Filters"]}),l(x,{className:"w-44",selectedKey:e?`${e.code}_${e.direction}`:null,onSelectionChange:n,placeholder:"Sort by",label:"Sort By:",classNames:{input:"text-xs w-44 h-8 min-h-0",value:"text-xs",label:"hidden lg:block text-xs text-gray-600 whitespace-nowrap"},children:c.map(t=>l(p,{textValue:t.label,children:t.label},`${t.code}_${t.direction}`))})]}),o>0&&i("p",{className:"text-sm text-fg-muted",children:["Displaying ",s," - ",r," of ",o," items"]})]})}export{D as CollectionToolbar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CollectionToolbar as
|
|
1
|
+
import{CollectionToolbar as h}from"./CollectionToolbar.js";import"react/jsx-runtime";import"../../Select/Option.js";import"react-stately";import"../../Select/Select.js";import"react";import"../../Select/ButtonSelect.js";import"react-aria";import"@react-aria/interactions";import"../../../utils/cn.js";import"../../Select/parts.js";import"react-aria-components";import"../../Select/ComboBoxSelect.js";import"../../Loader/Pulse.js";import"../../Select/MultiButtonSelect.js";import"../../Button/Button.js";import"../../Icon/FilterIcon.js";export{h as CollectionToolbar};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CollectionToolbar/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CollectionToolbar/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as o,jsx as t}from"react/jsx-runtime";function m({searchQuery:e,hasFilters:
|
|
1
|
+
"use client";import{jsxs as o,jsx as t}from"react/jsx-runtime";function m({searchQuery:e,hasFilters:n,onClearFilters:s,onClearSearch:l}){const i=n&&s||e&&l;return o("div",{className:"flex flex-col items-center justify-center py-16 px-4 text-center col-span-full",children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-slate-300 mb-4",children:[t("circle",{cx:"11",cy:"11",r:"8"}),t("path",{d:"m21 21-4.3-4.3"})]}),t("h3",{className:"text-lg font-semibold text-slate-800 mb-2",children:"No results found"}),e&&o("p",{className:"text-sm text-fg-muted mb-4",children:["We couldn't find anything matching “",e,"”"]}),!e&&!n&&t("p",{className:"text-sm text-fg-muted mb-4",children:"No products match your current selection."}),i&&o("div",{className:"flex items-center gap-3",children:[e&&l&&t("button",{type:"button",onClick:l,className:"text-sm font-medium text-slate-700 hover:text-fg underline underline-offset-2 transition-colors",children:"Clear search"}),n&&s&&e&&l&&t("span",{className:"text-slate-300",children:"|"}),n&&s&&t("button",{type:"button",onClick:s,className:"text-sm font-medium text-slate-700 hover:text-fg underline underline-offset-2 transition-colors",children:"Clear all filters"})]}),!i&&t("p",{className:"text-xs text-fg-subtle",children:"Try a different search term or browse our categories."})]})}export{m as EmptyResults};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EmptyResults/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EmptyResults/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as
|
|
1
|
+
"use client";import{jsxs as c,jsx as l}from"react/jsx-runtime";import{CrossSmall as i}from"../../Icon/CrossSmall.js";import"../../../utils/cn.js";function m({filter:e,appliedFilters:n,onFilterChange:t}){const a=n.some(o=>o.code===e.code),r=o=>{o.stopPropagation(),t(n.filter(s=>s.code!==e.code))};return c("span",{className:"flex items-center gap-2 w-full",children:[e.label,a&&l("span",{role:"button",tabIndex:0,onClick:r,onPointerDown:o=>o.stopPropagation(),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r(o))},"aria-label":`Clear ${e.label} filter`,className:"p-1 rounded-full hover:bg-surface-subtle transition-colors cursor-pointer",children:l(i,{})})]})}export{m as FilterAccordionTitle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FilterAccordionTitle/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FilterAccordionTitle/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as l}from"react/jsx-runtime";import{RadioGroup as x}from"../../../RadioGroup/RadioGroup.js";import{Radio as c}from"../../../Radio/Radio.js";import"react-aria-components";import"../../../../utils/cn.js";function f({filter:e,onFilterChange:i,appliedFilters:t,variant:m="drawer"}){const p=a=>{const r=a==="true";if(a==="none"){i(t.filter(d=>d.code!==e.code));return}const h={__typename:"CollectionFilterAppliedBoolean",code:e.code,label:e.label,renderer:e.renderer,type:e.type,includeInFilters:e.includeInFilters,trueLabel:e.trueLabel,falseLabel:e.falseLabel,appliedValue:r};i([...t.filter(d=>d.code!==e.code),h])},b=()=>{const a=t.find(r=>r.code===e.code);return a?a.appliedValue?"true":"false":"none"},o="__typename"in e&&e.__typename==="CollectionFilterAvailableBoolean"?e.trueItemCount:null,s="__typename"in e&&e.__typename==="CollectionFilterAvailableBoolean"?e.falseItemCount:null,u=n(x,{value:b(),onChange:p,children:l("div",{className:"space-y-2",children:[n(c,{value:"none",children:n("span",{className:"text-sm",children:"None"})}),l("div",{className:"flex items-center justify-between",children:[n(c,{value:"true",children:n("span",{className:"text-sm",children:e.trueLabel})}),o!=null&&l("span",{className:"text-xs text-fg-muted",children:["(",o,")"]})]}),l("div",{className:"flex items-center justify-between",children:[n(c,{value:"false",children:n("span",{className:"text-sm",children:e.falseLabel})}),s!=null&&l("span",{className:"text-xs text-fg-muted",children:["(",s,")"]})]})]})});return m==="sidebar"?n("div",{className:"pb-2",children:u}):l("div",{className:"border border-border-subtle rounded-lg p-4",children:[n("h4",{className:"font-medium mb-3",children:e.label}),u]})}export{f as FilterRendererBoolean,f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as r,jsxs as n}from"react/jsx-runtime";import{Checkbox as h}from"../../../Checkbox/Checkbox.js";import{useOptionFilterToggle as p}from"./useOptionFilterToggle.js";import"react-aria-components";import"../../../../utils/cn.js";function C({filter:o,onFilterChange:a,appliedFilters:i,variant:d="drawer"}){const{handleOptionToggle:m,getOptionIsChecked:u}=p({filter:o,onFilterChange:a,appliedFilters:i}),t=o.options.map(e=>{const l=u(e.code),c="itemCount"in e?e.itemCount:null;return r("div",{className:"flex items-center",children:r(h,{isSelected:l,onChange:s=>m(e.code,s),className:"cursor-pointer",children:({isHovered:s})=>n("span",{className:"text-sm transition-colors duration-150",style:{color:s?"#777777":"#303133"},children:[e.label,c!=null&&n("span",{className:"ml-1 transition-opacity duration-150",style:{color:"#777777",opacity:s?.7:1},children:["(",c,")"]})]})},`checkbox-${o.code}-${e.code}-${String(l)}`)},`${o.code}-${e.code}`)});return d==="sidebar"?r("div",{className:"space-y-2 pb-2",children:t}):n("div",{className:"border border-border-subtle rounded-lg p-4",children:[r("h4",{className:"font-medium mb-3",children:o.label}),r("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:t})]})}export{C as FilterRendererOption,C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as
|
|
1
|
+
"use client";import{jsxs as t,jsx as e}from"react/jsx-runtime";function l({filter:r}){return t("div",{className:"border border-border-subtle rounded-lg p-4",children:[e("h4",{className:"font-medium mb-3",children:r.label}),e("div",{className:"text-sm text-fg-muted",children:"Range filter coming soon"})]})}export{l as FilterRendererRange,l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as c,jsxs as d}from"react/jsx-runtime";import{Checkbox as p}from"../../../../Checkbox/Checkbox.js";import{CheckIcon as C}from"../../../../Icon/CheckIcon.js";import{cn as
|
|
1
|
+
"use client";import{jsx as c,jsxs as d}from"react/jsx-runtime";import{Checkbox as p}from"../../../../Checkbox/Checkbox.js";import{CheckIcon as C}from"../../../../Icon/CheckIcon.js";import{cn as b}from"../../../../../utils/cn.js";import{isDevelopment as x}from"../../../../../utils/env.js";import{isVeryLight as v,isValidHex as k}from"../../../../../utils/color.js";import{isValidImageUrl as S}from"../../../../../utils/swatch.js";import{useOptionFilterToggle as I}from"../useOptionFilterToggle.js";import"react-aria-components";function B({filter:r,onFilterChange:$,appliedFilters:w,variant:f="drawer"}){const{handleOptionToggle:m,getOptionIsChecked:y}=I({filter:r,onFilterChange:$,appliedFilters:w}),h=r.options.map(e=>{const t=y(e.code),i="itemCount"in e?e.itemCount:null,n=e.swatch?.imageUrl??null,s=e.swatch?.hex??null,a=S(n),g=k(s);if(!a&&!g)return x&&(n&&!a&&console.warn(`[Swatch] Invalid imageUrl "${n}" on option "${e.code}" for attribute "${r.code}"`),s&&!g&&console.warn(`[Swatch] Invalid hex "${s}" on option "${e.code}" for attribute "${r.code}"`),!n&&!s&&console.warn(`[Swatch] Missing hex and imageUrl on option "${e.code}" for attribute "${r.code}"`)),c("div",{className:"flex items-center",children:c(p,{isSelected:t,className:"cursor-pointer",onChange:o=>m(e.code,o),children:c("span",{className:"text-sm",children:e.label})},`swatch-${r.code}-${e.code}-${String(t)}`)},`${r.code}-${e.code}`);x&&n&&!a&&console.warn(`[Swatch] Falling back to SWATCH (hex) renderer for attribute "${r.code}" option "${e.code}" — invalid imageUrl "${n}"`);const u=a?!1:v(s),N=a?{backgroundImage:`url(${n})`}:{backgroundColor:s??void 0};return c("div",{className:"flex items-center",children:c(p,{isSelected:t,className:"cursor-pointer",onChange:o=>m(e.code,o),slots:{control:({isSelected:o,isHovered:l})=>c("span",{className:b("relative inline-flex items-center justify-center size-[22px] rounded-full shrink-0 transition-all duration-150",a&&"bg-cover bg-center",a&&o&&"ring-2 ring-inset ring-white shadow-[0_0_0_2px_#222]",a&&l&&!o&&"ring-1 ring-border-emphasis",!a&&u&&"border border-border"),style:N,children:!a&&(o||l)&&c(C,{className:b("w-3 h-3 transition-opacity duration-150",u?"text-fg-subtle":"text-white drop-shadow-sm",l&&!o&&"opacity-70")})})},children:({isHovered:o})=>d("span",{className:"text-sm transition-colors duration-150",style:{color:o?"#777777":"#303133"},children:[e.label,i!=null&&d("span",{className:"ml-1 transition-opacity duration-150",style:{color:"#777777",opacity:o?.7:1},children:["(",i,")"]})]})},`swatch-${r.code}-${e.code}-${String(t)}`)},`${r.code}-${e.code}`)});return f==="sidebar"?c("div",{className:"grid grid-cols-2 gap-x-2 gap-y-2.5 px-0.5 pb-2",children:h}):d("div",{className:"border border-border-subtle rounded-lg p-4",children:[c("h4",{className:"font-medium mb-3",children:r.label}),c("div",{className:"grid grid-cols-2 gap-x-2 gap-y-2.5 max-h-60 overflow-y-auto",children:h})]})}export{B as SwatchColor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as g}from"react/jsx-runtime";import{Button as b}from"react-aria-components";import{cn as u}from"../../../../../utils/cn.js";import{useOptionFilterToggle as p}from"../useOptionFilterToggle.js";function v({filter:
|
|
1
|
+
"use client";import{jsx as r,jsxs as g}from"react/jsx-runtime";import{Button as b}from"react-aria-components";import{cn as u}from"../../../../../utils/cn.js";import{useOptionFilterToggle as p}from"../useOptionFilterToggle.js";function v({filter:s,onFilterChange:t,appliedFilters:d,variant:c="drawer"}){const{handleOptionToggle:i,getOptionIsChecked:n}=p({filter:s,onFilterChange:t,appliedFilters:d}),o=s.options.map(e=>{const a=n(e.code),l=e.swatch?.imageUrl??null;return r(b,{"aria-label":e.label,"aria-pressed":a,className:"cursor-pointer p-0",onPress:()=>i(e.code,!a),children:({isHovered:m})=>r("span",{className:u("block w-full aspect-[2.2/1] border bg-contain bg-center bg-no-repeat transition-all duration-150",a?"border-fg ring-1 ring-fg":"border-border-subtle",m&&!a&&"border-border-emphasis",!l&&"flex items-center justify-center text-xs text-fg-muted"),title:e.label,style:l?{backgroundImage:`url(${l})`}:void 0,children:!l&&e.label})},`${s.code}-${e.code}`)});return c==="sidebar"?r("div",{className:"grid grid-cols-3 gap-2 pb-2",children:o}):g("div",{className:"border border-border-subtle rounded-lg p-4",children:[r("h4",{className:"font-medium mb-3",children:s.label}),r("div",{className:"grid grid-cols-3 gap-2 max-h-60 overflow-y-auto",children:o})]})}export{v as SwatchImage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as x}from"react/jsx-runtime";import{Checkbox as
|
|
1
|
+
"use client";import{jsx as r,jsxs as x}from"react/jsx-runtime";import{Checkbox as b}from"../../../../Checkbox/Checkbox.js";import{cn as p}from"../../../../../utils/cn.js";import{useOptionFilterToggle as u}from"../useOptionFilterToggle.js";import"react-aria-components";function $({filter:t,onFilterChange:n,appliedFilters:a,variant:d="drawer"}){const{handleOptionToggle:i,getOptionIsChecked:l}=u({filter:t,onFilterChange:n,appliedFilters:a}),s=t.options.map(e=>{const c=l(e.code),m=e.swatch?.text??e.label;return r("div",{children:r(b,{isSelected:c,className:"cursor-pointer",onChange:o=>i(e.code,o),slots:{control:({isSelected:o,isHovered:h})=>r("span",{className:p("inline-flex items-center justify-center px-3.5 py-2 text-xs font-medium border shrink-0 transition-colors duration-150",o?"bg-surface-inverse text-white border-fg":"bg-white text-slate-700 border-border",h&&!o&&"border-slate-500"),children:m})}},`swatch-${t.code}-${e.code}-${String(c)}`)},`${t.code}-${e.code}`)});return d==="sidebar"?r("div",{className:"flex flex-wrap gap-2 pb-2",children:s}):x("div",{className:"border border-border-subtle rounded-lg p-4",children:[r("h4",{className:"font-medium mb-3",children:t.label}),r("div",{className:"flex flex-wrap gap-2 max-h-60 overflow-y-auto",children:s})]})}export{$ as SwatchText};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Renderer/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Renderer/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FilterRenderer/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FilterRenderer/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as c,jsxs as I,Fragment as
|
|
1
|
+
"use client";import{jsx as c,jsxs as I,Fragment as R}from"react/jsx-runtime";import{Button as p}from"react-aria-components";import{cn as b}from"../../../utils/cn.js";import{CheckIcon as M}from"../../Icon/CheckIcon.js";import{isDevelopment as x}from"../../../utils/env.js";import{isValidHex as P,isVeryLight as j}from"../../../utils/color.js";import{isSwatchRenderer as y,SwatchRenderer as $,isValidImageUrl as _}from"../../../utils/swatch.js";function L(d){const s=new Map;for(const a of d)if("renderer"in a&&y(a.renderer)&&"options"in a)for(const r of a.options)r.swatch&&s.set(r.id,{...r.swatch,attributeCode:a.code,optionCode:r.code});return s}function T(d){const s=new Set;for(const a of d)if(a.simpleProduct?.saleability?.isSaleable!==!1)for(const r of a.attributes)s.add(`${r.attribute.code}:${r.option.code}`);return s}function V(d,s,a,r){const m=new Set,h=[];for(const l of d)for(const i of l.attributes){const f=s.get(i.option.id);f&&!m.has(i.option.id)&&a.has(i.attribute.code)&&(m.add(i.option.id),h.push({optionId:i.option.id,optionCode:f.optionCode,attributeCode:i.attribute.code,label:i.option.label,swatch:f,image:l.simpleProduct.image??null,isSaleable:r.has(`${i.attribute.code}:${i.option.code}`)}))}return h.sort((l,i)=>l.isSaleable===i.isSaleable?0:l.isSaleable?-1:1),h}function O({variants:d,availableFilters:s,attributeSwatchConfigs:a=[],matchedOptionIds:r,selectedOptionId:m,onSelect:h}){const l=new Map;for(const e of a)e.swatch?.listRenderer&&(x&&!y(e.swatch.listRenderer)&&console.warn(`[Swatch] Unknown listRenderer "${e.swatch.listRenderer}" for attribute "${e.code}" — skipping list swatches`),l.set(e.code,e.swatch.listRenderer));const i=L(s),f=T(d),u=V(d,i,l,f);if(u.length===0)return null;const U=new Set(u.map(e=>e.optionId)),k=r.find(e=>U.has(e)),N=m??k??u[0]?.optionId??null,S=u[0]?l.get(u[0].attributeCode)??null:null;return c("div",{className:"flex flex-row flex-wrap items-center gap-1.5 mt-1.5",children:u.map(e=>{const o=N===e.optionId,w=e.isSaleable?e.label:`${e.label} (out of stock)`;if(S===$.IMAGE)return c(p,{"aria-label":w,className:"cursor-pointer p-0",onPress:()=>{h(e.optionId,e.optionCode,e.image,e.attributeCode)},children:({isHovered:t})=>c("span",{className:b("block w-8 aspect-[2.2/1] border bg-contain bg-center bg-no-repeat transition-all duration-150",o?"border-fg ring-1 ring-fg":"border-border-subtle",t&&!o&&"border-border-emphasis"),title:w,style:e.swatch.imageUrl?{backgroundImage:`url(${e.swatch.imageUrl})`}:void 0})},e.optionId);if(S===$.TEXT)return c(p,{"aria-label":w,className:"cursor-pointer p-0",onPress:()=>{h(e.optionId,e.optionCode,e.image,e.attributeCode)},children:({isHovered:t})=>c("span",{className:b("inline-flex items-center px-1.5 py-0.5 text-[10px] font-medium border transition-colors duration-150",o?"bg-surface-inverse text-white border-fg":"bg-white text-slate-700 border-border",t&&!o&&"border-slate-500"),children:e.swatch.text??e.label})},e.optionId);const n=_(e.swatch.imageUrl),C=P(e.swatch.hex);if(!n&&!C){if(x){const t=[];e.swatch.hex&&!C&&t.push(`invalid hex "${e.swatch.hex}"`),e.swatch.imageUrl&&!n&&t.push(`invalid imageUrl "${e.swatch.imageUrl}"`),!e.swatch.hex&&!e.swatch.imageUrl&&t.push("missing hex and imageUrl"),console.warn(`[Swatch] Skipping list swatch for attribute "${e.attributeCode}" option "${e.optionCode}" — ${t.join("; ")}`)}return null}x&&e.swatch.imageUrl&&!n&&console.warn(`[Swatch] Falling back to SWATCH (hex) renderer for attribute "${e.attributeCode}" option "${e.optionCode}" — invalid imageUrl "${e.swatch.imageUrl}"`);const g=n?!1:j(e.swatch.hex??null),v=n?{backgroundImage:`url(${e.swatch.imageUrl})`}:{backgroundColor:e.swatch.hex??void 0};return c(p,{"aria-label":w,className:"cursor-pointer size-4 flex items-center justify-center p-0",onPress:()=>{h(e.optionId,e.optionCode,e.image,e.attributeCode)},children:({isHovered:t})=>I("span",{className:b("relative inline-flex items-center justify-center size-4 rounded-full transition-all duration-150 overflow-hidden",n&&"bg-cover bg-center",n&&o&&"ring-2 ring-inset ring-white shadow-[0_0_0_2px_#222]",n&&t&&!o&&"ring-1 ring-border-emphasis",!n&&g&&"border border-border"),style:v,children:[!e.isSaleable&&I(R,{children:[c("span",{className:b("absolute top-1/2 left-1/2 w-[141%] h-[1.5px] -translate-x-1/2 -translate-y-1/2 -rotate-45",g?"bg-slate-400":"bg-white drop-shadow-sm",t&&!o&&"opacity-70")}),(o||t)&&c("span",{className:b("absolute top-1/2 left-1/2 w-[141%] h-[1.5px] -translate-x-1/2 -translate-y-1/2 rotate-45",g?"bg-slate-400":"bg-white drop-shadow-sm",t&&!o&&"opacity-70")})]}),!n&&e.isSaleable&&(o||t)&&c(M,{className:b("w-2.5 h-2.5 transition-opacity duration-150",g?"text-fg-subtle":"text-white drop-shadow-sm",t&&!o&&"opacity-70")})]})},e.optionId)})})}export{O as ProductCardSwatches};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductCardSwatches/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductCardSwatches/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductPrice/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ProductPrice/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AttributeDataProvider as V,useAttributeData as W}from"./AttributeDataProvider/AttributeDataProvider.js";import{EmptyResults as Y}from"./EmptyResults/EmptyResults.js";import{ProductPrice as _}from"./ProductPrice/ProductPrice.js";import{FilterRenderer as rr}from"./FilterRenderer/FilterRenderer.js";import{CollectionFilterChips as tr}from"./CollectionFilterChips/CollectionFilterChips.js";import{FilterAccordionTitle as pr}from"./FilterAccordionTitle/FilterAccordionTitle.js";import{ProductCardSwatches as er}from"./ProductCardSwatches/ProductCardSwatches.js";import{CollectionFilters as cr}from"./CollectionFilters/CollectionFilters.js";import{CollectionToolbar as xr}from"./CollectionToolbar/CollectionToolbar.js";import"react/jsx-runtime";import"react";import"../../utils/env.js";import"../../utils/swatch.js";import"./FilterRenderer/Renderer/Option.js";import"../Checkbox/Checkbox.js";import"react-aria-components";import"../../utils/cn.js";import"./FilterRenderer/Renderer/useOptionFilterToggle.js";import"./FilterRenderer/Renderer/Swatch.js";import"./FilterRenderer/Renderer/Swatch/SwatchColor.js";import"../Icon/CheckIcon.js";import"../../utils/color.js";import"./FilterRenderer/Renderer/Swatch/SwatchImage.js";import"./FilterRenderer/Renderer/Swatch/SwatchText.js";import"./FilterRenderer/Renderer/Boolean.js";import"../RadioGroup/RadioGroup.js";import"../Radio/Radio.js";import"./FilterRenderer/Renderer/Range.js";import"../Button/Button.js";import"
|
|
1
|
+
import{AttributeDataProvider as V,useAttributeData as W}from"./AttributeDataProvider/AttributeDataProvider.js";import{EmptyResults as Y}from"./EmptyResults/EmptyResults.js";import{ProductPrice as _}from"./ProductPrice/ProductPrice.js";import{FilterRenderer as rr}from"./FilterRenderer/FilterRenderer.js";import{CollectionFilterChips as tr}from"./CollectionFilterChips/CollectionFilterChips.js";import{FilterAccordionTitle as pr}from"./FilterAccordionTitle/FilterAccordionTitle.js";import{ProductCardSwatches as er}from"./ProductCardSwatches/ProductCardSwatches.js";import{CollectionFilters as cr}from"./CollectionFilters/CollectionFilters.js";import{CollectionToolbar as xr}from"./CollectionToolbar/CollectionToolbar.js";import"react/jsx-runtime";import"react";import"../../utils/env.js";import"../../utils/swatch.js";import"./FilterRenderer/Renderer/Option.js";import"../Checkbox/Checkbox.js";import"react-aria-components";import"../../utils/cn.js";import"./FilterRenderer/Renderer/useOptionFilterToggle.js";import"./FilterRenderer/Renderer/Swatch.js";import"./FilterRenderer/Renderer/Swatch/SwatchColor.js";import"../Icon/CheckIcon.js";import"../../utils/color.js";import"./FilterRenderer/Renderer/Swatch/SwatchImage.js";import"./FilterRenderer/Renderer/Swatch/SwatchText.js";import"./FilterRenderer/Renderer/Boolean.js";import"../RadioGroup/RadioGroup.js";import"../Radio/Radio.js";import"./FilterRenderer/Renderer/Range.js";import"../Button/Button.js";import"../Icon/CrossSmall.js";import"../../utils/collection/getAppliedFilterChips.js";import"../../utils/collection/removeFilterChip.js";import"../Accordion/Accordion.js";import"@heroui/accordion";import"../Icon/DownArrow.js";import"../ModalOverlay/ModalOverlay.js";import"framer-motion";import"../DialogTrigger/DialogTrigger.js";import"../Modal/Modal.js";import"../Drawer/Drawer.js";import"../Icon/Cross.js";import"../Icon/Search.js";import"../../utils/collection/mergeFilters.js";import"../Select/Option.js";import"react-stately";import"../Select/Select.js";import"../Select/ButtonSelect.js";import"react-aria";import"@react-aria/interactions";import"../Select/parts.js";import"../Select/ComboBoxSelect.js";import"../Loader/Pulse.js";import"../Select/MultiButtonSelect.js";import"../Icon/FilterIcon.js";export{V as AttributeDataProvider,tr as CollectionFilterChips,cr as CollectionFilters,xr as CollectionToolbar,Y as EmptyResults,pr as FilterAccordionTitle,rr as FilterRenderer,er as ProductCardSwatches,_ as ProductPrice,W as useAttributeData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Collection/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Collection/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Container/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Container/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n}from"react/jsx-runtime";import{Popover as
|
|
1
|
+
"use client";import{jsx as n}from"react/jsx-runtime";import{Popover as b,Menu as f}from"react-aria-components";import{forwardRef as _}from"react";import{motion as v}from"framer-motion";import{cn as t}from"../../utils/cn.js";const c=_(({style:e,...o},r)=>{const i=typeof e=="function"?e(o):e;return n(b,{...o,ref:r,style:i})});let d=null;function w(){return typeof window>"u"?null:(d||(d=v.create(c)),d)}const s=w();function C({children:e,key:o,onAction:r,setAnimation:i,animation:a="hidden",className:x,classNames:u,...m}){const p=t("px-0 py-1.5","shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-4px_rgba(0,0,0,0.1)]","rounded-md","w-56","bg-white","border border-solid border-border",x);return s?n(s,{className:p,isExiting:a==="hidden",onAnimationComplete:h=>{i(l=>h==="hidden"&&l==="hidden"?"unmounted":l)},variants:{hidden:{opacity:0,y:-10},visible:{opacity:1,y:0}},initial:"hidden",animate:a,...m,children:n(f,{className:t("outline-none",u?.menu),onAction:r,children:e})},o):n(c,{className:p,...m,children:n(f,{className:t("outline-none",u?.menu),onAction:r,children:e})},o)}export{C as ContextMenu,C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ContextMenu/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ContextMenu/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as N,jsx as
|
|
1
|
+
"use client";import{jsxs as N,jsx as o}from"react/jsx-runtime";import{N as V}from"../../assets/react-number-format.es-Bf_lGveD.js";import{TextField as v,Label as I,Text as C,FieldError as w,Input as F}from"react-aria-components";import{useState as $}from"react";import{cn as t}from"../../utils/cn.js";function j({className:i,...n}){return o(F,{className:t("border-solid border border-border rounded-md","text-sm text-fg placeholder-fg-subtle","h-10 px-2 py-0 m-0 w-full","bg-white","transition-all duration-200 ease-in-out","hover:border-border-emphasis","focus:outline-2 focus:outline focus:outline-border-subtle focus:border-border-emphasis","disabled:border-border-subtle disabled:bg-surface-subtle","invalid:border-danger-soft invalid:bg-danger-surface invalid:text-danger","invalid:hover:border-danger invalid:focus:border-danger invalid:focus:outline-danger-ring",i),...n})}function L({label:i,description:n,errorMessage:a,placeholder:d,value:s,className:u,classNames:l,onChange:f,...m}){const[b,c]=$(""),x=s??b,g=r=>{if(r==="")return"";let e=r.substring(0,2);const h=r.substring(2,4);return e.length===1&&Number(e[0])>1?e=`0${e[0]}`:e.length===2&&(Number(e)===0?e="01":Number(e)>12&&(e="12")),`${e}/${h}`},p=r=>{c(r.formattedValue),f?.(r.formattedValue)};return N(v,{className:t("flex flex-col w-full text-fg",u),...m,children:[o(I,{className:t("flex text-fg-muted text-xs",l?.label),children:i}),o(V,{format:g,customInput:j,className:t(l?.input),placeholder:d,value:x,onValueChange:p}),n&&o(C,{className:t("flex text-fg-muted text-sm",l?.description),slot:"description",children:n}),o(w,{className:t("flex text-danger-soft text-sm",l?.error),children:a})]})}export{L as CreditCardExpirationInput,L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CreditCardExpirationInput/index';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CreditCardExpirationInput/index.js';
|