@clicktap/ui 0.41.1 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/assets/react-number-format.es-LSEUnuG5.js +1 -0
  2. package/components/Accordion/Accordion.js +1 -1
  3. package/components/Accordion.d.ts +1 -0
  4. package/components/Accordion.js +1 -0
  5. package/components/AssetRenderer/renderers/DownloadLink.d.ts +1 -1
  6. package/components/AssetRenderer/renderers.d.ts +1 -0
  7. package/components/AssetRenderer/renderers.js +1 -0
  8. package/components/AssetRenderer.d.ts +1 -0
  9. package/components/AssetRenderer.js +1 -0
  10. package/components/Avatar/Avatar.js +1 -1
  11. package/components/Avatar.d.ts +1 -0
  12. package/components/Avatar.js +1 -0
  13. package/components/Badge/Badge.js +1 -1
  14. package/components/Badge.d.ts +1 -0
  15. package/components/Badge.js +1 -0
  16. package/components/Breadcrumbs/BreadcrumbLink.js +1 -1
  17. package/components/Breadcrumbs.d.ts +1 -0
  18. package/components/Breadcrumbs.js +1 -0
  19. package/components/Button/Button.js +1 -1
  20. package/components/Button/ButtonLoadingContent.js +1 -1
  21. package/components/Button/index.js +1 -1
  22. package/components/Button.d.ts +1 -0
  23. package/components/Button.js +1 -0
  24. package/components/Card.d.ts +1 -0
  25. package/components/Card.js +1 -0
  26. package/components/Checkbox/Checkbox.js +1 -1
  27. package/components/Checkbox.d.ts +1 -0
  28. package/components/Checkbox.js +1 -0
  29. package/components/Collapsible.d.ts +1 -0
  30. package/components/Collapsible.js +1 -0
  31. package/components/Collection/AttributeDataProvider.d.ts +1 -0
  32. package/components/Collection/AttributeDataProvider.js +1 -0
  33. package/components/Collection/CollectionFilterChips/CollectionFilterChips.js +1 -1
  34. package/components/Collection/CollectionFilterChips/index.js +1 -1
  35. package/components/Collection/CollectionFilterChips.d.ts +1 -0
  36. package/components/Collection/CollectionFilterChips.js +1 -0
  37. package/components/Collection/CollectionFilters/CollectionFilters.js +1 -1
  38. package/components/Collection/CollectionFilters/index.js +1 -1
  39. package/components/Collection/CollectionFilters.d.ts +1 -0
  40. package/components/Collection/CollectionFilters.js +1 -0
  41. package/components/Collection/CollectionToolbar/CollectionToolbar.js +1 -1
  42. package/components/Collection/CollectionToolbar/index.js +1 -1
  43. package/components/Collection/CollectionToolbar.d.ts +1 -0
  44. package/components/Collection/CollectionToolbar.js +1 -0
  45. package/components/Collection/EmptyResults/EmptyResults.js +1 -1
  46. package/components/Collection/EmptyResults.d.ts +1 -0
  47. package/components/Collection/EmptyResults.js +1 -0
  48. package/components/Collection/FilterAccordionTitle/FilterAccordionTitle.js +1 -1
  49. package/components/Collection/FilterAccordionTitle.d.ts +1 -0
  50. package/components/Collection/FilterAccordionTitle.js +1 -0
  51. package/components/Collection/FilterRenderer/Renderer/Boolean.js +1 -1
  52. package/components/Collection/FilterRenderer/Renderer/Option.js +1 -1
  53. package/components/Collection/FilterRenderer/Renderer/Range.js +1 -1
  54. package/components/Collection/FilterRenderer/Renderer/Swatch/SwatchColor.js +1 -1
  55. package/components/Collection/FilterRenderer/Renderer/Swatch/SwatchImage.js +1 -1
  56. package/components/Collection/FilterRenderer/Renderer/Swatch/SwatchText.js +1 -1
  57. package/components/Collection/FilterRenderer/Renderer.d.ts +1 -0
  58. package/components/Collection/FilterRenderer/Renderer.js +1 -0
  59. package/components/Collection/FilterRenderer.d.ts +1 -0
  60. package/components/Collection/FilterRenderer.js +1 -0
  61. package/components/Collection/ProductCardSwatches/ProductCardSwatches.js +1 -1
  62. package/components/Collection/ProductCardSwatches.d.ts +1 -0
  63. package/components/Collection/ProductCardSwatches.js +1 -0
  64. package/components/Collection/ProductPrice.d.ts +1 -0
  65. package/components/Collection/ProductPrice.js +1 -0
  66. package/components/Collection/index.js +1 -1
  67. package/components/Collection.d.ts +1 -0
  68. package/components/Collection.js +1 -0
  69. package/components/Container.d.ts +1 -0
  70. package/components/Container.js +1 -0
  71. package/components/ContextMenu/ContextMenu.js +1 -1
  72. package/components/ContextMenu.d.ts +1 -0
  73. package/components/ContextMenu.js +1 -0
  74. package/components/CreditCardExpirationInput/CreditCardExpirationInput.js +1 -1
  75. package/components/CreditCardExpirationInput/index.js +1 -1
  76. package/components/CreditCardExpirationInput.d.ts +1 -0
  77. package/components/CreditCardExpirationInput.js +1 -0
  78. package/components/CreditCardInput/CreditCardInput.js +1 -1
  79. package/components/CreditCardInput/index.js +1 -1
  80. package/components/CreditCardInput.d.ts +1 -0
  81. package/components/CreditCardInput.js +1 -0
  82. package/components/DateInput/DateInput.js +1 -1
  83. package/components/DateInput.d.ts +1 -0
  84. package/components/DateInput.js +1 -0
  85. package/components/DateTimeFormat/DateTimeFormat.d.ts +1 -1
  86. package/components/DateTimeFormat.d.ts +1 -0
  87. package/components/DateTimeFormat.js +1 -0
  88. package/components/Dialog/Dialog.js +1 -1
  89. package/components/Dialog.d.ts +1 -0
  90. package/components/Dialog.js +1 -0
  91. package/components/DialogTrigger.d.ts +1 -0
  92. package/components/DialogTrigger.js +1 -0
  93. package/components/Divider.d.ts +1 -0
  94. package/components/Divider.js +1 -0
  95. package/components/DobInput/DobInput.js +1 -1
  96. package/components/DobInput/index.js +1 -1
  97. package/components/DobInput.d.ts +1 -0
  98. package/components/DobInput.js +1 -0
  99. package/components/Drawer/Drawer.js +1 -1
  100. package/components/Drawer.d.ts +1 -0
  101. package/components/Drawer.js +1 -0
  102. package/components/FeatureGate/AccessDenied.d.ts +2 -2
  103. package/components/FeatureGate/AccessDenied.js +1 -1
  104. package/components/FeatureGate/FeatureGate.d.ts +1 -1
  105. package/components/FeatureGate/FeatureGate.js +1 -1
  106. package/components/FeatureGate/PermissionRequired.d.ts +1 -1
  107. package/components/FeatureGate/PermissionRequired.js +1 -1
  108. package/components/FeatureGate/UpgradePrompt.d.ts +1 -1
  109. package/components/FeatureGate/UpgradePrompt.js +1 -1
  110. package/components/Icon/NoEntryIcon.js +1 -1
  111. package/components/Icon/StarIcon.js +1 -1
  112. package/components/Icon.d.ts +1 -0
  113. package/components/Icon.js +1 -0
  114. package/components/Image/Image.d.ts +44 -3
  115. package/components/Image/Image.js +1 -1
  116. package/components/Image/ImageContext.d.ts +30 -0
  117. package/components/Image/ImageContext.js +1 -0
  118. package/components/Image/imageShared.d.ts +74 -0
  119. package/components/Image/imageShared.js +1 -0
  120. package/components/Image/index.d.ts +3 -1
  121. package/components/Image/index.js +1 -1
  122. package/components/Image.d.ts +1 -0
  123. package/components/Image.js +1 -0
  124. package/components/Input/Input.js +1 -1
  125. package/components/Input.d.ts +1 -0
  126. package/components/Input.js +1 -0
  127. package/components/Link/Link.js +1 -1
  128. package/components/Link.d.ts +1 -0
  129. package/components/Link.js +1 -0
  130. package/components/LinkAsButton/LinkAsButton.js +1 -1
  131. package/components/LinkAsButton/index.js +1 -1
  132. package/components/LinkAsButton.d.ts +1 -0
  133. package/components/LinkAsButton.js +1 -0
  134. package/components/Loader/CircularEasing.js +1 -1
  135. package/components/Loader/Pulse.js +1 -1
  136. package/components/Loader/index.js +1 -1
  137. package/components/Loader.d.ts +1 -0
  138. package/components/Loader.js +1 -0
  139. package/components/Menu.d.ts +1 -0
  140. package/components/Menu.js +1 -0
  141. package/components/Meter/Meter.js +1 -1
  142. package/components/Meter.d.ts +1 -0
  143. package/components/Meter.js +1 -0
  144. package/components/Modal.d.ts +1 -0
  145. package/components/Modal.js +1 -0
  146. package/components/ModalOverlay.d.ts +1 -0
  147. package/components/ModalOverlay.js +1 -0
  148. package/components/NumberFormat/NumberFormat.d.ts +1 -1
  149. package/components/NumberFormat.d.ts +1 -0
  150. package/components/NumberFormat.js +1 -0
  151. package/components/NumberInput/NumberInput.js +1 -1
  152. package/components/NumberInput.d.ts +1 -0
  153. package/components/NumberInput.js +1 -0
  154. package/components/NumberTicker.d.ts +1 -0
  155. package/components/NumberTicker.js +1 -0
  156. package/components/Pagination/Pagination.js +1 -1
  157. package/components/Pagination.d.ts +1 -0
  158. package/components/Pagination.js +1 -0
  159. package/components/PasswordCheck/PasswordCheck.js +1 -1
  160. package/components/PasswordCheck.d.ts +1 -0
  161. package/components/PasswordCheck.js +1 -0
  162. package/components/PhoneInput/PhoneInput.js +1 -1
  163. package/components/PhoneInput.d.ts +1 -0
  164. package/components/PhoneInput.js +1 -0
  165. package/components/PinInput/PinInput.js +1 -1
  166. package/components/PinInput.d.ts +1 -0
  167. package/components/PinInput.js +1 -0
  168. package/components/Progressbar/LinearProgressbar.js +1 -1
  169. package/components/Progressbar.d.ts +1 -0
  170. package/components/Progressbar.js +1 -0
  171. package/components/Radio/Radio.js +1 -1
  172. package/components/Radio.d.ts +1 -0
  173. package/components/Radio.js +1 -0
  174. package/components/RadioGroup/RadioGroup.js +1 -1
  175. package/components/RadioGroup.d.ts +1 -0
  176. package/components/RadioGroup.js +1 -0
  177. package/components/ResendCode.d.ts +1 -0
  178. package/components/ResendCode.js +1 -0
  179. package/components/Select/ButtonSelect.js +1 -1
  180. package/components/Select/ComboBoxSelect.js +1 -1
  181. package/components/Select/MultiButtonSelect.js +1 -1
  182. package/components/Select/Select.js +1 -1
  183. package/components/Select/index.js +1 -1
  184. package/components/Select/parts.js +1 -1
  185. package/components/Select.d.ts +1 -0
  186. package/components/Select.js +1 -0
  187. package/components/Skeleton.d.ts +1 -0
  188. package/components/Skeleton.js +1 -0
  189. package/components/Slider/Slider.js +1 -1
  190. package/components/Slider.d.ts +1 -0
  191. package/components/Slider.js +1 -0
  192. package/components/Switch/Switch.js +1 -1
  193. package/components/Switch.d.ts +1 -0
  194. package/components/Switch.js +1 -0
  195. package/components/Table.d.ts +1 -0
  196. package/components/Table.js +1 -0
  197. package/components/Tabs/Tab.js +1 -1
  198. package/components/Tabs/TabList.js +1 -1
  199. package/components/Tabs.d.ts +1 -0
  200. package/components/Tabs.js +1 -0
  201. package/components/Time.d.ts +1 -0
  202. package/components/Time.js +1 -0
  203. package/components/TimeInput/TimeInput.js +1 -1
  204. package/components/TimeInput.d.ts +1 -0
  205. package/components/TimeInput.js +1 -0
  206. package/components/Timezone.d.ts +1 -0
  207. package/components/Timezone.js +1 -0
  208. package/components/ToggleButton/ToggleButton.js +1 -1
  209. package/components/ToggleButton.d.ts +1 -0
  210. package/components/ToggleButton.js +1 -0
  211. package/components/Tooltip.d.ts +1 -0
  212. package/components/Tooltip.js +1 -0
  213. package/components/UploadImage/UploadImage.js +1 -1
  214. package/components/UploadImage/index.js +1 -1
  215. package/components/UploadImage.d.ts +1 -0
  216. package/components/UploadImage.js +1 -0
  217. package/docs/migrations/2026/04/2026-04-24-image-placeholder-frontend-fallback.md +3 -3
  218. package/docs/migrations/2026/04/2026-04-30-prune-invalid-pdp-selections.md +2 -2
  219. package/docs/migrations/2026/04/2026-04-30-top-down-pdp-option-dependency.md +2 -2
  220. package/docs/migrations/2026/08/2026-08-06-clicktap-ui-image-next-subpath.md +101 -0
  221. package/docs/migrations/2026/08/2026-08-06-clicktap-ui-loaders-drop-framer-motion.md +77 -0
  222. package/docs/migrations/2026/08/2026-08-06-clicktap-ui-semantic-tokens.md +106 -0
  223. package/docs/migrations/2026/08/2026-08-07-ui-peer-contract-form-graphql-optional-peers.md +62 -0
  224. package/docs/migrations/README.md +1 -0
  225. package/hooks/useCollectionState.d.ts +1 -0
  226. package/hooks/useCollectionState.js +1 -0
  227. package/hooks/useRoute/RouteContext.d.ts +8 -0
  228. package/hooks/useRoute/index.js +1 -1
  229. package/hooks/useRoute/useRoute.js +1 -1
  230. package/hooks/useRoute.d.ts +1 -0
  231. package/hooks/useRoute.js +1 -0
  232. package/next/Image.d.ts +11 -0
  233. package/next/Image.js +1 -0
  234. package/next/index.d.ts +8 -0
  235. package/next/index.js +1 -0
  236. package/package.json +97 -9
  237. package/theme.css +162 -0
  238. package/utils/collection.d.ts +1 -0
  239. package/utils/collection.js +1 -0
  240. package/utils/variantOptions.d.ts +1 -0
  241. package/utils/variantOptions.js +1 -0
  242. package/assets/react-number-format.es-Bf_lGveD.js +0 -1
  243. package/tailwind.config.js +0 -6
