@konstructio/ui 0.0.2 → 0.0.4
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/README.md +53 -4
- package/dist/{AlertDialogTrigger-BIbxXexQ.js → AlertDialogTrigger-lenvKoGF.js} +4 -4
- package/dist/Modal-Bg9UG35z.js +909 -0
- package/dist/{chevron-up-Cmu1oXfj.js → chevron-up-CvquEaNg.js} +1 -1
- package/dist/clsx-OuTLNxxd.js +16 -0
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.variants.d.ts +1 -1
- package/dist/components/AlertDialog/AlertDialog.variants.js +4 -5
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.variants.d.ts +2 -2
- package/dist/components/Autocomplete/Autocomplete.variants.js +8 -8
- package/dist/components/Autocomplete/components/List.types.d.ts +3 -3
- package/dist/components/Autocomplete/components/List.variants.d.ts +4 -4
- package/dist/components/Autocomplete/components/List.variants.js +13 -13
- package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +4 -4
- package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +4 -4
- package/dist/components/Breadcrumb/Breadcrumb.js +57 -412
- package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +3 -3
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +12 -12
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +23 -21
- package/dist/components/Button/Button.variants.d.ts +2 -1
- package/dist/components/Button/Button.variants.js +122 -23
- package/dist/components/Checkbox/Checkbox.js +4 -4
- package/dist/components/Checkbox/Checkbox.variants.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.variants.js +7 -16
- package/dist/components/Dropdown/Dropdown.js +5 -5
- package/dist/components/Dropdown/Dropdown.types.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.variants.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.variants.js +5 -9
- package/dist/components/Dropdown/components/List/List.d.ts +2 -2
- package/dist/components/Dropdown/components/List/List.types.d.ts +3 -3
- package/dist/components/Dropdown/components/List/List.variants.d.ts +1 -1
- package/dist/components/Dropdown/components/List/List.variants.js +3 -3
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +1 -1
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +3 -3
- package/dist/components/Dropdown/components/Wrapper.d.ts +2 -2
- package/dist/components/Dropdown/components/Wrapper.js +1 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +4 -1
- package/dist/components/Dropdown/contexts/dropdown.provider.js +19 -8
- package/dist/components/Dropdown/hooks/useDropdown.d.ts +4 -4
- package/dist/components/Dropdown/hooks/useNavigationList.d.ts +4 -4
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input.variants.d.ts +1 -1
- package/dist/components/Input/Input.variants.js +3 -3
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -3
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +10 -10
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/hooks/useModal.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.js +96 -87
- package/dist/components/NumberInput/NumberInput.variants.d.ts +3 -3
- package/dist/components/NumberInput/NumberInput.variants.js +14 -21
- package/dist/components/ProgressBar/ProgressBar.variants.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.variants.js +7 -12
- package/dist/components/Radio/Radio.variants.d.ts +1 -1
- package/dist/components/Radio/Radio.variants.js +4 -7
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Range/Range.variants.d.ts +4 -4
- package/dist/components/Range/Range.variants.js +18 -18
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.variants.d.ts +3 -3
- package/dist/components/Slider/Slider.variants.js +12 -12
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/Switch.variants.d.ts +2 -2
- package/dist/components/Switch/Switch.variants.js +6 -6
- package/dist/components/Tag/Tag.variants.js +1 -1
- package/dist/components/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.d.ts +3 -3
- package/dist/components/TagSelect/TagSelect.variants.js +11 -14
- package/dist/components/TagSelect/hooks/useTagSelect.d.ts +1 -1
- package/dist/components/TextArea/TextArea.variants.d.ts +1 -1
- package/dist/components/TextArea/TextArea.variants.js +5 -5
- package/dist/components/Toast/Toast.js +104 -101
- package/dist/components/Toast/Toast.variants.d.ts +3 -3
- package/dist/components/Toast/Toast.variants.js +12 -12
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.variants.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.variants.js +9 -9
- package/dist/components/Tooltip/hooks/useTooltip.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/contexts/theme.context.d.ts +1 -1
- package/dist/contexts/theme.hook.js +3 -6
- package/dist/contexts/theme.provider.d.ts +2 -3
- package/dist/contexts/theme.provider.js +4 -1
- package/dist/index-BBjak_0p.js +47 -0
- package/dist/index-BNmRGtA6.js +34 -0
- package/dist/{index-DFbnnPzA.js → index-Ci9Yg4G1.js} +5 -5
- package/dist/{index-B_GWswUP.js → index-D4Q2rMby.js} +1 -1
- package/dist/{index-DQMInta3.js → index-D68N8v8R.js} +214 -209
- package/dist/index-DoOsnuB6.js +72 -0
- package/dist/{index-2K8qjK4R.js → index-O3j1K921.js} +36 -37
- package/dist/index-OOfdXoxx.js +423 -0
- package/dist/index-ffjBR8Av.js +32 -0
- package/dist/index.js +1 -1
- package/dist/package.json +42 -38
- package/dist/plugins/konstruct.js +61 -50
- package/dist/plugins/utils/colors.d.ts +127 -10
- package/dist/plugins/utils/colors.js +210 -510
- package/dist/styles.css +1 -1
- package/dist/useBreadcrumb-tyxjV-a1.js +1398 -0
- package/dist/utils/index.js +150 -162
- package/dist/x-CRBgmX1Q.js +62 -0
- package/package.json +42 -38
- package/dist/Modal-CO0_SnXD.js +0 -909
- package/dist/index-2hJuj4UN.js +0 -19069
- package/dist/index-4qm4jAkj.js +0 -92
- package/dist/index-BJ7FQg17.js +0 -35
- package/dist/index-BqM_XclQ.js +0 -94
- package/dist/index-BwYCDOHZ.js +0 -44
- package/dist/index-CCavb-1K.js +0 -57
- package/dist/useBreadcrumb-BSMnc4Fu.js +0 -341
|
@@ -1,460 +1,105 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import q, { forwardRef as ne, Fragment as re } from "react";
|
|
4
|
-
import "../../index-2hJuj4UN.js";
|
|
5
|
-
import { N as F, s as x, w as X, u as ie, a as ae, b as B, c as D, d as I, D as oe, e as le, R as se, i as N, j as ce, m as G, f as ue, g as fe } from "../../useBreadcrumb-BSMnc4Fu.js";
|
|
1
|
+
import { jsx as a, jsxs as v, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import u, { forwardRef as b, Fragment as y } from "react";
|
|
6
3
|
import "../../contexts/theme.context.js";
|
|
7
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as O } from "../../contexts/theme.hook.js";
|
|
8
5
|
import "../../js.cookie-OLEfuq_g.js";
|
|
9
|
-
import { breadcrumbVariants as
|
|
10
|
-
import { P as
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import { breadcrumbVariants as j, breadcrumbItemVariants as w, chevronVariants as x } from "./Breadcrumb.variants.js";
|
|
7
|
+
import { u as P, L as k } from "../../useBreadcrumb-tyxjV-a1.js";
|
|
8
|
+
import { P as m } from "../../index-D68N8v8R.js";
|
|
9
|
+
function h() {
|
|
10
|
+
return h = Object.assign || function(e) {
|
|
13
11
|
for (var n = 1; n < arguments.length; n++) {
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
Object.prototype.hasOwnProperty.call(
|
|
12
|
+
var t = arguments[n];
|
|
13
|
+
for (var r in t)
|
|
14
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
17
15
|
}
|
|
18
16
|
return e;
|
|
19
|
-
},
|
|
17
|
+
}, h.apply(this, arguments);
|
|
20
18
|
}
|
|
21
|
-
function
|
|
19
|
+
function N(e, n) {
|
|
22
20
|
if (e == null) return {};
|
|
23
|
-
var
|
|
21
|
+
var t = T(e, n), r, o;
|
|
24
22
|
if (Object.getOwnPropertySymbols) {
|
|
25
|
-
var
|
|
26
|
-
for (
|
|
27
|
-
|
|
23
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
24
|
+
for (o = 0; o < i.length; o++)
|
|
25
|
+
r = i[o], !(n.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (t[r] = e[r]);
|
|
28
26
|
}
|
|
29
|
-
return
|
|
27
|
+
return t;
|
|
30
28
|
}
|
|
31
|
-
function
|
|
29
|
+
function T(e, n) {
|
|
32
30
|
if (e == null) return {};
|
|
33
|
-
var
|
|
34
|
-
for (
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
return /* @__PURE__ */
|
|
31
|
+
var t = {}, r = Object.keys(e), o, i;
|
|
32
|
+
for (i = 0; i < r.length; i++)
|
|
33
|
+
o = r[i], !(n.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
36
|
+
var f = b(function(e, n) {
|
|
37
|
+
var t = e.color, r = t === void 0 ? "currentColor" : t, o = e.size, i = o === void 0 ? 24 : o, s = N(e, ["color", "size"]);
|
|
38
|
+
return /* @__PURE__ */ u.createElement("svg", h({
|
|
41
39
|
ref: n,
|
|
42
40
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
-
width:
|
|
44
|
-
height:
|
|
41
|
+
width: i,
|
|
42
|
+
height: i,
|
|
45
43
|
viewBox: "0 0 24 24",
|
|
46
44
|
fill: "none",
|
|
47
|
-
stroke:
|
|
45
|
+
stroke: r,
|
|
48
46
|
strokeWidth: "2",
|
|
49
47
|
strokeLinecap: "round",
|
|
50
48
|
strokeLinejoin: "round"
|
|
51
|
-
},
|
|
49
|
+
}, s), /* @__PURE__ */ u.createElement("polyline", {
|
|
52
50
|
points: "9 18 15 12 9 6"
|
|
53
51
|
}));
|
|
54
52
|
});
|
|
55
|
-
|
|
56
|
-
color:
|
|
57
|
-
size:
|
|
53
|
+
f.propTypes = {
|
|
54
|
+
color: m.string,
|
|
55
|
+
size: m.oneOfType([m.string, m.number])
|
|
58
56
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* React Router DOM v6.28.0
|
|
62
|
-
*
|
|
63
|
-
* Copyright (c) Remix Software Inc.
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the MIT license found in the
|
|
66
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
67
|
-
*
|
|
68
|
-
* @license MIT
|
|
69
|
-
*/
|
|
70
|
-
function S() {
|
|
71
|
-
return S = Object.assign ? Object.assign.bind() : function(e) {
|
|
72
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
73
|
-
var r = arguments[n];
|
|
74
|
-
for (var i in r)
|
|
75
|
-
Object.prototype.hasOwnProperty.call(r, i) && (e[i] = r[i]);
|
|
76
|
-
}
|
|
77
|
-
return e;
|
|
78
|
-
}, S.apply(this, arguments);
|
|
79
|
-
}
|
|
80
|
-
function M(e, n) {
|
|
81
|
-
if (e == null) return {};
|
|
82
|
-
var r = {}, i = Object.keys(e), t, a;
|
|
83
|
-
for (a = 0; a < i.length; a++)
|
|
84
|
-
t = i[a], !(n.indexOf(t) >= 0) && (r[t] = e[t]);
|
|
85
|
-
return r;
|
|
86
|
-
}
|
|
87
|
-
const O = "get", P = "application/x-www-form-urlencoded";
|
|
88
|
-
function k(e) {
|
|
89
|
-
return e != null && typeof e.tagName == "string";
|
|
90
|
-
}
|
|
91
|
-
function ge(e) {
|
|
92
|
-
return k(e) && e.tagName.toLowerCase() === "button";
|
|
93
|
-
}
|
|
94
|
-
function be(e) {
|
|
95
|
-
return k(e) && e.tagName.toLowerCase() === "form";
|
|
96
|
-
}
|
|
97
|
-
function ye(e) {
|
|
98
|
-
return k(e) && e.tagName.toLowerCase() === "input";
|
|
99
|
-
}
|
|
100
|
-
function Ee(e) {
|
|
101
|
-
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
102
|
-
}
|
|
103
|
-
function xe(e, n) {
|
|
104
|
-
return e.button === 0 && // Ignore everything but left clicks
|
|
105
|
-
(!n || n === "_self") && // Let browser handle "target=_blank" etc.
|
|
106
|
-
!Ee(e);
|
|
107
|
-
}
|
|
108
|
-
let L = null;
|
|
109
|
-
function Ne() {
|
|
110
|
-
if (L === null)
|
|
111
|
-
try {
|
|
112
|
-
new FormData(
|
|
113
|
-
document.createElement("form"),
|
|
114
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
115
|
-
0
|
|
116
|
-
), L = !1;
|
|
117
|
-
} catch {
|
|
118
|
-
L = !0;
|
|
119
|
-
}
|
|
120
|
-
return L;
|
|
121
|
-
}
|
|
122
|
-
const Se = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
123
|
-
function j(e) {
|
|
124
|
-
return e != null && !Se.has(e) ? (process.env.NODE_ENV !== "production" && X(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + P + '"')), null) : e;
|
|
125
|
-
}
|
|
126
|
-
function Ce(e, n) {
|
|
127
|
-
let r, i, t, a, o;
|
|
128
|
-
if (be(e)) {
|
|
129
|
-
let s = e.getAttribute("action");
|
|
130
|
-
i = s ? x(s, n) : null, r = e.getAttribute("method") || O, t = j(e.getAttribute("enctype")) || P, a = new FormData(e);
|
|
131
|
-
} else if (ge(e) || ye(e) && (e.type === "submit" || e.type === "image")) {
|
|
132
|
-
let s = e.form;
|
|
133
|
-
if (s == null)
|
|
134
|
-
throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
|
|
135
|
-
let c = e.getAttribute("formaction") || s.getAttribute("action");
|
|
136
|
-
if (i = c ? x(c, n) : null, r = e.getAttribute("formmethod") || s.getAttribute("method") || O, t = j(e.getAttribute("formenctype")) || j(s.getAttribute("enctype")) || P, a = new FormData(s, e), !Ne()) {
|
|
137
|
-
let {
|
|
138
|
-
name: l,
|
|
139
|
-
type: f,
|
|
140
|
-
value: p
|
|
141
|
-
} = e;
|
|
142
|
-
if (f === "image") {
|
|
143
|
-
let v = l ? l + "." : "";
|
|
144
|
-
a.append(v + "x", "0"), a.append(v + "y", "0");
|
|
145
|
-
} else l && a.append(l, p);
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
if (k(e))
|
|
149
|
-
throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
|
|
150
|
-
r = O, i = null, t = P, o = e;
|
|
151
|
-
}
|
|
152
|
-
return a && t === "text/plain" && (o = a, a = void 0), {
|
|
153
|
-
action: i,
|
|
154
|
-
method: r.toLowerCase(),
|
|
155
|
-
encType: t,
|
|
156
|
-
formData: a,
|
|
157
|
-
body: o
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
const Re = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"], Te = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"], Le = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"], Oe = "6";
|
|
161
|
-
try {
|
|
162
|
-
window.__reactRouterVersion = Oe;
|
|
163
|
-
} catch {
|
|
164
|
-
}
|
|
165
|
-
const Y = /* @__PURE__ */ d.createContext({
|
|
166
|
-
isTransitioning: !1
|
|
167
|
-
});
|
|
168
|
-
process.env.NODE_ENV !== "production" && (Y.displayName = "ViewTransition");
|
|
169
|
-
const Pe = /* @__PURE__ */ d.createContext(/* @__PURE__ */ new Map());
|
|
170
|
-
process.env.NODE_ENV !== "production" && (Pe.displayName = "Fetchers");
|
|
171
|
-
process.env.NODE_ENV;
|
|
172
|
-
const _e = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Fe = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, z = /* @__PURE__ */ d.forwardRef(function(n, r) {
|
|
173
|
-
let {
|
|
174
|
-
onClick: i,
|
|
175
|
-
relative: t,
|
|
176
|
-
reloadDocument: a,
|
|
177
|
-
replace: o,
|
|
178
|
-
state: s,
|
|
179
|
-
target: c,
|
|
180
|
-
to: l,
|
|
181
|
-
preventScrollReset: f,
|
|
182
|
-
viewTransition: p
|
|
183
|
-
} = n, v = M(n, Re), {
|
|
184
|
-
basename: C
|
|
185
|
-
} = d.useContext(F), w, b = !1;
|
|
186
|
-
if (typeof l == "string" && Fe.test(l) && (w = l, _e))
|
|
187
|
-
try {
|
|
188
|
-
let h = new URL(window.location.href), m = l.startsWith("//") ? new URL(h.protocol + l) : new URL(l), R = x(m.pathname, C);
|
|
189
|
-
m.origin === h.origin && R != null ? l = R + m.search + m.hash : b = !0;
|
|
190
|
-
} catch {
|
|
191
|
-
process.env.NODE_ENV !== "production" && X(!1, '<Link to="' + l + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
|
|
192
|
-
}
|
|
193
|
-
let y = ie(l, {
|
|
194
|
-
relative: t
|
|
195
|
-
}), E = Ue(l, {
|
|
196
|
-
replace: o,
|
|
197
|
-
state: s,
|
|
198
|
-
target: c,
|
|
199
|
-
preventScrollReset: f,
|
|
200
|
-
relative: t,
|
|
201
|
-
viewTransition: p
|
|
202
|
-
});
|
|
203
|
-
function u(h) {
|
|
204
|
-
i && i(h), h.defaultPrevented || E(h);
|
|
205
|
-
}
|
|
206
|
-
return (
|
|
207
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
208
|
-
/* @__PURE__ */ d.createElement("a", S({}, v, {
|
|
209
|
-
href: w || y,
|
|
210
|
-
onClick: b || a ? i : u,
|
|
211
|
-
ref: r,
|
|
212
|
-
target: c
|
|
213
|
-
}))
|
|
214
|
-
);
|
|
215
|
-
});
|
|
216
|
-
process.env.NODE_ENV !== "production" && (z.displayName = "Link");
|
|
217
|
-
const De = /* @__PURE__ */ d.forwardRef(function(n, r) {
|
|
218
|
-
let {
|
|
219
|
-
"aria-current": i = "page",
|
|
220
|
-
caseSensitive: t = !1,
|
|
221
|
-
className: a = "",
|
|
222
|
-
end: o = !1,
|
|
223
|
-
style: s,
|
|
224
|
-
to: c,
|
|
225
|
-
viewTransition: l,
|
|
226
|
-
children: f
|
|
227
|
-
} = n, p = M(n, Te), v = D(c, {
|
|
228
|
-
relative: p.relative
|
|
229
|
-
}), C = B(), w = d.useContext(oe), {
|
|
230
|
-
navigator: b,
|
|
231
|
-
basename: y
|
|
232
|
-
} = d.useContext(F), E = w != null && // Conditional usage is OK here because the usage of a data router is static
|
|
233
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
234
|
-
Ke(v) && l === !0, u = b.encodeLocation ? b.encodeLocation(v).pathname : v.pathname, h = C.pathname, m = w && w.navigation && w.navigation.location ? w.navigation.location.pathname : null;
|
|
235
|
-
t || (h = h.toLowerCase(), m = m ? m.toLowerCase() : null, u = u.toLowerCase()), m && y && (m = x(m, y) || m);
|
|
236
|
-
const R = u !== "/" && u.endsWith("/") ? u.length - 1 : u.length;
|
|
237
|
-
let V = h === u || !o && h.startsWith(u) && h.charAt(R) === "/", $ = m != null && (m === u || !o && m.startsWith(u) && m.charAt(u.length) === "/"), U = {
|
|
238
|
-
isActive: V,
|
|
239
|
-
isPending: $,
|
|
240
|
-
isTransitioning: E
|
|
241
|
-
}, Q = V ? i : void 0, A;
|
|
242
|
-
typeof a == "function" ? A = a(U) : A = [a, V ? "active" : null, $ ? "pending" : null, E ? "transitioning" : null].filter(Boolean).join(" ");
|
|
243
|
-
let Z = typeof s == "function" ? s(U) : s;
|
|
244
|
-
return /* @__PURE__ */ d.createElement(z, S({}, p, {
|
|
245
|
-
"aria-current": Q,
|
|
246
|
-
className: A,
|
|
247
|
-
ref: r,
|
|
248
|
-
style: Z,
|
|
249
|
-
to: c,
|
|
250
|
-
viewTransition: l
|
|
251
|
-
}), typeof f == "function" ? f(U) : f);
|
|
252
|
-
});
|
|
253
|
-
process.env.NODE_ENV !== "production" && (De.displayName = "NavLink");
|
|
254
|
-
const ke = /* @__PURE__ */ d.forwardRef((e, n) => {
|
|
255
|
-
let {
|
|
256
|
-
fetcherKey: r,
|
|
257
|
-
navigate: i,
|
|
258
|
-
reloadDocument: t,
|
|
259
|
-
replace: a,
|
|
260
|
-
state: o,
|
|
261
|
-
method: s = O,
|
|
262
|
-
action: c,
|
|
263
|
-
onSubmit: l,
|
|
264
|
-
relative: f,
|
|
265
|
-
preventScrollReset: p,
|
|
266
|
-
viewTransition: v
|
|
267
|
-
} = e, C = M(e, Le), w = We(), b = Be(c, {
|
|
268
|
-
relative: f
|
|
269
|
-
}), y = s.toLowerCase() === "get" ? "get" : "post", E = (u) => {
|
|
270
|
-
if (l && l(u), u.defaultPrevented) return;
|
|
271
|
-
u.preventDefault();
|
|
272
|
-
let h = u.nativeEvent.submitter, m = (h == null ? void 0 : h.getAttribute("formmethod")) || s;
|
|
273
|
-
w(h || u.currentTarget, {
|
|
274
|
-
fetcherKey: r,
|
|
275
|
-
method: m,
|
|
276
|
-
navigate: i,
|
|
277
|
-
replace: a,
|
|
278
|
-
state: o,
|
|
279
|
-
relative: f,
|
|
280
|
-
preventScrollReset: p,
|
|
281
|
-
viewTransition: v
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
return /* @__PURE__ */ d.createElement("form", S({
|
|
285
|
-
ref: n,
|
|
286
|
-
method: y,
|
|
287
|
-
action: b,
|
|
288
|
-
onSubmit: t ? l : E
|
|
289
|
-
}, C));
|
|
290
|
-
});
|
|
291
|
-
process.env.NODE_ENV !== "production" && (ke.displayName = "Form");
|
|
292
|
-
process.env.NODE_ENV;
|
|
293
|
-
var _;
|
|
294
|
-
(function(e) {
|
|
295
|
-
e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
|
|
296
|
-
})(_ || (_ = {}));
|
|
297
|
-
var H;
|
|
298
|
-
(function(e) {
|
|
299
|
-
e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
|
|
300
|
-
})(H || (H = {}));
|
|
301
|
-
function Ve(e) {
|
|
302
|
-
return e + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
303
|
-
}
|
|
304
|
-
function J(e) {
|
|
305
|
-
let n = d.useContext(ue);
|
|
306
|
-
return n || (process.env.NODE_ENV !== "production" ? N(!1, Ve(e)) : N(!1)), n;
|
|
307
|
-
}
|
|
308
|
-
function Ue(e, n) {
|
|
309
|
-
let {
|
|
310
|
-
target: r,
|
|
311
|
-
replace: i,
|
|
312
|
-
state: t,
|
|
313
|
-
preventScrollReset: a,
|
|
314
|
-
relative: o,
|
|
315
|
-
viewTransition: s
|
|
316
|
-
} = n === void 0 ? {} : n, c = ae(), l = B(), f = D(e, {
|
|
317
|
-
relative: o
|
|
318
|
-
});
|
|
319
|
-
return d.useCallback((p) => {
|
|
320
|
-
if (xe(p, r)) {
|
|
321
|
-
p.preventDefault();
|
|
322
|
-
let v = i !== void 0 ? i : I(l) === I(f);
|
|
323
|
-
c(e, {
|
|
324
|
-
replace: v,
|
|
325
|
-
state: t,
|
|
326
|
-
preventScrollReset: a,
|
|
327
|
-
relative: o,
|
|
328
|
-
viewTransition: s
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
}, [l, c, f, i, t, r, e, a, o, s]);
|
|
332
|
-
}
|
|
333
|
-
function Ae() {
|
|
334
|
-
if (typeof document > "u")
|
|
335
|
-
throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
|
|
336
|
-
}
|
|
337
|
-
let je = 0, Ie = () => "__" + String(++je) + "__";
|
|
338
|
-
function We() {
|
|
339
|
-
let {
|
|
340
|
-
router: e
|
|
341
|
-
} = J(_.UseSubmit), {
|
|
342
|
-
basename: n
|
|
343
|
-
} = d.useContext(F), r = le();
|
|
344
|
-
return d.useCallback(function(i, t) {
|
|
345
|
-
t === void 0 && (t = {}), Ae();
|
|
346
|
-
let {
|
|
347
|
-
action: a,
|
|
348
|
-
method: o,
|
|
349
|
-
encType: s,
|
|
350
|
-
formData: c,
|
|
351
|
-
body: l
|
|
352
|
-
} = Ce(i, n);
|
|
353
|
-
if (t.navigate === !1) {
|
|
354
|
-
let f = t.fetcherKey || Ie();
|
|
355
|
-
e.fetch(f, r, t.action || a, {
|
|
356
|
-
preventScrollReset: t.preventScrollReset,
|
|
357
|
-
formData: c,
|
|
358
|
-
body: l,
|
|
359
|
-
formMethod: t.method || o,
|
|
360
|
-
formEncType: t.encType || s,
|
|
361
|
-
flushSync: t.flushSync
|
|
362
|
-
});
|
|
363
|
-
} else
|
|
364
|
-
e.navigate(t.action || a, {
|
|
365
|
-
preventScrollReset: t.preventScrollReset,
|
|
366
|
-
formData: c,
|
|
367
|
-
body: l,
|
|
368
|
-
formMethod: t.method || o,
|
|
369
|
-
formEncType: t.encType || s,
|
|
370
|
-
replace: t.replace,
|
|
371
|
-
state: t.state,
|
|
372
|
-
fromRouteId: r,
|
|
373
|
-
flushSync: t.flushSync,
|
|
374
|
-
viewTransition: t.viewTransition
|
|
375
|
-
});
|
|
376
|
-
}, [e, n, r]);
|
|
377
|
-
}
|
|
378
|
-
function Be(e, n) {
|
|
379
|
-
let {
|
|
380
|
-
relative: r
|
|
381
|
-
} = n === void 0 ? {} : n, {
|
|
382
|
-
basename: i
|
|
383
|
-
} = d.useContext(F), t = d.useContext(se);
|
|
384
|
-
t || (process.env.NODE_ENV !== "production" ? N(!1, "useFormAction must be used inside a RouteContext") : N(!1));
|
|
385
|
-
let [a] = t.matches.slice(-1), o = S({}, D(e || ".", {
|
|
386
|
-
relative: r
|
|
387
|
-
})), s = B();
|
|
388
|
-
if (e == null) {
|
|
389
|
-
o.search = s.search;
|
|
390
|
-
let c = new URLSearchParams(o.search), l = c.getAll("index");
|
|
391
|
-
if (l.some((p) => p === "")) {
|
|
392
|
-
c.delete("index"), l.filter((v) => v).forEach((v) => c.append("index", v));
|
|
393
|
-
let p = c.toString();
|
|
394
|
-
o.search = p ? "?" + p : "";
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
return (!e || e === ".") && a.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), i !== "/" && (o.pathname = o.pathname === "/" ? i : ce([i, o.pathname])), I(o);
|
|
398
|
-
}
|
|
399
|
-
function Ke(e, n) {
|
|
400
|
-
n === void 0 && (n = {});
|
|
401
|
-
let r = d.useContext(Y);
|
|
402
|
-
r == null && (process.env.NODE_ENV !== "production" ? N(!1, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : N(!1));
|
|
403
|
-
let {
|
|
404
|
-
basename: i
|
|
405
|
-
} = J(_.useViewTransitionState), t = D(e, {
|
|
406
|
-
relative: n.relative
|
|
407
|
-
});
|
|
408
|
-
if (!r.isTransitioning)
|
|
409
|
-
return !1;
|
|
410
|
-
let a = x(r.currentLocation.pathname, i) || r.currentLocation.pathname, o = x(r.nextLocation.pathname, i) || r.nextLocation.pathname;
|
|
411
|
-
return G(t.pathname, o) != null || G(t.pathname, a) != null;
|
|
412
|
-
}
|
|
413
|
-
const Qe = ({
|
|
57
|
+
f.displayName = "ChevronRight";
|
|
58
|
+
const I = ({
|
|
414
59
|
className: e,
|
|
415
60
|
size: n,
|
|
416
|
-
steps:
|
|
417
|
-
theme:
|
|
61
|
+
steps: t,
|
|
62
|
+
theme: r
|
|
418
63
|
}) => {
|
|
419
|
-
const { theme:
|
|
420
|
-
return /* @__PURE__ */
|
|
64
|
+
const { theme: o } = O(), { isInsideRouter: i } = P(), s = r ?? o;
|
|
65
|
+
return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", children: /* @__PURE__ */ a(
|
|
421
66
|
"ol",
|
|
422
67
|
{
|
|
423
|
-
className:
|
|
424
|
-
children:
|
|
425
|
-
/* @__PURE__ */
|
|
68
|
+
className: j({ theme: s, className: e, size: n }),
|
|
69
|
+
children: t.map(({ label: l, to: c, target: p }, d) => /* @__PURE__ */ v(y, { children: [
|
|
70
|
+
/* @__PURE__ */ a(
|
|
426
71
|
"li",
|
|
427
72
|
{
|
|
428
|
-
className:
|
|
429
|
-
children: c ? /* @__PURE__ */ g
|
|
430
|
-
|
|
73
|
+
className: w({ theme: s, size: n }),
|
|
74
|
+
children: c ? /* @__PURE__ */ a(g, { children: i ? /* @__PURE__ */ a(
|
|
75
|
+
k,
|
|
431
76
|
{
|
|
432
77
|
to: c,
|
|
433
|
-
target:
|
|
78
|
+
target: p,
|
|
434
79
|
className: "hover:underline hover:underline-offset-2",
|
|
435
|
-
children:
|
|
80
|
+
children: l
|
|
436
81
|
}
|
|
437
|
-
) : /* @__PURE__ */
|
|
82
|
+
) : /* @__PURE__ */ a(
|
|
438
83
|
"a",
|
|
439
84
|
{
|
|
440
85
|
href: c,
|
|
441
|
-
target:
|
|
86
|
+
target: p,
|
|
442
87
|
className: "hover:underline hover:underline-offset-2",
|
|
443
|
-
children:
|
|
88
|
+
children: l
|
|
444
89
|
}
|
|
445
|
-
) }) : /* @__PURE__ */
|
|
90
|
+
) }) : /* @__PURE__ */ a("span", { "aria-current": "page", children: l })
|
|
446
91
|
}
|
|
447
92
|
),
|
|
448
|
-
|
|
449
|
-
|
|
93
|
+
d !== t.length - 1 && /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(
|
|
94
|
+
f,
|
|
450
95
|
{
|
|
451
|
-
className:
|
|
96
|
+
className: x({ size: n, theme: s })
|
|
452
97
|
}
|
|
453
98
|
) })
|
|
454
|
-
] },
|
|
99
|
+
] }, l))
|
|
455
100
|
}
|
|
456
101
|
) });
|
|
457
102
|
};
|
|
458
103
|
export {
|
|
459
|
-
|
|
104
|
+
I as Breadcrumb
|
|
460
105
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const breadcrumbVariants: (props?: ({
|
|
2
|
-
theme?: "kubefirst" | "
|
|
2
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
3
3
|
size?: "base" | "sm" | "lg" | "xl" | null | undefined;
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
5
|
export declare const breadcrumbItemVariants: (props?: ({
|
|
6
|
-
theme?: "kubefirst" | "
|
|
6
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
7
7
|
size?: "base" | "sm" | "lg" | "xl" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
export declare const chevronVariants: (props?: ({
|
|
10
|
-
theme?: "kubefirst" | "
|
|
10
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
11
11
|
size?: "base" | "sm" | "lg" | "xl" | null | undefined;
|
|
12
12
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const s =
|
|
1
|
+
import { c as e } from "../../index-BNmRGtA6.js";
|
|
2
|
+
const s = e(["flex", "gap-1.5", "items-center"], {
|
|
3
3
|
variants: {
|
|
4
4
|
theme: {
|
|
5
5
|
kubefirst: "",
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
colony: "",
|
|
7
|
+
civo: ""
|
|
8
8
|
},
|
|
9
9
|
size: {
|
|
10
10
|
sm: "",
|
|
@@ -17,12 +17,12 @@ const s = t(["flex", "gap-1.5", "items-center"], {
|
|
|
17
17
|
theme: "kubefirst",
|
|
18
18
|
size: "base"
|
|
19
19
|
}
|
|
20
|
-
}), a =
|
|
20
|
+
}), a = e(["text-slate-400", "font-semibold"], {
|
|
21
21
|
variants: {
|
|
22
22
|
theme: {
|
|
23
23
|
kubefirst: "",
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
colony: "",
|
|
25
|
+
civo: ""
|
|
26
26
|
},
|
|
27
27
|
size: {
|
|
28
28
|
sm: "text-sm",
|
|
@@ -35,12 +35,12 @@ const s = t(["flex", "gap-1.5", "items-center"], {
|
|
|
35
35
|
theme: "kubefirst",
|
|
36
36
|
size: "base"
|
|
37
37
|
}
|
|
38
|
-
}),
|
|
38
|
+
}), i = e("", {
|
|
39
39
|
variants: {
|
|
40
40
|
theme: {
|
|
41
|
-
kubefirst: "text-kubefirst-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
kubefirst: "text-kubefirst-primary",
|
|
42
|
+
colony: "text-red-500",
|
|
43
|
+
civo: ""
|
|
44
44
|
},
|
|
45
45
|
size: {
|
|
46
46
|
sm: ["w-2", "h-2"],
|
|
@@ -57,5 +57,5 @@ const s = t(["flex", "gap-1.5", "items-center"], {
|
|
|
57
57
|
export {
|
|
58
58
|
a as breadcrumbItemVariants,
|
|
59
59
|
s as breadcrumbVariants,
|
|
60
|
-
|
|
60
|
+
i as chevronVariants
|
|
61
61
|
};
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { S as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { S as u } from "../../index-DoOsnuB6.js";
|
|
4
|
+
import { cn as l } from "../../utils/index.js";
|
|
5
5
|
import "../../contexts/theme.context.js";
|
|
6
|
-
import { useTheme as
|
|
6
|
+
import { useTheme as x } from "../../contexts/theme.hook.js";
|
|
7
7
|
import "../../js.cookie-OLEfuq_g.js";
|
|
8
|
-
import { buttonVariants as
|
|
9
|
-
const
|
|
8
|
+
import { buttonVariants as T } from "./Button.variants.js";
|
|
9
|
+
const B = c(
|
|
10
10
|
({
|
|
11
11
|
className: o,
|
|
12
12
|
variant: m,
|
|
13
13
|
theme: e,
|
|
14
14
|
size: r,
|
|
15
|
+
version: n,
|
|
15
16
|
disabled: t = !1,
|
|
16
|
-
asChild:
|
|
17
|
-
...
|
|
18
|
-
},
|
|
19
|
-
const
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
17
|
+
asChild: i = !1,
|
|
18
|
+
...s
|
|
19
|
+
}, p) => {
|
|
20
|
+
const f = i ? u : "button", { theme: a } = x();
|
|
21
|
+
return /* @__PURE__ */ h(
|
|
22
|
+
f,
|
|
22
23
|
{
|
|
23
|
-
ref:
|
|
24
|
-
className:
|
|
25
|
-
|
|
24
|
+
ref: p,
|
|
25
|
+
className: l(
|
|
26
|
+
T({
|
|
26
27
|
variant: m,
|
|
27
28
|
disabled: t,
|
|
28
|
-
theme: e ??
|
|
29
|
+
theme: e ?? a,
|
|
29
30
|
size: r,
|
|
30
|
-
className: o
|
|
31
|
+
className: o,
|
|
32
|
+
version: n
|
|
31
33
|
})
|
|
32
34
|
),
|
|
33
35
|
disabled: t,
|
|
34
|
-
...
|
|
36
|
+
...s
|
|
35
37
|
}
|
|
36
38
|
);
|
|
37
39
|
}
|
|
38
40
|
);
|
|
39
|
-
|
|
41
|
+
B.displayName = "Button";
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
B as Button
|
|
42
44
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const buttonVariants: (props?: ({
|
|
2
2
|
variant?: "primary" | "secondary" | "danger" | "text" | null | undefined;
|
|
3
|
-
|
|
3
|
+
version?: "default" | "alternate" | null | undefined;
|
|
4
|
+
theme?: "kubefirst" | "colony" | "civo" | null | undefined;
|
|
4
5
|
size?: "default" | null | undefined;
|
|
5
6
|
disabled?: boolean | null | undefined;
|
|
6
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|