@becket-ui/react 0.6.1 → 0.8.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/components/Breadcrumb.d.ts +29 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/components/Breadcrumb.js +55 -0
- package/dist/components/Breadcrumb.js.map +1 -0
- package/dist/components/Glyphs.d.ts +1 -0
- package/dist/components/Glyphs.d.ts.map +1 -1
- package/dist/components/Glyphs.js +2 -0
- package/dist/components/Glyphs.js.map +1 -1
- package/dist/components/Pagination.d.ts +52 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +96 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Prose.d.ts +2 -1
- package/dist/components/Prose.d.ts.map +1 -1
- package/dist/components/Prose.js.map +1 -1
- package/dist/components/Steps.d.ts +36 -0
- package/dist/components/Steps.d.ts.map +1 -0
- package/dist/components/Steps.js +53 -0
- package/dist/components/Steps.js.map +1 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/guides/building-with-becket.md +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ElementType } from 'react';
|
|
2
|
+
export type BreadcrumbProps = ComponentPropsWithoutRef<'nav'> & {
|
|
3
|
+
size?: 'sm' | 'md';
|
|
4
|
+
/** Drawn between items in CSS; screen readers don't read it. Default `chevron`. */
|
|
5
|
+
separator?: 'chevron' | 'slash';
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* The trail of pages leading to the current one: a `nav` landmark around an ordered list of
|
|
9
|
+
* `BreadcrumbItem`s. Renders without client JS.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Breadcrumb: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
12
|
+
size?: 'sm' | 'md';
|
|
13
|
+
/** Drawn between items in CSS; screen readers don't read it. Default `chevron`. */
|
|
14
|
+
separator?: 'chevron' | 'slash';
|
|
15
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
16
|
+
export type BreadcrumbItemProps = ComponentPropsWithoutRef<'a'> & {
|
|
17
|
+
/** The page the user is on: `aria-current="page"`. Without `href`, it renders as plain text. */
|
|
18
|
+
current?: boolean;
|
|
19
|
+
/** Router link component (for example Next's `Link`) for the link. Default `a`. */
|
|
20
|
+
as?: ElementType;
|
|
21
|
+
};
|
|
22
|
+
/** One page in a `Breadcrumb`. The ref goes to the link (or the text of a current page). */
|
|
23
|
+
export declare const BreadcrumbItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
24
|
+
/** The page the user is on: `aria-current="page"`. Without `href`, it renders as plain text. */
|
|
25
|
+
current?: boolean;
|
|
26
|
+
/** Router link component (for example Next's `Link`) for the link. Default `a`. */
|
|
27
|
+
as?: ElementType;
|
|
28
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
29
|
+
//# sourceMappingURL=Breadcrumb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../src/components/Breadcrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpF,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC9D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,mFAAmF;IACnF,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU;WATd,IAAI,GAAG,IAAI;IAClB,mFAAmF;gBACvE,SAAS,GAAG,OAAO;+CA+BhC,CAAC;AAIF,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,CAAC,GAAG,CAAC,GAAG;IAChE,gGAAgG;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,mFAAmF;IACnF,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,cAAc;IAPzB,gGAAgG;cACtF,OAAO;IACjB,mFAAmF;SAC9E,WAAW;+CA4BjB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { breadcrumb as breadcrumbRecipe } from "@becket-ui/tokens/recipes";
|
|
4
|
+
const Breadcrumb = forwardRef(
|
|
5
|
+
({
|
|
6
|
+
size = "sm",
|
|
7
|
+
separator = "chevron",
|
|
8
|
+
className,
|
|
9
|
+
children,
|
|
10
|
+
"aria-label": ariaLabel = "Breadcrumb",
|
|
11
|
+
...props
|
|
12
|
+
}, ref) => {
|
|
13
|
+
const styles = breadcrumbRecipe({ size, separator });
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
"nav",
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
"aria-label": ariaLabel,
|
|
19
|
+
...props,
|
|
20
|
+
className: [styles.root, className].filter(Boolean).join(" "),
|
|
21
|
+
children: /* @__PURE__ */ jsx("ol", { className: styles.list, children })
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
27
|
+
const BreadcrumbItem = forwardRef(
|
|
28
|
+
({ current = false, as: LinkComponent = "a", href, className, ...props }, ref) => {
|
|
29
|
+
const styles = breadcrumbRecipe();
|
|
30
|
+
return /* @__PURE__ */ jsx("li", { className: styles.item, children: current && href === void 0 ? /* @__PURE__ */ jsx(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
"aria-current": "page",
|
|
35
|
+
...props,
|
|
36
|
+
className: [styles.link, className].filter(Boolean).join(" ")
|
|
37
|
+
}
|
|
38
|
+
) : /* @__PURE__ */ jsx(
|
|
39
|
+
LinkComponent,
|
|
40
|
+
{
|
|
41
|
+
ref,
|
|
42
|
+
href,
|
|
43
|
+
"aria-current": current ? "page" : void 0,
|
|
44
|
+
...props,
|
|
45
|
+
className: [styles.link, className].filter(Boolean).join(" ")
|
|
46
|
+
}
|
|
47
|
+
) });
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
51
|
+
export {
|
|
52
|
+
Breadcrumb,
|
|
53
|
+
BreadcrumbItem
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Breadcrumb.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType } from 'react';\nimport { breadcrumb as breadcrumbRecipe } from '@becket-ui/tokens/recipes';\n\nexport type BreadcrumbProps = ComponentPropsWithoutRef<'nav'> & {\n size?: 'sm' | 'md';\n /** Drawn between items in CSS; screen readers don't read it. Default `chevron`. */\n separator?: 'chevron' | 'slash';\n};\n\n/**\n * The trail of pages leading to the current one: a `nav` landmark around an ordered list of\n * `BreadcrumbItem`s. Renders without client JS.\n */\nexport const Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(\n (\n {\n size = 'sm',\n separator = 'chevron',\n className,\n children,\n 'aria-label': ariaLabel = 'Breadcrumb',\n ...props\n },\n ref,\n ) => {\n const styles = breadcrumbRecipe({ size, separator });\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n {...props}\n className={[styles.root, className].filter(Boolean).join(' ')}\n >\n <ol className={styles.list}>{children}</ol>\n </nav>\n );\n },\n);\n\nBreadcrumb.displayName = 'Breadcrumb';\n\nexport type BreadcrumbItemProps = ComponentPropsWithoutRef<'a'> & {\n /** The page the user is on: `aria-current=\"page\"`. Without `href`, it renders as plain text. */\n current?: boolean;\n /** Router link component (for example Next's `Link`) for the link. Default `a`. */\n as?: ElementType;\n};\n\n/** One page in a `Breadcrumb`. The ref goes to the link (or the text of a current page). */\nexport const BreadcrumbItem = forwardRef<HTMLElement, BreadcrumbItemProps>(\n ({ current = false, as: LinkComponent = 'a', href, className, ...props }, ref) => {\n const styles = breadcrumbRecipe();\n return (\n <li className={styles.item}>\n {current && href === undefined ? (\n <span\n ref={ref}\n aria-current=\"page\"\n {...props}\n className={[styles.link, className].filter(Boolean).join(' ')}\n />\n ) : (\n <LinkComponent\n ref={ref}\n href={href}\n aria-current={current ? 'page' : undefined}\n {...props}\n className={[styles.link, className].filter(Boolean).join(' ')}\n />\n )}\n </li>\n );\n },\n);\n\nBreadcrumbItem.displayName = 'BreadcrumbItem';\n"],"mappings":"AAiCQ;AAjCR,SAAS,kBAAmE;AAC5E,SAAS,cAAc,wBAAwB;AAYxC,MAAM,aAAa;AAAA,EACxB,CACE;AAAA,IACE,OAAO;AAAA,IACP,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA,cAAc,YAAY;AAAA,IAC1B,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,SAAS,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACnD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAY;AAAA,QACX,GAAG;AAAA,QACJ,WAAW,CAAC,OAAO,MAAM,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAE5D,8BAAC,QAAG,WAAW,OAAO,MAAO,UAAS;AAAA;AAAA,IACxC;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;AAUlB,MAAM,iBAAiB;AAAA,EAC5B,CAAC,EAAE,UAAU,OAAO,IAAI,gBAAgB,KAAK,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChF,UAAM,SAAS,iBAAiB;AAChC,WACE,oBAAC,QAAG,WAAW,OAAO,MACnB,qBAAW,SAAS,SACnB;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,gBAAa;AAAA,QACZ,GAAG;AAAA,QACJ,WAAW,CAAC,OAAO,MAAM,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA;AAAA,IAC9D,IAEA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,gBAAc,UAAU,SAAS;AAAA,QAChC,GAAG;AAAA,QACJ,WAAW,CAAC,OAAO,MAAM,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA;AAAA,IAC9D,GAEJ;AAAA,EAEJ;AACF;AAEA,eAAe,cAAc;","names":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type IconProps } from './Icon.js';
|
|
2
2
|
export type GlyphProps = Omit<IconProps, 'children'>;
|
|
3
3
|
export declare const ChevronDownIcon: import("react").ForwardRefExoticComponent<GlyphProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export declare const ChevronLeftIcon: import("react").ForwardRefExoticComponent<GlyphProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
5
|
export declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<GlyphProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
6
|
export declare const CloseIcon: import("react").ForwardRefExoticComponent<GlyphProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
6
7
|
export declare const MenuIcon: import("react").ForwardRefExoticComponent<GlyphProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Glyphs.d.ts","sourceRoot":"","sources":["../../src/components/Glyphs.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,MAAM,UAAU,G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O,MAAM,QAAQ,wGAAsG,CAAC;AAE5H,eAAO,MAAM,QAAQ,wGAMpB,CAAC;AAEF,eAAO,MAAM,WAAW,wGAGvB,CAAC"}
|
|
@@ -20,6 +20,7 @@ function createGlyph(displayName, shapes) {
|
|
|
20
20
|
return Glyph;
|
|
21
21
|
}
|
|
22
22
|
const ChevronDownIcon = /* @__PURE__ */ createGlyph("ChevronDownIcon", /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" }));
|
|
23
|
+
const ChevronLeftIcon = /* @__PURE__ */ createGlyph("ChevronLeftIcon", /* @__PURE__ */ jsx("path", { d: "M15 6l-6 6 6 6" }));
|
|
23
24
|
const ChevronRightIcon = /* @__PURE__ */ createGlyph("ChevronRightIcon", /* @__PURE__ */ jsx("path", { d: "M9 6l6 6-6 6" }));
|
|
24
25
|
const CloseIcon = /* @__PURE__ */ createGlyph("CloseIcon", /* @__PURE__ */ jsx("path", { d: "M6 6l12 12M18 6L6 18" }));
|
|
25
26
|
const MenuIcon = /* @__PURE__ */ createGlyph("MenuIcon", /* @__PURE__ */ jsx("path", { d: "M4 6h16M4 12h16M4 18h16" }));
|
|
@@ -68,6 +69,7 @@ const WarningIcon = /* @__PURE__ */ createGlyph(
|
|
|
68
69
|
export {
|
|
69
70
|
CheckIcon,
|
|
70
71
|
ChevronDownIcon,
|
|
72
|
+
ChevronLeftIcon,
|
|
71
73
|
ChevronRightIcon,
|
|
72
74
|
CloseIcon,
|
|
73
75
|
CopyIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Glyphs.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react';\nimport { Icon, type IconProps } from './Icon';\n\nexport type GlyphProps = Omit<IconProps, 'children'>;\n\n// Every glyph shares one 24px grid and stroke so they sit together without tuning.\nfunction createGlyph(displayName: string, shapes: ReactNode) {\n const Glyph = forwardRef<HTMLSpanElement, GlyphProps>((props, ref) => (\n <Icon ref={ref} {...props}>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {shapes}\n </svg>\n </Icon>\n ));\n Glyph.displayName = displayName;\n return Glyph;\n}\n\nexport const ChevronDownIcon = /* @__PURE__ */ createGlyph('ChevronDownIcon', <path d=\"M6 9l6 6 6-6\" />);\n\nexport const ChevronRightIcon = /* @__PURE__ */ createGlyph('ChevronRightIcon', <path d=\"M9 6l6 6-6 6\" />);\n\nexport const CloseIcon = /* @__PURE__ */ createGlyph('CloseIcon', <path d=\"M6 6l12 12M18 6L6 18\" />);\n\nexport const MenuIcon = /* @__PURE__ */ createGlyph('MenuIcon', <path d=\"M4 6h16M4 12h16M4 18h16\" />);\n\nexport const CheckIcon = /* @__PURE__ */ createGlyph('CheckIcon', <path d=\"M5 12.5l4.5 4.5L19 7\" />);\n\nexport const CopyIcon = /* @__PURE__ */ createGlyph(\n 'CopyIcon',\n <>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </>,\n);\n\nexport const ExternalLinkIcon = /* @__PURE__ */ createGlyph(\n 'ExternalLinkIcon',\n <path d=\"M14 4h6v6M20 4l-9 9M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />,\n);\n\nexport const LinkIcon = /* @__PURE__ */ createGlyph(\n 'LinkIcon',\n <path d=\"M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1\" />,\n);\n\nexport const SearchIcon = /* @__PURE__ */ createGlyph(\n 'SearchIcon',\n <>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"M20 20l-4-4\" />\n </>,\n);\n\nexport const SunIcon = /* @__PURE__ */ createGlyph(\n 'SunIcon',\n <>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />\n </>,\n);\n\nexport const MoonIcon = /* @__PURE__ */ createGlyph('MoonIcon', <path d=\"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z\" />);\n\nexport const InfoIcon = /* @__PURE__ */ createGlyph(\n 'InfoIcon',\n <>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 11v5M12 8h.01\" />\n </>,\n);\n\nexport const WarningIcon = /* @__PURE__ */ createGlyph(\n 'WarningIcon',\n <path d=\"M12 3.5L21.5 20h-19L12 3.5zM12 10v4M12 17h.01\" />,\n);\n"],"mappings":"AASM,
|
|
1
|
+
{"version":3,"sources":["../../src/components/Glyphs.tsx"],"sourcesContent":["import { forwardRef, type ReactNode } from 'react';\nimport { Icon, type IconProps } from './Icon';\n\nexport type GlyphProps = Omit<IconProps, 'children'>;\n\n// Every glyph shares one 24px grid and stroke so they sit together without tuning.\nfunction createGlyph(displayName: string, shapes: ReactNode) {\n const Glyph = forwardRef<HTMLSpanElement, GlyphProps>((props, ref) => (\n <Icon ref={ref} {...props}>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n {shapes}\n </svg>\n </Icon>\n ));\n Glyph.displayName = displayName;\n return Glyph;\n}\n\nexport const ChevronDownIcon = /* @__PURE__ */ createGlyph('ChevronDownIcon', <path d=\"M6 9l6 6 6-6\" />);\n\nexport const ChevronLeftIcon = /* @__PURE__ */ createGlyph('ChevronLeftIcon', <path d=\"M15 6l-6 6 6 6\" />);\n\nexport const ChevronRightIcon = /* @__PURE__ */ createGlyph('ChevronRightIcon', <path d=\"M9 6l6 6-6 6\" />);\n\nexport const CloseIcon = /* @__PURE__ */ createGlyph('CloseIcon', <path d=\"M6 6l12 12M18 6L6 18\" />);\n\nexport const MenuIcon = /* @__PURE__ */ createGlyph('MenuIcon', <path d=\"M4 6h16M4 12h16M4 18h16\" />);\n\nexport const CheckIcon = /* @__PURE__ */ createGlyph('CheckIcon', <path d=\"M5 12.5l4.5 4.5L19 7\" />);\n\nexport const CopyIcon = /* @__PURE__ */ createGlyph(\n 'CopyIcon',\n <>\n <rect x=\"9\" y=\"9\" width=\"11\" height=\"11\" rx=\"2\" />\n <path d=\"M15 9V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3\" />\n </>,\n);\n\nexport const ExternalLinkIcon = /* @__PURE__ */ createGlyph(\n 'ExternalLinkIcon',\n <path d=\"M14 4h6v6M20 4l-9 9M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4\" />,\n);\n\nexport const LinkIcon = /* @__PURE__ */ createGlyph(\n 'LinkIcon',\n <path d=\"M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1\" />,\n);\n\nexport const SearchIcon = /* @__PURE__ */ createGlyph(\n 'SearchIcon',\n <>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"M20 20l-4-4\" />\n </>,\n);\n\nexport const SunIcon = /* @__PURE__ */ createGlyph(\n 'SunIcon',\n <>\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4\" />\n </>,\n);\n\nexport const MoonIcon = /* @__PURE__ */ createGlyph('MoonIcon', <path d=\"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z\" />);\n\nexport const InfoIcon = /* @__PURE__ */ createGlyph(\n 'InfoIcon',\n <>\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 11v5M12 8h.01\" />\n </>,\n);\n\nexport const WarningIcon = /* @__PURE__ */ createGlyph(\n 'WarningIcon',\n <path d=\"M12 3.5L21.5 20h-19L12 3.5zM12 10v4M12 17h.01\" />,\n);\n"],"mappings":"AASM,SAgCJ,UAhCI,KAgCJ,YAhCI;AATN,SAAS,kBAAkC;AAC3C,SAAS,YAA4B;AAKrC,SAAS,YAAY,aAAqB,QAAmB;AAC3D,QAAM,QAAQ,WAAwC,CAAC,OAAO,QAC5D,oBAAC,QAAK,KAAW,GAAG,OAClB;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAa;AAAA,MACb,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAY;AAAA,MACZ,WAAU;AAAA,MAET;AAAA;AAAA,EACH,GACF,CACD;AACD,QAAM,cAAc;AACpB,SAAO;AACT;AAEO,MAAM,kBAAkC,4BAAY,mBAAmB,oBAAC,UAAK,GAAE,gBAAe,CAAE;AAEhG,MAAM,kBAAkC,4BAAY,mBAAmB,oBAAC,UAAK,GAAE,kBAAiB,CAAE;AAElG,MAAM,mBAAmC,4BAAY,oBAAoB,oBAAC,UAAK,GAAE,gBAAe,CAAE;AAElG,MAAM,YAA4B,4BAAY,aAAa,oBAAC,UAAK,GAAE,wBAAuB,CAAE;AAE5F,MAAM,WAA2B,4BAAY,YAAY,oBAAC,UAAK,GAAE,2BAA0B,CAAE;AAE7F,MAAM,YAA4B,4BAAY,aAAa,oBAAC,UAAK,GAAE,wBAAuB,CAAE;AAE5F,MAAM,WAA2B;AAAA,EACtC;AAAA,EACA,iCACE;AAAA,wBAAC,UAAK,GAAE,KAAI,GAAE,KAAI,OAAM,MAAK,QAAO,MAAK,IAAG,KAAI;AAAA,IAChD,oBAAC,UAAK,GAAE,2DAA0D;AAAA,KACpE;AACF;AAEO,MAAM,mBAAmC;AAAA,EAC9C;AAAA,EACA,oBAAC,UAAK,GAAE,+EAA8E;AACxF;AAEO,MAAM,WAA2B;AAAA,EACtC;AAAA,EACA,oBAAC,UAAK,GAAE,4GAA2G;AACrH;AAEO,MAAM,aAA6B;AAAA,EACxC;AAAA,EACA,iCACE;AAAA,wBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,IAC9B,oBAAC,UAAK,GAAE,eAAc;AAAA,KACxB;AACF;AAEO,MAAM,UAA0B;AAAA,EACrC;AAAA,EACA,iCACE;AAAA,wBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,IAC9B,oBAAC,UAAK,GAAE,sGAAqG;AAAA,KAC/G;AACF;AAEO,MAAM,WAA2B,4BAAY,YAAY,oBAAC,UAAK,GAAE,iDAAgD,CAAE;AAEnH,MAAM,WAA2B;AAAA,EACtC;AAAA,EACA,iCACE;AAAA,wBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,IAC9B,oBAAC,UAAK,GAAE,qBAAoB;AAAA,KAC9B;AACF;AAEO,MAAM,cAA8B;AAAA,EACzC;AAAA,EACA,oBAAC,UAAK,GAAE,iDAAgD;AAC1D;","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ElementType } from 'react';
|
|
2
|
+
export type PaginationProps = Omit<ComponentPropsWithoutRef<'nav'>, 'children'> & {
|
|
3
|
+
/** The current page, counting from 1. Past `pageCount`, Previous goes to the last page. */
|
|
4
|
+
page: number;
|
|
5
|
+
/** Below 1 renders nothing: an empty list has no pages to link. */
|
|
6
|
+
pageCount: number;
|
|
7
|
+
/** The URL of a page. Every page is a plain link, so it works with server routing and no JS. */
|
|
8
|
+
href: (page: number) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Pages shown on each side of the current one, as a whole number (rounded down, at least 0).
|
|
11
|
+
* First and last always show. Default `1`.
|
|
12
|
+
*/
|
|
13
|
+
siblings?: number;
|
|
14
|
+
size?: 'sm' | 'md';
|
|
15
|
+
/** Router link component (for example Next's `Link`) to render each link with. Default `a`. */
|
|
16
|
+
linkAs?: ElementType;
|
|
17
|
+
/** Visible and announced text. Defaults are English. */
|
|
18
|
+
labels?: {
|
|
19
|
+
previous?: string;
|
|
20
|
+
next?: string;
|
|
21
|
+
/** Accessible name of a page link; keep the number in it (WCAG 2.5.3). */
|
|
22
|
+
page?: (page: number) => string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Links to the pages of a paged list: previous, first, the pages around the current one, last, and
|
|
27
|
+
* next. Gaps show as an ellipsis. Renders without client JS.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Pagination: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "children"> & {
|
|
30
|
+
/** The current page, counting from 1. Past `pageCount`, Previous goes to the last page. */
|
|
31
|
+
page: number;
|
|
32
|
+
/** Below 1 renders nothing: an empty list has no pages to link. */
|
|
33
|
+
pageCount: number;
|
|
34
|
+
/** The URL of a page. Every page is a plain link, so it works with server routing and no JS. */
|
|
35
|
+
href: (page: number) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Pages shown on each side of the current one, as a whole number (rounded down, at least 0).
|
|
38
|
+
* First and last always show. Default `1`.
|
|
39
|
+
*/
|
|
40
|
+
siblings?: number;
|
|
41
|
+
size?: 'sm' | 'md';
|
|
42
|
+
/** Router link component (for example Next's `Link`) to render each link with. Default `a`. */
|
|
43
|
+
linkAs?: ElementType;
|
|
44
|
+
/** Visible and announced text. Defaults are English. */
|
|
45
|
+
labels?: {
|
|
46
|
+
previous?: string;
|
|
47
|
+
next?: string;
|
|
48
|
+
/** Accessible name of a page link; keep the number in it (WCAG 2.5.3). */
|
|
49
|
+
page?: (page: number) => string;
|
|
50
|
+
};
|
|
51
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
52
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/components/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAKpF,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAChF,2FAA2F;IAC3F,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,gGAAgG;IAChG,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,wDAAwD;IACxD,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,0EAA0E;QAC1E,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;KACjC,CAAC;CACH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU;IA3BrB,2FAA2F;UACrF,MAAM;IACZ,mEAAmE;eACxD,MAAM;IACjB,gGAAgG;UAC1F,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM;IAC9B;;;OAGG;eACQ,MAAM;WACV,IAAI,GAAG,IAAI;IAClB,+FAA+F;aACtF,WAAW;IACpB,wDAAwD;aAC/C;QACP,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,0EAA0E;QAC1E,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;KACjC;+CA8GF,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { pagination as paginationRecipe } from "@becket-ui/tokens/recipes";
|
|
4
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "./Glyphs.js";
|
|
5
|
+
const Pagination = forwardRef(
|
|
6
|
+
({
|
|
7
|
+
page,
|
|
8
|
+
pageCount,
|
|
9
|
+
href,
|
|
10
|
+
siblings = 1,
|
|
11
|
+
size = "md",
|
|
12
|
+
linkAs: LinkComponent = "a",
|
|
13
|
+
labels,
|
|
14
|
+
className,
|
|
15
|
+
"aria-label": ariaLabel = "Pagination",
|
|
16
|
+
...props
|
|
17
|
+
}, ref) => {
|
|
18
|
+
if (pageCount < 1) return null;
|
|
19
|
+
const styles = paginationRecipe({ size });
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"nav",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
"aria-label": ariaLabel,
|
|
25
|
+
...props,
|
|
26
|
+
className: [styles.root, className].filter(Boolean).join(" "),
|
|
27
|
+
children: /* @__PURE__ */ jsxs("ol", { className: styles.list, children: [
|
|
28
|
+
/* @__PURE__ */ jsx("li", { children: page > 1 ? (
|
|
29
|
+
// A stale `page` past the end (the list shrank) steps back onto the last real page.
|
|
30
|
+
/* @__PURE__ */ jsxs(
|
|
31
|
+
LinkComponent,
|
|
32
|
+
{
|
|
33
|
+
href: href(Math.min(page - 1, pageCount)),
|
|
34
|
+
rel: "prev",
|
|
35
|
+
className: styles.link,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
38
|
+
labels?.previous ?? "Previous"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
) : /* @__PURE__ */ jsxs("span", { className: styles.link, children: [
|
|
43
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, {}),
|
|
44
|
+
labels?.previous ?? "Previous"
|
|
45
|
+
] }) }),
|
|
46
|
+
[
|
|
47
|
+
.../* @__PURE__ */ new Set([
|
|
48
|
+
1,
|
|
49
|
+
// A whole, non-negative count: a fractional one would ask `href` for page 5.5.
|
|
50
|
+
...Array.from({ length: 2 * Math.max(0, Math.floor(siblings)) + 1 }).map(
|
|
51
|
+
(_, i, window) => page - (window.length - 1) / 2 + i
|
|
52
|
+
),
|
|
53
|
+
pageCount
|
|
54
|
+
])
|
|
55
|
+
].filter((shown) => shown >= 1 && shown <= pageCount).sort((a, b) => a - b).flatMap((shown, index, all) => {
|
|
56
|
+
const gap = index === 0 ? 1 : shown - all[index - 1];
|
|
57
|
+
if (gap === 2) return [shown - 1, shown];
|
|
58
|
+
if (gap > 2) return [{ ellipsisBefore: shown }, shown];
|
|
59
|
+
return [shown];
|
|
60
|
+
}).map(
|
|
61
|
+
(pageOrGap) => typeof pageOrGap === "number" ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
62
|
+
LinkComponent,
|
|
63
|
+
{
|
|
64
|
+
href: href(pageOrGap),
|
|
65
|
+
"aria-label": labels?.page?.(pageOrGap) ?? `Page ${pageOrGap}`,
|
|
66
|
+
"aria-current": pageOrGap === page ? "page" : void 0,
|
|
67
|
+
className: styles.link,
|
|
68
|
+
children: pageOrGap
|
|
69
|
+
}
|
|
70
|
+
) }, pageOrGap) : /* @__PURE__ */ jsx(
|
|
71
|
+
"li",
|
|
72
|
+
{
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: styles.ellipsis,
|
|
75
|
+
children: "\u2026"
|
|
76
|
+
},
|
|
77
|
+
`ellipsis-${pageOrGap.ellipsisBefore}`
|
|
78
|
+
)
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ jsx("li", { children: page < pageCount ? /* @__PURE__ */ jsxs(LinkComponent, { href: href(page + 1), rel: "next", className: styles.link, children: [
|
|
81
|
+
labels?.next ?? "Next",
|
|
82
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
83
|
+
] }) : /* @__PURE__ */ jsxs("span", { className: styles.link, children: [
|
|
84
|
+
labels?.next ?? "Next",
|
|
85
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
86
|
+
] }) })
|
|
87
|
+
] })
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
Pagination.displayName = "Pagination";
|
|
93
|
+
export {
|
|
94
|
+
Pagination
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Pagination.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType } from 'react';\nimport { pagination as paginationRecipe } from '@becket-ui/tokens/recipes';\n\nimport { ChevronLeftIcon, ChevronRightIcon } from './Glyphs';\n\nexport type PaginationProps = Omit<ComponentPropsWithoutRef<'nav'>, 'children'> & {\n /** The current page, counting from 1. Past `pageCount`, Previous goes to the last page. */\n page: number;\n /** Below 1 renders nothing: an empty list has no pages to link. */\n pageCount: number;\n /** The URL of a page. Every page is a plain link, so it works with server routing and no JS. */\n href: (page: number) => string;\n /**\n * Pages shown on each side of the current one, as a whole number (rounded down, at least 0).\n * First and last always show. Default `1`.\n */\n siblings?: number;\n size?: 'sm' | 'md';\n /** Router link component (for example Next's `Link`) to render each link with. Default `a`. */\n linkAs?: ElementType;\n /** Visible and announced text. Defaults are English. */\n labels?: {\n previous?: string;\n next?: string;\n /** Accessible name of a page link; keep the number in it (WCAG 2.5.3). */\n page?: (page: number) => string;\n };\n};\n\n/**\n * Links to the pages of a paged list: previous, first, the pages around the current one, last, and\n * next. Gaps show as an ellipsis. Renders without client JS.\n */\nexport const Pagination = forwardRef<HTMLElement, PaginationProps>(\n (\n {\n page,\n pageCount,\n href,\n siblings = 1,\n size = 'md',\n linkAs: LinkComponent = 'a',\n labels,\n className,\n 'aria-label': ariaLabel = 'Pagination',\n ...props\n },\n ref,\n ) => {\n if (pageCount < 1) return null;\n const styles = paginationRecipe({ size });\n return (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n {...props}\n className={[styles.root, className].filter(Boolean).join(' ')}\n >\n <ol className={styles.list}>\n <li>\n {page > 1 ? (\n // A stale `page` past the end (the list shrank) steps back onto the last real page.\n <LinkComponent\n href={href(Math.min(page - 1, pageCount))}\n rel=\"prev\"\n className={styles.link}\n >\n <ChevronLeftIcon />\n {labels?.previous ?? 'Previous'}\n </LinkComponent>\n ) : (\n <span className={styles.link}>\n <ChevronLeftIcon />\n {labels?.previous ?? 'Previous'}\n </span>\n )}\n </li>\n {[\n ...new Set([\n 1,\n // A whole, non-negative count: a fractional one would ask `href` for page 5.5.\n ...Array.from({ length: 2 * Math.max(0, Math.floor(siblings)) + 1 }).map(\n (_, i, window) => page - (window.length - 1) / 2 + i,\n ),\n pageCount,\n ]),\n ]\n .filter((shown) => shown >= 1 && shown <= pageCount)\n // style-check keep: `filter` returned a new array this owns; the build's lib predates `toSorted`.\n .sort((a, b) => a - b)\n // A gap of one page shows that page: an ellipsis there would hide nothing.\n .flatMap((shown, index, all) => {\n const gap = index === 0 ? 1 : shown - all[index - 1];\n if (gap === 2) return [shown - 1, shown];\n if (gap > 2) return [{ ellipsisBefore: shown }, shown];\n return [shown];\n })\n .map((pageOrGap) =>\n typeof pageOrGap === 'number' ? (\n <li key={pageOrGap}>\n <LinkComponent\n href={href(pageOrGap)}\n aria-label={labels?.page?.(pageOrGap) ?? `Page ${pageOrGap}`}\n aria-current={pageOrGap === page ? 'page' : undefined}\n className={styles.link}\n >\n {pageOrGap}\n </LinkComponent>\n </li>\n ) : (\n <li\n key={`ellipsis-${pageOrGap.ellipsisBefore}`}\n aria-hidden=\"true\"\n className={styles.ellipsis}\n >\n …\n </li>\n ),\n )}\n <li>\n {page < pageCount ? (\n <LinkComponent href={href(page + 1)} rel=\"next\" className={styles.link}>\n {labels?.next ?? 'Next'}\n <ChevronRightIcon />\n </LinkComponent>\n ) : (\n <span className={styles.link}>\n {labels?.next ?? 'Next'}\n <ChevronRightIcon />\n </span>\n )}\n </li>\n </ol>\n </nav>\n );\n },\n);\n\nPagination.displayName = 'Pagination';\n"],"mappings":"AA8Dc,SAKE,KALF;AA9Dd,SAAS,kBAAmE;AAC5E,SAAS,cAAc,wBAAwB;AAE/C,SAAS,iBAAiB,wBAAwB;AA8B3C,MAAM,aAAa;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,QAAQ,gBAAgB;AAAA,IACxB;AAAA,IACA;AAAA,IACA,cAAc,YAAY;AAAA,IAC1B,GAAG;AAAA,EACL,GACA,QACG;AACH,QAAI,YAAY,EAAG,QAAO;AAC1B,UAAM,SAAS,iBAAiB,EAAE,KAAK,CAAC;AACxC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,cAAY;AAAA,QACX,GAAG;AAAA,QACJ,WAAW,CAAC,OAAO,MAAM,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAE5D,+BAAC,QAAG,WAAW,OAAO,MACpB;AAAA,8BAAC,QACE,iBAAO;AAAA;AAAA,YAEN;AAAA,cAAC;AAAA;AAAA,gBACC,MAAM,KAAK,KAAK,IAAI,OAAO,GAAG,SAAS,CAAC;AAAA,gBACxC,KAAI;AAAA,gBACJ,WAAW,OAAO;AAAA,gBAElB;AAAA,sCAAC,mBAAgB;AAAA,kBAChB,QAAQ,YAAY;AAAA;AAAA;AAAA,YACvB;AAAA,cAEA,qBAAC,UAAK,WAAW,OAAO,MACtB;AAAA,gC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O,MAC/D;AAAA,oBAAQ,QAAQ;AAAA,YACjB,oBAAC,oBAAiB;AAAA,aACpB,IAEA,qBAAC,UAAK,WAAW,OAAO,MACrB;AAAA,oBAAQ,QAAQ;AAAA,YACjB,oBAAC,oBAAiB;AAAA,aACpB,GAEJ;AAAA,WACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":[]}
|
|
@@ -8,7 +8,8 @@ export type ProseProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Styles HTML from Markdown or MDX with Becket tokens. CSS only, no JS.
|
|
11
|
-
*
|
|
11
|
+
* Embedded Becket components keep their own styles, markup inside them included. Wrap markup
|
|
12
|
+
* from anywhere else in `data-not-prose` to leave it unstyled.
|
|
12
13
|
*/
|
|
13
14
|
export declare const Prose: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
15
|
/** Base text size; headings, spacing and code scale with it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Prose.d.ts","sourceRoot":"","sources":["../../src/components/Prose.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpF,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzD,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAMF
|
|
1
|
+
{"version":3,"file":"Prose.d.ts","sourceRoot":"","sources":["../../src/components/Prose.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpF,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpC,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzD,gEAAgE;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,yCAAyC;IACzC,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,KAAK;IAfhB,gEAAgE;WACzD,SAAS;IAChB,yCAAyC;SACpC,WAAW;kDAgBjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Prose.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType } from 'react';\nimport { prose as proseRecipe } from '@becket-ui/tokens/recipes';\n\ntype ProseSize = 'sm' | 'md' | 'lg';\n\nexport type ProseProps = ComponentPropsWithoutRef<'div'> & {\n /** Base text size; headings, spacing and code scale with it. */\n size?: ProseSize;\n /** Usually `article` for a blog post. */\n as?: ElementType;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/**\n * Styles HTML from Markdown or MDX with Becket tokens. CSS only, no JS.\n *
|
|
1
|
+
{"version":3,"sources":["../../src/components/Prose.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType } from 'react';\nimport { prose as proseRecipe } from '@becket-ui/tokens/recipes';\n\ntype ProseSize = 'sm' | 'md' | 'lg';\n\nexport type ProseProps = ComponentPropsWithoutRef<'div'> & {\n /** Base text size; headings, spacing and code scale with it. */\n size?: ProseSize;\n /** Usually `article` for a blog post. */\n as?: ElementType;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/**\n * Styles HTML from Markdown or MDX with Becket tokens. CSS only, no JS.\n * Embedded Becket components keep their own styles, markup inside them included. Wrap markup\n * from anywhere else in `data-not-prose` to leave it unstyled.\n */\nexport const Prose = forwardRef<HTMLDivElement, ProseProps>(\n ({ size = 'md', as: Component = 'div', className, ...props }, ref) => (\n <Component ref={ref} {...props} className={mergeClassName(proseRecipe({ size }), className)} />\n ),\n);\n\nProse.displayName = 'Prose';\n"],"mappings":"AAuBI;AAvBJ,SAAS,kBAAmE;AAC5E,SAAS,SAAS,mBAAmB;AAWrC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAOO,MAAM,QAAQ;AAAA,EACnB,CAAC,EAAE,OAAO,MAAM,IAAI,YAAY,OAAO,WAAW,GAAG,MAAM,GAAG,QAC5D,oBAAC,aAAU,KAAW,GAAG,OAAO,WAAW,eAAe,YAAY,EAAE,KAAK,CAAC,GAAG,SAAS,GAAG;AAEjG;AAEA,MAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
export type StepsProps = ComponentPropsWithoutRef<'ol'> & {
|
|
3
|
+
/** Default `horizontal`. For narrow screens, pass `vertical`. */
|
|
4
|
+
orientation?: 'horizontal' | 'vertical';
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A display-only list of the steps in a process, and where the user is in it. Each `Step` sets its
|
|
9
|
+
* own `status`; nothing here is clickable or keeps state. Renders without client JS.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Steps: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & {
|
|
12
|
+
/** Default `horizontal`. For narrow screens, pass `vertical`. */
|
|
13
|
+
orientation?: 'horizontal' | 'vertical';
|
|
14
|
+
size?: 'sm' | 'md';
|
|
15
|
+
} & import("react").RefAttributes<HTMLOListElement>>;
|
|
16
|
+
export type StepProps = Omit<ComponentPropsWithoutRef<'li'>, 'title'> & {
|
|
17
|
+
status: 'complete' | 'current' | 'upcoming';
|
|
18
|
+
title: ReactNode;
|
|
19
|
+
description?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Read after the title by screen readers. Defaults to "(completed)" and "(not started)"; the
|
|
22
|
+
* current step has `aria-current="step"` and no text unless you pass one.
|
|
23
|
+
*/
|
|
24
|
+
statusLabel?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const Step: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "title"> & {
|
|
27
|
+
status: 'complete' | 'current' | 'upcoming';
|
|
28
|
+
title: ReactNode;
|
|
29
|
+
description?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Read after the title by screen readers. Defaults to "(completed)" and "(not started)"; the
|
|
32
|
+
* current step has `aria-current="step"` and no text unless you pass one.
|
|
33
|
+
*/
|
|
34
|
+
statusLabel?: string;
|
|
35
|
+
} & import("react").RefAttributes<HTMLLIElement>>;
|
|
36
|
+
//# sourceMappingURL=Steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../src/components/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlF,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG;IACxD,iEAAiE;IACjE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK;IAThB,iEAAiE;kBACnD,YAAY,GAAG,UAAU;WAChC,IAAI,GAAG,IAAI;oDAiBnB,CAAC;AAIF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG;IACtE,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,IAAI;YAVP,UAAU,GAAG,SAAS,GAAG,UAAU;WACpC,SAAS;kBACF,SAAS;IACvB;;;OAGG;kBACW,MAAM;iDAoCrB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { steps as stepsRecipe } from "@becket-ui/tokens/recipes";
|
|
4
|
+
import { CheckIcon } from "./Glyphs.js";
|
|
5
|
+
import { VisuallyHidden } from "./VisuallyHidden.js";
|
|
6
|
+
const Steps = forwardRef(
|
|
7
|
+
({ orientation = "horizontal", size = "md", className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8
|
+
"ol",
|
|
9
|
+
{
|
|
10
|
+
ref,
|
|
11
|
+
role: "list",
|
|
12
|
+
...props,
|
|
13
|
+
className: [stepsRecipe({ orientation, size }).root, className].filter(Boolean).join(" ")
|
|
14
|
+
}
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
Steps.displayName = "Steps";
|
|
18
|
+
const Step = forwardRef(
|
|
19
|
+
({ status, title, description, statusLabel, className, ...props }, ref) => {
|
|
20
|
+
const styles = stepsRecipe();
|
|
21
|
+
return /* @__PURE__ */ jsxs(
|
|
22
|
+
"li",
|
|
23
|
+
{
|
|
24
|
+
ref,
|
|
25
|
+
"aria-current": status === "current" ? "step" : void 0,
|
|
26
|
+
"data-status": status,
|
|
27
|
+
...props,
|
|
28
|
+
className: [styles.step, className].filter(Boolean).join(" "),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx("span", { className: styles.marker, "aria-hidden": "true", children: status === "complete" && /* @__PURE__ */ jsx(CheckIcon, {}) }),
|
|
31
|
+
/* @__PURE__ */ jsxs("span", { className: styles.content, children: [
|
|
32
|
+
/* @__PURE__ */ jsxs("span", { className: styles.title, children: [
|
|
33
|
+
title,
|
|
34
|
+
[
|
|
35
|
+
statusLabel ?? { complete: "(completed)", current: "", upcoming: "(not started)" }[status]
|
|
36
|
+
].filter(Boolean).map((label) => /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
37
|
+
" ",
|
|
38
|
+
label
|
|
39
|
+
] }, label))
|
|
40
|
+
] }),
|
|
41
|
+
description && /* @__PURE__ */ jsx("span", { className: styles.description, children: description })
|
|
42
|
+
] })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
Step.displayName = "Step";
|
|
49
|
+
export {
|
|
50
|
+
Step,
|
|
51
|
+
Steps
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=Steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/Steps.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';\nimport { steps as stepsRecipe } from '@becket-ui/tokens/recipes';\n\nimport { CheckIcon } from './Glyphs';\nimport { VisuallyHidden } from './VisuallyHidden';\n\nexport type StepsProps = ComponentPropsWithoutRef<'ol'> & {\n /** Default `horizontal`. For narrow screens, pass `vertical`. */\n orientation?: 'horizontal' | 'vertical';\n size?: 'sm' | 'md';\n};\n\n/**\n * A display-only list of the steps in a process, and where the user is in it. Each `Step` sets its\n * own `status`; nothing here is clickable or keeps state. Renders without client JS.\n */\nexport const Steps = forwardRef<HTMLOListElement, StepsProps>(\n ({ orientation = 'horizontal', size = 'md', className, ...props }, ref) => (\n <ol\n ref={ref}\n // Safari drops list semantics from an unmarked list outside `nav`; the role keeps the count.\n role=\"list\"\n {...props}\n className={[stepsRecipe({ orientation, size }).root, className].filter(Boolean).join(' ')}\n />\n ),\n);\n\nSteps.displayName = 'Steps';\n\nexport type StepProps = Omit<ComponentPropsWithoutRef<'li'>, 'title'> & {\n status: 'complete' | 'current' | 'upcoming';\n title: ReactNode;\n description?: ReactNode;\n /**\n * Read after the title by screen readers. Defaults to \"(completed)\" and \"(not started)\"; the\n * current step has `aria-current=\"step\"` and no text unless you pass one.\n */\n statusLabel?: string;\n};\n\nexport const Step = forwardRef<HTMLLIElement, StepProps>(\n ({ status, title, description, statusLabel, className, ...props }, ref) => {\n const styles = stepsRecipe();\n return (\n <li\n ref={ref}\n aria-current={status === 'current' ? 'step' : undefined}\n data-status={status}\n {...props}\n className={[styles.step, className].filter(Boolean).join(' ')}\n >\n {/* The number comes from a CSS counter while the marker is empty. */}\n <span className={styles.marker} aria-hidden=\"true\">\n {status === 'complete' && <CheckIcon />}\n </span>\n <span className={styles.content}>\n <span className={styles.title}>\n {title}\n {/* One label or none: the current step's default is no text (aria-current says it). */}\n {[\n statusLabel ??\n { complete: '(completed)', current: '', upcoming: '(not started)' }[status],\n ]\n .filter(Boolean)\n .map((label) => (\n <VisuallyHidden key={label}> {label}</VisuallyHidden>\n ))}\n </span>\n {description && <span className={styles.description}>{description}</span>}\n </span>\n </li>\n );\n },\n);\n\nStep.displayName = 'Step';\n"],"mappings":"AAkBI,cAgDY,YAhDZ;AAlBJ,SAAS,kBAAiE;AAC1E,SAAS,SAAS,mBAAmB;AAErC,SAAS,iBAAiB;AAC1B,SAAS,sBAAsB;AAYxB,MAAM,QAAQ;AAAA,EACnB,CAAC,EAAE,cAAc,cAAc,OAAO,MAAM,WAAW,GAAG,MAAM,GAAG,QACjE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MAEA,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,WAAW,CAAC,YAAY,EAAE,aAAa,KAAK,CAAC,EAAE,MAAM,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA;AAAA,EAC1F;AAEJ;AAEA,MAAM,cAAc;AAab,MAAM,OAAO;AAAA,EAClB,CAAC,EAAE,QAAQ,OAAO,aAAa,aAAa,WAAW,GAAG,MAAM,GAAG,QAAQ;AACzE,UAAM,SAAS,YAAY;AAC3B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,gBAAc,WAAW,YAAY,SAAS;AAAA,QAC9C,eAAa;AAAA,QACZ,GAAG;AAAA,QACJ,WAAW,CAAC,OAAO,MAAM,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,QAG5D;AAAA,8BAAC,UAAK,WAAW,OAAO,QAAQ,eAAY,QACzC,qBAAW,cAAc,oBAAC,aAAU,GACvC;AAAA,UACA,qBAAC,UAAK,WAAW,OAAO,SACtB;AAAA,iCAAC,UAAK,WAAW,OAAO,OACrB;AAAA;AAAA,cAEA;AAAA,gBACC,eACE,EAAE,UAAU,eAAe,SAAS,IAAI,UAAU,gBAAgB,EAAE,MAAM;AAAA,cAC9E,EACG,OAAO,OAAO,EACd,IAAI,CAAC,UACJ,qBAAC,kBAA2B;AAAA;AAAA,gBAAE;AAAA,mBAAT,KAAe,CACrC;AAAA,eACL;AAAA,YACC,eAAe,oBAAC,UAAK,WAAW,OAAO,aAAc,uBAAY;AAAA,aACpE;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,KAAK,cAAc;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export { Table, TableCaption, TableHeader, TableBody, TableFooter, TableRow, Tab
|
|
|
33
33
|
export { Spinner } from './components/Spinner.js';
|
|
34
34
|
export { Icon } from './components/Icon.js';
|
|
35
35
|
export type { IconProps } from './components/Icon.js';
|
|
36
|
-
export { CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, LinkIcon, MenuIcon, MoonIcon, SearchIcon, SunIcon, WarningIcon, } from './components/Glyphs.js';
|
|
36
|
+
export { CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CloseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, LinkIcon, MenuIcon, MoonIcon, SearchIcon, SunIcon, WarningIcon, } from './components/Glyphs.js';
|
|
37
37
|
export type { GlyphProps } from './components/Glyphs.js';
|
|
38
38
|
export { Link } from './components/Link.js';
|
|
39
39
|
export { Prose } from './components/Prose.js';
|
|
@@ -50,6 +50,12 @@ export { Figure } from './components/Figure.js';
|
|
|
50
50
|
export type { FigureProps } from './components/Figure.js';
|
|
51
51
|
export { Avatar } from './components/Avatar.js';
|
|
52
52
|
export type { AvatarProps } from './components/Avatar.js';
|
|
53
|
+
export { Pagination } from './components/Pagination.js';
|
|
54
|
+
export type { PaginationProps } from './components/Pagination.js';
|
|
55
|
+
export { Breadcrumb, BreadcrumbItem } from './components/Breadcrumb.js';
|
|
56
|
+
export type { BreadcrumbProps, BreadcrumbItemProps } from './components/Breadcrumb.js';
|
|
57
|
+
export { Steps, Step } from './components/Steps.js';
|
|
58
|
+
export type { StepsProps, StepProps } from './components/Steps.js';
|
|
53
59
|
export { SkipLink } from './components/SkipLink.js';
|
|
54
60
|
export { VisuallyHidden } from './components/VisuallyHidden.js';
|
|
55
61
|
export { Center } from './components/Center.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE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index.js
CHANGED
|
@@ -73,6 +73,7 @@ import { Icon } from "./components/Icon.js";
|
|
|
73
73
|
import {
|
|
74
74
|
CheckIcon,
|
|
75
75
|
ChevronDownIcon,
|
|
76
|
+
ChevronLeftIcon,
|
|
76
77
|
ChevronRightIcon,
|
|
77
78
|
CloseIcon,
|
|
78
79
|
CopyIcon,
|
|
@@ -95,6 +96,9 @@ import { Blockquote, BlockquoteCaption } from "./components/Blockquote.js";
|
|
|
95
96
|
import { Image } from "./components/Image.js";
|
|
96
97
|
import { Figure } from "./components/Figure.js";
|
|
97
98
|
import { Avatar } from "./components/Avatar.js";
|
|
99
|
+
import { Pagination } from "./components/Pagination.js";
|
|
100
|
+
import { Breadcrumb, BreadcrumbItem } from "./components/Breadcrumb.js";
|
|
101
|
+
import { Steps, Step } from "./components/Steps.js";
|
|
98
102
|
import { SkipLink } from "./components/SkipLink.js";
|
|
99
103
|
import { VisuallyHidden } from "./components/VisuallyHidden.js";
|
|
100
104
|
import { Center } from "./components/Center.js";
|
|
@@ -118,6 +122,8 @@ export {
|
|
|
118
122
|
Blockquote,
|
|
119
123
|
BlockquoteCaption,
|
|
120
124
|
Box,
|
|
125
|
+
Breadcrumb,
|
|
126
|
+
BreadcrumbItem,
|
|
121
127
|
Button,
|
|
122
128
|
Card,
|
|
123
129
|
CardBody,
|
|
@@ -129,6 +135,7 @@ export {
|
|
|
129
135
|
CheckIcon,
|
|
130
136
|
Checkbox,
|
|
131
137
|
ChevronDownIcon,
|
|
138
|
+
ChevronLeftIcon,
|
|
132
139
|
ChevronRightIcon,
|
|
133
140
|
CloseIcon,
|
|
134
141
|
Code,
|
|
@@ -174,6 +181,7 @@ export {
|
|
|
174
181
|
MenuIcon,
|
|
175
182
|
MenuItem,
|
|
176
183
|
MoonIcon,
|
|
184
|
+
Pagination,
|
|
177
185
|
Prose,
|
|
178
186
|
Radio,
|
|
179
187
|
RadioGroup,
|
|
@@ -187,6 +195,8 @@ export {
|
|
|
187
195
|
SkipLink,
|
|
188
196
|
Spinner,
|
|
189
197
|
Stack,
|
|
198
|
+
Step,
|
|
199
|
+
Steps,
|
|
190
200
|
SunIcon,
|
|
191
201
|
Switch,
|
|
192
202
|
Tab,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { Button } from './components/Button';\nexport { Heading } from './components/Heading';\nexport { Text } from './components/Text';\nexport { Flex } from './components/Flex';\nexport { Stack, HStack, VStack } from './components/Stack';\nexport { Tag } from './components/Tag';\nexport { Badge } from './components/Badge';\nexport { Switch } from './components/Switch';\nexport type { SwitchProps } from './components/Switch';\nexport {\n Field,\n FieldLabel,\n FieldHelper,\n FieldError,\n FieldControl,\n FieldSelect,\n FieldTextarea,\n useField,\n} from './components/Field';\nexport type { FieldSize, FieldContextValue } from './components/Field';\nexport { TextField } from './components/TextField';\nexport { Checkbox } from './components/Checkbox';\nexport { Radio, RadioGroup } from './components/Radio';\nexport type { RadioProps, RadioGroupProps } from './components/Radio';\nexport { Select } from './components/Select';\nexport { Textarea } from './components/Textarea';\nexport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n CardTitle,\n CardDescription,\n} from './components/Card';\nexport { SimpleGrid } from './components/SimpleGrid';\nexport { Container } from './components/Container';\nexport type { ContainerProps } from './components/Container';\nexport { Box } from './components/Box';\nexport type { BoxProps } from './components/Box';\nexport { Hide } from './components/Hide';\nexport type { HideProps } from './components/Hide';\nexport { Tooltip } from './components/Tooltip';\nexport type { TooltipPlacement, TooltipProps } from './components/Tooltip';\nexport {\n Dialog,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogClose,\n} from './components/Dialog';\nexport {\n Drawer,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerClose,\n} from './components/Drawer';\nexport { Menu, MenuItem } from './components/Menu';\nexport { Tabs, TabList, Tab, TabPanel } from './components/Tabs';\nexport {\n Table,\n TableCaption,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableColumnHeader,\n TableCell,\n Thead,\n Tbody,\n Tfoot,\n Tr,\n Th,\n Td,\n} from './components/Table';\nexport { Spinner } from './components/Spinner';\nexport { Icon } from './components/Icon';\nexport type { IconProps } from './components/Icon';\nexport {\n CheckIcon,\n ChevronDownIcon,\n ChevronRightIcon,\n CloseIcon,\n CopyIcon,\n ExternalLinkIcon,\n InfoIcon,\n LinkIcon,\n MenuIcon,\n MoonIcon,\n SearchIcon,\n SunIcon,\n WarningIcon,\n} from './components/Glyphs';\nexport type { GlyphProps } from './components/Glyphs';\nexport { Link } from './components/Link';\nexport { Prose } from './components/Prose';\nexport { List, ListItem } from './components/List';\nexport type { ListProps, ListItemProps } from './components/List';\nexport { Code } from './components/Code';\nexport { Kbd } from './components/Kbd';\nexport { Mark } from './components/Mark';\nexport { Blockquote, BlockquoteCaption } from './components/Blockquote';\nexport type { BlockquoteProps, BlockquoteCaptionProps } from './components/Blockquote';\nexport { Image } from './components/Image';\nexport type { ImageProps } from './components/Image';\nexport { Figure } from './components/Figure';\nexport type { FigureProps } from './components/Figure';\nexport { Avatar } from './components/Avatar';\nexport type { AvatarProps } from './components/Avatar';\nexport { SkipLink } from './components/SkipLink';\nexport { VisuallyHidden } from './components/VisuallyHidden';\nexport { Center } from './components/Center';\nexport type { CenterProps } from './components/Center';\nexport { Grid, GridItem } from './components/Grid';\nexport type { GridProps, GridItemProps } from './components/Grid';\nexport { AspectRatio } from './components/AspectRatio';\nexport type { AspectRatioProps } from './components/AspectRatio';\nexport type { ProseProps } from './components/Prose';\nexport { Separator } from './components/Separator';\nexport type { LabelCustomColors, LabelVisual } from './helpers/labelColors';\nexport type {\n Breakpoint,\n BreakpointAlias,\n BreakpointMap,\n ResponsiveValue,\n GapValue,\n SpacingScale,\n SpacingStep,\n SpacingSemantic,\n SemanticBreakpoint,\n} from './helpers/responsive';\nexport {\n BREAKPOINTS,\n SEMANTIC_BREAKPOINTS,\n SEMANTIC_TO_BREAKPOINT,\n SPACING_SCALE,\n normalizeResponsiveValue,\n normalizeGapValue,\n resolveBreakpointAlias,\n} from './helpers/responsive';\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,WAAW;AACpB,SAAS,aAAa;AACtB,SAAS,cAAc;AAEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,OAAO,kBAAkB;AAElC,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,SAAS,WAAW;AAEpB,SAAS,YAAY;AAErB,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MAAM,gBAAgB;AAC/B,SAAS,MAAM,SAAS,KAAK,gBAAgB;AAC7C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,MAAM,gBAAgB;AAE/B,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,YAAY,yBAAyB;AAE9C,SAAS,aAAa;AAEtB,SAAS,cAAc;AAEvB,SAAS,cAAc;AAEvB,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,MAAM,gBAAgB;AAE/B,SAAS,mBAAmB;AAG5B,SAAS,iBAAiB;AAa1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { Button } from './components/Button';\nexport { Heading } from './components/Heading';\nexport { Text } from './components/Text';\nexport { Flex } from './components/Flex';\nexport { Stack, HStack, VStack } from './components/Stack';\nexport { Tag } from './components/Tag';\nexport { Badge } from './components/Badge';\nexport { Switch } from './components/Switch';\nexport type { SwitchProps } from './components/Switch';\nexport {\n Field,\n FieldLabel,\n FieldHelper,\n FieldError,\n FieldControl,\n FieldSelect,\n FieldTextarea,\n useField,\n} from './components/Field';\nexport type { FieldSize, FieldContextValue } from './components/Field';\nexport { TextField } from './components/TextField';\nexport { Checkbox } from './components/Checkbox';\nexport { Radio, RadioGroup } from './components/Radio';\nexport type { RadioProps, RadioGroupProps } from './components/Radio';\nexport { Select } from './components/Select';\nexport { Textarea } from './components/Textarea';\nexport {\n Card,\n CardHeader,\n CardBody,\n CardFooter,\n CardTitle,\n CardDescription,\n} from './components/Card';\nexport { SimpleGrid } from './components/SimpleGrid';\nexport { Container } from './components/Container';\nexport type { ContainerProps } from './components/Container';\nexport { Box } from './components/Box';\nexport type { BoxProps } from './components/Box';\nexport { Hide } from './components/Hide';\nexport type { HideProps } from './components/Hide';\nexport { Tooltip } from './components/Tooltip';\nexport type { TooltipPlacement, TooltipProps } from './components/Tooltip';\nexport {\n Dialog,\n DialogHeader,\n DialogBody,\n DialogFooter,\n DialogTitle,\n DialogClose,\n} from './components/Dialog';\nexport {\n Drawer,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerClose,\n} from './components/Drawer';\nexport { Menu, MenuItem } from './components/Menu';\nexport { Tabs, TabList, Tab, TabPanel } from './components/Tabs';\nexport {\n Table,\n TableCaption,\n TableHeader,\n TableBody,\n TableFooter,\n TableRow,\n TableColumnHeader,\n TableCell,\n Thead,\n Tbody,\n Tfoot,\n Tr,\n Th,\n Td,\n} from './components/Table';\nexport { Spinner } from './components/Spinner';\nexport { Icon } from './components/Icon';\nexport type { IconProps } from './components/Icon';\nexport {\n CheckIcon,\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n CloseIcon,\n CopyIcon,\n ExternalLinkIcon,\n InfoIcon,\n LinkIcon,\n MenuIcon,\n MoonIcon,\n SearchIcon,\n SunIcon,\n WarningIcon,\n} from './components/Glyphs';\nexport type { GlyphProps } from './components/Glyphs';\nexport { Link } from './components/Link';\nexport { Prose } from './components/Prose';\nexport { List, ListItem } from './components/List';\nexport type { ListProps, ListItemProps } from './components/List';\nexport { Code } from './components/Code';\nexport { Kbd } from './components/Kbd';\nexport { Mark } from './components/Mark';\nexport { Blockquote, BlockquoteCaption } from './components/Blockquote';\nexport type { BlockquoteProps, BlockquoteCaptionProps } from './components/Blockquote';\nexport { Image } from './components/Image';\nexport type { ImageProps } from './components/Image';\nexport { Figure } from './components/Figure';\nexport type { FigureProps } from './components/Figure';\nexport { Avatar } from './components/Avatar';\nexport type { AvatarProps } from './components/Avatar';\nexport { Pagination } from './components/Pagination';\nexport type { PaginationProps } from './components/Pagination';\nexport { Breadcrumb, BreadcrumbItem } from './components/Breadcrumb';\nexport type { BreadcrumbProps, BreadcrumbItemProps } from './components/Breadcrumb';\nexport { Steps, Step } from './components/Steps';\nexport type { StepsProps, StepProps } from './components/Steps';\nexport { SkipLink } from './components/SkipLink';\nexport { VisuallyHidden } from './components/VisuallyHidden';\nexport { Center } from './components/Center';\nexport type { CenterProps } from './components/Center';\nexport { Grid, GridItem } from './components/Grid';\nexport type { GridProps, GridItemProps } from './components/Grid';\nexport { AspectRatio } from './components/AspectRatio';\nexport type { AspectRatioProps } from './components/AspectRatio';\nexport type { ProseProps } from './components/Prose';\nexport { Separator } from './components/Separator';\nexport type { LabelCustomColors, LabelVisual } from './helpers/labelColors';\nexport type {\n Breakpoint,\n BreakpointAlias,\n BreakpointMap,\n ResponsiveValue,\n GapValue,\n SpacingScale,\n SpacingStep,\n SpacingSemantic,\n SemanticBreakpoint,\n} from './helpers/responsive';\nexport {\n BREAKPOINTS,\n SEMANTIC_BREAKPOINTS,\n SEMANTIC_TO_BREAKPOINT,\n SPACING_SCALE,\n normalizeResponsiveValue,\n normalizeGapValue,\n resolveBreakpointAlias,\n} from './helpers/responsive';\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,WAAW;AACpB,SAAS,aAAa;AACtB,SAAS,cAAc;AAEvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,OAAO,kBAAkB;AAElC,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAE1B,SAAS,WAAW;AAEpB,SAAS,YAAY;AAErB,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,MAAM,gBAAgB;AAC/B,SAAS,MAAM,SAAS,KAAK,gBAAgB;AAC7C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,YAAY;AAErB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,MAAM,gBAAgB;AAE/B,SAAS,YAAY;AACrB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,YAAY,yBAAyB;AAE9C,SAAS,aAAa;AAEtB,SAAS,cAAc;AAEvB,SAAS,cAAc;AAEvB,SAAS,kBAAkB;AAE3B,SAAS,YAAY,sBAAsB;AAE3C,SAAS,OAAO,YAAY;AAE5B,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,MAAM,gBAAgB;AAE/B,SAAS,mBAAmB;AAG5B,SAAS,iBAAiB;AAa1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -42,7 +42,7 @@ Raw elements with inline styles are the most common mistake. Use this table:
|
|
|
42
42
|
| inline `svg` icon | `Icon` around your SVG, or a built-in glyph (`SearchIcon`, `ChevronDownIcon`, …); add `label` only when it carries meaning |
|
|
43
43
|
| `a` | `Link` |
|
|
44
44
|
| `a` styled as a button (call to action) | `Button as="a" href="…"` (anchor props are typed) |
|
|
45
|
-
| HTML from Markdown or MDX (blog posts, docs) | `<Prose as="article">`;
|
|
45
|
+
| HTML from Markdown or MDX (blog posts, docs) | `<Prose as="article">`; Becket components inside keep their styles, other markup opts out with `data-not-prose` |
|
|
46
46
|
| `ul` / `ol` with `li` | `List` (`as="ol"` for steps, `marker="none"` for nav) + `ListItem` |
|
|
47
47
|
| inline `code`, `kbd`, `mark` | `Code`, `Kbd`, `Mark` |
|
|
48
48
|
| `blockquote` (+ attribution) | `Blockquote cite` + `BlockquoteCaption` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@becket-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Becket React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@becket-ui/tokens": "^0.
|
|
41
|
+
"@becket-ui/tokens": "^0.8.0",
|
|
42
42
|
"react": ">=19",
|
|
43
43
|
"react-dom": ">=19"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@becket-ui/a11y": "0.0.0",
|
|
47
|
-
"@becket-ui/tokens": "0.
|
|
47
|
+
"@becket-ui/tokens": "0.8.0",
|
|
48
48
|
"@fontsource/inter": "^5.3.0",
|
|
49
49
|
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
50
50
|
"@pandacss/dev": "^2.3.0",
|