@@ -0,0 +1 @@
1
+ import j,{useRef as R,useState as ie,useEffect as J,useMemo as Ie,useLayoutEffect as xe}from"react";function Ae(e,t){var n={};for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&t.indexOf(u)<0&&(n[u]=e[u]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,u=Object.getOwnPropertySymbols(e);i<u.length;i++)t.indexOf(u[i])<0&&Object.prototype.propertyIsEnumerable.call(e,u[i])&&(n[u[i]]=e[u[i]]);return n}var K;(function(e){e.event="event",e.props="prop"})(K||(K={}));function N(){}function be(e){var t,n=void 0;return function(){for(var u=[],i=arguments.length;i--;)u[i]=arguments[i];return t&&u.length===t.length&&u.every(function(d,m){return d===t[m]})||(t=u,n=e.apply(void 0,u)),n}}function X(e){return!!(e||"").match(/\d/)}function Y(e){return e==null}function we(e){return typeof e=="number"&&isNaN(e)}function Te(e){return Y(e)||we(e)||typeof e=="number"&&!isFinite(e)}function Ee(e){var t=R(e);t.current=e;var n=R(function(){for(var u=[],i=arguments.length;i--;)u[i]=arguments[i];return t.current.apply(t,u)});return n.current}function ne(e,t){return Array(t+1).join(e)}function Me(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1));var u=t.split(/[eE]/g),i=u[0],d=u[1];if(d=Number(d),!d)return n+i;i=i.replace(".","");var m=1+d,y=i.length;return m<0?i="0."+ne("0",Math.abs(m))+i:m>=y?i=i+ne("0",m-y):i=(i.substring(0,m)||"0")+"."+i.substring(m),n+i}function ae(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Oe=be(function(e,t){for(var n=0,u=0,i=e.length,d=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-u]===t[d-1-u]&&d-u>n&&i-u>n;)u++;return{from:{start:n,end:i-u},to:{start:n,end:d-u}}}),Be=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function _e(e,t,n){return Math.min(Math.max(e,t),n)}function Q(e){return Math.max(e.selectionStart,e.selectionEnd)}function Ne(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Re(e){var t=e.currentValue,n=e.formattedValue,u=e.currentValueIndex,i=e.formattedValueIndex;return t[u]===n[i]}function Fe(e,t,n,u,i,d,m){m===void 0&&(m=Re);var y=i.findIndex(function(P){return P}),S=e.slice(0,y);!t&&!n.startsWith(S)&&(t=S,n=S+n,u=u+S.length);for(var I=n.length,O=e.length,T={},h=new Array(I),V=0;V<I;V++){h[V]=-1;for(var s=0,x=O;s<x;s++){var C=m({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:V,formattedValueIndex:s});if(C&&T[s]!==!0){h[V]=s,T[s]=!0;break}}}for(var c=u;c<I&&(h[c]===-1||!d(n[c]));)c++;var A=c===I||h[c]===-1?O:h[c];for(c=u-1;c>0&&h[c]===-1;)c--;var b=c===-1||h[c]===-1?0:h[c]+1;return b>A?A:u-b<A-u?b:A}function ue(e,t,n,u){var i=e.length;if(t=_e(t,0,i),u==="left"){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function Le(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,u=t.length;n<u;n++)t[n]=!!(X(e[n])||X(e[n-1]));return t}function je(e,t,n,u,i,d){d===void 0&&(d=N);var m=Ee(function(s,x){var C,c;return Te(s)?(c="",C=""):typeof s=="number"||x?(c=typeof s=="number"?Me(s):s,C=u(c)):(c=i(s,void 0),C=u(c)),{formattedValue:C,numAsString:c}}),y=ie(function(){return m(Y(e)?t:e,n)}),S=y[0],I=y[1],O=function(s,x){s.formattedValue!==S.formattedValue&&I({formattedValue:s.formattedValue,numAsString:s.value}),d(s,x)},T=e,h=n;Y(e)&&(T=S.numAsString,h=!0);var V=m(T,h);return Ie(function(){I(V)},[V.formattedValue]),[S,O]}function De(e){return e.replace(/[^0-9]/g,"")}function ke(e){return e}function Ke(e){var t=e.type;t===void 0&&(t="text");var n=e.displayType;n===void 0&&(n="input");var u=e.customInput,i=e.renderText,d=e.getInputRef,m=e.format;m===void 0&&(m=ke);var y=e.removeFormatting;y===void 0&&(y=De);var S=e.defaultValue,I=e.valueIsNumericString,O=e.onValueChange,T=e.isAllowed,h=e.onChange;h===void 0&&(h=N);var V=e.onKeyDown;V===void 0&&(V=N);var s=e.onMouseUp;s===void 0&&(s=N);var x=e.onFocus;x===void 0&&(x=N);var C=e.onBlur;C===void 0&&(C=N);var c=e.value,A=e.getCaretBoundary;A===void 0&&(A=Le);var b=e.isValidInputCharacter;b===void 0&&(b=X);var P=e.isCharacterSame,q=Ae(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),Z=je(c,S,!!I,m,y,O),$=Z[0],g=$.formattedValue,D=$.numAsString,oe=Z[1],k=R(),U=R({formattedValue:g,numAsString:D}),ee=function(r,a){U.current={formattedValue:r.formattedValue,numAsString:r.value},oe(r,a)},te=ie(!1),fe=te[0],le=te[1],F=R(null),B=R({setCaretTimeout:null,focusTimeout:null});J(function(){return le(!0),function(){clearTimeout(B.current.setCaretTimeout),clearTimeout(B.current.focusTimeout)}},[]);var ve=m,z=function(r,a){var o=parseFloat(a);return{formattedValue:r,value:a,floatValue:isNaN(o)?void 0:o}},_=function(r,a,o){r.selectionStart===0&&r.selectionEnd===r.value.length||(ae(r,a),B.current.setCaretTimeout=setTimeout(function(){r.value===o&&r.selectionStart!==a&&ae(r,a)},0))},L=function(r,a,o){return ue(r,a,A(r),o)},W=function(r,a,o){var l=A(a),p=Fe(a,g,r,o,l,b,P);return p=ue(a,p,l),p},ce=function(r){var a=r.formattedValue;a===void 0&&(a="");var o=r.input,l=r.source,p=r.event,v=r.numAsString,f;if(o){var w=r.inputValue||o.value,E=Q(o);o.value=a,f=W(w,a,E),f!==void 0&&_(o,f,a)}a!==g&&ee(z(a,v),{event:p,source:l})};J(function(){var r=U.current,a=r.formattedValue,o=r.numAsString;(g!==a||D!==o)&&ee(z(g,D),{event:void 0,source:K.props})},[g,D]);var se=F.current?Q(F.current):void 0,de=typeof window<"u"?xe:J;de(function(){var r=F.current;if(g!==U.current.formattedValue&&r){var a=W(U.current.formattedValue,g,se);r.value=g,_(r,a,g)}},[g]);var me=function(r,a,o){var l=a.target,p=k.current?Be(k.current,l.selectionEnd):Oe(g,r),v=Object.assign(Object.assign({},p),{lastValue:g}),f=y(r,v),w=ve(f);if(f=y(w,void 0),T&&!T(z(w,f))){var E=a.target,M=Q(E),H=W(r,g,M);return E.value=g,_(E,H,g),!1}return ce({formattedValue:w,numAsString:f,inputValue:r,event:a,source:o,input:a.target}),!0},G=function(r,a){a===void 0&&(a=0);var o=r.selectionStart,l=r.selectionEnd;k.current={selectionStart:o,selectionEnd:l+a}},ge=function(r){var a=r.target,o=a.value,l=me(o,r,K.event);l&&h(r),k.current=void 0},he=function(r){var a=r.target,o=r.key,l=a.selectionStart,p=a.selectionEnd,v=a.value;v===void 0&&(v="");var f;o==="ArrowLeft"||o==="Backspace"?f=Math.max(l-1,0):o==="ArrowRight"?f=Math.min(l+1,v.length):o==="Delete"&&(f=l);var w=0;o==="Delete"&&l===p&&(w=1);var E=o==="ArrowLeft"||o==="ArrowRight";if(f===void 0||l!==p&&!E){V(r),G(a,w);return}var M=f;if(E){var H=o==="ArrowLeft"?"left":"right";M=L(v,f,H),M!==f&&r.preventDefault()}else o==="Delete"&&!b(v[f])?M=L(v,f,"right"):o==="Backspace"&&!b(v[f])&&(M=L(v,f,"left"));M!==f&&_(a,M,v),V(r),G(a,w)},pe=function(r){var a=r.target,o=function(){var l=a.selectionStart,p=a.selectionEnd,v=a.value;if(v===void 0&&(v=""),l===p){var f=L(v,l);f!==l&&_(a,f,v)}};o(),requestAnimationFrame(function(){o()}),s(r),G(a)},ye=function(r){r.persist&&r.persist();var a=r.target,o=r.currentTarget;F.current=a,B.current.focusTimeout=setTimeout(function(){var l=a.selectionStart,p=a.selectionEnd,v=a.value;v===void 0&&(v="");var f=L(v,l);f!==l&&!(l===0&&p===v.length)&&_(a,f,v),x(Object.assign(Object.assign({},r),{currentTarget:o}))},0)},Ve=function(r){F.current=null,clearTimeout(B.current.focusTimeout),clearTimeout(B.current.setCaretTimeout),C(r)},Se=fe&&Ne()?"numeric":void 0,re=Object.assign({inputMode:Se},q,{type:t,value:g,onChange:ge,onKeyDown:he,onMouseUp:pe,onFocus:ye,onBlur:Ve});if(n==="text")return i?j.createElement(j.Fragment,null,i(g,q)||null):j.createElement("span",Object.assign({},q,{ref:d}),g);if(u){var Ce=u;return j.createElement(Ce,Object.assign({},re,{ref:d}))}return j.createElement("input",Object.assign({},re,{ref:d}))}export{Ke as N};
@@ -1 +1 @@
1
- "use client";import{jsx as d}from"react/jsx-runtime";import{Accordion as a}from"@heroui/accordion";import{cn as r}from"../../utils/cn.js";import{DownArrow as u}from"../Icon/DownArrow.js";function x({children:n,variant:t,isCompact:o,className:l,itemClasses:e,...i}){return d(a,{variant:t,isCompact:o,dividerProps:{className:r("my-2 border-solid border-slate-200",t==="shadow"&&"border-slate-300")},className:r("px-0",t==="bordered"&&["px-4 py-4 rounded-xl border-2 border-slate-200"],t==="shadow"&&["px-4 py-4 rounded-xl bg-slate-100 shadow-slate-200 border border-slate-200"],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-slate-100 rounded-xl border border-slate-200"],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},...i,children:n})}function f(){return d(u,{className:"w-4 h-4"})}export{x as Accordion,f as AccordionItemArrow,x as default};
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';
@@ -23,7 +23,7 @@ export interface DownloadLinkProps {
23
23
  * <DownloadLink
24
24
  * uuid="550e8400-e29b-41d4-a716-446655440000"
25
25
  * name="Report.xlsx"
26
- * className="text-blue-600 hover:underline"
26
+ * className="text-info hover:underline"
27
27
  * />
28
28
  *
29
29
  * @example
@@ -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 a}from"react/jsx-runtime";import{cn as n}from"../../utils/cn.js";function u(){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:l,src:r,alt:s}){return e("div",{className:n("group","z-10","first:ms-0",d),children:a("div",{className:n("transition-transform duration-300 ease-in-out","bg-slate-100","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:[r&&e("img",{src:r,alt:s||l||"Avatar",className:n("absolute","w-full","h-full","overflow-hidden","object-cover","object-center",o?.icon)}),!r&&l&&e("span",{className:n("flex items-center justify-center","text-center","max-w-full","overflow-hidden","font-medium",o?.name),children:l}),!r&&!l&&e("span",{className:n("flex items-center justify-center",o?.fallback),children:f||e(u,{})})]})})}export{h as Avatar,h as default};
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 i}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 l}from"../../utils/cn.js";const B={hidden:{opacity:0,scale:0},show:{opacity:1,scale:1}};function q({children:b,isInvisible:n,disableAnimation:d,placement:t="top-right",shape:o="rectangle",className:h,classNames:g,showOutline:x=!1,content:r,isDot:s,isOneChar:f,size:a="md",variant:e="solid",...m}){const c=y(),p=d?{duration:0}:{type:"spring",bounce:.3},_=String(r)?.length===1||f,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"}[a]:{sm:"min-w-4 h-4",md:"min-w-5 h-5",lg:"min-w-6 h-6"}[a];return i(C,{...m,size:a,variant:e,isInvisible:n,isDot:s,classNames:{base:l("relative","inline-flex shrink-0",g?.base),badge:l("p-0","border-0","absolute z-10",[t==="top-right"&&o==="rectangle"&&"top-0.5 right-px",t==="top-right"&&o==="circle"&&"top-1 right-1",t==="bottom-right"&&o==="rectangle"&&"bottom-0.5 right-px",t==="bottom-right"&&o==="circle"&&"bottom-1 right-1",t==="top-left"&&o==="rectangle"&&"top-0.5 left-px",t==="top-left"&&o==="circle"&&"top-1 left-1",t==="bottom-left"&&o==="rectangle"&&"bottom-0.5 left-px",t==="bottom-left"&&o==="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:i(V,{children:!n&&i(z.span,{layout:!0,variants:B,initial:d?"show":"hidden",transition:p,animate:"show",exit:"hidden",className:l("flex flex-wrap","place-content-center","z-10","box-border","rounded-full","py-0 px-1","font-normal text-slate-900","select-none","whitespace-normal",e==="faded"?"text-slate-800":"text-white",!r||s?"w-3.5 h-3.5":u,typeof r=="string"&&r.length>1||s?"text-xs":w[a],[e==="solid"&&"bg-slate-800",e==="shadow"&&"bg-slate-800",e==="flat"&&"bg-slate-800/55",e==="faded"&&"bg-white"],[e==="faded"&&"border-2 border-solid border-slate-800",x&&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)]",h),children:r},`badge-${c}`)}),children:b})}export{q as Badge,q as default};
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 s}from"react/jsx-runtime";import{Link as i}from"react-aria-components";import{cn as l}from"../../utils/cn.js";function a({children:e,className:t,...r}){return s(i,{className:l("text-slate-600 no-underline cursor-pointer","focus-visible:outline-2 focus-visible:outline focus-visible:outline-slate-200","hover:text-slate-900 hover:underline","current:cursor-default current:text-slate-900 current:font-semibold","disabled:cursor-default disabled:text-slate-400 disabled:current:text-slate-900",t),...r,children:e})}export{a as BreadcrumbLink,a as default};
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 m}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:t,isDisabled:o=!1,isLoading:r=!1,size:s="md",variant:d="solid",...l},n){const a=h(d),b=["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-slate-200 pressed:scale-95",s==="sm"&&"h-8",s==="md"&&"h-10",s==="lg"&&"h-12",a==="ghost"&&["bg-transparent hover:bg-transparent focus:bg-transparent disabled:bg-transparent","border-transparent hover:border-transparent focus:border-transparent disabled:border-transparent","text-slate-900 disabled:text-slate-400",r&&"disabled:text-slate-900"],a==="outline"&&["bg-transparent hover:bg-transparent focus:bg-transparent disabled:bg-transparent","border-slate-300 hover:border-slate-400 focus:border-slate-400 disabled:border-slate-200","text-slate-900 disabled:text-slate-500",r&&["disabled:border-slate-300","disabled:text-slate-900"]],a==="solid"&&["bg-slate-800 hover:bg-slate-900 focus:bg-slate-900 disabled:bg-slate-900","border-slate-800 hover:border-slate-900 focus:border-slate-900 disabled:border-slate-200","text-white disabled:text-slate-400",r&&["disabled:border-slate-900","disabled:text-white"]]];return f(p,{ref:n,type:"button",isDisabled:o,className:i=>{const u=typeof t=="function"?t(i):t;return m(b,u)},...l})});export{w as Button,w as default,h as resolveVariant};
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"framer-motion";import"../../utils/cn.js";function p({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{p as ButtonLoadingContent,p as default};
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 a,resolveVariant as f}from"./Button.js";import{ButtonLoadingContent as x}from"./ButtonLoadingContent.js";import"react/jsx-runtime";import"react";import"react-aria-components";import"../../utils/cn.js";import"../Loader/CircularEasing.js";import"framer-motion";export{a as Button,x as ButtonLoadingContent,f as resolveVariant};
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 a,jsxs as h,Fragment as d}from"react/jsx-runtime";import{Checkbox as s}from"react-aria-components";import{cn as f}from"../../utils/cn.js";function p({control:t,isHovered:n,isFocused:b,isDisabled:e,isIndeterminate:o,isInvalid:r,isSelected:l,isPressed:u,classNames:x,...c}){return t?typeof t=="function"?t({isHovered:n,isFocused:b,isDisabled:e,isIndeterminate:o,isInvalid:r,isSelected:l,isPressed:u,...c}):t:a("div",{className:f("flex items-center justify-center","w-6 h-6","border border-solid border-slate-300 rounded","transition-all duration-200 ease-in-out","checkbox-control",n&&["border-slate-400"],b&&["border-slate-400 outline-2 outline outline-slate-200"],(e||e&&o)&&["border-slate-200 bg-slate-100"],r&&["bg-slate-100 text-red-600 border-red-500"],r&&n&&["border-red-600"],r&&b&&["border-red-600 outline-red-200"],r&&l&&o&&["bg-red-500 border-red-500"],r&&l&&o&&u&&["bg-red-600 border-red-600"],(l||o)&&["border-slate-300 bg-slate-300"],(l||o)&&u&&["border-slate-400 bg-slate-400"],x?.control),children:a("svg",{viewBox:"0 0 18 18","aria-hidden":"true",style:{strokeDasharray:"22px",strokeDashoffset:l||o?44:66},className:f("w-4 h-4 fill-none","stroke-white stroke-[3px]","transition-all duration-200 ease-in-out",e&&o&&["stroke-none fill-slate-300"],o&&["stroke-none fill-white"]),children:o?a("rect",{x:1,y:7.5,width:15,height:3}):a("polyline",{points:"1 9 7 14 15 4"})})})}function y({children:t,slots:n,className:b,classNames:e,...o}){return a(s,{className:f("flex items-center gap-2 cursor-pointer","text-xs text-slate-500 forced-color-adjust-none disabled:text-slate-400 disabled:cursor-not-allowed group","invalid:text-red-500",b),...o,children:r=>h(d,{children:[a(p,{control:n?.control,classNames:e,...r}),typeof t=="function"?t(r):t]})})}export{y as Checkbox,y as default};
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 l,jsx as o}from"react/jsx-runtime";import{useMemo as s}from"react";import{Button as i}from"../../Button/Button.js";import"framer-motion";import"../../../utils/cn.js";import{CrossSmall as n}from"../../Icon/CrossSmall.js";import{getAppliedFilterChips as p}from"../../../utils/collection/getAppliedFilterChips.js";import{removeFilterChip as a}from"../../../utils/collection/removeFilterChip.js";import"react-aria-components";function v({appliedFilters:e,onFilterChange:t}){const m=s(()=>p(e),[e]);return m.length===0?null:l("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:m.map(r=>l(i,{variant:"outline",className:"px-2 py-1 h-6 font-medium text-xs flex items-center gap-x-1 rounded-md",onPress:()=>t(a(e,r)),children:[r.label,o(n,{})]},`${r.filterCode}-${r.optionId??"bool"}`))}),o(i,{variant:"ghost",className:"px-2 py-1 h-6 font-bold text-xs text-red-500",onPress:()=>t([]),children:"Clear All"})]})}export{v as CollectionFilterChips};
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 h}from"./CollectionFilterChips.js";import"react/jsx-runtime";import"react";import"../../Button/Button.js";import"react-aria-components";import"../../../utils/cn.js";import"framer-motion";import"../../Icon/CrossSmall.js";import"../../../utils/collection/getAppliedFilterChips.js";import"../../../utils/collection/removeFilterChip.js";export{h as CollectionFilterChips};
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 o,Fragment as f,jsx as e}from"react/jsx-runtime";import{useMemo as b,Suspense as x,useState as v}from"react";import{Accordion as w}from"../../Accordion/Accordion.js";import{AccordionItem as g}from"@heroui/accordion";import{Button as h}from"../../Button/Button.js";import"framer-motion";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"../../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:n,onChange:r}){const[l,c]=v(n),m=()=>{r(l.trim())};return o("div",{className:"relative",children:[e("input",{type:"search",value:l,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-slate-300 bg-white text-sm text-slate-900 placeholder:text-slate-400 focus:outline-none focus:border-slate-400 [&::-webkit-search-cancel-button]:hidden"}),l&&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-slate-100 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-slate-400",children:e(D,{})})]})}function he({availableFilters:n,appliedFilters:r,onFilterChange:l,showMobileFilters:c,setShowMobileFilters:m,searchQuery:s,onSearchChange:a,totalItems:i}){const p=b(()=>S(r,n).filter(t=>t.includeInFilters!==!1),[r,n]),d=a&&e(V,{value:s??"",onChange:a},s),u=()=>p.length>0&&e(w,{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:p.map(t=>e(g,{textValue:t.label,title:e(j,{filter:t,appliedFilters:r,onFilterChange:l}),disableIndicatorAnimation:!0,indicator:M,children:e("div",{className:"pt-2",children:e(I,{filter:t,onFilterChange:l,appliedFilters:r,variant:"sidebar"})})},t.code))});return o(f,{children:[o("div",{className:"hidden lg:flex lg:flex-col lg:basis-[16.5rem] lg:shrink-0",children:[d,u(),r.length>0&&e("button",{type:"button",className:"text-sm text-slate-500 hover:text-slate-700 transition-colors mt-4 mb-8",onClick:()=>l([]),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})=>o("div",{className:"flex flex-col w-full h-full overflow-hidden",children:[o("div",{className:"flex items-center w-full justify-between",children:[e("span",{className:"text-xl font-bold text-slate-800",children:"Filters"}),e(h,{variant:"ghost","aria-label":"Close",onPress:()=>t(),className:"justify-start size-auto p-0",children:e(C,{})})]}),o("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}),u(),i===0&&e(L,{searchQuery:s,hasFilters:r.length>0,onClearFilters:()=>l([]),onClearSearch:s&&a?()=>a(""):void 0})]}),o("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-slate-500 hover:text-slate-700 transition-colors",onClick:()=>l([]),children:"Clear all"}),e(h,{className:"w-full py-6 text-base rounded-xl",variant:"primary",onPress:()=>t(),children:"View Results"})]})]})})})})})})]})}export{he as CollectionFilters};
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"framer-motion";import"../../ModalOverlay/ModalOverlay.js";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};
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"framer-motion";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 K({totalItems:o,startItem:s,endItem:r,setShowMobileFilters:a,availableSortOrders:m,appliedSortOrder:e,onSortChange:n}){const c=[...e?[e]:[],...m];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:()=>a(!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-slate-500",children:["Displaying ",s," - ",r," of ",o," items"]})]})}export{K as CollectionToolbar};
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 j}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"framer-motion";import"../../Loader/Pulse.js";import"../../Select/MultiButtonSelect.js";import"../../Button/Button.js";import"../../Icon/FilterIcon.js";export{j as CollectionToolbar};
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:s,onClearFilters:n,onClearSearch:l}){const i=s&&n||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-slate-500 mb-4",children:["We couldn't find anything matching “",e,"”"]}),!e&&!s&&t("p",{className:"text-sm text-slate-500 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-slate-900 underline underline-offset-2 transition-colors",children:"Clear search"}),s&&n&&e&&l&&t("span",{className:"text-slate-300",children:"|"}),s&&n&&t("button",{type:"button",onClick:n,className:"text-sm font-medium text-slate-700 hover:text-slate-900 underline underline-offset-2 transition-colors",children:"Clear all filters"})]}),!i&&t("p",{className:"text-xs text-slate-400",children:"Try a different search term or browse our categories."})]})}export{m as EmptyResults};
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 i,jsx as l}from"react/jsx-runtime";import{CrossSmall as c}from"../../Icon/CrossSmall.js";import"../../../utils/cn.js";function u({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 i("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-slate-100 transition-colors cursor-pointer",children:l(c,{})})]})}export{u as FilterAccordionTitle};
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 a}from"react/jsx-runtime";import{RadioGroup as x}from"../../../RadioGroup/RadioGroup.js";import{Radio as d}from"../../../Radio/Radio.js";import"react-aria-components";import"../../../../utils/cn.js";function I({filter:e,onFilterChange:i,appliedFilters:t,variant:m="drawer"}){const p=l=>{const r=l==="true";if(l==="none"){i(t.filter(c=>c.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(c=>c.code!==e.code),h])},b=()=>{const l=t.find(r=>r.code===e.code);return l?l.appliedValue?"true":"false":"none"},s="__typename"in e&&e.__typename==="CollectionFilterAvailableBoolean"?e.trueItemCount:null,o="__typename"in e&&e.__typename==="CollectionFilterAvailableBoolean"?e.falseItemCount:null,u=n(x,{value:b(),onChange:p,children:a("div",{className:"space-y-2",children:[n(d,{value:"none",children:n("span",{className:"text-sm",children:"None"})}),a("div",{className:"flex items-center justify-between",children:[n(d,{value:"true",children:n("span",{className:"text-sm",children:e.trueLabel})}),s!=null&&a("span",{className:"text-xs text-slate-500",children:["(",s,")"]})]}),a("div",{className:"flex items-center justify-between",children:[n(d,{value:"false",children:n("span",{className:"text-sm",children:e.falseLabel})}),o!=null&&a("span",{className:"text-xs text-slate-500",children:["(",o,")"]})]})]})});return m==="sidebar"?n("div",{className:"pb-2",children:u}):a("div",{className:"border border-slate-200 rounded-lg p-4",children:[n("h4",{className:"font-medium mb-3",children:e.label}),u]})}export{I as FilterRendererBoolean,I as default};
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 s,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:l,appliedFilters:i,variant:d="drawer"}){const{handleOptionToggle:m,getOptionIsChecked:u}=p({filter:o,onFilterChange:l,appliedFilters:i}),t=o.options.map(e=>{const a=u(e.code),r="itemCount"in e?e.itemCount:null;return s("div",{className:"flex items-center",children:s(h,{isSelected:a,onChange:c=>m(e.code,c),className:"cursor-pointer",children:({isHovered:c})=>n("span",{className:"text-sm transition-colors duration-150",style:{color:c?"#777777":"#303133"},children:[e.label,r!=null&&n("span",{className:"ml-1 transition-opacity duration-150",style:{color:"#777777",opacity:c?.7:1},children:["(",r,")"]})]})},`checkbox-${o.code}-${e.code}-${String(a)}`)},`${o.code}-${e.code}`)});return d==="sidebar"?s("div",{className:"space-y-2 pb-2",children:t}):n("div",{className:"border border-slate-200 rounded-lg p-4",children:[s("h4",{className:"font-medium mb-3",children:o.label}),s("div",{className:"space-y-2 max-h-60 overflow-y-auto",children:t})]})}export{C as FilterRendererOption,C as default};
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 l,jsx as e}from"react/jsx-runtime";function t({filter:r}){return l("div",{className:"border border-slate-200 rounded-lg p-4",children:[e("h4",{className:"font-medium mb-3",children:r.label}),e("div",{className:"text-sm text-slate-500",children:"Range filter coming soon"})]})}export{t as FilterRendererRange,t as default};
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 x}from"../../../../../utils/cn.js";import{isDevelopment as $}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:b,appliedFilters:w,variant:f="drawer"}){const{handleOptionToggle:m,getOptionIsChecked:y}=I({filter:r,onFilterChange:b,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,o=S(n),g=k(s);if(!o&&!g)return $&&(n&&!o&&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:a=>m(e.code,a),children:c("span",{className:"text-sm",children:e.label})},`swatch-${r.code}-${e.code}-${String(t)}`)},`${r.code}-${e.code}`);$&&n&&!o&&console.warn(`[Swatch] Falling back to SWATCH (hex) renderer for attribute "${r.code}" option "${e.code}" — invalid imageUrl "${n}"`);const u=o?!1:v(s),N=o?{backgroundImage:`url(${n})`}:{backgroundColor:s??void 0};return c("div",{className:"flex items-center",children:c(p,{isSelected:t,className:"cursor-pointer",onChange:a=>m(e.code,a),slots:{control:({isSelected:a,isHovered:l})=>c("span",{className:x("relative inline-flex items-center justify-center size-[22px] rounded-full shrink-0 transition-all duration-150",o&&"bg-cover bg-center",o&&a&&"ring-2 ring-inset ring-white shadow-[0_0_0_2px_#222]",o&&l&&!a&&"ring-1 ring-slate-400",!o&&u&&"border border-slate-300"),style:N,children:!o&&(a||l)&&c(C,{className:x("w-3 h-3 transition-opacity duration-150",u?"text-slate-400":"text-white drop-shadow-sm",l&&!a&&"opacity-70")})})},children:({isHovered:a})=>d("span",{className:"text-sm transition-colors duration-150",style:{color:a?"#777777":"#303133"},children:[e.label,i!=null&&d("span",{className:"ml-1 transition-opacity duration-150",style:{color:"#777777",opacity:a?.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-slate-200 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
+ "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:a,onFilterChange:o,appliedFilters:c,variant:n="drawer"}){const{handleOptionToggle:d,getOptionIsChecked:i}=p({filter:a,onFilterChange:o,appliedFilters:c}),t=a.options.map(e=>{const l=i(e.code),s=e.swatch?.imageUrl??null;return r(b,{"aria-label":e.label,"aria-pressed":l,className:"cursor-pointer p-0",onPress:()=>d(e.code,!l),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",l?"border-slate-900 ring-1 ring-slate-900":"border-slate-200",m&&!l&&"border-slate-400",!s&&"flex items-center justify-center text-xs text-slate-500"),title:e.label,style:s?{backgroundImage:`url(${s})`}:void 0,children:!s&&e.label})},`${a.code}-${e.code}`)});return n==="sidebar"?r("div",{className:"grid grid-cols-3 gap-2 pb-2",children:t}):g("div",{className:"border border-slate-200 rounded-lg p-4",children:[r("h4",{className:"font-medium mb-3",children:a.label}),r("div",{className:"grid grid-cols-3 gap-2 max-h-60 overflow-y-auto",children:t})]})}export{v as SwatchImage};
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 p}from"../../../../Checkbox/Checkbox.js";import{cn as b}from"../../../../../utils/cn.js";import{useOptionFilterToggle as u}from"../useOptionFilterToggle.js";import"react-aria-components";function $({filter:t,onFilterChange:c,appliedFilters:l,variant:n="drawer"}){const{handleOptionToggle:d,getOptionIsChecked:i}=u({filter:t,onFilterChange:c,appliedFilters:l}),o=t.options.map(e=>{const a=i(e.code),m=e.swatch?.text??e.label;return r("div",{children:r(p,{isSelected:a,className:"cursor-pointer",onChange:s=>d(e.code,s),slots:{control:({isSelected:s,isHovered:h})=>r("span",{className:b("inline-flex items-center justify-center px-3.5 py-2 text-xs font-medium border shrink-0 transition-colors duration-150",s?"bg-slate-900 text-white border-slate-900":"bg-white text-slate-700 border-slate-300",h&&!s&&"border-slate-500"),children:m})}},`swatch-${t.code}-${e.code}-${String(a)}`)},`${t.code}-${e.code}`)});return n==="sidebar"?r("div",{className:"flex flex-wrap gap-2 pb-2",children:o}):x("div",{className:"border border-slate-200 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:o})]})}export{$ as SwatchText};
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 v}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 i of d)if("renderer"in i&&y(i.renderer)&&"options"in i)for(const r of i.options)r.swatch&&s.set(r.id,{...r.swatch,attributeCode:i.code,optionCode:r.code});return s}function T(d){const s=new Set;for(const i of d)if(i.simpleProduct?.saleability?.isSaleable!==!1)for(const r of i.attributes)s.add(`${r.attribute.code}:${r.option.code}`);return s}function V(d,s,i,r){const m=new Set,h=[];for(const l of d)for(const a of l.attributes){const f=s.get(a.option.id);f&&!m.has(a.option.id)&&i.has(a.attribute.code)&&(m.add(a.option.id),h.push({optionId:a.option.id,optionCode:f.optionCode,attributeCode:a.attribute.code,label:a.option.label,swatch:f,image:l.simpleProduct.image??null,isSaleable:r.has(`${a.attribute.code}:${a.option.code}`)}))}return h.sort((l,a)=>l.isSaleable===a.isSaleable?0:l.isSaleable?-1:1),h}function O({variants:d,availableFilters:s,attributeSwatchConfigs:i=[],matchedOptionIds:r,selectedOptionId:m,onSelect:h}){const l=new Map;for(const e of i)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 a=L(s),f=T(d),u=V(d,a,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-slate-900 ring-1 ring-slate-900":"border-slate-200",t&&!o&&"border-slate-400"),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-slate-900 text-white border-slate-900":"bg-white text-slate-700 border-slate-300",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),R=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-slate-400",!n&&g&&"border border-slate-300"),style:R,children:[!e.isSaleable&&I(v,{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-slate-400":"text-white drop-shadow-sm",t&&!o&&"opacity-70")})]})},e.optionId)})})}export{O as ProductCardSwatches};
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"framer-motion";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"../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};
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 _,Menu as f}from"react-aria-components";import{forwardRef as b}from"react";import{motion as v}from"framer-motion";import{cn as r}from"../../utils/cn.js";const c=b(({style:e,...o},t)=>{const i=typeof e=="function"?e(o):e;return n(_,{...o,ref:t,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:t,setAnimation:i,animation:a="hidden",className:x,classNames:u,...m}){const p=r("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-slate-300",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:r("outline-none",u?.menu),onAction:t,children:e})},o):n(c,{className:p,...m,children:n(f,{className:r("outline-none",u?.menu),onAction:t,children:e})},o)}export{C as ContextMenu,C as default};
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';