@becket-ui/react 0.2.0 → 0.3.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 (38) hide show
  1. package/dist/components/Badge.d.ts +1 -1
  2. package/dist/components/Badge.js +1 -1
  3. package/dist/components/Dialog.js +1 -1
  4. package/dist/components/Drawer.js +1 -1
  5. package/dist/components/Flex.d.ts +2 -2
  6. package/dist/components/Flex.js +2 -2
  7. package/dist/components/Glyphs.d.ts +1 -1
  8. package/dist/components/Glyphs.js +1 -1
  9. package/dist/components/Hide.d.ts +1 -1
  10. package/dist/components/Hide.js +1 -1
  11. package/dist/components/Prose.d.ts +20 -0
  12. package/dist/components/Prose.d.ts.map +1 -0
  13. package/dist/components/Prose.js +14 -0
  14. package/dist/components/Prose.js.map +1 -0
  15. package/dist/components/Radio.js +1 -1
  16. package/dist/components/Select.d.ts +1 -1
  17. package/dist/components/Select.js +1 -1
  18. package/dist/components/SimpleGrid.d.ts +1 -1
  19. package/dist/components/SimpleGrid.js +1 -1
  20. package/dist/components/Stack.d.ts +2 -2
  21. package/dist/components/Stack.js +2 -2
  22. package/dist/components/Tag.d.ts +1 -1
  23. package/dist/components/Tag.js +1 -1
  24. package/dist/components/TextField.d.ts +1 -1
  25. package/dist/components/TextField.js +1 -1
  26. package/dist/components/Textarea.d.ts +1 -1
  27. package/dist/components/Textarea.js +1 -1
  28. package/dist/helpers/responsive.d.ts +1 -1
  29. package/dist/helpers/responsive.js.map +1 -1
  30. package/dist/helpers/storybookControls.d.ts +1 -1
  31. package/dist/helpers/storybookControls.js +1 -1
  32. package/dist/helpers/storybookControls.js.map +1 -1
  33. package/dist/index.d.ts +44 -42
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +33 -31
  36. package/dist/index.js.map +1 -1
  37. package/guides/building-with-becket.md +1 -0
  38. package/package.json +4 -4
@@ -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
  }
@@ -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);
@@ -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",
@@ -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,20 @@
1
+ import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
+ type ProseSize = 'sm' | 'md' | 'lg';
3
+ export type ProseProps = ComponentPropsWithoutRef<'div'> & {
4
+ /** Base text size; headings, spacing and code scale with it. */
5
+ size?: ProseSize;
6
+ /** Usually `article` for a blog post. */
7
+ as?: ElementType;
8
+ };
9
+ /**
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.
12
+ */
13
+ export declare const Prose: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
+ /** Base text size; headings, spacing and code scale with it. */
15
+ size?: ProseSize;
16
+ /** Usually `article` for a blog post. */
17
+ as?: ElementType;
18
+ } & import("react").RefAttributes<HTMLDivElement>>;
19
+ export {};
20
+ //# sourceMappingURL=Prose.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { prose as proseRecipe } from "@becket-ui/tokens/recipes";
4
+ function mergeClassName(...classes) {
5
+ return classes.filter(Boolean).join(" ");
6
+ }
7
+ const Prose = forwardRef(
8
+ ({ size = "md", as: Component = "div", className, ...props }, ref) => /* @__PURE__ */ jsx(Component, { ref, ...props, className: mergeClassName(proseRecipe({ size }), className) })
9
+ );
10
+ Prose.displayName = "Prose";
11
+ export {
12
+ Prose
13
+ };
14
+ //# sourceMappingURL=Prose.js.map
@@ -0,0 +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":[]}
@@ -8,7 +8,7 @@ import {
8
8
  useMemo
9
9
  } from "react";
10
10
  import { radio as radioRecipe } from "@becket-ui/tokens/recipes";
11
- import { useOptionalField } from "./Field";
11
+ import { useOptionalField } from "./Field.js";
12
12
  const RadioGroupContext = createContext(null);
