@sanity/sanity-id 1.3.1 → 1.4.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 (98) hide show
  1. package/dist/Badge.mjs +18 -0
  2. package/dist/Breadcrumbs.mjs +22 -0
  3. package/dist/Button.mjs +36 -0
  4. package/dist/Card.mjs +76 -0
  5. package/dist/Checkbox.mjs +44 -0
  6. package/dist/Chip.mjs +34 -0
  7. package/dist/Code-BPWAuxLu.mjs +5949 -0
  8. package/dist/Code.mjs +7 -0
  9. package/dist/CodeBlock.mjs +148 -0
  10. package/dist/Eyebrow.mjs +20 -0
  11. package/dist/IconButton.mjs +30 -0
  12. package/dist/Input.mjs +42 -0
  13. package/dist/LinkCTA.mjs +36 -0
  14. package/dist/Person.mjs +53 -0
  15. package/dist/Radio.mjs +44 -0
  16. package/dist/RadioSwitch.mjs +55 -0
  17. package/dist/SanityIcon.mjs +21 -0
  18. package/dist/SanityImage-BiL4qP5X.mjs +84 -0
  19. package/dist/Select.mjs +42 -0
  20. package/dist/Switch.mjs +44 -0
  21. package/dist/Table.mjs +11 -0
  22. package/dist/Testimonial.mjs +46 -0
  23. package/dist/TextCard.mjs +45 -0
  24. package/dist/Textarea.mjs +48 -0
  25. package/dist/colors.mjs +286 -0
  26. package/dist/components/LinkCTA.d.ts +3 -1
  27. package/dist/sanity-id.css +1 -0
  28. package/dist/{components/shiki-groq-TO2TNDG5.js → shiki-groq-1KJlUIMn.mjs} +29 -9
  29. package/dist/wasm-DQxwEHae.mjs +7 -0
  30. package/package.json +32 -39
  31. package/components.css +0 -22
  32. package/dist/colors.js +0 -288
  33. package/dist/components/Badge.css +0 -22
  34. package/dist/components/Badge.js +0 -8
  35. package/dist/components/Breadcrumbs.css +0 -23
  36. package/dist/components/Breadcrumbs.js +0 -32
  37. package/dist/components/Button.css +0 -139
  38. package/dist/components/Button.js +0 -56
  39. package/dist/components/Card.css +0 -37
  40. package/dist/components/Card.js +0 -88
  41. package/dist/components/Checkbox.css +0 -67
  42. package/dist/components/Checkbox.js +0 -60
  43. package/dist/components/Chip.css +0 -50
  44. package/dist/components/Chip.js +0 -46
  45. package/dist/components/Code.css +0 -44
  46. package/dist/components/Code.js +0 -9
  47. package/dist/components/CodeBlock.css +0 -241
  48. package/dist/components/CodeBlock.js +0 -180
  49. package/dist/components/Eyebrow.css +0 -52
  50. package/dist/components/Eyebrow.js +0 -10
  51. package/dist/components/IconButton.css +0 -145
  52. package/dist/components/IconButton.js +0 -10
  53. package/dist/components/Input.css +0 -63
  54. package/dist/components/Input.js +0 -60
  55. package/dist/components/LinkCTA.css +0 -41
  56. package/dist/components/LinkCTA.js +0 -9
  57. package/dist/components/Person.css +0 -39
  58. package/dist/components/Person.js +0 -9
  59. package/dist/components/Radio.css +0 -65
  60. package/dist/components/Radio.js +0 -60
  61. package/dist/components/RadioSwitch.css +0 -54
  62. package/dist/components/RadioSwitch.js +0 -67
  63. package/dist/components/SanityIcon.css +0 -9
  64. package/dist/components/SanityIcon.js +0 -8
  65. package/dist/components/Select.css +0 -68
  66. package/dist/components/Select.js +0 -60
  67. package/dist/components/Switch.css +0 -74
  68. package/dist/components/Switch.js +0 -60
  69. package/dist/components/Table.css +0 -41
  70. package/dist/components/Table.js +0 -23
  71. package/dist/components/Testimonial.css +0 -89
  72. package/dist/components/Testimonial.js +0 -62
  73. package/dist/components/TextCard.css +0 -86
  74. package/dist/components/TextCard.js +0 -62
  75. package/dist/components/Textarea.css +0 -61
  76. package/dist/components/Textarea.js +0 -66
  77. package/dist/components/chunk-BTQMA6IR.js +0 -67
  78. package/dist/components/chunk-CHTYOZV5.js +0 -11956
  79. package/dist/components/chunk-CLL6M6SE.js +0 -33
  80. package/dist/components/chunk-FWU2MW33.js +0 -33
  81. package/dist/components/chunk-LX3OLRB6.js +0 -97
  82. package/dist/components/chunk-QT2A4HNA.js +0 -32
  83. package/dist/components/chunk-RC7UR3KP.js +0 -76
  84. package/dist/components/chunk-SHMDGY6H.js +0 -48
  85. package/dist/components/chunk-SQX6FUC5.js +0 -9
  86. package/dist/components/chunk-U67V476Y.js +0 -35
  87. package/dist/components/chunk-XX5UFTAH.js +0 -50
  88. package/dist/components/chunk-YN7JVTDO.js +0 -9
  89. package/dist/components/css-ZLXZXJB7.js +0 -7
  90. package/dist/components/html-JVGMMEAV.js +0 -18
  91. package/dist/components/javascript-JQHDWVZO.js +0 -7
  92. package/dist/components/json-KGV6LXD3.js +0 -10
  93. package/dist/components/shell-LBTKFZVR.js +0 -10
  94. package/dist/components/toml-WHFDD67T.js +0 -10
  95. package/dist/components/tsx-KTYUJ2N6.js +0 -10
  96. package/dist/components/typescript-VIVS34WM.js +0 -10
  97. package/dist/components/wasm-I4G7NSNF.js +0 -13
  98. package/dist/components/yml-EHGEICAD.js +0 -10
