@bobbykim/mcl-carousel 0.9.5 → 0.10.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.
package/dist/index.d.ts CHANGED
@@ -18,11 +18,11 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
18
18
  titleSize: HeadingSize;
19
19
  titleColor: ColorPalette;
20
20
  bgColor: ColorPalette;
21
- displayTagLine: boolean;
21
+ showTagLine: boolean;
22
22
  tagLineUpperCase: boolean;
23
23
  tagLineSize: BodyText;
24
24
  tagLineColor: ColorPalette;
25
- displayHighlight: boolean;
25
+ showHighlight: boolean;
26
26
  highlightColor: ColorPalette;
27
27
  btnColor: ColorPalette;
28
28
  btnBgColor: ColorPalette;
@@ -36,12 +36,12 @@ declare type __VLS_Props = {
36
36
  titleSize?: HeadingSize;
37
37
  titleColor?: ColorPalette;
38
38
  bgColor?: ColorPalette;
39
- displayTagLine?: boolean;
39
+ showTagLine?: boolean;
40
40
  tagLineUpperCase?: boolean;
41
41
  tagLine?: string;
42
42
  tagLineSize?: BodyText;
43
43
  tagLineColor?: ColorPalette;
44
- displayHighlight?: boolean;
44
+ showHighlight?: boolean;
45
45
  highlightColor?: ColorPalette;
46
46
  btnColor?: ColorPalette;
47
47
  btnBgColor?: ColorPalette;
@@ -1,19 +1,19 @@
1
- import { defineComponent as G, ref as o, onMounted as S, openBlock as g, createElementBlock as v, normalizeClass as i, unref as m, createElementVNode as l, createCommentVNode as y, renderSlot as L } from "vue";
2
- import n from "@bobbykim/manguito-theme";
3
- import { useEventListener as w, useIntersectionObserver as z } from "@vueuse/core";
4
- const H = { class: "px-xs sm:px-md container text-center sm:text-left" }, j = { class: "relative" }, X = { class: "relative" }, $ = ["innerHTML"], I = ["innerHTML"], N = { class: "relative flex flex-wrap items-center justify-center space-x-4 space-y-4 sm:flex-nowrap sm:justify-start" }, D = { class: "max-w-144" }, U = { class: "flex space-x-4" }, V = ["disabled"], P = ["disabled"], W = { class: "mt-md sm:mt-lg lg:mt-xl container" }, J = /* @__PURE__ */ G({
1
+ import { defineComponent as E, ref as i, onMounted as H, openBlock as f, createElementBlock as v, normalizeClass as r, unref as x, createElementVNode as n, createCommentVNode as w, renderSlot as y } from "vue";
2
+ import { generateClass as l } from "@bobbykim/manguito-theme";
3
+ import { useEventListener as L, useIntersectionObserver as j } from "@vueuse/core";
4
+ const $ = { class: "container px-xs text-center sm:px-md sm:text-left" }, G = { class: "relative" }, I = { class: "relative" }, N = ["innerHTML"], R = ["innerHTML"], U = { class: "relative flex flex-wrap items-center justify-center space-y-4 space-x-4 sm:flex-nowrap sm:justify-start" }, D = { class: "max-w-144" }, O = { class: "flex space-x-4" }, W = ["disabled"], X = ["disabled"], q = { class: "container mt-md sm:mt-lg lg:mt-xl" }, P = /* @__PURE__ */ E({
5
5
  __name: "MclCarouselA",
6
6
  props: {
7
7
  title: {},
8
8
  titleSize: { default: "md" },
9
9
  titleColor: { default: "dark-3" },
10
10
  bgColor: { default: "light-1" },
11
- displayTagLine: { type: Boolean, default: !0 },
11
+ showTagLine: { type: Boolean, default: !0 },
12
12
  tagLineUpperCase: { type: Boolean, default: !0 },
13
13
  tagLine: {},
14
14
  tagLineSize: { default: "md" },
15
15
  tagLineColor: { default: "dark-1" },
16
- displayHighlight: { type: Boolean, default: !0 },
16
+ showHighlight: { type: Boolean, default: !0 },
17
17
  highlightColor: { default: "primary" },
18
18
  btnColor: { default: "dark-3" },
19
19
  btnBgColor: { default: "light-4" },
@@ -21,10 +21,10 @@ const H = { class: "px-xs sm:px-md container text-center sm:text-left" }, j = {
21
21
  cardsGap: { default: "xs" }
22
22
  },
23
23
  emits: ["btn-prev", "btn-next"],
24
- setup(e, { emit: B }) {
25
- const T = e, r = o(null), c = o([]), x = o(), h = B, d = o(0), u = o(!1);
26
- let f = !1;
27
- const O = (s) => {
24
+ setup(e, { emit: k }) {
25
+ const B = e, o = i(null), c = i([]), h = i(), m = k, d = i(0), u = i(!1);
26
+ let g = !1;
27
+ const M = (s) => {
28
28
  switch (s) {
29
29
  case "0":
30
30
  return 0;
@@ -47,107 +47,107 @@ const H = { class: "px-xs sm:px-md container text-center sm:text-left" }, j = {
47
47
  case "3xl":
48
48
  return 128;
49
49
  }
50
- }, k = (s) => {
50
+ }, V = (s) => {
51
51
  c.value.push(s);
52
52
  }, C = (s, t) => {
53
- f || (f = !0, t === "prev" && (d.value--, h("btn-prev", s)), t === "next" && (d.value++, h("btn-next", s)), r.value?.dispatchEvent(new Event("sliderMove")));
54
- }, M = (s, t) => [
55
- n("H2", s),
56
- n("TEXTCOLOR", t)
57
- ].join(" "), E = (s, t, a) => {
58
- const b = [
59
- n("BODYTEXT", s),
60
- n("TEXTCOLOR", t)
53
+ g || (g = !0, t === "prev" && (d.value--, m("btn-prev", s)), t === "next" && (d.value++, m("btn-next", s)), o.value?.dispatchEvent(new Event("sliderMove")));
54
+ }, T = (s, t) => [
55
+ l.h2Variant({ size: s }),
56
+ l.textColorVariant({ color: t })
57
+ ].join(" "), S = (s, t, a) => {
58
+ const p = [
59
+ l.bodyTextVariant({ size: s }),
60
+ l.textColorVariant({ color: t })
61
61
  ];
62
- return a && b.push("uppercase"), b.join(" ");
63
- }, p = (s, t) => [
64
- n("TEXTCOLOR", s),
65
- n("BGCOLOR", t),
66
- n("RINGCOLOR", t)
67
- ].join(" "), R = () => {
68
- r.value.style.transform = `translateX(-${d.value * (c.value[0].$el.clientWidth + O(T.cardsGap) + 2)}px)`, u.value = !1;
62
+ return a && p.push("uppercase"), p.join(" ");
63
+ }, b = (s, t) => [
64
+ l.textColorVariant({ color: s }),
65
+ l.bgColorVariant({ color: t }),
66
+ l.ringColorVariant({ color: t })
67
+ ].join(" "), z = () => {
68
+ o.value.style.transform = `translateX(-${d.value * (c.value[0].$el.clientWidth + M(B.cardsGap) + 2)}px)`, u.value = !1;
69
69
  }, A = () => {
70
- f = !1;
70
+ g = !1;
71
71
  };
72
- return w(r, "sliderMove", R), w(r, "transitionend", A), z(
73
- x,
72
+ return L(o, "sliderMove", z), L(o, "transitionend", A), j(
73
+ h,
74
74
  (s) => {
75
75
  s[0].isIntersecting && (u.value = !0);
76
76
  },
77
77
  { threshold: 0.75 }
78
- ), S(() => {
79
- x.value = c.value[c.value.length - 1].$el;
80
- }), (s, t) => (g(), v("section", {
81
- class: i(["py-lg lg:py-xl overflow-hidden", m(n)("BGCOLOR", e.bgColor)])
78
+ ), H(() => {
79
+ h.value = c.value[c.value.length - 1].$el;
80
+ }), (s, t) => (f(), v("section", {
81
+ class: r(["overflow-hidden py-lg lg:py-xl", x(l).bgColorVariant({ color: e.bgColor })])
82
82
  }, [
83
- l("div", H, [
84
- l("div", j, [
85
- e.displayHighlight ? (g(), v("div", {
83
+ n("div", $, [
84
+ n("div", G, [
85
+ e.showHighlight ? (f(), v("div", {
86
86
  key: 0,
87
- class: i(["w-md absolute -left-4 hidden h-full bg-opacity-25 sm:block", m(n)("BGCOLOR", e.highlightColor)])
88
- }, null, 2)) : y("", !0),
89
- l("div", X, [
90
- e.displayTagLine ? (g(), v("span", {
87
+ class: r(["absolute -left-4 hidden h-full w-md bg-opacity-25 sm:block", x(l).bgColorVariant({ color: e.highlightColor })])
88
+ }, null, 2)) : w("", !0),
89
+ n("div", I, [
90
+ e.showTagLine ? (f(), v("span", {
91
91
  key: 0,
92
- class: i([
92
+ class: r([
93
93
  "tracking-widest",
94
- E(e.tagLineSize, e.tagLineColor, e.tagLineUpperCase)
94
+ S(e.tagLineSize, e.tagLineColor, e.tagLineUpperCase)
95
95
  ]),
96
96
  innerHTML: e.tagLine
97
- }, null, 10, $)) : y("", !0),
98
- l("h2", {
99
- class: i(["tracking-wide", M(e.titleSize, e.titleColor)]),
97
+ }, null, 10, N)) : w("", !0),
98
+ n("h2", {
99
+ class: r(["tracking-wide", T(e.titleSize, e.titleColor)]),
100
100
  innerHTML: e.title
101
- }, null, 10, I)
101
+ }, null, 10, R)
102
102
  ]),
103
- l("div", N, [
104
- l("div", D, [
105
- L(s.$slots, "description")
103
+ n("div", U, [
104
+ n("div", D, [
105
+ y(s.$slots, "description")
106
106
  ]),
107
- l("div", U, [
108
- l("button", {
109
- class: i(["p-xs grid place-items-center rounded-full ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:outline-none focus:ring-4 disabled:opacity-50", p(e.btnColor, e.btnBgColor)]),
107
+ n("div", O, [
108
+ n("button", {
109
+ class: r(["grid place-items-center rounded-full p-xs ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:ring-4 focus:outline-none disabled:opacity-50", b(e.btnColor, e.btnBgColor)]),
110
110
  disabled: d.value === 0,
111
111
  onClick: t[0] || (t[0] = (a) => C(a, "prev")),
112
112
  "aria-label": "previous"
113
113
  }, [...t[2] || (t[2] = [
114
- l("svg", {
115
- class: "w-xs h-xs",
114
+ n("svg", {
115
+ class: "h-xs w-xs",
116
116
  xmlns: "http://www.w3.org/2000/svg",
117
117
  viewBox: "0 0 384 512",
118
118
  fill: "currentColor"
119
119
  }, [
120
- l("path", { d: "M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 278.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
120
+ n("path", { d: "M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 278.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
121
121
  ], -1)
122
- ])], 10, V),
123
- l("button", {
124
- class: i(["p-xs grid place-items-center rounded-full ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:outline-none focus:ring-4 disabled:opacity-50", p(e.btnColor, e.btnBgColor)]),
122
+ ])], 10, W),
123
+ n("button", {
124
+ class: r(["grid place-items-center rounded-full p-xs ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:ring-4 focus:outline-none disabled:opacity-50", b(e.btnColor, e.btnBgColor)]),
125
125
  disabled: u.value,
126
126
  onClick: t[1] || (t[1] = (a) => C(a, "next")),
127
127
  "aria-label": "next"
128
128
  }, [...t[3] || (t[3] = [
129
- l("svg", {
130
- class: "w-xs h-xs",
129
+ n("svg", {
130
+ class: "h-xs w-xs",
131
131
  xmlns: "http://www.w3.org/2000/svg",
132
132
  viewBox: "0 0 384 512",
133
133
  fill: "currentColor"
134
134
  }, [
135
- l("path", { d: "M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
135
+ n("path", { d: "M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
136
136
  ], -1)
137
- ])], 10, P)
137
+ ])], 10, X)
138
138
  ])
139
139
  ])
140
140
  ])
141
141
  ]),
142
- l("div", W, [
143
- l("div", {
144
- class: i(["px-xs gap-xs flex transition-transform duration-500", m(n)("GAP", e.cardsGap)]),
142
+ n("div", q, [
143
+ n("div", {
144
+ class: r(["flex gap-xs px-xs transition-transform duration-500", x(l).gapVariant({ spacing: e.cardsGap })]),
145
145
  ref_key: "slideContainer",
146
- ref: r
146
+ ref: o
147
147
  }, [
148
- L(s.$slots, "carousel", {
148
+ y(s.$slots, "carousel", {
149
149
  cards: e.content,
150
- setRef: k
150
+ setRef: V
151
151
  })
152
152
  ], 2)
153
153
  ])
@@ -155,5 +155,5 @@ const H = { class: "px-xs sm:px-md container text-center sm:text-left" }, j = {
155
155
  }
156
156
  });
157
157
  export {
158
- J as MclCarouselA
158
+ P as MclCarouselA
159
159
  };
@@ -1 +1 @@
1
- (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@vueuse/core"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.MclCarousel={},i.Vue,i.ManguitoTheme,i.core))})(this,(function(i,e,s,d){"use strict";const p={class:"px-xs sm:px-md container text-center sm:text-left"},b={class:"relative"},y={class:"relative"},E=["innerHTML"],L=["innerHTML"],w={class:"relative flex flex-wrap items-center justify-center space-x-4 space-y-4 sm:flex-nowrap sm:justify-start"},B={class:"max-w-144"},T={class:"flex space-x-4"},k=["disabled"],N=["disabled"],V={class:"mt-md sm:mt-lg lg:mt-xl container"},O=e.defineComponent({__name:"MclCarouselA",props:{title:{},titleSize:{default:"md"},titleColor:{default:"dark-3"},bgColor:{default:"light-1"},displayTagLine:{type:Boolean,default:!0},tagLineUpperCase:{type:Boolean,default:!0},tagLine:{},tagLineSize:{default:"md"},tagLineColor:{default:"dark-1"},displayHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},btnColor:{default:"dark-3"},btnBgColor:{default:"light-4"},content:{},cardsGap:{default:"xs"}},emits:["btn-prev","btn-next"],setup(t,{emit:M}){const z=t,r=e.ref(null),a=e.ref([]),m=e.ref(),g=M,c=e.ref(0),f=e.ref(!1);let u=!1;const v=l=>{switch(l){case"0":return 0;case"3xs":return 4;case"2xs":return 8;case"xs":return 16;case"sm":return 24;case"md":return 32;case"lg":return 48;case"xl":return 64;case"2xl":return 96;case"3xl":return 128}},S=l=>{a.value.push(l)},h=(l,n)=>{u||(u=!0,n==="prev"&&(c.value--,g("btn-prev",l)),n==="next"&&(c.value++,g("btn-next",l)),r.value?.dispatchEvent(new Event("sliderMove")))},R=(l,n)=>[s("H2",l),s("TEXTCOLOR",n)].join(" "),A=(l,n,o)=>{const C=[s("BODYTEXT",l),s("TEXTCOLOR",n)];return o&&C.push("uppercase"),C.join(" ")},x=(l,n)=>[s("TEXTCOLOR",l),s("BGCOLOR",n),s("RINGCOLOR",n)].join(" "),G=()=>{r.value.style.transform=`translateX(-${c.value*(a.value[0].$el.clientWidth+v(z.cardsGap)+2)}px)`,f.value=!1},j=()=>{u=!1};return d.useEventListener(r,"sliderMove",G),d.useEventListener(r,"transitionend",j),d.useIntersectionObserver(m,l=>{l[0].isIntersecting&&(f.value=!0)},{threshold:.75}),e.onMounted(()=>{m.value=a.value[a.value.length-1].$el}),(l,n)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["py-lg lg:py-xl overflow-hidden",e.unref(s)("BGCOLOR",t.bgColor)])},[e.createElementVNode("div",p,[e.createElementVNode("div",b,[t.displayHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["w-md absolute -left-4 hidden h-full bg-opacity-25 sm:block",e.unref(s)("BGCOLOR",t.highlightColor)])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",y,[t.displayTagLine?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["tracking-widest",A(t.tagLineSize,t.tagLineColor,t.tagLineUpperCase)]),innerHTML:t.tagLine},null,10,E)):e.createCommentVNode("",!0),e.createElementVNode("h2",{class:e.normalizeClass(["tracking-wide",R(t.titleSize,t.titleColor)]),innerHTML:t.title},null,10,L)]),e.createElementVNode("div",w,[e.createElementVNode("div",B,[e.renderSlot(l.$slots,"description")]),e.createElementVNode("div",T,[e.createElementVNode("button",{class:e.normalizeClass(["p-xs grid place-items-center rounded-full ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:outline-none focus:ring-4 disabled:opacity-50",x(t.btnColor,t.btnBgColor)]),disabled:c.value===0,onClick:n[0]||(n[0]=o=>h(o,"prev")),"aria-label":"previous"},[...n[2]||(n[2]=[e.createElementVNode("svg",{class:"w-xs h-xs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor"},[e.createElementVNode("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 278.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})],-1)])],10,k),e.createElementVNode("button",{class:e.normalizeClass(["p-xs grid place-items-center rounded-full ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:outline-none focus:ring-4 disabled:opacity-50",x(t.btnColor,t.btnBgColor)]),disabled:f.value,onClick:n[1]||(n[1]=o=>h(o,"next")),"aria-label":"next"},[...n[3]||(n[3]=[e.createElementVNode("svg",{class:"w-xs h-xs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor"},[e.createElementVNode("path",{d:"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})],-1)])],10,N)])])])]),e.createElementVNode("div",V,[e.createElementVNode("div",{class:e.normalizeClass(["px-xs gap-xs flex transition-transform duration-500",e.unref(s)("GAP",t.cardsGap)]),ref_key:"slideContainer",ref:r},[e.renderSlot(l.$slots,"carousel",{cards:t.content,setRef:S})],2)])],2))}});i.MclCarouselA=O,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(a,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme","@vueuse/core"],e):(a=typeof globalThis<"u"?globalThis:a||self,e(a.MclCarousel={},a.Vue,a.ManguitoTheme,a.core))})(this,(function(a,e,l,d){"use strict";const b={class:"container px-xs text-center sm:px-md sm:text-left"},p={class:"relative"},y={class:"relative"},V=["innerHTML"],w=["innerHTML"],E={class:"relative flex flex-wrap items-center justify-center space-y-4 space-x-4 sm:flex-nowrap sm:justify-start"},k={class:"max-w-144"},L={class:"flex space-x-4"},N=["disabled"],B=["disabled"],M={class:"container mt-md sm:mt-lg lg:mt-xl"},z=e.defineComponent({__name:"MclCarouselA",props:{title:{},titleSize:{default:"md"},titleColor:{default:"dark-3"},bgColor:{default:"light-1"},showTagLine:{type:Boolean,default:!0},tagLineUpperCase:{type:Boolean,default:!0},tagLine:{},tagLineSize:{default:"md"},tagLineColor:{default:"dark-1"},showHighlight:{type:Boolean,default:!0},highlightColor:{default:"primary"},btnColor:{default:"dark-3"},btnBgColor:{default:"light-4"},content:{},cardsGap:{default:"xs"}},emits:["btn-prev","btn-next"],setup(t,{emit:v}){const S=t,o=e.ref(null),i=e.ref([]),g=e.ref(),C=v,c=e.ref(0),f=e.ref(!1);let u=!1;const j=s=>{switch(s){case"0":return 0;case"3xs":return 4;case"2xs":return 8;case"xs":return 16;case"sm":return 24;case"md":return 32;case"lg":return 48;case"xl":return 64;case"2xl":return 96;case"3xl":return 128}},A=s=>{i.value.push(s)},m=(s,n)=>{u||(u=!0,n==="prev"&&(c.value--,C("btn-prev",s)),n==="next"&&(c.value++,C("btn-next",s)),o.value?.dispatchEvent(new Event("sliderMove")))},H=(s,n)=>[l.generateClass.h2Variant({size:s}),l.generateClass.textColorVariant({color:n})].join(" "),T=(s,n,r)=>{const h=[l.generateClass.bodyTextVariant({size:s}),l.generateClass.textColorVariant({color:n})];return r&&h.push("uppercase"),h.join(" ")},x=(s,n)=>[l.generateClass.textColorVariant({color:s}),l.generateClass.bgColorVariant({color:n}),l.generateClass.ringColorVariant({color:n})].join(" "),$=()=>{o.value.style.transform=`translateX(-${c.value*(i.value[0].$el.clientWidth+j(S.cardsGap)+2)}px)`,f.value=!1},q=()=>{u=!1};return d.useEventListener(o,"sliderMove",$),d.useEventListener(o,"transitionend",q),d.useIntersectionObserver(g,s=>{s[0].isIntersecting&&(f.value=!0)},{threshold:.75}),e.onMounted(()=>{g.value=i.value[i.value.length-1].$el}),(s,n)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["overflow-hidden py-lg lg:py-xl",e.unref(l.generateClass).bgColorVariant({color:t.bgColor})])},[e.createElementVNode("div",b,[e.createElementVNode("div",p,[t.showHighlight?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute -left-4 hidden h-full w-md bg-opacity-25 sm:block",e.unref(l.generateClass).bgColorVariant({color:t.highlightColor})])},null,2)):e.createCommentVNode("",!0),e.createElementVNode("div",y,[t.showTagLine?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["tracking-widest",T(t.tagLineSize,t.tagLineColor,t.tagLineUpperCase)]),innerHTML:t.tagLine},null,10,V)):e.createCommentVNode("",!0),e.createElementVNode("h2",{class:e.normalizeClass(["tracking-wide",H(t.titleSize,t.titleColor)]),innerHTML:t.title},null,10,w)]),e.createElementVNode("div",E,[e.createElementVNode("div",k,[e.renderSlot(s.$slots,"description")]),e.createElementVNode("div",L,[e.createElementVNode("button",{class:e.normalizeClass(["grid place-items-center rounded-full p-xs ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:ring-4 focus:outline-none disabled:opacity-50",x(t.btnColor,t.btnBgColor)]),disabled:c.value===0,onClick:n[0]||(n[0]=r=>m(r,"prev")),"aria-label":"previous"},[...n[2]||(n[2]=[e.createElementVNode("svg",{class:"h-xs w-xs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor"},[e.createElementVNode("path",{d:"M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 278.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"})],-1)])],10,N),e.createElementVNode("button",{class:e.normalizeClass(["grid place-items-center rounded-full p-xs ring-offset-2 ring-offset-inherit transition-all duration-200 hover:bg-opacity-80 focus:ring-4 focus:outline-none disabled:opacity-50",x(t.btnColor,t.btnBgColor)]),disabled:f.value,onClick:n[1]||(n[1]=r=>m(r,"next")),"aria-label":"next"},[...n[3]||(n[3]=[e.createElementVNode("svg",{class:"h-xs w-xs",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor"},[e.createElementVNode("path",{d:"M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})],-1)])],10,B)])])])]),e.createElementVNode("div",M,[e.createElementVNode("div",{class:e.normalizeClass(["flex gap-xs px-xs transition-transform duration-500",e.unref(l.generateClass).gapVariant({spacing:t.cardsGap})]),ref_key:"slideContainer",ref:o},[e.renderSlot(s.$slots,"carousel",{cards:t.content,setRef:A})],2)])],2))}});a.MclCarouselA=z,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobbykim/mcl-carousel",
3
- "version": "0.9.5",
3
+ "version": "0.10.1",
4
4
  "description": "carousel component based on @bobbykim/manguito-theme",
5
5
  "type": "module",
6
6
  "files": [
@@ -16,9 +16,6 @@
16
16
  "require": "./dist/mcl-carousel.umd.cjs"
17
17
  }
18
18
  },
19
- "scripts": {
20
- "build": "vite build"
21
- },
22
19
  "author": {
23
20
  "name": "Bobby Kim",
24
21
  "url": "https://www.devbobbykim.com/"
@@ -33,9 +30,9 @@
33
30
  },
34
31
  "license": "MIT",
35
32
  "dependencies": {
36
- "@bobbykim/manguito-theme": "0.28.3",
37
33
  "@vueuse/core": "^12.0.0",
38
- "vue": "^3.5.13"
34
+ "vue": "^3.5.13",
35
+ "@bobbykim/manguito-theme": "1.0.1"
39
36
  },
40
37
  "devDependencies": {
41
38
  "@vitejs/plugin-vue": "^5.2.1",
@@ -45,5 +42,7 @@
45
42
  "vite-plugin-dts": "^4.3.0",
46
43
  "vue-tsc": "^2.1.10"
47
44
  },
48
- "gitHead": "fc1830324e5a409b68bbb2b39280fe0b3cf3673a"
49
- }
45
+ "scripts": {
46
+ "build": "vite build"
47
+ }
48
+ }