@shlinkio/shlink-frontend-kit 0.8.5 → 0.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,14 @@
1
- import { jsx as o, jsxs as m, Fragment as N } from "react/jsx-runtime";
2
- import { faCircleNotch as A, faSearch as I, faEllipsisV as E, faSortAmountUp as F, faSortAmountDown as P } from "@fortawesome/free-solid-svg-icons";
3
- import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
1
+ import { jsx as o, jsxs as m, Fragment as g } from "react/jsx-runtime";
2
+ import { faCircleNotch as R, faSearch as A, faEllipsisV as I, faSortAmountUp as E, faSortAmountDown as P } from "@fortawesome/free-solid-svg-icons";
3
+ import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
4
4
  import { clsx as u } from "clsx";
5
- import { Card as C, CardHeader as H, CardBody as M, Dropdown as $, DropdownToggle as k, DropdownMenu as v, NavItem as j, NavLink as G, Nav as U, UncontrolledDropdown as V, DropdownItem as w } from "reactstrap";
6
- import { useId as S, useState as p, useRef as y, useMemo as q, useCallback as f, Children as Q, isValidElement as Y, useEffect as W } from "react";
7
- import { useLocation as z, NavLink as J } from "react-router";
8
- import { u as X } from "./use-timeout-BbfWTbuj.js";
9
- const be = ({ className: e, children: t, loading: r = !1, type: n = "default", fullWidth: s = !1 }) => /* @__PURE__ */ o(
10
- C,
5
+ import { Card as N, CardHeader as F, CardBody as H, Dropdown as M, DropdownToggle as T, DropdownMenu as k, NavItem as $, NavLink as j, Nav as G, UncontrolledDropdown as U, DropdownItem as w } from "reactstrap";
6
+ import { useId as v, useState as b, useMemo as V, useRef as q, useCallback as S, Children as Q, isValidElement as Y, useEffect as W } from "react";
7
+ import { u as z, a as J } from "./use-toggle-DlYE68B3.js";
8
+ import { b as Ue } from "./use-toggle-DlYE68B3.js";
9
+ import { useLocation as X, NavLink as Z } from "react-router";
10
+ const be = ({ className: e, children: r, loading: t = !1, type: n = "default", fullWidth: s = !1 }) => /* @__PURE__ */ o(
11
+ N,
11
12
  {
12
13
  body: !0,
13
14
  className: u(e, {
@@ -23,193 +24,190 @@ const be = ({ className: e, children: t, loading: r = !1, type: n = "default", f
23
24
  "text-danger": n === "error"
24
25
  }),
25
26
  children: [
26
- r && /* @__PURE__ */ o(g, { icon: A, spin: !0 }),
27
- r && /* @__PURE__ */ o("span", { className: "ms-2", children: t ?? "Loading..." }),
28
- !r && t
27
+ t && /* @__PURE__ */ o(p, { icon: R, spin: !0 }),
28
+ t && /* @__PURE__ */ o("span", { className: "ms-2", children: r ?? "Loading..." }),
29
+ !t && r
29
30
  ]
30
31
  }
31
32
  )
32
33
  }
33
- ), Z = ({ title: e, children: t, bodyClassName: r, ...n }) => /* @__PURE__ */ m(C, { ...n, children: [
34
- e && /* @__PURE__ */ o(H, { role: "heading", "aria-level": 4, children: e }),
35
- /* @__PURE__ */ o(M, { className: r, children: t })
36
- ] }), ge = ({ children: e, type: t, className: r, small: n = !1 }) => /* @__PURE__ */ o(
37
- Z,
34
+ ), B = ({ title: e, children: r, bodyClassName: t, ...n }) => /* @__PURE__ */ m(N, { ...n, children: [
35
+ e && /* @__PURE__ */ o(F, { role: "heading", "aria-level": 4, children: e }),
36
+ /* @__PURE__ */ o(H, { className: t, children: r })
37
+ ] }), we = ({ children: e, type: r, className: t, small: n = !1 }) => /* @__PURE__ */ o(
38
+ B,
38
39
  {
39
40
  role: "document",
40
41
  className: u("text-center", {
41
42
  "w-75 mx-auto": !n,
42
43
  "w-100": n,
43
- "bg-main": t === "success",
44
- "bg-danger": t === "error",
45
- "bg-warning": t === "warning",
46
- "text-white": t !== "warning"
47
- }, r),
44
+ "bg-main": r === "success",
45
+ "bg-danger": r === "error",
46
+ "bg-warning": r === "warning",
47
+ "text-white": r !== "warning"
48
+ }, t),
48
49
  bodyClassName: u({ "p-2": n }),
49
50
  children: e
50
51
  }
