@sanity/sanity-id 0.0.0 → 0.1.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 (94) hide show
  1. package/dist/Breadcrumbs.d.ts +17 -0
  2. package/dist/Breadcrumbs.js +1 -53
  3. package/dist/Button.d.ts +39 -0
  4. package/dist/Button.js +1 -50
  5. package/dist/Card.d.ts +15 -0
  6. package/dist/Card.js +1 -16
  7. package/dist/Checkbox.d.ts +11 -0
  8. package/dist/Checkbox.js +1 -31
  9. package/dist/Eyebrow.d.ts +13 -0
  10. package/dist/Eyebrow.js +1 -30
  11. package/dist/IconButton.d.ts +33 -0
  12. package/dist/IconButton.js +1 -38
  13. package/dist/Input.d.ts +10 -0
  14. package/dist/Input.js +1 -16
  15. package/dist/Input.module-CJkUSxF9.js +1 -0
  16. package/dist/Label.d.ts +16 -0
  17. package/dist/Label.js +1 -22
  18. package/dist/Link-zm9qxqps.js +1 -0
  19. package/dist/LinkCTA.d.ts +23 -0
  20. package/dist/LinkCTA.js +1 -53
  21. package/dist/Radio.d.ts +11 -0
  22. package/dist/Radio.js +1 -29
  23. package/dist/RadioSwitch.d.ts +28 -0
  24. package/dist/RadioSwitch.js +1 -87
  25. package/dist/SanityIcon-D4sDJgMO.js +1 -0
  26. package/dist/Select.d.ts +10 -0
  27. package/dist/Select.js +1 -22
  28. package/dist/Switch.d.ts +11 -0
  29. package/dist/Switch.js +1 -29
  30. package/dist/TextArea.d.ts +13 -0
  31. package/dist/TextArea.js +1 -21
  32. package/dist/clsx-C11secjj.js +1 -0
  33. package/dist/colors.d.ts +354 -0
  34. package/dist/colors.js +1 -935
  35. package/dist/styles.css +1 -1
  36. package/dist/tailwind.d.ts +93 -0
  37. package/dist/tailwind.js +1 -577
  38. package/dist/useLinkWithRef-Bt1HfBJb.js +1 -0
  39. package/dist/utils.d.ts +29 -0
  40. package/dist/utils.js +1 -23
  41. package/package.json +24 -20
  42. package/.turbo/turbo-build.log +0 -32
  43. package/dist/Input.module-P--gA8sq.js +0 -6
  44. package/dist/Link-BWIwmuYV.js +0 -4068
  45. package/dist/SanityIcon-Bl5or1b8.js +0 -13
  46. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  47. package/dist/clsx-OuTLNxxd.js +0 -16
  48. package/dist/useLinkWithRef-D9NOX6Bd.js +0 -21
  49. package/postcss.config.js +0 -6
  50. package/src/colors.ts +0 -3
  51. package/src/components/Breadcrumbs.module.css +0 -21
  52. package/src/components/Breadcrumbs.tsx +0 -38
  53. package/src/components/Button.module.css +0 -407
  54. package/src/components/Button.tsx +0 -110
  55. package/src/components/Card.module.css +0 -19
  56. package/src/components/Card.tsx +0 -18
  57. package/src/components/Checkbox.module.css +0 -82
  58. package/src/components/Checkbox.tsx +0 -38
  59. package/src/components/Eyebrow.module.css +0 -28
  60. package/src/components/Eyebrow.tsx +0 -37
  61. package/src/components/IconButton.module.css +0 -196
  62. package/src/components/IconButton.tsx +0 -62
  63. package/src/components/Input.module.css +0 -55
  64. package/src/components/Input.tsx +0 -23
  65. package/src/components/Label.module.css +0 -53
  66. package/src/components/Label.tsx +0 -33
  67. package/src/components/LinkCTA.module.css +0 -122
  68. package/src/components/LinkCTA.tsx +0 -77
  69. package/src/components/Radio.module.css +0 -91
  70. package/src/components/Radio.tsx +0 -33
  71. package/src/components/RadioSwitch.module.css +0 -125
  72. package/src/components/RadioSwitch.tsx +0 -122
  73. package/src/components/Select.module.css +0 -35
  74. package/src/components/Select.tsx +0 -28
  75. package/src/components/Switch.module.css +0 -112
  76. package/src/components/Switch.tsx +0 -33
  77. package/src/components/TextArea.module.css +0 -17
  78. package/src/components/TextArea.tsx +0 -30
  79. package/src/components/helpers/AddRefParam.tsx +0 -29
  80. package/src/components/helpers/Link.tsx +0 -56
  81. package/src/components/helpers/NavLink.tsx +0 -20
  82. package/src/components/helpers/SanityIcon.tsx +0 -25
  83. package/src/components/helpers/useIsCurrentPage.ts +0 -39
  84. package/src/components/helpers/useLinkWithRef.ts +0 -27
  85. package/src/components/helpers/useSafePathname.ts +0 -17
  86. package/src/css.d.ts +0 -4
  87. package/src/tailwind.ts +0 -408
  88. package/src/tokens/dynamic-colors.ts +0 -154
  89. package/src/tokens/primitive-colors.ts +0 -237
  90. package/src/tokens/semantic-colors.ts +0 -574
  91. package/src/utils.ts +0 -58
  92. package/tailwind.config.ts +0 -7
  93. package/tsconfig.json +0 -17
  94. package/vite.config.ts +0 -29
