@clubmed/trident-ui 1.0.0-beta.4 → 1.0.0-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/fonts/Actions/tui-actions.css +6 -6
  3. package/fonts/Actions/tui-actions.eot +0 -0
  4. package/fonts/Actions/tui-actions.less +6 -6
  5. package/fonts/Actions/tui-actions.module.less +6 -6
  6. package/fonts/Actions/tui-actions.scss +6 -6
  7. package/fonts/Actions/tui-actions.styl +6 -6
  8. package/fonts/Actions/tui-actions.ttf +0 -0
  9. package/fonts/Actions/tui-actions.woff +0 -0
  10. package/fonts/Actions/tui-actions.woff2 +0 -0
  11. package/fonts/Activities/tui-activities.css +6 -6
  12. package/fonts/Activities/tui-activities.eot +0 -0
  13. package/fonts/Activities/tui-activities.less +6 -6
  14. package/fonts/Activities/tui-activities.module.less +6 -6
  15. package/fonts/Activities/tui-activities.scss +6 -6
  16. package/fonts/Activities/tui-activities.styl +6 -6
  17. package/fonts/Activities/tui-activities.ttf +0 -0
  18. package/fonts/Activities/tui-activities.woff +0 -0
  19. package/fonts/Activities/tui-activities.woff2 +0 -0
  20. package/fonts/Brand/tui-brand.css +6 -6
  21. package/fonts/Brand/tui-brand.eot +0 -0
  22. package/fonts/Brand/tui-brand.less +6 -6
  23. package/fonts/Brand/tui-brand.module.less +6 -6
  24. package/fonts/Brand/tui-brand.scss +6 -6
  25. package/fonts/Brand/tui-brand.styl +6 -6
  26. package/fonts/Brand/tui-brand.ttf +0 -0
  27. package/fonts/Brand/tui-brand.woff +0 -0
  28. package/fonts/Brand/tui-brand.woff2 +0 -0
  29. package/fonts/Covid/tui-covid.css +6 -6
  30. package/fonts/Covid/tui-covid.eot +0 -0
  31. package/fonts/Covid/tui-covid.less +6 -6
  32. package/fonts/Covid/tui-covid.module.less +6 -6
  33. package/fonts/Covid/tui-covid.scss +6 -6
  34. package/fonts/Covid/tui-covid.styl +6 -6
  35. package/fonts/Covid/tui-covid.ttf +0 -0
  36. package/fonts/Covid/tui-covid.woff +0 -0
  37. package/fonts/Covid/tui-covid.woff2 +0 -0
  38. package/fonts/Food/tui-food.css +6 -6
  39. package/fonts/Food/tui-food.eot +0 -0
  40. package/fonts/Food/tui-food.less +6 -6
  41. package/fonts/Food/tui-food.module.less +6 -6
  42. package/fonts/Food/tui-food.scss +6 -6
  43. package/fonts/Food/tui-food.styl +6 -6
  44. package/fonts/Food/tui-food.ttf +0 -0
  45. package/fonts/Food/tui-food.woff +0 -0
  46. package/fonts/Food/tui-food.woff2 +0 -0
  47. package/fonts/HappyToCare/tui-happy-to-care.css +6 -6
  48. package/fonts/HappyToCare/tui-happy-to-care.eot +0 -0
  49. package/fonts/HappyToCare/tui-happy-to-care.less +6 -6
  50. package/fonts/HappyToCare/tui-happy-to-care.module.less +6 -6
  51. package/fonts/HappyToCare/tui-happy-to-care.scss +6 -6
  52. package/fonts/HappyToCare/tui-happy-to-care.styl +6 -6
  53. package/fonts/HappyToCare/tui-happy-to-care.ttf +0 -0
  54. package/fonts/HappyToCare/tui-happy-to-care.woff +0 -0
  55. package/fonts/HappyToCare/tui-happy-to-care.woff2 +0 -0
  56. package/fonts/Places/tui-places.css +6 -6
  57. package/fonts/Places/tui-places.eot +0 -0
  58. package/fonts/Places/tui-places.less +6 -6
  59. package/fonts/Places/tui-places.module.less +6 -6
  60. package/fonts/Places/tui-places.scss +6 -6
  61. package/fonts/Places/tui-places.styl +6 -6
  62. package/fonts/Places/tui-places.ttf +0 -0
  63. package/fonts/Places/tui-places.woff +0 -0
  64. package/fonts/Places/tui-places.woff2 +0 -0
  65. package/fonts/Room/tui-room.css +6 -6
  66. package/fonts/Room/tui-room.eot +0 -0
  67. package/fonts/Room/tui-room.less +6 -6
  68. package/fonts/Room/tui-room.module.less +6 -6
  69. package/fonts/Room/tui-room.scss +6 -6
  70. package/fonts/Room/tui-room.styl +6 -6
  71. package/fonts/Room/tui-room.ttf +0 -0
  72. package/fonts/Room/tui-room.woff +0 -0
  73. package/fonts/Room/tui-room.woff2 +0 -0
  74. package/fonts/Services/tui-services.css +6 -6
  75. package/fonts/Services/tui-services.eot +0 -0
  76. package/fonts/Services/tui-services.less +6 -6
  77. package/fonts/Services/tui-services.module.less +6 -6
  78. package/fonts/Services/tui-services.scss +6 -6
  79. package/fonts/Services/tui-services.styl +6 -6
  80. package/fonts/Services/tui-services.ttf +0 -0
  81. package/fonts/Services/tui-services.woff +0 -0
  82. package/fonts/Services/tui-services.woff2 +0 -0
  83. package/fonts/Socials/tui-socials.css +6 -6
  84. package/fonts/Socials/tui-socials.eot +0 -0
  85. package/fonts/Socials/tui-socials.less +6 -6
  86. package/fonts/Socials/tui-socials.module.less +6 -6
  87. package/fonts/Socials/tui-socials.scss +6 -6
  88. package/fonts/Socials/tui-socials.styl +6 -6
  89. package/fonts/Socials/tui-socials.ttf +0 -0
  90. package/fonts/Socials/tui-socials.woff +0 -0
  91. package/fonts/Socials/tui-socials.woff2 +0 -0
  92. package/fonts/Transports/tui-transports.css +6 -6
  93. package/fonts/Transports/tui-transports.eot +0 -0
  94. package/fonts/Transports/tui-transports.less +6 -6
  95. package/fonts/Transports/tui-transports.module.less +6 -6
  96. package/fonts/Transports/tui-transports.scss +6 -6
  97. package/fonts/Transports/tui-transports.styl +6 -6
  98. package/fonts/Transports/tui-transports.ttf +0 -0
  99. package/fonts/Transports/tui-transports.woff +0 -0
  100. package/fonts/Transports/tui-transports.woff2 +0 -0
  101. package/fonts/Utilities/tui-utilities.css +6 -6
  102. package/fonts/Utilities/tui-utilities.eot +0 -0
  103. package/fonts/Utilities/tui-utilities.less +6 -6
  104. package/fonts/Utilities/tui-utilities.module.less +6 -6
  105. package/fonts/Utilities/tui-utilities.scss +6 -6
  106. package/fonts/Utilities/tui-utilities.styl +6 -6
  107. package/fonts/Utilities/tui-utilities.ttf +0 -0
  108. package/fonts/Utilities/tui-utilities.woff +0 -0
  109. package/fonts/Utilities/tui-utilities.woff2 +0 -0
  110. package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -1
  111. package/molecules/Forms/Checkboxes/Checkbox.js +37 -37
  112. package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -1
  113. package/molecules/Forms/Checkboxes/Checkboxes.js +30 -31
  114. package/molecules/Forms/DateField.d.ts +1 -17
  115. package/molecules/Forms/DateField.js +98 -99
  116. package/molecules/Forms/Filter.d.ts +1 -1
  117. package/molecules/Forms/Filter.js +38 -38
  118. package/molecules/Forms/NumberField.d.ts +3 -3
  119. package/molecules/Forms/NumberField.js +76 -76
  120. package/molecules/Forms/Password/Password.js +35 -36
  121. package/molecules/Forms/Radios/Radio.d.ts +1 -1
  122. package/molecules/Forms/Radios/Radio.js +31 -31
  123. package/molecules/Forms/Radios/RadioGroup.d.ts +1 -1
  124. package/molecules/Forms/Radios/RadioGroup.js +28 -29
  125. package/molecules/Forms/Range.d.ts +2 -2
  126. package/molecules/Forms/Range.js +181 -183
  127. package/molecules/Forms/Switch.d.ts +1 -1
  128. package/molecules/Forms/Switch.js +28 -28
  129. package/molecules/Forms/TextField.js +38 -38
  130. package/package.json +1 -1
