@becket-ui/react 0.2.0 → 0.4.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.
Files changed (94) hide show
  1. package/dist/components/AspectRatio.d.ts +17 -0
  2. package/dist/components/AspectRatio.d.ts.map +1 -0
  3. package/dist/components/AspectRatio.js +12 -0
  4. package/dist/components/AspectRatio.js.map +1 -0
  5. package/dist/components/Avatar.d.ts +24 -0
  6. package/dist/components/Avatar.d.ts.map +1 -0
  7. package/dist/components/Avatar.js +30 -0
  8. package/dist/components/Avatar.js.map +1 -0
  9. package/dist/components/Badge.d.ts +1 -1
  10. package/dist/components/Badge.js +1 -1
  11. package/dist/components/Blockquote.d.ts +18 -0
  12. package/dist/components/Blockquote.d.ts.map +1 -0
  13. package/dist/components/Blockquote.js +24 -0
  14. package/dist/components/Blockquote.js.map +1 -0
  15. package/dist/components/Center.d.ts +12 -0
  16. package/dist/components/Center.d.ts.map +1 -0
  17. package/dist/components/Center.js +14 -0
  18. package/dist/components/Center.js.map +1 -0
  19. package/dist/components/Code.d.ts +5 -0
  20. package/dist/components/Code.d.ts.map +1 -0
  21. package/dist/components/Code.js +12 -0
  22. package/dist/components/Code.js.map +1 -0
  23. package/dist/components/Dialog.js +1 -1
  24. package/dist/components/Drawer.js +1 -1
  25. package/dist/components/Figure.d.ts +11 -0
  26. package/dist/components/Figure.d.ts.map +1 -0
  27. package/dist/components/Figure.js +18 -0
  28. package/dist/components/Figure.js.map +1 -0
  29. package/dist/components/Flex.d.ts +2 -2
  30. package/dist/components/Flex.js +2 -2
  31. package/dist/components/Glyphs.d.ts +1 -1
  32. package/dist/components/Glyphs.js +1 -1
  33. package/dist/components/Grid.d.ts +29 -0
  34. package/dist/components/Grid.d.ts.map +1 -0
  35. package/dist/components/Grid.js +57 -0
  36. package/dist/components/Grid.js.map +1 -0
  37. package/dist/components/Hide.d.ts +1 -1
  38. package/dist/components/Hide.js +1 -1
  39. package/dist/components/Image.d.ts +18 -0
  40. package/dist/components/Image.d.ts.map +1 -0
  41. package/dist/components/Image.js +23 -0
  42. package/dist/components/Image.js.map +1 -0
  43. package/dist/components/Kbd.d.ts +5 -0
  44. package/dist/components/Kbd.d.ts.map +1 -0
  45. package/dist/components/Kbd.js +12 -0
  46. package/dist/components/Kbd.js.map +1 -0
  47. package/dist/components/List.d.ts +19 -0
  48. package/dist/components/List.d.ts.map +1 -0
  49. package/dist/components/List.js +27 -0
  50. package/dist/components/List.js.map +1 -0
  51. package/dist/components/Mark.d.ts +5 -0
  52. package/dist/components/Mark.d.ts.map +1 -0
  53. package/dist/components/Mark.js +12 -0
  54. package/dist/components/Mark.js.map +1 -0
  55. package/dist/components/Prose.d.ts +20 -0
  56. package/dist/components/Prose.d.ts.map +1 -0
  57. package/dist/components/Prose.js +14 -0
  58. package/dist/components/Prose.js.map +1 -0
  59. package/dist/components/Radio.js +1 -1
  60. package/dist/components/Select.d.ts +1 -1
  61. package/dist/components/Select.js +1 -1
  62. package/dist/components/SimpleGrid.d.ts +1 -1
  63. package/dist/components/SimpleGrid.js +1 -1
  64. package/dist/components/SkipLink.d.ts +8 -0
  65. package/dist/components/SkipLink.d.ts.map +1 -0
  66. package/dist/components/SkipLink.js +14 -0
  67. package/dist/components/SkipLink.js.map +1 -0
  68. package/dist/components/Stack.d.ts +2 -2
  69. package/dist/components/Stack.js +2 -2
  70. package/dist/components/Tag.d.ts +1 -1
  71. package/dist/components/Tag.js +1 -1
  72. package/dist/components/TextField.d.ts +1 -1
  73. package/dist/components/TextField.js +1 -1
  74. package/dist/components/Textarea.d.ts +1 -1
  75. package/dist/components/Textarea.js +1 -1
  76. package/dist/components/VisuallyHidden.d.ts +9 -0
  77. package/dist/components/VisuallyHidden.d.ts.map +1 -0
  78. package/dist/components/VisuallyHidden.js +14 -0
  79. package/dist/components/VisuallyHidden.js.map +1 -0
  80. package/dist/helpers/responsive.d.ts +1 -1
  81. package/dist/helpers/responsive.js.map +1 -1
  82. package/dist/helpers/storybookControls.d.ts +1 -1
  83. package/dist/helpers/storybookControls.js +1 -1
  84. package/dist/helpers/storybookControls.js.map +1 -1
  85. package/dist/helpers/storybookImages.d.ts +3 -0
  86. package/dist/helpers/storybookImages.d.ts.map +1 -0
  87. package/dist/helpers/storybookImages.js +16 -0
  88. package/dist/helpers/storybookImages.js.map +1 -0
  89. package/dist/index.d.ts +65 -42
  90. package/dist/index.d.ts.map +1 -1
  91. package/dist/index.js +62 -31
  92. package/dist/index.js.map +1 -1
  93. package/guides/building-with-becket.md +20 -4
  94. package/package.json +4 -4