package/dist/Badge.mjs ADDED
@@ -0,0 +1,18 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import m from "classnames";
3
+ const t = "_badge_y5ly8_3", c = {
4
+ badge: t
5
+ };
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
+ );
15
+ }
16
+ export {
17
+ n as Badge
18
+ };
@@ -0,0 +1,22 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import i from "classnames";
3
+ const n = "_nav_eb5rp_3", c = "_list_eb5rp_7", m = "_listItem_eb5rp_15", o = "_link_eb5rp_21", t = {
4
+ nav: n,
5
+ list: c,
6
+ listItem: m,
7
+ link: o
8
+ };
9
+ function b({ className: r, label: a, links: l }) {
10
+ return /* @__PURE__ */ s("nav", { "aria-label": a, className: i(t.nav, r), children: /* @__PURE__ */ s("ol", { className: t.list, children: l.map((e) => /* @__PURE__ */ s("li", { className: t.listItem, children: /* @__PURE__ */ s(
11
+ "a",
12
+ {
13
+ href: e.href,
14
+ "aria-current": e.current ? "page" : void 0,
15
+ className: t.link,
16
+ children: e.title
17
+ }
18
+ ) }, e.title)) }) });
19
+ }
20
+ export {
21
+ b as Breadcrumbs
22
+ };
@@ -0,0 +1,36 @@
1
+ import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
+ import { SanityIcon as r } from "./SanityIcon.mjs";
3
+ import l from "classnames";
4
+ const p = "_button_5snan_3", u = "_iconLeft_5snan_125", d = "_iconRight_5snan_126", o = {
5
+ button: p,
6
+ iconLeft: u,
7
+ iconRight: d
8
+ };
9
+ function h({
10
+ as: m,
11
+ children: e,
12
+ iconLeft: n,
13
+ iconRight: t,
14
+ mode: a,
15
+ size: c,
16
+ ...i
17
+ }) {
18
+ const _ = m ?? "a";
19
+ return c ??= "md", a ??= "primary", typeof n == "string" && (n = /* @__PURE__ */ s(r, { icon: n })), typeof t == "string" && (t = /* @__PURE__ */ s(r, { icon: t })), /* @__PURE__ */ f(
20
+ _,
21
+ {
22
+ ...i,
23
+ className: l(o.button, i.className),
24
+ "data-size": c,
25
+ "data-mode": a,
26
+ children: [
27
+ !!n && /* @__PURE__ */ s("span", { className: o.iconLeft, children: n }),
28
+ e,
29
+ !!t && /* @__PURE__ */ s("span", { className: o.iconRight, children: t })
30
+ ]
31
+ }
32
+ );
33
+ }
34
+ export {
35
+ h as Button
36
+ };
package/dist/Card.mjs ADDED
@@ -0,0 +1,76 @@
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 = {
5
+ link: _,
6
+ image: d,
7
+ imageDark: p,
8
+ imageLight: k,
9
+ eyebrow: b,
10
+ title: y
11
+ };
12
+ function D({
13
+ arrow: a = "right",
14
+ className: o,
15
+ eyebrow: r,
16
+ href: s,
17
+ image: i,
18
+ link: l = f,
19
+ title: g
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,
24
+ {
25
+ src: i,
26
+ className: t.image,
27
+ width: 400,
28
+ widths: [400],
29
+ height: 225,
30
+ crop: "center"
31
+ }
32
+ ),
33
+ typeof i == "object" && /* @__PURE__ */ c(h, { children: [
34
+ /* @__PURE__ */ e(
35
+ m,
36
+ {
37
+ src: i.light,
38
+ className: n(t.image, t.imageLight),
39
+ width: 400,
40
+ widths: [400],
41
+ height: 225,
42
+ crop: "center"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ e(
46
+ m,
47
+ {
48
+ src: i.dark,
49
+ className: n(t.image, t.imageDark),
50
+ width: 400,
51
+ widths: [400],
52
+ height: 225,
53
+ crop: "center"
54
+ }
55
+ )
56
+ ] }),
57
+ typeof i == "function" && i({
58
+ className: t.image,
59
+ decoding: "async",
60
+ loading: "lazy"
61
+ }),
62
+ !!r && /* @__PURE__ */ e("p", { className: t.eyebrow, children: r }),
63
+ /* @__PURE__ */ c("p", { className: t.title, children: [
64
+ g,
65
+ " ",
66
+ !!s && a === "right" && "→",
67
+ !!s && a === "top-right" && "↗︎"
68
+ ] })
69
+ ] }) });
70
+ }
71
+ function f(a) {
72
+ return /* @__PURE__ */ e("a", { ...a });
73
+ }
74
+ export {
75
+ D as Card
76
+ };
@@ -0,0 +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 = {
5
+ wrapper: m,
6
+ checkbox: b,
7
+ label: _,
8
+ error: p,
9
+ errorIcon: d
10
+ };
11
+ function N({ error: e, label: o, ...c }) {
12
+ if (!e && !o)
13
+ return /* @__PURE__ */ a(
14
+ "input",
15
+ {
16
+ ...c,
17
+ type: "checkbox",
18
+ className: t(r.checkbox, c.className)
19
+ }
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: [
24
+ /* @__PURE__ */ a(
25
+ "input",
26
+ {
27
+ ...c,
28
+ type: "checkbox",
29
+ className: t(r.checkbox, c.className),
30
+ "aria-describedby": i.trim(),
31
+ "aria-errormessage": e ? s : void 0,
32
+ "aria-invalid": e ? "true" : !1
33
+ }
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 }),
38
+ e
39
+ ] })
40
+ ] });
41
+ }
42
+ export {
43
+ N as Checkbox
44
+ };
package/dist/Chip.mjs ADDED
@@ -0,0 +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
8
+ };
9
+ function z({
10
+ children: c,
11
+ className: o,
12
+ deleteIcon: e = !1,
13
+ size: i = "md",
14
+ letterCase: n = "normal",
15
+ state: l = "default",
16
+ onDelete: s
17
+ }) {
18
+ return /* @__PURE__ */ p(
19
+ "div",
20
+ {
21
+ className: r(a.chip, o),
22
+ "data-size": i,
23
+ "data-letter-case": n,
24
+ "data-state": l,
25
+ children: [
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 }) })
28
+ ]
29
+ }
30
+ );
31
+ }
32
+ export {
33
+ z as Chip
34
+ };