@sanity/sanity-id 1.5.0 → 1.6.0
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/AvatarStack.mjs +55 -0
- package/dist/Badge.mjs +12 -14
- package/dist/Button.mjs +12 -12
- package/dist/Card.mjs +25 -25
- package/dist/Checkbox.mjs +19 -19
- package/dist/Chip.mjs +18 -18
- package/dist/CodeBlock.mjs +39 -39
- package/dist/IconButton.mjs +7 -7
- package/dist/Input.mjs +18 -18
- package/dist/LinkCTA.mjs +18 -18
- package/dist/Person.mjs +36 -36
- package/dist/Radio.mjs +8 -8
- package/dist/RadioSwitch.mjs +33 -33
- package/dist/Select.mjs +22 -22
- package/dist/Switch.mjs +17 -17
- package/dist/Testimonial.mjs +11 -13
- package/dist/TextCard.mjs +24 -24
- package/dist/Textarea.mjs +19 -19
- package/dist/components/AvatarStack.d.ts +10 -0
- package/dist/components/Badge.d.ts +7 -3
- package/dist/sanity-id.css +1 -1
- package/package.json +6 -2
- package/tailwind.css +21 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as d, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import _ from "classnames";
|
|
3
|
+
import { S as p } from "./SanityImage-BiL4qP5X.mjs";
|
|
4
|
+
const w = "_root_18qwp_3", u = "_imageList_18qwp_17", y = "_imageItem_18qwp_21", N = "_image_18qwp_17", q = "_names_18qwp_45", i = {
|
|
5
|
+
root: w,
|
|
6
|
+
imageList: u,
|
|
7
|
+
imageItem: y,
|
|
8
|
+
image: N,
|
|
9
|
+
names: q
|
|
10
|
+
}, S = {
|
|
11
|
+
sm: 30,
|
|
12
|
+
md: 40
|
|
13
|
+
};
|
|
14
|
+
function z({ className: f, persons: c, size: l }) {
|
|
15
|
+
l ??= "md";
|
|
16
|
+
const a = S[l], m = c.length, r = [];
|
|
17
|
+
for (let t of c) {
|
|
18
|
+
if (r.length === 2) break;
|
|
19
|
+
t.name && r.push(t.name);
|
|
20
|
+
}
|
|
21
|
+
const [s, g] = r;
|
|
22
|
+
let e = "";
|
|
23
|
+
return s ? m === 1 ? e = s : m === 2 && g ? e = `${s}, ${g}` : m === 2 && !g ? e = `${s} + 1 others` : m === 3 ? e = `${s} + 2 others` : m === 4 && (e = `${s} + 3 others`) : e = "", /* @__PURE__ */ d("div", { className: _(i.root, f), "data-size": l, children: [
|
|
24
|
+
/* @__PURE__ */ n("ul", { className: i.imageList, children: c.map(({ name: t = "", image: o }, h) => /* @__PURE__ */ d("li", { className: i.imageItem, children: [
|
|
25
|
+
typeof o == "string" && /* @__PURE__ */ n(
|
|
26
|
+
p,
|
|
27
|
+
{
|
|
28
|
+
src: o,
|
|
29
|
+
className: i.image,
|
|
30
|
+
decoding: "async",
|
|
31
|
+
height: a,
|
|
32
|
+
loading: "lazy",
|
|
33
|
+
width: a,
|
|
34
|
+
widths: [a],
|
|
35
|
+
alt: t
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
typeof o == "function" && /* @__PURE__ */ n(
|
|
39
|
+
o,
|
|
40
|
+
{
|
|
41
|
+
className: i.image,
|
|
42
|
+
decoding: "async",
|
|
43
|
+
height: a,
|
|
44
|
+
loading: "lazy",
|
|
45
|
+
width: a,
|
|
46
|
+
alt: t
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] }, h + t)) }),
|
|
50
|
+
!!e && /* @__PURE__ */ n("p", { className: i.names, children: e })
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
z as AvatarStack
|
|
55
|
+
};
|
package/dist/Badge.mjs
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import { SanityIcon as i } from "./SanityIcon.mjs";
|
|
4
|
+
const m = "_badge_184a6_3", r = "_icon_184a6_33", n = {
|
|
5
|
+
badge: m,
|
|
6
|
+
icon: r
|
|
5
7
|
};
|
|
6
|
-
function
|
|
7
|
-
return
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"data-size": a,
|
|
12
|
-
className: m(c.badge, s.className)
|
|
13
|
-
}
|
|
14
|
-
);
|
|
8
|
+
function _({ icon: a, size: s, ...c }) {
|
|
9
|
+
return s ??= "md", /* @__PURE__ */ o("span", { "data-size": s, className: t(n.badge, c.className), children: [
|
|
10
|
+
typeof a == "string" && /* @__PURE__ */ e(i, { icon: a, className: n.icon }),
|
|
11
|
+
c.children
|
|
12
|
+
] });
|
|
15
13
|
}
|
|
16
14
|
export {
|
|
17
|
-
|
|
15
|
+
_ as Badge
|
|
18
16
|
};
|
package/dist/Button.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { SanityIcon as r } from "./SanityIcon.mjs";
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
button:
|
|
3
|
+
import f from "classnames";
|
|
4
|
+
const l = "_button_1x2kx_3", p = "_iconLeft_1x2kx_128", u = "_iconRight_1x2kx_129", s = {
|
|
5
|
+
button: l,
|
|
6
6
|
iconLeft: p,
|
|
7
7
|
iconRight: u
|
|
8
8
|
};
|
|
@@ -11,18 +11,18 @@ function y({
|
|
|
11
11
|
children: e,
|
|
12
12
|
iconLeft: t,
|
|
13
13
|
iconRight: n,
|
|
14
|
-
mode:
|
|
15
|
-
size:
|
|
14
|
+
mode: a,
|
|
15
|
+
size: c,
|
|
16
16
|
...i
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
|
|
18
|
+
const x = m ?? "a";
|
|
19
|
+
return c ??= "md", a ??= "primary", typeof t == "string" && (t = /* @__PURE__ */ o(r, { icon: t })), typeof n == "string" && (n = /* @__PURE__ */ o(r, { icon: n })), /* @__PURE__ */ _(
|
|
20
|
+
x,
|
|
21
21
|
{
|
|
22
22
|
...i,
|
|
23
|
-
className:
|
|
24
|
-
"data-size":
|
|
25
|
-
"data-mode":
|
|
23
|
+
className: f(s.button, i.className),
|
|
24
|
+
"data-size": c,
|
|
25
|
+
"data-mode": a,
|
|
26
26
|
children: [
|
|
27
27
|
!!t && /* @__PURE__ */ o("span", { className: s.iconLeft, children: t }),
|
|
28
28
|
e,
|
package/dist/Card.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c, Fragment as h } from "react/jsx-runtime";
|
|
2
|
-
import { S as
|
|
3
|
-
import
|
|
4
|
-
const _ = "
|
|
2
|
+
import { S as r } from "./SanityImage-BiL4qP5X.mjs";
|
|
3
|
+
import o from "classnames";
|
|
4
|
+
const _ = "_link_1bi75_3", d = "_image_1bi75_16", p = "_imageDark_1bi75_22", k = "_imageLight_1bi75_27", b = "_eyebrow_1bi75_33", y = "_title_1bi75_38", i = {
|
|
5
5
|
link: _,
|
|
6
6
|
image: d,
|
|
7
7
|
imageDark: p,
|
|
@@ -11,31 +11,31 @@ const _ = "_link_1m5mb_3", d = "_image_1m5mb_15", p = "_imageDark_1m5mb_21", k =
|
|
|
11
11
|
};
|
|
12
12
|
function D({
|
|
13
13
|
arrow: a = "right",
|
|
14
|
-
className:
|
|
15
|
-
eyebrow:
|
|
14
|
+
className: l,
|
|
15
|
+
eyebrow: n,
|
|
16
16
|
href: s,
|
|
17
|
-
image:
|
|
18
|
-
link:
|
|
19
|
-
title:
|
|
17
|
+
image: t,
|
|
18
|
+
link: g = f,
|
|
19
|
+
title: m
|
|
20
20
|
}) {
|
|
21
|
-
return /* @__PURE__ */ e("article", { className:
|
|
22
|
-
typeof
|
|
23
|
-
|
|
21
|
+
return /* @__PURE__ */ e("article", { className: l, children: /* @__PURE__ */ c(g, { href: s, className: i.link, children: [
|
|
22
|
+
typeof t == "string" && /* @__PURE__ */ e(
|
|
23
|
+
r,
|
|
24
24
|
{
|
|
25
|
-
src:
|
|
26
|
-
className:
|
|
25
|
+
src: t,
|
|
26
|
+
className: i.image,
|
|
27
27
|
width: 400,
|
|
28
28
|
widths: [400],
|
|
29
29
|
height: 225,
|
|
30
30
|
crop: "center"
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
typeof
|
|
33
|
+
typeof t == "object" && /* @__PURE__ */ c(h, { children: [
|
|
34
34
|
/* @__PURE__ */ e(
|
|
35
|
-
|
|
35
|
+
r,
|
|
36
36
|
{
|
|
37
|
-
src:
|
|
38
|
-
className:
|
|
37
|
+
src: t.light,
|
|
38
|
+
className: o(i.image, i.imageLight),
|
|
39
39
|
width: 400,
|
|
40
40
|
widths: [400],
|
|
41
41
|
height: 225,
|
|
@@ -43,10 +43,10 @@ function D({
|
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
45
|
/* @__PURE__ */ e(
|
|
46
|
-
|
|
46
|
+
r,
|
|
47
47
|
{
|
|
48
|
-
src:
|
|
49
|
-
className:
|
|
48
|
+
src: t.dark,
|
|
49
|
+
className: o(i.image, i.imageDark),
|
|
50
50
|
width: 400,
|
|
51
51
|
widths: [400],
|
|
52
52
|
height: 225,
|
|
@@ -54,14 +54,14 @@ function D({
|
|
|
54
54
|
}
|
|
55
55
|
)
|
|
56
56
|
] }),
|
|
57
|
-
typeof
|
|
58
|
-
className:
|
|
57
|
+
typeof t == "function" && t({
|
|
58
|
+
className: i.image,
|
|
59
59
|
decoding: "async",
|
|
60
60
|
loading: "lazy"
|
|
61
61
|
}),
|
|
62
|
-
!!
|
|
63
|
-
/* @__PURE__ */ c("p", { className:
|
|
64
|
-
|
|
62
|
+
!!n && /* @__PURE__ */ e("p", { className: i.eyebrow, children: n }),
|
|
63
|
+
/* @__PURE__ */ c("p", { className: i.title, children: [
|
|
64
|
+
m,
|
|
65
65
|
" ",
|
|
66
66
|
!!s && a === "right" && "→",
|
|
67
67
|
!!s && a === "top-right" && "↗︎"
|
package/dist/Checkbox.mjs
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { SanityIcon as
|
|
4
|
-
const m = "
|
|
1
|
+
import { jsx as a, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import l from "classnames";
|
|
3
|
+
import { SanityIcon as t } from "./SanityIcon.mjs";
|
|
4
|
+
const m = "_wrapper_vzeln_3", b = "_checkbox_vzeln_9", _ = "_label_vzeln_43", d = "_error_vzeln_50", h = "_errorIcon_vzeln_59", c = {
|
|
5
5
|
wrapper: m,
|
|
6
6
|
checkbox: b,
|
|
7
7
|
label: _,
|
|
8
|
-
error:
|
|
9
|
-
errorIcon:
|
|
8
|
+
error: d,
|
|
9
|
+
errorIcon: h
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function p({ error: e, label: o, ...r }) {
|
|
12
12
|
if (!e && !o)
|
|
13
13
|
return /* @__PURE__ */ a(
|
|
14
14
|
"input",
|
|
15
15
|
{
|
|
16
|
-
...
|
|
16
|
+
...r,
|
|
17
17
|
type: "checkbox",
|
|
18
|
-
className:
|
|
18
|
+
className: l(c.checkbox, r.className)
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
-
const s = `${
|
|
22
|
-
let
|
|
23
|
-
return e && (
|
|
21
|
+
const s = `${r.id}-error`;
|
|
22
|
+
let n = r["aria-describedby"] ?? "";
|
|
23
|
+
return e && (n += ` ${s}`), /* @__PURE__ */ i("label", { className: c.wrapper, children: [
|
|
24
24
|
/* @__PURE__ */ a(
|
|
25
25
|
"input",
|
|
26
26
|
{
|
|
27
|
-
...
|
|
27
|
+
...r,
|
|
28
28
|
type: "checkbox",
|
|
29
|
-
className:
|
|
30
|
-
"aria-describedby":
|
|
29
|
+
className: l(c.checkbox, r.className),
|
|
30
|
+
"aria-describedby": n.trim(),
|
|
31
31
|
"aria-errormessage": e ? s : void 0,
|
|
32
32
|
"aria-invalid": e ? "true" : !1
|
|
33
33
|
}
|
|
34
34
|
),
|
|
35
|
-
!!o && /* @__PURE__ */ a("p", { className:
|
|
36
|
-
!!e && /* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */ a(
|
|
35
|
+
!!o && /* @__PURE__ */ a("p", { className: c.label, children: o }),
|
|
36
|
+
!!e && /* @__PURE__ */ i("p", { className: c.error, children: [
|
|
37
|
+
/* @__PURE__ */ a(t, { icon: "error-outline", className: c.errorIcon }),
|
|
38
38
|
e
|
|
39
39
|
] })
|
|
40
40
|
] });
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
p as Checkbox
|
|
44
44
|
};
|
package/dist/Chip.mjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { SanityIcon as
|
|
4
|
-
const
|
|
5
|
-
chip:
|
|
6
|
-
text:
|
|
7
|
-
icon:
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import { SanityIcon as d } from "./SanityIcon.mjs";
|
|
4
|
+
const p = "_chip_1nfjd_3", f = "_text_1nfjd_37", _ = "_icon_1nfjd_46", a = {
|
|
5
|
+
chip: p,
|
|
6
|
+
text: f,
|
|
7
|
+
icon: _
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function u({
|
|
10
10
|
children: c,
|
|
11
|
-
className:
|
|
12
|
-
deleteIcon:
|
|
13
|
-
size:
|
|
14
|
-
letterCase:
|
|
11
|
+
className: n,
|
|
12
|
+
deleteIcon: o = !1,
|
|
13
|
+
size: e = "md",
|
|
14
|
+
letterCase: i = "normal",
|
|
15
15
|
state: l = "default",
|
|
16
16
|
onDelete: s
|
|
17
17
|
}) {
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
19
19
|
"div",
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
22
|
-
"data-size":
|
|
23
|
-
"data-letter-case":
|
|
21
|
+
className: m(a.chip, n),
|
|
22
|
+
"data-size": e,
|
|
23
|
+
"data-letter-case": i,
|
|
24
24
|
"data-state": l,
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ t("span", { className: a.text, children: c }),
|
|
27
|
-
(!!s ||
|
|
27
|
+
(!!s || o) && /* @__PURE__ */ t("button", { "aria-label": `Delete ${c}`, onClick: s, children: /* @__PURE__ */ t(d, { icon: "close", className: a.icon }) })
|
|
28
28
|
]
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
u as Chip
|
|
34
34
|
};
|
package/dist/CodeBlock.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { IconButton as
|
|
5
|
-
import { C as
|
|
6
|
-
const p =
|
|
7
|
-
}]), x = (o) => `tab-${o}`,
|
|
8
|
-
function
|
|
9
|
-
const [a,
|
|
10
|
-
return /* @__PURE__ */ n(p.Provider, { value:
|
|
3
|
+
import { createContext as w, useState as L, useMemo as N, useRef as C, use as _ } from "react";
|
|
4
|
+
import { IconButton as b } from "./IconButton.mjs";
|
|
5
|
+
import { C as g, n as f } from "./Code-BPWAuxLu.mjs";
|
|
6
|
+
const p = w(["", () => {
|
|
7
|
+
}]), x = (o) => `tab-${o}`, y = (o) => `tabpanel-${o}`;
|
|
8
|
+
function I({ children: o, className: e, defaultValue: t }) {
|
|
9
|
+
const [a, c] = L(t), l = N(() => [a, c], [a]);
|
|
10
|
+
return /* @__PURE__ */ n(p.Provider, { value: l, children: /* @__PURE__ */ n("div", { className: e, children: o }) });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const t =
|
|
12
|
+
function v({ children: o, className: e }) {
|
|
13
|
+
const t = C(null);
|
|
14
14
|
return /* @__PURE__ */ n(
|
|
15
15
|
"div",
|
|
16
16
|
{
|
|
@@ -19,13 +19,13 @@ function C({ children: o, className: e }) {
|
|
|
19
19
|
role: "tablist",
|
|
20
20
|
onKeyDown: (a) => {
|
|
21
21
|
if (!t.current || !["ArrowLeft", "ArrowRight"].includes(a.key)) return;
|
|
22
|
-
const
|
|
22
|
+
const l = t.current.querySelectorAll('button[role="tab"]'), r = Array.from(l), h = r.length - 1, d = r.findIndex((i) => i.ariaSelected === "true");
|
|
23
23
|
if (a.key === "ArrowLeft") {
|
|
24
|
-
const i = d === 0 ?
|
|
24
|
+
const i = d === 0 ? h : d - 1;
|
|
25
25
|
r[i]?.focus();
|
|
26
26
|
}
|
|
27
27
|
if (a.key === "ArrowRight") {
|
|
28
|
-
const i = d ===
|
|
28
|
+
const i = d === h ? 0 : d + 1;
|
|
29
29
|
r[i]?.focus();
|
|
30
30
|
}
|
|
31
31
|
},
|
|
@@ -33,19 +33,19 @@ function C({ children: o, className: e }) {
|
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const [a,
|
|
36
|
+
function j({ children: o, className: e, id: t }) {
|
|
37
|
+
const [a, c] = _(p), l = t === a;
|
|
38
38
|
return /* @__PURE__ */ n(
|
|
39
39
|
"button",
|
|
40
40
|
{
|
|
41
|
-
"aria-selected":
|
|
42
|
-
"aria-controls":
|
|
41
|
+
"aria-selected": l,
|
|
42
|
+
"aria-controls": y(t),
|
|
43
43
|
className: e,
|
|
44
44
|
id: x(t),
|
|
45
|
-
onClick: () =>
|
|
46
|
-
onFocus: () =>
|
|
45
|
+
onClick: () => c(t),
|
|
46
|
+
onFocus: () => c(t),
|
|
47
47
|
role: "tab",
|
|
48
|
-
tabIndex:
|
|
48
|
+
tabIndex: l ? 0 : -1,
|
|
49
49
|
children: o
|
|
50
50
|
}
|
|
51
51
|
);
|
|
@@ -57,7 +57,7 @@ function k({ children: o, className: e, id: t }) {
|
|
|
57
57
|
{
|
|
58
58
|
"aria-labelledby": x(t),
|
|
59
59
|
className: e,
|
|
60
|
-
id:
|
|
60
|
+
id: y(t),
|
|
61
61
|
role: "tabpanel",
|
|
62
62
|
style: { display: t === a ? void 0 : "none" },
|
|
63
63
|
tabIndex: 0,
|
|
@@ -65,24 +65,24 @@ function k({ children: o, className: e, id: t }) {
|
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
|
-
const B = "
|
|
68
|
+
const B = "_wrapper_shja8_3", A = "_tabList_shja8_11", T = "_tab_shja8_11", z = "_title_shja8_29", V = "_code_shja8_35", $ = "_copyButton_shja8_48", s = {
|
|
69
69
|
wrapper: B,
|
|
70
70
|
tabList: A,
|
|
71
71
|
tab: T,
|
|
72
|
-
title:
|
|
73
|
-
code:
|
|
74
|
-
copyButton:
|
|
72
|
+
title: z,
|
|
73
|
+
code: V,
|
|
74
|
+
copyButton: $
|
|
75
75
|
};
|
|
76
76
|
function q({ tabs: o }) {
|
|
77
77
|
if (o.length === 1) {
|
|
78
78
|
const [e] = o, t = !e.title && !e.code.includes(`
|
|
79
79
|
`);
|
|
80
|
-
return /* @__PURE__ */ u("div", { className:
|
|
81
|
-
!!e.title && /* @__PURE__ */ n("p", { className:
|
|
80
|
+
return /* @__PURE__ */ u("div", { className: s.wrapper, "data-mode": t ? "minimal" : "normal", children: [
|
|
81
|
+
!!e.title && /* @__PURE__ */ n("p", { className: s.title, children: e.title }),
|
|
82
82
|
/* @__PURE__ */ n(
|
|
83
|
-
|
|
83
|
+
g,
|
|
84
84
|
{
|
|
85
|
-
className:
|
|
85
|
+
className: s.code,
|
|
86
86
|
code: e.code,
|
|
87
87
|
language: e.language,
|
|
88
88
|
highlightLines: e.highlightLines,
|
|
@@ -91,9 +91,9 @@ function q({ tabs: o }) {
|
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
93
|
/* @__PURE__ */ n(
|
|
94
|
-
|
|
94
|
+
b,
|
|
95
95
|
{
|
|
96
|
-
className:
|
|
96
|
+
className: s.copyButton,
|
|
97
97
|
as: "button",
|
|
98
98
|
icon: "clipboard",
|
|
99
99
|
size: "md",
|
|
@@ -105,18 +105,18 @@ function q({ tabs: o }) {
|
|
|
105
105
|
] });
|
|
106
106
|
}
|
|
107
107
|
return /* @__PURE__ */ u(
|
|
108
|
-
|
|
108
|
+
I,
|
|
109
109
|
{
|
|
110
110
|
defaultValue: m(o[0], 0),
|
|
111
|
-
className:
|
|
111
|
+
className: s.wrapper,
|
|
112
112
|
"data-mode": "normal",
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */ n(
|
|
115
|
-
o.map((e, t) => /* @__PURE__ */ u(k, { id: m(e, t), className:
|
|
114
|
+
/* @__PURE__ */ n(v, { className: s.tabList, children: o.map((e, t) => /* @__PURE__ */ n(j, { id: m(e, t), className: s.tab, children: e.title ?? `File ${t + 1}` }, t)) }),
|
|
115
|
+
o.map((e, t) => /* @__PURE__ */ u(k, { id: m(e, t), className: s.tabPanel, children: [
|
|
116
116
|
/* @__PURE__ */ n(
|
|
117
|
-
|
|
117
|
+
g,
|
|
118
118
|
{
|
|
119
|
-
className:
|
|
119
|
+
className: s.code,
|
|
120
120
|
code: e.code,
|
|
121
121
|
language: e.language,
|
|
122
122
|
highlightLines: e.highlightLines,
|
|
@@ -124,9 +124,9 @@ function q({ tabs: o }) {
|
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ n(
|
|
127
|
-
|
|
127
|
+
b,
|
|
128
128
|
{
|
|
129
|
-
className:
|
|
129
|
+
className: s.copyButton,
|
|
130
130
|
as: "button",
|
|
131
131
|
icon: "clipboard",
|
|
132
132
|
size: "md",
|
package/dist/IconButton.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { SanityIcon as e } from "./SanityIcon.mjs";
|
|
3
3
|
import i from "classnames";
|
|
4
|
-
const l = "
|
|
4
|
+
const l = "_button_qvatm_3", u = "_icon_qvatm_115", c = {
|
|
5
5
|
button: l,
|
|
6
6
|
icon: u
|
|
7
7
|
};
|
|
8
8
|
function b({
|
|
9
|
-
as:
|
|
9
|
+
as: m,
|
|
10
10
|
icon: t,
|
|
11
11
|
label: d,
|
|
12
12
|
mode: o,
|
|
13
13
|
size: a,
|
|
14
|
-
...
|
|
14
|
+
...s
|
|
15
15
|
}) {
|
|
16
|
-
const r =
|
|
16
|
+
const r = m ?? "a";
|
|
17
17
|
return a ??= "md", o ??= "primary", typeof t == "string" && (t = /* @__PURE__ */ n(e, { icon: t })), /* @__PURE__ */ n(
|
|
18
18
|
r,
|
|
19
19
|
{
|
|
20
|
-
...
|
|
21
|
-
className: i(
|
|
20
|
+
...s,
|
|
21
|
+
className: i(c.button, s.className),
|
|
22
22
|
"data-size": a,
|
|
23
23
|
"data-mode": o,
|
|
24
|
-
children: /* @__PURE__ */ n("span", { className:
|
|
24
|
+
children: /* @__PURE__ */ n("span", { className: c.icon, "aria-hidden": "true", children: t })
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
}
|
package/dist/Input.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import l from "classnames";
|
|
3
|
-
import { SanityIcon as
|
|
4
|
-
const
|
|
5
|
-
input:
|
|
6
|
-
wrapper:
|
|
7
|
-
label:
|
|
8
|
-
optional:
|
|
9
|
-
hint:
|
|
10
|
-
error:
|
|
11
|
-
errorIcon:
|
|
3
|
+
import { SanityIcon as m } from "./SanityIcon.mjs";
|
|
4
|
+
const d = "_input_cpygt_3", p = "_wrapper_cpygt_23", u = "_label_cpygt_28", y = "_optional_cpygt_34", N = "_hint_cpygt_40", h = "_error_cpygt_49", b = "_errorIcon_cpygt_58", a = {
|
|
5
|
+
input: d,
|
|
6
|
+
wrapper: p,
|
|
7
|
+
label: u,
|
|
8
|
+
optional: y,
|
|
9
|
+
hint: N,
|
|
10
|
+
error: h,
|
|
11
|
+
errorIcon: b
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
if (!e && !
|
|
13
|
+
function w({ error: e, hint: t, label: n, ...r }) {
|
|
14
|
+
if (!e && !t && !n)
|
|
15
15
|
return /* @__PURE__ */ i("input", { ...r, className: l(r.className, a.input) });
|
|
16
|
-
const o = `${r.id}-error`,
|
|
16
|
+
const o = `${r.id}-error`, _ = `${r.id}-hint`;
|
|
17
17
|
let c = r["aria-describedby"] ?? "";
|
|
18
|
-
return e && (c += ` ${o}`),
|
|
19
|
-
!!
|
|
20
|
-
|
|
18
|
+
return e && (c += ` ${o}`), t && (c += ` ${_}`), /* @__PURE__ */ s("div", { className: a.wrapper, children: [
|
|
19
|
+
!!n && /* @__PURE__ */ s("label", { className: a.label, htmlFor: r.id, children: [
|
|
20
|
+
n,
|
|
21
21
|
!r.required && /* @__PURE__ */ i("span", { className: a.optional, children: " (Optional)" })
|
|
22
22
|
] }),
|
|
23
|
-
!!
|
|
23
|
+
!!t && /* @__PURE__ */ i("p", { className: a.hint, children: t }),
|
|
24
24
|
/* @__PURE__ */ i(
|
|
25
25
|
"input",
|
|
26
26
|
{
|
|
@@ -32,11 +32,11 @@ function I({ error: e, hint: n, label: t, ...r }) {
|
|
|
32
32
|
}
|
|
33
33
|
),
|
|
34
34
|
!!e && /* @__PURE__ */ s("p", { className: a.error, children: [
|
|
35
|
-
/* @__PURE__ */ i(
|
|
35
|
+
/* @__PURE__ */ i(m, { icon: "error-outline", className: a.errorIcon }),
|
|
36
36
|
e
|
|
37
37
|
] })
|
|
38
38
|
] });
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
w as Input
|
|
42
42
|
};
|
package/dist/LinkCTA.mjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import h from "classnames";
|
|
3
3
|
import { SanityIcon as a } from "./SanityIcon.mjs";
|
|
4
|
-
const
|
|
5
|
-
link:
|
|
4
|
+
const _ = "_link_1w3p5_3", r = "_iconLeft_1w3p5_45", k = "_iconRight_1w3p5_49", c = {
|
|
5
|
+
link: _,
|
|
6
6
|
iconLeft: r,
|
|
7
|
-
iconRight:
|
|
7
|
+
iconRight: k
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function R({
|
|
10
10
|
as: l,
|
|
11
|
-
arrow:
|
|
11
|
+
arrow: t,
|
|
12
12
|
arrowPosition: n,
|
|
13
13
|
children: m,
|
|
14
14
|
mode: i,
|
|
15
|
-
size:
|
|
16
|
-
...
|
|
15
|
+
size: s,
|
|
16
|
+
...o
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
return
|
|
20
|
-
|
|
18
|
+
const f = l ?? "a";
|
|
19
|
+
return t ??= "arrow-right", n ??= "right", i ??= "ghost", s ??= "lg", /* @__PURE__ */ g(
|
|
20
|
+
f,
|
|
21
21
|
{
|
|
22
|
-
...
|
|
23
|
-
className:
|
|
22
|
+
...o,
|
|
23
|
+
className: h(c.link, o.className),
|
|
24
24
|
"data-mode": i,
|
|
25
|
-
"data-size":
|
|
25
|
+
"data-size": s,
|
|
26
26
|
children: [
|
|
27
|
-
n === "left" && /* @__PURE__ */ e(a, { icon:
|
|
27
|
+
n === "left" && /* @__PURE__ */ e(a, { icon: t, className: c.iconLeft }),
|
|
28
28
|
m,
|
|
29
|
-
n === "right" && /* @__PURE__ */ e(a, { icon:
|
|
29
|
+
n === "right" && /* @__PURE__ */ e(a, { icon: t, className: c.iconRight })
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
R as LinkCTA
|
|
36
36
|
};
|