@clubmed/trident-ui 1.0.0-alpha.51 → 1.0.0-beta.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +310 -0
- package/atoms/Icons/Iconics.d.ts +1 -1
- package/atoms/Icons/fonts/Utilities.js +0 -6
- package/atoms/Icons/svg/Utilities.js +0 -8
- package/atoms/Icons/svg-use/Utilities.js +58 -68
- package/fonts/Actions/tui-actions.css +6 -6
- package/fonts/Actions/tui-actions.eot +0 -0
- package/fonts/Actions/tui-actions.less +6 -6
- package/fonts/Actions/tui-actions.module.less +6 -6
- package/fonts/Actions/tui-actions.scss +6 -6
- package/fonts/Actions/tui-actions.styl +6 -6
- package/fonts/Actions/tui-actions.ttf +0 -0
- package/fonts/Actions/tui-actions.woff +0 -0
- package/fonts/Actions/tui-actions.woff2 +0 -0
- package/fonts/Activities/tui-activities.css +6 -6
- package/fonts/Activities/tui-activities.eot +0 -0
- package/fonts/Activities/tui-activities.less +6 -6
- package/fonts/Activities/tui-activities.module.less +6 -6
- package/fonts/Activities/tui-activities.scss +6 -6
- package/fonts/Activities/tui-activities.styl +6 -6
- package/fonts/Activities/tui-activities.ttf +0 -0
- package/fonts/Activities/tui-activities.woff +0 -0
- package/fonts/Activities/tui-activities.woff2 +0 -0
- package/fonts/Brand/tui-brand.css +6 -6
- package/fonts/Brand/tui-brand.eot +0 -0
- package/fonts/Brand/tui-brand.less +6 -6
- package/fonts/Brand/tui-brand.module.less +6 -6
- package/fonts/Brand/tui-brand.scss +6 -6
- package/fonts/Brand/tui-brand.styl +6 -6
- package/fonts/Brand/tui-brand.ttf +0 -0
- package/fonts/Brand/tui-brand.woff +0 -0
- package/fonts/Brand/tui-brand.woff2 +0 -0
- package/fonts/Covid/tui-covid.css +6 -6
- package/fonts/Covid/tui-covid.eot +0 -0
- package/fonts/Covid/tui-covid.less +6 -6
- package/fonts/Covid/tui-covid.module.less +6 -6
- package/fonts/Covid/tui-covid.scss +6 -6
- package/fonts/Covid/tui-covid.styl +6 -6
- package/fonts/Covid/tui-covid.ttf +0 -0
- package/fonts/Covid/tui-covid.woff +0 -0
- package/fonts/Covid/tui-covid.woff2 +0 -0
- package/fonts/Food/tui-food.css +6 -6
- package/fonts/Food/tui-food.eot +0 -0
- package/fonts/Food/tui-food.less +6 -6
- package/fonts/Food/tui-food.module.less +6 -6
- package/fonts/Food/tui-food.scss +6 -6
- package/fonts/Food/tui-food.styl +6 -6
- package/fonts/Food/tui-food.ttf +0 -0
- package/fonts/Food/tui-food.woff +0 -0
- package/fonts/Food/tui-food.woff2 +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.css +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.eot +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.less +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.module.less +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.scss +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.styl +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.ttf +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.woff +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.woff2 +0 -0
- package/fonts/Places/tui-places.css +6 -6
- package/fonts/Places/tui-places.eot +0 -0
- package/fonts/Places/tui-places.less +6 -6
- package/fonts/Places/tui-places.module.less +6 -6
- package/fonts/Places/tui-places.scss +6 -6
- package/fonts/Places/tui-places.styl +6 -6
- package/fonts/Places/tui-places.ttf +0 -0
- package/fonts/Places/tui-places.woff +0 -0
- package/fonts/Places/tui-places.woff2 +0 -0
- package/fonts/Room/tui-room.css +6 -6
- package/fonts/Room/tui-room.eot +0 -0
- package/fonts/Room/tui-room.less +6 -6
- package/fonts/Room/tui-room.module.less +6 -6
- package/fonts/Room/tui-room.scss +6 -6
- package/fonts/Room/tui-room.styl +6 -6
- package/fonts/Room/tui-room.ttf +0 -0
- package/fonts/Room/tui-room.woff +0 -0
- package/fonts/Room/tui-room.woff2 +0 -0
- package/fonts/Services/tui-services.css +6 -6
- package/fonts/Services/tui-services.eot +0 -0
- package/fonts/Services/tui-services.less +6 -6
- package/fonts/Services/tui-services.module.less +6 -6
- package/fonts/Services/tui-services.scss +6 -6
- package/fonts/Services/tui-services.styl +6 -6
- package/fonts/Services/tui-services.ttf +0 -0
- package/fonts/Services/tui-services.woff +0 -0
- package/fonts/Services/tui-services.woff2 +0 -0
- package/fonts/Socials/tui-socials.css +6 -6
- package/fonts/Socials/tui-socials.eot +0 -0
- package/fonts/Socials/tui-socials.less +6 -6
- package/fonts/Socials/tui-socials.module.less +6 -6
- package/fonts/Socials/tui-socials.scss +6 -6
- package/fonts/Socials/tui-socials.styl +6 -6
- package/fonts/Socials/tui-socials.ttf +0 -0
- package/fonts/Socials/tui-socials.woff +0 -0
- package/fonts/Socials/tui-socials.woff2 +0 -0
- package/fonts/Transports/tui-transports.css +6 -6
- package/fonts/Transports/tui-transports.eot +0 -0
- package/fonts/Transports/tui-transports.less +6 -6
- package/fonts/Transports/tui-transports.module.less +6 -6
- package/fonts/Transports/tui-transports.scss +6 -6
- package/fonts/Transports/tui-transports.styl +6 -6
- package/fonts/Transports/tui-transports.ttf +0 -0
- package/fonts/Transports/tui-transports.woff +0 -0
- package/fonts/Transports/tui-transports.woff2 +0 -0
- package/fonts/Utilities/tui-utilities.css +36 -38
- package/fonts/Utilities/tui-utilities.eot +0 -0
- package/fonts/Utilities/tui-utilities.less +36 -38
- package/fonts/Utilities/tui-utilities.module.less +36 -38
- package/fonts/Utilities/tui-utilities.scss +66 -70
- package/fonts/Utilities/tui-utilities.styl +36 -38
- package/fonts/Utilities/tui-utilities.svg +30 -36
- package/fonts/Utilities/tui-utilities.symbol.svg +0 -4
- package/fonts/Utilities/tui-utilities.ttf +0 -0
- package/fonts/Utilities/tui-utilities.woff +0 -0
- package/fonts/Utilities/tui-utilities.woff2 +0 -0
- package/molecules/Backdrop.js +13 -12
- package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +36 -36
- package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js +30 -31
- package/molecules/Forms/DateField.d.ts +1 -17
- package/molecules/Forms/DateField.js +99 -97
- package/molecules/Forms/Filter.d.ts +1 -1
- package/molecules/Forms/Filter.js +38 -38
- package/molecules/Forms/FormControl.d.ts +3 -2
- package/molecules/Forms/FormControl.js +22 -21
- package/molecules/Forms/FormLabel.d.ts +4 -17
- package/molecules/Forms/FormLabel.js +24 -19
- package/molecules/Forms/NumberField.d.ts +4 -4
- package/molecules/Forms/NumberField.js +75 -72
- package/molecules/Forms/Password/Password.d.ts +1 -0
- package/molecules/Forms/Password/Password.js +77 -52
- package/molecules/Forms/Password/ValidationMessage.js +1 -1
- package/molecules/Forms/Radios/Radio.d.ts +1 -1
- package/molecules/Forms/Radios/Radio.js +31 -31
- package/molecules/Forms/Radios/RadioGroup.d.ts +1 -1
- package/molecules/Forms/Radios/RadioGroup.js +28 -29
- package/molecules/Forms/Range.d.ts +2 -2
- package/molecules/Forms/Range.js +181 -183
- package/molecules/Forms/Select.d.ts +10 -0
- package/molecules/Forms/Select.js +102 -0
- package/molecules/Forms/Switch.d.ts +1 -1
- package/molecules/Forms/Switch.js +28 -28
- package/molecules/Forms/TextField.d.ts +0 -4
- package/molecules/Forms/TextField.js +52 -52
- package/package.json +1 -1
- package/styles/globals.css +4 -0
- package/EyeClosed-vWGtzMgE.js +0 -5
- package/EyeOpened-CsQwqVMl.js +0 -5
- package/assets/icons/Utilities/EyeClosed.svg +0 -12
- package/assets/icons/Utilities/EyeOpened.svg +0 -11
package/molecules/Forms/Range.js
CHANGED
@@ -1,38 +1,38 @@
|
|
1
|
-
import { jsxs as J, jsx as
|
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
|
4
|
-
import { g as
|
5
|
-
var
|
6
|
-
return
|
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
|
-
},
|
10
|
-
return
|
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.",
|
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
|
-
},
|
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
|
-
})(
|
22
|
-
var
|
21
|
+
})(k || (k = {}));
|
22
|
+
var R = function(e) {
|
23
23
|
return Object.freeze(e);
|
24
|
-
},
|
24
|
+
}, we = /* @__PURE__ */ function() {
|
25
25
|
function e(t, r) {
|
26
|
-
this.inlineSize = t, this.blockSize = r,
|
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,
|
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,
|
35
|
-
return { x: r, y: n, top: i, right: s, bottom: a, left:
|
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
|
-
},
|
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
|
-
},
|
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
|
-
},
|
72
|
-
return e === void 0 && (e = 0), t === void 0 && (t = 0), r === void 0 && (r = !1), new
|
73
|
-
}, Q =
|
74
|
-
devicePixelContentBoxSize:
|
75
|
-
borderBoxSize:
|
76
|
-
contentBoxSize:
|
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),
|
80
|
-
return
|
79
|
+
if (t === void 0 && (t = !1), I.has(e) && !t)
|
80
|
+
return I.get(e);
|
81
81
|
if (se(e))
|
82
|
-
return
|
83
|
-
var r = getComputedStyle(e), n = $(e) && e.ownerSVGElement && e.getBBox(), i = !
|
84
|
-
devicePixelContentBoxSize:
|
85
|
-
borderBoxSize:
|
86
|
-
contentBoxSize:
|
87
|
-
contentRect: new oe(f, o,
|
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
|
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
|
93
|
+
case k.DEVICE_PIXEL_CONTENT_BOX:
|
94
94
|
return a;
|
95
|
-
case
|
95
|
+
case k.BORDER_BOX:
|
96
96
|
return i;
|
97
97
|
default:
|
98
98
|
return s;
|
99
99
|
}
|
100
|
-
},
|
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 =
|
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
|
-
},
|
112
|
+
}, Oe = function() {
|
113
113
|
var e = 1 / 0, t = [];
|
114
|
-
|
114
|
+
O.forEach(function(a) {
|
115
115
|
if (a.activeTargets.length !== 0) {
|
116
|
-
var
|
117
|
-
a.activeTargets.forEach(function(
|
118
|
-
var v = new
|
119
|
-
|
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,
|
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
|
-
|
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
|
-
},
|
136
|
+
}, Re = function() {
|
137
137
|
var e = 0;
|
138
|
-
for (Z(e);
|
139
|
-
e =
|
140
|
-
return
|
141
|
-
}, F, le = [],
|
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
|
-
},
|
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
|
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
|
-
},
|
156
|
-
|
155
|
+
}, Se = function(e) {
|
156
|
+
Be(function() {
|
157
157
|
requestAnimationFrame(e);
|
158
158
|
});
|
159
|
-
},
|
160
|
-
return !!
|
161
|
-
},
|
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,
|
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 =
|
187
|
+
if (t === void 0 && (t = De), !H) {
|
188
188
|
H = !0;
|
189
189
|
var n = te(t);
|
190
|
-
|
190
|
+
Se(function() {
|
191
191
|
var i = !1;
|
192
192
|
try {
|
193
|
-
i =
|
193
|
+
i = Re();
|
194
194
|
} finally {
|
195
|
-
if (H = !1, t = n - te(), !
|
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,
|
205
|
+
return t.observer && t.observer.observe(document.body, Ne);
|
206
206
|
};
|
207
|
-
document.body ? 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
|
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
|
216
|
+
return L.removeEventListener(r, t.listener, !0);
|
217
217
|
}), this.stopped = !0);
|
218
218
|
}, e;
|
219
|
-
}(), X = new
|
220
|
-
!
|
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) && !
|
223
|
-
},
|
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 ||
|
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
|
-
}(),
|
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
|
-
}(),
|
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
|
-
},
|
244
|
+
}, A = function() {
|
245
245
|
function e() {
|
246
246
|
}
|
247
247
|
return e.connect = function(t, r) {
|
248
|
-
var n = new
|
249
|
-
|
248
|
+
var n = new Ie(t, r);
|
249
|
+
M.set(t, n);
|
250
250
|
}, e.observe = function(t, r, n) {
|
251
|
-
var i =
|
252
|
-
ne(i.observationTargets, r) < 0 && (s &&
|
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 =
|
255
|
-
i >= 0 && (s &&
|
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 =
|
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
|
-
}(),
|
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
|
-
|
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
|
-
|
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
|
-
|
281
|
+
A.unobserve(this, t);
|
282
282
|
}, e.prototype.disconnect = function() {
|
283
|
-
|
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,
|
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 || (
|
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
|
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 && (
|
298
|
+
return n || (n = setTimeout(o, t)), v && (l = e.apply(s, i), s = i = null), l;
|
299
299
|
};
|
300
|
-
return
|
300
|
+
return u.clear = function() {
|
301
301
|
n && (clearTimeout(n), n = null);
|
302
|
-
},
|
303
|
-
n && (
|
304
|
-
},
|
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
|
308
|
-
const ie = /* @__PURE__ */
|
309
|
-
function
|
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,
|
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
|
-
}),
|
339
|
-
|
340
|
-
const [
|
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:
|
346
|
-
top:
|
347
|
-
width:
|
348
|
-
height:
|
349
|
-
bottom:
|
350
|
-
right:
|
351
|
-
x:
|
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(),
|
354
|
-
left:
|
355
|
-
top:
|
356
|
-
width:
|
357
|
-
height:
|
358
|
-
bottom:
|
359
|
-
right:
|
360
|
-
x:
|
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 && (
|
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,
|
366
|
-
}, [
|
367
|
-
function
|
368
|
-
o.current.scrollContainers && (o.current.scrollContainers.forEach((c) => c.removeEventListener("scroll",
|
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(
|
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
|
377
|
-
!c || c === o.current.element || (
|
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
|
380
|
-
|
381
|
-
}, [r,
|
379
|
+
return Fe(h, !!r), _e(m), N(() => {
|
380
|
+
d(), w();
|
381
|
+
}, [r, h, m]), N(() => d, []), [p, a, T];
|
382
382
|
}
|
383
|
-
function
|
384
|
-
|
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
|
390
|
-
|
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
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
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
|
432
|
-
g.target.id[g.target.id.length - 1] === "a" ?
|
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":
|
437
|
+
"--min": o,
|
440
438
|
"--max": u.length - 1,
|
441
|
-
"--inputWidth": `${
|
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":
|
444
|
+
"--valueB": p
|
447
445
|
},
|
448
|
-
className: fe("relative w-full",
|
449
|
-
"data-testid":
|
446
|
+
className: fe("relative w-full", n),
|
447
|
+
"data-testid": i,
|
450
448
|
"data-name": "Range",
|
451
|
-
ref:
|
449
|
+
ref: z,
|
452
450
|
children: [
|
453
451
|
/* @__PURE__ */ J("div", { className: "input-range-container", children: [
|
454
|
-
/* @__PURE__ */
|
452
|
+
/* @__PURE__ */ W(
|
455
453
|
"input",
|
456
454
|
{
|
457
|
-
...
|
458
|
-
"aria-label":
|
455
|
+
...h,
|
456
|
+
"aria-label": r,
|
459
457
|
className: "input-range",
|
460
|
-
id: `${
|
458
|
+
id: `${s}-a`,
|
461
459
|
max: u.length - 1,
|
462
|
-
min:
|
463
|
-
name:
|
464
|
-
onChange:
|
465
|
-
disabled:
|
466
|
-
step:
|
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
|
-
!
|
469
|
+
!l && /* @__PURE__ */ W(
|
472
470
|
"input",
|
473
471
|
{
|
474
|
-
...
|
475
|
-
"aria-label":
|
472
|
+
...h,
|
473
|
+
"aria-label": r,
|
476
474
|
className: "input-range",
|
477
|
-
disabled:
|
478
|
-
id: `${
|
475
|
+
disabled: T,
|
476
|
+
id: `${s}-b`,
|
479
477
|
max: u.length - 1,
|
480
|
-
min:
|
481
|
-
name:
|
482
|
-
onChange:
|
483
|
-
step:
|
478
|
+
min: o,
|
479
|
+
name: a,
|
480
|
+
onChange: x,
|
481
|
+
step: v,
|
484
482
|
type: "range",
|
485
|
-
value:
|
483
|
+
value: p
|
486
484
|
}
|
487
485
|
)
|
488
486
|
] }),
|
489
|
-
/* @__PURE__ */
|
487
|
+
/* @__PURE__ */ W(
|
490
488
|
"output",
|
491
489
|
{
|
492
|
-
htmlFor: `${
|
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
|
-
!
|
496
|
+
!l && /* @__PURE__ */ W(
|
499
497
|
"output",
|
500
498
|
{
|
501
|
-
htmlFor: `${
|
502
|
-
style: { "--value":
|
499
|
+
htmlFor: `${s}-b`,
|
500
|
+
style: { "--value": p },
|
503
501
|
className: "input-range-output",
|
504
|
-
children: u[
|
502
|
+
children: u[p].label
|
505
503
|
}
|
506
504
|
)
|
507
505
|
]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FormControlProps } from './FormControl.js';
|
2
|
+
import { IconicTypes } from '../../atoms/Icons';
|
3
|
+
import { SelectHTMLAttributes } from 'react';
|
4
|
+
export interface SelectProps<Value> extends FormControlProps<Value, SelectHTMLAttributes<HTMLSelectElement>> {
|
5
|
+
description?: string;
|
6
|
+
iconType?: IconicTypes;
|
7
|
+
errorMessage?: string;
|
8
|
+
dataTestId?: string;
|
9
|
+
}
|
10
|
+
export declare const Select: <Value = string>(props: SelectProps<Value>) => import("react/jsx-runtime").JSX.Element;
|