@@ -0,0 +1,17 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ type AspectRatioValue = '1:1' | '3:2' | '5:3' | '8:5' | '13:8' | '2:3' | '3:5' | '5:8' | '8:13' | '16:9' | '9:16';
3
+ export type AspectRatioProps = ComponentPropsWithoutRef<'div'> & {
4
+ /** Width to height. Default `'1:1'`. */
5
+ ratio?: AspectRatioValue;
6
+ };
7
+ /**
8
+ * Keeps one child (image, video, iframe, map) at a fixed ratio; the child fills the box.
9
+ * Ratios are Fibonacci pairs (`'3:2'`, `'8:5'`, `'13:8'` and their portrait flips) plus `'16:9'`
10
+ * and `'9:16'` for video. Default `'1:1'`.
11
+ */
12
+ export declare const AspectRatio: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
+ /** Width to height. Default `'1:1'`. */
14
+ ratio?: AspectRatioValue;
15
+ } & import("react").RefAttributes<HTMLDivElement>>;
16
+ export {};
17
+ //# sourceMappingURL=AspectRatio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AspectRatio.d.ts","sourceRoot":"","sources":["../../src/components/AspectRatio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGlE,KAAK,gBAAgB,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAElH,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC/D,wCAAwC;IACxC,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW;IAbtB,wCAAwC;YAChC,gBAAgB;kDAcxB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { aspectRatio as aspectRatioRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const AspectRatio = forwardRef(({ ratio, className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, ...props, className: mergeClassName(aspectRatioRecipe({ ratio }), className) }));
8
+ AspectRatio.displayName = "AspectRatio";
9
+ export {
10
+ AspectRatio
11
+ };
12
+ //# sourceMappingURL=AspectRatio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/AspectRatio.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { aspectRatio as aspectRatioRecipe } from '@becket-ui/tokens/recipes';\n\ntype AspectRatioValue = '1:1' | '3:2' | '5:3' | '8:5' | '13:8' | '2:3' | '3:5' | '5:8' | '8:13' | '16:9' | '9:16';\n\nexport type AspectRatioProps = ComponentPropsWithoutRef<'div'> & {\n /** Width to height. Default `'1:1'`. */\n ratio?: AspectRatioValue;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/**\n * Keeps one child (image, video, iframe, map) at a fixed ratio; the child fills the box.\n * Ratios are Fibonacci pairs (`'3:2'`, `'8:5'`, `'13:8'` and their portrait flips) plus `'16:9'`\n * and `'9:16'` for video. Default `'1:1'`.\n */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(({ ratio, className, ...props }, ref) => (\n <div ref={ref} {...props} className={mergeClassName(aspectRatioRecipe({ ratio }), className)} />\n));\n\nAspectRatio.displayName = 'AspectRatio';\n"],"mappings":"AAoBE;AApBF,SAAS,kBAAiD;AAC1D,SAAS,eAAe,yBAAyB;AASjD,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAOO,MAAM,cAAc,WAA6C,CAAC,EAAE,OAAO,WAAW,GAAG,MAAM,GAAG,QACvG,oBAAC,SAAI,KAAW,GAAG,OAAO,WAAW,eAAe,kBAAkB,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,CAC/F;AAED,YAAY,cAAc;","names":[]}
@@ -0,0 +1,24 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
3
+ export type AvatarProps = Omit<ComponentPropsWithoutRef<'span'>, 'children'> & {
4
+ /** The person's name: the accessible name and the source of the initials. */
5
+ name: string;
6
+ /** Photo URL. Without it, or if it fails to load, the initials show. */
7
+ src?: string;
8
+ /** Fibonacci steps: 20, 32, 52 or 84px. Default `md`. */
9
+ size?: AvatarSize;
10
+ };
11
+ /**
12
+ * Photo or initials in a circle. Renders without JS; client JS only swaps to
13
+ * the initials when the photo fails to load.
14
+ */
15
+ export declare const Avatar: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children"> & {
16
+ /** The person's name: the accessible name and the source of the initials. */
17
+ name: string;
18
+ /** Photo URL. Without it, or if it fails to load, the initials show. */
19
+ src?: string;
20
+ /** Fibonacci steps: 20, 32, 52 or 84px. Default `md`. */
21
+ size?: AvatarSize;
22
+ } & import("react").RefAttributes<HTMLSpanElement>>;
23
+ export {};
24
+ //# sourceMappingURL=Avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAG5E,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAC7E,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAcF;;;GAGG;AACH,eAAO,MAAM,MAAM;IAxBjB,6EAA6E;UACvE,MAAM;IACZ,wEAAwE;UAClE,MAAM;IACZ,yDAAyD;WAClD,UAAU;mDAqClB,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { forwardRef, useState } from "react";
4
+ import { avatar as avatarRecipe } from "@becket-ui/tokens/recipes";
5
+ function mergeClassName(...classes) {
6
+ return classes.filter(Boolean).join(" ");
7
+ }
8
+ function initialsOf(name) {
9
+ const words = name.trim().split(/\s+/).filter(Boolean);
10
+ if (words.length === 0) return "";
11
+ const first = words[0][0] ?? "";
12
+ const last = words.length > 1 ? words[words.length - 1][0] ?? "" : "";
13
+ return `${first}${last}`.toUpperCase();
14
+ }
15
+ const Avatar = forwardRef(
16
+ ({ name, src, size = "md", className, ...props }, ref) => {
17
+ const [failedSrc, setFailedSrc] = useState(null);
18
+ const styles = avatarRecipe({ size });
19
+ const showImage = Boolean(src) && failedSrc !== src;
20
+ return /* @__PURE__ */ jsx("span", { ref, role: "img", "aria-label": name, ...props, className: mergeClassName(styles.root, className), children: showImage ? (
21
+ // The wrapper carries the name; the image itself is decorative.
22
+ /* @__PURE__ */ jsx("img", { src, alt: "", className: styles.image, onError: () => setFailedSrc(src ?? null) })
23
+ ) : /* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: styles.initials, children: initialsOf(name) }) });
24
+ }
25
+ );
26
+ Avatar.displayName = "Avatar";
27
+ export {
28
+ Avatar
29
+ };
30
+ //# sourceMappingURL=Avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport { forwardRef, useState, type ComponentPropsWithoutRef } from 'react';\nimport { avatar as avatarRecipe } from '@becket-ui/tokens/recipes';\n\ntype AvatarSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport type AvatarProps = Omit<ComponentPropsWithoutRef<'span'>, 'children'> & {\n /** The person's name: the accessible name and the source of the initials. */\n name: string;\n /** Photo URL. Without it, or if it fails to load, the initials show. */\n src?: string;\n /** Fibonacci steps: 20, 32, 52 or 84px. Default `md`. */\n size?: AvatarSize;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\nfunction initialsOf(name: string): string {\n const words = name.trim().split(/\\s+/).filter(Boolean);\n if (words.length === 0) return '';\n const first = words[0][0] ?? '';\n const last = words.length > 1 ? (words[words.length - 1][0] ?? '') : '';\n return `${first}${last}`.toUpperCase();\n}\n\n/**\n * Photo or initials in a circle. Renders without JS; client JS only swaps to\n * the initials when the photo fails to load.\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(\n ({ name, src, size = 'md', className, ...props }, ref) => {\n const [failedSrc, setFailedSrc] = useState<string | null>(null);\n const styles = avatarRecipe({ size });\n const showImage = Boolean(src) && failedSrc !== src;\n return (\n <span ref={ref} role=\"img\" aria-label={name} {...props} className={mergeClassName(styles.root, className)}>\n {showImage ? (\n // The wrapper carries the name; the image itself is decorative.\n <img src={src} alt=\"\" className={styles.image} onError={() => setFailedSrc(src ?? null)} />\n ) : (\n <span aria-hidden=\"true\" className={styles.initials}>\n {initialsOf(name)}\n </span>\n )}\n </span>\n );\n },\n);\n\nAvatar.displayName = 'Avatar';\n"],"mappings":";AAyCU;AAvCV,SAAS,YAAY,gBAA+C;AACpE,SAAS,UAAU,oBAAoB;AAavC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAEA,SAAS,WAAW,MAAsB;AACxC,QAAM,QAAQ,KAAK,KAAK,EAAE,MAAM,KAAK,EAAE,OAAO,OAAO;AACrD,MAAI,MAAM,WAAW,EAAG,QAAO;AAC/B,QAAM,QAAQ,MAAM,CAAC,EAAE,CAAC,KAAK;AAC7B,QAAM,OAAO,MAAM,SAAS,IAAK,MAAM,MAAM,SAAS,CAAC,EAAE,CAAC,KAAK,KAAM;AACrE,SAAO,GAAG,KAAK,GAAG,IAAI,GAAG,YAAY;AACvC;AAMO,MAAM,SAAS;AAAA,EACpB,CAAC,EAAE,MAAM,KAAK,OAAO,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ;AACxD,UAAM,CAAC,WAAW,YAAY,IAAI,SAAwB,IAAI;AAC9D,UAAM,SAAS,aAAa,EAAE,KAAK,CAAC;AACpC,UAAM,YAAY,QAAQ,GAAG,KAAK,cAAc;AAChD,WACE,oBAAC,UAAK,KAAU,MAAK,OAAM,cAAY,MAAO,GAAG,OAAO,WAAW,eAAe,OAAO,MAAM,SAAS,GACrG;AAAA;AAAA,MAEC,oBAAC,SAAI,KAAU,KAAI,IAAG,WAAW,OAAO,OAAO,SAAS,MAAM,aAAa,OAAO,IAAI,GAAG;AAAA,QAEzF,oBAAC,UAAK,eAAY,QAAO,WAAW,OAAO,UACxC,qBAAW,IAAI,GAClB,GAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
@@ -1,5 +1,5 @@
1
1
  import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
- import { type LabelCustomColors, type LabelVisual } from '../helpers/labelColors';
2
+ import { type LabelCustomColors, type LabelVisual } from '../helpers/labelColors.js';
3
3
  type BadgeSize = 'sm' | 'md' | 'lg';
4
4
  type BadgeBorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
5
5
  export type BadgeProps = ComponentPropsWithoutRef<'span'> & {
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
3
3
  import { badge } from "@becket-ui/tokens/recipes";
4
4
  import {
5
5
  resolveLabelColorVars
6
- } from "../helpers/labelColors";
6
+ } from "../helpers/labelColors.js";
7
7
  function mergeClassName(...classes) {
8
8
  return classes.filter(Boolean).join(" ");
9
9
  }
@@ -0,0 +1,18 @@
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export type BlockquoteProps = ComponentPropsWithoutRef<'figure'> & {
3
+ /** URL of the source, set on the <blockquote cite> attribute. */
4
+ cite?: string;
5
+ children?: ReactNode;
6
+ };
7
+ export type BlockquoteCaptionProps = ComponentPropsWithoutRef<'figcaption'>;
8
+ export declare const BlockquoteCaption: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
9
+ /**
10
+ * A quotation. Renders <figure><blockquote/><figcaption/></figure> so the caption
11
+ * (who said it) sits outside the quote, as HTML requires.
12
+ */
13
+ export declare const Blockquote: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
14
+ /** URL of the source, set on the <blockquote cite> attribute. */
15
+ cite?: string;
16
+ children?: ReactNode;
17
+ } & import("react").RefAttributes<HTMLElement>>;
18
+ //# sourceMappingURL=Blockquote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Blockquote.d.ts","sourceRoot":"","sources":["../../src/components/Blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5G,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG;IACjE,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,wBAAwB,CAAC,YAAY,CAAC,CAAC;AAM5E,eAAO,MAAM,iBAAiB,kMAE5B,CAAC;AAIH;;;GAGG;AACH,eAAO,MAAM,UAAU;IArBrB,iEAAiE;WAC1D,MAAM;eACF,SAAS;+CAgCpB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Children, forwardRef, isValidElement } from "react";
3
+ import { blockquote as blockquoteRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const BlockquoteCaption = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("figcaption", { ref, ...props, className: mergeClassName(blockquoteRecipe().caption, className) }));
8
+ BlockquoteCaption.displayName = "BlockquoteCaption";
9
+ const Blockquote = forwardRef(({ cite, className, children, ...props }, ref) => {
10
+ const styles = blockquoteRecipe();
11
+ const items = Children.toArray(children);
12
+ const captions = items.filter((child) => isValidElement(child) && child.type === BlockquoteCaption);
13
+ const quote = items.filter((child) => !(isValidElement(child) && child.type === BlockquoteCaption));
14
+ return /* @__PURE__ */ jsxs("figure", { ref, ...props, className: mergeClassName(styles.root, className), children: [
15
+ /* @__PURE__ */ jsx("blockquote", { cite, className: styles.quote, children: quote }),
16
+ captions
17
+ ] });
18
+ });
19
+ Blockquote.displayName = "Blockquote";
20
+ export {
21
+ Blockquote,
22
+ BlockquoteCaption
23
+ };
24
+ //# sourceMappingURL=Blockquote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Blockquote.tsx"],"sourcesContent":["import { Children, forwardRef, isValidElement, type ComponentPropsWithoutRef, type ReactNode } from 'react';\nimport { blockquote as blockquoteRecipe } from '@becket-ui/tokens/recipes';\n\nexport type BlockquoteProps = ComponentPropsWithoutRef<'figure'> & {\n /** URL of the source, set on the <blockquote cite> attribute. */\n cite?: string;\n children?: ReactNode;\n};\n\nexport type BlockquoteCaptionProps = ComponentPropsWithoutRef<'figcaption'>;\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\nexport const BlockquoteCaption = forwardRef<HTMLElement, BlockquoteCaptionProps>(({ className, ...props }, ref) => (\n <figcaption ref={ref} {...props} className={mergeClassName(blockquoteRecipe().caption, className)} />\n));\n\nBlockquoteCaption.displayName = 'BlockquoteCaption';\n\n/**\n * A quotation. Renders <figure><blockquote/><figcaption/></figure> so the caption\n * (who said it) sits outside the quote, as HTML requires.\n */\nexport const Blockquote = forwardRef<HTMLElement, BlockquoteProps>(({ cite, className, children, ...props }, ref) => {\n const styles = blockquoteRecipe();\n const items = Children.toArray(children);\n const captions = items.filter((child) => isValidElement(child) && child.type === BlockquoteCaption);\n const quote = items.filter((child) => !(isValidElement(child) && child.type === BlockquoteCaption));\n return (\n <figure ref={ref} {...props} className={mergeClassName(styles.root, className)}>\n <blockquote cite={cite} className={styles.quote}>\n {quote}\n </blockquote>\n {captions}\n </figure>\n );\n});\n\nBlockquote.displayName = 'Blockquote';\n"],"mappings":"AAgBE,cAeE,YAfF;AAhBF,SAAS,UAAU,YAAY,sBAAqE;AACpG,SAAS,cAAc,wBAAwB;AAU/C,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAEO,MAAM,oBAAoB,WAAgD,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACzG,oBAAC,gBAAW,KAAW,GAAG,OAAO,WAAW,eAAe,iBAAiB,EAAE,SAAS,SAAS,GAAG,CACpG;AAED,kBAAkB,cAAc;AAMzB,MAAM,aAAa,WAAyC,CAAC,EAAE,MAAM,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AACnH,QAAM,SAAS,iBAAiB;AAChC,QAAM,QAAQ,SAAS,QAAQ,QAAQ;AACvC,QAAM,WAAW,MAAM,OAAO,CAAC,UAAU,eAAe,KAAK,KAAK,MAAM,SAAS,iBAAiB;AAClG,QAAM,QAAQ,MAAM,OAAO,CAAC,UAAU,EAAE,eAAe,KAAK,KAAK,MAAM,SAAS,kBAAkB;AAClG,SACE,qBAAC,YAAO,KAAW,GAAG,OAAO,WAAW,eAAe,OAAO,MAAM,SAAS,GAC3E;AAAA,wBAAC,gBAAW,MAAY,WAAW,OAAO,OACvC,iBACH;AAAA,IACC;AAAA,KACH;AAEJ,CAAC;AAED,WAAW,cAAc;","names":[]}
@@ -0,0 +1,12 @@
1
+ import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
+ export type CenterProps = ComponentPropsWithoutRef<'div'> & {
3
+ /** inline-flex instead of flex, e.g. to center an icon inside text. */
4
+ inline?: boolean;
5
+ as?: ElementType;
6
+ };
7
+ export declare const Center: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ /** inline-flex instead of flex, e.g. to center an icon inside text. */
9
+ inline?: boolean;
10
+ as?: ElementType;
11
+ } & import("react").RefAttributes<HTMLDivElement>>;
12
+ //# sourceMappingURL=Center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Center.d.ts","sourceRoot":"","sources":["../../src/components/Center.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpF,MAAM,MAAM,WAAW,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC1D,uEAAuE;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAMF,eAAO,MAAM,MAAM;IATjB,uEAAuE;aAC9D,OAAO;SACX,WAAW;kDAWjB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { center as centerRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const Center = forwardRef(
8
+ ({ inline = false, as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(Component, { ref, ...props, className: mergeClassName(centerRecipe({ inline }), className) })
9
+ );
10
+ Center.displayName = "Center";
11
+ export {
12
+ Center
13
+ };
14
+ //# sourceMappingURL=Center.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Center.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType } from 'react';\nimport { center as centerRecipe } from '@becket-ui/tokens/recipes';\n\nexport type CenterProps = ComponentPropsWithoutRef<'div'> & {\n /** inline-flex instead of flex, e.g. to center an icon inside text. */\n inline?: boolean;\n as?: ElementType;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\nexport const Center = forwardRef<HTMLDivElement, CenterProps>(\n ({ inline = false, as: Component = 'div', className, ...props }, ref) => (\n <Component ref={ref} {...props} className={mergeClassName(centerRecipe({ inline }), className)} />\n ),\n);\n\nCenter.displayName = 'Center';\n"],"mappings":"AAeI;AAfJ,SAAS,kBAAmE;AAC5E,SAAS,UAAU,oBAAoB;AAQvC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAEO,MAAM,SAAS;AAAA,EACpB,CAAC,EAAE,SAAS,OAAO,IAAI,YAAY,OAAO,WAAW,GAAG,MAAM,GAAG,QAC/D,oBAAC,aAAU,KAAW,GAAG,OAAO,WAAW,eAAe,aAAa,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG;AAEpG;AAEA,OAAO,cAAc;","names":[]}
@@ -0,0 +1,5 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ export type CodeProps = ComponentPropsWithoutRef<'code'>;
3
+ /** Inline code. Use CodeBlock (MAV-114) for multi-line code. */
4
+ export declare const Code: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
5
+ //# sourceMappingURL=Code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../src/components/Code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGlE,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAMzD,gEAAgE;AAChE,eAAO,MAAM,IAAI,kMAEf,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { code as codeRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const Code = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("code", { ref, ...props, className: mergeClassName(codeRecipe(), className) }));
8
+ Code.displayName = "Code";
9
+ export {
10
+ Code
11
+ };
12
+ //# sourceMappingURL=Code.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Code.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { code as codeRecipe } from '@becket-ui/tokens/recipes';\n\nexport type CodeProps = ComponentPropsWithoutRef<'code'>;\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/** Inline code. Use CodeBlock (MAV-114) for multi-line code. */\nexport const Code = forwardRef<HTMLElement, CodeProps>(({ className, ...props }, ref) => (\n <code ref={ref} {...props} className={mergeClassName(codeRecipe(), className)} />\n));\n\nCode.displayName = 'Code';\n"],"mappings":"AAWE;AAXF,SAAS,kBAAiD;AAC1D,SAAS,QAAQ,kBAAkB;AAInC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAGO,MAAM,OAAO,WAAmC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC/E,oBAAC,UAAK,KAAW,GAAG,OAAO,WAAW,eAAe,WAAW,GAAG,SAAS,GAAG,CAChF;AAED,KAAK,cAAc;","names":[]}
@@ -8,7 +8,7 @@ import {
8
8
  useRef
9
9
  } from "react";
10
10
  import { dialog as dialogRecipe } from "@becket-ui/tokens/recipes";
11
- import { assignRef, useNativeDialog } from "../helpers/nativeDialog";
11
+ import { assignRef, useNativeDialog } from "../helpers/nativeDialog.js";
12
12
  const DialogContext = createContext(null);
13
13
  function useDialog() {
14
14
  const ctx = useContext(DialogContext);
@@ -8,7 +8,7 @@ import {
8
8
  useRef
9
9
  } from "react";
10
10
  import { drawer as drawerRecipe } from "@becket-ui/tokens/recipes";
11
- import { assignRef, useNativeDialog } from "../helpers/nativeDialog";
11
+ import { assignRef, useNativeDialog } from "../helpers/nativeDialog.js";
12
12
  const DrawerContext = createContext(null);
13
13
  function useDrawer() {
14
14
  const ctx = useContext(DrawerContext);
@@ -0,0 +1,11 @@
1
+ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
2
+ export type FigureProps = ComponentPropsWithoutRef<'figure'> & {
3
+ /** Rendered as <figcaption> after the content. */
4
+ caption?: ReactNode;
5
+ };
6
+ /** Image, chart or code with a caption. */
7
+ export declare const Figure: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
8
+ /** Rendered as <figcaption> after the content. */
9
+ caption?: ReactNode;
10
+ } & import("react").RefAttributes<HTMLElement>>;
11
+ //# sourceMappingURL=Figure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Figure.d.ts","sourceRoot":"","sources":["../../src/components/Figure.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlF,MAAM,MAAM,WAAW,GAAG,wBAAwB,CAAC,QAAQ,CAAC,GAAG;IAC7D,kDAAkD;IAClD,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAMF,2CAA2C;AAC3C,eAAO,MAAM,MAAM;IATjB,kDAAkD;cACxC,SAAS;+CAgBnB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { figure as figureRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const Figure = forwardRef(({ caption, className, children, ...props }, ref) => {
8
+ const styles = figureRecipe();
9
+ return /* @__PURE__ */ jsxs("figure", { ref, ...props, className: mergeClassName(styles.root, className), children: [
10
+ children,
11
+ caption != null && /* @__PURE__ */ jsx("figcaption", { className: styles.caption, children: caption })
12
+ ] });
13
+ });
14
+ Figure.displayName = "Figure";
15
+ export {
16
+ Figure
17
+ };
18
+ //# sourceMappingURL=Figure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Figure.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';\nimport { figure as figureRecipe } from '@becket-ui/tokens/recipes';\n\nexport type FigureProps = ComponentPropsWithoutRef<'figure'> & {\n /** Rendered as <figcaption> after the content. */\n caption?: ReactNode;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/** Image, chart or code with a caption. */\nexport const Figure = forwardRef<HTMLElement, FigureProps>(({ caption, className, children, ...props }, ref) => {\n const styles = figureRecipe();\n return (\n <figure ref={ref} {...props} className={mergeClassName(styles.root, className)}>\n {children}\n {caption != null && <figcaption className={styles.caption}>{caption}</figcaption>}\n </figure>\n );\n});\n\nFigure.displayName = 'Figure';\n"],"mappings":"AAgBI,SAEsB,KAFtB;AAhBJ,SAAS,kBAAiE;AAC1E,SAAS,UAAU,oBAAoB;AAOvC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAGO,MAAM,SAAS,WAAqC,CAAC,EAAE,SAAS,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC9G,QAAM,SAAS,aAAa;AAC5B,SACE,qBAAC,YAAO,KAAW,GAAG,OAAO,WAAW,eAAe,OAAO,MAAM,SAAS,GAC1E;AAAA;AAAA,IACA,WAAW,QAAQ,oBAAC,gBAAW,WAAW,OAAO,SAAU,mBAAQ;AAAA,KACtE;AAEJ,CAAC;AAED,OAAO,cAAc;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
2
  import { flex } from '@becket-ui/tokens/patterns';
3
- import { type GradientBorderToken } from '../helpers/gradientBorder';
4
- import { type GapValue, type ResponsiveValue } from '../helpers/responsive';
3
+ import { type GradientBorderToken } from '../helpers/gradientBorder.js';
4
+ import { type GapValue, type ResponsiveValue } from '../helpers/responsive.js';
5
5
  type FlexOptions = NonNullable<Parameters<typeof flex>[0]>;
6
6
  type AlignVariant = 'start' | 'center' | 'end' | 'stretch' | 'baseline';
7
7
  type JustifyVariant = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
@@ -5,8 +5,8 @@ import { flex } from "@becket-ui/tokens/patterns";
5
5
  import {
6
6
  getGradientBorderClassName,
7
7
  isGradientBorderToken
8
- } from "../helpers/gradientBorder";
9
- import { normalizeGapValue, normalizeResponsiveValue } from "../helpers/responsive";
8
+ } from "../helpers/gradientBorder.js";
9
+ import { normalizeGapValue, normalizeResponsiveValue } from "../helpers/responsive.js";
10
10
  const ALIGN_MAP = {
11
11
  start: "start",
12
12
  center: "center",
@@ -1,4 +1,4 @@
1
- import { type IconProps } from './Icon';
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
4
  export declare const ChevronRightIcon: import("react").ForwardRefExoticComponent<GlyphProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
- import { Icon } from "./Icon";
3
+ import { Icon } from "./Icon.js";
4
4
  function createGlyph(displayName, shapes) {
5
5
  const Glyph = forwardRef((props, ref) => /* @__PURE__ */ jsx(Icon, { ref, ...props, children: /* @__PURE__ */ jsx(
6
6
  "svg",
@@ -0,0 +1,29 @@
1
+ import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
+ import { type GapValue, type ResponsiveValue } from '../helpers/responsive.js';
3
+ type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
+ type Span = Columns | 'full';
5
+ export type GridProps = ComponentPropsWithoutRef<'div'> & {
6
+ /** Column count, 1–12, or per breakpoint: { base: 1, md: 12 }. */
7
+ columns?: ResponsiveValue<Columns>;
8
+ gap?: GapValue;
9
+ as?: ElementType;
10
+ };
11
+ export type GridItemProps = ComponentPropsWithoutRef<'div'> & {
12
+ /** Columns to span, 1–12 or "full", or per breakpoint: { base: 'full', md: 6 }. */
13
+ colSpan?: ResponsiveValue<Span>;
14
+ as?: ElementType;
15
+ };
16
+ /** 12-column layout grid. For equal tiles, SimpleGrid is simpler. */
17
+ export declare const Grid: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
18
+ /** Column count, 1–12, or per breakpoint: { base: 1, md: 12 }. */
19
+ columns?: ResponsiveValue<Columns>;
20
+ gap?: GapValue;
21
+ as?: ElementType;
22
+ } & import("react").RefAttributes<HTMLDivElement>>;
23
+ export declare const GridItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
24
+ /** Columns to span, 1–12 or "full", or per breakpoint: { base: 'full', md: 6 }. */
25
+ colSpan?: ResponsiveValue<Span>;
26
+ as?: ElementType;
27
+ } & import("react").RefAttributes<HTMLDivElement>>;
28
+ export {};
29
+ //# sourceMappingURL=Grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../src/components/Grid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,EAA+C,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEzH,KAAK,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAChE,KAAK,IAAI,GAAG,OAAO,GAAG,MAAM,CAAC;AAE7B,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACxD,kEAAkE;IAClE,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACnC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAC5D,mFAAmF;IACnF,OAAO,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC;IAChC,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB,CAAC;AAwBF,qEAAqE;AACrE,eAAO,MAAM,IAAI;IAnCf,kEAAkE;cACxD,eAAe,CAAC,OAAO,CAAC;UAC5B,QAAQ;SACT,WAAW;kDA+CjB,CAAC;AAIF,eAAO,MAAM,QAAQ;IA/CnB,mFAAmF;cACzE,eAAe,CAAC,IAAI,CAAC;SAC1B,WAAW;kDAwDjB,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { css } from "@becket-ui/tokens/css";
4
+ import { normalizeGapValue, normalizeResponsiveValue } from "../helpers/responsive.js";
5
+ function mergeClassName(...classes) {
6
+ return classes.filter(Boolean).join(" ");
7
+ }
8
+ function mapResponsive(value, fn) {
9
+ const resolved = normalizeResponsiveValue(value);
10
+ if (resolved == null) return void 0;
11
+ if (Array.isArray(resolved)) return resolved.map((item) => item == null ? void 0 : fn(item));
12
+ if (typeof resolved === "object") {
13
+ return Object.fromEntries(
14
+ Object.entries(resolved).map(([breakpoint, item]) => [breakpoint, fn(item)])
15
+ );
16
+ }
17
+ return fn(resolved);
18
+ }
19
+ const toTemplate = (count) => `repeat(${count}, minmax(0, 1fr))`;
20
+ const toSpan = (span) => span === "full" ? "1 / -1" : `span ${span} / span ${span}`;
21
+ const Grid = forwardRef(
22
+ ({ columns = 12, gap = "md", as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
23
+ Component,
24
+ {
25
+ ref,
26
+ ...props,
27
+ className: mergeClassName(
28
+ css({
29
+ display: "grid",
30
+ gridTemplateColumns: mapResponsive(columns, toTemplate),
31
+ gap: normalizeGapValue(gap)
32
+ }),
33
+ className
34
+ )
35
+ }
36
+ )
37
+ );
38
+ Grid.displayName = "Grid";
39
+ const GridItem = forwardRef(
40
+ ({ colSpan, as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(
41
+ Component,
42
+ {
43
+ ref,
44
+ ...props,
45
+ className: mergeClassName(
46
+ css({ minWidth: "0", ...colSpan != null && { gridColumn: mapResponsive(colSpan, toSpan) } }),
47
+ className
48
+ )
49
+ }
50
+ )
51
+ );
52
+ GridItem.displayName = "GridItem";
53
+ export {
54
+ Grid,
55
+ GridItem
56
+ };
57
+ //# sourceMappingURL=Grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Grid.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType } from 'react';\nimport { css } from '@becket-ui/tokens/css';\n\nimport { normalizeGapValue, normalizeResponsiveValue, type GapValue, type ResponsiveValue } from '../helpers/responsive';\n\ntype Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\ntype Span = Columns | 'full';\n\nexport type GridProps = ComponentPropsWithoutRef<'div'> & {\n /** Column count, 1–12, or per breakpoint: { base: 1, md: 12 }. */\n columns?: ResponsiveValue<Columns>;\n gap?: GapValue;\n as?: ElementType;\n};\n\nexport type GridItemProps = ComponentPropsWithoutRef<'div'> & {\n /** Columns to span, 1–12 or \"full\", or per breakpoint: { base: 'full', md: 6 }. */\n colSpan?: ResponsiveValue<Span>;\n as?: ElementType;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n// Map a value or a breakpoint object through fn. The prebuilt CSS ships every\n// 1–12 count and span at every breakpoint (panda.config staticCss), so these\n// classes exist in apps that don't run Panda.\nfunction mapResponsive<T, R>(value: ResponsiveValue<T> | undefined, fn: (item: T) => R) {\n const resolved = normalizeResponsiveValue(value as never) as unknown;\n if (resolved == null) return undefined;\n if (Array.isArray(resolved)) return resolved.map((item) => (item == null ? undefined : fn(item as T)));\n if (typeof resolved === 'object') {\n return Object.fromEntries(\n Object.entries(resolved as Record<string, T>).map(([breakpoint, item]) => [breakpoint, fn(item)]),\n );\n }\n return fn(resolved as T);\n}\n\nconst toTemplate = (count: Columns) => `repeat(${count}, minmax(0, 1fr))`;\nconst toSpan = (span: Span) => (span === 'full' ? '1 / -1' : `span ${span} / span ${span}`);\n\n/** 12-column layout grid. For equal tiles, SimpleGrid is simpler. */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n ({ columns = 12, gap = 'md', as: Component = 'div', className, ...props }, ref) => (\n <Component\n ref={ref}\n {...props}\n className={mergeClassName(\n css({\n display: 'grid',\n gridTemplateColumns: mapResponsive(columns, toTemplate) as never,\n gap: normalizeGapValue(gap) as never,\n }),\n className,\n )}\n />\n ),\n);\n\nGrid.displayName = 'Grid';\n\nexport const GridItem = forwardRef<HTMLDivElement, GridItemProps>(\n ({ colSpan, as: Component = 'div', className, ...props }, ref) => (\n <Component\n ref={ref}\n {...props}\n className={mergeClassName(\n css({ minWidth: '0', ...(colSpan != null && { gridColumn: mapResponsive(colSpan, toSpan) as never }) }),\n className,\n )}\n />\n ),\n);\n\nGridItem.displayName = 'GridItem';\n"],"mappings":"AA8CI;AA9CJ,SAAS,kBAAmE;AAC5E,SAAS,WAAW;AAEpB,SAAS,mBAAmB,gCAAqE;AAkBjG,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAKA,SAAS,cAAoB,OAAuC,IAAoB;AACtF,QAAM,WAAW,yBAAyB,KAAc;AACxD,MAAI,YAAY,KAAM,QAAO;AAC7B,MAAI,MAAM,QAAQ,QAAQ,EAAG,QAAO,SAAS,IAAI,CAAC,SAAU,QAAQ,OAAO,SAAY,GAAG,IAAS,CAAE;AACrG,MAAI,OAAO,aAAa,UAAU;AAChC,WAAO,OAAO;AAAA,MACZ,OAAO,QAAQ,QAA6B,EAAE,IAAI,CAAC,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;AAAA,IAClG;AAAA,EACF;AACA,SAAO,GAAG,QAAa;AACzB;AAEA,MAAM,aAAa,CAAC,UAAmB,UAAU,KAAK;AACtD,MAAM,SAAS,CAAC,SAAgB,SAAS,SAAS,WAAW,QAAQ,IAAI,WAAW,IAAI;AAGjF,MAAM,OAAO;AAAA,EAClB,CAAC,EAAE,UAAU,IAAI,MAAM,MAAM,IAAI,YAAY,OAAO,WAAW,GAAG,MAAM,GAAG,QACzE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACC,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,IAAI;AAAA,UACF,SAAS;AAAA,UACT,qBAAqB,cAAc,SAAS,UAAU;AAAA,UACtD,KAAK,kBAAkB,GAAG;AAAA,QAC5B,CAAC;AAAA,QACD;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,KAAK,cAAc;AAEZ,MAAM,WAAW;AAAA,EACtB,CAAC,EAAE,SAAS,IAAI,YAAY,OAAO,WAAW,GAAG,MAAM,GAAG,QACxD;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACC,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,IAAI,EAAE,UAAU,KAAK,GAAI,WAAW,QAAQ,EAAE,YAAY,cAAc,SAAS,MAAM,EAAW,EAAG,CAAC;AAAA,QACtG;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,SAAS,cAAc;","names":[]}
@@ -3,7 +3,7 @@
3
3
  * Uses CSS media queries — no JS flash; single DOM for UI tests.
4
4
  */
5
5
  import { type ComponentPropsWithoutRef, type ElementType } from 'react';
6
- import { type BreakpointAlias } from '../helpers/responsive';
6
+ import { type BreakpointAlias } from '../helpers/responsive.js';
7
7
  export type HideProps = ComponentPropsWithoutRef<'div'> & {
8
8
  /** Hide when viewport is **below** this breakpoint (show from breakpoint up). */
9
9
  below?: BreakpointAlias;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { hide } from "@becket-ui/tokens/recipes";
4
- import { resolveBreakpointAlias } from "../helpers/responsive";
4
+ import { resolveBreakpointAlias } from "../helpers/responsive.js";
5
5
  function mergeClassName(...classes) {
6
6
  return classes.filter(Boolean).join(" ");
7
7
  }
@@ -0,0 +1,18 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ type ImageFit = 'cover' | 'contain';
3
+ type ImageRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
+ export type ImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'alt'> & {
5
+ /** Required. Describe the image, or pass "" when it's purely decorative. */
6
+ alt: string;
7
+ fit?: ImageFit;
8
+ radius?: ImageRadius;
9
+ };
10
+ /** Native <img>: lazy-loaded and async-decoded by default, no JS. */
11
+ export declare const Image: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref">, "alt"> & {
12
+ /** Required. Describe the image, or pass "" when it's purely decorative. */
13
+ alt: string;
14
+ fit?: ImageFit;
15
+ radius?: ImageRadius;
16
+ } & import("react").RefAttributes<HTMLImageElement>>;
17
+ export {};
18
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../src/components/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGlE,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AACpC,KAAK,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/D,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG;IACtE,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAMF,qEAAqE;AACrE,eAAO,MAAM,KAAK;IAXhB,4EAA4E;SACvE,MAAM;UACL,QAAQ;aACL,WAAW;oDAkBrB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { image as imageRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const Image = forwardRef(
8
+ ({ fit = "cover", radius = "none", loading = "lazy", decoding = "async", className, ...props }, ref) => /* @__PURE__ */ jsx(
9
+ "img",
10
+ {
11
+ ref,
12
+ loading,
13
+ decoding,
14
+ ...props,
15
+ className: mergeClassName(imageRecipe({ fit, radius }), className)
16
+ }
17
+ )
18
+ );
19
+ Image.displayName = "Image";
20
+ export {
21
+ Image
22
+ };
23
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Image.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { image as imageRecipe } from '@becket-ui/tokens/recipes';\n\ntype ImageFit = 'cover' | 'contain';\ntype ImageRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nexport type ImageProps = Omit<ComponentPropsWithoutRef<'img'>, 'alt'> & {\n /** Required. Describe the image, or pass \"\" when it's purely decorative. */\n alt: string;\n fit?: ImageFit;\n radius?: ImageRadius;\n};\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/** Native <img>: lazy-loaded and async-decoded by default, no JS. */\nexport const Image = forwardRef<HTMLImageElement, ImageProps>(\n ({ fit = 'cover', radius = 'none', loading = 'lazy', decoding = 'async', className, ...props }, ref) => (\n <img\n ref={ref}\n loading={loading}\n decoding={decoding}\n {...props}\n className={mergeClassName(imageRecipe({ fit, radius }), className)}\n />\n ),\n);\n\nImage.displayName = 'Image';\n"],"mappings":"AAoBI;AApBJ,SAAS,kBAAiD;AAC1D,SAAS,SAAS,mBAAmB;AAYrC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAGO,MAAM,QAAQ;AAAA,EACnB,CAAC,EAAE,MAAM,SAAS,SAAS,QAAQ,UAAU,QAAQ,WAAW,SAAS,WAAW,GAAG,MAAM,GAAG,QAC9F;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACC,GAAG;AAAA,MACJ,WAAW,eAAe,YAAY,EAAE,KAAK,OAAO,CAAC,GAAG,SAAS;AAAA;AAAA,EACnE;AAEJ;AAEA,MAAM,cAAc;","names":[]}
@@ -0,0 +1,5 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ export type KbdProps = ComponentPropsWithoutRef<'kbd'>;
3
+ /** A keyboard key or shortcut, e.g. <Kbd>⌘</Kbd> <Kbd>K</Kbd>. */
4
+ export declare const Kbd: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
5
+ //# sourceMappingURL=Kbd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.d.ts","sourceRoot":"","sources":["../../src/components/Kbd.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGlE,MAAM,MAAM,QAAQ,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAMvD,kEAAkE;AAClE,eAAO,MAAM,GAAG,kMAEd,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { kbd as kbdRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const Kbd = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("kbd", { ref, ...props, className: mergeClassName(kbdRecipe(), className) }));
8
+ Kbd.displayName = "Kbd";
9
+ export {
10
+ Kbd
11
+ };
12
+ //# sourceMappingURL=Kbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Kbd.tsx"],"sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { kbd as kbdRecipe } from '@becket-ui/tokens/recipes';\n\nexport type KbdProps = ComponentPropsWithoutRef<'kbd'>;\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n/** A keyboard key or shortcut, e.g. <Kbd>⌘</Kbd> <Kbd>K</Kbd>. */\nexport const Kbd = forwardRef<HTMLElement, KbdProps>(({ className, ...props }, ref) => (\n <kbd ref={ref} {...props} className={mergeClassName(kbdRecipe(), className)} />\n));\n\nKbd.displayName = 'Kbd';\n"],"mappings":"AAWE;AAXF,SAAS,kBAAiD;AAC1D,SAAS,OAAO,iBAAiB;AAIjC,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAGO,MAAM,MAAM,WAAkC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC7E,oBAAC,SAAI,KAAW,GAAG,OAAO,WAAW,eAAe,UAAU,GAAG,SAAS,GAAG,CAC9E;AAED,IAAI,cAAc;","names":[]}
@@ -0,0 +1,19 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ type ListSpacing = 'xs' | 'sm' | 'md';
3
+ type ListMarker = 'disc' | 'decimal' | 'none';
4
+ export type ListProps = ComponentPropsWithoutRef<'ul'> & {
5
+ /** `ol` for ordered steps; defaults the marker to decimal. */
6
+ as?: 'ul' | 'ol';
7
+ spacing?: ListSpacing;
8
+ marker?: ListMarker;
9
+ };
10
+ export declare const List: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & {
11
+ /** `ol` for ordered steps; defaults the marker to decimal. */
12
+ as?: 'ul' | 'ol';
13
+ spacing?: ListSpacing;
14
+ marker?: ListMarker;
15
+ } & import("react").RefAttributes<HTMLUListElement & HTMLOListElement>>;
16
+ export type ListItemProps = ComponentPropsWithoutRef<'li'>;
17
+ export declare const ListItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
18
+ export {};
19
+ //# sourceMappingURL=List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/components/List.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGlE,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG;IACvD,8DAA8D;IAC9D,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAMF,eAAO,MAAM,IAAI;IAVf,8DAA8D;SACzD,IAAI,GAAG,IAAI;cACN,WAAW;aACZ,UAAU;uEAkBpB,CAAC;AAIF,MAAM,MAAM,aAAa,GAAG,wBAAwB,CAAC,IAAI,CAAC,CAAC;AAE3D,eAAO,MAAM,QAAQ,0MAAwF,CAAC"}