51
- ), O = ({ checked: e = !1, onChange: t, className: r, children: n, type: s, inline: c = !1 }) => {
52
- const a = S(), l = (h) => t == null ? void 0 : t(h.target.checked, h), i = {
52
+ ), y = ({ checked: e = !1, onChange: r, className: t, children: n, type: s, inline: c = !1 }) => {
53
+ const i = v(), a = (h) => r == null ? void 0 : r(h.target.checked, h), l = {
53
54
  "form-switch": s === "switch",
54
55
  "form-checkbox": s === "checkbox"
55
56
  }, d = c ? { display: "inline-block" } : {};
56
- return /* @__PURE__ */ m("span", { className: u("form-check", i, r), style: d, children: [
57
- /* @__PURE__ */ o("input", { type: "checkbox", className: "form-check-input", id: a, checked: e, onChange: l }),
58
- /* @__PURE__ */ o("label", { className: "form-check-label", htmlFor: a, children: n })
57
+ return /* @__PURE__ */ m("span", { className: u("form-check", l, t), style: d, children: [
58
+ /* @__PURE__ */ o("input", { type: "checkbox", className: "form-check-input", id: i, checked: e, onChange: a }),
59
+ /* @__PURE__ */ o("label", { className: "form-check-label", htmlFor: i, children: n })
59
60
  ] });
60
- }, we = (e) => /* @__PURE__ */ o(O, { type: "checkbox", ...e }), Ne = (e) => /* @__PURE__ */ o(O, { type: "switch", ...e }), B = ({ children: e, label: t, className: r = "", labelClassName: n = "", noMargin: s = !1, id: c }) => /* @__PURE__ */ m("div", { className: `${r} ${s ? "" : "mb-3"}`, children: [
61
- /* @__PURE__ */ o("label", { className: `form-label ${n}`, htmlFor: c, children: t }),
61
+ }, ge = (e) => /* @__PURE__ */ o(y, { type: "checkbox", ...e }), Ne = (e) => /* @__PURE__ */ o(y, { type: "switch", ...e }), K = ({ children: e, label: r, className: t = "", labelClassName: n = "", noMargin: s = !1, id: c }) => /* @__PURE__ */ m("div", { className: `${t} ${s ? "" : "mb-3"}`, children: [
62
+ /* @__PURE__ */ o("label", { className: `form-label ${n}`, htmlFor: c, children: r }),
62
63
  e
63
- ] }), Ce = ({ children: e, value: t, onChange: r, type: n, required: s, placeholder: c, className: a, labelClassName: l }) => {
64
- const i = S();
65
- return /* @__PURE__ */ o(B, { label: /* @__PURE__ */ m(N, { children: [
64
+ ] }), Ce = ({ children: e, value: r, onChange: t, type: n, required: s, placeholder: c, className: i, labelClassName: a }) => {
65
+ const l = v();
66
+ return /* @__PURE__ */ o(K, { label: /* @__PURE__ */ m(g, { children: [
66
67
  e,
67
68
  ":"
68
- ] }), className: a, labelClassName: l, id: i, children: /* @__PURE__ */ o(
69
+ ] }), className: i, labelClassName: a, id: l, children: /* @__PURE__ */ o(
69
70
  "input",
70
71
  {
71
- id: i,
72
+ id: l,
72
73
  className: "form-control",
73
74
  type: n ?? "text",
74
- value: t,
75
+ value: r,
75
76
  required: s ?? !0,
76
77
  placeholder: c,
77
- onChange: (d) => r(d.target.value)
78
+ onChange: (d) => t(d.target.value)
78
79
  }
79
80
  ) });
80
- }, K = 500;
81
- let b;
81
+ }, ee = 500;
82
+ let f;
82
83
  const _ = () => {
83
- b !== null && clearTimeout(b), b = null;
84
- }, Te = ({ onChange: e, className: t, large: r = !0, noBorder: n = !1, initialValue: s = "", setTimeout_: c = setTimeout }) => {
85
- const [a, l] = p(s), i = (d, h = K) => {
86
- l(d), _(), b = c(() => {
84
+ f !== null && clearTimeout(f), f = null;
85
+ }, _e = ({ onChange: e, className: r, large: t = !0, noBorder: n = !1, initialValue: s = "", setTimeout_: c = setTimeout }) => {
86
+ const [i, a] = b(s), l = (d, h = ee) => {
87
+ a(d), _(), f = c(() => {
87
88
  e(d), _();
88
89
  }, h);
89
90
  };
90
- return /* @__PURE__ */ m("div", { className: u("search-field", t), children: [
91
+ return /* @__PURE__ */ m("div", { className: u("search-field", r), children: [
91
92
  /* @__PURE__ */ o(
92
93
  "input",
93
94
  {
94
95
  type: "text",
95
96
  className: u("form-control search-field__input", {
96
- "form-control-lg": r,
97
+ "form-control-lg": t,
97
98
  "search-field__input--no-border": n
98
99
  }),
99
100
  placeholder: "Search...",
100
- value: a,
101
- onChange: (d) => i(d.target.value)
101
+ value: i,
102
+ onChange: (d) => l(d.target.value)
102
103
  }
103
104
  ),
104
- /* @__PURE__ */ o(g, { icon: I, className: "search-field__icon" }),
105
+ /* @__PURE__ */ o(p, { icon: A, className: "search-field__icon" }),
105
106
  /* @__PURE__ */ o(
106
107
  "button",
107
108
  {
108
109
  "aria-label": "Clear search",
109
110
  type: "button",
110
111
  className: "close search-field__close btn-close",
111
- hidden: a === "",
112
+ hidden: i === "",
112
113
  id: "search-field__close",
113
- onClick: () => i("", 0)
114
+ onClick: () => l("", 0)
114
115
  }
115
116
  )
116
117
  ] });
117
- }, _e = () => y(null), ee = (e) => {
118
- const t = new URLSearchParams(e), r = {};
119
- return t.forEach((n, s) => {
118
+ }, re = (e) => {
119
+ const r = new URLSearchParams(e), t = {};
120
+ return r.forEach((n, s) => {
120
121
  if (s.endsWith("[]")) {
121
122
  const c = s.slice(0, -2);
122
- r[c] ?? (r[c] = []), r[c].push(n);
123
+ t[c] ?? (t[c] = []), t[c].push(n);
123
124
  } else
124
- r[s] = n;
125
- }), r;
126
- }, ke = (e) => {
127
- const t = new URLSearchParams();
128
- for (const [r, n] of Object.entries(e))
129
- n !== void 0 && (Array.isArray(n) ? n.forEach((s) => t.append(`${r}[]`, `${s}`)) : t.append(r, `${n}`));
130
- return t.toString();
131
- }, ve = () => {
132
- const { search: e } = z();
133
- return q(() => ee(e), [e]);
134
- }, te = 2e3, Se = (e = {}, t, r = globalThis.setTimeout, n = globalThis.clearTimeout) => {
125
+ t[s] = n;
126
+ }), t;
127
+ }, Te = (e) => {
128
+ const r = new URLSearchParams();
129
+ for (const [t, n] of Object.entries(e))
130
+ n !== void 0 && (Array.isArray(n) ? n.forEach((s) => r.append(`${t}[]`, `${s}`)) : r.append(t, `${n}`));
131
+ return r.toString();
132
+ }, ke = () => {
133
+ const { search: e } = X();
134
+ return V(() => re(e), [e]);
135
+ }, te = 2e3, ve = (e = {}, r, t = globalThis.setTimeout, n = globalThis.clearTimeout) => {
135
136
  const { initialValue: s = !1, delay: c = te } = typeof e == "boolean" ? {
136
137
  initialValue: e,
137
- delay: t
138
- } : e, { setTimeout: a } = X(c, r, n), [l, i] = p(s), d = y(s), h = f(() => {
139
- i(!d.current), a(() => i(d.current));
140
- }, [a]);
141
- return [l, h];
142
- }, re = (e = !1) => {
143
- const [t, r] = p(e), n = f(() => r((a) => !a), []), s = f(() => r(!0), []), c = f(() => r(!1), []);
144
- return [t, n, s, c];
138
+ delay: r
139
+ } : e, { setTimeout: i } = z(c, t, n), [a, l] = b(s), d = q(s), h = S(() => {
140
+ l(!d.current), i(() => l(d.current));
141
+ }, [i]);
142
+ return [a, h];
145
143
  }, ne = ({
146
144
  text: e,
147
- disabled: t = !1,
148
- className: r,
145
+ disabled: r = !1,
146
+ className: t,
149
147
  children: n,
150
148
  dropdownClassName: s,
151
149
  noCaret: c,
152
- end: a = !1,
153
- minWidth: l,
154
- inline: i,
150
+ end: i = !1,
151
+ minWidth: a,
152
+ inline: l,
155
153
  size: d,
156
154
  ...h
157
155
  }) => {
158
- const [L, x] = re(), D = u("dropdown-btn__toggle", r, {
159
- "btn-block": !i,
156
+ const [O, L] = J(), x = u("dropdown-btn__toggle", t, {
157
+ "btn-block": !l,
160
158
  "dropdown-btn__toggle--with-caret": !c
161
- }), R = { minWidth: l && `${l}px` };
162
- return /* @__PURE__ */ m($, { isOpen: L, toggle: x, disabled: t, className: s, children: [
163
- /* @__PURE__ */ o(k, { size: d, caret: !c, className: D, color: "primary", ...h, children: e }),
164
- /* @__PURE__ */ o(v, { className: "w-100", end: a, style: R, children: n })
159
+ }), D = { minWidth: a && `${a}px` };
160
+ return /* @__PURE__ */ m(M, { isOpen: O, toggle: L, disabled: r, className: s, children: [
161
+ /* @__PURE__ */ o(T, { size: d, caret: !c, className: x, color: "primary", ...h, children: e }),
162
+ /* @__PURE__ */ o(k, { className: "w-100", end: i, style: D, children: n })
165
163
  ] });
166
- }, ye = ({ children: e, minWidth: t, label: r = "Options" }) => /* @__PURE__ */ o(
164
+ }, Se = ({ children: e, minWidth: r, label: t = "Options" }) => /* @__PURE__ */ o(
167
165
  ne,
168
166
  {
169
- text: /* @__PURE__ */ o(g, { className: "px-1", icon: E }),
170
- "aria-label": r,
167
+ text: /* @__PURE__ */ o(p, { className: "px-1", icon: I }),
168
+ "aria-label": t,
171
169
  size: "sm",
172
- minWidth: t,
170
+ minWidth: r,
173
171
  end: !0,
174
172
  noCaret: !0,
175
173
  inline: !0,
176
174
  children: e
177
175
  }
178
- ), oe = ({ children: e, ...t }) => /* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(G, { className: "nav-pills__nav-link", tag: J, ...t, children: e }) }), Oe = ({ children: e, fill: t = !1, className: r = "" }) => /* @__PURE__ */ o(C, { className: `nav-pills__nav p-0 overflow-hidden ${r}`, body: !0, children: /* @__PURE__ */ o(U, { pills: !0, fill: t, children: Q.map(e, (n) => {
176
+ ), oe = ({ children: e, ...r }) => /* @__PURE__ */ o($, { children: /* @__PURE__ */ o(j, { className: "nav-pills__nav-link", tag: Z, ...r, children: e }) }), ye = ({ children: e, fill: r = !1, className: t = "" }) => /* @__PURE__ */ o(N, { className: `nav-pills__nav p-0 overflow-hidden ${t}`, body: !0, children: /* @__PURE__ */ o(G, { pills: !0, fill: r, children: Q.map(e, (n) => {
179
177
  if (!Y(n) || n.type !== oe)
180
178
  throw new Error("Only NavPillItem children are allowed inside NavPills.");
181
179
  return n;
182
180
  }) }) });
183
- function T(e, t, r) {
184
- return typeof e == "object" ? T(e.currentField, e.newField, e.currentOrderDir) : e !== t ? "ASC" : r ? {
181
+ function C(e, r, t) {
182
+ return typeof e == "object" ? C(e.currentField, e.newField, e.currentOrderDir) : e !== r ? "ASC" : t ? {
185
183
  ASC: "DESC",
186
184
  DESC: void 0
187
- }[r] : "ASC";
185
+ }[t] : "ASC";
188
186
  }
189
- function se(e, t, r) {
187
+ function se(e, r, t) {
190
188
  return typeof e == "object" ? se(e.currentField, e.newField, e.currentOrderDir) : {
191
- field: t,
192
- dir: T(e, t, r)
189
+ field: r,
190
+ dir: C(e, r, t)
193
191
  };
194
192
  }
195
- const Le = (e, { field: t, dir: r }) => !t || !r ? e : e.sort((n, s) => {
196
- const c = r === "ASC" ? 1 : -1, a = r === "ASC" ? -1 : 1;
197
- return n[t] > s[t] ? c : a;
198
- }), xe = (e) => e.dir ? `${e.field}-${e.dir}` : void 0, De = (e) => {
199
- const [t, r] = e.split("-");
200
- return { field: t, dir: r };
201
- }, Re = (e) => {
202
- const [t, r] = p(e), n = f((s, c) => r({ field: s, dir: c }), []);
203
- return [t, n];
193
+ const Oe = (e, { field: r, dir: t }) => !r || !t ? e : e.sort((n, s) => {
194
+ const c = t === "ASC" ? 1 : -1, i = t === "ASC" ? -1 : 1;
195
+ return n[r] > s[r] ? c : i;
196
+ }), Le = (e) => e.dir ? `${e.field}-${e.dir}` : void 0, xe = (e) => {
197
+ const [r, t] = e.split("-");
198
+ return { field: r, dir: t };
199
+ }, De = (e) => {
200
+ const [r, t] = b(e), n = S((s, c) => t({ field: s, dir: c }), []);
201
+ return [r, n];
204
202
  };
205
- function Ae({ items: e, order: t, onChange: r, isButton: n = !0, right: s = !1, prefixed: c = !0 }) {
206
- const a = (l) => () => {
207
- const i = T(l, t.field, t.dir);
208
- r(i ? l : void 0, i);
203
+ function Re({ items: e, order: r, onChange: t, isButton: n = !0, right: s = !1, prefixed: c = !0 }) {
204
+ const i = (a) => () => {
205
+ const l = C(a, r.field, r.dir);
206
+ t(l ? a : void 0, l);
209
207
  };
210
- return /* @__PURE__ */ m(V, { children: [
208
+ return /* @__PURE__ */ m(U, { children: [
211
209
  /* @__PURE__ */ m(
212
- k,
210
+ T,
213
211
  {
214
212
  caret: !0,
215
213
  color: n ? "primary" : "link",
@@ -218,83 +216,83 @@ function Ae({ items: e, order: t, onChange: r, isButton: n = !0, right: s = !1,
218
216
  "btn-sm p-0": !n
219
217
  }),
220
218
  children: [
221
- !n && /* @__PURE__ */ o(N, { children: "Order by" }),
222
- n && !t.field && /* @__PURE__ */ o("i", { children: "Order by..." }),
223
- n && t.field && /* @__PURE__ */ m(N, { children: [
219
+ !n && /* @__PURE__ */ o(g, { children: "Order by" }),
220
+ n && !r.field && /* @__PURE__ */ o("i", { children: "Order by..." }),
221
+ n && r.field && /* @__PURE__ */ m(g, { children: [
224
222
  c && "Order by: ",
225
- e[t.field],
223
+ e[r.field],
226
224
  " - ",
227
- /* @__PURE__ */ o("small", { children: t.dir ?? "DESC" })
225
+ /* @__PURE__ */ o("small", { children: r.dir ?? "DESC" })
228
226
  ] })
229
227
  ]
230
228
  }
231
229
  ),
232
- /* @__PURE__ */ m(v, { end: s, className: "w-100", style: n ? void 0 : { minWidth: "11rem" }, children: [
233
- Object.entries(e).map(([l, i]) => /* @__PURE__ */ m(
230
+ /* @__PURE__ */ m(k, { end: s, className: "w-100", style: n ? void 0 : { minWidth: "11rem" }, children: [
231
+ Object.entries(e).map(([a, l]) => /* @__PURE__ */ m(
234
232
  w,
235
233
  {
236
- active: t.field === l,
237
- onClick: a(l),
234
+ active: r.field === a,
235
+ onClick: i(a),
238
236
  className: "d-flex justify-content-between align-items-center",
239
237
  children: [
240
- i,
241
- t.field === l && /* @__PURE__ */ o(g, { icon: t.dir === "ASC" ? F : P })
238
+ l,
239
+ r.field === a && /* @__PURE__ */ o(p, { icon: r.dir === "ASC" ? E : P })
242
240
  ]
243
241
  },
244
- l
242
+ a
245
243
  )),
246
244
  /* @__PURE__ */ o(w, { divider: !0 }),
247
- /* @__PURE__ */ o(w, { disabled: !t.field, onClick: () => r(), children: /* @__PURE__ */ o("i", { children: "Clear selection" }) })
245
+ /* @__PURE__ */ o(w, { disabled: !r.field, onClick: () => t(), children: /* @__PURE__ */ o("i", { children: "Clear selection" }) })
248
246
  ] })
249
247
  ] });
250
248
  }
251
- const Ie = "#4696e5", Ee = "rgba(70, 150, 229, 0.4)", Fe = "#f77f28", Pe = "rgba(247, 127, 40, 0.4)", He = "white", Me = "#161b22", ce = (e) => {
252
- var t;
253
- return (t = document.querySelector("html")) == null ? void 0 : t.setAttribute("data-theme", e);
254
- }, $e = () => {
249
+ const Ae = "#4696e5", Ie = "rgba(70, 150, 229, 0.4)", Ee = "#f77f28", Pe = "rgba(247, 127, 40, 0.4)", Fe = "white", He = "#161b22", ce = (e) => {
250
+ var r;
251
+ return (r = document.querySelector("html")) == null ? void 0 : r.setAttribute("data-theme", e);
252
+ }, Me = () => {
255
253
  var e;
256
254
  return ((e = document.querySelector("html")) == null ? void 0 : e.getAttribute("data-theme")) === "dark";
257
- }, ae = (e = window.matchMedia.bind(window)) => e("(prefers-color-scheme: dark)").matches ? "dark" : "light", je = (e) => {
258
- const [t, r] = p(() => e ?? ae());
255
+ }, ae = (e = window.matchMedia.bind(window)) => e("(prefers-color-scheme: dark)").matches ? "dark" : "light", $e = (e) => {
256
+ const [r, t] = b(() => e ?? ae());
259
257
  return W(() => {
260
- ce(t);
261
- }, [t]), [t, r];
258
+ ce(r);
259
+ }, [r]), [r, t];
262
260
  };
263
261
  export {
264
- we as Checkbox,
262
+ ge as Checkbox,
265
263
  ne as DropdownBtn,
266
- Fe as HIGHLIGHTED_COLOR,
264
+ Ee as HIGHLIGHTED_COLOR,
267
265
  Pe as HIGHLIGHTED_COLOR_ALPHA,
268
266
  Ce as InputFormGroup,
269
- B as LabeledFormGroup,
270
- Ie as MAIN_COLOR,
271
- Ee as MAIN_COLOR_ALPHA,
267
+ K as LabeledFormGroup,
268
+ Ae as MAIN_COLOR,
269
+ Ie as MAIN_COLOR_ALPHA,
272
270
  be as Message,
273
271
  oe as NavPillItem,
274
- Oe as NavPills,
275
- Ae as OrderingDropdown,
276
- Me as PRIMARY_DARK_COLOR,
277
- He as PRIMARY_LIGHT_COLOR,
278
- ge as Result,
279
- ye as RowDropdownBtn,
280
- Te as SearchField,
281
- Z as SimpleCard,
272
+ ye as NavPills,
273
+ Re as OrderingDropdown,
274
+ He as PRIMARY_DARK_COLOR,
275
+ Fe as PRIMARY_LIGHT_COLOR,
276
+ we as Result,
277
+ Se as RowDropdownBtn,
278
+ _e as SearchField,
279
+ B as SimpleCard,
282
280
  Ne as ToggleSwitch,
283
281
  ce as changeThemeInMarkup,
284
282
  se as determineOrder,
285
- T as determineOrderDir,
283
+ C as determineOrderDir,
286
284
  ae as getSystemPreferredTheme,
287
- $e as isDarkThemeEnabled,
288
- xe as orderToString,
289
- ee as parseQueryString,
290
- Le as sortList,
291
- De as stringToOrder,
292
- ke as stringifyQueryParams,
293
- _e as useElementRef,
294
- Re as useOrder,
295
- ve as useParsedQuery,
296
- je as useTheme,
297
- X as useTimeout,
298
- Se as useTimeoutToggle,
299
- re as useToggle
285
+ Me as isDarkThemeEnabled,
286
+ Le as orderToString,
287
+ re as parseQueryString,
288
+ Oe as sortList,
289
+ xe as stringToOrder,
290
+ Te as stringifyQueryParams,
291
+ Ue as useElementRef,
292
+ De as useOrder,
293
+ ke as useParsedQuery,
294
+ $e as useTheme,
295
+ z as useTimeout,
296
+ ve as useTimeoutToggle,
297
+ J as useToggle
300
298
  };
@@ -1,10 +1,12 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { FC } from 'react';
3
+ import { ForwardRefExoticComponent } from 'react';
3
4
  import { HTMLProps } from 'react';
4
5
  import { InputHTMLAttributes } from 'react';
5
6
  import { LinkProps } from 'react-router';
6
7
  import { PropsWithChildren } from 'react';
7
8
  import { ReactNode } from 'react';
9
+ import { RefAttributes } from 'react';
8
10
 
9
11
  export declare type BaseInputProps = {
10
12
  size?: Size;
@@ -21,6 +23,7 @@ export declare type ButtonProps = PropsWithChildren<{
21
23
  disabled?: boolean;
22
24
  className?: string;
23
25
  variant?: 'primary' | 'secondary' | 'danger';
26
+ type?: HTMLButtonElement['type'];
24
27
  size?: Size;
25
28
  inline?: boolean;
26
29
  solid?: boolean;
@@ -54,7 +57,7 @@ export declare type CellProps = HTMLProps<HTMLTableCellElement> & {
54
57
  type?: 'td' | 'th';
55
58
  };
56
59
 
57
- export declare const Checkbox: FC<CheckboxProps>;
60
+ export declare const Checkbox: ForwardRefExoticComponent<Omit<BooleanControlProps, "ref"> & RefAttributes<HTMLInputElement>>;
58
61
 
59
62
  export declare type CheckboxProps = BooleanControlProps;
60
63
 
@@ -86,9 +89,11 @@ export declare type ExitAction = 'confirm' | 'cancel';
86
89
 
87
90
  export declare const formatNumber: (number: number | string) => string;
88
91
 
89
- export declare const Input: FC<InputProps>;
92
+ export declare const Input: ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "checked" | "size"> & BaseInputProps & {
93
+ borderless?: boolean;
94
+ } & RefAttributes<HTMLInputElement>>;
90
95
 
91
- export declare type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> & BaseInputProps & {
96
+ export declare type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'checked' | 'defaultChecked'> & BaseInputProps & {
92
97
  borderless?: boolean;
93
98
  };
94
99
 
@@ -96,7 +101,13 @@ export declare const keyForPage: (pageNumber: NumberOrEllipsis, index: number) =
96
101
 
97
102
  export declare const Label: FC<LabelProps>;
98
103
 
99
- export declare const LabelledInput: FC<LabelledInputProps>;
104
+ export declare const LabelledInput: ForwardRefExoticComponent<Omit<InputProps, "className" | "id" | "feedback"> & {
105
+ label: RequiredReactNode;
106
+ inputClassName?: string;
107
+ error?: string;
108
+ /** Alternative to `required`. Causes the input to be required, without displaying an asterisk */
109
+ hiddenRequired?: boolean;
110
+ } & RefAttributes<HTMLInputElement>>;
100
111
 
101
112
  export declare type LabelledInputProps = Omit<InputProps, 'className' | 'id' | 'feedback'> & {
102
113
  label: RequiredReactNode;
@@ -106,7 +117,23 @@ export declare type LabelledInputProps = Omit<InputProps, 'className' | 'id' | '
106
117
  hiddenRequired?: boolean;
107
118
  };
108
119
 
109
- export declare const LabelledSelect: FC<LabelledSelectProps>;
120
+ export declare const LabelledRevealablePasswordInput: ForwardRefExoticComponent<Omit<RevealablePasswordInputProps, "className" | "id" | "feedback"> & {
121
+ label: RequiredReactNode;
122
+ inputClassName?: string;
123
+ error?: string;
124
+ /** Alternative to `required`. Causes the input to be required, without displaying an asterisk */
125
+ hiddenRequired?: boolean;
126
+ } & RefAttributes<HTMLInputElement>>;
127
+
128
+ export declare type LabelledRevealablePasswordInputProps = Omit<RevealablePasswordInputProps, 'className' | 'id' | 'feedback'> & {
129
+ label: RequiredReactNode;
130
+ inputClassName?: string;
131
+ error?: string;
132
+ /** Alternative to `required`. Causes the input to be required, without displaying an asterisk */
133
+ hiddenRequired?: boolean;
134
+ };
135
+
136
+ export declare const LabelledSelect: ForwardRefExoticComponent<Omit<LabelledSelectProps, "ref"> & RefAttributes<HTMLSelectElement>>;
110
137
 
111
138
  export declare type LabelledSelectProps = Omit<SelectProps, 'className' | 'id'> & {
112
139
  label: RequiredReactNode;
@@ -183,7 +210,7 @@ export declare const prettifyPageNumber: (pageNumber: NumberOrEllipsis) => strin
183
210
 
184
211
  export declare const progressivePagination: (currentPage: number, pageCount: number) => NumberOrEllipsis[];
185
212
 
186
- declare type RegularButtonProps = Omit<HTMLProps<HTMLButtonElement>, 'size'>;
213
+ declare type RegularButtonProps = Omit<HTMLProps<HTMLButtonElement>, 'size' | 'type'>;
187
214
 
188
215
  declare type RegularCardModalProps = CommonCardModalProps & {
189
216
  /** Danger dialogs use danger variants in title and confirm button */
@@ -218,9 +245,21 @@ export declare type ResultProps = PropsWithChildren<{
218
245
  size?: Size;
219
246
  }>;
220
247
 
248
+ export declare const RevealablePasswordInput: ForwardRefExoticComponent<Omit<InputProps, "type"> & {
249
+ containerClassName?: string;
250
+ } & RefAttributes<HTMLInputElement>>;
251
+
252
+ export declare type RevealablePasswordInputProps = Omit<InputProps, 'type'> & {
253
+ containerClassName?: string;
254
+ };
255
+
221
256
  export declare const roundTen: (number: number) => number;
222
257
 
223
- export declare const SearchInput: FC<SearchInputProps>;
258
+ export declare const SearchInput: ForwardRefExoticComponent<Omit<InputProps, "className" | "onChange" | "value"> & {
259
+ onChange: (searchTerm: string) => void;
260
+ containerClassName?: string;
261
+ inputClassName?: string;
262
+ } & RefAttributes<HTMLInputElement>>;
224
263
 
225
264
  export declare type SearchInputProps = Omit<InputProps, 'className' | 'onChange' | 'value'> & {
226
265
  onChange: (searchTerm: string) => void;
@@ -230,9 +269,9 @@ export declare type SearchInputProps = Omit<InputProps, 'className' | 'onChange'
230
269
 
231
270
  export declare type SectionType = 'head' | 'body' | 'footer';
232
271
 
233
- export declare const Select: FC<SelectProps>;
272
+ export declare const Select: ForwardRefExoticComponent<Omit<SelectProps, "ref"> & RefAttributes<HTMLSelectElement>>;
234
273
 
235
- declare type SelectElementProps = Omit<HTMLProps<HTMLSelectElement>, 'size'>;
274
+ declare type SelectElementProps = Omit<HTMLProps<HTMLSelectElement>, 'size' | 'checked' | 'defaultChecked'>;
236
275
 
237
276
  export declare type SelectProps = PropsWithChildren<SelectElementProps & BaseInputProps>;
238
277
 
@@ -268,7 +307,7 @@ declare type TitleProps = {
268
307
  titleSize?: Size;
269
308
  };
270
309
 
271
- export declare const ToggleSwitch: FC<ToggleSwitchProps>;
310
+ export declare const ToggleSwitch: ForwardRefExoticComponent<Omit<BooleanControlProps, "ref"> & RefAttributes<HTMLInputElement>>;
272
311
 
273
312
  export declare type ToggleSwitchProps = BooleanControlProps;
274
313