@danielcruzcode/ui-core 0.1.2 → 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.
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs24.js +1 -0
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs44.js +1 -0
- package/dist/index.cjs45.js +1 -0
- package/dist/index.cjs46.js +1 -0
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs50.js +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.esm10.js +47 -36
- package/dist/index.esm11.js +27 -27
- package/dist/index.esm12.js +1 -1
- package/dist/index.esm13.js +1 -1
- package/dist/index.esm14.js +8 -4
- package/dist/index.esm15.js +1 -1
- package/dist/index.esm16.js +1 -1
- package/dist/index.esm17.js +4 -8
- package/dist/index.esm18.js +11 -8
- package/dist/index.esm19.js +10 -134
- package/dist/index.esm20.js +24 -224
- package/dist/index.esm21.js +5 -128
- package/dist/index.esm22.js +5 -245
- package/dist/index.esm23.js +7 -7
- package/dist/index.esm24.js +136 -0
- package/dist/index.esm25.js +224 -9
- package/dist/index.esm26.js +128 -24
- package/dist/index.esm27.js +278 -5
- package/dist/index.esm28.js +7 -3
- package/dist/index.esm30.js +2 -12
- package/dist/index.esm4.js +1 -1
- package/dist/{index.esm39.js → index.esm44.js} +232 -222
- package/dist/{index.esm40.js → index.esm45.js} +3 -3
- package/dist/{index.esm41.js → index.esm46.js} +4 -4
- package/dist/index.esm5.js +36 -35
- package/dist/index.esm50.js +5 -5
- package/dist/index.esm52.js +5 -5
- package/dist/index.esm6.js +24 -24
- package/dist/index.esm7.js +1 -1
- package/dist/index.esm8.js +23 -23
- package/dist/index.esm9.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/styles.css +1 -1
- package/dist/index.cjs29.js +0 -1
- package/dist/index.cjs39.js +0 -1
- package/dist/index.cjs40.js +0 -1
- package/dist/index.cjs41.js +0 -1
- package/dist/index.esm29.js +0 -5
- /package/dist/{index.cjs34.js → index.cjs35.js} +0 -0
- /package/dist/{index.esm34.js → index.esm35.js} +0 -0
package/dist/index.cjs8.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),I=require("react"),e=require("./index.
|
|
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;
|
package/dist/index.cjs9.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),e=require("./index.
|
|
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;
|
package/dist/index.esm10.js
CHANGED
|
@@ -1,54 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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:
|
|
9
|
-
autoplayMs:
|
|
10
|
-
slidesPerView:
|
|
11
|
-
onAddToCart:
|
|
12
|
-
onWishlist:
|
|
13
|
-
onProductClick:
|
|
14
|
-
formatPrice:
|
|
15
|
-
loading:
|
|
16
|
-
skeletonCount:
|
|
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
|
|
19
|
-
id: `skeleton-${
|
|
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
|
-
})) :
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
o && /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
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:
|
|
31
|
-
autoplayMs:
|
|
32
|
-
slidesPerView:
|
|
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:
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
64
|
+
B as ProductShelf
|
|
54
65
|
};
|
package/dist/index.esm11.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { wrapper as
|
|
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:
|
|
6
|
-
value:
|
|
7
|
-
onChange:
|
|
5
|
+
options: o,
|
|
6
|
+
value: m,
|
|
7
|
+
onChange: r,
|
|
8
8
|
label: d,
|
|
9
|
-
placeholder:
|
|
10
|
-
error:
|
|
11
|
-
disabled:
|
|
12
|
-
name:
|
|
13
|
-
id:
|
|
9
|
+
placeholder: c,
|
|
10
|
+
error: a,
|
|
11
|
+
disabled: u = !1,
|
|
12
|
+
name: h,
|
|
13
|
+
id: s
|
|
14
14
|
}) {
|
|
15
|
-
const v =
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
d && /* @__PURE__ */ e("label", { className: N, htmlFor:
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
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:
|
|
23
|
-
name:
|
|
24
|
-
className:
|
|
25
|
-
value:
|
|
26
|
-
onChange: (l) =>
|
|
27
|
-
disabled:
|
|
28
|
-
"aria-invalid":
|
|
29
|
-
"aria-describedby":
|
|
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
|
-
|
|
32
|
-
|
|
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
|
-
|
|
47
|
+
a && /* @__PURE__ */ e("span", { id: n, className: k, role: "alert", children: a })
|
|
48
48
|
] });
|
|
49
49
|
}
|
|
50
50
|
export {
|
package/dist/index.esm12.js
CHANGED
|
@@ -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.
|
|
3
|
+
import { stackBase as n } from "./index.esm30.js";
|
|
4
4
|
const o = {
|
|
5
5
|
start: "flex-start",
|
|
6
6
|
center: "center",
|
package/dist/index.esm13.js
CHANGED
|
@@ -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.
|
|
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,
|
package/dist/index.esm14.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import "./index.esm31.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
/* empty css */
|
|
4
|
-
|
|
5
|
-
var i = a({ defaultClassName: "_13mmpdy0", variantClassNames: { variant: { default: "_13mmpdy1", brand: "_13mmpdy2" } }, defaultVariants: { variant: "default" }, compoundVariants: [] }), p = "_13mmpdy3";
|
|
4
|
+
var c = "_7acib40", i = "_7acib41", b = "_7acib42", p = "_7acib43", t = "_7acib44", v = "_7acib45", o = "_7acib46";
|
|
6
5
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
9
13
|
};
|
package/dist/index.esm15.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { c as r } from "./index.
|
|
3
|
+
import { c as r } from "./index.esm35.js";
|
|
4
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
6
|
t as buttonRecipe
|
package/dist/index.esm16.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { c as a } from "./index.
|
|
3
|
+
import { c as a } from "./index.esm35.js";
|
|
4
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: [] });
|
|
5
5
|
export {
|
|
6
6
|
t as badgeRecipe
|
package/dist/index.esm17.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
c as label,
|
|
8
|
-
b as select,
|
|
9
|
-
v as selectError,
|
|
10
|
-
i as selectWrapper,
|
|
11
|
-
e as wrapper
|
|
6
|
+
d as removeButton,
|
|
7
|
+
e as tagRecipe
|
|
12
8
|
};
|
package/dist/index.esm18.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
var
|
|
3
|
+
var v = "wt8vlo0", a = "wt8vlo1", o = "wt8vlo2", p = "wt8vlo3", l = "wt8vlo4", e = "wt8vlo5", w = "wt8vlo6", i = "wt8vlo7", n = "wt8vlo8", u = "wt8vlo9";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
e as
|
|
11
|
-
|
|
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
|
|
12
15
|
};
|
package/dist/index.esm19.js
CHANGED
|
@@ -1,136 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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
|
};
|