@progress/kendo-react-common 14.2.2-develop.1 → 14.3.0-develop.10

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.
@@ -8,8 +8,7 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import * as H from "react-dom";
11
- let p = !0;
12
- const k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
11
+ const p = { current: !0 }, k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
13
12
  "path",
14
13
  {
15
14
  fillRule: "evenodd",
@@ -157,28 +156,30 @@ const k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "3
157
156
  buttonLink: "https://prgress.co/3PyHIoH"
158
157
  }
159
158
  }, y = (t) => {
160
- const { code: n, licenseType: l, productName: a = "", version: c = "", expiration: d } = t || {};
161
- let r = "default";
162
- n && (`${n}:${l}` in L ? r = `${n}:${l}` : r = n);
163
- const i = L[r] || L.default;
159
+ const { code: n, licenseType: s, productName: r = "", version: c = "", expiration: d } = t || {};
160
+ let l = "default";
161
+ n && (`${n}:${s}` in L ? l = `${n}:${s}` : l = n);
162
+ const i = L[l] || L.default;
164
163
  return {
165
164
  icon: i.icon,
166
- title: i.title(a, c),
165
+ title: i.title(r, c),
167
166
  description: typeof i.description == "function" ? i.description(d) : i.description,
168
167
  buttonText: i.buttonText,
169
168
  buttonLink: i.buttonLink
170
169
  };
171
170
  }, M = (t) => {
172
- const [n, l] = e.useState(!0), [a] = e.useState(p), [c, d] = e.useState(!1), [r, i] = e.useState(!1), [g, s] = e.useState(!1), [o, A] = e.useState(!1), [C, E] = e.useState(!1);
171
+ const [n, s] = e.useState(!0), [r] = e.useState(() => p.current ? (p.current = !1, !0) : !1), [c, d] = e.useState(!1), [l, i] = e.useState(!1), [u, a] = e.useState(!1), [o, A] = e.useState(!1), [C, E] = e.useState(!1);
173
172
  e.useEffect(() => {
174
- d(!0), p && (p = !1);
173
+ d(!0);
175
174
  const f = () => {
176
175
  A(window.innerWidth < 500), E(window.innerWidth >= 768);
177
176
  };
178
- return f(), window.addEventListener("resize", f), () => window.removeEventListener("resize", f);
179
- }, []);
180
- const u = () => {
181
- l(!1);
177
+ return f(), window.addEventListener("resize", f), () => {
178
+ window.removeEventListener("resize", f), r && (p.current = !0);
179
+ };
180
+ }, [r]);
181
+ const g = () => {
182
+ s(!1);
182
183
  }, { icon: h, title: w, description: b, buttonText: v, buttonLink: m } = y(t.message), P = /* @__PURE__ */ e.createElement(
183
184
  "div",
184
185
  {
@@ -221,14 +222,14 @@ const k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "3
221
222
  border: "none",
222
223
  borderRadius: "4px",
223
224
  padding: "4px",
224
- backgroundColor: g ? "#3d3d3d14" : "transparent",
225
+ backgroundColor: u ? "#3d3d3d14" : "transparent",
225
226
  transition: "background-color 0.2s ease-in-out",
226
227
  outline: "none",
227
228
  cursor: "pointer"
228
229
  },
229
- onMouseLeave: () => s(!1),
230
- onMouseEnter: () => s(!0),
231
- onClick: u
230
+ onMouseLeave: () => a(!1),
231
+ onMouseEnter: () => a(!0),
232
+ onClick: g
232
233
  },
233
234
  /* @__PURE__ */ e.createElement("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
234
235
  "path",
@@ -314,7 +315,7 @@ const k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "3
314
315
  position: "relative",
315
316
  border: "none",
316
317
  borderRadius: "4px",
317
- backgroundColor: r ? "#b90138" : "#eb0249",
318
+ backgroundColor: l ? "#b90138" : "#eb0249",
318
319
  color: "#ffffff",
319
320
  transition: "background-color 0.2s ease-in-out",
320
321
  outline: "none",
@@ -343,14 +344,14 @@ const k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "3
343
344
  border: "none",
344
345
  borderRadius: "4px",
345
346
  padding: "4px",
346
- backgroundColor: g ? "#3d3d3d14" : "transparent",
347
+ backgroundColor: u ? "#3d3d3d14" : "transparent",
347
348
  transition: "background-color 0.2s ease-in-out",
348
349
  outline: "none",
349
350
  cursor: "pointer"
350
351
  },
351
- onMouseLeave: () => s(!1),
352
- onMouseEnter: () => s(!0),
353
- onClick: u
352
+ onMouseLeave: () => a(!1),
353
+ onMouseEnter: () => a(!0),
354
+ onClick: g
354
355
  },
355
356
  /* @__PURE__ */ e.createElement("svg", { width: "20", height: "20", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ e.createElement(
356
357
  "path",
@@ -382,7 +383,7 @@ const k = () => /* @__PURE__ */ e.createElement("svg", { width: "32", height: "3
382
383
  )
383
384
  }
384
385
  }
385
- ), c && a && n && H.createPortal(P, document.body));
386
+ ), c && r && n && H.createPortal(P, document.body));
386
387
  };
387
388
  export {
388
389
  M as WatermarkOverlay