@clubmed/trident-ui 1.3.0-beta.12 → 1.3.0-beta.14
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 +14 -0
- package/README.md +8 -0
- package/assets/{style.css → trident-ui.css} +1 -1
- package/atoms/Clickable/Clickable.d.ts +2 -2
- package/atoms/Heading/Heading.d.ts +1 -1
- package/atoms/Heading/HeadingGroup.d.ts +2 -2
- package/atoms/Icons/Iconics.d.ts +1 -1
- package/atoms/Icons/IconsResolver.d.ts +1 -1
- package/atoms/Icons/contexts/IconsContext.d.ts +1 -1
- package/atoms/Icons/svg/SvgIcon.d.ts +1 -1
- package/atoms/Icons/svg-use/SvgUseIcon.d.ts +1 -1
- package/atoms/Image/Image.d.ts +1 -1
- package/atoms/Image/Image.js +12 -12
- package/atoms/Image/Image.js.map +1 -1
- package/atoms/Prose/Prose.d.ts +2 -2
- package/chunks/ResizeObserver.js +1 -1
- package/chunks/ResizeObserver.js.map +1 -1
- package/chunks/_commonjsHelpers.js +19 -14
- package/chunks/_commonjsHelpers.js.map +1 -1
- package/chunks/index.js +36 -33
- package/chunks/index.js.map +1 -1
- package/chunks/plugin.js +57 -46
- package/chunks/plugin.js.map +1 -1
- package/contexts/Devices/Device.d.ts +3 -3
- package/contexts/Devices/hooks/useQueries.d.ts +2 -2
- package/contexts/Devices/reducers/reducer.d.ts +2 -2
- package/contexts/TridentUIConfig.d.ts +1 -1
- package/contexts/TridentUIConfig.js +1265 -653
- package/contexts/TridentUIConfig.js.map +1 -1
- package/helpers/colors/colors.d.ts +1 -1
- package/hooks/useKeyboardControls.d.ts +1 -1
- package/hooks/useResizeObserver.d.ts +1 -1
- package/hooks/useSafeBoop.d.ts +2 -2
- package/molecules/Arrows/Arrows.d.ts +2 -2
- package/molecules/Avatar.d.ts +1 -1
- package/molecules/Avatar.js +24 -24
- package/molecules/Avatar.js.map +1 -1
- package/molecules/Backdrop.d.ts +1 -1
- package/molecules/Breadcrumb.d.ts +2 -3
- package/molecules/Breadcrumb.js +25 -36
- package/molecules/Breadcrumb.js.map +1 -1
- package/molecules/Breadcrumb.themes.d.ts +1 -1
- package/molecules/Buttons/ArrowButton.d.ts +1 -1
- package/molecules/Buttons/Button.d.ts +3 -3
- package/molecules/Buttons/ButtonAnchor.d.ts +2 -2
- package/molecules/Buttons/ButtonContent.d.ts +2 -2
- package/molecules/Buttons/FakeButton.d.ts +2 -3
- package/molecules/Buttons/InertButton.d.ts +2 -2
- package/molecules/Buttons/v2/Button.d.ts +2081 -2082
- package/molecules/Buttons/v2/Button.type.d.ts +2 -2
- package/molecules/Cards/Card.d.ts +4 -4
- package/molecules/Cards/CardBackground.d.ts +2 -2
- package/molecules/Cards/CardBackground.js +17 -17
- package/molecules/Cards/CardBackground.js.map +1 -1
- package/molecules/Cards/CardBackgroundContext.d.ts +1 -1
- package/molecules/Cards/CardClickable.d.ts +1 -1
- package/molecules/Cards/ExpandableCard.d.ts +3 -3
- package/molecules/Cards/ExpandableCard.js +41 -41
- package/molecules/Cards/ExpandableCard.js.map +1 -1
- package/molecules/Cards/v2/Card.d.ts +1 -1
- package/molecules/Cards/v2/Card.js +13 -13
- package/molecules/Cards/v2/Card.js.map +1 -1
- package/molecules/Chip.d.ts +3 -3
- package/molecules/Chip.themes.d.ts +1 -1
- package/molecules/ElasticHeight.d.ts +1 -1
- package/molecules/ElasticHeight.js +20 -21
- package/molecules/ElasticHeight.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +43 -43
- package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.d.ts +2 -2
- package/molecules/Forms/DateField.d.ts +2 -2
- package/molecules/Forms/DateField.js +60 -61
- package/molecules/Forms/DateField.js.map +1 -1
- package/molecules/Forms/Filter.d.ts +1 -2
- package/molecules/Forms/Filter.js +29 -29
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormControl.d.ts +4 -4
- package/molecules/Forms/FormLabel.d.ts +1 -1
- package/molecules/Forms/NumberField.d.ts +278 -278
- package/molecules/Forms/Password/Password.d.ts +1 -1
- package/molecules/Forms/Password/ValidationMessage.d.ts +1 -1
- package/molecules/Forms/Radios/Radio.d.ts +1 -2
- package/molecules/Forms/Radios/Radio.js +30 -30
- package/molecules/Forms/Radios/Radio.js.map +1 -1
- package/molecules/Forms/Radios/RadioGroup.d.ts +2 -2
- package/molecules/Forms/Radios/RadioGroup.js +50 -52
- package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
- package/molecules/Forms/Range.d.ts +1 -2
- package/molecules/Forms/Range.js +118 -113
- package/molecules/Forms/Range.js.map +1 -1
- package/molecules/Forms/Select.d.ts +3 -3
- package/molecules/Forms/Switch.d.ts +1 -1
- package/molecules/Forms/TextField.d.ts +3 -3
- package/molecules/HamburgerIcon.d.ts +1 -1
- package/molecules/Link.d.ts +2 -2
- package/molecules/Loader.d.ts +1 -1
- package/molecules/Pagination.d.ts +2 -2
- package/molecules/Popin.d.ts +1 -1
- package/molecules/Spinner.d.ts +1 -1
- package/molecules/Tabs/Tab.d.ts +2 -3
- package/molecules/Tabs/Tab.js +41 -42
- package/molecules/Tabs/Tab.js.map +1 -1
- package/molecules/Tabs/TabList.d.ts +1 -1
- package/molecules/Tabs/TabList.js +21 -21
- package/molecules/Tabs/TabList.js.map +1 -1
- package/molecules/Tabs/TabPanel.d.ts +1 -1
- package/molecules/Tabs/TabPanel.js +13 -13
- package/molecules/Tabs/TabPanel.js.map +1 -1
- package/molecules/Tabs/Tabs.d.ts +1 -1
- package/molecules/Tabs/TabsBody.d.ts +1 -1
- package/molecules/Tabs/context/TabControl.d.ts +2 -2
- package/molecules/Tabs/hooks/tabControl.d.ts +5 -5
- package/molecules/Tag.d.ts +4 -4
- package/package.json +33 -36
- package/styles/index.css +1 -1
- package/tailwind/plugins/animationDelay.d.ts +2 -2
- package/tailwind/plugins/hocus.d.ts +2 -2
- package/tailwind/plugins/lineClampFix.d.ts +2 -2
- package/tailwind/plugins/popover.d.ts +2 -2
- package/tailwind/plugins/startingStyle.d.ts +2 -2
- package/tailwind/plugins/transitionBehavior.d.ts +2 -2
- package/tailwind/tailwind.preset.d.ts +50 -50
package/molecules/Forms/Range.js
CHANGED
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { R as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsxs as D, jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { R as M } from "../../chunks/ResizeObserver.js";
|
|
3
|
+
import { c as q } from "../../chunks/index.js";
|
|
4
|
+
import { useState as B, useRef as T, useEffect as w, useMemo as A, useId as F } from "react";
|
|
5
5
|
import { g as H } from "../../chunks/_commonjsHelpers.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
var L, W;
|
|
7
|
+
function V() {
|
|
8
|
+
if (W) return L;
|
|
9
|
+
W = 1;
|
|
10
|
+
function r(t, n, d) {
|
|
11
|
+
var o, s, u, m, e;
|
|
12
|
+
n == null && (n = 100);
|
|
13
|
+
function i() {
|
|
14
|
+
var a = Date.now() - m;
|
|
15
|
+
a < n && a >= 0 ? o = setTimeout(i, n - a) : (o = null, d || (e = t.apply(u, s), u = s = null));
|
|
16
|
+
}
|
|
17
|
+
var c = function() {
|
|
18
|
+
u = this, s = arguments, m = Date.now();
|
|
19
|
+
var a = d && !o;
|
|
20
|
+
return o || (o = setTimeout(i, n)), a && (e = t.apply(u, s), u = s = null), e;
|
|
21
|
+
};
|
|
22
|
+
return c.clear = function() {
|
|
23
|
+
o && (clearTimeout(o), o = null);
|
|
24
|
+
}, c.flush = function() {
|
|
25
|
+
o && (e = t.apply(u, s), u = s = null, clearTimeout(o), o = null);
|
|
26
|
+
}, c;
|
|
12
27
|
}
|
|
13
|
-
|
|
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;
|
|
17
|
-
};
|
|
18
|
-
return u.clear = function() {
|
|
19
|
-
o && (clearTimeout(o), o = null);
|
|
20
|
-
}, u.flush = function() {
|
|
21
|
-
o && (c = r.apply(n, i), n = i = null, clearTimeout(o), o = null);
|
|
22
|
-
}, u;
|
|
28
|
+
return r.debounce = r, L = r, L;
|
|
23
29
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
function k(r) {
|
|
30
|
+
var k = V();
|
|
31
|
+
const S = /* @__PURE__ */ H(k);
|
|
32
|
+
function X(r) {
|
|
28
33
|
let {
|
|
29
34
|
debounce: t,
|
|
30
|
-
scroll:
|
|
31
|
-
polyfill:
|
|
32
|
-
offsetSize:
|
|
35
|
+
scroll: n,
|
|
36
|
+
polyfill: d,
|
|
37
|
+
offsetSize: o
|
|
33
38
|
} = r === void 0 ? {
|
|
34
39
|
debounce: 0,
|
|
35
40
|
scroll: !1,
|
|
36
41
|
offsetSize: !1
|
|
37
42
|
} : r;
|
|
38
|
-
const
|
|
43
|
+
const s = d || (typeof window > "u" ? class {
|
|
39
44
|
} : window.ResizeObserver);
|
|
40
|
-
if (!
|
|
45
|
+
if (!s)
|
|
41
46
|
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");
|
|
42
|
-
const [
|
|
47
|
+
const [u, m] = B({
|
|
43
48
|
left: 0,
|
|
44
49
|
top: 0,
|
|
45
50
|
width: 0,
|
|
@@ -48,174 +53,174 @@ function k(r) {
|
|
|
48
53
|
right: 0,
|
|
49
54
|
x: 0,
|
|
50
55
|
y: 0
|
|
51
|
-
}), e =
|
|
56
|
+
}), e = T({
|
|
52
57
|
element: null,
|
|
53
58
|
scrollContainers: null,
|
|
54
59
|
resizeObserver: null,
|
|
55
|
-
lastBounds:
|
|
56
|
-
}),
|
|
57
|
-
w(() => (
|
|
58
|
-
const [y, b,
|
|
60
|
+
lastBounds: u
|
|
61
|
+
}), i = t ? typeof t == "number" ? t : t.scroll : null, c = t ? typeof t == "number" ? t : t.resize : null, a = T(!1);
|
|
62
|
+
w(() => (a.current = !0, () => void (a.current = !1)));
|
|
63
|
+
const [y, b, p] = A(() => {
|
|
59
64
|
const l = () => {
|
|
60
65
|
if (!e.current.element) return;
|
|
61
66
|
const {
|
|
62
|
-
left:
|
|
67
|
+
left: O,
|
|
63
68
|
top: R,
|
|
64
69
|
width: C,
|
|
65
|
-
height:
|
|
70
|
+
height: v,
|
|
66
71
|
bottom: x,
|
|
67
72
|
right: N,
|
|
68
|
-
x:
|
|
69
|
-
y:
|
|
73
|
+
x: $,
|
|
74
|
+
y: j
|
|
70
75
|
} = e.current.element.getBoundingClientRect(), g = {
|
|
71
|
-
left:
|
|
76
|
+
left: O,
|
|
72
77
|
top: R,
|
|
73
78
|
width: C,
|
|
74
|
-
height:
|
|
79
|
+
height: v,
|
|
75
80
|
bottom: x,
|
|
76
81
|
right: N,
|
|
77
|
-
x:
|
|
78
|
-
y:
|
|
82
|
+
x: $,
|
|
83
|
+
y: j
|
|
79
84
|
};
|
|
80
|
-
e.current.element instanceof HTMLElement &&
|
|
85
|
+
e.current.element instanceof HTMLElement && o && (g.height = e.current.element.offsetHeight, g.width = e.current.element.offsetWidth), Object.freeze(g), a.current && !K(e.current.lastBounds, g) && m(e.current.lastBounds = g);
|
|
81
86
|
};
|
|
82
|
-
return [l,
|
|
83
|
-
}, [
|
|
84
|
-
function
|
|
85
|
-
e.current.scrollContainers && (e.current.scrollContainers.forEach((l) => l.removeEventListener("scroll",
|
|
87
|
+
return [l, c ? S(l, c) : l, i ? S(l, i) : l];
|
|
88
|
+
}, [m, o, i, c]);
|
|
89
|
+
function f() {
|
|
90
|
+
e.current.scrollContainers && (e.current.scrollContainers.forEach((l) => l.removeEventListener("scroll", p, !0)), e.current.scrollContainers = null), e.current.resizeObserver && (e.current.resizeObserver.disconnect(), e.current.resizeObserver = null);
|
|
86
91
|
}
|
|
87
92
|
function z() {
|
|
88
|
-
e.current.element && (e.current.resizeObserver = new
|
|
93
|
+
e.current.element && (e.current.resizeObserver = new s(p), e.current.resizeObserver.observe(e.current.element), n && e.current.scrollContainers && e.current.scrollContainers.forEach((l) => l.addEventListener("scroll", p, {
|
|
89
94
|
capture: !0,
|
|
90
95
|
passive: !0
|
|
91
96
|
})));
|
|
92
97
|
}
|
|
93
|
-
const
|
|
94
|
-
!l || l === e.current.element || (
|
|
98
|
+
const h = (l) => {
|
|
99
|
+
!l || l === e.current.element || (f(), e.current.element = l, e.current.scrollContainers = I(l), z());
|
|
95
100
|
};
|
|
96
|
-
return
|
|
97
|
-
|
|
98
|
-
}, [
|
|
101
|
+
return G(p, !!n), Y(b), w(() => {
|
|
102
|
+
f(), z();
|
|
103
|
+
}, [n, p, b]), w(() => f, []), [h, u, y];
|
|
99
104
|
}
|
|
100
|
-
function
|
|
105
|
+
function Y(r) {
|
|
101
106
|
w(() => {
|
|
102
107
|
const t = r;
|
|
103
108
|
return window.addEventListener("resize", t), () => void window.removeEventListener("resize", t);
|
|
104
109
|
}, [r]);
|
|
105
110
|
}
|
|
106
|
-
function
|
|
111
|
+
function G(r, t) {
|
|
107
112
|
w(() => {
|
|
108
113
|
if (t) {
|
|
109
|
-
const
|
|
110
|
-
return window.addEventListener("scroll",
|
|
114
|
+
const n = r;
|
|
115
|
+
return window.addEventListener("scroll", n, {
|
|
111
116
|
capture: !0,
|
|
112
117
|
passive: !0
|
|
113
|
-
}), () => void window.removeEventListener("scroll",
|
|
118
|
+
}), () => void window.removeEventListener("scroll", n, !0);
|
|
114
119
|
}
|
|
115
120
|
}, [r, t]);
|
|
116
121
|
}
|
|
117
|
-
function
|
|
122
|
+
function I(r) {
|
|
118
123
|
const t = [];
|
|
119
124
|
if (!r || r === document.body) return t;
|
|
120
125
|
const {
|
|
121
|
-
overflow:
|
|
122
|
-
overflowX:
|
|
123
|
-
overflowY:
|
|
126
|
+
overflow: n,
|
|
127
|
+
overflowX: d,
|
|
128
|
+
overflowY: o
|
|
124
129
|
} = window.getComputedStyle(r);
|
|
125
|
-
return [
|
|
130
|
+
return [n, d, o].some((s) => s === "auto" || s === "scroll") && t.push(r), [...t, ...I(r.parentElement)];
|
|
126
131
|
}
|
|
127
|
-
const
|
|
132
|
+
const J = ["x", "y", "top", "bottom", "left", "right", "width", "height"], K = (r, t) => J.every((n) => r[n] === t[n]), te = (r) => {
|
|
128
133
|
const t = F(), {
|
|
129
|
-
ariaLabel:
|
|
130
|
-
className:
|
|
131
|
-
dataTestId:
|
|
132
|
-
id:
|
|
133
|
-
name:
|
|
134
|
-
singleCursorMode:
|
|
134
|
+
ariaLabel: n,
|
|
135
|
+
className: d,
|
|
136
|
+
dataTestId: o = "range",
|
|
137
|
+
id: s = t,
|
|
138
|
+
name: u = s,
|
|
139
|
+
singleCursorMode: m = !1,
|
|
135
140
|
min: e = 0,
|
|
136
|
-
options:
|
|
137
|
-
step:
|
|
138
|
-
readOnly:
|
|
141
|
+
options: i = [],
|
|
142
|
+
step: c = 1,
|
|
143
|
+
readOnly: a,
|
|
139
144
|
disabled: y,
|
|
140
145
|
onChange: b,
|
|
141
|
-
...
|
|
142
|
-
} = r, [
|
|
143
|
-
if (!
|
|
144
|
-
|
|
145
|
-
const x = Number(
|
|
146
|
-
|
|
146
|
+
...p
|
|
147
|
+
} = r, [f, z] = B(i.length - 1), [h, l] = B(e), [O, { width: R }] = X({ polyfill: M }), C = (v) => {
|
|
148
|
+
if (!a) {
|
|
149
|
+
v.persist();
|
|
150
|
+
const x = Number(v.target.value);
|
|
151
|
+
v.target.id[v.target.id.length - 1] === "a" ? z(x) : l(x), b && b(u, [f, h]);
|
|
147
152
|
}
|
|
148
153
|
};
|
|
149
|
-
return /* @__PURE__ */
|
|
154
|
+
return /* @__PURE__ */ D(
|
|
150
155
|
"div",
|
|
151
156
|
{
|
|
152
157
|
style: {
|
|
153
158
|
"--min": e,
|
|
154
|
-
"--max":
|
|
159
|
+
"--max": i.length - 1,
|
|
155
160
|
"--inputWidth": `${R}px`,
|
|
156
161
|
"--inputHeight": "4px",
|
|
157
162
|
"--thumbWidth": "32px",
|
|
158
163
|
"--usefulWidth": "calc(var(--inputWidth) - var(--thumbWidth))",
|
|
159
|
-
"--valueA":
|
|
160
|
-
"--valueB":
|
|
164
|
+
"--valueA": f,
|
|
165
|
+
"--valueB": h
|
|
161
166
|
},
|
|
162
|
-
className:
|
|
163
|
-
"data-testid":
|
|
167
|
+
className: q("relative w-full", d),
|
|
168
|
+
"data-testid": o,
|
|
164
169
|
"data-name": "Range",
|
|
165
|
-
ref:
|
|
170
|
+
ref: O,
|
|
166
171
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ D("div", { className: "input-range-container", children: [
|
|
173
|
+
/* @__PURE__ */ E(
|
|
169
174
|
"input",
|
|
170
175
|
{
|
|
171
|
-
...
|
|
172
|
-
"aria-label":
|
|
176
|
+
...p,
|
|
177
|
+
"aria-label": n,
|
|
173
178
|
className: "input-range",
|
|
174
|
-
id: `${
|
|
175
|
-
max:
|
|
179
|
+
id: `${s}-a`,
|
|
180
|
+
max: i.length - 1,
|
|
176
181
|
min: e,
|
|
177
|
-
name:
|
|
182
|
+
name: u,
|
|
178
183
|
onChange: C,
|
|
179
184
|
disabled: y,
|
|
180
|
-
step:
|
|
185
|
+
step: c,
|
|
181
186
|
type: "range",
|
|
182
|
-
value:
|
|
187
|
+
value: f
|
|
183
188
|
}
|
|
184
189
|
),
|
|
185
|
-
!
|
|
190
|
+
!m && /* @__PURE__ */ E(
|
|
186
191
|
"input",
|
|
187
192
|
{
|
|
188
|
-
...
|
|
189
|
-
"aria-label":
|
|
193
|
+
...p,
|
|
194
|
+
"aria-label": n,
|
|
190
195
|
className: "input-range",
|
|
191
196
|
disabled: y,
|
|
192
|
-
id: `${
|
|
193
|
-
max:
|
|
197
|
+
id: `${s}-b`,
|
|
198
|
+
max: i.length - 1,
|
|
194
199
|
min: e,
|
|
195
|
-
name:
|
|
200
|
+
name: u,
|
|
196
201
|
onChange: C,
|
|
197
|
-
step:
|
|
202
|
+
step: c,
|
|
198
203
|
type: "range",
|
|
199
|
-
value:
|
|
204
|
+
value: h
|
|
200
205
|
}
|
|
201
206
|
)
|
|
202
207
|
] }),
|
|
203
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ E(
|
|
204
209
|
"output",
|
|
205
210
|
{
|
|
206
|
-
htmlFor: `${
|
|
207
|
-
style: { "--value":
|
|
211
|
+
htmlFor: `${s}-a`,
|
|
212
|
+
style: { "--value": f },
|
|
208
213
|
className: "input-range-output",
|
|
209
|
-
children:
|
|
214
|
+
children: i[f].label
|
|
210
215
|
}
|
|
211
216
|
),
|
|
212
|
-
!
|
|
217
|
+
!m && /* @__PURE__ */ E(
|
|
213
218
|
"output",
|
|
214
219
|
{
|
|
215
|
-
htmlFor: `${
|
|
216
|
-
style: { "--value":
|
|
220
|
+
htmlFor: `${s}-b`,
|
|
221
|
+
style: { "--value": h },
|
|
217
222
|
className: "input-range-output",
|
|
218
|
-
children:
|
|
223
|
+
children: i[h].label
|
|
219
224
|
}
|
|
220
225
|
)
|
|
221
226
|
]
|
|
@@ -223,6 +228,6 @@ const Y = ["x", "y", "top", "bottom", "left", "right", "width", "height"], G = (
|
|
|
223
228
|
);
|
|
224
229
|
};
|
|
225
230
|
export {
|
|
226
|
-
|
|
231
|
+
te as Range
|
|
227
232
|
};
|
|
228
233
|
//# sourceMappingURL=Range.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Range.js","sources":["../../../node_modules/debounce/index.js","../../../node_modules/react-use-measure/dist/web.js","../../../lib/molecules/Forms/Range.tsx"],"sourcesContent":["/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","import { useState, useRef, useEffect, useMemo } from 'react';\nimport createDebounce from 'debounce';\n\nfunction useMeasure(_temp) {\n let {\n debounce,\n scroll,\n polyfill,\n offsetSize\n } = _temp === void 0 ? {\n debounce: 0,\n scroll: false,\n offsetSize: false\n } : _temp;\n const ResizeObserver = polyfill || (typeof window === 'undefined' ? class ResizeObserver {} : window.ResizeObserver);\n\n if (!ResizeObserver) {\n 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');\n }\n\n const [bounds, set] = useState({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0\n }); // keep all state in a ref\n\n const state = useRef({\n element: null,\n scrollContainers: null,\n resizeObserver: null,\n lastBounds: bounds\n }); // set actual debounce values early, so effects know if they should react accordingly\n\n const scrollDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.scroll : null;\n const resizeDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.resize : null; // make sure to update state only as long as the component is truly mounted\n\n const mounted = useRef(false);\n useEffect(() => {\n mounted.current = true;\n return () => void (mounted.current = false);\n }); // memoize handlers, so event-listeners know when they should update\n\n const [forceRefresh, resizeChange, scrollChange] = useMemo(() => {\n const callback = () => {\n if (!state.current.element) return;\n const {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n } = state.current.element.getBoundingClientRect();\n const size = {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n };\n\n if (state.current.element instanceof HTMLElement && offsetSize) {\n size.height = state.current.element.offsetHeight;\n size.width = state.current.element.offsetWidth;\n }\n\n Object.freeze(size);\n if (mounted.current && !areBoundsEqual(state.current.lastBounds, size)) set(state.current.lastBounds = size);\n };\n\n return [callback, resizeDebounce ? createDebounce(callback, resizeDebounce) : callback, scrollDebounce ? createDebounce(callback, scrollDebounce) : callback];\n }, [set, offsetSize, scrollDebounce, resizeDebounce]); // cleanup current scroll-listeners / observers\n\n function removeListeners() {\n if (state.current.scrollContainers) {\n state.current.scrollContainers.forEach(element => element.removeEventListener('scroll', scrollChange, true));\n state.current.scrollContainers = null;\n }\n\n if (state.current.resizeObserver) {\n state.current.resizeObserver.disconnect();\n state.current.resizeObserver = null;\n }\n } // add scroll-listeners / observers\n\n\n function addListeners() {\n if (!state.current.element) return;\n state.current.resizeObserver = new ResizeObserver(scrollChange);\n state.current.resizeObserver.observe(state.current.element);\n\n if (scroll && state.current.scrollContainers) {\n state.current.scrollContainers.forEach(scrollContainer => scrollContainer.addEventListener('scroll', scrollChange, {\n capture: true,\n passive: true\n }));\n }\n } // the ref we expose to the user\n\n\n const ref = node => {\n if (!node || node === state.current.element) return;\n removeListeners();\n state.current.element = node;\n state.current.scrollContainers = findScrollContainers(node);\n addListeners();\n }; // add general event listeners\n\n\n useOnWindowScroll(scrollChange, Boolean(scroll));\n useOnWindowResize(resizeChange); // respond to changes that are relevant for the listeners\n\n useEffect(() => {\n removeListeners();\n addListeners();\n }, [scroll, scrollChange, resizeChange]); // remove all listeners when the components unmounts\n\n useEffect(() => removeListeners, []);\n return [ref, bounds, forceRefresh];\n} // Adds native resize listener to window\n\n\nfunction useOnWindowResize(onWindowResize) {\n useEffect(() => {\n const cb = onWindowResize;\n window.addEventListener('resize', cb);\n return () => void window.removeEventListener('resize', cb);\n }, [onWindowResize]);\n}\n\nfunction useOnWindowScroll(onScroll, enabled) {\n useEffect(() => {\n if (enabled) {\n const cb = onScroll;\n window.addEventListener('scroll', cb, {\n capture: true,\n passive: true\n });\n return () => void window.removeEventListener('scroll', cb, true);\n }\n }, [onScroll, enabled]);\n} // Returns a list of scroll offsets\n\n\nfunction findScrollContainers(element) {\n const result = [];\n if (!element || element === document.body) return result;\n const {\n overflow,\n overflowX,\n overflowY\n } = window.getComputedStyle(element);\n if ([overflow, overflowX, overflowY].some(prop => prop === 'auto' || prop === 'scroll')) result.push(element);\n return [...result, ...findScrollContainers(element.parentElement)];\n} // Checks if element boundaries are equal\n\n\nconst keys = ['x', 'y', 'top', 'bottom', 'left', 'right', 'width', 'height'];\n\nconst areBoundsEqual = (a, b) => keys.every(key => a[key] === b[key]);\n\nexport { useMeasure as default };\n","import { ResizeObserver } from '@juggle/resize-observer';\nimport classnames from 'classnames';\nimport {\n type ChangeEvent,\n type CSSProperties,\n type InputHTMLAttributes,\n useId,\n useState,\n} from 'react';\n\nimport useMeasure from 'react-use-measure';\nimport './range.css';\n\ninterface RangeProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n /**\n * Aria label\n * @default 'Range'\n * */\n ariaLabel?: string;\n /**\n * Additional class names\n * */\n className?: string;\n /**\n * Data test id\n * */\n dataTestId?: string;\n /**\n * Single cursor mode\n * @default false\n * */\n singleCursorMode?: boolean;\n /**\n * Min value\n * @default 0\n * */\n min?: number;\n /**\n * On change\n * */\n onChange?: (name: string, value: number[]) => void;\n /**\n * Options\n * @default []\n * */\n options: { value: number; label: string }[];\n}\n\nexport const Range = (props: RangeProps) => {\n const internalId = useId();\n\n const {\n ariaLabel,\n className,\n dataTestId = 'range',\n id = internalId,\n name = id,\n singleCursorMode = false,\n min = 0,\n options = [],\n step = 1,\n readOnly,\n disabled,\n onChange,\n ...rest\n } = props;\n\n const [valueA, setValueA] = useState(options.length - 1);\n const [valueB, setValueB] = useState(min);\n const [containerRef, { width }] = useMeasure({ polyfill: ResizeObserver });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!readOnly) {\n e.persist();\n const inputValue = Number(e.target.value);\n const inputId = e.target.id[e.target.id.length - 1];\n\n if (inputId === 'a') {\n setValueA(inputValue);\n } else {\n setValueB(inputValue);\n }\n\n onChange && onChange(name, [valueA, valueB]);\n }\n };\n\n return (\n <div\n style={\n {\n '--min': min,\n '--max': options.length - 1,\n '--inputWidth': `${width}px`,\n '--inputHeight': '4px',\n '--thumbWidth': '32px',\n '--usefulWidth': 'calc(var(--inputWidth) - var(--thumbWidth))',\n '--valueA': valueA,\n '--valueB': valueB,\n } as CSSProperties\n }\n className={classnames('relative w-full', className)}\n data-testid={dataTestId}\n data-name=\"Range\"\n ref={containerRef}\n >\n <div className=\"input-range-container\">\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n id={`${id}-a`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n disabled={disabled}\n step={step}\n type=\"range\"\n value={valueA}\n />\n {!singleCursorMode && (\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n disabled={disabled}\n id={`${id}-b`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n step={step}\n type=\"range\"\n value={valueB}\n />\n )}\n </div>\n <output\n htmlFor={`${id}-a`}\n style={{ '--value': valueA } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueA].label}\n </output>\n {!singleCursorMode && (\n <output\n htmlFor={`${id}-b`}\n style={{ '--value': valueB } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueB].label}\n </output>\n )}\n </div>\n );\n};\n"],"names":["debounce","func","wait","immediate","timeout","args","context","timestamp","result","later","last","debounced","callNow","debounce_1","useMeasure","_temp","scroll","polyfill","offsetSize","ResizeObserver","bounds","set","useState","state","useRef","scrollDebounce","resizeDebounce","mounted","useEffect","forceRefresh","resizeChange","scrollChange","useMemo","callback","left","top","width","height","bottom","right","x","y","size","areBoundsEqual","createDebounce","removeListeners","element","addListeners","scrollContainer","ref","node","findScrollContainers","useOnWindowScroll","useOnWindowResize","onWindowResize","cb","onScroll","enabled","overflow","overflowX","overflowY","prop","keys","a","b","key","Range","props","internalId","useId","ariaLabel","className","dataTestId","id","name","singleCursorMode","min","options","step","readOnly","disabled","onChange","rest","valueA","setValueA","valueB","setValueB","containerRef","handleChange","e","inputValue","jsxs","classnames","jsx"],"mappings":";;;;;AAcA,SAASA,EAASC,GAAMC,GAAMC,GAAU;AACtC,MAAIC,GAASC,GAAMC,GAASC,GAAWC;AACvC,EAAYN,KAAR,SAAcA,IAAO;AAEzB,WAASO,IAAQ;AACf,QAAIC,IAAO,KAAK,IAAG,IAAKH;AAExB,IAAIG,IAAOR,KAAQQ,KAAQ,IACzBN,IAAU,WAAWK,GAAOP,IAAOQ,CAAI,KAEvCN,IAAU,MACLD,MACHK,IAASP,EAAK,MAAMK,GAASD,CAAI,GACjCC,IAAUD,IAAO;AAAA,EAGzB;AAEE,MAAIM,IAAY,WAAU;AACxB,IAAAL,IAAU,MACVD,IAAO,WACPE,IAAY,KAAK,IAAG;AACpB,QAAIK,IAAUT,KAAa,CAACC;AAC5B,WAAKA,MAASA,IAAU,WAAWK,GAAOP,CAAI,IAC1CU,MACFJ,IAASP,EAAK,MAAMK,GAASD,CAAI,GACjCC,IAAUD,IAAO,OAGZG;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MAAK;AAAA,cACL,OAAOO;AAAA,YAAA;AAAA,UAAA;AAAA,QACT,GAEJ;AAAA,QACA,gBAAAQ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,GAAGpB,CAAE;AAAA,YACd,OAAO,EAAE,WAAWU,EAAA;AAAA,YACpB,WAAU;AAAA,YAET,UAAAN,EAAQM,CAAM,EAAE;AAAA,UAAA;AAAA,QAAA;AAAA,QAElB,CAACR,KACA,gBAAAkB;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,GAAGpB,CAAE;AAAA,YACd,OAAO,EAAE,WAAWY,EAAA;AAAA,YACpB,WAAU;AAAA,YAET,UAAAR,EAAQQ,CAAM,EAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACnB;AAAA,IAAA;AAAA,EAAA;AAIR;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"Range.js","sources":["../../../node_modules/debounce/index.js","../../../node_modules/react-use-measure/dist/web.js","../../../lib/molecules/Forms/Range.tsx"],"sourcesContent":["/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","import { useState, useRef, useEffect, useMemo } from 'react';\nimport createDebounce from 'debounce';\n\nfunction useMeasure(_temp) {\n let {\n debounce,\n scroll,\n polyfill,\n offsetSize\n } = _temp === void 0 ? {\n debounce: 0,\n scroll: false,\n offsetSize: false\n } : _temp;\n const ResizeObserver = polyfill || (typeof window === 'undefined' ? class ResizeObserver {} : window.ResizeObserver);\n\n if (!ResizeObserver) {\n 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');\n }\n\n const [bounds, set] = useState({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n bottom: 0,\n right: 0,\n x: 0,\n y: 0\n }); // keep all state in a ref\n\n const state = useRef({\n element: null,\n scrollContainers: null,\n resizeObserver: null,\n lastBounds: bounds\n }); // set actual debounce values early, so effects know if they should react accordingly\n\n const scrollDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.scroll : null;\n const resizeDebounce = debounce ? typeof debounce === 'number' ? debounce : debounce.resize : null; // make sure to update state only as long as the component is truly mounted\n\n const mounted = useRef(false);\n useEffect(() => {\n mounted.current = true;\n return () => void (mounted.current = false);\n }); // memoize handlers, so event-listeners know when they should update\n\n const [forceRefresh, resizeChange, scrollChange] = useMemo(() => {\n const callback = () => {\n if (!state.current.element) return;\n const {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n } = state.current.element.getBoundingClientRect();\n const size = {\n left,\n top,\n width,\n height,\n bottom,\n right,\n x,\n y\n };\n\n if (state.current.element instanceof HTMLElement && offsetSize) {\n size.height = state.current.element.offsetHeight;\n size.width = state.current.element.offsetWidth;\n }\n\n Object.freeze(size);\n if (mounted.current && !areBoundsEqual(state.current.lastBounds, size)) set(state.current.lastBounds = size);\n };\n\n return [callback, resizeDebounce ? createDebounce(callback, resizeDebounce) : callback, scrollDebounce ? createDebounce(callback, scrollDebounce) : callback];\n }, [set, offsetSize, scrollDebounce, resizeDebounce]); // cleanup current scroll-listeners / observers\n\n function removeListeners() {\n if (state.current.scrollContainers) {\n state.current.scrollContainers.forEach(element => element.removeEventListener('scroll', scrollChange, true));\n state.current.scrollContainers = null;\n }\n\n if (state.current.resizeObserver) {\n state.current.resizeObserver.disconnect();\n state.current.resizeObserver = null;\n }\n } // add scroll-listeners / observers\n\n\n function addListeners() {\n if (!state.current.element) return;\n state.current.resizeObserver = new ResizeObserver(scrollChange);\n state.current.resizeObserver.observe(state.current.element);\n\n if (scroll && state.current.scrollContainers) {\n state.current.scrollContainers.forEach(scrollContainer => scrollContainer.addEventListener('scroll', scrollChange, {\n capture: true,\n passive: true\n }));\n }\n } // the ref we expose to the user\n\n\n const ref = node => {\n if (!node || node === state.current.element) return;\n removeListeners();\n state.current.element = node;\n state.current.scrollContainers = findScrollContainers(node);\n addListeners();\n }; // add general event listeners\n\n\n useOnWindowScroll(scrollChange, Boolean(scroll));\n useOnWindowResize(resizeChange); // respond to changes that are relevant for the listeners\n\n useEffect(() => {\n removeListeners();\n addListeners();\n }, [scroll, scrollChange, resizeChange]); // remove all listeners when the components unmounts\n\n useEffect(() => removeListeners, []);\n return [ref, bounds, forceRefresh];\n} // Adds native resize listener to window\n\n\nfunction useOnWindowResize(onWindowResize) {\n useEffect(() => {\n const cb = onWindowResize;\n window.addEventListener('resize', cb);\n return () => void window.removeEventListener('resize', cb);\n }, [onWindowResize]);\n}\n\nfunction useOnWindowScroll(onScroll, enabled) {\n useEffect(() => {\n if (enabled) {\n const cb = onScroll;\n window.addEventListener('scroll', cb, {\n capture: true,\n passive: true\n });\n return () => void window.removeEventListener('scroll', cb, true);\n }\n }, [onScroll, enabled]);\n} // Returns a list of scroll offsets\n\n\nfunction findScrollContainers(element) {\n const result = [];\n if (!element || element === document.body) return result;\n const {\n overflow,\n overflowX,\n overflowY\n } = window.getComputedStyle(element);\n if ([overflow, overflowX, overflowY].some(prop => prop === 'auto' || prop === 'scroll')) result.push(element);\n return [...result, ...findScrollContainers(element.parentElement)];\n} // Checks if element boundaries are equal\n\n\nconst keys = ['x', 'y', 'top', 'bottom', 'left', 'right', 'width', 'height'];\n\nconst areBoundsEqual = (a, b) => keys.every(key => a[key] === b[key]);\n\nexport { useMeasure as default };\n","import { ResizeObserver } from '@juggle/resize-observer';\nimport classnames from 'classnames';\nimport {\n type ChangeEvent,\n type CSSProperties,\n type InputHTMLAttributes,\n useId,\n useState,\n} from 'react';\n\nimport useMeasure from 'react-use-measure';\nimport './range.css';\n\ninterface RangeProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {\n /**\n * Aria label\n * @default 'Range'\n * */\n ariaLabel?: string;\n /**\n * Additional class names\n * */\n className?: string;\n /**\n * Data test id\n * */\n dataTestId?: string;\n /**\n * Single cursor mode\n * @default false\n * */\n singleCursorMode?: boolean;\n /**\n * Min value\n * @default 0\n * */\n min?: number;\n /**\n * On change\n * */\n onChange?: (name: string, value: number[]) => void;\n /**\n * Options\n * @default []\n * */\n options: { value: number; label: string }[];\n}\n\nexport const Range = (props: RangeProps) => {\n const internalId = useId();\n\n const {\n ariaLabel,\n className,\n dataTestId = 'range',\n id = internalId,\n name = id,\n singleCursorMode = false,\n min = 0,\n options = [],\n step = 1,\n readOnly,\n disabled,\n onChange,\n ...rest\n } = props;\n\n const [valueA, setValueA] = useState(options.length - 1);\n const [valueB, setValueB] = useState(min);\n const [containerRef, { width }] = useMeasure({ polyfill: ResizeObserver });\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n if (!readOnly) {\n e.persist();\n const inputValue = Number(e.target.value);\n const inputId = e.target.id[e.target.id.length - 1];\n\n if (inputId === 'a') {\n setValueA(inputValue);\n } else {\n setValueB(inputValue);\n }\n\n onChange && onChange(name, [valueA, valueB]);\n }\n };\n\n return (\n <div\n style={\n {\n '--min': min,\n '--max': options.length - 1,\n '--inputWidth': `${width}px`,\n '--inputHeight': '4px',\n '--thumbWidth': '32px',\n '--usefulWidth': 'calc(var(--inputWidth) - var(--thumbWidth))',\n '--valueA': valueA,\n '--valueB': valueB,\n } as CSSProperties\n }\n className={classnames('relative w-full', className)}\n data-testid={dataTestId}\n data-name=\"Range\"\n ref={containerRef}\n >\n <div className=\"input-range-container\">\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n id={`${id}-a`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n disabled={disabled}\n step={step}\n type=\"range\"\n value={valueA}\n />\n {!singleCursorMode && (\n <input\n {...rest}\n aria-label={ariaLabel}\n className=\"input-range\"\n disabled={disabled}\n id={`${id}-b`}\n max={options.length - 1}\n min={min}\n name={name}\n onChange={handleChange}\n step={step}\n type=\"range\"\n value={valueB}\n />\n )}\n </div>\n <output\n htmlFor={`${id}-a`}\n style={{ '--value': valueA } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueA].label}\n </output>\n {!singleCursorMode && (\n <output\n htmlFor={`${id}-b`}\n style={{ '--value': valueB } as CSSProperties}\n className=\"input-range-output\"\n >\n {options[valueB].label}\n </output>\n )}\n </div>\n );\n};\n"],"names":["debounce","func","wait","immediate","timeout","args","context","timestamp","result","later","last","debounced","callNow","debounce_1","useMeasure","_temp","scroll","polyfill","offsetSize","ResizeObserver","bounds","set","useState","state","useRef","scrollDebounce","resizeDebounce","mounted","useEffect","forceRefresh","resizeChange","scrollChange","useMemo","callback","left","top","width","height","bottom","right","x","y","size","areBoundsEqual","createDebounce","removeListeners","element","addListeners","scrollContainer","ref","node","findScrollContainers","useOnWindowScroll","useOnWindowResize","onWindowResize","cb","onScroll","enabled","overflow","overflowX","overflowY","prop","keys","a","b","key","Range","props","internalId","useId","ariaLabel","className","dataTestId","id","name","singleCursorMode","min","options","step","readOnly","disabled","onChange","rest","valueA","setValueA","valueB","setValueB","containerRef","handleChange","e","inputValue","jsxs","classnames","jsx"],"mappings":";;;;;;;;;AAcA,WAASA,EAASC,GAAMC,GAAMC,GAAU;AACtC,QAAIC,GAASC,GAAMC,GAASC,GAAWC;AACvC,IAAYN,KAAR,SAAcA,IAAO;AAEzB,aAASO,IAAQ;AACf,UAAIC,IAAO,KAAK,IAAG,IAAKH;AAExB,MAAIG,IAAOR,KAAQQ,KAAQ,IACzBN,IAAU,WAAWK,GAAOP,IAAOQ,CAAI,KAEvCN,IAAU,MACLD,MACHK,IAASP,EAAK,MAAMK,GAASD,CAAI,GACjCC,IAAUD,IAAO;AAAA,IAGzB;AAEE,QAAIM,IAAY,WAAU;AACxB,MAAAL,IAAU,MACVD,IAAO,WACPE,IAAY,KAAK,IAAG;AACpB,UAAIK,IAAUT,KAAa,CAACC;AAC5B,aAAKA,MAASA,IAAU,WAAWK,GAAOP,CAAI,IAC1CU,MACFJ,IAASP,EAAK,MAAMK,GAASD,CAAI,GACjCC,IAAUD,IAAO,OAGZG;AAAA,IACX;AAEE,WAAAG,EAAU,QAAQ,WAAW;AAC3B,MAAIP,MACF,aAAaA,CAAO,GACpBA,IAAU;AAAA,IAEhB,GAEEO,EAAU,QAAQ,WAAW;AAC3B,MAAIP,MACFI,IAASP,EAAK,MAAMK,GAASD,CAAI,GACjCC,IAAUD,IAAO,MAEjB,aAAaD,CAAO,GACpBA,IAAU;AAAA,IAEhB,GAESO;AAAA,EACT;AAGA,SAAAX,EAAS,WAAWA,GAEpBa,IAAiBb;;;;AClEjB,SAASc,EAAWC,GAAO;AACzB,MAAI;AAAA,IACF,UAAAf;AAAA,IACA,QAAAgB;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,EACJ,IAAMH,MAAU,SAAS;AAAA,IACrB,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,YAAY;AAAA,E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_google_ignoreList":[0,1]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { FormControlProps } from './FormControl.js';
|
|
2
|
+
import { IconicTypes } from '@clubmed/trident-icons';
|
|
3
|
+
import { SelectHTMLAttributes } from 'react';
|
|
4
4
|
export interface SelectProps<Value> extends FormControlProps<Value, SelectHTMLAttributes<HTMLSelectElement>> {
|
|
5
5
|
description?: string;
|
|
6
6
|
iconType?: IconicTypes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { UseValueProps } from '../../hooks/useValue';
|
|
2
|
+
import { FormControlProps } from './FormControl.js';
|
|
3
|
+
import { IconicNames, IconicTypes } from '@clubmed/trident-icons';
|
|
4
4
|
export interface TextFieldProps<Value> extends FormControlProps<Value> {
|
|
5
5
|
description?: string;
|
|
6
6
|
icon?: IconicNames;
|
package/molecules/Link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import { IconicNames, IconicTypes } from '@clubmed/trident-icons';
|
|
3
3
|
interface LinkProps<T extends HTMLAnchorElement = HTMLAnchorElement> extends AnchorHTMLAttributes<T> {
|
|
4
4
|
/**
|
|
5
5
|
* Label text
|
package/molecules/Loader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import { generatePagination } from './Pagination.helper';
|
|
3
|
-
import
|
|
3
|
+
import { ScrollerLabels } from '../types/ScrollerLabels';
|
|
4
4
|
export interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
5
5
|
/**
|
|
6
6
|
* The current page number (must be >= 1)
|
package/molecules/Popin.d.ts
CHANGED
package/molecules/Spinner.d.ts
CHANGED
package/molecules/Tabs/Tab.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import './Tab.css';
|
|
1
|
+
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import { Theme } from './theme';
|
|
4
3
|
interface Props {
|
|
5
4
|
className?: string;
|
|
6
5
|
/**
|