@happeouikit/form-elements 2.3.41 → 2.3.43

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
@@ -1,4 +1,4 @@
1
- import { jsxs as Me, jsx as V } from "react/jsx-runtime";
1
+ import { jsxs as Me, jsx as Y } from "react/jsx-runtime";
2
2
  import * as R from "react";
3
3
  import k, { useEffect as Ze, useState as se, forwardRef as ba, useContext as ll, Component as ya, createContext as cl, useCallback as Q, useMemo as We, Fragment as Cn, useRef as _e, useImperativeHandle as dl } from "react";
4
4
  import A, { css as jt } from "styled-components";
@@ -48,7 +48,7 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
48
48
  left: "10px",
49
49
  fontSize: "18px"
50
50
  }, a = { ...r, ...t };
51
- return () => /* @__PURE__ */ V(Bl, { children: /* @__PURE__ */ V(e, { ...a, style: n }) });
51
+ return () => /* @__PURE__ */ Y(Bl, { children: /* @__PURE__ */ Y(e, { ...a, style: n }) });
52
52
  }, xa = ({
53
53
  label: e,
54
54
  description: t,
@@ -70,8 +70,8 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
70
70
  ].join(" ");
71
71
  return /* @__PURE__ */ Me(No, { isDisabled: l || !1, children: [
72
72
  !!e && /* @__PURE__ */ Me(Eo, { children: [
73
- /* @__PURE__ */ V(Vl, { bold: !0, for: h, isRequired: n || !1, children: e }),
74
- t && /* @__PURE__ */ V(
73
+ /* @__PURE__ */ Y(Vl, { bold: !0, htmlFor: h, isRequired: n || !1, children: e }),
74
+ t && /* @__PURE__ */ Y(
75
75
  pe,
76
76
  {
77
77
  id: `${h}-description`,
@@ -81,7 +81,7 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
81
81
  )
82
82
  ] }),
83
83
  i && Wl(i, o)(),
84
- /* @__PURE__ */ V(
84
+ /* @__PURE__ */ Y(
85
85
  Ao,
86
86
  {
87
87
  title: e || "Styled input",
@@ -98,12 +98,12 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
98
98
  }
99
99
  ),
100
100
  r && /* @__PURE__ */ Me(Kr, { id: `${h}-hint-message`, children: [
101
- /* @__PURE__ */ V(wi, { fill: "var(--color-hint-text-on-light, #68778d)" }),
102
- /* @__PURE__ */ V(Jr, { color: "var(--color-secondary-text-on-light, #4a5464)", children: r })
101
+ /* @__PURE__ */ Y(wi, { fill: "var(--color-hint-text-on-light, #68778d)" }),
102
+ /* @__PURE__ */ Y(Jr, { color: "var(--color-secondary-text-on-light, #4a5464)", children: r })
103
103
  ] }),
104
104
  s === "error" && u && /* @__PURE__ */ Me(Kr, { id: `${h}-error-message`, children: [
105
- /* @__PURE__ */ V(wi, { fill: "var(--color-alert-primary, #da3939)" }),
106
- /* @__PURE__ */ V(Jr, { color: "var(--color-alert-primary, #da3939)", children: u })
105
+ /* @__PURE__ */ Y(wi, { fill: "var(--color-alert-primary, #da3939)" }),
106
+ /* @__PURE__ */ Y(Jr, { color: "var(--color-alert-primary, #da3939)", children: u })
107
107
  ] })
108
108
  ] });
109
109
  }, wi = A(hl)`
@@ -181,8 +181,8 @@ const q0 = (e) => e.replace(/(_|-|,|\.)(.)/g, (t) => t[1].toUpperCase()), Fl = 6
181
181
  `, Bl = A.span`
182
182
  position: relative;
183
183
  `, t1 = ({ label: e, ...t }) => /* @__PURE__ */ Me(Hl, { children: [
184
- /* @__PURE__ */ V(Yl, { ...t, type: "number" }),
185
- e && /* @__PURE__ */ V(Ll, { children: e })
184
+ /* @__PURE__ */ Y(Yl, { ...t, type: "number" }),
185
+ e && /* @__PURE__ */ Y(Ll, { children: e })
186
186
  ] }), Yl = A(xa)`
187
187
  width: 60px;
188
188
  text-align: center;
@@ -4489,16 +4489,16 @@ const dh = ch, fh = ({ label: e, ...t }, r) => {
4489
4489
  ${ph}
4490
4490
  `, gh = A.div`
4491
4491
  margin: 4px 0;
4492
- `, Cs = ba(fh), xs = k.forwardRef((e, t) => /* @__PURE__ */ k.createElement(ws, { ref: t, as: "a", ...e }, e.children)), n1 = k.forwardRef((e, t) => /* @__PURE__ */ k.createElement(
4492
+ `, Cs = ba(fh), xs = k.forwardRef((e, t) => /* @__PURE__ */ Y(ws, { ref: t, as: "a", ...e, children: e.children })), n1 = k.forwardRef((e, t) => /* @__PURE__ */ Y(
4493
4493
  ws,
4494
4494
  {
4495
4495
  ref: t,
4496
4496
  as: "a",
4497
4497
  target: "_blank",
4498
4498
  rel: "nofollow noopener",
4499
- ...e
4500
- },
4501
- e.children
4499
+ ...e,
4500
+ children: e.children
4501
+ }
4502
4502
  )), ws = A(pe)`
4503
4503
  text-decoration: ${({ underline: e }) => e ? "underline" : "none"};
4504
4504
  color: ${({ color: e }) => e || ae};
@@ -4568,7 +4568,7 @@ const r1 = ({
4568
4568
  [l, i]
4569
4569
  ), y = We(() => a || nn(), [a]);
4570
4570
  return /* @__PURE__ */ Me(wh, { background: c, children: [
4571
- /* @__PURE__ */ V(
4571
+ /* @__PURE__ */ Y(
4572
4572
  vh,
4573
4573
  {
4574
4574
  "aria-hidden": "true",
@@ -4585,7 +4585,7 @@ const r1 = ({
4585
4585
  "aria-describedby": r ? `${y}_description` : void 0
4586
4586
  }
4587
4587
  ),
4588
- /* @__PURE__ */ V(
4588
+ /* @__PURE__ */ Y(
4589
4589
  Kn,
4590
4590
  {
4591
4591
  type: "button",
@@ -4600,7 +4600,7 @@ const r1 = ({
4600
4600
  ),
4601
4601
  e && /* @__PURE__ */ Me(bh, { children: [
4602
4602
  /* @__PURE__ */ Me(yh, { children: [
4603
- e && /* @__PURE__ */ V(
4603
+ e && /* @__PURE__ */ Y(
4604
4604
  xh,
4605
4605
  {
4606
4606
  bold: !0,
@@ -4611,9 +4611,9 @@ const r1 = ({
4611
4611
  children: e
4612
4612
  }
4613
4613
  ),
4614
- t && /* @__PURE__ */ V(Ih, { children: t })
4614
+ t && /* @__PURE__ */ Y(Ih, { children: t })
4615
4615
  ] }),
4616
- r && /* @__PURE__ */ V(Ch, { id: `${y}_description`, children: r })
4616
+ r && /* @__PURE__ */ Y(Ch, { id: `${y}_description`, children: r })
4617
4617
  ] })
4618
4618
  ] });
4619
4619
  }, vh = A.input`
@@ -4774,7 +4774,7 @@ const r1 = ({
4774
4774
  [o, a]
4775
4775
  );
4776
4776
  return /* @__PURE__ */ Me(Oh, { style: i, background: l, children: [
4777
- /* @__PURE__ */ V(
4777
+ /* @__PURE__ */ Y(
4778
4778
  "input",
4779
4779
  {
4780
4780
  ref: f,
@@ -4792,7 +4792,7 @@ const r1 = ({
4792
4792
  ...p
4793
4793
  }
4794
4794
  ),
4795
- n ? /* @__PURE__ */ V(
4795
+ n ? /* @__PURE__ */ Y(
4796
4796
  Nt,
4797
4797
  {
4798
4798
  onClick: g,
@@ -4801,9 +4801,9 @@ const r1 = ({
4801
4801
  "aria-disabled": o,
4802
4802
  background: l,
4803
4803
  ...p,
4804
- children: /* @__PURE__ */ V(kh, {})
4804
+ children: /* @__PURE__ */ Y(kh, {})
4805
4805
  }
4806
- ) : /* @__PURE__ */ V(
4806
+ ) : /* @__PURE__ */ Y(
4807
4807
  Ct,
4808
4808
  {
4809
4809
  onClick: g,
@@ -4812,12 +4812,12 @@ const r1 = ({
4812
4812
  "aria-disabled": o,
4813
4813
  background: l,
4814
4814
  ...p,
4815
- children: /* @__PURE__ */ V(Mh, {})
4815
+ children: /* @__PURE__ */ Y(Mh, {})
4816
4816
  }
4817
4817
  ),
4818
4818
  e && /* @__PURE__ */ Me(Sh, { children: [
4819
4819
  /* @__PURE__ */ Me(Eh, { children: [
4820
- e && /* @__PURE__ */ V(
4820
+ e && /* @__PURE__ */ Y(
4821
4821
  _h,
4822
4822
  {
4823
4823
  onClick: g,
@@ -4828,9 +4828,9 @@ const r1 = ({
4828
4828
  children: e
4829
4829
  }
4830
4830
  ),
4831
- t && /* @__PURE__ */ V(Ah, { children: t })
4831
+ t && /* @__PURE__ */ Y(Ah, { children: t })
4832
4832
  ] }),
4833
- r && /* @__PURE__ */ V(Nh, { id: `${m}_description`, children: r })
4833
+ r && /* @__PURE__ */ Y(Nh, { id: `${m}_description`, children: r })
4834
4834
  ] })
4835
4835
  ] });
4836
4836
  }, Ct = A.span`
@@ -4975,7 +4975,7 @@ const r1 = ({
4975
4975
  const I = (g ? [...c, f.value] : c.filter((y) => y !== f.value)).sort(Th(u));
4976
4976
  d(I), o && o(I);
4977
4977
  };
4978
- return /* @__PURE__ */ V(Bh, { className: a, children: u.map((f) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ V(
4978
+ return /* @__PURE__ */ Y(Bh, { className: a, children: u.map((f) => /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(
4979
4979
  Dh,
4980
4980
  {
4981
4981
  label: f.label,
@@ -5036,7 +5036,7 @@ const r1 = ({
5036
5036
  [i, s.disabled]
5037
5037
  );
5038
5038
  return /* @__PURE__ */ Me(Xh, { background: n, children: [
5039
- /* @__PURE__ */ V(
5039
+ /* @__PURE__ */ Y(
5040
5040
  "input",
5041
5041
  {
5042
5042
  type: "radio",
@@ -5048,7 +5048,7 @@ const r1 = ({
5048
5048
  "data-testid": o
5049
5049
  }
5050
5050
  ),
5051
- /* @__PURE__ */ V(
5051
+ /* @__PURE__ */ Y(
5052
5052
  gn,
5053
5053
  {
5054
5054
  onClick: l,
@@ -5058,7 +5058,7 @@ const r1 = ({
5058
5058
  ),
5059
5059
  e && /* @__PURE__ */ Me(Yh, { children: [
5060
5060
  /* @__PURE__ */ Me(Vh, { children: [
5061
- e && /* @__PURE__ */ V(
5061
+ e && /* @__PURE__ */ Y(
5062
5062
  Zh,
5063
5063
  {
5064
5064
  bold: !0,
@@ -5069,9 +5069,9 @@ const r1 = ({
5069
5069
  children: e
5070
5070
  }
5071
5071
  ),
5072
- t && /* @__PURE__ */ V(Lh, { children: t })
5072
+ t && /* @__PURE__ */ Y(Lh, { children: t })
5073
5073
  ] }),
5074
- r && /* @__PURE__ */ V(Hh, { id: `${u}_description`, children: r })
5074
+ r && /* @__PURE__ */ Y(Hh, { id: `${u}_description`, children: r })
5075
5075
  ] })
5076
5076
  ] });
5077
5077
  };
@@ -9309,44 +9309,44 @@ function Pr() {
9309
9309
  var e = zr(this._milliseconds) / 1e3, t = zr(this._days), r = zr(this._months), n, a, i, o, s = this.asSeconds(), u, l, c, d;
9310
9310
  return s ? (n = Re(e / 60), a = Re(n / 60), e %= 60, n %= 60, i = Re(r / 12), r %= 12, o = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", u = s < 0 ? "-" : "", l = Zt(this._months) !== Zt(s) ? "-" : "", c = Zt(this._days) !== Zt(s) ? "-" : "", d = Zt(this._milliseconds) !== Zt(s) ? "-" : "", u + "P" + (i ? l + i + "Y" : "") + (r ? l + r + "M" : "") + (t ? c + t + "D" : "") + (a || n || e ? "T" : "") + (a ? d + a + "H" : "") + (n ? d + n + "M" : "") + (e ? d + o + "S" : "")) : "P0D";
9311
9311
  }
9312
- var Y = _r.prototype;
9313
- Y.isValid = Nv;
9314
- Y.abs = ly;
9315
- Y.add = cy;
9316
- Y.subtract = dy;
9317
- Y.as = hy;
9318
- Y.asMilliseconds = my;
9319
- Y.asSeconds = gy;
9320
- Y.asMinutes = vy;
9321
- Y.asHours = by;
9322
- Y.asDays = yy;
9323
- Y.asWeeks = Iy;
9324
- Y.asMonths = Cy;
9325
- Y.asQuarters = xy;
9326
- Y.asYears = wy;
9327
- Y.valueOf = py;
9328
- Y._bubble = fy;
9329
- Y.clone = Dy;
9330
- Y.get = My;
9331
- Y.milliseconds = ky;
9332
- Y.seconds = Sy;
9333
- Y.minutes = Ey;
9334
- Y.hours = Ay;
9335
- Y.days = Ny;
9336
- Y.weeks = Py;
9337
- Y.months = _y;
9338
- Y.years = Oy;
9339
- Y.humanize = Wy;
9340
- Y.toISOString = Pr;
9341
- Y.toString = Pr;
9342
- Y.toJSON = Pr;
9343
- Y.locale = Yu;
9344
- Y.localeData = Lu;
9345
- Y.toIsoString = Be(
9312
+ var V = _r.prototype;
9313
+ V.isValid = Nv;
9314
+ V.abs = ly;
9315
+ V.add = cy;
9316
+ V.subtract = dy;
9317
+ V.as = hy;
9318
+ V.asMilliseconds = my;
9319
+ V.asSeconds = gy;
9320
+ V.asMinutes = vy;
9321
+ V.asHours = by;
9322
+ V.asDays = yy;
9323
+ V.asWeeks = Iy;
9324
+ V.asMonths = Cy;
9325
+ V.asQuarters = xy;
9326
+ V.asYears = wy;
9327
+ V.valueOf = py;
9328
+ V._bubble = fy;
9329
+ V.clone = Dy;
9330
+ V.get = My;
9331
+ V.milliseconds = ky;
9332
+ V.seconds = Sy;
9333
+ V.minutes = Ey;
9334
+ V.hours = Ay;
9335
+ V.days = Ny;
9336
+ V.weeks = Py;
9337
+ V.months = _y;
9338
+ V.years = Oy;
9339
+ V.humanize = Wy;
9340
+ V.toISOString = Pr;
9341
+ V.toString = Pr;
9342
+ V.toJSON = Pr;
9343
+ V.locale = Yu;
9344
+ V.localeData = Lu;
9345
+ V.toIsoString = Be(
9346
9346
  "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
9347
9347
  Pr
9348
9348
  );
9349
- Y.lang = Vu;
9349
+ V.lang = Vu;
9350
9350
  _("X", 0, 0, "unix");
9351
9351
  _("x", 0, 0, "valueOf");
9352
9352
  S("x", Sr);