13
13
  function mergeClassName(...classes) {
14
14
  return classes.filter(Boolean).join(" ");
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode, type SelectHTMLAttributes } from 'react';
2
- import { type FieldSize } from './Field';
2
+ import { type FieldSize } from './Field.js';
3
3
  export type SelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> & {
4
4
  label?: ReactNode;
5
5
  helperText?: ReactNode;
@@ -7,7 +7,7 @@ import {
7
7
  FieldHelper,
8
8
  FieldLabel,
9
9
  FieldSelect
10
- } from "./Field";
10
+ } from "./Field.js";
11
11
  const Select = forwardRef(
12
12
  ({
13
13
  label,
@@ -1,6 +1,6 @@
1
1
  import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
2
  import { grid } from '@becket-ui/tokens/patterns';
3
- import { type GapValue, type ResponsiveValue } from '../helpers/responsive';
3
+ import { type GapValue, type ResponsiveValue } from '../helpers/responsive.js';
4
4
  type GridOptions = NonNullable<Parameters<typeof grid>[0]>;
5
5
  export type SimpleGridProps = ComponentPropsWithoutRef<'div'> & {
6
6
  columns?: ResponsiveValue<number> | GridOptions['columns'];
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { css } from "@becket-ui/tokens/css";
4
4
  import { grid } from "@becket-ui/tokens/patterns";
5
- import { normalizeGapValue, normalizeResponsiveValue } from "../helpers/responsive";
5
+ import { normalizeGapValue, normalizeResponsiveValue } from "../helpers/responsive.js";
6
6
  function mergeClassName(...classes) {
7
7
  return classes.filter(Boolean).join(" ");
8
8
  }
@@ -1,7 +1,7 @@
1
1
  import { type ComponentPropsWithoutRef, type ElementType } from 'react';
2
2
  import { stack } 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 StackOptions = NonNullable<Parameters<typeof stack>[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 { stack } 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,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 TagSize = 'sm' | 'md' | 'lg';
4
4
  type TagBorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
5
5
  export type TagProps = ComponentPropsWithoutRef<'span'> & {
@@ -3,7 +3,7 @@ import { forwardRef } from "react";
3
3
  import { tag } 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
  }
@@ -1,5 +1,5 @@
1
1
  import { type InputHTMLAttributes, type ReactNode } from 'react';
2
- import { type FieldSize } from './Field';
2
+ import { type FieldSize } from './Field.js';
3
3
  export type TextFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> & {
4
4
  label?: ReactNode;
5
5
  helperText?: ReactNode;
@@ -7,7 +7,7 @@ import {
7
7
  FieldError,
8
8
  FieldHelper,
9
9
  FieldLabel
10
- } from "./Field";
10
+ } from "./Field.js";
11
11
  const TextField = forwardRef(
12
12
  ({
13
13
  label,
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode, type TextareaHTMLAttributes } from 'react';
2
- import { type FieldSize } from './Field';
2
+ import { type FieldSize } from './Field.js';
3
3
  export type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> & {
4
4
  label?: ReactNode;
5
5
  helperText?: ReactNode;
@@ -7,7 +7,7 @@ import {
7
7
  FieldHelper,
8
8
  FieldLabel,
9
9
  FieldTextarea
10
- } from "./Field";
10
+ } from "./Field.js";
11
11
  const Textarea = forwardRef(
12
12
  ({
13
13
  label,
@@ -35,7 +35,7 @@ export declare const SEMANTIC_TO_BREAKPOINT: {
35
35
  export declare const SPACING_SCALE: readonly [0, 1, 2, 3, 5, 8, 13, 21, 34];
36
36
  export type SpacingStep = (typeof SPACING_SCALE)[number];
37
37
  /** Semantic aliases preferred in apps. */
38
- export type SpacingSemantic = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xs';
38
+ export type SpacingSemantic = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
39
39
  /**
40
40
  * Values that show up in IDE autocomplete for `gap` / spacing props.
41
41
  * Numeric literals + string keys + semantic tokens.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/helpers/responsive.ts"],"sourcesContent":["import type { ConditionalValue } from '@becket-ui/tokens/types';\n\n/**\n * Responsive props — Chakra-aligned, mobile-first (min-width).\n *\n * Prefer **object syntax** with a `base`/`mobile` value (Chakra docs + community\n * best practice). Arrays are supported for parity but are harder to read.\n *\n * @see https://chakra-ui.com/docs/styling/responsive-design\n */\n\n/** Token breakpoints (Panda / Chakra keys). */\nexport type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n/**\n * Semantic aliases for layout in consuming apps.\n * Map onto token breakpoints — do not invent separate media queries.\n */\nexport type SemanticBreakpoint = 'mobile' | 'tablet' | 'desktop' | 'largeDesktop';\n\nexport type BreakpointAlias = Breakpoint | SemanticBreakpoint;\n\n/** Breakpoint-only keys for responsive object props (token + semantic). */\nexport type BreakpointMap<T> = Partial<Record<BreakpointAlias, T>>;\n\n/**\n * Chakra-style responsive value: single value, per-breakpoint object, or array\n * (index 0 = base, 1 = sm, 2 = md, …).\n */\nexport type ResponsiveValue<T> = ConditionalValue<T> | BreakpointMap<T>;\n\nexport const BREAKPOINTS = ['base', 'sm', 'md', 'lg', 'xl', '2xl'] as const satisfies readonly Breakpoint[];\n\nexport const SEMANTIC_BREAKPOINTS = [\n 'mobile',\n 'tablet',\n 'desktop',\n 'largeDesktop',\n] as const satisfies readonly SemanticBreakpoint[];\n\n/** Semantic → token breakpoint (Chakra mobile-first scale). */\nexport const SEMANTIC_TO_BREAKPOINT = {\n mobile: 'base',\n tablet: 'md',\n desktop: 'lg',\n largeDesktop: 'xl',\n} as const satisfies Record<SemanticBreakpoint, Breakpoint>;\n\n/** Becket-authored spacing steps (Fibonacci + zero). */\nexport const SPACING_SCALE = [0, 1, 2, 3, 5, 8, 13, 21, 34] as const;\n\nexport type SpacingStep = (typeof SPACING_SCALE)[number];\n\n/** Semantic aliases preferred in apps. */\nexport type SpacingSemantic = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xs';\n\n/**\n * Values that show up in IDE autocomplete for `gap` / spacing props.\n * Numeric literals + string keys + semantic tokens.\n * `(string & {})` / `(number & {})` keep IntelliSense while allowing escapes.\n */\nexport type SpacingScale =\n | SpacingSemantic\n | SpacingStep\n | `${SpacingStep}`\n | (string & {})\n | (number & {});\n\n/** Gap prop: single value or responsive ConditionalValue. */\nexport type GapValue = ResponsiveValue<SpacingScale>;\n\nexport function isSemanticBreakpoint(key: string): key is SemanticBreakpoint {\n return (SEMANTIC_BREAKPOINTS as readonly string[]).includes(key);\n}\n\nexport function isTokenBreakpoint(key: string): key is Breakpoint {\n return (BREAKPOINTS as readonly string[]).includes(key);\n}\n\n/** Resolve `desktop` → `lg`, leave `md` unchanged. */\nexport function resolveBreakpointAlias(key: string): string {\n if (isSemanticBreakpoint(key)) return SEMANTIC_TO_BREAKPOINT[key];\n return key;\n}\n\n/**\n * Expand semantic keys in a responsive object to token breakpoints.\n * Token keys already present win (not overwritten by semantic aliases).\n * Non-objects / arrays pass through.\n */\nexport function normalizeResponsiveValue<T>(value: T): T {\n if (value == null || typeof value !== 'object' || Array.isArray(value)) {\n return value;\n }\n const input = value as Record<string, unknown>;\n const out: Record<string, unknown> = {};\n\n // Pass 1: token keys\n for (const [key, entry] of Object.entries(input)) {\n if (isTokenBreakpoint(key) || key === 'base') {\n out[key] = normalizeResponsiveValue(entry);\n }\n }\n // Pass 2: semantic → token if token slot empty\n for (const [key, entry] of Object.entries(input)) {\n if (!isSemanticBreakpoint(key)) {\n if (!isTokenBreakpoint(key) && key !== 'base') {\n // Unknown keys (e.g. _hover) — keep as-is for Panda\n out[key] = normalizeResponsiveValue(entry);\n }\n continue;\n }\n const token = SEMANTIC_TO_BREAKPOINT[key];\n if (out[token] === undefined) {\n out[token] = normalizeResponsiveValue(entry);\n }\n }\n return out as T;\n}\n\n/**\n * Coerce gap values so `gap={3}` and `gap=\"3\"` both resolve to token key `\"3\"`.\n * Walks responsive objects/arrays. Leaves semantic tokens unchanged.\n * Expands semantic breakpoint keys (`mobile` → `base`, etc.).\n */\nexport function normalizeGapValue<T>(gap: T): T {\n if (typeof gap === 'number' && Number.isFinite(gap)) {\n return String(gap) as T;\n }\n if (Array.isArray(gap)) {\n return gap.map((item) => normalizeGapValue(item)) as T;\n }\n if (gap && typeof gap === 'object') {\n const withBreakpoints = normalizeResponsiveValue(gap) as Record<string, unknown>;\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(withBreakpoints)) {\n out[key] = normalizeGapValue(value);\n }\n return out as T;\n }\n return gap;\n}\n"],"mappings":"AA+BO,MAAM,cAAc,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM,KAAK;AAE1D,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,yBAAyB;AAAA,EACpC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,cAAc;AAChB;AAGO,MAAM,gBAAgB,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,IAAI,EAAE;AAsBnD,SAAS,qBAAqB,KAAwC;AAC3E,SAAQ,qBAA2C,SAAS,GAAG;AACjE;AAEO,SAAS,kBAAkB,KAAgC;AAChE,SAAQ,YAAkC,SAAS,GAAG;AACxD;AAGO,SAAS,uBAAuB,KAAqB;AAC1D,MAAI,qBAAqB,GAAG,EAAG,QAAO,uBAAuB,GAAG;AAChE,SAAO;AACT;AAOO,SAAS,yBAA4B,OAAa;AACvD,MAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAAG;AACtE,WAAO;AAAA,EACT;AACA,QAAM,QAAQ;AACd,QAAM,MAA+B,CAAC;AAGtC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,kBAAkB,GAAG,KAAK,QAAQ,QAAQ;AAC5C,UAAI,GAAG,IAAI,yBAAyB,KAAK;AAAA,IAC3C;AAAA,EACF;AAEA,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AAChD,QAAI,CAAC,qBAAqB,GAAG,GAAG;AAC9B,UAAI,CAAC,kBAAkB,GAAG,KAAK,QAAQ,QAAQ;AAE7C,YAAI,GAAG,IAAI,yBAAyB,KAAK;AAAA,MAC3C;AACA;AAAA,IACF;AACA,UAAM,QAAQ,uBAAuB,GAAG;AACxC,QAAI,IAAI,KAAK,MAAM,QAAW;AAC5B,UAAI,KAAK,IAAI,yBAAyB,KAAK;AAAA,IAC7C;AAAA,EACF;AACA,SAAO;AACT;AAOO,SAAS,kBAAqB,KAAW;AAC9C,MAAI,OAAO,QAAQ,YAAY,OAAO,SAAS,GAAG,GAAG;AACnD,WAAO,OAAO,GAAG;AAAA,EACnB;AACA,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,IAAI,CAAC,SAAS,kBAAkB,IAAI,CAAC;AAAA,EAClD;AACA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAClC,UAAM,kBAAkB,yBAAyB,GAAG;AACpD,UAAM,MAA+B,CAAC;AACtC,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,eAAe,GAAG;AAC1D,UAAI,GAAG,IAAI,kBAAkB,KAAK;AAAA,IACpC;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/helpers/responsive.ts"],"sourcesContent":["import type { ConditionalValue } from '@becket-ui/tokens/types';\n\n/**\n * Responsive props — Chakra-aligned, mobile-first (min-width).\n *\n * Prefer **object syntax** with a `base`/`mobile` value (Chakra docs + community\n * best practice). Arrays are supported for parity but are harder to read.\n *\n * @see https://chakra-ui.com/docs/styling/responsive-design\n */\n\n/** Token breakpoints (Panda / Chakra keys). */\nexport type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n/**\n * Semantic aliases for layout in consuming apps.\n * Map onto token breakpoints — do not invent separate media queries.\n */\nexport type SemanticBreakpoint = 'mobile' | 'tablet' | 'desktop' | 'largeDesktop';\n\nexport type BreakpointAlias = Breakpoint | SemanticBreakpoint;\n\n/** Breakpoint-only keys for responsive object props (token + semantic). */\nexport type BreakpointMap<T> = Partial<Record<BreakpointAlias, T>>;\n\n/**\n * Chakra-style responsive value: single value, per-breakpoint object, or array\n * (index 0 = base, 1 = sm, 2 = md, …).\n */\nexport type ResponsiveValue<T> = ConditionalValue<T> | BreakpointMap<T>;\n\nexport const BREAKPOINTS = ['base', 'sm', 'md', 'lg', 'xl', '2xl'] as const satisfies readonly Breakpoint[];\n\nexport const SEMANTIC_BREAKPOINTS = [\n 'mobile',\n 'tablet',\n 'desktop',\n 'largeDesktop',\n] as const satisfies readonly SemanticBreakpoint[];\n\n/** Semantic → token breakpoint (Chakra mobile-first scale). */\nexport const SEMANTIC_TO_BREAKPOINT = {\n mobile: 'base',\n tablet: 'md',\n desktop: 'lg',\n largeDesktop: 'xl',\n} as const satisfies Record<SemanticBreakpoint, Breakpoint>;\n\n/** Becket-authored spacing steps (Fibonacci + zero). */\nexport const SPACING_SCALE = [0, 1, 2, 3, 5, 8, 13, 21, 34] as const;\n\nexport type SpacingStep = (typeof SPACING_SCALE)[number];\n\n/** Semantic aliases preferred in apps. */\nexport type SpacingSemantic = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\n/**\n * Values that show up in IDE autocomplete for `gap` / spacing props.\n * Numeric literals + string keys + semantic tokens.\n * `(string & {})` / `(number & {})` keep IntelliSense while allowing escapes.\n */\nexport type SpacingScale =\n | SpacingSemantic\n | SpacingStep\n | `${SpacingStep}`\n | (string & {})\n | (number & {});\n\n/** Gap prop: single value or responsive ConditionalValue. */\nexport type GapValue = ResponsiveValue<SpacingScale>;\n\nexport function isSemanticBreakpoint(key: string): key is SemanticBreakpoint {\n return (SEMANTIC_BREAKPOINTS as readonly string[]).includes(key);\n}\n\nexport function isTokenBreakpoint(key: string): key is Breakpoint {\n return (BREAKPOINTS as readonly string[]).includes(key);\n}\n\n/** Resolve `desktop` → `lg`, leave `md` unchanged. */\nexport function resolveBreakpointAlias(key: string): string {\n if (isSemanticBreakpoint(key)) return SEMANTIC_TO_BREAKPOINT[key];\n return key;\n}\n\n/**\n * Expand semantic keys in a responsive object to token breakpoints.\n * Token keys already present win (not overwritten by semantic aliases).\n * Non-objects / arrays pass through.\n */\nexport function normalizeResponsiveValue<T>(value: T): T {\n if (value == null || typeof value !== 'object' || Array.isArray(value)) {\n return value;\n }\n const input = value as Record<string, unknown>;\n const out: Record<string, unknown> = {};\n\n // Pass 1: token keys\n for (const [key, entry] of Object.entries(input)) {\n if (isTokenBreakpoint(key) || key === 'base') {\n out[key] = normalizeResponsiveValue(entry);\n }\n }\n // Pass 2: semantic → token if token slot empty\n for (const [key, entry] of Object.entries(input)) {\n if (!isSemanticBreakpoint(key)) {\n if (!isTokenBreakpoint(key) && key !== 'base') {\n // Unknown keys (e.g. _hover) — keep as-is for Panda\n out[key] = normalizeResponsiveValue(entry);\n }\n continue;\n }\n const token = SEMANTIC_TO_BREAKPOINT[key];\n if (out[token] === undefined) {\n out[token] = normalizeResponsiveValue(entry);\n }\n }\n return out as T;\n}\n\n/**\n * Coerce gap values so `gap={3}` and `gap=\"3\"` both resolve to token key `\"3\"`.\n * Walks responsive objects/arrays. Leaves semantic tokens unchanged.\n * Expands semantic breakpoint keys (`mobile` → `base`, etc.).\n */\nexport function normalizeGapValue<T>(gap: T): T {\n if (typeof gap === 'number' && Number.isFinite(gap)) {\n return String(gap) as T;\n }\n if (Array.isArray(gap)) {\n return gap.map((item) => normalizeGapValue(item)) as T;\n }\n if (gap && typeof gap === 'object') {\n const withBreakpoints = normalizeResponsiveValue(gap) as Record<string, unknown>;\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(withBreakpoints)) {\n out[key] = normalizeGapValue(value);\n }\n return out as T;\n }\n return gap;\n}\n"],"mappings":"AA+BO,MAAM,cAAc,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM,KAAK;AAE1D,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,MAAM,yBAAyB;AAAA,EACpC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,cAAc;AACh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C;AAAA,EAClD;AACA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAClC,UAAM,kBAAkB,yBAAyB,GAAG;AACpD,UAAM,MAA+B,CAAC;AACtC,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,eAAe,GAAG;AAC1D,UAAI,GAAG,IAAI,kBAAkB,KAAK;AAAA,IACpC;AACA,WAAO;AAAA,EACT;AACA,SAAO;AACT;","names":[]}
@@ -1,5 +1,5 @@
1
1
  /** Shared Storybook knob values. ConditionalValue props infer as object controls — always override. */
2
- export declare const GAP_OPTIONS: readonly ['xs', 'sm', 'md', 'lg', 'xl', '2xs'];
2
+ export declare const GAP_OPTIONS: readonly ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
3
3
  export declare const FLEX_DIRECTION_OPTIONS: readonly ['row', 'column', 'row-reverse', 'column-reverse'];
4
4
  export declare const STACK_DIRECTION_OPTIONS: readonly ['row', 'column'];
5
5
  export declare const ALIGN_OPTIONS: readonly ['start', 'center', 'end', 'stretch', 'baseline'];
@@ -1,4 +1,4 @@
1
- const GAP_OPTIONS = ["xs", "sm", "md", "lg", "xl", "2xs"];
1
+ const GAP_OPTIONS = ["xs", "sm", "md", "lg", "xl", "2xl"];
2
2
  const FLEX_DIRECTION_OPTIONS = [
3
3
  "row",
4
4
  "column",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/helpers/storybookControls.ts"],"sourcesContent":["/** Shared Storybook knob values. ConditionalValue props infer as object controls — always override. */\n\nexport const GAP_OPTIONS = ['xs', 'sm', 'md', 'lg', 'xl', '2xs'] as const;\n\nexport const FLEX_DIRECTION_OPTIONS = [\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n] as const;\n\nexport const STACK_DIRECTION_OPTIONS = ['row', 'column'] as const;\n\nexport const ALIGN_OPTIONS = ['start', 'center', 'end', 'stretch', 'baseline'] as const;\n\nexport const JUSTIFY_OPTIONS = ['start', 'center', 'end', 'between', 'around', 'evenly'] as const;\n\nexport const FLEX_WRAP_OPTIONS = ['wrap', 'nowrap', 'wrap-reverse'] as const;\n\nexport const FLEX_BASIS_OPTIONS = ['auto', '0', 'full', '8', '13', '21', '34', '1/2', '1/3'] as const;\n\nexport const GRADIENT_BORDER_OPTIONS = ['primary', 'secondary', 'neutral'] as const;\n\nexport const BREAKPOINT_OPTIONS = [\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n 'mobile',\n 'tablet',\n 'desktop',\n 'largeDesktop',\n] as const;\n\nexport function knobs(include: string[]) {\n return { controls: { include } };\n}\n"],"mappings":"AAEO,MAAM,cAAc,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK;AAExD,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,0BAA0B,CAAC,OAAO,QAAQ;AAEhD,MAAM,gBAAgB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU;AAEtE,MAAM,kBAAkB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU,QAAQ;AAEhF,MAAM,oBAAoB,CAAC,QAAQ,UAAU,cAAc;AAE3D,MAAM,qBAAqB,CAAC,QAAQ,KAAK,QAAQ,KAAK,MAAM,MAAM,MAAM,OAAO,KAAK;AAEpF,MAAM,0BAA0B,CAAC,WAAW,aAAa,SAAS;AAElE,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,MAAM,SAAmB;AACvC,SAAO,EAAE,UAAU,EAAE,QAAQ,EAAE;AACjC;","names":[]}
1
+ {"version":3,"sources":["../../src/helpers/storybookControls.ts"],"sourcesContent":["/** Shared Storybook knob values. ConditionalValue props infer as object controls — always override. */\n\nexport const GAP_OPTIONS = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'] as const;\n\nexport const FLEX_DIRECTION_OPTIONS = [\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n] as const;\n\nexport const STACK_DIRECTION_OPTIONS = ['row', 'column'] as const;\n\nexport const ALIGN_OPTIONS = ['start', 'center', 'end', 'stretch', 'baseline'] as const;\n\nexport const JUSTIFY_OPTIONS = ['start', 'center', 'end', 'between', 'around', 'evenly'] as const;\n\nexport const FLEX_WRAP_OPTIONS = ['wrap', 'nowrap', 'wrap-reverse'] as const;\n\nexport const FLEX_BASIS_OPTIONS = ['auto', '0', 'full', '8', '13', '21', '34', '1/2', '1/3'] as const;\n\nexport const GRADIENT_BORDER_OPTIONS = ['primary', 'secondary', 'neutral'] as const;\n\nexport const BREAKPOINT_OPTIONS = [\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n 'mobile',\n 'tablet',\n 'desktop',\n 'largeDesktop',\n] as const;\n\nexport function knobs(include: string[]) {\n return { controls: { include } };\n}\n"],"mappings":"AAEO,MAAM,cAAc,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK;AAExD,MAAM,yBAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,0BAA0B,CAAC,OAAO,QAAQ;AAEhD,MAAM,gBAAgB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU;AAEtE,MAAM,kBAAkB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU,QAAQ;AAEhF,MAAM,oBAAoB,CAAC,QAAQ,UAAU,cAAc;AAE3D,MAAM,qBAAqB,CAAC,QAAQ,KAAK,QAAQ,KAAK,MAAM,MAAM,MAAM,OAAO,KAAK;AAEpF,MAAM,0BAA0B,CAAC,WAAW,aAAa,SAAS;AAElE,MAAM,qBAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,MAAM,SAAmB;AACvC,SAAO,EAAE,UAAU,EAAE,QAAQ,EAAE;AACjC;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,43 +1,45 @@
1
- export { Button } from './components/Button';
2
- export { Heading } from './components/Heading';
3
- export { Text } from './components/Text';
4
- export { Flex } from './components/Flex';
5
- export { Stack, HStack, VStack } from './components/Stack';
6
- export { Tag } from './components/Tag';
7
- export { Badge } from './components/Badge';
8
- export { Switch } from './components/Switch';
9
- export type { SwitchProps } from './components/Switch';
10
- export { Field, FieldLabel, FieldHelper, FieldError, FieldControl, FieldSelect, FieldTextarea, useField, } from './components/Field';
11
- export type { FieldSize, FieldContextValue } from './components/Field';
12
- export { TextField } from './components/TextField';
13
- export { Checkbox } from './components/Checkbox';
14
- export { Radio, RadioGroup } from './components/Radio';
15
- export type { RadioProps, RadioGroupProps } from './components/Radio';
16
- export { Select } from './components/Select';
17
- export { Textarea } from './components/Textarea';
18
- export { Card, CardHeader, CardBody, CardFooter, CardTitle, CardDescription, } from './components/Card';
19
- export { SimpleGrid } from './components/SimpleGrid';
20
- export { Container } from './components/Container';
21
- export type { ContainerProps } from './components/Container';
22
- export { Box } from './components/Box';
23
- export type { BoxProps } from './components/Box';
24
- export { Hide } from './components/Hide';
25
- export type { HideProps } from './components/Hide';
26
- export { Tooltip } from './components/Tooltip';
27
- export type { TooltipPlacement, TooltipProps } from './components/Tooltip';
28
- export { Dialog, DialogHeader, DialogBody, DialogFooter, DialogTitle, DialogClose, } from './components/Dialog';
29
- export { Drawer, DrawerHeader, DrawerBody, DrawerFooter, DrawerTitle, DrawerClose, } from './components/Drawer';
30
- export { Menu, MenuItem } from './components/Menu';
31
- export { Tabs, TabList, Tab, TabPanel } from './components/Tabs';
32
- export { Table, TableCaption, TableHeader, TableBody, TableFooter, TableRow, TableColumnHeader, TableCell, Thead, Tbody, Tfoot, Tr, Th, Td, } from './components/Table';
33
- export { Spinner } from './components/Spinner';
34
- export { Icon } from './components/Icon';
35
- export type { IconProps } from './components/Icon';
36
- export { CheckIcon, ChevronDownIcon, ChevronRightIcon, CloseIcon, CopyIcon, ExternalLinkIcon, InfoIcon, LinkIcon, MenuIcon, MoonIcon, SearchIcon, SunIcon, WarningIcon, } from './components/Glyphs';
37
- export type { GlyphProps } from './components/Glyphs';
38
- export { Link } from './components/Link';
39
- export { Separator } from './components/Separator';
40
- export type { LabelCustomColors, LabelVisual } from './helpers/labelColors';
41
- export type { Breakpoint, BreakpointAlias, BreakpointMap, ResponsiveValue, GapValue, SpacingScale, SpacingStep, SpacingSemantic, SemanticBreakpoint, } from './helpers/responsive';
42
- export { BREAKPOINTS, SEMANTIC_BREAKPOINTS, SEMANTIC_TO_BREAKPOINT, SPACING_SCALE, normalizeResponsiveValue, normalizeGapValue, resolveBreakpointAlias, } from './helpers/responsive';
1
+ export { Button } from './components/Button.js';
2
+ export { Heading } from './components/Heading.js';
3
+ export { Text } from './components/Text.js';
4
+ export { Flex } from './components/Flex.js';
5
+ export { Stack, HStack, VStack } from './components/Stack.js';
6
+ export { Tag } from './components/Tag.js';
7
+ export { Badge } from './components/Badge.js';
8
+ export { Switch } from './components/Switch.js';
9
+ export type { SwitchProps } from './components/Switch.js';
10
+ export { Field, FieldLabel, FieldHelper, FieldError, FieldControl, FieldSelect, FieldTextarea, useField, } from './components/Field.js';
11
+ export type { FieldSize, FieldContextValue } from './components/Field.js';
12
+ export { TextField } from './components/TextField.js';
13
+ export { Checkbox } from './components/Checkbox.js';
14
+ export { Radio, RadioGroup } from './components/Radio.js';
15
+ export type { RadioProps, RadioGroupProps } from './components/Radio.js';
16
+ export { Select } from './components/Select.js';
17
+ export { Textarea } from './components/Textarea.js';
18
+ export { Card, CardHeader, CardBody, CardFooter, CardTitle, CardDescription, } from './components/Card.js';
19
+ export { SimpleGrid } from './components/SimpleGrid.js';
20
+ export { Container } from './components/Container.js';
21
+ export type { ContainerProps } from './components/Container.js';
22
+ export { Box } from './components/Box.js';
23
+ export type { BoxProps } from './components/Box.js';
24
+ export { Hide } from './components/Hide.js';
25
+ export type { HideProps } from './components/Hide.js';
26
+ export { Tooltip } from './components/Tooltip.js';
27
+ export type { TooltipPlacement, TooltipProps } from './components/Tooltip.js';
28
+ export { Dialog, DialogHeader, DialogBody, DialogFooter, DialogTitle, DialogClose, } from './components/Dialog.js';
29
+ export { Drawer, DrawerHeader, DrawerBody, DrawerFooter, DrawerTitle, DrawerClose, } from './components/Drawer.js';
30
+ export { Menu, MenuItem } from './components/Menu.js';
31
+ export { Tabs, TabList, Tab, TabPanel } from './components/Tabs.js';
32
+ export { Table, TableCaption, TableHeader, TableBody, TableFooter, TableRow, TableColumnHeader, TableCell, Thead, Tbody, Tfoot, Tr, Th, Td, } from './components/Table.js';
33
+ export { Spinner } from './components/Spinner.js';
34
+ export { Icon } from './components/Icon.js';
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';
37
+ export type { GlyphProps } from './components/Glyphs.js';
38
+ export { Link } from './components/Link.js';
39
+ export { Prose } from './components/Prose.js';
40
+ export type { ProseProps } from './components/Prose.js';
41
+ export { Separator } from './components/Separator.js';
42
+ export type { LabelCustomColors, LabelVisual } from './helpers/labelColors.js';
43
+ export type { Breakpoint, BreakpointAlias, BreakpointMap, ResponsiveValue, GapValue, SpacingScale, SpacingStep, SpacingSemantic, SemanticBreakpoint, } from './helpers/responsive.js';
44
+ export { BREAKPOINTS, SEMANTIC_BREAKPOINTS, SEMANTIC_TO_BREAKPOINT, SPACING_SCALE, normalizeResponsiveValue, normalizeGapValue, resolveBreakpointAlias, } from './helpers/responsive.js';
43
45
  //# sourceMappingURL=index.d.ts.map
@@ -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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EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,KAAK,EACL,KAAK,EACL,KAAK,EACL,EAAE,EACF,EAAE,EACF,EAAE,GACH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,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
@@ -1,11 +1,11 @@
1
- import { Button } from "./components/Button";
2
- import { Heading } from "./components/Heading";
3
- import { Text } from "./components/Text";
4
- import { Flex } from "./components/Flex";
5
- import { Stack, HStack, VStack } from "./components/Stack";
6
- import { Tag } from "./components/Tag";
7
- import { Badge } from "./components/Badge";
8
- import { Switch } from "./components/Switch";
1
+ import { Button } from "./components/Button.js";
2
+ import { Heading } from "./components/Heading.js";
3
+ import { Text } from "./components/Text.js";
4
+ import { Flex } from "./components/Flex.js";
5
+ import { Stack, HStack, VStack } from "./components/Stack.js";
6
+ import { Tag } from "./components/Tag.js";
7
+ import { Badge } from "./components/Badge.js";
8
+ import { Switch } from "./components/Switch.js";
9
9
  import {
10
10
  Field,
11
11
  FieldLabel,
@@ -15,12 +15,12 @@ import {
15
15
  FieldSelect,
16
16
  FieldTextarea,
17
17
  useField
18
- } from "./components/Field";
19
- import { TextField } from "./components/TextField";
20
- import { Checkbox } from "./components/Checkbox";
21
- import { Radio, RadioGroup } from "./components/Radio";
22
- import { Select } from "./components/Select";
23
- import { Textarea } from "./components/Textarea";
18
+ } from "./components/Field.js";
19
+ import { TextField } from "./components/TextField.js";
20
+ import { Checkbox } from "./components/Checkbox.js";
21
+ import { Radio, RadioGroup } from "./components/Radio.js";
22
+ import { Select } from "./components/Select.js";
23
+ import { Textarea } from "./components/Textarea.js";
24
24
  import {
25
25
  Card,
26
26
  CardHeader,
@@ -28,12 +28,12 @@ import {
28
28
  CardFooter,
29
29
  CardTitle,
30
30
  CardDescription
31
- } from "./components/Card";
32
- import { SimpleGrid } from "./components/SimpleGrid";
33
- import { Container } from "./components/Container";
34
- import { Box } from "./components/Box";
35
- import { Hide } from "./components/Hide";
36
- import { Tooltip } from "./components/Tooltip";
31
+ } from "./components/Card.js";
32
+ import { SimpleGrid } from "./components/SimpleGrid.js";
33
+ import { Container } from "./components/Container.js";
34
+ import { Box } from "./components/Box.js";
35
+ import { Hide } from "./components/Hide.js";
36
+ import { Tooltip } from "./components/Tooltip.js";
37
37
  import {
38
38
  Dialog,
39
39
  DialogHeader,
@@ -41,7 +41,7 @@ import {
41
41
  DialogFooter,
42
42
  DialogTitle,
43
43
  DialogClose
44
- } from "./components/Dialog";
44
+ } from "./components/Dialog.js";
45
45
  import {
46
46
  Drawer,
47
47
  DrawerHeader,
@@ -49,9 +49,9 @@ import {
49
49
  DrawerFooter,
50
50
  DrawerTitle,
51
51
  DrawerClose
52
- } from "./components/Drawer";
53
- import { Menu, MenuItem } from "./components/Menu";
54
- import { Tabs, TabList, Tab, TabPanel } from "./components/Tabs";
52
+ } from "./components/Drawer.js";
53
+ import { Menu, MenuItem } from "./components/Menu.js";
54
+ import { Tabs, TabList, Tab, TabPanel } from "./components/Tabs.js";
55
55
  import {
56
56
  Table,
57
57
  TableCaption,
@@ -67,9 +67,9 @@ import {
67
67
  Tr,
68
68
  Th,
69
69
  Td
70
- } from "./components/Table";
71
- import { Spinner } from "./components/Spinner";
72
- import { Icon } from "./components/Icon";
70
+ } from "./components/Table.js";
71
+ import { Spinner } from "./components/Spinner.js";
72
+ import { Icon } from "./components/Icon.js";
73
73
  import {
74
74
  CheckIcon,
75
75
  ChevronDownIcon,
@@ -84,9 +84,10 @@ import {
84
84
  SearchIcon,
85
85
  SunIcon,
86
86
  WarningIcon
87
- } from "./components/Glyphs";
88
- import { Link } from "./components/Link";
89
- import { Separator } from "./components/Separator";
87
+ } from "./components/Glyphs.js";
88
+ import { Link } from "./components/Link.js";
89
+ import { Prose } from "./components/Prose.js";
90
+ import { Separator } from "./components/Separator.js";
90
91
  import {
91
92
  BREAKPOINTS,
92
93
  SEMANTIC_BREAKPOINTS,
@@ -95,7 +96,7 @@ import {
95
96
  normalizeResponsiveValue,
96
97
  normalizeGapValue,
97
98
  resolveBreakpointAlias
98
- } from "./helpers/responsive";
99
+ } from "./helpers/responsive.js";
99
100
  export {
100
101
  BREAKPOINTS,
101
102
  Badge,
@@ -146,6 +147,7 @@ export {
146
147
  MenuIcon,
147
148
  MenuItem,
148
149
  MoonIcon,
150
+ Prose,
149
151
  Radio,
150
152
  RadioGroup,
151
153
  SEMANTIC_BREAKPOINTS,
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 { 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,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 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 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/respons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A,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
@@ -42,6 +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
46
  | custom modal, side panel, dropdown, tabs or tooltip | `Dialog`, `Drawer`, `Menu`, `Tabs`, `Tooltip` |
46
47
 
47
48
  Raw elements are fine for semantics Becket doesn't cover (`form`, `main`, `nav`, `section`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becket-ui/react",
3
- "version": "0.2.0",
3
+ "version": "0.3.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.2.0",
41
+ "@becket-ui/tokens": "^0.3.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.2.0",
47
+ "@becket-ui/tokens": "0.3.0",
48
48
  "@pandacss/dev": "^1.12.1",
49
49
  "@storybook/react": "^10.6.0",
50
50
  "@storybook/react-vite": "^10.6.0",
@@ -62,7 +62,7 @@
62
62
  "vitest": "^5.0.0"
63
63
  },
64
64
  "scripts": {
65
- "build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json",
65
+ "build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json && node scripts/add-js-extensions.mjs",
66
66
  "test": "vitest run",
67
67
  "storybook": "storybook dev -p 6006 -c ../../apps/docs/.storybook --project-root ../../apps/docs",
68
68
  "build-storybook": "storybook build -c ../../apps/docs/.storybook --project-root ../../apps/docs"