@danielcruzcode/ui-core 0.1.1 → 0.1.3

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 (78) hide show
  1. package/dist/index.cjs10.js +1 -1
  2. package/dist/index.cjs11.js +1 -1
  3. package/dist/index.cjs12.js +1 -1
  4. package/dist/index.cjs13.js +1 -1
  5. package/dist/index.cjs14.js +1 -1
  6. package/dist/index.cjs15.js +1 -1
  7. package/dist/index.cjs16.js +1 -1
  8. package/dist/index.cjs17.js +1 -1
  9. package/dist/index.cjs18.js +1 -1
  10. package/dist/index.cjs19.js +1 -1
  11. package/dist/index.cjs2.js +1 -1
  12. package/dist/index.cjs20.js +1 -1
  13. package/dist/index.cjs21.js +1 -1
  14. package/dist/index.cjs22.js +1 -1
  15. package/dist/index.cjs23.js +1 -1
  16. package/dist/index.cjs24.js +1 -0
  17. package/dist/index.cjs25.js +1 -1
  18. package/dist/index.cjs26.js +1 -1
  19. package/dist/index.cjs27.js +1 -1
  20. package/dist/index.cjs28.js +1 -1
  21. package/dist/index.cjs3.js +1 -1
  22. package/dist/index.cjs30.js +1 -1
  23. package/dist/index.cjs4.js +1 -1
  24. package/dist/index.cjs44.js +1 -0
  25. package/dist/index.cjs45.js +1 -0
  26. package/dist/index.cjs46.js +1 -0
  27. package/dist/index.cjs5.js +1 -1
  28. package/dist/index.cjs50.js +1 -1
  29. package/dist/index.cjs52.js +1 -1
  30. package/dist/index.cjs6.js +1 -1
  31. package/dist/index.cjs7.js +1 -1
  32. package/dist/index.cjs8.js +1 -1
  33. package/dist/index.cjs9.js +1 -1
  34. package/dist/index.esm10.js +47 -36
  35. package/dist/index.esm11.js +27 -27
  36. package/dist/index.esm12.js +1 -1
  37. package/dist/index.esm13.js +1 -1
  38. package/dist/index.esm14.js +9 -3
  39. package/dist/index.esm15.js +3 -9
  40. package/dist/index.esm16.js +3 -22
  41. package/dist/index.esm17.js +4 -8
  42. package/dist/index.esm18.js +11 -4
  43. package/dist/index.esm19.js +10 -134
  44. package/dist/index.esm2.js +1 -1
  45. package/dist/index.esm20.js +24 -224
  46. package/dist/index.esm21.js +5 -128
  47. package/dist/index.esm22.js +5 -245
  48. package/dist/index.esm23.js +7 -7
  49. package/dist/index.esm24.js +136 -0
  50. package/dist/index.esm25.js +224 -5
  51. package/dist/index.esm26.js +128 -13
  52. package/dist/index.esm27.js +278 -5
  53. package/dist/index.esm28.js +7 -7
  54. package/dist/index.esm3.js +1 -1
  55. package/dist/index.esm30.js +2 -4
  56. package/dist/index.esm4.js +1 -1
  57. package/dist/{index.esm40.js → index.esm44.js} +232 -222
  58. package/dist/{index.esm41.js → index.esm45.js} +3 -3
  59. package/dist/{index.esm42.js → index.esm46.js} +4 -4
  60. package/dist/index.esm5.js +36 -35
  61. package/dist/index.esm50.js +5 -5
  62. package/dist/index.esm52.js +5 -5
  63. package/dist/index.esm6.js +24 -24
  64. package/dist/index.esm7.js +1 -1
  65. package/dist/index.esm8.js +23 -23
  66. package/dist/index.esm9.js +1 -1
  67. package/dist/styles.css +1 -1
  68. package/package.json +9 -5
  69. package/styles.css +1 -0
  70. package/dist/index.cjs29.js +0 -1
  71. package/dist/index.cjs40.js +0 -1
  72. package/dist/index.cjs41.js +0 -1
  73. package/dist/index.cjs42.js +0 -1
  74. package/dist/index.esm29.js +0 -5
  75. /package/dist/{index.cjs34.js → index.cjs31.js} +0 -0
  76. /package/dist/{index.cjs33.js → index.cjs35.js} +0 -0
  77. /package/dist/{index.esm34.js → index.esm31.js} +0 -0
  78. /package/dist/{index.esm33.js → index.esm35.js} +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),r=require("./index.cjs17.js");function p({checked:t=!1,onChange:o,label:c,disabled:l=!1,indeterminate:s=!1,name:d,id:h}){const u=n.useId(),a=h??u,i=n.useRef(null);n.useEffect(()=>{i.current&&(i.current.indeterminate=s)},[s]);const x=[r.box,t||s?s?r.boxIndeterminate:r.boxChecked:""].filter(Boolean).join(" ");return e.jsxs("label",{htmlFor:a,className:[r.wrapper,l?r.wrapperDisabled:""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:i,id:a,name:d,type:"checkbox",className:r.hiddenInput,checked:t,disabled:l,onChange:f=>o==null?void 0:o(f.target.checked),"aria-checked":s?"mixed":t}),e.jsxs("span",{className:x,"aria-hidden":"true",children:[s&&e.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M1 1h8",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})}),t&&!s&&e.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M1 4l3 3 5-6",stroke:"white",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})]}),c&&e.jsx("span",{className:r.labelText,children:c})]})}exports.Checkbox=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),t=require("./index.cjs19.js");function j({checked:r=!1,onChange:o,label:l,disabled:a=!1,indeterminate:s=!1,name:u,id:i}){const d=c.useId(),h=i!=null?i:d,n=c.useRef(null);c.useEffect(()=>{n.current&&(n.current.indeterminate=s)},[s]);const x=[t.box,r||s?s?t.boxIndeterminate:t.boxChecked:""].filter(Boolean).join(" ");return e.jsxs("label",{htmlFor:h,className:[t.wrapper,a?t.wrapperDisabled:""].filter(Boolean).join(" "),children:[e.jsx("input",{ref:n,id:h,name:u,type:"checkbox",className:t.hiddenInput,checked:r,disabled:a,onChange:f=>o==null?void 0:o(f.target.checked),"aria-checked":s?"mixed":r}),e.jsxs("span",{className:x,"aria-hidden":"true",children:[s&&e.jsx("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M1 1h8",stroke:"white",strokeWidth:"2",strokeLinecap:"round"})}),r&&!s&&e.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none","aria-hidden":"true",children:e.jsx("path",{d:"M1 4l3 3 5-6",stroke:"white",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})]}),l&&e.jsx("span",{className:t.labelText,children:l})]})}exports.Checkbox=j;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("./index.cjs30.js");function o({maxWidth:e="xl",children:n,as:t="div"}){return r.jsx(t,{className:i.containerRecipe({maxWidth:e}),children:n})}exports.Container=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),i=require("./index.cjs22.js");function o({maxWidth:e="xl",children:n,as:t="div"}){return r.jsx(t,{className:i.containerRecipe({maxWidth:e}),children:n})}exports.Container=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),I=require("react"),e=require("./index.cjs26.js");function S({label:n,placeholder:j,value:m,onChange:r,type:x="text",error:a,hint:t,disabled:l=!1,required:d=!1,leftIcon:c,rightIcon:p,name:h,id:v}){const N=I.useId(),i=v??N,o=a?`${i}-error`:void 0,u=t?`${i}-hint`:void 0,b=[e.inputWrapper,a?e.inputWrapperError:"",l?e.inputWrapperDisabled:""].filter(Boolean).join(" ");return s.jsxs("div",{className:e.wrapper,children:[n&&s.jsxs("label",{className:e.label,htmlFor:i,children:[n,d&&s.jsxs("span",{className:e.requiredMark,"aria-hidden":"true",children:[" ","*"]})]}),s.jsxs("div",{className:b,children:[c&&s.jsx("span",{className:e.iconSlot,"aria-hidden":"true",children:c}),s.jsx("input",{id:i,name:h,type:x,className:e.input,placeholder:j,value:m,onChange:f=>r==null?void 0:r(f.target.value),disabled:l,required:d,"aria-invalid":a?!0:void 0,"aria-describedby":[o,u].filter(Boolean).join(" ")||void 0}),p&&s.jsx("span",{className:e.iconSlot,"aria-hidden":"true",children:p})]}),a&&s.jsx("span",{id:o,className:e.errorText,role:"alert",children:a}),t&&!a&&s.jsx("span",{id:u,className:e.hint,children:t})]})}exports.Input=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),I=require("react"),e=require("./index.cjs18.js");function S({label:l,placeholder:m,value:x,onChange:t,type:h="text",error:a,hint:r,disabled:c=!1,required:d=!1,leftIcon:u,rightIcon:p,name:v,id:n}){const N=I.useId(),i=n!=null?n:N,o=a?`${i}-error`:void 0,j=r?`${i}-hint`:void 0,b=[e.inputWrapper,a?e.inputWrapperError:"",c?e.inputWrapperDisabled:""].filter(Boolean).join(" ");return s.jsxs("div",{className:e.wrapper,children:[l&&s.jsxs("label",{className:e.label,htmlFor:i,children:[l,d&&s.jsxs("span",{className:e.requiredMark,"aria-hidden":"true",children:[" ","*"]})]}),s.jsxs("div",{className:b,children:[u&&s.jsx("span",{className:e.iconSlot,"aria-hidden":"true",children:u}),s.jsx("input",{id:i,name:v,type:h,className:e.input,placeholder:m,value:x,onChange:f=>t==null?void 0:t(f.target.value),disabled:c,required:d,"aria-invalid":a?!0:void 0,"aria-describedby":[o,j].filter(Boolean).join(" ")||void 0}),p&&s.jsx("span",{className:e.iconSlot,"aria-hidden":"true",children:p})]}),a&&s.jsx("span",{id:o,className:e.errorText,role:"alert",children:a}),r&&!a&&s.jsx("span",{id:j,className:e.hint,children:r})]})}exports.Input=S;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("./index.cjs16.js"),b=require("./index.cjs2.js"),q=require("./index.cjs4.js"),z=require("./index.cjs3.js");function W({rating:a}){return s.jsx("span",{className:e.starsWrapper,"aria-label":`${a} de 5 estrellas`,role:"img",children:Array.from({length:5}).map((n,l)=>s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:l<Math.round(a)?"#F9AB00":"none",stroke:"#F9AB00",strokeWidth:"1","aria-hidden":"true",children:s.jsx("path",{d:"M6 1l1.39 2.82L10.5 4.27l-2.25 2.19.53 3.09L6 8l-2.78 1.55.53-3.09L1.5 4.27l3.11-.45L6 1z"})},l))})}function A(){return s.jsxs("article",{"aria-label":"Cargando producto","aria-busy":"true",children:[s.jsx("div",{className:e.skeletonImage}),s.jsxs("div",{style:{padding:"8px",display:"flex",flexDirection:"column",gap:"8px"},children:[s.jsx("div",{className:e.skeletonLine,style:{width:"100%"}}),s.jsx("div",{className:e.skeletonLine,style:{width:"70%"}}),s.jsx("div",{className:e.skeletonLine,style:{width:"50%"}}),s.jsx("div",{className:e.skeletonBtn})]})]})}function M({id:a,title:n,subtitle:l,images:f,price:h,originalPrice:t,discountPercent:x,badge:u,rating:j,reviewCount:p,installments:i,unavailable:m=!1,loading:B=!1,onAddToCart:v,onWishlist:g,onQuickView:N,onClick:d,formatPrice:r,className:k}){if(B)return s.jsx(A,{});const C=r?r(h):String(h),y=t?r?r(t):String(t):void 0,o=f[0],w=s.jsxs("div",{className:e.imageWrapper,children:[o&&s.jsx("img",{width:100,height:100,src:o.src,alt:o.alt,className:e.image,loading:"lazy"}),s.jsxs("div",{className:e.badgeOverlay,children:[x!==void 0&&s.jsxs(b.Badge,{variant:"danger",size:"sm",children:["-",x,"%"]}),u&&s.jsx(b.Badge,{variant:"brand",size:"sm",children:u})]}),g&&s.jsx("button",{type:"button",className:e.wishlistBtn,onClick:c=>{c.stopPropagation(),g(a)},"aria-label":`Agregar ${n} a favoritos`,children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:s.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}),m&&s.jsx("div",{className:e.unavailableOverlay,children:s.jsx("span",{className:e.unavailableText,children:"Sin stock"})})]}),L=s.jsxs("div",{className:e.body,children:[s.jsx("p",{className:e.title,children:n}),l&&s.jsx("p",{className:e.subtitle,children:l}),j!==void 0&&s.jsxs("div",{className:e.starsWrapper,children:[s.jsx(W,{rating:j}),p!==void 0&&s.jsxs("span",{className:e.reviewCount,children:["(",p,")"]})]}),s.jsxs("div",{className:e.priceWrapper,children:[s.jsx("span",{className:e.price,children:C}),y&&s.jsx("span",{className:e.originalPrice,children:y})]}),i&&s.jsxs("span",{className:e.installments,children:[i.count,"x"," ",r?r(i.value):i.value]})]}),S=s.jsxs("div",{className:e.footer,children:[v&&s.jsx(z.Button,{variant:"primary",size:"sm",fullWidth:!0,disabled:m,onClick:()=>v(a),children:"Agregar"}),N&&s.jsx("button",{type:"button",className:e.quickViewBtn,onClick:c=>{c.stopPropagation(),N(a)},children:"Vista rápida"})]});return s.jsx("div",{className:[e.root,k].filter(Boolean).join(" "),children:s.jsx(q.Card,{media:w,body:L,footer:S,hoverable:!!d,onClick:d?()=>d(a):void 0})})}exports.ProductCard=M;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("./index.cjs20.js"),b=require("./index.cjs2.js"),q=require("./index.cjs4.js"),z=require("./index.cjs3.js");function W({rating:a}){return s.jsx("span",{className:e.starsWrapper,"aria-label":`${a} de 5 estrellas`,role:"img",children:Array.from({length:5}).map((n,l)=>s.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:l<Math.round(a)?"#F9AB00":"none",stroke:"#F9AB00",strokeWidth:"1","aria-hidden":"true",children:s.jsx("path",{d:"M6 1l1.39 2.82L10.5 4.27l-2.25 2.19.53 3.09L6 8l-2.78 1.55.53-3.09L1.5 4.27l3.11-.45L6 1z"})},l))})}function A(){return s.jsxs("article",{"aria-label":"Cargando producto","aria-busy":"true",children:[s.jsx("div",{className:e.skeletonImage}),s.jsxs("div",{style:{padding:"8px",display:"flex",flexDirection:"column",gap:"8px"},children:[s.jsx("div",{className:e.skeletonLine,style:{width:"100%"}}),s.jsx("div",{className:e.skeletonLine,style:{width:"70%"}}),s.jsx("div",{className:e.skeletonLine,style:{width:"50%"}}),s.jsx("div",{className:e.skeletonBtn})]})]})}function M({id:a,title:n,subtitle:l,images:f,price:h,originalPrice:t,discountPercent:x,badge:u,rating:j,reviewCount:p,installments:i,unavailable:m=!1,loading:B=!1,onAddToCart:v,onWishlist:g,onQuickView:N,onClick:d,formatPrice:r,className:k}){if(B)return s.jsx(A,{});const C=r?r(h):String(h),y=t?r?r(t):String(t):void 0,o=f[0],w=s.jsxs("div",{className:e.imageWrapper,children:[o&&s.jsx("img",{width:100,height:100,src:o.src,alt:o.alt,className:e.image,loading:"lazy"}),s.jsxs("div",{className:e.badgeOverlay,children:[x!==void 0&&s.jsxs(b.Badge,{variant:"danger",size:"sm",children:["-",x,"%"]}),u&&s.jsx(b.Badge,{variant:"brand",size:"sm",children:u})]}),g&&s.jsx("button",{type:"button",className:e.wishlistBtn,onClick:c=>{c.stopPropagation(),g(a)},"aria-label":`Agregar ${n} a favoritos`,children:s.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:s.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})})}),m&&s.jsx("div",{className:e.unavailableOverlay,children:s.jsx("span",{className:e.unavailableText,children:"Sin stock"})})]}),L=s.jsxs("div",{className:e.body,children:[s.jsx("p",{className:e.title,children:n}),l&&s.jsx("p",{className:e.subtitle,children:l}),j!==void 0&&s.jsxs("div",{className:e.starsWrapper,children:[s.jsx(W,{rating:j}),p!==void 0&&s.jsxs("span",{className:e.reviewCount,children:["(",p,")"]})]}),s.jsxs("div",{className:e.priceWrapper,children:[s.jsx("span",{className:e.price,children:C}),y&&s.jsx("span",{className:e.originalPrice,children:y})]}),i&&s.jsxs("span",{className:e.installments,children:[i.count,"x"," ",r?r(i.value):i.value]})]}),S=s.jsxs("div",{className:e.footer,children:[v&&s.jsx(z.Button,{variant:"primary",size:"sm",fullWidth:!0,disabled:m,onClick:()=>v(a),children:"Agregar"}),N&&s.jsx("button",{type:"button",className:e.quickViewBtn,onClick:c=>{c.stopPropagation(),N(a)},children:"Vista rápida"})]});return s.jsx("div",{className:[e.root,k].filter(Boolean).join(" "),children:s.jsx(q.Card,{media:w,body:L,footer:S,hoverable:!!d,onClick:d?()=>d(a):void 0})})}exports.ProductCard=M;
@@ -1,54 +1,65 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
2
- import { root as g, heading as b } from "./index.esm27.js";
3
- import { Carousel as k } from "./index.esm5.js";
4
- import { ProductCard as w } from "./index.esm9.js";
5
- function A({
6
- products: s,
1
+ var w = Object.defineProperty, x = Object.defineProperties;
2
+ var C = Object.getOwnPropertyDescriptors;
3
+ var m = Object.getOwnPropertySymbols;
4
+ var P = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
5
+ var i = (e, o, r) => o in e ? w(e, o, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[o] = r, l = (e, o) => {
6
+ for (var r in o || (o = {}))
7
+ P.call(o, r) && i(e, r, o[r]);
8
+ if (m)
9
+ for (var r of m(o))
10
+ j.call(o, r) && i(e, r, o[r]);
11
+ return e;
12
+ }, n = (e, o) => x(e, C(o));
13
+ import { jsxs as A, jsx as a } from "react/jsx-runtime";
14
+ import { root as N, heading as y } from "./index.esm21.js";
15
+ import { Carousel as D } from "./index.esm5.js";
16
+ import { ProductCard as S } from "./index.esm9.js";
17
+ function B({
18
+ products: e,
7
19
  title: o,
8
- autoplay: t = !1,
9
- autoplayMs: a = 4e3,
10
- slidesPerView: i = { mobile: 1, tablet: 2, desktop: 4 },
11
- onAddToCart: l,
12
- onWishlist: m,
13
- onProductClick: n,
14
- formatPrice: c,
15
- loading: d = !1,
16
- skeletonCount: p = 4
20
+ autoplay: r = !1,
21
+ autoplayMs: t = 4e3,
22
+ slidesPerView: c = { mobile: 1, tablet: 2, desktop: 4 },
23
+ onAddToCart: d,
24
+ onWishlist: p,
25
+ onProductClick: f,
26
+ formatPrice: h,
27
+ loading: u = !1,
28
+ skeletonCount: g = 4
17
29
  }) {
18
- const f = d ? Array.from({ length: p }).map((r, h) => ({
19
- id: `skeleton-${h}`,
30
+ const b = u ? Array.from({ length: g }).map((s, k) => ({
31
+ id: `skeleton-${k}`,
20
32
  title: "",
21
33
  images: [],
22
34
  price: 0,
23
35
  loading: !0
24
- })) : s;
25
- return /* @__PURE__ */ u("section", { className: g, "aria-label": o ?? "Productos", children: [
26
- o && /* @__PURE__ */ e("h2", { className: b, children: o }),
27
- /* @__PURE__ */ e(
28
- k,
36
+ })) : e;
37
+ return /* @__PURE__ */ A("section", { className: N, "aria-label": o != null ? o : "Productos", children: [
38
+ o && /* @__PURE__ */ a("h2", { className: y, children: o }),
39
+ /* @__PURE__ */ a(
40
+ D,
29
41
  {
30
- autoplay: t,
31
- autoplayMs: a,
32
- slidesPerView: i,
42
+ autoplay: r,
43
+ autoplayMs: t,
44
+ slidesPerView: c,
33
45
  gap: 4,
34
46
  showArrows: !0,
35
47
  showDots: !0,
36
48
  loop: !0,
37
- children: f.map((r) => /* @__PURE__ */ e(
38
- w,
39
- {
40
- ...r,
41
- onAddToCart: l,
42
- onWishlist: m,
43
- onClick: n,
44
- formatPrice: c
45
- },
46
- r.id
49
+ children: b.map((s) => /* @__PURE__ */ a(
50
+ S,
51
+ n(l({}, s), {
52
+ onAddToCart: d,
53
+ onWishlist: p,
54
+ onClick: f,
55
+ formatPrice: h
56
+ }),
57
+ s.id
47
58
  ))
48
59
  }
49
60
  )
50
61
  ] });
51
62
  }
52
63
  export {
53
- A as ProductShelf
64
+ B as ProductShelf
54
65
  };
@@ -1,35 +1,35 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { useId as b } from "react";
3
- import { wrapper as f, label as N, selectWrapper as x, chevron as j, errorText as k, select as w, selectError as I } from "./index.esm15.js";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { useId as f } from "react";
3
+ import { wrapper as p, label as N, selectWrapper as x, chevron as j, errorText as k, select as w, selectError as I } from "./index.esm14.js";
4
4
  function g({
5
- options: n,
6
- value: o,
7
- onChange: i,
5
+ options: o,
6
+ value: m,
7
+ onChange: r,
8
8
  label: d,
9
- placeholder: t,
10
- error: r,
11
- disabled: m = !1,
12
- name: u,
13
- id: h
9
+ placeholder: c,
10
+ error: a,
11
+ disabled: u = !1,
12
+ name: h,
13
+ id: s
14
14
  }) {
15
- const v = b(), a = h ?? v, c = r ? `${a}-error` : void 0, p = [w, r ? I : ""].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ s("div", { className: f, children: [
17
- d && /* @__PURE__ */ e("label", { className: N, htmlFor: a, children: d }),
18
- /* @__PURE__ */ s("div", { className: x, children: [
19
- /* @__PURE__ */ s(
15
+ const v = f(), i = s != null ? s : v, n = a ? `${i}-error` : void 0, b = [w, a ? I : ""].filter(Boolean).join(" ");
16
+ return /* @__PURE__ */ t("div", { className: p, children: [
17
+ d && /* @__PURE__ */ e("label", { className: N, htmlFor: i, children: d }),
18
+ /* @__PURE__ */ t("div", { className: x, children: [
19
+ /* @__PURE__ */ t(
20
20
  "select",
21
21
  {
22
- id: a,
23
- name: u,
24
- className: p,
25
- value: o,
26
- onChange: (l) => i == null ? void 0 : i(l.target.value),
27
- disabled: m,
28
- "aria-invalid": r ? !0 : void 0,
29
- "aria-describedby": c,
22
+ id: i,
23
+ name: h,
24
+ className: b,
25
+ value: m,
26
+ onChange: (l) => r == null ? void 0 : r(l.target.value),
27
+ disabled: u,
28
+ "aria-invalid": a ? !0 : void 0,
29
+ "aria-describedby": n,
30
30
  children: [
31
- t && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: t }),
32
- n.map((l) => /* @__PURE__ */ e("option", { value: l.value, disabled: l.disabled, children: l.label }, l.value))
31
+ c && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: c }),
32
+ o.map((l) => /* @__PURE__ */ e("option", { value: l.value, disabled: l.disabled, children: l.label }, l.value))
33
33
  ]
34
34
  }
35
35
  ),
@@ -44,7 +44,7 @@ function g({
44
44
  }
45
45
  ) }) })
46
46
  ] }),
47
- r && /* @__PURE__ */ e("span", { id: c, className: k, role: "alert", children: r })
47
+ a && /* @__PURE__ */ e("span", { id: n, className: k, role: "alert", children: a })
48
48
  ] });
49
49
  }
50
50
  export {
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { vars as c } from "@danielcruzcode/design-tokens";
3
- import { stackBase as n } from "./index.esm29.js";
3
+ import { stackBase as n } from "./index.esm30.js";
4
4
  const o = {
5
5
  start: "flex-start",
6
6
  center: "center",
@@ -1,5 +1,5 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { removeButton as o, tagRecipe as a } from "./index.esm18.js";
2
+ import { removeButton as o, tagRecipe as a } from "./index.esm17.js";
3
3
  function c({ label: r, onRemove: e, variant: i = "default" }) {
4
4
  return /* @__PURE__ */ n("span", { className: a({ variant: i }), children: [
5
5
  r,
@@ -1,7 +1,13 @@
1
+ import "./index.esm31.js";
1
2
  /* empty css */
2
3
  /* empty css */
3
- import { c as r } from "./index.esm33.js";
4
- var t = r({ defaultClassName: "_12rozn90", variantClassNames: { variant: { primary: "_12rozn91", secondary: "_12rozn92", ghost: "_12rozn93", danger: "_12rozn94" }, size: { sm: "_12rozn95", md: "_12rozn96", lg: "_12rozn97" }, fullWidth: { true: "_12rozn98" } }, defaultVariants: { variant: "primary", size: "md" }, compoundVariants: [] });
4
+ var c = "_7acib40", i = "_7acib41", b = "_7acib42", p = "_7acib43", t = "_7acib44", v = "_7acib45", o = "_7acib46";
5
5
  export {
6
- t as buttonRecipe
6
+ v as chevron,
7
+ o as errorText,
8
+ i as label,
9
+ p as select,
10
+ t as selectError,
11
+ b as selectWrapper,
12
+ c as wrapper
7
13
  };
@@ -1,13 +1,7 @@
1
- import "./index.esm34.js";
2
1
  /* empty css */
3
2
  /* empty css */
4
- var c = "_7acib40", i = "_7acib41", b = "_7acib42", p = "_7acib43", t = "_7acib44", v = "_7acib45", o = "_7acib46";
3
+ import { c as r } from "./index.esm35.js";
4
+ var t = r({ defaultClassName: "_12rozn90", variantClassNames: { variant: { primary: "_12rozn91", secondary: "_12rozn92", ghost: "_12rozn93", danger: "_12rozn94" }, size: { sm: "_12rozn95", md: "_12rozn96", lg: "_12rozn97" }, fullWidth: { true: "_12rozn98" } }, defaultVariants: { variant: "primary", size: "md" }, compoundVariants: [] });
5
5
  export {
6
- v as chevron,
7
- o as errorText,
8
- i as label,
9
- p as select,
10
- t as selectError,
11
- b as selectWrapper,
12
- c as wrapper
6
+ t as buttonRecipe
13
7
  };
@@ -1,26 +1,7 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- var r = "w40enx1", n = "w40enx2", w = "w40enx3", v = "w40enx4", x = "w40enx5", i = "w40enx6", t = "w40enx7", l = "w40enx8", o = "w40enx9", p = "w40enxa", s = "w40enxb", m = "w40enxc", b = "w40enxd", g = "w40enxe", c = "w40enxf", k = "w40enxg", u = "w40enxh", d = "w40enxi", j = "w40enxk w40enxj", y = "w40enxl w40enxj", B = "w40enxm w40enxj";
3
+ import { c as a } from "./index.esm35.js";
4
+ var t = a({ defaultClassName: "rxfwcs0", variantClassNames: { variant: { brand: "rxfwcs1", success: "rxfwcs2", warning: "rxfwcs3", danger: "rxfwcs4", neutral: "rxfwcs5" }, size: { sm: "rxfwcs6", md: "rxfwcs7" } }, defaultVariants: { variant: "neutral", size: "md" }, compoundVariants: [] });
4
5
  export {
5
- v as badgeOverlay,
6
- i as body,
7
- c as footer,
8
- w as image,
9
- n as imageWrapper,
10
- g as installments,
11
- b as originalPrice,
12
- m as price,
13
- s as priceWrapper,
14
- k as quickViewBtn,
15
- p as reviewCount,
16
- r as root,
17
- B as skeletonBtn,
18
- j as skeletonImage,
19
- y as skeletonLine,
20
- o as starsWrapper,
21
- l as subtitle,
22
- t as title,
23
- u as unavailableOverlay,
24
- d as unavailableText,
25
- x as wishlistBtn
6
+ t as badgeRecipe
26
7
  };
@@ -1,12 +1,8 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- var e = "_104k35i0", i = "_104k35i1", k = "_104k35i2", p = "_104k35i3", t = "_104k35i4", v = "_104k35i5", _ = "_104k35i7";
3
+ import { c as a } from "./index.esm35.js";
4
+ var e = a({ defaultClassName: "_13mmpdy0", variantClassNames: { variant: { default: "_13mmpdy1", brand: "_13mmpdy2" } }, defaultVariants: { variant: "default" }, compoundVariants: [] }), d = "_13mmpdy3";
4
5
  export {
5
- p as box,
6
- t as boxChecked,
7
- v as boxIndeterminate,
8
- k as hiddenInput,
9
- _ as labelText,
10
- e as wrapper,
11
- i as wrapperDisabled
6
+ d as removeButton,
7
+ e as tagRecipe
12
8
  };
@@ -1,8 +1,15 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
- import { c as a } from "./index.esm33.js";
4
- var e = a({ defaultClassName: "_13mmpdy0", variantClassNames: { variant: { default: "_13mmpdy1", brand: "_13mmpdy2" } }, defaultVariants: { variant: "default" }, compoundVariants: [] }), d = "_13mmpdy3";
3
+ var v = "wt8vlo0", a = "wt8vlo1", o = "wt8vlo2", p = "wt8vlo3", l = "wt8vlo4", e = "wt8vlo5", w = "wt8vlo6", i = "wt8vlo7", n = "wt8vlo8", u = "wt8vlo9";
5
4
  export {
6
- d as removeButton,
7
- e as tagRecipe
5
+ u as errorText,
6
+ n as hint,
7
+ i as iconSlot,
8
+ w as input,
9
+ p as inputWrapper,
10
+ e as inputWrapperDisabled,
11
+ l as inputWrapperError,
12
+ a as label,
13
+ o as requiredMark,
14
+ v as wrapper
8
15
  };
@@ -1,136 +1,12 @@
1
- import { c as k } from "./index.esm49.js";
2
- import { m as s, s as y } from "./index.esm50.js";
3
- const b = '<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';
4
- function N({
5
- swiper: a,
6
- extendParams: x,
7
- on: r,
8
- emit: v
9
- }) {
10
- x({
11
- navigation: {
12
- nextEl: null,
13
- prevEl: null,
14
- addIcons: !0,
15
- hideOnClick: !1,
16
- disabledClass: "swiper-button-disabled",
17
- hiddenClass: "swiper-button-hidden",
18
- lockClass: "swiper-button-lock",
19
- navigationDisabledClass: "swiper-navigation-disabled"
20
- }
21
- }), a.navigation = {
22
- nextEl: null,
23
- prevEl: null,
24
- arrowSvg: b
25
- };
26
- function E(n) {
27
- let t;
28
- return n && typeof n == "string" && a.isElement && (t = a.el.querySelector(n) || a.hostEl.querySelector(n), t) ? t : (n && (typeof n == "string" && (t = [...document.querySelectorAll(n)]), a.params.uniqueNavElements && typeof n == "string" && t && t.length > 1 && a.el.querySelectorAll(n).length === 1 ? t = a.el.querySelector(n) : t && t.length === 1 && (t = t[0])), n && !t ? n : t);
29
- }
30
- function f(n, t) {
31
- const e = a.params.navigation;
32
- n = s(n), n.forEach((i) => {
33
- i && (i.classList[t ? "add" : "remove"](...e.disabledClass.split(" ")), i.tagName === "BUTTON" && (i.disabled = t), a.params.watchOverflow && a.enabled && i.classList[a.isLocked ? "add" : "remove"](e.lockClass));
34
- });
35
- }
36
- function d() {
37
- const {
38
- nextEl: n,
39
- prevEl: t
40
- } = a.navigation;
41
- if (a.params.loop) {
42
- f(t, !1), f(n, !1);
43
- return;
44
- }
45
- f(t, a.isBeginning && !a.params.rewind), f(n, a.isEnd && !a.params.rewind);
46
- }
47
- function h(n) {
48
- n.preventDefault(), !(a.isBeginning && !a.params.loop && !a.params.rewind) && (a.slidePrev(), v("navigationPrev"));
49
- }
50
- function p(n) {
51
- n.preventDefault(), !(a.isEnd && !a.params.loop && !a.params.rewind) && (a.slideNext(), v("navigationNext"));
52
- }
53
- function m() {
54
- const n = a.params.navigation;
55
- if (a.params.navigation = k(a, a.originalParams.navigation, a.params.navigation, {
56
- nextEl: "swiper-button-next",
57
- prevEl: "swiper-button-prev"
58
- }), !(n.nextEl || n.prevEl)) return;
59
- let t = E(n.nextEl), e = E(n.prevEl);
60
- Object.assign(a.navigation, {
61
- nextEl: t,
62
- prevEl: e
63
- }), t = s(t), e = s(e);
64
- const i = (l, g) => {
65
- if (l) {
66
- if (n.addIcons && l.matches(".swiper-button-next,.swiper-button-prev") && !l.querySelector("svg")) {
67
- const o = document.createElement("div");
68
- y(o, b), l.appendChild(o.querySelector("svg")), o.remove();
69
- }
70
- l.addEventListener("click", g === "next" ? p : h);
71
- }
72
- !a.enabled && l && l.classList.add(...n.lockClass.split(" "));
73
- };
74
- t.forEach((l) => i(l, "next")), e.forEach((l) => i(l, "prev"));
75
- }
76
- function u() {
77
- let {
78
- nextEl: n,
79
- prevEl: t
80
- } = a.navigation;
81
- n = s(n), t = s(t);
82
- const e = (i, l) => {
83
- i.removeEventListener("click", l === "next" ? p : h), i.classList.remove(...a.params.navigation.disabledClass.split(" "));
84
- };
85
- n.forEach((i) => e(i, "next")), t.forEach((i) => e(i, "prev"));
86
- }
87
- r("init", () => {
88
- a.params.navigation.enabled === !1 ? C() : (m(), d());
89
- }), r("toEdge fromEdge lock unlock", () => {
90
- d();
91
- }), r("destroy", () => {
92
- u();
93
- }), r("enable disable", () => {
94
- let {
95
- nextEl: n,
96
- prevEl: t
97
- } = a.navigation;
98
- if (n = s(n), t = s(t), a.enabled) {
99
- d();
100
- return;
101
- }
102
- [...n, ...t].filter((e) => !!e).forEach((e) => e.classList.add(a.params.navigation.lockClass));
103
- }), r("click", (n, t) => {
104
- let {
105
- nextEl: e,
106
- prevEl: i
107
- } = a.navigation;
108
- e = s(e), i = s(i);
109
- const l = t.target;
110
- let g = i.includes(l) || e.includes(l);
111
- if (a.isElement && !g) {
112
- const o = t.path || t.composedPath && t.composedPath();
113
- o && (g = o.find((c) => e.includes(c) || i.includes(c)));
114
- }
115
- if (a.params.navigation.hideOnClick && !g) {
116
- if (a.pagination && a.params.pagination && a.params.pagination.clickable && (a.pagination.el === l || a.pagination.el.contains(l))) return;
117
- let o;
118
- e.length ? o = e[0].classList.contains(a.params.navigation.hiddenClass) : i.length && (o = i[0].classList.contains(a.params.navigation.hiddenClass)), v(o === !0 ? "navigationShow" : "navigationHide"), [...e, ...i].filter((c) => !!c).forEach((c) => c.classList.toggle(a.params.navigation.hiddenClass));
119
- }
120
- });
121
- const L = () => {
122
- a.el.classList.remove(...a.params.navigation.navigationDisabledClass.split(" ")), m(), d();
123
- }, C = () => {
124
- a.el.classList.add(...a.params.navigation.navigationDisabledClass.split(" ")), u();
125
- };
126
- Object.assign(a.navigation, {
127
- enable: L,
128
- disable: C,
129
- update: d,
130
- init: m,
131
- destroy: u
132
- });
133
- }
1
+ /* empty css */
2
+ /* empty css */
3
+ var e = "_104k35i0", i = "_104k35i1", k = "_104k35i2", p = "_104k35i3", t = "_104k35i4", v = "_104k35i5", _ = "_104k35i7";
134
4
  export {
135
- N as default
5
+ p as box,
6
+ t as boxChecked,
7
+ v as boxIndeterminate,
8
+ k as hiddenInput,
9
+ _ as labelText,
10
+ e as wrapper,
11
+ i as wrapperDisabled
136
12
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { badgeRecipe as o } from "./index.esm25.js";
2
+ import { badgeRecipe as o } from "./index.esm16.js";
3
3
  function p({ variant: e = "neutral", size: r = "md", children: a }) {
4
4
  return /* @__PURE__ */ m("span", { className: o({ variant: e, size: r }), children: a });
5
5
  }