@commercelayer/app-elements 0.0.22 → 0.0.23

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.
@@ -1,8 +1,8 @@
1
1
  import * as de from "react";
2
2
  import le, { useRef as W, useState as a, useEffect as z, useCallback as B, forwardRef as ce } from "react";
3
- import { _ as ve, a as s, h as Oe, b as O, c as Se, u as _e, S as he, d as me, s as ge } from "./overrides-4cc26c3c.js";
3
+ import { _ as ve, a as s, h as Oe, b as O, c as Se, u as _e, S as he, d as me, s as ge } from "./overrides-7ddc4b65.js";
4
4
  import "react-dom";
5
- import "./main-95dd7764.js";
5
+ import "./main-017487f0.js";
6
6
  import "@commercelayer/sdk";
7
7
  var ye = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
8
8
  function Ce(t) {
@@ -1,6 +1,6 @@
1
1
  import * as L from "react";
2
2
  import h, { forwardRef as nu, createElement as Qu, Component as Vu, createRef as Ku } from "react";
3
- import { I as zu, r as Xu, a as D, b as ou, t as $, c as mt, d as Oe, e as x, g as jo, s as Ne, f as yn, h as Gu, i as mn, j as au, k as Zu, l as Ju, m as es, n as la, o as ts, p as fa, q as rs, u as ns, v as os, w as ee, x as Xe, y as vn, z as iu, A as as, B as is, C as pa, D as us, E as ss, F as cs, G as pr, H as ls, J as fs, X as ps } from "./main-95dd7764.js";
3
+ import { I as zu, r as Xu, a as D, b as ou, t as $, c as mt, d as Oe, e as x, g as jo, s as Ne, f as yn, h as Gu, i as mn, j as au, k as Zu, l as Ju, m as es, n as la, o as ts, p as fa, q as rs, u as ns, v as os, w as ee, x as Xe, y as vn, z as iu, A as as, B as is, C as pa, D as us, E as ss, F as cs, G as pr, H as ls, J as fs, X as ps } from "./main-017487f0.js";
4
4
  import * as ds from "react-dom";
5
5
  import hs, { findDOMNode as ys } from "react-dom";
6
6
  import "@commercelayer/sdk";
@@ -7748,25 +7748,27 @@ const Ay = nu(
7748
7748
  isClearable: c,
7749
7749
  hint: l,
7750
7750
  feedback: d,
7751
- ...y
7752
- }, m) => {
7753
- const v = r ?? jy();
7751
+ preventOpenOnFocus: y,
7752
+ ...m
7753
+ }, v) => {
7754
+ const g = r ?? jy();
7754
7755
  return /* @__PURE__ */ h.createElement(
7755
7756
  ls,
7756
7757
  {
7757
- ...y,
7758
+ ...m,
7758
7759
  className: o,
7759
7760
  hint: l,
7761
+ feedback: d,
7760
7762
  label: u
7761
7763
  },
7762
7764
  /* @__PURE__ */ h.createElement("div", { className: "relative" }, /* @__PURE__ */ h.createElement(
7763
7765
  Yy,
7764
7766
  {
7765
- ref: m,
7767
+ ref: v,
7766
7768
  selected: e,
7767
7769
  onChange: t,
7768
- dateFormat: v,
7769
- placeholderText: s === !0 ? v.toLowerCase() : a,
7770
+ dateFormat: g,
7771
+ placeholderText: s === !0 ? g.toLowerCase() : a,
7770
7772
  minDate: i,
7771
7773
  openToDate: e ?? i,
7772
7774
  className: ee(
@@ -7775,7 +7777,8 @@ const Ay = nu(
7775
7777
  "transition duration-500 ease-in-out focus:outline-0 focus:border-primary-light",
7776
7778
  fs(d),
7777
7779
  n
7778
- )
7780
+ ),
7781
+ preventOpenOnFocus: y
7779
7782
  }
7780
7783
  ), /* @__PURE__ */ h.createElement("div", { className: "absolute top-0 bottom-0 right-4 flex items-center pointer-events-none touch-none" }, /* @__PURE__ */ h.createElement(vs, null)), e != null && c === !0 ? /* @__PURE__ */ h.createElement(
7781
7784
  "button",
@@ -1,8 +1,8 @@
1
1
  import * as r from "react";
2
2
  import a, { forwardRef as s } from "react";
3
- import { u as m, S as c, d as p, s as i } from "./overrides-4cc26c3c.js";
3
+ import { u as m, S as c, d as p, s as i } from "./overrides-7ddc4b65.js";
4
4
  import "react-dom";
5
- import "./main-95dd7764.js";
5
+ import "./main-017487f0.js";
6
6
  import "@commercelayer/sdk";
7
7
  var l = /* @__PURE__ */ s(function(e, t) {
8
8
  var o = m(e);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This hook is used to detect when a value has changed during new rendering.
3
+ * It is useful to trigger an action when a value has changed.
4
+ * @param value - the value to watch
5
+ * @param onChange - the action to trigger when the value has changed
6
+ * @returns - a boolean that is true when the value has changed
7
+ */
8
+ export declare function useIsChanged<T>({ value, onChange }: {
9
+ value: T;
10
+ onChange?: () => void;
11
+ }): boolean;