@petnow/ui 2.3.0 → 2.3.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.es.js
CHANGED
|
@@ -5048,23 +5048,24 @@ const lh = /* @__PURE__ */ Jf(sh), OE = ({
|
|
|
5048
5048
|
unswipeableContent: t,
|
|
5049
5049
|
defaultIndex: o = 0,
|
|
5050
5050
|
onTabChange: a,
|
|
5051
|
-
disabled: i
|
|
5051
|
+
disabled: i,
|
|
5052
|
+
allowScrollToSection: s = !0
|
|
5052
5053
|
}) => {
|
|
5053
|
-
const [
|
|
5054
|
-
|
|
5055
|
-
top:
|
|
5054
|
+
const [l, c] = me(o), u = ie(null), d = (h) => {
|
|
5055
|
+
h.current && window.scrollTo({
|
|
5056
|
+
top: h.current.offsetTop - 50,
|
|
5056
5057
|
behavior: "smooth"
|
|
5057
5058
|
});
|
|
5058
|
-
},
|
|
5059
|
-
|
|
5060
|
-
},
|
|
5061
|
-
const
|
|
5059
|
+
}, p = (h) => {
|
|
5060
|
+
c(h), s && d(u), a == null || a(h);
|
|
5061
|
+
}, f = () => {
|
|
5062
|
+
const m = 100 / n.length;
|
|
5062
5063
|
return {
|
|
5063
|
-
width: `${
|
|
5064
|
-
left: `${
|
|
5064
|
+
width: `${m}%`,
|
|
5065
|
+
left: `${l * m}%`
|
|
5065
5066
|
};
|
|
5066
5067
|
};
|
|
5067
|
-
return /* @__PURE__ */ Y.jsxs("div", { ref:
|
|
5068
|
+
return /* @__PURE__ */ Y.jsxs("div", { ref: u, className: "w-full", children: [
|
|
5068
5069
|
/* @__PURE__ */ Y.jsxs(
|
|
5069
5070
|
"div",
|
|
5070
5071
|
{
|
|
@@ -5073,18 +5074,18 @@ const lh = /* @__PURE__ */ Jf(sh), OE = ({
|
|
|
5073
5074
|
`z-50 mb-[20px] flex w-full flex-col bg-white ${e && "sticky top-[50px]"}`
|
|
5074
5075
|
),
|
|
5075
5076
|
children: [
|
|
5076
|
-
/* @__PURE__ */ Y.jsx("div", { className: "flex", children: n.map((
|
|
5077
|
+
/* @__PURE__ */ Y.jsx("div", { className: "flex", children: n.map((h, m) => /* @__PURE__ */ Y.jsx("div", { className: "flex flex-1 flex-col", children: /* @__PURE__ */ Y.jsx(
|
|
5077
5078
|
"button",
|
|
5078
5079
|
{
|
|
5079
5080
|
className: lt(
|
|
5080
5081
|
r == null ? void 0 : r.tabTitle,
|
|
5081
|
-
`cursor-pointer ${
|
|
5082
|
+
`cursor-pointer ${l === m ? "text-petnow-grey-30 text-label-large" : "text-petnow-grey-70 text-body-large disabled:opacity-40"}`
|
|
5082
5083
|
),
|
|
5083
|
-
onClick: () =>
|
|
5084
|
+
onClick: () => p(m),
|
|
5084
5085
|
disabled: i,
|
|
5085
|
-
children:
|
|
5086
|
+
children: h.displayName
|
|
5086
5087
|
}
|
|
5087
|
-
) },
|
|
5088
|
+
) }, h.key)) }),
|
|
5088
5089
|
/* @__PURE__ */ Y.jsx(
|
|
5089
5090
|
"div",
|
|
5090
5091
|
{
|
|
@@ -5099,7 +5100,7 @@ const lh = /* @__PURE__ */ Jf(sh), OE = ({
|
|
|
5099
5100
|
r == null ? void 0 : r.selectedUnderline,
|
|
5100
5101
|
"bg-petnow-grey-30 absolute h-[2px] transition-all duration-200"
|
|
5101
5102
|
),
|
|
5102
|
-
style:
|
|
5103
|
+
style: f()
|
|
5103
5104
|
}
|
|
5104
5105
|
)
|
|
5105
5106
|
}
|
|
@@ -5111,12 +5112,12 @@ const lh = /* @__PURE__ */ Jf(sh), OE = ({
|
|
|
5111
5112
|
/* @__PURE__ */ Y.jsx(
|
|
5112
5113
|
lh,
|
|
5113
5114
|
{
|
|
5114
|
-
index:
|
|
5115
|
-
onChangeIndex: (
|
|
5116
|
-
|
|
5115
|
+
index: l,
|
|
5116
|
+
onChangeIndex: (h) => {
|
|
5117
|
+
c(h), a == null || a(h);
|
|
5117
5118
|
},
|
|
5118
5119
|
disabled: i,
|
|
5119
|
-
children: n.map((
|
|
5120
|
+
children: n.map((h) => /* @__PURE__ */ Y.jsx("div", { children: h.content }, h.key))
|
|
5120
5121
|
}
|
|
5121
5122
|
)
|
|
5122
5123
|
] });
|