@@ -1,38 +1,38 @@
1
- import { jsxs as J, jsx as L } from "react/jsx-runtime";
1
+ import { jsxs as J, jsx as W } from "react/jsx-runtime";
2
2
  import { c as fe } from "../../index-Cu0xwYjD.js";
3
- import { useState as V, useRef as U, useEffect as C, useMemo as he } from "react";
4
- import { g as de } from "../../_commonjsHelpers-DaMA6jEr.js";
5
- var y = [], pe = function() {
6
- return y.some(function(e) {
3
+ import { useState as V, useRef as U, useEffect as N, useMemo as de, useId as he } from "react";
4
+ import { g as pe } from "../../_commonjsHelpers-DaMA6jEr.js";
5
+ var O = [], be = function() {
6
+ return O.some(function(e) {
7
7
  return e.activeTargets.length > 0;
8
8
  });
9
- }, be = function() {
10
- return y.some(function(e) {
9
+ }, ge = function() {
10
+ return O.some(function(e) {
11
11
  return e.skippedTargets.length > 0;
12
12
  });
13
- }, Y = "ResizeObserver loop completed with undelivered notifications.", ge = function() {
13
+ }, Y = "ResizeObserver loop completed with undelivered notifications.", me = function() {
14
14
  var e;
15
15
  typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
16
16
  message: Y
17
17
  }) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = Y), window.dispatchEvent(e);
18
- }, N;
18
+ }, k;
19
19
  (function(e) {
20
20
  e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
21
- })(N || (N = {}));
22
- var E = function(e) {
21
+ })(k || (k = {}));
22
+ var R = function(e) {
23
23
  return Object.freeze(e);
24
- }, me = /* @__PURE__ */ function() {
24
+ }, we = /* @__PURE__ */ function() {
25
25
  function e(t, r) {
26
- this.inlineSize = t, this.blockSize = r, E(this);
26
+ this.inlineSize = t, this.blockSize = r, R(this);
27
27
  }
28
28
  return e;
29
29
  }(), oe = function() {
30
30
  function e(t, r, n, i) {
31
- return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, E(this);
31
+ return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, R(this);
32
32
  }
33
33
  return e.prototype.toJSON = function() {
34
- var t = this, r = t.x, n = t.y, i = t.top, s = t.right, a = t.bottom, u = t.left, o = t.width, l = t.height;
35
- return { x: r, y: n, top: i, right: s, bottom: a, left: u, width: o, height: l };
34
+ var t = this, r = t.x, n = t.y, i = t.top, s = t.right, a = t.bottom, l = t.left, o = t.width, u = t.height;
35
+ return { x: r, y: n, top: i, right: s, bottom: a, left: l, width: o, height: u };
36
36
  }, e.fromRect = function(t) {
37
37
  return new e(t.x, t.y, t.width, t.height);
38
38
  }, e;
@@ -51,7 +51,7 @@ var E = function(e) {
51
51
  return !0;
52
52
  var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
53
53
  return !!(r && e instanceof r.Element);
54
- }, we = function(e) {
54
+ }, ze = function(e) {
55
55
  switch (e.tagName) {
56
56
  case "INPUT":
57
57
  if (e.type !== "image")
@@ -66,41 +66,41 @@ var E = function(e) {
66
66
  return !0;
67
67
  }
68
68
  return !1;
69
- }, D = typeof window < "u" ? window : {}, W = /* @__PURE__ */ new WeakMap(), K = /auto|scroll/, ze = /^tb|vertical/, xe = /msie|trident/i.test(D.navigator && D.navigator.userAgent), p = function(e) {
69
+ }, L = typeof window < "u" ? window : {}, I = /* @__PURE__ */ new WeakMap(), K = /auto|scroll/, xe = /^tb|vertical/, ye = /msie|trident/i.test(L.navigator && L.navigator.userAgent), b = function(e) {
70
70
  return parseFloat(e || "0");
71
- }, S = function(e, t, r) {
72
- return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new me((r ? t : e) || 0, (r ? e : t) || 0);
73
- }, Q = E({
74
- devicePixelContentBoxSize: S(),
75
- borderBoxSize: S(),
76
- contentBoxSize: S(),
71
+ }, D = function(e, t, r) {
72
+ return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new we((r ? t : e) || 0, (r ? e : t) || 0);
73
+ }, Q = R({
74
+ devicePixelContentBoxSize: D(),
75
+ borderBoxSize: D(),
76
+ contentBoxSize: D(),
77
77
  contentRect: new oe(0, 0, 0, 0)
78
78
  }), ae = function(e, t) {
79
- if (t === void 0 && (t = !1), W.has(e) && !t)
80
- return W.get(e);
79
+ if (t === void 0 && (t = !1), I.has(e) && !t)
80
+ return I.get(e);
81
81
  if (se(e))
82
- return W.set(e, Q), Q;
83
- var r = getComputedStyle(e), n = $(e) && e.ownerSVGElement && e.getBBox(), i = !xe && r.boxSizing === "border-box", s = ze.test(r.writingMode || ""), a = !n && K.test(r.overflowY || ""), u = !n && K.test(r.overflowX || ""), o = n ? 0 : p(r.paddingTop), l = n ? 0 : p(r.paddingRight), v = n ? 0 : p(r.paddingBottom), f = n ? 0 : p(r.paddingLeft), O = n ? 0 : p(r.borderTopWidth), d = n ? 0 : p(r.borderRightWidth), b = n ? 0 : p(r.borderBottomWidth), h = n ? 0 : p(r.borderLeftWidth), w = f + l, R = o + v, c = h + d, m = O + b, g = u ? e.offsetHeight - m - e.clientHeight : 0, z = a ? e.offsetWidth - c - e.clientWidth : 0, k = i ? w + c : 0, P = i ? R + m : 0, T = n ? n.width : p(r.width) - k - z, B = n ? n.height : p(r.height) - P - g, _ = T + w + z + c, x = B + R + g + m, G = E({
84
- devicePixelContentBoxSize: S(Math.round(T * devicePixelRatio), Math.round(B * devicePixelRatio), s),
85
- borderBoxSize: S(_, x, s),
86
- contentBoxSize: S(T, B, s),
87
- contentRect: new oe(f, o, T, B)
82
+ return I.set(e, Q), Q;
83
+ var r = getComputedStyle(e), n = $(e) && e.ownerSVGElement && e.getBBox(), i = !ye && r.boxSizing === "border-box", s = xe.test(r.writingMode || ""), a = !n && K.test(r.overflowY || ""), l = !n && K.test(r.overflowX || ""), o = n ? 0 : b(r.paddingTop), u = n ? 0 : b(r.paddingRight), v = n ? 0 : b(r.paddingBottom), f = n ? 0 : b(r.paddingLeft), T = n ? 0 : b(r.borderTopWidth), m = n ? 0 : b(r.borderRightWidth), h = n ? 0 : b(r.borderBottomWidth), d = n ? 0 : b(r.borderLeftWidth), w = f + u, p = o + v, c = d + m, z = T + h, B = l ? e.offsetHeight - z - e.clientHeight : 0, x = a ? e.offsetWidth - c - e.clientWidth : 0, g = i ? w + c : 0, S = i ? p + z : 0, y = n ? n.width : b(r.width) - g - x, C = n ? n.height : b(r.height) - S - B, _ = y + w + x + c, E = C + p + B + z, G = R({
84
+ devicePixelContentBoxSize: D(Math.round(y * devicePixelRatio), Math.round(C * devicePixelRatio), s),
85
+ borderBoxSize: D(_, E, s),
86
+ contentBoxSize: D(y, C, s),
87
+ contentRect: new oe(f, o, y, C)
88
88
  });
89
- return W.set(e, G), G;
89
+ return I.set(e, G), G;
90
90
  }, ue = function(e, t, r) {
91
91
  var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, a = n.devicePixelContentBoxSize;
92
92
  switch (t) {
93
- case N.DEVICE_PIXEL_CONTENT_BOX:
93
+ case k.DEVICE_PIXEL_CONTENT_BOX:
94
94
  return a;
95
- case N.BORDER_BOX:
95
+ case k.BORDER_BOX:
96
96
  return i;
97
97
  default:
98
98
  return s;
99
99
  }
100
- }, ye = /* @__PURE__ */ function() {
100
+ }, Ee = /* @__PURE__ */ function() {
101
101
  function e(t) {
102
102
  var r = ae(t);
103
- this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = E([r.borderBoxSize]), this.contentBoxSize = E([r.contentBoxSize]), this.devicePixelContentBoxSize = E([r.devicePixelContentBoxSize]);
103
+ this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = R([r.borderBoxSize]), this.contentBoxSize = R([r.contentBoxSize]), this.devicePixelContentBoxSize = R([r.devicePixelContentBoxSize]);
104
104
  }
105
105
  return e;
106
106
  }(), ce = function(e) {
@@ -109,16 +109,16 @@ var E = function(e) {
109
109
  for (var t = 0, r = e.parentNode; r; )
110
110
  t += 1, r = r.parentNode;
111
111
  return t;
112
- }, Ee = function() {
112
+ }, Oe = function() {
113
113
  var e = 1 / 0, t = [];
114
- y.forEach(function(a) {
114
+ O.forEach(function(a) {
115
115
  if (a.activeTargets.length !== 0) {
116
- var u = [];
117
- a.activeTargets.forEach(function(l) {
118
- var v = new ye(l.target), f = ce(l.target);
119
- u.push(v), l.lastReportedSize = ue(l.target, l.observedBox), f < e && (e = f);
116
+ var l = [];
117
+ a.activeTargets.forEach(function(u) {
118
+ var v = new Ee(u.target), f = ce(u.target);
119
+ l.push(v), u.lastReportedSize = ue(u.target, u.observedBox), f < e && (e = f);
120
120
  }), t.push(function() {
121
- a.callback.call(a.observer, u, a.observer);
121
+ a.callback.call(a.observer, l, a.observer);
122
122
  }), a.activeTargets.splice(0, a.activeTargets.length);
123
123
  }
124
124
  });
@@ -128,37 +128,37 @@ var E = function(e) {
128
128
  }
129
129
  return e;
130
130
  }, Z = function(e) {
131
- y.forEach(function(r) {
131
+ O.forEach(function(r) {
132
132
  r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
133
133
  i.isActive() && (ce(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
134
134
  });
135
135
  });
136
- }, Oe = function() {
136
+ }, Re = function() {
137
137
  var e = 0;
138
- for (Z(e); pe(); )
139
- e = Ee(), Z(e);
140
- return be() && ge(), e > 0;
141
- }, F, le = [], Re = function() {
138
+ for (Z(e); be(); )
139
+ e = Oe(), Z(e);
140
+ return ge() && me(), e > 0;
141
+ }, F, le = [], Te = function() {
142
142
  return le.splice(0).forEach(function(e) {
143
143
  return e();
144
144
  });
145
- }, Te = function(e) {
145
+ }, Be = function(e) {
146
146
  if (!F) {
147
147
  var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
148
148
  new MutationObserver(function() {
149
- return Re();
149
+ return Te();
150
150
  }).observe(r, n), F = function() {
151
151
  r.textContent = "".concat(t ? t-- : t++);
152
152
  };
153
153
  }
154
154
  le.push(e), F();
155
- }, Be = function(e) {
156
- Te(function() {
155
+ }, Se = function(e) {
156
+ Be(function() {
157
157
  requestAnimationFrame(e);
158
158
  });
159
- }, I = 0, Se = function() {
160
- return !!I;
161
- }, Ce = 250, De = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, ee = [
159
+ }, P = 0, Ce = function() {
160
+ return !!P;
161
+ }, De = 250, Ne = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, ee = [
162
162
  "resize",
163
163
  "load",
164
164
  "transitionend",
@@ -175,7 +175,7 @@ var E = function(e) {
175
175
  "focus"
176
176
  ], te = function(e) {
177
177
  return e === void 0 && (e = 0), Date.now() + e;
178
- }, H = !1, Ne = function() {
178
+ }, H = !1, Le = function() {
179
179
  function e() {
180
180
  var t = this;
181
181
  this.stopped = !0, this.listener = function() {
@@ -184,15 +184,15 @@ var E = function(e) {
184
184
  }
185
185
  return e.prototype.run = function(t) {
186
186
  var r = this;
187
- if (t === void 0 && (t = Ce), !H) {
187
+ if (t === void 0 && (t = De), !H) {
188
188
  H = !0;
189
189
  var n = te(t);
190
- Be(function() {
190
+ Se(function() {
191
191
  var i = !1;
192
192
  try {
193
- i = Oe();
193
+ i = Re();
194
194
  } finally {
195
- if (H = !1, t = n - te(), !Se())
195
+ if (H = !1, t = n - te(), !Ce())
196
196
  return;
197
197
  i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
198
198
  }
@@ -202,27 +202,27 @@ var E = function(e) {
202
202
  this.stop(), this.run();
203
203
  }, e.prototype.observe = function() {
204
204
  var t = this, r = function() {
205
- return t.observer && t.observer.observe(document.body, De);
205
+ return t.observer && t.observer.observe(document.body, Ne);
206
206
  };
207
- document.body ? r() : D.addEventListener("DOMContentLoaded", r);
207
+ document.body ? r() : L.addEventListener("DOMContentLoaded", r);
208
208
  }, e.prototype.start = function() {
209
209
  var t = this;
210
210
  this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), ee.forEach(function(r) {
211
- return D.addEventListener(r, t.listener, !0);
211
+ return L.addEventListener(r, t.listener, !0);
212
212
  }));
213
213
  }, e.prototype.stop = function() {
214
214
  var t = this;
215
215
  this.stopped || (this.observer && this.observer.disconnect(), ee.forEach(function(r) {
216
- return D.removeEventListener(r, t.listener, !0);
216
+ return L.removeEventListener(r, t.listener, !0);
217
217
  }), this.stopped = !0);
218
218
  }, e;
219
- }(), X = new Ne(), re = function(e) {
220
- !I && e > 0 && X.start(), I += e, !I && X.stop();
219
+ }(), X = new Le(), re = function(e) {
220
+ !P && e > 0 && X.start(), P += e, !P && X.stop();
221
221
  }, ke = function(e) {
222
- return !$(e) && !we(e) && getComputedStyle(e).display === "inline";
223
- }, Le = function() {
222
+ return !$(e) && !ze(e) && getComputedStyle(e).display === "inline";
223
+ }, We = function() {
224
224
  function e(t, r) {
225
- this.target = t, this.observedBox = r || N.CONTENT_BOX, this.lastReportedSize = {
225
+ this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
226
226
  inlineSize: 0,
227
227
  blockSize: 0
228
228
  };
@@ -231,82 +231,82 @@ var E = function(e) {
231
231
  var t = ue(this.target, this.observedBox, !0);
232
232
  return ke(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
233
233
  }, e;
234
- }(), We = /* @__PURE__ */ function() {
234
+ }(), Ie = /* @__PURE__ */ function() {
235
235
  function e(t, r) {
236
236
  this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
237
237
  }
238
238
  return e;
239
- }(), A = /* @__PURE__ */ new WeakMap(), ne = function(e, t) {
239
+ }(), M = /* @__PURE__ */ new WeakMap(), ne = function(e, t) {
240
240
  for (var r = 0; r < e.length; r += 1)
241
241
  if (e[r].target === t)
242
242
  return r;
243
243
  return -1;
244
- }, M = function() {
244
+ }, A = function() {
245
245
  function e() {
246
246
  }
247
247
  return e.connect = function(t, r) {
248
- var n = new We(t, r);
249
- A.set(t, n);
248
+ var n = new Ie(t, r);
249
+ M.set(t, n);
250
250
  }, e.observe = function(t, r, n) {
251
- var i = A.get(t), s = i.observationTargets.length === 0;
252
- ne(i.observationTargets, r) < 0 && (s && y.push(i), i.observationTargets.push(new Le(r, n && n.box)), re(1), X.schedule());
251
+ var i = M.get(t), s = i.observationTargets.length === 0;
252
+ ne(i.observationTargets, r) < 0 && (s && O.push(i), i.observationTargets.push(new We(r, n && n.box)), re(1), X.schedule());
253
253
  }, e.unobserve = function(t, r) {
254
- var n = A.get(t), i = ne(n.observationTargets, r), s = n.observationTargets.length === 1;
255
- i >= 0 && (s && y.splice(y.indexOf(n), 1), n.observationTargets.splice(i, 1), re(-1));
254
+ var n = M.get(t), i = ne(n.observationTargets, r), s = n.observationTargets.length === 1;
255
+ i >= 0 && (s && O.splice(O.indexOf(n), 1), n.observationTargets.splice(i, 1), re(-1));
256
256
  }, e.disconnect = function(t) {
257
- var r = this, n = A.get(t);
257
+ var r = this, n = M.get(t);
258
258
  n.observationTargets.slice().forEach(function(i) {
259
259
  return r.unobserve(t, i.target);
260
260
  }), n.activeTargets.splice(0, n.activeTargets.length);
261
261
  }, e;
262
- }(), Ae = function() {
262
+ }(), Me = function() {
263
263
  function e(t) {
264
264
  if (arguments.length === 0)
265
265
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
266
266
  if (typeof t != "function")
267
267
  throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
268
- M.connect(this, t);
268
+ A.connect(this, t);
269
269
  }
270
270
  return e.prototype.observe = function(t, r) {
271
271
  if (arguments.length === 0)
272
272
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
273
273
  if (!j(t))
274
274
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
275
- M.observe(this, t, r);
275
+ A.observe(this, t, r);
276
276
  }, e.prototype.unobserve = function(t) {
277
277
  if (arguments.length === 0)
278
278
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
279
279
  if (!j(t))
280
280
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
281
- M.unobserve(this, t);
281
+ A.unobserve(this, t);
282
282
  }, e.prototype.disconnect = function() {
283
- M.disconnect(this);
283
+ A.disconnect(this);
284
284
  }, e.toString = function() {
285
285
  return "function ResizeObserver () { [polyfill code] }";
286
286
  }, e;
287
287
  }();
288
288
  function q(e, t, r) {
289
- var n, i, s, a, u;
289
+ var n, i, s, a, l;
290
290
  t == null && (t = 100);
291
291
  function o() {
292
292
  var v = Date.now() - a;
293
- v < t && v >= 0 ? n = setTimeout(o, t - v) : (n = null, r || (u = e.apply(s, i), s = i = null));
293
+ v < t && v >= 0 ? n = setTimeout(o, t - v) : (n = null, r || (l = e.apply(s, i), s = i = null));
294
294
  }
295
- var l = function() {
295
+ var u = function() {
296
296
  s = this, i = arguments, a = Date.now();
297
297
  var v = r && !n;
298
- return n || (n = setTimeout(o, t)), v && (u = e.apply(s, i), s = i = null), u;
298
+ return n || (n = setTimeout(o, t)), v && (l = e.apply(s, i), s = i = null), l;
299
299
  };
300
- return l.clear = function() {
300
+ return u.clear = function() {
301
301
  n && (clearTimeout(n), n = null);
302
- }, l.flush = function() {
303
- n && (u = e.apply(s, i), s = i = null, clearTimeout(n), n = null);
304
- }, l;
302
+ }, u.flush = function() {
303
+ n && (l = e.apply(s, i), s = i = null, clearTimeout(n), n = null);
304
+ }, u;
305
305
  }
306
306
  q.debounce = q;
307
- var Me = q;
308
- const ie = /* @__PURE__ */ de(Me);
309
- function Ie(e) {
307
+ var Ae = q;
308
+ const ie = /* @__PURE__ */ pe(Ae);
309
+ function Pe(e) {
310
310
  let {
311
311
  debounce: t,
312
312
  scroll: r,
@@ -321,7 +321,7 @@ function Ie(e) {
321
321
  } : window.ResizeObserver);
322
322
  if (!s)
323
323
  throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");
324
- const [a, u] = V({
324
+ const [a, l] = V({
325
325
  left: 0,
326
326
  top: 0,
327
327
  width: 0,
@@ -335,59 +335,59 @@ function Ie(e) {
335
335
  scrollContainers: null,
336
336
  resizeObserver: null,
337
337
  lastBounds: a
338
- }), l = t ? typeof t == "number" ? t : t.scroll : null, v = t ? typeof t == "number" ? t : t.resize : null, f = U(!1);
339
- C(() => (f.current = !0, () => void (f.current = !1)));
340
- const [O, d, b] = he(() => {
338
+ }), u = t ? typeof t == "number" ? t : t.scroll : null, v = t ? typeof t == "number" ? t : t.resize : null, f = U(!1);
339
+ N(() => (f.current = !0, () => void (f.current = !1)));
340
+ const [T, m, h] = de(() => {
341
341
  const c = () => {
342
342
  if (!o.current.element)
343
343
  return;
344
344
  const {
345
- left: m,
346
- top: g,
347
- width: z,
348
- height: k,
349
- bottom: P,
350
- right: T,
351
- x: B,
345
+ left: z,
346
+ top: B,
347
+ width: x,
348
+ height: g,
349
+ bottom: S,
350
+ right: y,
351
+ x: C,
352
352
  y: _
353
- } = o.current.element.getBoundingClientRect(), x = {
354
- left: m,
355
- top: g,
356
- width: z,
357
- height: k,
358
- bottom: P,
359
- right: T,
360
- x: B,
353
+ } = o.current.element.getBoundingClientRect(), E = {
354
+ left: z,
355
+ top: B,
356
+ width: x,
357
+ height: g,
358
+ bottom: S,
359
+ right: y,
360
+ x: C,
361
361
  y: _
362
362
  };
363
- o.current.element instanceof HTMLElement && i && (x.height = o.current.element.offsetHeight, x.width = o.current.element.offsetWidth), Object.freeze(x), f.current && !He(o.current.lastBounds, x) && u(o.current.lastBounds = x);
363
+ o.current.element instanceof HTMLElement && i && (E.height = o.current.element.offsetHeight, E.width = o.current.element.offsetWidth), Object.freeze(E), f.current && !Ve(o.current.lastBounds, E) && l(o.current.lastBounds = E);
364
364
  };
365
- return [c, v ? ie(c, v) : c, l ? ie(c, l) : c];
366
- }, [u, i, l, v]);
367
- function h() {
368
- o.current.scrollContainers && (o.current.scrollContainers.forEach((c) => c.removeEventListener("scroll", b, !0)), o.current.scrollContainers = null), o.current.resizeObserver && (o.current.resizeObserver.disconnect(), o.current.resizeObserver = null);
365
+ return [c, v ? ie(c, v) : c, u ? ie(c, u) : c];
366
+ }, [l, i, u, v]);
367
+ function d() {
368
+ o.current.scrollContainers && (o.current.scrollContainers.forEach((c) => c.removeEventListener("scroll", h, !0)), o.current.scrollContainers = null), o.current.resizeObserver && (o.current.resizeObserver.disconnect(), o.current.resizeObserver = null);
369
369
  }
370
370
  function w() {
371
- o.current.element && (o.current.resizeObserver = new s(b), o.current.resizeObserver.observe(o.current.element), r && o.current.scrollContainers && o.current.scrollContainers.forEach((c) => c.addEventListener("scroll", b, {
371
+ o.current.element && (o.current.resizeObserver = new s(h), o.current.resizeObserver.observe(o.current.element), r && o.current.scrollContainers && o.current.scrollContainers.forEach((c) => c.addEventListener("scroll", h, {
372
372
  capture: !0,
373
373
  passive: !0
374
374
  })));
375
375
  }
376
- const R = (c) => {
377
- !c || c === o.current.element || (h(), o.current.element = c, o.current.scrollContainers = ve(c), w());
376
+ const p = (c) => {
377
+ !c || c === o.current.element || (d(), o.current.element = c, o.current.scrollContainers = ve(c), w());
378
378
  };
379
- return _e(b, !!r), Pe(d), C(() => {
380
- h(), w();
381
- }, [r, b, d]), C(() => h, []), [R, a, O];
379
+ return Fe(h, !!r), _e(m), N(() => {
380
+ d(), w();
381
+ }, [r, h, m]), N(() => d, []), [p, a, T];
382
382
  }
383
- function Pe(e) {
384
- C(() => {
383
+ function _e(e) {
384
+ N(() => {
385
385
  const t = e;
386
386
  return window.addEventListener("resize", t), () => void window.removeEventListener("resize", t);
387
387
  }, [e]);
388
388
  }
389
- function _e(e, t) {
390
- C(() => {
389
+ function Fe(e, t) {
390
+ N(() => {
391
391
  if (t) {
392
392
  const r = e;
393
393
  return window.addEventListener("scroll", r, {
@@ -408,100 +408,98 @@ function ve(e) {
408
408
  } = window.getComputedStyle(e);
409
409
  return [r, n, i].some((s) => s === "auto" || s === "scroll") && t.push(e), [...t, ...ve(e.parentElement)];
410
410
  }
411
- const Fe = ["x", "y", "top", "bottom", "left", "right", "width", "height"], He = (e, t) => Fe.every((r) => e[r] === t[r]);
412
- let Ve = 0;
413
- const Ue = ({
414
- ariaLabel: e,
415
- className: t,
416
- dataTestId: r = "range",
417
- id: n = `field-range-${++Ve}`,
418
- name: i = n,
419
- singleCursorMode: s = !1,
420
- min: a = 0,
421
- options: u = [],
422
- step: o = 1,
423
- readOnly: l,
424
- disabled: v,
425
- onChange: f,
426
- ...O
427
- }) => {
428
- const [d, b] = V(u.length - 1), [h, w] = V(a), [R, { width: c }] = Ie({ polyfill: Ae }), m = (g) => {
429
- if (!l) {
411
+ const He = ["x", "y", "top", "bottom", "left", "right", "width", "height"], Ve = (e, t) => He.every((r) => e[r] === t[r]), Ue = (e) => {
412
+ const t = he(), {
413
+ ariaLabel: r,
414
+ className: n,
415
+ dataTestId: i = "range",
416
+ id: s = t,
417
+ name: a = s,
418
+ singleCursorMode: l = !1,
419
+ min: o = 0,
420
+ options: u = [],
421
+ step: v = 1,
422
+ readOnly: f,
423
+ disabled: T,
424
+ onChange: m,
425
+ ...h
426
+ } = e, [d, w] = V(u.length - 1), [p, c] = V(o), [z, { width: B }] = Pe({ polyfill: Me }), x = (g) => {
427
+ if (!f) {
430
428
  g.persist();
431
- const z = Number(g.target.value);
432
- g.target.id[g.target.id.length - 1] === "a" ? b(z) : w(z), f && f(i, [d, h]);
429
+ const S = Number(g.target.value);
430
+ g.target.id[g.target.id.length - 1] === "a" ? w(S) : c(S), m && m(a, [d, p]);
433
431
  }
434
432
  };
435
433
  return /* @__PURE__ */ J(
436
434
  "div",
437
435
  {
438
436
  style: {
439
- "--min": a,
437
+ "--min": o,
440
438
  "--max": u.length - 1,
441
- "--inputWidth": `${c}px`,
439
+ "--inputWidth": `${B}px`,
442
440
  "--inputHeight": "4px",
443
441
  "--thumbWidth": "32px",
444
442
  "--usefulWidth": "calc(var(--inputWidth) - var(--thumbWidth))",
445
443
  "--valueA": d,
446
- "--valueB": h
444
+ "--valueB": p
447
445
  },
448
- className: fe("relative w-full", t),
449
- "data-testid": r,
446
+ className: fe("relative w-full", n),
447
+ "data-testid": i,
450
448
  "data-name": "Range",
451
- ref: R,
449
+ ref: z,
452
450
  children: [
453
451
  /* @__PURE__ */ J("div", { className: "input-range-container", children: [
454
- /* @__PURE__ */ L(
452
+ /* @__PURE__ */ W(
455
453
  "input",
456
454
  {
457
- ...O,
458
- "aria-label": e,
455
+ ...h,
456
+ "aria-label": r,
459
457
  className: "input-range",
460
- id: `${n}-a`,
458
+ id: `${s}-a`,
461
459
  max: u.length - 1,
462
- min: a,
463
- name: i,
464
- onChange: m,
465
- disabled: v,
466
- step: o,
460
+ min: o,
461
+ name: a,
462
+ onChange: x,
463
+ disabled: T,
464
+ step: v,
467
465
  type: "range",
468
466
  value: d
469
467
  }
470
468
  ),
471
- !s && /* @__PURE__ */ L(
469
+ !l && /* @__PURE__ */ W(
472
470
  "input",
473
471
  {
474
- ...O,
475
- "aria-label": e,
472
+ ...h,
473
+ "aria-label": r,
476
474
  className: "input-range",
477
- disabled: v,
478
- id: `${n}-b`,
475
+ disabled: T,
476
+ id: `${s}-b`,
479
477
  max: u.length - 1,
480
- min: a,
481
- name: i,
482
- onChange: m,
483
- step: o,
478
+ min: o,
479
+ name: a,
480
+ onChange: x,
481
+ step: v,
484
482
  type: "range",
485
- value: h
483
+ value: p
486
484
  }
487
485
  )
488
486
  ] }),
489
- /* @__PURE__ */ L(
487
+ /* @__PURE__ */ W(
490
488
  "output",
491
489
  {
492
- htmlFor: `${n}-a`,
490
+ htmlFor: `${s}-a`,
493
491
  style: { "--value": d },
494
492
  className: "input-range-output",
495
493
  children: u[d].label
496
494
  }
497
495
  ),
498
- !s && /* @__PURE__ */ L(
496
+ !l && /* @__PURE__ */ W(
499
497
  "output",
500
498
  {
501
- htmlFor: `${n}-b`,
502
- style: { "--value": h },
499
+ htmlFor: `${s}-b`,
500
+ style: { "--value": p },
503
501
  className: "input-range-output",
504
- children: u[h].label
502
+ children: u[p].label
505
503
  }
506
504
  )
507
505
  ]
@@ -2,4 +2,4 @@ import { FormControlProps } from './FormControl.js';
2
2
  export interface SwitchProps extends FormControlProps<boolean> {
3
3
  width?: number;
4
4
  }
5
- export declare function Switch({ id, name, className, checked: initialChecked, disabled, width, onChange, tabIndex, children, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Switch(props: SwitchProps): import("react/jsx-runtime").JSX.Element;