@@ -0,0 +1,17 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare type Breadcrumb = {
4
+ title: string;
5
+ href: string;
6
+ current?: boolean;
7
+ };
8
+
9
+ export declare function Breadcrumbs(props: BreadcrumbsProps): JSX.Element;
10
+
11
+ export declare type BreadcrumbsProps = {
12
+ label: string;
13
+ links: Array<Breadcrumb>;
14
+ className?: string;
15
+ };
16
+
17
+ export { }
@@ -1,53 +1 @@
1
- "use client";
2
- import { c as u } from "./clsx-OuTLNxxd.js";
3
- import { useState as o, useEffect as m, Suspense as f } from "react";
4
- import { n as l, L as _ } from "./Link-BWIwmuYV.js";
5
- function h(t) {
6
- const [e, a] = o(!1), r = l.usePathname(), s = l.useSearchParams();
7
- return m(() => {
8
- if (!t) {
9
- a(!1);
10
- return;
11
- }
12
- if (!URL.canParse?.(t, location.origin)) {
13
- a(!1);
14
- return;
15
- }
16
- const c = new URL(t, location.origin);
17
- if (c.pathname !== r) {
18
- a(!1);
19
- return;
20
- }
21
- const i = s?.toString();
22
- if (c.searchParams.toString() !== i) {
23
- a(!1);
24
- return;
25
- }
26
- a(!0);
27
- }, [t, r, s]), e;
28
- }
29
- function g({ active: t, ...e }) {
30
- let a = e["aria-current"];
31
- const r = h(e.href);
32
- return a ??= r || t ? "page" : "false", /* @__PURE__ */ React.createElement(_, { ...e, "aria-current": a });
33
- }
34
- const q = "_nav_pqq36_1", v = "_list_pqq36_5", E = "_listItem_pqq36_9", R = "_link_pqq36_15", n = {
35
- nav: q,
36
- list: v,
37
- listItem: E,
38
- link: R
39
- };
40
- function I(t) {
41
- return /* @__PURE__ */ React.createElement("nav", { "aria-label": t.label, className: u(t.className, n.nav) }, /* @__PURE__ */ React.createElement("ol", { className: n.list }, t.links.map((e) => /* @__PURE__ */ React.createElement("li", { key: e.href + e.title, className: n.listItem }, /* @__PURE__ */ React.createElement(f, null, /* @__PURE__ */ React.createElement(
42
- g,
43
- {
44
- href: e.href,
45
- "aria-current": e.current ? "page" : void 0,
46
- className: n.link
47
- },
48
- e.title
49
- ))))));
50
- }
51
- export {
52
- I as Breadcrumbs
53
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("./clsx-C11secjj.js"),n=require("./Link-zm9qxqps.js"),a="_nav_pqq36_1",c="_list_pqq36_5",r="_listItem_pqq36_9",m="_link_pqq36_15",t={nav:a,list:c,listItem:r,link:m};function o(l){return s.jsx("nav",{"aria-label":l.label,className:i.clsx(l.className,t.nav),children:s.jsx("ol",{className:t.list,children:l.links.map(e=>s.jsx("li",{className:t.listItem,children:s.jsx(n.Link,{href:e.href,"aria-current":e.current?"page":void 0,className:t.link,children:e.title})},e.href+e.title))})})}exports.Breadcrumbs=o;
@@ -0,0 +1,39 @@
1
+ import { default as default_2 } from 'next/link';
2
+ import { IconSymbol } from '@sanity/icons';
3
+ import { JSX } from 'react/jsx-runtime';
4
+
5
+ declare type AnchorOrButton = Omit<Parameters<typeof Link>[0], "type" | "href"> & React.ButtonHTMLAttributes<HTMLButtonElement>;
6
+
7
+ export declare function Button({ as, size, fill, color, state, iconLeft, iconRight, children, rounded, injectRef, disableLinkRef, ...props }: Button.Props): JSX.Element;
8
+
9
+ export declare namespace Button {
10
+ export type State = "default" | "hover" | "active" | "disabled" | "loading" | undefined;
11
+ export type Fill = "solid" | "outline" | "ghost" | undefined;
12
+ export type Props = AnchorOrButton & {
13
+ as?: "button" | "a" | "div" | "span" | "external";
14
+ size?: "sm" | "md" | "lg";
15
+ fill?: Fill;
16
+ color?: "primary" | "brand" | "accent" | "gray" | "primary-inverse" | "white" | "black";
17
+ state?: State;
18
+ iconLeft?: SanityIconName | React.ReactNode;
19
+ iconRight?: SanityIconName | React.ReactNode;
20
+ children?: React.ReactNode;
21
+ href?: string;
22
+ rounded?: boolean;
23
+ injectRef?: boolean;
24
+ disableLinkRef?: boolean;
25
+ };
26
+ }
27
+
28
+ declare function Link({ href, target, prefetch, ...props }: Link.Props): JSX.Element;
29
+
30
+ declare namespace Link {
31
+ type Props = Omit<React.ComponentProps<typeof default_2>, "prefetch" | "href"> & {
32
+ prefetch?: boolean | null | "hover";
33
+ href?: string;
34
+ };
35
+ }
36
+
37
+ declare type SanityIconName = IconSymbol;
38
+
39
+ export { }
package/dist/Button.js CHANGED
@@ -1,50 +1 @@
1
- "use client";
2
- import { c } from "./clsx-OuTLNxxd.js";
3
- import { L as d } from "./Link-BWIwmuYV.js";
4
- import { S as _ } from "./SanityIcon-Bl5or1b8.js";
5
- import { u as j } from "./useLinkWithRef-D9NOX6Bd.js";
6
- const y = "_button_1x1xj_1", N = "_icon_1x1xj_7", R = "_iconLeft_1x1xj_200", k = "_iconRight_1x1xj_204", s = {
7
- button: y,
8
- icon: N,
9
- iconLeft: R,
10
- iconRight: k
11
- };
12
- function B({
13
- as: i,
14
- size: l,
15
- fill: r,
16
- color: f,
17
- state: m,
18
- iconLeft: e,
19
- iconRight: t,
20
- children: u,
21
- rounded: x,
22
- injectRef: b = !0,
23
- disableLinkRef: E = !1,
24
- ...n
25
- }) {
26
- let o = n.href;
27
- const p = j(n.href);
28
- b && !E && (o = p), l ??= "md", r ??= "solid", f ??= "primary", m === "loading" && (e && !t ? e = "spinner" : t && !e ? t = "spinner" : e = "spinner"), typeof e == "string" && (e = /* @__PURE__ */ React.createElement(_, { icon: e })), typeof t == "string" && (t = /* @__PURE__ */ React.createElement(_, { icon: t }));
29
- let a = "div";
30
- return i === "a" ? a = d : i === "external" ? a = "a" : i ? a = i : o ? a = d : n.onClick && (a = "button"), /* @__PURE__ */ React.createElement(
31
- a,
32
- {
33
- ...n,
34
- className: c(s.button, n.className),
35
- "data-size": l,
36
- "data-fill": r,
37
- "data-color": f,
38
- "data-state": m,
39
- "data-rounded": x,
40
- "data-no-label": u ? void 0 : !0,
41
- href: o
42
- },
43
- e && /* @__PURE__ */ React.createElement("span", { className: c(s.icon, s.iconLeft) }, e),
44
- u,
45
- t && /* @__PURE__ */ React.createElement("span", { className: c(s.icon, s.iconRight) }, t)
46
- );
47
- }
48
- export {
49
- B as Button
50
- };
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),o=require("./clsx-C11secjj.js"),_=require("./Link-zm9qxqps.js"),j=require("./SanityIcon-D4sDJgMO.js"),k=require("./useLinkWithRef-Bt1HfBJb.js"),q="_button_1x1xj_1",S="_icon_1x1xj_7",N="_iconLeft_1x1xj_200",v="_iconRight_1x1xj_204",a={button:q,icon:S,iconLeft:N,iconRight:v};function I({as:c,size:r,fill:u,color:f,state:x,iconLeft:e,iconRight:n,children:d,rounded:m,injectRef:b=!0,disableLinkRef:y=!1,...s}){let l=s.href;const h=k.useLinkWithRef(s.href);b&&!y&&(l=h),r??="md",u??="solid",f??="primary",x==="loading"&&(e&&!n?e="spinner":n&&!e?n="spinner":e="spinner"),typeof e=="string"&&(e=i.jsx(j.SanityIcon,{icon:e})),typeof n=="string"&&(n=i.jsx(j.SanityIcon,{icon:n}));let t="div";return c==="a"?t=_.Link:c==="external"?t="a":c?t=c:l?t=_.Link:s.onClick&&(t="button"),i.jsxs(t,{...s,className:o.clsx(a.button,s.className),"data-size":r,"data-fill":u,"data-color":f,"data-state":x,"data-rounded":m,"data-no-label":d?void 0:!0,href:l,children:[e&&i.jsx("span",{className:o.clsx(a.icon,a.iconLeft),children:e}),d,n&&i.jsx("span",{className:o.clsx(a.icon,a.iconRight),children:n})]})}exports.Button=I;
package/dist/Card.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare function Card(props: CardProps): default_2.DetailedReactHTMLElement<{
4
+ className: string;
5
+ "data-rounded": "none" | "sm" | "md" | "lg";
6
+ "data-border": boolean;
7
+ }, HTMLElement>;
8
+
9
+ declare type CardProps = {
10
+ children: default_2.ReactElement;
11
+ rounded?: "none" | "sm" | "md" | "lg";
12
+ border?: boolean;
13
+ };
14
+
15
+ export { }
package/dist/Card.js CHANGED
@@ -1,16 +1 @@
1
- import { c } from "./clsx-OuTLNxxd.js";
2
- import { Children as a, cloneElement as e } from "react";
3
- const o = "_card_7gri7_1", n = {
4
- card: o
5
- };
6
- function l(r) {
7
- const d = a.only(r.children);
8
- return e(d, {
9
- className: c(d.props.className, n.card),
10
- "data-rounded": r.rounded ?? "md",
11
- "data-border": r.border ?? !0
12
- });
13
- }
14
- export {
15
- l as Card
16
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./clsx-C11secjj.js"),c=require("react"),n="_card_7gri7_1",a={card:n};function o(r){const e=c.Children.only(r.children),d=e.props;return c.cloneElement(e,{className:t.clsx(d.className,a.card),"data-rounded":r.rounded??"md","data-border":r.border??!0})}exports.Card=o;
@@ -0,0 +1,11 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare function Checkbox({ size, state, className, children, ...props }: CheckboxProps): JSX.Element;
4
+
5
+ export declare type CheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
6
+ size?: "md" | "lg";
7
+ state?: "hover" | "focus" | "checked";
8
+ children?: React.ReactNode;
9
+ };
10
+
11
+ export { }
package/dist/Checkbox.js CHANGED
@@ -1,31 +1 @@
1
- import { c as l } from "./clsx-OuTLNxxd.js";
2
- import { S as r } from "./SanityIcon-Bl5or1b8.js";
3
- const s = "_wrapper_14d0t_2", p = "_input_14d0t_19", m = "_box_14d0t_23", i = "_label_14d0t_59", _ = "_icon_14d0t_73", e = {
4
- wrapper: s,
5
- input: p,
6
- box: m,
7
- label: i,
8
- icon: _
9
- };
10
- function u({
11
- size: t,
12
- state: a,
13
- className: c,
14
- children: n,
15
- ...o
16
- }) {
17
- return t ??= "md", /* @__PURE__ */ React.createElement(
18
- "label",
19
- {
20
- className: l(c, e.wrapper),
21
- "data-state": a,
22
- "data-size": t
23
- },
24
- /* @__PURE__ */ React.createElement("input", { ...o, className: e.input, type: "checkbox" }),
25
- /* @__PURE__ */ React.createElement("div", { className: e.box, "data-checkbox": !0 }, /* @__PURE__ */ React.createElement(r, { icon: "checkmark", className: e.icon })),
26
- /* @__PURE__ */ React.createElement("span", { className: e.label, "data-label": !0 }, n)
27
- );
28
- }
29
- export {
30
- u as Checkbox
31
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("./clsx-C11secjj.js"),l=require("./SanityIcon-D4sDJgMO.js"),i="_wrapper_14d0t_2",b="_input_14d0t_19",p="_box_14d0t_23",u="_label_14d0t_59",x="_icon_14d0t_73",t={wrapper:i,input:b,box:p,label:u,icon:x};function d({size:c,state:a,className:s,children:n,...o}){return c??="md",e.jsxs("label",{className:r.clsx(s,t.wrapper),"data-state":a,"data-size":c,children:[e.jsx("input",{...o,className:t.input,type:"checkbox"}),e.jsx("div",{className:t.box,"data-checkbox":!0,children:e.jsx(l.SanityIcon,{icon:"checkmark",className:t.icon})}),e.jsx("span",{className:t.label,"data-label":!0,children:n})]})}exports.Checkbox=d;
@@ -0,0 +1,13 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare function Eyebrow({ children, className, ctaText, ctaHref, ctaAccessibleLabel, ...props }: EyebrowProps): JSX.Element;
4
+
5
+ export declare type EyebrowProps = {
6
+ children?: React.ReactNode;
7
+ className?: string;
8
+ ctaText?: string;
9
+ ctaHref?: string;
10
+ ctaAccessibleLabel?: string;
11
+ };
12
+
13
+ export { }
package/dist/Eyebrow.js CHANGED
@@ -1,30 +1 @@
1
- import { c as s } from "./clsx-OuTLNxxd.js";
2
- import { LinkCTA as l } from "./LinkCTA.js";
3
- const i = "_eyebrow_13ek1_1", b = "_eyebrowInner_13ek1_5", m = "_linkCta_13ek1_8", e = {
4
- eyebrow: i,
5
- eyebrowInner: b,
6
- linkCta: m
7
- };
8
- function _({
9
- children: n,
10
- className: a,
11
- ctaText: r,
12
- ctaHref: o,
13
- ctaAccessibleLabel: t,
14
- ...c
15
- }) {
16
- return /* @__PURE__ */ React.createElement("div", { ...c, className: s(a, e.eyebrow) }, /* @__PURE__ */ React.createElement("span", { className: e.eyebrowInner }, n), !!r && /* @__PURE__ */ React.createElement(
17
- l,
18
- {
19
- className: e.linkCta,
20
- href: o,
21
- "aria-label": t,
22
- arrowColor: "accent",
23
- size: "lg"
24
- },
25
- r
26
- ));
27
- }
28
- export {
29
- _ as Eyebrow
30
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./clsx-C11secjj.js"),a=require("./LinkCTA.js"),b="_eyebrow_13ek1_1",y="_eyebrowInner_13ek1_5",w="_linkCta_13ek1_8",r={eyebrow:b,eyebrowInner:y,linkCta:w};function k({children:s,className:o,ctaText:n,ctaHref:c,ctaAccessibleLabel:i,...t}){return e.jsxs("div",{...t,className:l.clsx(o,r.eyebrow),children:[e.jsx("span",{className:r.eyebrowInner,children:s}),!!n&&e.jsx(a.LinkCTA,{className:r.linkCta,href:c,"aria-label":i,arrowColor:"accent",size:"lg",children:n})]})}exports.Eyebrow=k;
@@ -0,0 +1,33 @@
1
+ import { default as default_2 } from 'react';
2
+ import { default as default_3 } from 'next/link';
3
+ import { IconSymbol } from '@sanity/icons';
4
+ import { JSX } from 'react/jsx-runtime';
5
+ import { ReactElement } from 'react';
6
+
7
+ export declare function IconButton({ as, href, type, icon, label, size, color, fill, ...props }: IconButton.Props): JSX.Element;
8
+
9
+ export declare namespace IconButton {
10
+ export type Props = Omit<default_2.ComponentProps<typeof Link>, "href" | "as"> & {
11
+ as?: "a" | "button" | "div" | "span";
12
+ icon: SanityIconName | ReactElement;
13
+ label: string;
14
+ href?: string;
15
+ type?: "button" | "submit";
16
+ size?: "sm" | "md" | "lg";
17
+ fill?: "solid" | "outline" | "ghost";
18
+ color?: "primary" | "brand" | "accent" | "gray";
19
+ };
20
+ }
21
+
22
+ declare function Link({ href, target, prefetch, ...props }: Link.Props): JSX.Element;
23
+
24
+ declare namespace Link {
25
+ type Props = Omit<React.ComponentProps<typeof default_3>, "prefetch" | "href"> & {
26
+ prefetch?: boolean | null | "hover";
27
+ href?: string;
28
+ };
29
+ }
30
+
31
+ declare type SanityIconName = IconSymbol;
32
+
33
+ export { }
@@ -1,38 +1 @@
1
- import { c as r } from "./clsx-OuTLNxxd.js";
2
- import { S as b } from "./SanityIcon-Bl5or1b8.js";
3
- import { L as f } from "./Link-BWIwmuYV.js";
4
- const _ = "_button_1vbof_1", d = "_icon_1vbof_7", I = "_customIcon_1vbof_188", a = {
5
- button: _,
6
- icon: d,
7
- customIcon: I
8
- };
9
- function R({
10
- as: l,
11
- href: e,
12
- type: o,
13
- icon: n,
14
- label: u,
15
- size: s,
16
- color: m,
17
- fill: i,
18
- ...c
19
- }) {
20
- let t = l;
21
- return s ??= "md", i ??= "solid", m ??= "primary", e ? t ??= f : c.onClick ? t ??= "button" : t ??= "div", t === "button" ? o ??= "button" : o = void 0, /* @__PURE__ */ React.createElement(
22
- t,
23
- {
24
- ...c,
25
- "aria-label": u,
26
- className: r(c.className, a.button),
27
- href: e,
28
- type: o,
29
- "data-size": s,
30
- "data-fill": i,
31
- "data-color": m
32
- },
33
- typeof n == "string" ? /* @__PURE__ */ React.createElement(b, { icon: n, className: a.icon }) : /* @__PURE__ */ React.createElement("span", { className: a.customIcon }, n)
34
- );
35
- }
36
- export {
37
- R as IconButton
38
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("./clsx-C11secjj.js"),d=require("./SanityIcon-D4sDJgMO.js"),_=require("./Link-zm9qxqps.js"),f="_button_1vbof_1",I="_icon_1vbof_7",v="_customIcon_1vbof_188",e={button:f,icon:I,customIcon:v};function x({as:r,href:i,type:n,icon:o,label:b,size:a,color:u,fill:l,...c}){let t=r;return a??="md",l??="solid",u??="primary",i?t??=_.Link:c.onClick?t??="button":t??="div",t==="button"?n??="button":n=void 0,s.jsx(t,{...c,"aria-label":b,className:m.clsx(c.className,e.button),href:i,type:n,"data-size":a,"data-fill":l,"data-color":u,children:typeof o=="string"?s.jsx(d.SanityIcon,{icon:o,className:e.icon}):s.jsx("span",{className:e.customIcon,children:o})})}exports.IconButton=x;
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare function Input({ size, state, ...props }: InputProps): JSX.Element;
4
+
5
+ export declare type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
6
+ size?: "md" | "lg";
7
+ state?: "hover" | "focus";
8
+ };
9
+
10
+ export { }
package/dist/Input.js CHANGED
@@ -1,16 +1 @@
1
- import { c as s } from "./clsx-OuTLNxxd.js";
2
- import { i as m } from "./Input.module-P--gA8sq.js";
3
- function i({ size: t, state: e, ...a }) {
4
- return t ??= "md", /* @__PURE__ */ React.createElement(
5
- "input",
6
- {
7
- ...a,
8
- className: s(a.className, m.input),
9
- "data-size": t,
10
- "data-state": e
11
- }
12
- );
13
- }
14
- export {
15
- i as Input
16
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("./clsx-C11secjj.js"),a=require("./Input.module-CJkUSxF9.js");function i({size:t,state:u,...e}){return t??="md",n.jsx("input",{...e,className:s.clsx(e.className,a.inputCss.input),"data-size":t,"data-state":u})}exports.Input=i;
@@ -0,0 +1 @@
1
+ "use strict";const t="_input_ij2oq_2",s={input:t};exports.inputCss=s;
@@ -0,0 +1,16 @@
1
+ import { default as default_2 } from 'react';
2
+ import { ElementType } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
4
+
5
+ export declare function Label(props: Props): JSX.Element;
6
+
7
+ declare type Props = {
8
+ as?: ElementType;
9
+ children?: default_2.ReactNode;
10
+ size?: "sm" | "md" | "lg";
11
+ color?: "primary" | "neutral" | "brand" | "accent" | "upsell" | "warning";
12
+ className?: string;
13
+ href?: string;
14
+ };
15
+
16
+ export { }
package/dist/Label.js CHANGED
@@ -1,22 +1 @@
1
- import { c } from "./clsx-OuTLNxxd.js";
2
- import { L as n } from "./Link-BWIwmuYV.js";
3
- const i = "_label_1nkqt_1", o = {
4
- label: i
5
- };
6
- function r(e) {
7
- const l = e.size ?? "md", t = e.color ?? "primary";
8
- let a = "div";
9
- return e.href && (a = n), e.as && (a = e.as), /* @__PURE__ */ React.createElement(
10
- a,
11
- {
12
- className: c(o.label, e.className),
13
- "data-size": l,
14
- "data-color": t,
15
- href: e.href
16
- },
17
- e.children
18
- );
19
- }
20
- export {
21
- r as Label
22
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("./clsx-C11secjj.js"),i=require("./Link-zm9qxqps.js"),s="_label_1nkqt_1",r={label:s};function o(e){const t=e.size??"md",c=e.color??"primary";let l="div";return e.href&&(l=i.Link),e.as&&(l=e.as),n.jsx(l,{className:a.clsx(r.label,e.className),"data-size":t,"data-color":c,href:e.href,children:e.children})}exports.Label=o;
@@ -0,0 +1 @@
1
+ "use client";"use strict";const r=require("react/jsx-runtime"),u=require("next/link"),s=require("./utils.js");function l({href:n="",target:e,prefetch:i="hover",...t}){return s.isInternalHref(n)?n=s.toRelativeUrl(n):e??="_blank",n?r.jsx(u,{...t,href:n,prefetch:i==="hover"?void 0:i,target:e}):r.jsx("a",{...t})}exports.Link=l;
@@ -0,0 +1,23 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ declare type AnchorOrDivAttributes = ({
4
+ href: string;
5
+ } & React.AnchorHTMLAttributes<HTMLAnchorElement>) | ({
6
+ href?: undefined;
7
+ } & React.HTMLAttributes<HTMLDivElement>);
8
+
9
+ export declare function LinkCTA({ arrowColor, arrowDirection, arrowPosition, children, size, state, href, external, ...props }: LinkCTA.Props): JSX.Element;
10
+
11
+ export declare namespace LinkCTA {
12
+ export type Props = AnchorOrDivAttributes & {
13
+ children?: React.ReactNode;
14
+ arrowDirection?: "right" | "top-right";
15
+ arrowPosition?: "left" | "right";
16
+ arrowColor?: "accent" | "base";
17
+ size?: "md" | "lg";
18
+ state?: "default" | "hover" | "focus" | "active";
19
+ external?: boolean;
20
+ };
21
+ }
22
+
23
+ export { }
package/dist/LinkCTA.js CHANGED
@@ -1,53 +1 @@
1
- "use client";
2
- import { c as p } from "./clsx-OuTLNxxd.js";
3
- import { isInternalHref as u } from "./utils.js";
4
- import { Children as m, Suspense as k, isValidElement as E, cloneElement as R } from "react";
5
- import { u as h } from "./useLinkWithRef-D9NOX6Bd.js";
6
- import { L as _ } from "./Link-BWIwmuYV.js";
7
- function N(t) {
8
- const e = m.only(t.children);
9
- return /* @__PURE__ */ React.createElement(k, { fallback: e }, /* @__PURE__ */ React.createElement(C, null, e));
10
- }
11
- function C(t) {
12
- const e = m.only(t.children), a = e?.props, l = h(a?.href);
13
- return E(e) ? R(e, { href: l }) : e;
14
- }
15
- const L = "_linkCta_1594k_1", g = "_arrow_1594k_48", A = "_icon_1594k_67", n = {
16
- linkCta: L,
17
- arrow: g,
18
- icon: A
19
- };
20
- function v({
21
- arrowColor: t,
22
- arrowDirection: e,
23
- arrowPosition: a,
24
- children: l,
25
- size: r,
26
- state: o,
27
- href: c,
28
- external: d,
29
- ...s
30
- }) {
31
- t ??= "base", e ??= "right", a ??= "left", r ??= "md";
32
- let i = "div";
33
- const f = u(c ?? "");
34
- return c && !f && (e = "top-right"), c && (i = d ? "a" : _), /* @__PURE__ */ React.createElement(N, null, /* @__PURE__ */ React.createElement(
35
- i,
36
- {
37
- ...s,
38
- className: p(s.className, n.linkCta),
39
- "data-arrow-direction": e,
40
- "data-arrow-color": t,
41
- "data-arrow-position": a,
42
- "data-size": r,
43
- "data-state": o,
44
- href: c
45
- },
46
- a === "left" && /* @__PURE__ */ React.createElement("span", { className: n.arrow }, /* @__PURE__ */ React.createElement("span", { className: n.icon }, "→")),
47
- l,
48
- a === "right" && /* @__PURE__ */ React.createElement("span", { className: n.arrow }, /* @__PURE__ */ React.createElement("span", { className: n.icon }, "→"))
49
- ));
50
- }
51
- export {
52
- v as LinkCTA
53
- };
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("./clsx-C11secjj.js"),m=require("./utils.js"),c=require("react"),x=require("./useLinkWithRef-Bt1HfBJb.js"),j=require("./Link-zm9qxqps.js");function p(s){const n=c.Children.only(s.children);return e.jsx(c.Suspense,{fallback:n,children:e.jsx(_,{children:n})})}function _(s){const n=c.Children.only(s.children),t=n?.props,a=x.useLinkWithRef(t?.href);return c.isValidElement(n)?c.cloneElement(n,{href:a}):n}const C="_linkCta_1594k_1",q="_arrow_1594k_48",L="_icon_1594k_67",i={linkCta:C,arrow:q,icon:L};function N({arrowColor:s,arrowDirection:n,arrowPosition:t,children:a,size:l,state:u,href:r,external:h,...d}){s??="base",n??="right",t??="left",l??="md";let o="div";const f=m.isInternalHref(r??"");return r&&!f&&(n="top-right"),r&&(o=h?"a":j.Link),e.jsx(p,{children:e.jsxs(o,{...d,className:k.clsx(d.className,i.linkCta),"data-arrow-direction":n,"data-arrow-color":s,"data-arrow-position":t,"data-size":l,"data-state":u,href:r,children:[t==="left"&&e.jsx("span",{className:i.arrow,children:e.jsx("span",{className:i.icon,children:"→"})}),a,t==="right"&&e.jsx("span",{className:i.arrow,children:e.jsx("span",{className:i.icon,children:"→"})})]})})}exports.LinkCTA=N;
@@ -0,0 +1,11 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ export declare function Radio({ size, state, className, children, ...props }: RadioProps): JSX.Element;
4
+
5
+ export declare type RadioProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
6
+ size?: "md" | "lg";
7
+ state?: "hover" | "focus" | "checked";
8
+ children?: React.ReactNode;
9
+ };
10
+
11
+ export { }
package/dist/Radio.js CHANGED
@@ -1,29 +1 @@
1
- import { c as o } from "./clsx-OuTLNxxd.js";
2
- const r = "_wrapper_1paov_2", s = "_input_1paov_19", n = "_box_1paov_23", _ = "_label_1paov_59", a = {
3
- wrapper: r,
4
- input: s,
5
- box: n,
6
- label: _
7
- };
8
- function i({
9
- size: e,
10
- state: t,
11
- className: c,
12
- children: p,
13
- ...l
14
- }) {
15
- return e ??= "md", /* @__PURE__ */ React.createElement(
16
- "label",
17
- {
18
- className: o(c, a.wrapper),
19
- "data-state": t,
20
- "data-size": e
21
- },
22
- /* @__PURE__ */ React.createElement("input", { ...l, className: a.input, type: "radio" }),
23
- /* @__PURE__ */ React.createElement("div", { className: a.box }),
24
- /* @__PURE__ */ React.createElement("p", { className: a.label }, p)
25
- );
26
- }
27
- export {
28
- i as Radio
29
- };
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("./clsx-C11secjj.js"),n="_wrapper_1paov_2",c="_input_1paov_19",i="_box_1paov_23",u="_label_1paov_59",e={wrapper:n,input:c,box:i,label:u};function _({size:s,state:t,className:o,children:l,...p}){return s??="md",a.jsxs("label",{className:r.clsx(o,e.wrapper),"data-state":t,"data-size":s,children:[a.jsx("input",{...p,className:e.input,type:"radio"}),a.jsx("div",{className:e.box}),a.jsx("p",{className:e.label,children:l})]})}exports.Radio=_;
@@ -0,0 +1,28 @@
1
+ import { default as default_2 } from 'react';
2
+ import { IconSymbol } from '@sanity/icons';
3
+ import { JSX } from 'react/jsx-runtime';
4
+
5
+ export declare function RadioSwitch({ className, defaultValue, onChange: onChangeProp, name, size, state, legend, value, options, ...props }: RadioSwitchProps): JSX.Element;
6
+
7
+ export declare type RadioSwitchProps = Omit<default_2.FieldsetHTMLAttributes<HTMLFieldSetElement>, "size" | "onChange"> & {
8
+ name: string;
9
+ options: RadioSwitchValue[];
10
+ value?: string;
11
+ defaultValue?: string;
12
+ legend: string;
13
+ state?: "hover" | "focus" | "checked";
14
+ size?: "sm" | "md";
15
+ forceTooltip?: boolean;
16
+ onChange?: default_2.ChangeEventHandler<HTMLInputElement>;
17
+ };
18
+
19
+ export declare type RadioSwitchValue = {
20
+ label: string;
21
+ id?: string;
22
+ value: string;
23
+ icon: SanityIconName;
24
+ };
25
+
26
+ declare type SanityIconName = IconSymbol;
27
+
28
+ export { }