@shlinkio/shlink-frontend-kit 0.6.0 → 0.7.1

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +7 -8
  2. package/dist/index.js +162 -152
  3. package/package.json +23 -25
package/dist/index.d.ts CHANGED
@@ -2,11 +2,10 @@ import { CardProps } from 'reactstrap';
2
2
  import { ChangeEvent } from 'react';
3
3
  import { DropdownToggleProps } from 'reactstrap/types/lib/DropdownToggle';
4
4
  import { FC } from 'react';
5
- import { InputType } from 'reactstrap/types/lib/Input';
6
- import { JSX as JSX_2 } from 'react/jsx-runtime';
7
- import { MutableRefObject } from 'react';
5
+ import { JSX } from 'react/jsx-runtime';
8
6
  import { PropsWithChildren } from 'react';
9
7
  import { ReactNode } from 'react';
8
+ import { RefObject } from 'react';
10
9
 
11
10
  declare type BooleanControlProps = PropsWithChildren<{
12
11
  checked?: boolean;
@@ -50,7 +49,7 @@ export declare const InputFormGroup: FC<InputFormGroupProps>;
50
49
  export declare type InputFormGroupProps = PropsWithChildren<{
51
50
  value: string;
52
51
  onChange: (newValue: string) => void;
53
- type?: InputType;
52
+ type?: HTMLInputElement['type'];
54
53
  required?: boolean;
55
54
  placeholder?: string;
56
55
  className?: string;
@@ -105,7 +104,7 @@ export declare type Order<Fields> = {
105
104
 
106
105
  export declare type OrderDir = 'ASC' | 'DESC' | undefined;
107
106
 
108
- export declare function OrderingDropdown<T extends string = string>({ items, order, onChange, isButton, right, prefixed }: OrderingDropdownProps<T>): JSX_2.Element;
107
+ export declare function OrderingDropdown<T extends string = string>({ items, order, onChange, isButton, right, prefixed }: OrderingDropdownProps<T>): JSX.Element;
109
108
 
110
109
  export declare type OrderingDropdownProps<T extends string = string> = {
111
110
  items: Record<T, string>;
@@ -140,7 +139,7 @@ export declare type ResultType = 'success' | 'error' | 'warning';
140
139
 
141
140
  export declare const RowDropdownBtn: FC<DropdownBtnMenuProps>;
142
141
 
143
- export declare const SearchField: ({ onChange, className, large, noBorder, initialValue, setTimeout_ }: SearchFieldProps) => JSX_2.Element;
142
+ export declare const SearchField: ({ onChange, className, large, noBorder, initialValue, setTimeout_ }: SearchFieldProps) => JSX.Element;
144
143
 
145
144
  declare type SearchFieldProps = {
146
145
  onChange: (value: string) => void;
@@ -151,7 +150,7 @@ declare type SearchFieldProps = {
151
150
  setTimeout_?: typeof setTimeout;
152
151
  };
153
152
 
154
- export declare const SimpleCard: ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => JSX_2.Element;
153
+ export declare const SimpleCard: ({ title, children, bodyClassName, ...rest }: SimpleCardProps) => JSX.Element;
155
154
 
156
155
  export declare type SimpleCardProps = Omit<CardProps, 'title'> & {
157
156
  title?: ReactNode;
@@ -178,7 +177,7 @@ declare type ToggleResult = [boolean, () => void, () => void, () => void];
178
177
 
179
178
  export declare const ToggleSwitch: FC<BooleanControlProps>;
180
179
 
181
- export declare const useElementRef: <T>() => MutableRefObject<T | null>;
180
+ export declare const useElementRef: <T>() => RefObject<T | null>;
182
181
 
183
182
  export declare const useOrder: <T>(initialOrder: Order<T>) => [Order<T>, (orderField?: T, orderDir?: OrderDir) => void];
184
183
 
package/dist/index.js CHANGED
@@ -1,58 +1,68 @@
1
1
  import { jsx as s, jsxs as d, Fragment as N } from "react/jsx-runtime";
2
- import { faCircleNotch as I, faSearch as D, faEllipsisV as E, faSortAmountUp as P, faSortAmountDown as F } from "@fortawesome/free-solid-svg-icons";
2
+ import { faCircleNotch as I, faSearch as y, faEllipsisV as D, faSortAmountUp as E, faSortAmountDown as P } from "@fortawesome/free-solid-svg-icons";
3
3
  import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
4
- import { clsx as m } from "clsx";
5
- import { Row as v, Card as _, CardHeader as H, CardBody as M, Dropdown as $, DropdownToggle as T, DropdownMenu as O, NavItem as G, NavLink as U, Nav as j, UncontrolledDropdown as q, DropdownItem as w } from "reactstrap";
6
- import { useId as S, useState as b, useCallback as f, useRef as C, useMemo as Q, Children as V, isValidElement as Y } from "react";
7
- import { useLocation as z, NavLink as J } from "react-router-dom";
8
- const W = (e) => ({
9
- error: "border-danger",
10
- default: ""
11
- })[e], X = (e) => ({
12
- error: "text-danger",
13
- default: "text-muted"
14
- })[e], he = ({ className: e, children: r, loading: t = !1, type: n = "default", fullWidth: o = !1 }) => {
15
- const c = m({
16
- "col-md-12": o,
17
- "col-md-10 offset-md-1": !o
18
- });
19
- return /* @__PURE__ */ s(v, { className: m("g-0", e), children: /* @__PURE__ */ s("div", { className: c, children: /* @__PURE__ */ s(_, { className: W(n), body: !0, children: /* @__PURE__ */ d("h3", { className: m("text-center mb-0", X(n)), children: [
20
- t && /* @__PURE__ */ s(g, { icon: I, spin: !0 }),
21
- t && /* @__PURE__ */ s("span", { className: "ms-2", children: r ?? "Loading..." }),
22
- !t && r
23
- ] }) }) }) });
24
- }, Z = ({ title: e, children: r, bodyClassName: t, ...n }) => /* @__PURE__ */ d(_, { ...n, children: [
25
- e && /* @__PURE__ */ s(H, { role: "heading", "aria-level": 4, children: e }),
26
- /* @__PURE__ */ s(M, { className: t, children: r })
27
- ] }), ue = ({ children: e, type: r, className: t, small: n = !1 }) => /* @__PURE__ */ s(v, { className: t, children: /* @__PURE__ */ s("div", { className: m({ "col-md-10 offset-md-1": !n, "col-12": n }), children: /* @__PURE__ */ s(
28
- Z,
4
+ import { clsx as h } from "clsx";
5
+ import { Card as C, CardHeader as F, CardBody as H, Dropdown as M, DropdownToggle as v, DropdownMenu as O, NavItem as $, NavLink as G, Nav as U, UncontrolledDropdown as j, DropdownItem as w } from "reactstrap";
6
+ import { useId as S, useState as b, useCallback as f, useRef as _, useMemo as q, Children as Q, isValidElement as V } from "react";
7
+ import { useLocation as Y, NavLink as z } from "react-router";
8
+ const ie = ({ className: r, children: e, loading: t = !1, type: n = "default", fullWidth: o = !1 }) => /* @__PURE__ */ s(
9
+ C,
29
10
  {
30
- role: "document",
31
- className: m("text-center", {
32
- "bg-main": r === "success",
33
- "bg-danger": r === "error",
34
- "bg-warning": r === "warning",
35
- "text-white": r !== "warning"
11
+ body: !0,
12
+ className: h(r, {
13
+ "w-100": o,
14
+ "w-75 mx-auto": !o,
15
+ "border-danger": n === "error"
36
16
  }),
37
- bodyClassName: m({ "p-2": n }),
38
- children: e
17
+ children: /* @__PURE__ */ d(
18
+ "h3",
19
+ {
20
+ className: h("text-center mb-0", {
21
+ "text-muted": n === "default",
22
+ "text-danger": n === "error"
23
+ }),
24
+ children: [
25
+ t && /* @__PURE__ */ s(g, { icon: I, spin: !0 }),
26
+ t && /* @__PURE__ */ s("span", { className: "ms-2", children: e ?? "Loading..." }),
27
+ !t && e
28
+ ]
29
+ }
30
+ )
31
+ }
32
+ ), J = ({ title: r, children: e, bodyClassName: t, ...n }) => /* @__PURE__ */ d(C, { ...n, children: [
33
+ r && /* @__PURE__ */ s(F, { role: "heading", "aria-level": 4, children: r }),
34
+ /* @__PURE__ */ s(H, { className: t, children: e })
35
+ ] }), de = ({ children: r, type: e, className: t, small: n = !1 }) => /* @__PURE__ */ s(
36
+ J,
37
+ {
38
+ role: "document",
39
+ className: h("text-center", {
40
+ "w-75 mx-auto": !n,
41
+ "w-100": n,
42
+ "bg-main": e === "success",
43
+ "bg-danger": e === "error",
44
+ "bg-warning": e === "warning",
45
+ "text-white": e !== "warning"
46
+ }, t),
47
+ bodyClassName: h({ "p-2": n }),
48
+ children: r
39
49
  }
40
- ) }) }), A = ({ checked: e = !1, onChange: r, className: t, children: n, type: o, inline: c = !1 }) => {
41
- const l = S(), a = (u) => r == null ? void 0 : r(u.target.checked, u), i = {
50
+ ), A = ({ checked: r = !1, onChange: e, className: t, children: n, type: o, inline: c = !1 }) => {
51
+ const l = S(), a = (u) => e == null ? void 0 : e(u.target.checked, u), i = {
42
52
  "form-switch": o === "switch",
43
53
  "form-checkbox": o === "checkbox"
44
- }, h = c ? { display: "inline-block" } : {};
45
- return /* @__PURE__ */ d("span", { className: m("form-check", i, t), style: h, children: [
46
- /* @__PURE__ */ s("input", { type: "checkbox", className: "form-check-input", id: l, checked: e, onChange: a }),
54
+ }, m = c ? { display: "inline-block" } : {};
55
+ return /* @__PURE__ */ d("span", { className: h("form-check", i, t), style: m, children: [
56
+ /* @__PURE__ */ s("input", { type: "checkbox", className: "form-check-input", id: l, checked: r, onChange: a }),
47
57
  /* @__PURE__ */ s("label", { className: "form-check-label", htmlFor: l, children: n })
48
58
  ] });
49
- }, fe = (e) => /* @__PURE__ */ s(A, { type: "checkbox", ...e }), pe = (e) => /* @__PURE__ */ s(A, { type: "switch", ...e }), B = ({ children: e, label: r, className: t = "", labelClassName: n = "", noMargin: o = !1, id: c }) => /* @__PURE__ */ d("div", { className: `${t} ${o ? "" : "mb-3"}`, children: [
50
- /* @__PURE__ */ s("label", { className: `form-label ${n}`, htmlFor: c, children: r }),
51
- e
52
- ] }), ge = ({ children: e, value: r, onChange: t, type: n, required: o, placeholder: c, className: l, labelClassName: a }) => {
59
+ }, me = (r) => /* @__PURE__ */ s(A, { type: "checkbox", ...r }), he = (r) => /* @__PURE__ */ s(A, { type: "switch", ...r }), W = ({ children: r, label: e, className: t = "", labelClassName: n = "", noMargin: o = !1, id: c }) => /* @__PURE__ */ d("div", { className: `${t} ${o ? "" : "mb-3"}`, children: [
60
+ /* @__PURE__ */ s("label", { className: `form-label ${n}`, htmlFor: c, children: e }),
61
+ r
62
+ ] }), ue = ({ children: r, value: e, onChange: t, type: n, required: o, placeholder: c, className: l, labelClassName: a }) => {
53
63
  const i = S();
54
- return /* @__PURE__ */ s(B, { label: /* @__PURE__ */ d(N, { children: [
55
- e,
64
+ return /* @__PURE__ */ s(W, { label: /* @__PURE__ */ d(N, { children: [
65
+ r,
56
66
  ":"
57
67
  ] }), className: l, labelClassName: a, id: i, children: /* @__PURE__ */ s(
58
68
  "input",
@@ -60,37 +70,37 @@ const W = (e) => ({
60
70
  id: i,
61
71
  className: "form-control",
62
72
  type: n ?? "text",
63
- value: r,
73
+ value: e,
64
74
  required: o ?? !0,
65
75
  placeholder: c,
66
- onChange: (h) => t(h.target.value)
76
+ onChange: (m) => t(m.target.value)
67
77
  }
68
78
  ) });
69
- }, K = 500;
79
+ }, X = 500;
70
80
  let p;
71
81
  const k = () => {
72
82
  p !== null && clearTimeout(p), p = null;
73
- }, be = ({ onChange: e, className: r, large: t = !0, noBorder: n = !1, initialValue: o = "", setTimeout_: c = setTimeout }) => {
74
- const [l, a] = b(o), i = (h, u = K) => {
75
- a(h), k(), p = c(() => {
76
- e(h), k();
83
+ }, fe = ({ onChange: r, className: e, large: t = !0, noBorder: n = !1, initialValue: o = "", setTimeout_: c = setTimeout }) => {
84
+ const [l, a] = b(o), i = (m, u = X) => {
85
+ a(m), k(), p = c(() => {
86
+ r(m), k();
77
87
  }, u);
78
88
  };
79
- return /* @__PURE__ */ d("div", { className: m("search-field", r), children: [
89
+ return /* @__PURE__ */ d("div", { className: h("search-field", e), children: [
80
90
  /* @__PURE__ */ s(
81
91
  "input",
82
92
  {
83
93
  type: "text",
84
- className: m("form-control search-field__input", {
94
+ className: h("form-control search-field__input", {
85
95
  "form-control-lg": t,
86
96
  "search-field__input--no-border": n
87
97
  }),
88
98
  placeholder: "Search...",
89
99
  value: l,
90
- onChange: (h) => i(h.target.value)
100
+ onChange: (m) => i(m.target.value)
91
101
  }
92
102
  ),
93
- /* @__PURE__ */ s(g, { icon: D, className: "search-field__icon" }),
103
+ /* @__PURE__ */ s(g, { icon: y, className: "search-field__icon" }),
94
104
  /* @__PURE__ */ s(
95
105
  "button",
96
106
  {
@@ -103,34 +113,34 @@ const k = () => {
103
113
  }
104
114
  )
105
115
  ] });
106
- }, ee = (e) => {
107
- const r = new URLSearchParams(e), t = {};
108
- return r.forEach((n, o) => {
116
+ }, Z = (r) => {
117
+ const e = new URLSearchParams(r), t = {};
118
+ return e.forEach((n, o) => {
109
119
  if (o.endsWith("[]")) {
110
120
  const c = o.slice(0, -2);
111
121
  t[c] ?? (t[c] = []), t[c].push(n);
112
122
  } else
113
123
  t[o] = n;
114
124
  }), t;
115
- }, we = (e) => {
116
- const r = new URLSearchParams();
117
- for (const [t, n] of Object.entries(e))
118
- n !== void 0 && (Array.isArray(n) ? n.forEach((o) => r.append(`${t}[]`, `${o}`)) : r.append(t, `${n}`));
119
- return r.toString();
120
- }, re = (e = !1) => {
121
- const [r, t] = b(e), n = f(() => t((l) => !l), []), o = f(() => t(!0), []), c = f(() => t(!1), []);
122
- return [r, n, o, c];
123
- }, Ne = (e = !1, r = 2e3, t = window.setTimeout, n = window.clearTimeout) => {
124
- const [o, c] = b(e), l = C(e), a = C(), i = f(() => {
125
- c(!l.current), a.current && n(a.current), a.current = t(() => c(l.current), r);
126
- }, [n, r, t]);
125
+ }, pe = (r) => {
126
+ const e = new URLSearchParams();
127
+ for (const [t, n] of Object.entries(r))
128
+ n !== void 0 && (Array.isArray(n) ? n.forEach((o) => e.append(`${t}[]`, `${o}`)) : e.append(t, `${n}`));
129
+ return e.toString();
130
+ }, B = (r = !1) => {
131
+ const [e, t] = b(r), n = f(() => t((l) => !l), []), o = f(() => t(!0), []), c = f(() => t(!1), []);
132
+ return [e, n, o, c];
133
+ }, ge = (r = !1, e = 2e3, t = window.setTimeout, n = window.clearTimeout) => {
134
+ const [o, c] = b(r), l = _(r), a = _(void 0), i = f(() => {
135
+ c(!l.current), a.current && n(a.current), a.current = t(() => c(l.current), e);
136
+ }, [n, e, t]);
127
137
  return [o, i];
128
- }, Ce = () => C(null), _e = () => {
129
- const { search: e } = z();
130
- return Q(() => ee(e), [e]);
131
- }, te = ({
132
- text: e,
133
- disabled: r = !1,
138
+ }, be = () => _(null), we = () => {
139
+ const { search: r } = Y();
140
+ return q(() => Z(r), [r]);
141
+ }, K = ({
142
+ text: r,
143
+ disabled: e = !1,
134
144
  className: t,
135
145
  children: n,
136
146
  dropdownClassName: o,
@@ -138,69 +148,69 @@ const k = () => {
138
148
  end: l = !1,
139
149
  minWidth: a,
140
150
  inline: i,
141
- size: h,
151
+ size: m,
142
152
  ...u
143
153
  }) => {
144
- const [L, y] = re(), R = m("dropdown-btn__toggle", t, {
154
+ const [T, L] = B(), x = h("dropdown-btn__toggle", t, {
145
155
  "btn-block": !i,
146
156
  "dropdown-btn__toggle--with-caret": !c
147
- }), x = { minWidth: a && `${a}px` };
148
- return /* @__PURE__ */ d($, { isOpen: L, toggle: y, disabled: r, className: o, children: [
149
- /* @__PURE__ */ s(T, { size: h, caret: !c, className: R, color: "primary", ...u, children: e }),
150
- /* @__PURE__ */ s(O, { className: "w-100", end: l, style: x, children: n })
157
+ }), R = { minWidth: a && `${a}px` };
158
+ return /* @__PURE__ */ d(M, { isOpen: T, toggle: L, disabled: e, className: o, children: [
159
+ /* @__PURE__ */ s(v, { size: m, caret: !c, className: x, color: "primary", ...u, children: r }),
160
+ /* @__PURE__ */ s(O, { className: "w-100", end: l, style: R, children: n })
151
161
  ] });
152
- }, ke = ({ children: e, minWidth: r, label: t = "Options" }) => /* @__PURE__ */ s(
153
- te,
162
+ }, Ne = ({ children: r, minWidth: e, label: t = "Options" }) => /* @__PURE__ */ s(
163
+ K,
154
164
  {
155
- text: /* @__PURE__ */ s(g, { className: "px-1", icon: E }),
165
+ text: /* @__PURE__ */ s(g, { className: "px-1", icon: D }),
156
166
  "aria-label": t,
157
167
  size: "sm",
158
- minWidth: r,
168
+ minWidth: e,
159
169
  end: !0,
160
170
  noCaret: !0,
161
171
  inline: !0,
162
- children: e
172
+ children: r
163
173
  }
164
- ), ne = ({ children: e, ...r }) => /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(U, { className: "nav-pills__nav-link", tag: J, ...r, children: e }) }), ve = ({ children: e, fill: r = !1, className: t = "" }) => /* @__PURE__ */ s(_, { className: `nav-pills__nav p-0 overflow-hidden ${t}`, body: !0, children: /* @__PURE__ */ s(j, { pills: !0, fill: r, children: V.map(e, (n) => {
165
- if (!Y(n) || n.type !== ne)
174
+ ), ee = ({ children: r, ...e }) => /* @__PURE__ */ s($, { children: /* @__PURE__ */ s(G, { className: "nav-pills__nav-link", tag: z, ...e, children: r }) }), _e = ({ children: r, fill: e = !1, className: t = "" }) => /* @__PURE__ */ s(C, { className: `nav-pills__nav p-0 overflow-hidden ${t}`, body: !0, children: /* @__PURE__ */ s(U, { pills: !0, fill: e, children: Q.map(r, (n) => {
175
+ if (!V(n) || n.type !== ee)
166
176
  throw new Error("Only NavPillItem children are allowed inside NavPills.");
167
177
  return n;
168
- }) }) }), se = (e, r, t) => e !== r ? "ASC" : t ? {
178
+ }) }) }), re = (r, e, t) => r !== e ? "ASC" : t ? {
169
179
  ASC: "DESC",
170
180
  DESC: void 0
171
- }[t] : "ASC", Te = (e, { field: r, dir: t }) => !r || !t ? e : e.sort((n, o) => {
181
+ }[t] : "ASC", Ce = (r, { field: e, dir: t }) => !e || !t ? r : r.sort((n, o) => {
172
182
  const c = t === "ASC" ? 1 : -1, l = t === "ASC" ? -1 : 1;
173
- return n[r] > o[r] ? c : l;
174
- }), Oe = (e) => e.dir ? `${e.field}-${e.dir}` : void 0, Se = (e) => {
175
- const [r, t] = e.split("-");
176
- return { field: r, dir: t };
177
- }, Ae = (e) => {
178
- const [r, t] = b(e), n = f((o, c) => t({ field: o, dir: c }), []);
179
- return [r, n];
183
+ return n[e] > o[e] ? c : l;
184
+ }), ke = (r) => r.dir ? `${r.field}-${r.dir}` : void 0, ve = (r) => {
185
+ const [e, t] = r.split("-");
186
+ return { field: e, dir: t };
187
+ }, Oe = (r) => {
188
+ const [e, t] = b(r), n = f((o, c) => t({ field: o, dir: c }), []);
189
+ return [e, n];
180
190
  };
181
- function Le({ items: e, order: r, onChange: t, isButton: n = !0, right: o = !1, prefixed: c = !0 }) {
191
+ function Se({ items: r, order: e, onChange: t, isButton: n = !0, right: o = !1, prefixed: c = !0 }) {
182
192
  const l = (a) => () => {
183
- const i = se(a, r.field, r.dir);
193
+ const i = re(a, e.field, e.dir);
184
194
  t(i ? a : void 0, i);
185
195
  };
186
- return /* @__PURE__ */ d(q, { children: [
196
+ return /* @__PURE__ */ d(j, { children: [
187
197
  /* @__PURE__ */ d(
188
- T,
198
+ v,
189
199
  {
190
200
  caret: !0,
191
201
  color: n ? "primary" : "link",
192
- className: m({
202
+ className: h({
193
203
  "dropdown-btn__toggle btn-block pe-4 overflow-hidden": n,
194
204
  "btn-sm p-0": !n
195
205
  }),
196
206
  children: [
197
207
  !n && /* @__PURE__ */ s(N, { children: "Order by" }),
198
- n && !r.field && /* @__PURE__ */ s("i", { children: "Order by..." }),
199
- n && r.field && /* @__PURE__ */ d(N, { children: [
208
+ n && !e.field && /* @__PURE__ */ s("i", { children: "Order by..." }),
209
+ n && e.field && /* @__PURE__ */ d(N, { children: [
200
210
  c && "Order by: ",
201
- e[r.field],
211
+ r[e.field],
202
212
  " - ",
203
- /* @__PURE__ */ s("small", { children: r.dir ?? "DESC" })
213
+ /* @__PURE__ */ s("small", { children: e.dir ?? "DESC" })
204
214
  ] })
205
215
  ]
206
216
  }
@@ -209,64 +219,64 @@ function Le({ items: e, order: r, onChange: t, isButton: n = !0, right: o = !1,
209
219
  O,
210
220
  {
211
221
  end: o,
212
- className: m("w-100", { "ordering-dropdown__menu--link": !n }),
222
+ className: h("w-100", { "ordering-dropdown__menu--link": !n }),
213
223
  children: [
214
- Object.entries(e).map(([a, i]) => /* @__PURE__ */ d(w, { active: r.field === a, onClick: l(a), children: [
224
+ Object.entries(r).map(([a, i]) => /* @__PURE__ */ d(w, { active: e.field === a, onClick: l(a), children: [
215
225
  i,
216
- r.field === a && /* @__PURE__ */ s(
226
+ e.field === a && /* @__PURE__ */ s(
217
227
  g,
218
228
  {
219
- icon: r.dir === "ASC" ? P : F,
229
+ icon: e.dir === "ASC" ? E : P,
220
230
  className: "ordering-dropdown__sort-icon"
221
231
  }
222
232
  )
223
233
  ] }, a)),
224
234
  /* @__PURE__ */ s(w, { divider: !0 }),
225
- /* @__PURE__ */ s(w, { disabled: !r.field, onClick: () => t(), children: /* @__PURE__ */ s("i", { children: "Clear selection" }) })
235
+ /* @__PURE__ */ s(w, { disabled: !e.field, onClick: () => t(), children: /* @__PURE__ */ s("i", { children: "Clear selection" }) })
226
236
  ]
227
237
  }
228
238
  )
229
239
  ] });
230
240
  }
231
- const ye = "#4696e5", Re = "rgba(70, 150, 229, 0.4)", xe = "#f77f28", Ie = "rgba(247, 127, 40, 0.4)", De = "white", Ee = "#161b22", Pe = (e) => {
232
- var r;
233
- return (r = document.querySelector("html")) == null ? void 0 : r.setAttribute("data-theme", e);
234
- }, Fe = () => {
241
+ const Ae = "#4696e5", Te = "rgba(70, 150, 229, 0.4)", Le = "#f77f28", xe = "rgba(247, 127, 40, 0.4)", Re = "white", Ie = "#161b22", ye = (r) => {
235
242
  var e;
236
- return ((e = document.querySelector("html")) == null ? void 0 : e.getAttribute("data-theme")) === "dark";
237
- }, He = (e = window.matchMedia.bind(window)) => e("(prefers-color-scheme: dark)").matches ? "dark" : "light";
243
+ return (e = document.querySelector("html")) == null ? void 0 : e.setAttribute("data-theme", r);
244
+ }, De = () => {
245
+ var r;
246
+ return ((r = document.querySelector("html")) == null ? void 0 : r.getAttribute("data-theme")) === "dark";
247
+ }, Ee = (r = window.matchMedia.bind(window)) => r("(prefers-color-scheme: dark)").matches ? "dark" : "light";
238
248
  export {
239
- fe as Checkbox,
240
- te as DropdownBtn,
241
- xe as HIGHLIGHTED_COLOR,
242
- Ie as HIGHLIGHTED_COLOR_ALPHA,
243
- ge as InputFormGroup,
244
- B as LabeledFormGroup,
245
- ye as MAIN_COLOR,
246
- Re as MAIN_COLOR_ALPHA,
247
- he as Message,
248
- ne as NavPillItem,
249
- ve as NavPills,
250
- Le as OrderingDropdown,
251
- Ee as PRIMARY_DARK_COLOR,
252
- De as PRIMARY_LIGHT_COLOR,
253
- ue as Result,
254
- ke as RowDropdownBtn,
255
- be as SearchField,
256
- Z as SimpleCard,
257
- pe as ToggleSwitch,
258
- Pe as changeThemeInMarkup,
259
- se as determineOrderDir,
260
- He as getSystemPreferredTheme,
261
- Fe as isDarkThemeEnabled,
262
- Oe as orderToString,
263
- ee as parseQueryString,
264
- Te as sortList,
265
- Se as stringToOrder,
266
- we as stringifyQueryParams,
267
- Ce as useElementRef,
268
- Ae as useOrder,
269
- _e as useParsedQuery,
270
- Ne as useTimeoutToggle,
271
- re as useToggle
249
+ me as Checkbox,
250
+ K as DropdownBtn,
251
+ Le as HIGHLIGHTED_COLOR,
252
+ xe as HIGHLIGHTED_COLOR_ALPHA,
253
+ ue as InputFormGroup,
254
+ W as LabeledFormGroup,
255
+ Ae as MAIN_COLOR,
256
+ Te as MAIN_COLOR_ALPHA,
257
+ ie as Message,
258
+ ee as NavPillItem,
259
+ _e as NavPills,
260
+ Se as OrderingDropdown,
261
+ Ie as PRIMARY_DARK_COLOR,
262
+ Re as PRIMARY_LIGHT_COLOR,
263
+ de as Result,
264
+ Ne as RowDropdownBtn,
265
+ fe as SearchField,
266
+ J as SimpleCard,
267
+ he as ToggleSwitch,
268
+ ye as changeThemeInMarkup,
269
+ re as determineOrderDir,
270
+ Ee as getSystemPreferredTheme,
271
+ De as isDarkThemeEnabled,
272
+ ke as orderToString,
273
+ Z as parseQueryString,
274
+ Ce as sortList,
275
+ ve as stringToOrder,
276
+ pe as stringifyQueryParams,
277
+ be as useElementRef,
278
+ Oe as useOrder,
279
+ we as useParsedQuery,
280
+ ge as useTimeoutToggle,
281
+ B as useToggle
272
282
  };
package/package.json CHANGED
@@ -29,42 +29,40 @@
29
29
  "peerDependencies": {
30
30
  "@fortawesome/fontawesome-free": "^6.4.2",
31
31
  "@fortawesome/free-solid-svg-icons": "^6.4.2",
32
- "@fortawesome/react-fontawesome": "^0.2.0",
33
- "react": "^18.2.0",
34
- "react-dom": "^18.2.0",
35
- "react-router-dom": "^6.14.2",
32
+ "@fortawesome/react-fontawesome": "^0.2.2",
33
+ "react": "^18.3 || ^19.0",
34
+ "react-dom": "^18.3 || ^19.0",
35
+ "react-router": "^7.0.2",
36
36
  "reactstrap": "^9.2.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@shlinkio/eslint-config-js-coding-standard": "~3.2.0",
39
+ "@shlinkio/eslint-config-js-coding-standard": "~3.2.1",
40
40
  "@shlinkio/stylelint-config-css-coding-standard": "~1.1.1",
41
- "@stylistic/eslint-plugin": "^2.9.0",
42
- "@testing-library/jest-dom": "^6.5.0",
43
- "@testing-library/react": "^16.0.1",
41
+ "@stylistic/eslint-plugin": "^2.12.1",
42
+ "@testing-library/jest-dom": "^6.6.3",
43
+ "@testing-library/react": "^16.1.0",
44
44
  "@testing-library/user-event": "^14.5.2",
45
45
  "@total-typescript/shoehorn": "^0.1.2",
46
- "@types/qs": "^6.9.16",
47
- "@types/react": "^18.3.11",
48
- "@types/react-dom": "^18.3.1",
49
- "@types/uuid": "^10.0.0",
50
- "@vitejs/plugin-react": "^4.3.2",
51
- "@vitest/coverage-v8": "^2.1.3",
52
- "axe-core": "^4.10.1",
46
+ "@types/react": "^19.0.2",
47
+ "@types/react-dom": "^19.0.2",
48
+ "@vitejs/plugin-react": "^4.3.4",
49
+ "@vitest/coverage-v8": "^2.1.8",
50
+ "axe-core": "^4.10.2",
53
51
  "bootstrap": "5.2.3",
54
- "eslint": "^9.13.0",
55
- "eslint-plugin-jsx-a11y": "^6.10.0",
56
- "eslint-plugin-react": "^7.37.1",
57
- "eslint-plugin-react-hooks": "^5.0.0",
52
+ "eslint": "^9.17.0",
53
+ "eslint-plugin-jsx-a11y": "^6.10.2",
54
+ "eslint-plugin-react": "^7.37.3",
55
+ "eslint-plugin-react-hooks": "^5.1.0",
58
56
  "eslint-plugin-simple-import-sort": "^12.1.1",
59
57
  "history": "^5.3.0",
60
58
  "jsdom": "^25.0.1",
61
59
  "resize-observer-polyfill": "^1.5.1",
62
- "sass": "^1.80.3",
60
+ "sass": "^1.83.0",
63
61
  "stylelint": "^15.11.0",
64
- "typescript": "^5.6.3",
65
- "typescript-eslint": "^8.10.0",
66
- "vite": "^5.4.9",
67
- "vite-plugin-dts": "^4.2.4",
62
+ "typescript": "^5.7.2",
63
+ "typescript-eslint": "^8.18.2",
64
+ "vite": "^6.0.6",
65
+ "vite-plugin-dts": "^4.4.0",
68
66
  "vitest": "^2.0.2"
69
67
  },
70
68
  "browserslist": [
@@ -73,5 +71,5 @@
73
71
  "not ie <= 11",
74
72
  "not op_mini all"
75
73
  ],
76
- "version": "0.6.0"
74
+ "version": "0.7.1"
77
75
  }