@becket-ui/react 0.7.0 → 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.
@@ -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":[]}
@@ -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
- * Wrap embedded components in `data-not-prose` to keep their own styles.
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;;;GAGG;AACH,eAAO,MAAM,KAAK;IAdhB,gEAAgE;WACzD,SAAS;IAChB,yCAAyC;SACpC,WAAW;kDAejB,CAAC"}
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 * Wrap embedded components in `data-not-prose` to keep their own styles.\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":"AAsBI;AAtBJ,SAAS,kBAAmE;AAC5E,SAAS,SAAS,mBAAmB;AAWrC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAMO,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":[]}
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
@@ -52,6 +52,10 @@ export { Avatar } from './components/Avatar.js';
52
52
  export type { AvatarProps } from './components/Avatar.js';
53
53
  export { Pagination } from './components/Pagination.js';
54
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';
55
59
  export { SkipLink } from './components/SkipLink.js';
56
60
  export { VisuallyHidden } from './components/VisuallyHidden.js';
57
61
  export { Center } from './components/Center.js';
@@ -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,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,KAAK,EACL,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,aAAa,EACb,QAAQ,GACT,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,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AO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC5E,YAAY,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,eAAe,EACf,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -97,6 +97,8 @@ import { Image } from "./components/Image.js";
97
97
  import { Figure } from "./components/Figure.js";
98
98
  import { Avatar } from "./components/Avatar.js";
99
99
  import { Pagination } from "./components/Pagination.js";
100
+ import { Breadcrumb, BreadcrumbItem } from "./components/Breadcrumb.js";
101
+ import { Steps, Step } from "./components/Steps.js";
100
102
  import { SkipLink } from "./components/SkipLink.js";
101
103
  import { VisuallyHidden } from "./components/VisuallyHidden.js";
102
104
  import { Center } from "./components/Center.js";
@@ -120,6 +122,8 @@ export {
120
122
  Blockquote,
121
123
  BlockquoteCaption,
122
124
  Box,
125
+ Breadcrumb,
126
+ BreadcrumbItem,
123
127
  Button,
124
128
  Card,
125
129
  CardBody,
@@ -191,6 +195,8 @@ export {
191
195
  SkipLink,
192
196
  Spinner,
193
197
  Stack,
198
+ Step,
199
+ Steps,
194
200
  SunIcon,
195
201
  Switch,
196
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 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 { 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,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">`; wrap embedded components in `data-not-prose` |
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.7.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.7.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.7.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",