@zenpatient-org/healthspan-marketing-ui 0.1.16 → 0.1.17
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/components/Benefit/Benefit.d.ts +8 -0
- package/dist/components/Benefit/index.d.ts +2 -0
- package/dist/components/Button/Button.es.js +33 -31
- package/dist/components/Callback/Callback.cjs.js +1 -1
- package/dist/components/Callback/Callback.es.js +16 -8
- package/dist/components/ComplexTooltip/ComplexTooltip.d.ts +19 -0
- package/dist/components/ComplexTooltip/index.d.ts +1 -0
- package/dist/components/ContentTabs/ContentTabs.cjs.js +1 -1
- package/dist/components/ContentTabs/ContentTabs.d.ts +1 -1
- package/dist/components/ContentTabs/ContentTabs.es.js +13 -4
- package/dist/components/Cursor/Cursor.d.ts +6 -0
- package/dist/components/Cursor/components/ClientCursor.d.ts +3 -0
- package/dist/components/Cursor/components/ServerCursor.d.ts +3 -0
- package/dist/components/Cursor/index.d.ts +1 -0
- package/dist/components/FilterMenu/FilterMenu.cjs.js +1 -1
- package/dist/components/FilterMenu/FilterMenu.d.ts +1 -1
- package/dist/components/FilterMenu/FilterMenu.es.js +82 -38
- package/dist/components/HighlightedTitle/HighlightedTitle.cjs.js +1 -1
- package/dist/components/HighlightedTitle/HighlightedTitle.d.ts +2 -2
- package/dist/components/HighlightedTitle/HighlightedTitle.es.js +33 -17
- package/dist/components/IconButton/IconButton.cjs.js +1 -1
- package/dist/components/IconButton/IconButton.es.js +16 -19
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs.js +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +3 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.es.js +80 -46
- package/dist/components/Label/Label.cjs.js +1 -1
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.es.js +15 -9
- package/dist/components/Label/types.d.ts +1 -0
- package/dist/components/ProductGallery/ProductGallery.cjs.js +1 -0
- package/dist/components/ProductGallery/ProductGallery.d.ts +8 -0
- package/dist/components/ProductGallery/ProductGallery.es.js +96 -0
- package/dist/components/ProductGallery/index.d.ts +2 -0
- package/dist/components/ProductGallery/productGallery.module.css.cjs.js +1 -0
- package/dist/components/ProductGallery/productGallery.module.css.es.js +27 -0
- package/dist/components/ProductGalleryCard/ProductGalleryCard.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/ProductGalleryCard.d.ts +2 -11
- package/dist/components/ProductGalleryCard/ProductGalleryCard.es.js +67 -20
- package/dist/components/ProductGalleryCard/index.d.ts +1 -0
- package/dist/components/ProductGalleryCard/productGalleryCard.module.css.cjs.js +1 -1
- package/dist/components/ProductGalleryCard/productGalleryCard.module.css.es.js +12 -10
- package/dist/components/ProductGalleryCard/types.d.ts +11 -0
- package/dist/components/ProductListing/ProductListing.d.ts +19 -0
- package/dist/components/ProductListing/index.d.ts +1 -0
- package/dist/components/ProgramCard/ProgramCard.d.ts +13 -0
- package/dist/components/ProgramCard/index.d.ts +1 -0
- package/dist/components/ProgressButton/ProgressButton.cjs.js +1 -0
- package/dist/components/ProgressButton/ProgressButton.es.js +63 -0
- package/dist/components/ProgressButton/progressButton.module.css.cjs.js +1 -0
- package/dist/components/ProgressButton/progressButton.module.css.es.js +21 -0
- package/dist/components/ProgressButton/types.d.ts +1 -1
- package/dist/components/Tabs/Tabs.cjs.js +1 -1
- package/dist/components/Tabs/Tabs.d.ts +4 -2
- package/dist/components/Tabs/Tabs.es.js +17 -15
- package/dist/components/Tabs/TabsWithFade.cjs.js +1 -0
- package/dist/components/Tabs/TabsWithFade.d.ts +9 -0
- package/dist/components/Tabs/TabsWithFade.es.js +43 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/tabs.module.css.cjs.js +1 -1
- package/dist/components/Tabs/tabs.module.css.es.js +23 -15
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.es.js +10 -1
- package/dist/components/TextButton/TextButton.cjs.js +1 -0
- package/dist/components/TextButton/TextButton.es.js +39 -0
- package/dist/components/TextButton/textButton.module.css.cjs.js +1 -0
- package/dist/components/TextButton/textButton.module.css.es.js +19 -0
- package/dist/components/TypeBadge/TypeBadge.d.ts +1 -1
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.es.js +14 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/healthspan-marketing-ui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +48 -36
- package/dist/modules/Comparison/Comparison.d.ts +1 -1
- package/dist/modules/Comparison/components/ComparisonMobileView/ComparisonMobileView.d.ts +1 -1
- package/dist/modules/Comparison/types.d.ts +2 -2
- package/dist/modules/FeaturedIn/FeaturedIn.d.ts +21 -0
- package/dist/modules/FeaturedIn/index.d.ts +1 -0
- package/dist/modules/FeaturesGallery/FeaturesGallery.d.ts +1 -1
- package/dist/modules/FollowTheScience/FollowTheScience.d.ts +10 -0
- package/dist/modules/FollowTheScience/index.d.ts +1 -0
- package/dist/modules/HowItWorks/HowItWorks.d.ts +11 -0
- package/dist/modules/HowItWorks/components/Content/Content.d.ts +10 -0
- package/dist/modules/HowItWorks/components/Content/index.d.ts +1 -0
- package/dist/modules/HowItWorks/index.d.ts +1 -0
- package/dist/modules/OptimalHealth/OptimalHealth.d.ts +11 -0
- package/dist/modules/OptimalHealth/components/ClockImages/ClockImages.d.ts +7 -0
- package/dist/modules/OptimalHealth/components/ClockImages/hooks.d.ts +1 -0
- package/dist/modules/OptimalHealth/components/ClockImages/index.d.ts +1 -0
- package/dist/modules/OptimalHealth/index.d.ts +1 -0
- package/dist/modules/OptimalHealth/types.d.ts +12 -0
- package/dist/modules/OurProcess/OurProcess.d.ts +12 -0
- package/dist/modules/OurProcess/components/StepCards/StepCards.d.ts +9 -0
- package/dist/modules/OurProcess/components/StepCards/index.d.ts +1 -0
- package/dist/modules/OurProcess/index.d.ts +1 -0
- package/dist/modules/OurProcess/types.d.ts +5 -0
- package/dist/modules/ProductsDisplay/ProductsDisplay.cjs.js +1 -0
- package/dist/modules/ProductsDisplay/ProductsDisplay.d.ts +3 -0
- package/dist/modules/ProductsDisplay/ProductsDisplay.es.js +53 -0
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.cjs.js +1 -0
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.d.ts +10 -0
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/ProductsDisplayTabs.es.js +46 -0
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/index.d.ts +1 -0
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/productsDisplayTabs.module.css.cjs.js +1 -0
- package/dist/modules/ProductsDisplay/components/ProductsDisplayTabs/productsDisplayTabs.module.css.es.js +9 -0
- package/dist/modules/ProductsDisplay/components/index.d.ts +1 -0
- package/dist/modules/ProductsDisplay/index.d.ts +1 -0
- package/dist/modules/ProductsDisplay/productsDisplay.module.css.cjs.js +1 -0
- package/dist/modules/ProductsDisplay/productsDisplay.module.css.es.js +11 -0
- package/dist/modules/ProductsDisplay/types.d.ts +11 -0
- package/dist/modules/ProductsDisplay/useProductsData.cjs.js +1 -0
- package/dist/modules/ProductsDisplay/useProductsData.d.ts +15 -0
- package/dist/modules/ProductsDisplay/useProductsData.es.js +26 -0
- package/dist/modules/Studies/Studies.d.ts +1 -1
- package/dist/modules/TargetedPrograms/TargetedPrograms.d.ts +7 -0
- package/dist/modules/TargetedPrograms/index.d.ts +1 -0
- package/dist/modules/TotalCare/TotalCare.cjs.js +1 -1
- package/dist/modules/TotalCare/TotalCare.d.ts +2 -2
- package/dist/modules/TotalCare/TotalCare.es.js +38 -19
- package/dist/modules/YourProtocol/YourProtocol.cjs.js +1 -1
- package/dist/modules/YourProtocol/YourProtocol.d.ts +1 -1
- package/dist/modules/YourProtocol/YourProtocol.es.js +20 -6
- package/dist/modules/YourProtocol/components/ProtocolTags/ProtocolTags.cjs.js +1 -1
- package/dist/modules/YourProtocol/components/ProtocolTags/ProtocolTags.es.js +48 -22
- package/dist/modules/index.d.ts +1 -0
- package/dist/node_modules/swiper/modules/navigation.cjs.js +1 -0
- package/dist/node_modules/swiper/modules/navigation.es.js +127 -0
- package/dist/node_modules/swiper/shared/create-element-if-not-defined.cjs.js +1 -0
- package/dist/node_modules/swiper/shared/create-element-if-not-defined.es.js +12 -0
- package/dist/node_modules/swiper/shared/ssr-window.esm.cjs.js +1 -0
- package/dist/node_modules/swiper/shared/ssr-window.esm.es.js +135 -0
- package/dist/node_modules/swiper/shared/swiper-core.cjs.js +1 -0
- package/dist/node_modules/swiper/shared/swiper-core.es.js +2028 -0
- package/dist/node_modules/swiper/shared/update-on-virtual-data.cjs.js +1 -0
- package/dist/node_modules/swiper/shared/update-on-virtual-data.es.js +62 -0
- package/dist/node_modules/swiper/shared/update-swiper.cjs.js +1 -0
- package/dist/node_modules/swiper/shared/update-swiper.es.js +192 -0
- package/dist/node_modules/swiper/shared/utils.cjs.js +1 -0
- package/dist/node_modules/swiper/shared/utils.es.js +186 -0
- package/dist/node_modules/swiper/swiper-react.cjs.js +1 -0
- package/dist/node_modules/swiper/swiper-react.es.js +242 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/useSwiper.cjs.js +1 -0
- package/dist/utils/useSwiper.d.ts +22 -0
- package/dist/utils/useSwiper.es.js +48 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +8 -6
- package/package.json +7 -2
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import a, { forwardRef as W, useState as P, useRef as u, useEffect as _, createContext as q, useLayoutEffect as Q } from "react";
|
|
2
|
+
import { S as X } from "./shared/swiper-core.es.js";
|
|
3
|
+
import { g as Y, m as Z, a as ee, u as re } from "./shared/update-on-virtual-data.es.js";
|
|
4
|
+
import { d as D, w as te, n as ne, b as se, a as ae, e as V, u as ie } from "./shared/update-swiper.es.js";
|
|
5
|
+
function k() {
|
|
6
|
+
return k = Object.assign ? Object.assign.bind() : function(n) {
|
|
7
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
8
|
+
var s = arguments[r];
|
|
9
|
+
for (var t in s)
|
|
10
|
+
Object.prototype.hasOwnProperty.call(s, t) && (n[t] = s[t]);
|
|
11
|
+
}
|
|
12
|
+
return n;
|
|
13
|
+
}, k.apply(this, arguments);
|
|
14
|
+
}
|
|
15
|
+
function H(n) {
|
|
16
|
+
return n.type && n.type.displayName && n.type.displayName.includes("SwiperSlide");
|
|
17
|
+
}
|
|
18
|
+
function U(n) {
|
|
19
|
+
const r = [];
|
|
20
|
+
return a.Children.toArray(n).forEach((s) => {
|
|
21
|
+
H(s) ? r.push(s) : s.props && s.props.children && U(s.props.children).forEach((t) => r.push(t));
|
|
22
|
+
}), r;
|
|
23
|
+
}
|
|
24
|
+
function oe(n) {
|
|
25
|
+
const r = [], s = {
|
|
26
|
+
"container-start": [],
|
|
27
|
+
"container-end": [],
|
|
28
|
+
"wrapper-start": [],
|
|
29
|
+
"wrapper-end": []
|
|
30
|
+
};
|
|
31
|
+
return a.Children.toArray(n).forEach((t) => {
|
|
32
|
+
if (H(t))
|
|
33
|
+
r.push(t);
|
|
34
|
+
else if (t.props && t.props.slot && s[t.props.slot])
|
|
35
|
+
s[t.props.slot].push(t);
|
|
36
|
+
else if (t.props && t.props.children) {
|
|
37
|
+
const p = U(t.props.children);
|
|
38
|
+
p.length > 0 ? p.forEach((l) => r.push(l)) : s["container-end"].push(t);
|
|
39
|
+
} else
|
|
40
|
+
s["container-end"].push(t);
|
|
41
|
+
}), {
|
|
42
|
+
slides: r,
|
|
43
|
+
slots: s
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function le(n, r, s) {
|
|
47
|
+
if (!s) return null;
|
|
48
|
+
const t = (o) => {
|
|
49
|
+
let i = o;
|
|
50
|
+
return o < 0 ? i = r.length + o : i >= r.length && (i = i - r.length), i;
|
|
51
|
+
}, p = n.isHorizontal() ? {
|
|
52
|
+
[n.rtlTranslate ? "right" : "left"]: `${s.offset}px`
|
|
53
|
+
} : {
|
|
54
|
+
top: `${s.offset}px`
|
|
55
|
+
}, {
|
|
56
|
+
from: l,
|
|
57
|
+
to: d
|
|
58
|
+
} = s, S = n.params.loop ? -r.length : 0, h = n.params.loop ? r.length * 2 : r.length, g = [];
|
|
59
|
+
for (let o = S; o < h; o += 1)
|
|
60
|
+
o >= l && o <= d && g.push(r[t(o)]);
|
|
61
|
+
return g.map((o, i) => /* @__PURE__ */ a.cloneElement(o, {
|
|
62
|
+
swiper: n,
|
|
63
|
+
style: p,
|
|
64
|
+
key: o.props.virtualIndex || o.key || `slide-${i}`
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function O(n, r) {
|
|
68
|
+
return typeof window > "u" ? _(n, r) : Q(n, r);
|
|
69
|
+
}
|
|
70
|
+
const F = /* @__PURE__ */ q(null), ce = /* @__PURE__ */ q(null), ue = /* @__PURE__ */ W(function(n, r) {
|
|
71
|
+
let {
|
|
72
|
+
className: s,
|
|
73
|
+
tag: t = "div",
|
|
74
|
+
wrapperTag: p = "div",
|
|
75
|
+
children: l,
|
|
76
|
+
onSwiper: d,
|
|
77
|
+
...S
|
|
78
|
+
} = n === void 0 ? {} : n, h = !1;
|
|
79
|
+
const [g, o] = P("swiper"), [i, m] = P(null), [C, R] = P(!1), z = u(!1), w = u(null), e = u(null), x = u(null), $ = u(null), I = u(null), b = u(null), N = u(null), L = u(null), {
|
|
80
|
+
params: f,
|
|
81
|
+
passedParams: T,
|
|
82
|
+
rest: G,
|
|
83
|
+
events: v
|
|
84
|
+
} = Y(S), {
|
|
85
|
+
slides: y,
|
|
86
|
+
slots: j
|
|
87
|
+
} = oe(l), B = () => {
|
|
88
|
+
R(!C);
|
|
89
|
+
};
|
|
90
|
+
Object.assign(f.on, {
|
|
91
|
+
_containerClasses(c, E) {
|
|
92
|
+
o(E);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const A = () => {
|
|
96
|
+
Object.assign(f.on, v), h = !0;
|
|
97
|
+
const c = {
|
|
98
|
+
...f
|
|
99
|
+
};
|
|
100
|
+
if (delete c.wrapperClass, e.current = new X(c), e.current.virtual && e.current.params.virtual.enabled) {
|
|
101
|
+
e.current.virtual.slides = y;
|
|
102
|
+
const E = {
|
|
103
|
+
cache: !1,
|
|
104
|
+
slides: y,
|
|
105
|
+
renderExternal: m,
|
|
106
|
+
renderExternalUpdate: !1
|
|
107
|
+
};
|
|
108
|
+
V(e.current.params.virtual, E), V(e.current.originalParams.virtual, E);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
w.current || A(), e.current && e.current.on("_beforeBreakpoint", B);
|
|
112
|
+
const J = () => {
|
|
113
|
+
h || !v || !e.current || Object.keys(v).forEach((c) => {
|
|
114
|
+
e.current.on(c, v[c]);
|
|
115
|
+
});
|
|
116
|
+
}, K = () => {
|
|
117
|
+
!v || !e.current || Object.keys(v).forEach((c) => {
|
|
118
|
+
e.current.off(c, v[c]);
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
_(() => () => {
|
|
122
|
+
e.current && e.current.off("_beforeBreakpoint", B);
|
|
123
|
+
}), _(() => {
|
|
124
|
+
!z.current && e.current && (e.current.emitSlidesClasses(), z.current = !0);
|
|
125
|
+
}), O(() => {
|
|
126
|
+
if (r && (r.current = w.current), !!w.current)
|
|
127
|
+
return e.current.destroyed && A(), Z({
|
|
128
|
+
el: w.current,
|
|
129
|
+
nextEl: I.current,
|
|
130
|
+
prevEl: b.current,
|
|
131
|
+
paginationEl: N.current,
|
|
132
|
+
scrollbarEl: L.current,
|
|
133
|
+
swiper: e.current
|
|
134
|
+
}, f), d && !e.current.destroyed && d(e.current), () => {
|
|
135
|
+
e.current && !e.current.destroyed && e.current.destroy(!0, !1);
|
|
136
|
+
};
|
|
137
|
+
}, []), O(() => {
|
|
138
|
+
J();
|
|
139
|
+
const c = ee(T, x.current, y, $.current, (E) => E.key);
|
|
140
|
+
return x.current = T, $.current = y, c.length && e.current && !e.current.destroyed && ie({
|
|
141
|
+
swiper: e.current,
|
|
142
|
+
slides: y,
|
|
143
|
+
passedParams: T,
|
|
144
|
+
changedParams: c,
|
|
145
|
+
nextEl: I.current,
|
|
146
|
+
prevEl: b.current,
|
|
147
|
+
scrollbarEl: L.current,
|
|
148
|
+
paginationEl: N.current
|
|
149
|
+
}), () => {
|
|
150
|
+
K();
|
|
151
|
+
};
|
|
152
|
+
}), O(() => {
|
|
153
|
+
re(e.current);
|
|
154
|
+
}, [i]);
|
|
155
|
+
function M() {
|
|
156
|
+
return f.virtual ? le(e.current, y, i) : y.map((c, E) => /* @__PURE__ */ a.cloneElement(c, {
|
|
157
|
+
swiper: e.current,
|
|
158
|
+
swiperSlideIndex: E
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
return /* @__PURE__ */ a.createElement(t, k({
|
|
162
|
+
ref: w,
|
|
163
|
+
className: D(`${g}${s ? ` ${s}` : ""}`)
|
|
164
|
+
}, G), /* @__PURE__ */ a.createElement(ce.Provider, {
|
|
165
|
+
value: e.current
|
|
166
|
+
}, j["container-start"], /* @__PURE__ */ a.createElement(p, {
|
|
167
|
+
className: te(f.wrapperClass)
|
|
168
|
+
}, j["wrapper-start"], M(), j["wrapper-end"]), ne(f) && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
|
|
169
|
+
ref: b,
|
|
170
|
+
className: "swiper-button-prev"
|
|
171
|
+
}), /* @__PURE__ */ a.createElement("div", {
|
|
172
|
+
ref: I,
|
|
173
|
+
className: "swiper-button-next"
|
|
174
|
+
})), se(f) && /* @__PURE__ */ a.createElement("div", {
|
|
175
|
+
ref: L,
|
|
176
|
+
className: "swiper-scrollbar"
|
|
177
|
+
}), ae(f) && /* @__PURE__ */ a.createElement("div", {
|
|
178
|
+
ref: N,
|
|
179
|
+
className: "swiper-pagination"
|
|
180
|
+
}), j["container-end"]));
|
|
181
|
+
});
|
|
182
|
+
ue.displayName = "Swiper";
|
|
183
|
+
const pe = /* @__PURE__ */ W(function(n, r) {
|
|
184
|
+
let {
|
|
185
|
+
tag: s = "div",
|
|
186
|
+
children: t,
|
|
187
|
+
className: p = "",
|
|
188
|
+
swiper: l,
|
|
189
|
+
zoom: d,
|
|
190
|
+
lazy: S,
|
|
191
|
+
virtualIndex: h,
|
|
192
|
+
swiperSlideIndex: g,
|
|
193
|
+
...o
|
|
194
|
+
} = n === void 0 ? {} : n;
|
|
195
|
+
const i = u(null), [m, C] = P("swiper-slide"), [R, z] = P(!1);
|
|
196
|
+
function w(I, b, N) {
|
|
197
|
+
b === i.current && C(N);
|
|
198
|
+
}
|
|
199
|
+
O(() => {
|
|
200
|
+
if (typeof g < "u" && (i.current.swiperSlideIndex = g), r && (r.current = i.current), !(!i.current || !l)) {
|
|
201
|
+
if (l.destroyed) {
|
|
202
|
+
m !== "swiper-slide" && C("swiper-slide");
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
return l.on("_slideClass", w), () => {
|
|
206
|
+
l && l.off("_slideClass", w);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}), O(() => {
|
|
210
|
+
l && i.current && !l.destroyed && C(l.getSlideClasses(i.current));
|
|
211
|
+
}, [l]);
|
|
212
|
+
const e = {
|
|
213
|
+
isActive: m.indexOf("swiper-slide-active") >= 0,
|
|
214
|
+
isVisible: m.indexOf("swiper-slide-visible") >= 0,
|
|
215
|
+
isPrev: m.indexOf("swiper-slide-prev") >= 0,
|
|
216
|
+
isNext: m.indexOf("swiper-slide-next") >= 0
|
|
217
|
+
}, x = () => typeof t == "function" ? t(e) : t, $ = () => {
|
|
218
|
+
z(!0);
|
|
219
|
+
};
|
|
220
|
+
return /* @__PURE__ */ a.createElement(s, k({
|
|
221
|
+
ref: i,
|
|
222
|
+
className: D(`${m}${p ? ` ${p}` : ""}`),
|
|
223
|
+
"data-swiper-slide-index": h,
|
|
224
|
+
onLoad: $
|
|
225
|
+
}, o), d && /* @__PURE__ */ a.createElement(F.Provider, {
|
|
226
|
+
value: e
|
|
227
|
+
}, /* @__PURE__ */ a.createElement("div", {
|
|
228
|
+
className: "swiper-zoom-container",
|
|
229
|
+
"data-swiper-zoom": typeof d == "number" ? d : void 0
|
|
230
|
+
}, x(), S && !R && /* @__PURE__ */ a.createElement("div", {
|
|
231
|
+
className: "swiper-lazy-preloader"
|
|
232
|
+
}))), !d && /* @__PURE__ */ a.createElement(F.Provider, {
|
|
233
|
+
value: e
|
|
234
|
+
}, x(), S && !R && /* @__PURE__ */ a.createElement("div", {
|
|
235
|
+
className: "swiper-lazy-preloader"
|
|
236
|
+
})));
|
|
237
|
+
});
|
|
238
|
+
pe.displayName = "SwiperSlide";
|
|
239
|
+
export {
|
|
240
|
+
ue as Swiper,
|
|
241
|
+
pe as SwiperSlide
|
|
242
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),x=()=>{const[n,c]=t.useState(null),[o,i]=t.useState(0),[u,l]=t.useState(!0),[S,s]=t.useState(!1),[g,d]=t.useState(!1),a=t.useCallback(e=>{i(e.activeIndex),s(e.isEnd),l(e.isBeginning)},[]),h=t.useCallback(()=>{n&&(n.slidePrev(),a(n))},[n,a]),k=t.useCallback(()=>{n&&(n.slideNext(),a(n))},[n,a]),C=t.useCallback(e=>{n&&(n.slideTo(e),a(n))},[n,a]),b=e=>{c(e),d(e==null?void 0:e.isLocked),a(e)},f=t.useCallback(e=>{s(e.isEnd),d(e==null?void 0:e.isLocked),a(e)},[a]),v=t.useCallback(()=>{s(!0),l(!1)},[]),r=t.useCallback(()=>{l(!0),s(!1)},[]);return{swiper:n,setSwiper:c,activeIndex:o,setActiveIndex:i,isEnd:S,setIsEnd:s,hideNav:g,handleSlideChange:a,handlePrevClick:h,handleNextClick:k,handleSlideTo:C,onSwiperInit:b,handleSwiperResize:f,isBeginning:u,setIsBeginning:l,handleReachEnd:v,handleReachBeginning:r}};exports.useSwiper=x;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Swiper as SwiperType } from 'swiper';
|
|
2
|
+
|
|
3
|
+
export type UseSwiperReturnProps = {
|
|
4
|
+
swiper: SwiperType | null;
|
|
5
|
+
setSwiper: React.Dispatch<React.SetStateAction<SwiperType | null>>;
|
|
6
|
+
activeIndex: number;
|
|
7
|
+
setActiveIndex: React.Dispatch<React.SetStateAction<number>>;
|
|
8
|
+
isEnd: boolean;
|
|
9
|
+
isBeginning: boolean;
|
|
10
|
+
setIsBeginning: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
+
setIsEnd: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
|
+
handleReachEnd: () => void;
|
|
13
|
+
handleReachBeginning: () => void;
|
|
14
|
+
hideNav: boolean;
|
|
15
|
+
handleSlideChange: (swiperInstance: SwiperType) => void;
|
|
16
|
+
handlePrevClick: () => void;
|
|
17
|
+
handleNextClick: () => void;
|
|
18
|
+
handleSlideTo: (index: number) => void;
|
|
19
|
+
onSwiperInit: (swiper: SwiperType) => void;
|
|
20
|
+
handleSwiperResize: (swiper: SwiperType) => void;
|
|
21
|
+
};
|
|
22
|
+
export declare const useSwiper: () => UseSwiperReturnProps;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useState as s, useCallback as d } from "react";
|
|
2
|
+
const N = () => {
|
|
3
|
+
const [n, l] = s(null), [h, o] = s(0), [g, c] = s(!0), [u, i] = s(!1), [f, a] = s(!1), t = d((e) => {
|
|
4
|
+
o(e.activeIndex), i(e.isEnd), c(e.isBeginning);
|
|
5
|
+
}, []), v = d(() => {
|
|
6
|
+
n && (n.slidePrev(), t(n));
|
|
7
|
+
}, [n, t]), S = d(() => {
|
|
8
|
+
n && (n.slideNext(), t(n));
|
|
9
|
+
}, [n, t]), x = d(
|
|
10
|
+
(e) => {
|
|
11
|
+
n && (n.slideTo(e), t(n));
|
|
12
|
+
},
|
|
13
|
+
[n, t]
|
|
14
|
+
), k = (e) => {
|
|
15
|
+
l(e), a(e == null ? void 0 : e.isLocked), t(e);
|
|
16
|
+
}, E = d(
|
|
17
|
+
(e) => {
|
|
18
|
+
i(e.isEnd), a(e == null ? void 0 : e.isLocked), t(e);
|
|
19
|
+
},
|
|
20
|
+
[t]
|
|
21
|
+
), B = d(() => {
|
|
22
|
+
i(!0), c(!1);
|
|
23
|
+
}, []), C = d(() => {
|
|
24
|
+
c(!0), i(!1);
|
|
25
|
+
}, []);
|
|
26
|
+
return {
|
|
27
|
+
swiper: n,
|
|
28
|
+
setSwiper: l,
|
|
29
|
+
activeIndex: h,
|
|
30
|
+
setActiveIndex: o,
|
|
31
|
+
isEnd: u,
|
|
32
|
+
setIsEnd: i,
|
|
33
|
+
hideNav: f,
|
|
34
|
+
handleSlideChange: t,
|
|
35
|
+
handlePrevClick: v,
|
|
36
|
+
handleNextClick: S,
|
|
37
|
+
handleSlideTo: x,
|
|
38
|
+
onSwiperInit: k,
|
|
39
|
+
handleSwiperResize: E,
|
|
40
|
+
isBeginning: g,
|
|
41
|
+
setIsBeginning: c,
|
|
42
|
+
handleReachEnd: B,
|
|
43
|
+
handleReachBeginning: C
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export {
|
|
47
|
+
N as useSwiper
|
|
48
|
+
};
|
package/dist/utils.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/cn.cjs.js"),r=require("./utils/isHsIcon.cjs.js"),s=require("./utils/formatUnits.cjs.js"),i=require("./utils/useSwiper.cjs.js");exports.cn=e.cn;exports.isHsIcon=r.isHsIcon;exports.formatUnits=s.formatUnits;exports.useSwiper=i.useSwiper;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { cn as
|
|
2
|
-
import { isHsIcon as
|
|
3
|
-
import { formatUnits as
|
|
1
|
+
import { cn as e } from "./utils/cn.es.js";
|
|
2
|
+
import { isHsIcon as f } from "./utils/isHsIcon.es.js";
|
|
3
|
+
import { formatUnits as p } from "./utils/formatUnits.es.js";
|
|
4
|
+
import { useSwiper as x } from "./utils/useSwiper.es.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
e as cn,
|
|
7
|
+
p as formatUnits,
|
|
8
|
+
f as isHsIcon,
|
|
9
|
+
x as useSwiper
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenpatient-org/healthspan-marketing-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"description": "Design system",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
"build": "vite build",
|
|
14
14
|
"preview": "vite preview",
|
|
15
15
|
"storybook": "storybook dev -p 6006",
|
|
16
|
-
"build-storybook": "storybook build"
|
|
16
|
+
"build-storybook": "storybook build",
|
|
17
|
+
"lint": "biome check .",
|
|
18
|
+
"format": "biome format . --write"
|
|
17
19
|
},
|
|
18
20
|
"license": "MIT",
|
|
19
21
|
"peerDependencies": {
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
22
24
|
},
|
|
23
25
|
"devDependencies": {
|
|
26
|
+
"@biomejs/biome": "^1.9.4",
|
|
24
27
|
"@storybook/addon-essentials": "^8.6.12",
|
|
25
28
|
"@storybook/addon-interactions": "^8.6.12",
|
|
26
29
|
"@storybook/addon-onboarding": "^8.6.12",
|
|
@@ -28,6 +31,7 @@
|
|
|
28
31
|
"@storybook/react": "^8.6.12",
|
|
29
32
|
"@storybook/react-vite": "^8.6.12",
|
|
30
33
|
"@storybook/test": "^8.6.12",
|
|
34
|
+
"@types/react-dom": "^19.1.5",
|
|
31
35
|
"@vitejs/plugin-react": "^4.4.1",
|
|
32
36
|
"chromatic": "^11.28.2",
|
|
33
37
|
"postcss": "^8.5.3",
|
|
@@ -39,6 +43,7 @@
|
|
|
39
43
|
},
|
|
40
44
|
"dependencies": {
|
|
41
45
|
"@types/node": "^22.15.14",
|
|
46
|
+
"react-tiny-popover": "^8.1.6",
|
|
42
47
|
"swiper": "^11.2.8"
|
|
43
48
|
},
|
|
44
49
|
"exports": {
|