@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.
@@ -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 m from "classnames";
3
- const t = "_badge_y5ly8_3", c = {
4
- badge: t
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 n({ size: a, ...s }) {
7
- return a ??= "md", /* @__PURE__ */ e(
8
- "span",
9
- {
10
- ...s,
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
- n as Badge
15
+ _ as Badge
18
16
  };
package/dist/Button.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { jsxs as x, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as o } from "react/jsx-runtime";
2
2
  import { SanityIcon as r } from "./SanityIcon.mjs";
3
- import _ from "classnames";
4
- const f = "_button_lxcx1_3", p = "_iconLeft_lxcx1_125", u = "_iconRight_lxcx1_126", s = {
5
- button: f,
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: c,
15
- size: a,
14
+ mode: a,
15
+ size: c,
16
16
  ...i
17
17
  }) {
18
- const l = m ?? "a";
19
- return a ??= "md", c ??= "primary", typeof t == "string" && (t = /* @__PURE__ */ o(r, { icon: t })), typeof n == "string" && (n = /* @__PURE__ */ o(r, { icon: n })), /* @__PURE__ */ x(
20
- l,
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: _(s.button, i.className),
24
- "data-size": a,
25
- "data-mode": c,
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 m } from "./SanityImage-BiL4qP5X.mjs";
3
- import n from "classnames";
4
- const _ = "_link_1m5mb_3", d = "_image_1m5mb_15", p = "_imageDark_1m5mb_21", k = "_imageLight_1m5mb_26", b = "_eyebrow_1m5mb_32", y = "_title_1m5mb_37", t = {
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: o,
15
- eyebrow: r,
14
+ className: l,
15
+ eyebrow: n,
16
16
  href: s,
17
- image: i,
18
- link: l = f,
19
- title: g
17
+ image: t,
18
+ link: g = f,
19
+ title: m
20
20
  }) {
21
- return /* @__PURE__ */ e("article", { className: o, children: /* @__PURE__ */ c(l, { href: s, className: t.link, children: [
22
- typeof i == "string" && /* @__PURE__ */ e(
23
- m,
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: i,
26
- className: t.image,
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 i == "object" && /* @__PURE__ */ c(h, { children: [
33
+ typeof t == "object" && /* @__PURE__ */ c(h, { children: [
34
34
  /* @__PURE__ */ e(
35
- m,
35
+ r,
36
36
  {
37
- src: i.light,
38
- className: n(t.image, t.imageLight),
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
- m,
46
+ r,
47
47
  {
48
- src: i.dark,
49
- className: n(t.image, t.imageDark),
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 i == "function" && i({
58
- className: t.image,
57
+ typeof t == "function" && t({
58
+ className: i.image,
59
59
  decoding: "async",
60
60
  loading: "lazy"
61
61
  }),
62
- !!r && /* @__PURE__ */ e("p", { className: t.eyebrow, children: r }),
63
- /* @__PURE__ */ c("p", { className: t.title, children: [
64
- g,
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 n } from "react/jsx-runtime";
2
- import t from "classnames";
3
- import { SanityIcon as l } from "./SanityIcon.mjs";
4
- const m = "_wrapper_15wcp_3", b = "_checkbox_15wcp_9", _ = "_label_15wcp_42", p = "_error_15wcp_49", d = "_errorIcon_15wcp_58", r = {
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: p,
9
- errorIcon: d
8
+ error: d,
9
+ errorIcon: h
10
10
  };
11
- function N({ error: e, label: o, ...c }) {
11
+ function p({ error: e, label: o, ...r }) {
12
12
  if (!e && !o)
13
13
  return /* @__PURE__ */ a(
14
14
  "input",
15
15
  {
16
- ...c,
16
+ ...r,
17
17
  type: "checkbox",
18
- className: t(r.checkbox, c.className)
18
+ className: l(c.checkbox, r.className)
19
19
  }
20
20
  );
21
- const s = `${c.id}-error`;
22
- let i = c["aria-describedby"] ?? "";
23
- return e && (i += ` ${s}`), /* @__PURE__ */ n("label", { className: r.wrapper, children: [
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
- ...c,
27
+ ...r,
28
28
  type: "checkbox",
29
- className: t(r.checkbox, c.className),
30
- "aria-describedby": i.trim(),
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: r.label, children: o }),
36
- !!e && /* @__PURE__ */ n("p", { className: r.error, children: [
37
- /* @__PURE__ */ a(l, { icon: "error-outline", className: r.errorIcon }),
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
- N as Checkbox
43
+ p as Checkbox
44
44
  };
package/dist/Chip.mjs CHANGED
@@ -1,34 +1,34 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import r from "classnames";
3
- import { SanityIcon as m } from "./SanityIcon.mjs";
4
- const _ = "_chip_1p98z_3", d = "_text_1p98z_36", x = "_icon_1p98z_45", a = {
5
- chip: _,
6
- text: d,
7
- icon: x
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 z({
9
+ function u({
10
10
  children: c,
11
- className: o,
12
- deleteIcon: e = !1,
13
- size: i = "md",
14
- letterCase: n = "normal",
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__ */ p(
18
+ return /* @__PURE__ */ r(
19
19
  "div",
20
20
  {
21
- className: r(a.chip, o),
22
- "data-size": i,
23
- "data-letter-case": n,
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 || e) && /* @__PURE__ */ t("button", { "aria-label": `Delete ${c}`, onClick: s, children: /* @__PURE__ */ t(m, { icon: "close", className: a.icon }) })
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
- z as Chip
33
+ u as Chip
34
34
  };
@@ -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 y, useState as w, useMemo as L, useRef as N, use as _ } from "react";
4
- import { IconButton as g } from "./IconButton.mjs";
5
- import { C as h, n as f } from "./Code-BPWAuxLu.mjs";
6
- const p = y(["", () => {
7
- }]), x = (o) => `tab-${o}`, v = (o) => `tabpanel-${o}`;
8
- function z({ children: o, className: e, defaultValue: t }) {
9
- const [a, s] = w(t), c = L(() => [a, s], [a]);
10
- return /* @__PURE__ */ n(p.Provider, { value: c, children: /* @__PURE__ */ n("div", { className: e, children: o }) });
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 C({ children: o, className: e }) {
13
- const t = N(null);
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 c = t.current.querySelectorAll('button[role="tab"]'), r = Array.from(c), b = r.length - 1, d = r.findIndex((i) => i.ariaSelected === "true");
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 ? b : d - 1;
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 === b ? 0 : d + 1;
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 I({ children: o, className: e, id: t }) {
37
- const [a, s] = _(p), c = t === 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": c,
42
- "aria-controls": v(t),
41
+ "aria-selected": l,
42
+ "aria-controls": y(t),
43
43
  className: e,
44
44
  id: x(t),
45
- onClick: () => s(t),
46
- onFocus: () => s(t),
45
+ onClick: () => c(t),
46
+ onFocus: () => c(t),
47
47
  role: "tab",
48
- tabIndex: c ? 0 : -1,
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: v(t),
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 = "_wrapper_z485v_3", A = "_tabList_z485v_11", T = "_tab_z485v_11", V = "_title_z485v_29", $ = "_code_z485v_35", P = "_copyButton_z485v_48", l = {
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: V,
73
- code: $,
74
- copyButton: P
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: l.wrapper, "data-mode": t ? "minimal" : "normal", children: [
81
- !!e.title && /* @__PURE__ */ n("p", { className: l.title, children: e.title }),
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
- h,
83
+ g,
84
84
  {
85
- className: l.code,
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
- g,
94
+ b,
95
95
  {
96
- className: l.copyButton,
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
- z,
108
+ I,
109
109
  {
110
110
  defaultValue: m(o[0], 0),
111
- className: l.wrapper,
111
+ className: s.wrapper,
112
112
  "data-mode": "normal",
113
113
  children: [
114
- /* @__PURE__ */ n(C, { className: l.tabList, children: o.map((e, t) => /* @__PURE__ */ n(I, { id: m(e, t), className: l.tab, children: e.title ?? `File ${t + 1}` }, t)) }),
115
- o.map((e, t) => /* @__PURE__ */ u(k, { id: m(e, t), className: l.tabPanel, children: [
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
- h,
117
+ g,
118
118
  {
119
- className: l.code,
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
- g,
127
+ b,
128
128
  {
129
- className: l.copyButton,
129
+ className: s.copyButton,
130
130
  as: "button",
131
131
  icon: "clipboard",
132
132
  size: "md",
@@ -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 = "_button_yt6mm_3", u = "_icon_yt6mm_114", s = {
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: c,
9
+ as: m,
10
10
  icon: t,
11
11
  label: d,
12
12
  mode: o,
13
13
  size: a,
14
- ...m
14
+ ...s
15
15
  }) {
16
- const r = c ?? "a";
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
- ...m,
21
- className: i(s.button, m.className),
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: s.icon, "aria-hidden": "true", children: t })
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 _ } from "./SanityIcon.mjs";
4
- const m = "_input_1uwxy_3", d = "_wrapper_1uwxy_21", p = "_label_1uwxy_26", w = "_optional_1uwxy_32", y = "_hint_1uwxy_38", N = "_error_1uwxy_47", x = "_errorIcon_1uwxy_56", a = {
5
- input: m,
6
- wrapper: d,
7
- label: p,
8
- optional: w,
9
- hint: y,
10
- error: N,
11
- errorIcon: x
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 I({ error: e, hint: n, label: t, ...r }) {
14
- if (!e && !n && !t)
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`, u = `${r.id}-hint`;
16
+ const o = `${r.id}-error`, _ = `${r.id}-hint`;
17
17
  let c = r["aria-describedby"] ?? "";
18
- return e && (c += ` ${o}`), n && (c += ` ${u}`), /* @__PURE__ */ s("div", { className: a.wrapper, children: [
19
- !!t && /* @__PURE__ */ s("label", { className: a.label, htmlFor: r.id, children: [
20
- t,
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
- !!n && /* @__PURE__ */ i("p", { className: a.hint, children: n }),
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(_, { icon: "error-outline", className: a.errorIcon }),
35
+ /* @__PURE__ */ i(m, { icon: "error-outline", className: a.errorIcon }),
36
36
  e
37
37
  ] })
38
38
  ] });
39
39
  }
40
40
  export {
41
- I as Input
41
+ w as Input
42
42
  };
package/dist/LinkCTA.mjs CHANGED
@@ -1,36 +1,36 @@
1
- import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
- import _ from "classnames";
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 g = "_link_ox1ph_3", r = "_iconLeft_ox1ph_43", x = "_iconRight_ox1ph_47", t = {
5
- link: g,
4
+ const _ = "_link_1w3p5_3", r = "_iconLeft_1w3p5_45", k = "_iconRight_1w3p5_49", c = {
5
+ link: _,
6
6
  iconLeft: r,
7
- iconRight: x
7
+ iconRight: k
8
8
  };
9
- function N({
9
+ function R({
10
10
  as: l,
11
- arrow: c,
11
+ arrow: t,
12
12
  arrowPosition: n,
13
13
  children: m,
14
14
  mode: i,
15
- size: o,
16
- ...s
15
+ size: s,
16
+ ...o
17
17
  }) {
18
- const h = l ?? "a";
19
- return c ??= "arrow-right", n ??= "right", i ??= "accent", o ??= "lg", /* @__PURE__ */ f(
20
- h,
18
+ const f = l ?? "a";
19
+ return t ??= "arrow-right", n ??= "right", i ??= "ghost", s ??= "lg", /* @__PURE__ */ g(
20
+ f,
21
21
  {
22
- ...s,
23
- className: _(t.link, s.className),
22
+ ...o,
23
+ className: h(c.link, o.className),
24
24
  "data-mode": i,
25
- "data-size": o,
25
+ "data-size": s,
26
26
  children: [
27
- n === "left" && /* @__PURE__ */ e(a, { icon: c, className: t.iconLeft }),
27
+ n === "left" && /* @__PURE__ */ e(a, { icon: t, className: c.iconLeft }),
28
28
  m,
29
- n === "right" && /* @__PURE__ */ e(a, { icon: c, className: t.iconRight })
29
+ n === "right" && /* @__PURE__ */ e(a, { icon: t, className: c.iconRight })
30
30
  ]
31
31
  }
32
32
  );
33
33
  }
34
34
  export {
35
- N as LinkCTA
35
+ R as LinkCTA
36
36
  };