enjanga-components-library 1.0.24 → 1.0.25
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.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -5
- package/dist/index.mjs +4 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -25274,12 +25274,11 @@ var rotateQuote = ({
|
|
|
25274
25274
|
var CustomQuotes = ({
|
|
25275
25275
|
className,
|
|
25276
25276
|
quotes,
|
|
25277
|
-
rotationTimer =
|
|
25278
|
-
//
|
|
25277
|
+
rotationTimer = 10
|
|
25278
|
+
// ✅ seconds (default 10s)
|
|
25279
25279
|
}) => {
|
|
25280
25280
|
const [currentQuote, setCurrentQuote] = React4.useState(
|
|
25281
25281
|
quotes && quotes.length > 0 ? quotes[0] : void 0
|
|
25282
|
-
// ✅ sync init avoids flashing undefined
|
|
25283
25282
|
);
|
|
25284
25283
|
const [previousQuote, setPreviousQuote] = React4.useState(void 0);
|
|
25285
25284
|
React4.useEffect(() => {
|
|
@@ -25296,7 +25295,7 @@ var CustomQuotes = ({
|
|
|
25296
25295
|
}, [quotes]);
|
|
25297
25296
|
React4.useEffect(() => {
|
|
25298
25297
|
if (!quotes || quotes.length <= 1) return;
|
|
25299
|
-
const intervalMs = rotationTimer *
|
|
25298
|
+
const intervalMs = rotationTimer * 1e3;
|
|
25300
25299
|
const intervalId = setInterval(() => {
|
|
25301
25300
|
rotateQuote({
|
|
25302
25301
|
quotes,
|
|
@@ -25314,7 +25313,7 @@ var CustomQuotes = ({
|
|
|
25314
25313
|
}
|
|
25315
25314
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx2__default.default(className, "custom-quotes"), children: [
|
|
25316
25315
|
/* @__PURE__ */ jsxRuntime.jsx(Quotes, { className: "custom-quotes__icon" }),
|
|
25317
|
-
/* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "custom-quotes__text", children: currentQuote ? /* @__PURE__ */ jsxRuntime.jsx(CMSRichText_default, { data: currentQuote }) : /* @__PURE__ */ jsxRuntime.jsx(SkeletonAnimation_default, { part: "body" }) }),
|
|
25316
|
+
/* @__PURE__ */ jsxRuntime.jsx("blockquote", { className: "custom-quotes__text", children: currentQuote ? /* @__PURE__ */ jsxRuntime.jsx(CMSRichText_default, { data: currentQuote.description }) : /* @__PURE__ */ jsxRuntime.jsx(SkeletonAnimation_default, { part: "body" }) }),
|
|
25318
25317
|
/* @__PURE__ */ jsxRuntime.jsx("hr", { className: "custom-quotes__hr" })
|
|
25319
25318
|
] });
|
|
25320
25319
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -25246,12 +25246,11 @@ var rotateQuote = ({
|
|
|
25246
25246
|
var CustomQuotes = ({
|
|
25247
25247
|
className,
|
|
25248
25248
|
quotes,
|
|
25249
|
-
rotationTimer =
|
|
25250
|
-
//
|
|
25249
|
+
rotationTimer = 10
|
|
25250
|
+
// ✅ seconds (default 10s)
|
|
25251
25251
|
}) => {
|
|
25252
25252
|
const [currentQuote, setCurrentQuote] = useState(
|
|
25253
25253
|
quotes && quotes.length > 0 ? quotes[0] : void 0
|
|
25254
|
-
// ✅ sync init avoids flashing undefined
|
|
25255
25254
|
);
|
|
25256
25255
|
const [previousQuote, setPreviousQuote] = useState(void 0);
|
|
25257
25256
|
useEffect(() => {
|
|
@@ -25268,7 +25267,7 @@ var CustomQuotes = ({
|
|
|
25268
25267
|
}, [quotes]);
|
|
25269
25268
|
useEffect(() => {
|
|
25270
25269
|
if (!quotes || quotes.length <= 1) return;
|
|
25271
|
-
const intervalMs = rotationTimer *
|
|
25270
|
+
const intervalMs = rotationTimer * 1e3;
|
|
25272
25271
|
const intervalId = setInterval(() => {
|
|
25273
25272
|
rotateQuote({
|
|
25274
25273
|
quotes,
|
|
@@ -25286,7 +25285,7 @@ var CustomQuotes = ({
|
|
|
25286
25285
|
}
|
|
25287
25286
|
return /* @__PURE__ */ jsxs("div", { className: clsx2(className, "custom-quotes"), children: [
|
|
25288
25287
|
/* @__PURE__ */ jsx(Quotes, { className: "custom-quotes__icon" }),
|
|
25289
|
-
/* @__PURE__ */ jsx("blockquote", { className: "custom-quotes__text", children: currentQuote ? /* @__PURE__ */ jsx(CMSRichText_default, { data: currentQuote }) : /* @__PURE__ */ jsx(SkeletonAnimation_default, { part: "body" }) }),
|
|
25288
|
+
/* @__PURE__ */ jsx("blockquote", { className: "custom-quotes__text", children: currentQuote ? /* @__PURE__ */ jsx(CMSRichText_default, { data: currentQuote.description }) : /* @__PURE__ */ jsx(SkeletonAnimation_default, { part: "body" }) }),
|
|
25290
25289
|
/* @__PURE__ */ jsx("hr", { className: "custom-quotes__hr" })
|
|
25291
25290
|
] });
|
|
25292
25291
|
};
|
package/package.json
CHANGED