@clubmed/trident-ui 1.3.0-beta.1 → 1.3.0-beta.11
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/CHANGELOG.md +963 -862
- package/README.md +11 -1
- package/assets/style.css +1 -1
- package/atoms/Clickable/Clickable.d.ts +5 -0
- package/atoms/Clickable/Clickable.js +25 -0
- package/atoms/Clickable/Clickable.js.map +1 -0
- package/atoms/Heading/Heading.d.ts +6 -0
- package/atoms/Heading/Heading.js +14 -0
- package/atoms/Heading/Heading.js.map +1 -0
- package/atoms/Heading/HeadingGroup.d.ts +7 -0
- package/atoms/Heading/HeadingGroup.js +15 -0
- package/atoms/Heading/HeadingGroup.js.map +1 -0
- package/atoms/Image/Image.d.ts +7 -0
- package/atoms/Image/Image.js +18 -0
- package/atoms/Image/Image.js.map +1 -0
- package/atoms/Prose/Prose.d.ts +5 -0
- package/atoms/Prose/Prose.js +18 -0
- package/atoms/Prose/Prose.js.map +1 -0
- package/chunks/ResizeObserver.js +287 -0
- package/chunks/ResizeObserver.js.map +1 -0
- package/chunks/_commonjsHelpers.js +24 -4
- package/chunks/_commonjsHelpers.js.map +1 -1
- package/chunks/index.js.map +1 -1
- package/chunks/plugin.js +53 -0
- package/chunks/plugin.js.map +1 -0
- package/contexts/Device.d.ts +2 -22
- package/contexts/Device.js +5 -59
- package/contexts/Device.js.map +1 -1
- package/contexts/Devices/Device.d.ts +11 -0
- package/contexts/Devices/Device.js +23 -0
- package/contexts/Devices/Device.js.map +1 -0
- package/contexts/Devices/hooks/useQueries.d.ts +6 -0
- package/contexts/Devices/hooks/useQueries.js +24 -0
- package/contexts/Devices/hooks/useQueries.js.map +1 -0
- package/contexts/Devices/reducers/reducer.d.ts +25 -0
- package/contexts/Devices/reducers/reducer.js +50 -0
- package/contexts/Devices/reducers/reducer.js.map +1 -0
- package/contexts/TridentUIConfig.js +228 -228
- package/contexts/TridentUIConfig.js.map +1 -1
- package/helpers/colors/colors.d.ts +108 -0
- package/helpers/colors/colors.js +132 -0
- package/helpers/colors/colors.js.map +1 -0
- package/hooks/keyboard.constants.js.map +1 -1
- package/hooks/useInternalStatus.js.map +1 -1
- package/hooks/useKeyboardControls.js.map +1 -1
- package/hooks/useResizeObserver.d.ts +2 -0
- package/hooks/useResizeObserver.js +84 -0
- package/hooks/useResizeObserver.js.map +1 -0
- package/hooks/useSafeBoop.js.map +1 -1
- package/hooks/useValue.js.map +1 -1
- package/molecules/Arrows/Arrows.d.ts +16 -0
- package/molecules/Arrows/Arrows.js +66 -0
- package/molecules/Arrows/Arrows.js.map +1 -0
- package/molecules/Arrows/ArrowsLabels.d.js +2 -0
- package/molecules/Arrows/ArrowsLabels.d.js.map +1 -0
- package/molecules/Arrows.d.ts +1 -50
- package/molecules/Arrows.js +2 -56
- package/molecules/Arrows.js.map +1 -1
- package/molecules/Avatar.js.map +1 -1
- package/molecules/Backdrop.js.map +1 -1
- package/molecules/Breadcrumb.js +8 -9
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Buttons/ArrowButton.d.ts +7 -0
- package/molecules/Buttons/ArrowButton.js +14 -0
- package/molecules/Buttons/ArrowButton.js.map +1 -0
- package/molecules/Buttons/Button.d.ts +15 -32
- package/molecules/Buttons/Button.js +52 -42
- package/molecules/Buttons/Button.js.map +1 -1
- package/molecules/Buttons/ButtonAnchor.d.ts +7 -3
- package/molecules/Buttons/ButtonAnchor.js +17 -36
- package/molecules/Buttons/ButtonAnchor.js.map +1 -1
- package/molecules/Buttons/ButtonContent.d.ts +12 -4
- package/molecules/Buttons/ButtonContent.js +14 -8
- package/molecules/Buttons/ButtonContent.js.map +1 -1
- package/molecules/Buttons/FakeButton.d.ts +8 -0
- package/molecules/Buttons/FakeButton.js +8 -0
- package/molecules/Buttons/FakeButton.js.map +1 -0
- package/molecules/Buttons/InertButton.d.ts +4 -0
- package/molecules/Buttons/InertButton.js +15 -31
- package/molecules/Buttons/InertButton.js.map +1 -1
- package/molecules/Buttons/v2/Button.d.ts +2289 -0
- package/molecules/Buttons/v2/Button.js +57 -0
- package/molecules/Buttons/v2/Button.js.map +1 -0
- package/molecules/Buttons/v2/Button.type.d.ts +57 -0
- package/molecules/Buttons/v2/Button.type.js +45 -0
- package/molecules/Buttons/v2/Button.type.js.map +1 -0
- package/molecules/Card.d.ts +1 -11
- package/molecules/Card.js +2 -35
- package/molecules/Card.js.map +1 -1
- package/molecules/Cards/Card.d.ts +13 -0
- package/molecules/Cards/Card.js +22 -0
- package/molecules/Cards/Card.js.map +1 -0
- package/molecules/Cards/CardAspectRatios.d.ts +6 -0
- package/molecules/Cards/CardAspectRatios.js +10 -0
- package/molecules/Cards/CardAspectRatios.js.map +1 -0
- package/molecules/Cards/CardBackground.d.ts +4 -0
- package/molecules/Cards/CardBackground.js +30 -0
- package/molecules/Cards/CardBackground.js.map +1 -0
- package/molecules/Cards/CardBackgroundContext.d.ts +6 -0
- package/molecules/Cards/CardBackgroundContext.js +10 -0
- package/molecules/Cards/CardBackgroundContext.js.map +1 -0
- package/molecules/Cards/CardClickable.d.ts +6 -0
- package/molecules/Cards/CardClickable.js +37 -0
- package/molecules/Cards/CardClickable.js.map +1 -0
- package/molecules/Cards/ExpandableCard.d.ts +14 -0
- package/molecules/Cards/ExpandableCard.js +80 -0
- package/molecules/Cards/ExpandableCard.js.map +1 -0
- package/molecules/Cards/v2/Card.d.ts +15 -0
- package/molecules/Cards/v2/Card.js +34 -0
- package/molecules/Cards/v2/Card.js.map +1 -0
- package/molecules/Chip.d.ts +9 -0
- package/molecules/Chip.js +31 -0
- package/molecules/Chip.js.map +1 -0
- package/molecules/Chip.themes.d.ts +12 -0
- package/molecules/Chip.themes.js +24 -0
- package/molecules/Chip.themes.js.map +1 -0
- package/molecules/ElasticHeight.d.ts +6 -27
- package/molecules/ElasticHeight.js +28 -33
- package/molecules/ElasticHeight.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +12 -13
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js.map +1 -1
- package/molecules/Forms/DateField.d.ts +1 -1
- package/molecules/Forms/DateField.js +142 -116
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.js +12 -13
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.js +15 -16
- package/molecules/Forms/FormControl.js.map +1 -1
- package/molecules/Forms/FormLabel.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +28 -28
- package/molecules/Forms/NumberField.js +68 -68
- package/molecules/Forms/NumberField.js.map +1 -1
- package/molecules/Forms/Password/Password.js +10 -11
- package/molecules/Forms/Password/Password.js.map +1 -1
- package/molecules/Forms/Password/ValidationMessage.js +8 -9
- package/molecules/Forms/Password/ValidationMessage.js.map +1 -1
- package/molecules/Forms/Radios/Radio.d.ts +3 -0
- package/molecules/Forms/Radios/Radio.js +21 -20
- package/molecules/Forms/Radios/Radio.js.map +1 -1
- package/molecules/Forms/Radios/RadioGroup.js +72 -33
- package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
- package/molecules/Forms/Range.js +124 -406
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.d.ts +1 -1
- package/molecules/Forms/Select.js +3 -4
- package/molecules/Forms/Select.js.map +1 -1
- package/molecules/Forms/Switch.js.map +1 -1
- package/molecules/Forms/TextField.d.ts +1 -1
- package/molecules/Forms/TextField.js +7 -8
- package/molecules/Forms/TextField.js.map +1 -1
- package/molecules/HamburgerIcon.js.map +1 -1
- package/molecules/Link.d.ts +1 -1
- package/molecules/Link.js +8 -9
- package/molecules/Link.js.map +1 -1
- package/molecules/Loader.js.map +1 -1
- package/molecules/Pagination.d.ts +2 -1
- package/molecules/Pagination.helper.js.map +1 -1
- package/molecules/Pagination.js +67 -45
- package/molecules/Pagination.js.map +1 -1
- package/molecules/Popin.js +16 -16
- package/molecules/Popin.js.map +1 -1
- package/molecules/Spinner.js.map +1 -1
- package/molecules/Tabs/Tab.d.ts +1 -1
- package/molecules/Tabs/Tab.js +51 -49
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabList.js.map +1 -1
- package/molecules/Tabs/TabPanel.js +31 -29
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.js +7 -9
- package/molecules/Tabs/Tabs.js.map +1 -1
- package/molecules/Tabs/TabsBody.js.map +1 -1
- package/molecules/Tabs/context/TabControl.d.ts +29 -27
- package/molecules/Tabs/context/TabControl.js +67 -66
- package/molecules/Tabs/context/TabControl.js.map +1 -1
- package/molecules/Tabs/hooks/tabControl.d.ts +25 -14
- package/molecules/Tabs/hooks/tabControl.js +26 -23
- package/molecules/Tabs/hooks/tabControl.js.map +1 -1
- package/molecules/Tabs/theme.js.map +1 -1
- package/molecules/Tag.d.ts +43 -0
- package/molecules/Tag.js +73 -0
- package/molecules/Tag.js.map +1 -0
- package/package.json +34 -10
- package/styles/globals.css +16 -15
- package/tailwind/colors.d.ts +38 -0
- package/tailwind/colors.js +44 -0
- package/tailwind/colors.js.map +1 -0
- package/tailwind/plugins/animationDelay.d.ts +4 -0
- package/tailwind/plugins/animationDelay.js +15 -0
- package/tailwind/plugins/animationDelay.js.map +1 -0
- package/tailwind/plugins/hocus.d.ts +4 -0
- package/tailwind/plugins/hocus.js +11 -0
- package/tailwind/plugins/hocus.js.map +1 -0
- package/tailwind/plugins/lineClampFix.d.ts +4 -0
- package/tailwind/plugins/lineClampFix.js +13 -0
- package/tailwind/plugins/lineClampFix.js.map +1 -0
- package/tailwind/plugins/popover.d.ts +4 -0
- package/tailwind/plugins/popover.js +8 -0
- package/tailwind/plugins/popover.js.map +1 -0
- package/tailwind/plugins/startingStyle.d.ts +4 -0
- package/tailwind/plugins/startingStyle.js +8 -0
- package/tailwind/plugins/startingStyle.js.map +1 -0
- package/tailwind/plugins/transitionBehavior.d.ts +4 -0
- package/tailwind/plugins/transitionBehavior.js +11 -0
- package/tailwind/plugins/transitionBehavior.js.map +1 -0
- package/tailwind/tailwind.preset.d.ts +730 -510
- package/tailwind/tailwind.preset.js +705 -631
- package/tailwind/tailwind.preset.js.map +1 -1
- package/types/Colors.d.js +2 -0
- package/types/Colors.d.js.map +1 -0
- package/types/Devices.d.ts +8 -0
- package/types/Devices.js +11 -0
- package/types/Devices.js.map +1 -0
- package/types/Direction.d.js +2 -0
- package/types/Direction.d.js.map +1 -0
- package/types/LiteralUnion.d.js +2 -0
- package/types/LiteralUnion.d.js.map +1 -0
- package/types/ScrollerLabels.d.js +2 -0
- package/types/ScrollerLabels.d.js.map +1 -0
- package/types/Theme.d.js +2 -0
- package/types/Theme.d.js.map +1 -0
- package/molecules/Buttons/Button.helpers.d.ts +0 -8
- package/molecules/Buttons/Button.helpers.js +0 -12
- package/molecules/Buttons/Button.helpers.js.map +0 -1
- package/molecules/Buttons/Button.themes.d.ts +0 -1
- package/molecules/Buttons/Button.themes.js +0 -25
- package/molecules/Buttons/Button.themes.js.map +0 -1
package/molecules/Forms/Range.js
CHANGED
|
@@ -1,327 +1,45 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
9
|
-
}, ge = function() {
|
|
10
|
-
return O.some(function(e) {
|
|
11
|
-
return e.skippedTargets.length > 0;
|
|
12
|
-
});
|
|
13
|
-
}, Y = "ResizeObserver loop completed with undelivered notifications.", me = function() {
|
|
14
|
-
var e;
|
|
15
|
-
typeof ErrorEvent == "function" ? e = new ErrorEvent("error", {
|
|
16
|
-
message: Y
|
|
17
|
-
}) : (e = document.createEvent("Event"), e.initEvent("error", !1, !1), e.message = Y), window.dispatchEvent(e);
|
|
18
|
-
}, k;
|
|
19
|
-
(function(e) {
|
|
20
|
-
e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
21
|
-
})(k || (k = {}));
|
|
22
|
-
var R = function(e) {
|
|
23
|
-
return Object.freeze(e);
|
|
24
|
-
}, we = /* @__PURE__ */ function() {
|
|
25
|
-
function e(t, r) {
|
|
26
|
-
this.inlineSize = t, this.blockSize = r, R(this);
|
|
27
|
-
}
|
|
28
|
-
return e;
|
|
29
|
-
}(), oe = function() {
|
|
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, R(this);
|
|
32
|
-
}
|
|
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, 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
|
-
}, e.fromRect = function(t) {
|
|
37
|
-
return new e(t.x, t.y, t.width, t.height);
|
|
38
|
-
}, e;
|
|
39
|
-
}(), $ = function(e) {
|
|
40
|
-
return e instanceof SVGElement && "getBBox" in e;
|
|
41
|
-
}, se = function(e) {
|
|
42
|
-
if ($(e)) {
|
|
43
|
-
var t = e.getBBox(), r = t.width, n = t.height;
|
|
44
|
-
return !r && !n;
|
|
45
|
-
}
|
|
46
|
-
var i = e, s = i.offsetWidth, a = i.offsetHeight;
|
|
47
|
-
return !(s || a || e.getClientRects().length);
|
|
48
|
-
}, j = function(e) {
|
|
49
|
-
var t;
|
|
50
|
-
if (e instanceof Element)
|
|
51
|
-
return !0;
|
|
52
|
-
var r = (t = e == null ? void 0 : e.ownerDocument) === null || t === void 0 ? void 0 : t.defaultView;
|
|
53
|
-
return !!(r && e instanceof r.Element);
|
|
54
|
-
}, ze = function(e) {
|
|
55
|
-
switch (e.tagName) {
|
|
56
|
-
case "INPUT":
|
|
57
|
-
if (e.type !== "image")
|
|
58
|
-
break;
|
|
59
|
-
case "VIDEO":
|
|
60
|
-
case "AUDIO":
|
|
61
|
-
case "EMBED":
|
|
62
|
-
case "OBJECT":
|
|
63
|
-
case "CANVAS":
|
|
64
|
-
case "IFRAME":
|
|
65
|
-
case "IMG":
|
|
66
|
-
return !0;
|
|
67
|
-
}
|
|
68
|
-
return !1;
|
|
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
|
-
return parseFloat(e || "0");
|
|
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
|
-
contentRect: new oe(0, 0, 0, 0)
|
|
78
|
-
}), ae = function(e, t) {
|
|
79
|
-
if (t === void 0 && (t = !1), I.has(e) && !t)
|
|
80
|
-
return I.get(e);
|
|
81
|
-
if (se(e))
|
|
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
|
-
});
|
|
89
|
-
return I.set(e, G), G;
|
|
90
|
-
}, ue = function(e, t, r) {
|
|
91
|
-
var n = ae(e, r), i = n.borderBoxSize, s = n.contentBoxSize, a = n.devicePixelContentBoxSize;
|
|
92
|
-
switch (t) {
|
|
93
|
-
case k.DEVICE_PIXEL_CONTENT_BOX:
|
|
94
|
-
return a;
|
|
95
|
-
case k.BORDER_BOX:
|
|
96
|
-
return i;
|
|
97
|
-
default:
|
|
98
|
-
return s;
|
|
99
|
-
}
|
|
100
|
-
}, Ee = /* @__PURE__ */ function() {
|
|
101
|
-
function e(t) {
|
|
102
|
-
var r = ae(t);
|
|
103
|
-
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = R([r.borderBoxSize]), this.contentBoxSize = R([r.contentBoxSize]), this.devicePixelContentBoxSize = R([r.devicePixelContentBoxSize]);
|
|
104
|
-
}
|
|
105
|
-
return e;
|
|
106
|
-
}(), ce = function(e) {
|
|
107
|
-
if (se(e))
|
|
108
|
-
return 1 / 0;
|
|
109
|
-
for (var t = 0, r = e.parentNode; r; )
|
|
110
|
-
t += 1, r = r.parentNode;
|
|
111
|
-
return t;
|
|
112
|
-
}, Oe = function() {
|
|
113
|
-
var e = 1 / 0, t = [];
|
|
114
|
-
O.forEach(function(a) {
|
|
115
|
-
if (a.activeTargets.length !== 0) {
|
|
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
|
-
}), t.push(function() {
|
|
121
|
-
a.callback.call(a.observer, l, a.observer);
|
|
122
|
-
}), a.activeTargets.splice(0, a.activeTargets.length);
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
for (var r = 0, n = t; r < n.length; r++) {
|
|
126
|
-
var i = n[r];
|
|
127
|
-
i();
|
|
128
|
-
}
|
|
129
|
-
return e;
|
|
130
|
-
}, Z = function(e) {
|
|
131
|
-
O.forEach(function(r) {
|
|
132
|
-
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
133
|
-
i.isActive() && (ce(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
}, Re = function() {
|
|
137
|
-
var e = 0;
|
|
138
|
-
for (Z(e); be(); )
|
|
139
|
-
e = Oe(), Z(e);
|
|
140
|
-
return ge() && me(), e > 0;
|
|
141
|
-
}, F, le = [], Te = function() {
|
|
142
|
-
return le.splice(0).forEach(function(e) {
|
|
143
|
-
return e();
|
|
144
|
-
});
|
|
145
|
-
}, Be = function(e) {
|
|
146
|
-
if (!F) {
|
|
147
|
-
var t = 0, r = document.createTextNode(""), n = { characterData: !0 };
|
|
148
|
-
new MutationObserver(function() {
|
|
149
|
-
return Te();
|
|
150
|
-
}).observe(r, n), F = function() {
|
|
151
|
-
r.textContent = "".concat(t ? t-- : t++);
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
le.push(e), F();
|
|
155
|
-
}, Se = function(e) {
|
|
156
|
-
Be(function() {
|
|
157
|
-
requestAnimationFrame(e);
|
|
158
|
-
});
|
|
159
|
-
}, P = 0, Ce = function() {
|
|
160
|
-
return !!P;
|
|
161
|
-
}, De = 250, Ne = { attributes: !0, characterData: !0, childList: !0, subtree: !0 }, ee = [
|
|
162
|
-
"resize",
|
|
163
|
-
"load",
|
|
164
|
-
"transitionend",
|
|
165
|
-
"animationend",
|
|
166
|
-
"animationstart",
|
|
167
|
-
"animationiteration",
|
|
168
|
-
"keyup",
|
|
169
|
-
"keydown",
|
|
170
|
-
"mouseup",
|
|
171
|
-
"mousedown",
|
|
172
|
-
"mouseover",
|
|
173
|
-
"mouseout",
|
|
174
|
-
"blur",
|
|
175
|
-
"focus"
|
|
176
|
-
], te = function(e) {
|
|
177
|
-
return e === void 0 && (e = 0), Date.now() + e;
|
|
178
|
-
}, H = !1, Le = function() {
|
|
179
|
-
function e() {
|
|
180
|
-
var t = this;
|
|
181
|
-
this.stopped = !0, this.listener = function() {
|
|
182
|
-
return t.schedule();
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
return e.prototype.run = function(t) {
|
|
186
|
-
var r = this;
|
|
187
|
-
if (t === void 0 && (t = De), !H) {
|
|
188
|
-
H = !0;
|
|
189
|
-
var n = te(t);
|
|
190
|
-
Se(function() {
|
|
191
|
-
var i = !1;
|
|
192
|
-
try {
|
|
193
|
-
i = Re();
|
|
194
|
-
} finally {
|
|
195
|
-
if (H = !1, t = n - te(), !Ce())
|
|
196
|
-
return;
|
|
197
|
-
i ? r.run(1e3) : t > 0 ? r.run(t) : r.start();
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}, e.prototype.schedule = function() {
|
|
202
|
-
this.stop(), this.run();
|
|
203
|
-
}, e.prototype.observe = function() {
|
|
204
|
-
var t = this, r = function() {
|
|
205
|
-
return t.observer && t.observer.observe(document.body, Ne);
|
|
206
|
-
};
|
|
207
|
-
document.body ? r() : L.addEventListener("DOMContentLoaded", r);
|
|
208
|
-
}, e.prototype.start = function() {
|
|
209
|
-
var t = this;
|
|
210
|
-
this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), ee.forEach(function(r) {
|
|
211
|
-
return L.addEventListener(r, t.listener, !0);
|
|
212
|
-
}));
|
|
213
|
-
}, e.prototype.stop = function() {
|
|
214
|
-
var t = this;
|
|
215
|
-
this.stopped || (this.observer && this.observer.disconnect(), ee.forEach(function(r) {
|
|
216
|
-
return L.removeEventListener(r, t.listener, !0);
|
|
217
|
-
}), this.stopped = !0);
|
|
218
|
-
}, e;
|
|
219
|
-
}(), X = new Le(), re = function(e) {
|
|
220
|
-
!P && e > 0 && X.start(), P += e, !P && X.stop();
|
|
221
|
-
}, ke = function(e) {
|
|
222
|
-
return !$(e) && !ze(e) && getComputedStyle(e).display === "inline";
|
|
223
|
-
}, We = function() {
|
|
224
|
-
function e(t, r) {
|
|
225
|
-
this.target = t, this.observedBox = r || k.CONTENT_BOX, this.lastReportedSize = {
|
|
226
|
-
inlineSize: 0,
|
|
227
|
-
blockSize: 0
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
return e.prototype.isActive = function() {
|
|
231
|
-
var t = ue(this.target, this.observedBox, !0);
|
|
232
|
-
return ke(this.target) && (this.lastReportedSize = t), this.lastReportedSize.inlineSize !== t.inlineSize || this.lastReportedSize.blockSize !== t.blockSize;
|
|
233
|
-
}, e;
|
|
234
|
-
}(), Ie = /* @__PURE__ */ function() {
|
|
235
|
-
function e(t, r) {
|
|
236
|
-
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t, this.callback = r;
|
|
237
|
-
}
|
|
238
|
-
return e;
|
|
239
|
-
}(), M = /* @__PURE__ */ new WeakMap(), ne = function(e, t) {
|
|
240
|
-
for (var r = 0; r < e.length; r += 1)
|
|
241
|
-
if (e[r].target === t)
|
|
242
|
-
return r;
|
|
243
|
-
return -1;
|
|
244
|
-
}, A = function() {
|
|
245
|
-
function e() {
|
|
246
|
-
}
|
|
247
|
-
return e.connect = function(t, r) {
|
|
248
|
-
var n = new Ie(t, r);
|
|
249
|
-
M.set(t, n);
|
|
250
|
-
}, e.observe = function(t, r, n) {
|
|
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
|
-
}, e.unobserve = function(t, r) {
|
|
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
|
-
}, e.disconnect = function(t) {
|
|
257
|
-
var r = this, n = M.get(t);
|
|
258
|
-
n.observationTargets.slice().forEach(function(i) {
|
|
259
|
-
return r.unobserve(t, i.target);
|
|
260
|
-
}), n.activeTargets.splice(0, n.activeTargets.length);
|
|
261
|
-
}, e;
|
|
262
|
-
}(), Me = function() {
|
|
263
|
-
function e(t) {
|
|
264
|
-
if (arguments.length === 0)
|
|
265
|
-
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
266
|
-
if (typeof t != "function")
|
|
267
|
-
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
268
|
-
A.connect(this, t);
|
|
269
|
-
}
|
|
270
|
-
return e.prototype.observe = function(t, r) {
|
|
271
|
-
if (arguments.length === 0)
|
|
272
|
-
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
273
|
-
if (!j(t))
|
|
274
|
-
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
275
|
-
A.observe(this, t, r);
|
|
276
|
-
}, e.prototype.unobserve = function(t) {
|
|
277
|
-
if (arguments.length === 0)
|
|
278
|
-
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
279
|
-
if (!j(t))
|
|
280
|
-
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
281
|
-
A.unobserve(this, t);
|
|
282
|
-
}, e.prototype.disconnect = function() {
|
|
283
|
-
A.disconnect(this);
|
|
284
|
-
}, e.toString = function() {
|
|
285
|
-
return "function ResizeObserver () { [polyfill code] }";
|
|
286
|
-
}, e;
|
|
287
|
-
}();
|
|
288
|
-
function q(e, t, r) {
|
|
289
|
-
var n, i, s, a, l;
|
|
1
|
+
import { jsxs as T, jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import { R as j } from "../../chunks/ResizeObserver.js";
|
|
3
|
+
import { c as M } from "../../chunks/index.js";
|
|
4
|
+
import { useState as L, useRef as W, useEffect as w, useMemo as A, useId as F } from "react";
|
|
5
|
+
import { g as H } from "../../chunks/_commonjsHelpers.js";
|
|
6
|
+
function B(r, t, s) {
|
|
7
|
+
var o, i, n, f, c;
|
|
290
8
|
t == null && (t = 100);
|
|
291
|
-
function
|
|
292
|
-
var
|
|
293
|
-
|
|
9
|
+
function e() {
|
|
10
|
+
var a = Date.now() - f;
|
|
11
|
+
a < t && a >= 0 ? o = setTimeout(e, t - a) : (o = null, s || (c = r.apply(n, i), n = i = null));
|
|
294
12
|
}
|
|
295
13
|
var u = function() {
|
|
296
|
-
|
|
297
|
-
var
|
|
298
|
-
return
|
|
14
|
+
n = this, i = arguments, f = Date.now();
|
|
15
|
+
var a = s && !o;
|
|
16
|
+
return o || (o = setTimeout(e, t)), a && (c = r.apply(n, i), n = i = null), c;
|
|
299
17
|
};
|
|
300
18
|
return u.clear = function() {
|
|
301
|
-
|
|
19
|
+
o && (clearTimeout(o), o = null);
|
|
302
20
|
}, u.flush = function() {
|
|
303
|
-
|
|
21
|
+
o && (c = r.apply(n, i), n = i = null, clearTimeout(o), o = null);
|
|
304
22
|
}, u;
|
|
305
23
|
}
|
|
306
|
-
|
|
307
|
-
var
|
|
308
|
-
const
|
|
309
|
-
function
|
|
24
|
+
B.debounce = B;
|
|
25
|
+
var V = B;
|
|
26
|
+
const D = /* @__PURE__ */ H(V);
|
|
27
|
+
function k(r) {
|
|
310
28
|
let {
|
|
311
29
|
debounce: t,
|
|
312
|
-
scroll:
|
|
313
|
-
polyfill:
|
|
30
|
+
scroll: s,
|
|
31
|
+
polyfill: o,
|
|
314
32
|
offsetSize: i
|
|
315
|
-
} =
|
|
33
|
+
} = r === void 0 ? {
|
|
316
34
|
debounce: 0,
|
|
317
35
|
scroll: !1,
|
|
318
36
|
offsetSize: !1
|
|
319
|
-
} :
|
|
320
|
-
const
|
|
37
|
+
} : r;
|
|
38
|
+
const n = o || (typeof window > "u" ? class {
|
|
321
39
|
} : window.ResizeObserver);
|
|
322
|
-
if (!
|
|
40
|
+
if (!n)
|
|
323
41
|
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 [
|
|
42
|
+
const [f, c] = L({
|
|
325
43
|
left: 0,
|
|
326
44
|
top: 0,
|
|
327
45
|
width: 0,
|
|
@@ -330,171 +48,171 @@ function Pe(e) {
|
|
|
330
48
|
right: 0,
|
|
331
49
|
x: 0,
|
|
332
50
|
y: 0
|
|
333
|
-
}),
|
|
51
|
+
}), e = W({
|
|
334
52
|
element: null,
|
|
335
53
|
scrollContainers: null,
|
|
336
54
|
resizeObserver: null,
|
|
337
|
-
lastBounds:
|
|
338
|
-
}), u = t ? typeof t == "number" ? t : t.scroll : null,
|
|
339
|
-
|
|
340
|
-
const [
|
|
341
|
-
const
|
|
342
|
-
if (!
|
|
55
|
+
lastBounds: f
|
|
56
|
+
}), u = t ? typeof t == "number" ? t : t.scroll : null, a = t ? typeof t == "number" ? t : t.resize : null, v = W(!1);
|
|
57
|
+
w(() => (v.current = !0, () => void (v.current = !1)));
|
|
58
|
+
const [y, b, m] = A(() => {
|
|
59
|
+
const l = () => {
|
|
60
|
+
if (!e.current.element) return;
|
|
343
61
|
const {
|
|
344
|
-
left:
|
|
345
|
-
top:
|
|
346
|
-
width:
|
|
347
|
-
height:
|
|
348
|
-
bottom:
|
|
349
|
-
right:
|
|
350
|
-
x:
|
|
351
|
-
y:
|
|
352
|
-
} =
|
|
353
|
-
left:
|
|
354
|
-
top:
|
|
355
|
-
width:
|
|
356
|
-
height:
|
|
357
|
-
bottom:
|
|
358
|
-
right:
|
|
359
|
-
x:
|
|
360
|
-
y:
|
|
62
|
+
left: E,
|
|
63
|
+
top: R,
|
|
64
|
+
width: C,
|
|
65
|
+
height: h,
|
|
66
|
+
bottom: x,
|
|
67
|
+
right: N,
|
|
68
|
+
x: I,
|
|
69
|
+
y: $
|
|
70
|
+
} = e.current.element.getBoundingClientRect(), g = {
|
|
71
|
+
left: E,
|
|
72
|
+
top: R,
|
|
73
|
+
width: C,
|
|
74
|
+
height: h,
|
|
75
|
+
bottom: x,
|
|
76
|
+
right: N,
|
|
77
|
+
x: I,
|
|
78
|
+
y: $
|
|
361
79
|
};
|
|
362
|
-
|
|
80
|
+
e.current.element instanceof HTMLElement && i && (g.height = e.current.element.offsetHeight, g.width = e.current.element.offsetWidth), Object.freeze(g), v.current && !G(e.current.lastBounds, g) && c(e.current.lastBounds = g);
|
|
363
81
|
};
|
|
364
|
-
return [
|
|
365
|
-
}, [
|
|
82
|
+
return [l, a ? D(l, a) : l, u ? D(l, u) : l];
|
|
83
|
+
}, [c, i, u, a]);
|
|
366
84
|
function d() {
|
|
367
|
-
|
|
85
|
+
e.current.scrollContainers && (e.current.scrollContainers.forEach((l) => l.removeEventListener("scroll", m, !0)), e.current.scrollContainers = null), e.current.resizeObserver && (e.current.resizeObserver.disconnect(), e.current.resizeObserver = null);
|
|
368
86
|
}
|
|
369
|
-
function
|
|
370
|
-
|
|
87
|
+
function z() {
|
|
88
|
+
e.current.element && (e.current.resizeObserver = new n(m), e.current.resizeObserver.observe(e.current.element), s && e.current.scrollContainers && e.current.scrollContainers.forEach((l) => l.addEventListener("scroll", m, {
|
|
371
89
|
capture: !0,
|
|
372
90
|
passive: !0
|
|
373
91
|
})));
|
|
374
92
|
}
|
|
375
|
-
const p = (
|
|
376
|
-
!
|
|
93
|
+
const p = (l) => {
|
|
94
|
+
!l || l === e.current.element || (d(), e.current.element = l, e.current.scrollContainers = S(l), z());
|
|
377
95
|
};
|
|
378
|
-
return
|
|
379
|
-
d(),
|
|
380
|
-
}, [
|
|
96
|
+
return X(m, !!s), q(b), w(() => {
|
|
97
|
+
d(), z();
|
|
98
|
+
}, [s, m, b]), w(() => d, []), [p, f, y];
|
|
381
99
|
}
|
|
382
|
-
function
|
|
383
|
-
|
|
384
|
-
const t =
|
|
100
|
+
function q(r) {
|
|
101
|
+
w(() => {
|
|
102
|
+
const t = r;
|
|
385
103
|
return window.addEventListener("resize", t), () => void window.removeEventListener("resize", t);
|
|
386
|
-
}, [
|
|
104
|
+
}, [r]);
|
|
387
105
|
}
|
|
388
|
-
function
|
|
389
|
-
|
|
106
|
+
function X(r, t) {
|
|
107
|
+
w(() => {
|
|
390
108
|
if (t) {
|
|
391
|
-
const
|
|
392
|
-
return window.addEventListener("scroll",
|
|
109
|
+
const s = r;
|
|
110
|
+
return window.addEventListener("scroll", s, {
|
|
393
111
|
capture: !0,
|
|
394
112
|
passive: !0
|
|
395
|
-
}), () => void window.removeEventListener("scroll",
|
|
113
|
+
}), () => void window.removeEventListener("scroll", s, !0);
|
|
396
114
|
}
|
|
397
|
-
}, [
|
|
115
|
+
}, [r, t]);
|
|
398
116
|
}
|
|
399
|
-
function
|
|
117
|
+
function S(r) {
|
|
400
118
|
const t = [];
|
|
401
|
-
if (!
|
|
119
|
+
if (!r || r === document.body) return t;
|
|
402
120
|
const {
|
|
403
|
-
overflow:
|
|
404
|
-
overflowX:
|
|
121
|
+
overflow: s,
|
|
122
|
+
overflowX: o,
|
|
405
123
|
overflowY: i
|
|
406
|
-
} = window.getComputedStyle(
|
|
407
|
-
return [
|
|
124
|
+
} = window.getComputedStyle(r);
|
|
125
|
+
return [s, o, i].some((n) => n === "auto" || n === "scroll") && t.push(r), [...t, ...S(r.parentElement)];
|
|
408
126
|
}
|
|
409
|
-
const
|
|
410
|
-
const t =
|
|
411
|
-
ariaLabel:
|
|
412
|
-
className:
|
|
127
|
+
const Y = ["x", "y", "top", "bottom", "left", "right", "width", "height"], G = (r, t) => Y.every((s) => r[s] === t[s]), _ = (r) => {
|
|
128
|
+
const t = F(), {
|
|
129
|
+
ariaLabel: s,
|
|
130
|
+
className: o,
|
|
413
131
|
dataTestId: i = "range",
|
|
414
|
-
id:
|
|
415
|
-
name:
|
|
416
|
-
singleCursorMode:
|
|
417
|
-
min:
|
|
132
|
+
id: n = t,
|
|
133
|
+
name: f = n,
|
|
134
|
+
singleCursorMode: c = !1,
|
|
135
|
+
min: e = 0,
|
|
418
136
|
options: u = [],
|
|
419
|
-
step:
|
|
420
|
-
readOnly:
|
|
421
|
-
disabled:
|
|
422
|
-
onChange:
|
|
423
|
-
...
|
|
424
|
-
} =
|
|
425
|
-
if (!
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
|
|
137
|
+
step: a = 1,
|
|
138
|
+
readOnly: v,
|
|
139
|
+
disabled: y,
|
|
140
|
+
onChange: b,
|
|
141
|
+
...m
|
|
142
|
+
} = r, [d, z] = L(u.length - 1), [p, l] = L(e), [E, { width: R }] = k({ polyfill: j }), C = (h) => {
|
|
143
|
+
if (!v) {
|
|
144
|
+
h.persist();
|
|
145
|
+
const x = Number(h.target.value);
|
|
146
|
+
h.target.id[h.target.id.length - 1] === "a" ? z(x) : l(x), b && b(f, [d, p]);
|
|
429
147
|
}
|
|
430
148
|
};
|
|
431
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ T(
|
|
432
150
|
"div",
|
|
433
151
|
{
|
|
434
152
|
style: {
|
|
435
|
-
"--min":
|
|
153
|
+
"--min": e,
|
|
436
154
|
"--max": u.length - 1,
|
|
437
|
-
"--inputWidth": `${
|
|
155
|
+
"--inputWidth": `${R}px`,
|
|
438
156
|
"--inputHeight": "4px",
|
|
439
157
|
"--thumbWidth": "32px",
|
|
440
158
|
"--usefulWidth": "calc(var(--inputWidth) - var(--thumbWidth))",
|
|
441
159
|
"--valueA": d,
|
|
442
160
|
"--valueB": p
|
|
443
161
|
},
|
|
444
|
-
className:
|
|
162
|
+
className: M("relative w-full", o),
|
|
445
163
|
"data-testid": i,
|
|
446
164
|
"data-name": "Range",
|
|
447
|
-
ref:
|
|
165
|
+
ref: E,
|
|
448
166
|
children: [
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ T("div", { className: "input-range-container", children: [
|
|
168
|
+
/* @__PURE__ */ O(
|
|
451
169
|
"input",
|
|
452
170
|
{
|
|
453
|
-
...
|
|
454
|
-
"aria-label":
|
|
171
|
+
...m,
|
|
172
|
+
"aria-label": s,
|
|
455
173
|
className: "input-range",
|
|
456
|
-
id: `${
|
|
174
|
+
id: `${n}-a`,
|
|
457
175
|
max: u.length - 1,
|
|
458
|
-
min:
|
|
459
|
-
name:
|
|
460
|
-
onChange:
|
|
461
|
-
disabled:
|
|
462
|
-
step:
|
|
176
|
+
min: e,
|
|
177
|
+
name: f,
|
|
178
|
+
onChange: C,
|
|
179
|
+
disabled: y,
|
|
180
|
+
step: a,
|
|
463
181
|
type: "range",
|
|
464
182
|
value: d
|
|
465
183
|
}
|
|
466
184
|
),
|
|
467
|
-
!
|
|
185
|
+
!c && /* @__PURE__ */ O(
|
|
468
186
|
"input",
|
|
469
187
|
{
|
|
470
|
-
...
|
|
471
|
-
"aria-label":
|
|
188
|
+
...m,
|
|
189
|
+
"aria-label": s,
|
|
472
190
|
className: "input-range",
|
|
473
|
-
disabled:
|
|
474
|
-
id: `${
|
|
191
|
+
disabled: y,
|
|
192
|
+
id: `${n}-b`,
|
|
475
193
|
max: u.length - 1,
|
|
476
|
-
min:
|
|
477
|
-
name:
|
|
478
|
-
onChange:
|
|
479
|
-
step:
|
|
194
|
+
min: e,
|
|
195
|
+
name: f,
|
|
196
|
+
onChange: C,
|
|
197
|
+
step: a,
|
|
480
198
|
type: "range",
|
|
481
199
|
value: p
|
|
482
200
|
}
|
|
483
201
|
)
|
|
484
202
|
] }),
|
|
485
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ O(
|
|
486
204
|
"output",
|
|
487
205
|
{
|
|
488
|
-
htmlFor: `${
|
|
206
|
+
htmlFor: `${n}-a`,
|
|
489
207
|
style: { "--value": d },
|
|
490
208
|
className: "input-range-output",
|
|
491
209
|
children: u[d].label
|
|
492
210
|
}
|
|
493
211
|
),
|
|
494
|
-
!
|
|
212
|
+
!c && /* @__PURE__ */ O(
|
|
495
213
|
"output",
|
|
496
214
|
{
|
|
497
|
-
htmlFor: `${
|
|
215
|
+
htmlFor: `${n}-b`,
|
|
498
216
|
style: { "--value": p },
|
|
499
217
|
className: "input-range-output",
|
|
500
218
|
children: u[p].label
|
|
@@ -505,6 +223,6 @@ const He = ["x", "y", "top", "bottom", "left", "right", "width", "height"], Ve =
|
|
|
505
223
|
);
|
|
506
224
|
};
|
|
507
225
|
export {
|
|
508
|
-
|
|
226
|
+
_ as Range
|
|
509
227
|
};
|
|
510
228
|
//# sourceMappingURL=Range.js.map
|