@becket-ui/react 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button.js.map +1 -1
- package/dist/helpers/gradientBorder.d.ts +1 -1
- package/dist/helpers/gradientBorder.d.ts.map +1 -1
- package/dist/helpers/gradientBorder.js +11 -6
- package/dist/helpers/gradientBorder.js.map +1 -1
- package/dist/helpers/labelColors.d.ts +4 -4
- package/dist/helpers/labelColors.d.ts.map +1 -1
- package/dist/helpers/labelColors.js.map +1 -1
- package/dist/helpers/responsive.d.ts +2 -2
- package/dist/helpers/responsive.d.ts.map +1 -1
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/helpers/storybookControls.d.ts +9 -9
- package/dist/helpers/storybookControls.d.ts.map +1 -1
- package/dist/helpers/storybookControls.js +19 -19
- package/dist/helpers/storybookControls.js.map +1 -1
- package/package.json +13 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport type { ComponentPropsWithRef, ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';\nimport { button } from '@becket-ui/tokens/recipes';\n\ntype ButtonVisual = 'outline' | 'primary' | 'secondary' | 'neutral';\ntype ButtonSize = 'sm' | 'md';\ntype ButtonBorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nconst VISUAL_TO_RECIPE: Record<ButtonVisual, ButtonVisual> = {\n primary: 'primary',\n secondary: 'secondary',\n neutral: 'neutral',\n outline: 'outline',\n};\n\ntype ButtonOwnProps = {\n visual?: ButtonVisual;\n size?: ButtonSize;\n borderRadius?: ButtonBorderRadius;\n withGradient?: boolean;\n /** Stretch to the parent width. Default is token `sizes.field` (12.5rem). */\n fullWidth?: boolean;\n};\n\n/**\n * Props follow the rendered element: `<Button as=\"a\" href=\"/docs\">` accepts anchor props,\n * and plain `<Button>` accepts button props only.\n */\nexport type ButtonProps<T extends ElementType = 'button'> = ButtonOwnProps & {\n as?: T;\n} & Omit<ComponentPropsWithoutRef<T>, keyof ButtonOwnProps | 'as'>;\n\ntype PolymorphicButton = (<T extends ElementType = 'button'>(\n props: ButtonProps<T> & { ref?: ComponentPropsWithRef<T>['ref'] },\n) => ReactElement | null) & { displayName?: string };\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n// forwardRef can't express a generic component; the cast restores the per-element prop types.\nexport const Button = forwardRef<HTMLElement, ButtonOwnProps & { as?: ElementType; className?: string }>(\n (\n {\n visual = 'outline',\n size = 'md',\n borderRadius = 'md',\n withGradient = false,\n fullWidth = false,\n as: ButtonComponent = 'button',\n className,\n ...props\n },\n ref,\n ) => {\n const recipeClassName = (button)({\n visual: VISUAL_TO_RECIPE[visual],\n size,\n borderRadius,\n withGradient,\n fullWidth,\n });\n\n return (\n <ButtonComponent\n ref={ref}\n {...(ButtonComponent === 'button' ? { type: 'button'
|
|
1
|
+
{"version":3,"sources":["../../src/components/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport type { ComponentPropsWithRef, ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';\nimport { button } from '@becket-ui/tokens/recipes';\n\ntype ButtonVisual = 'outline' | 'primary' | 'secondary' | 'neutral';\ntype ButtonSize = 'sm' | 'md';\ntype ButtonBorderRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';\n\nconst VISUAL_TO_RECIPE: Record<ButtonVisual, ButtonVisual> = {\n primary: 'primary',\n secondary: 'secondary',\n neutral: 'neutral',\n outline: 'outline',\n};\n\ntype ButtonOwnProps = {\n visual?: ButtonVisual;\n size?: ButtonSize;\n borderRadius?: ButtonBorderRadius;\n withGradient?: boolean;\n /** Stretch to the parent width. Default is token `sizes.field` (12.5rem). */\n fullWidth?: boolean;\n};\n\n/**\n * Props follow the rendered element: `<Button as=\"a\" href=\"/docs\">` accepts anchor props,\n * and plain `<Button>` accepts button props only.\n */\nexport type ButtonProps<T extends ElementType = 'button'> = ButtonOwnProps & {\n as?: T;\n} & Omit<ComponentPropsWithoutRef<T>, keyof ButtonOwnProps | 'as'>;\n\ntype PolymorphicButton = (<T extends ElementType = 'button'>(\n props: ButtonProps<T> & { ref?: ComponentPropsWithRef<T>['ref'] },\n) => ReactElement | null) & { displayName?: string };\n\nfunction mergeClassName(...classes: (string | undefined)[]): string {\n return classes.filter(Boolean).join(' ');\n}\n\n// forwardRef can't express a generic component; the cast restores the per-element prop types.\nexport const Button = forwardRef<HTMLElement, ButtonOwnProps & { as?: ElementType; className?: string }>(\n (\n {\n visual = 'outline',\n size = 'md',\n borderRadius = 'md',\n withGradient = false,\n fullWidth = false,\n as: ButtonComponent = 'button',\n className,\n ...props\n },\n ref,\n ) => {\n const recipeClassName = (button)({\n visual: VISUAL_TO_RECIPE[visual],\n size,\n borderRadius,\n withGradient,\n fullWidth,\n });\n\n return (\n <ButtonComponent\n ref={ref}\n {...(ButtonComponent === 'button' ? { type: 'button' } : {})}\n {...props}\n className={mergeClassName(recipeClassName, className)}\n />\n );\n },\n) as PolymorphicButton;\n\nButton.displayName = 'Button';\n"],"mappings":"AAgEM;AAhEN,SAAS,kBAAkB;AAE3B,SAAS,cAAc;AAMvB,MAAM,mBAAuD;AAAA,EAC3D,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;AAuBA,SAAS,kBAAkB,SAAyC;AAClE,SAAO,QAAQ,OAAO,OAAO,EAAE,KAAK,GAAG;AACzC;AAGO,MAAM,SAAS;AAAA,EACpB,CACE;AAAA,IACE,SAAS;AAAA,IACT,OAAO;AAAA,IACP,eAAe;AAAA,IACf,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,IAAI,kBAAkB;AAAA,IACtB;AAAA,IACA,GAAG;AAAA,EACL,GACA,QACG;AACH,UAAM,kBAAmB,OAAQ;AAAA,MAC/B,QAAQ,iBAAiB,MAAM;AAAA,MAC/B;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACC,GAAI,oBAAoB,WAAW,EAAE,MAAM,SAAS,IAAI,CAAC;AAAA,QACzD,GAAG;AAAA,QACJ,WAAW,eAAe,iBAAiB,SAAS;AAAA;AAAA,IACtD;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GradientToken } from '@becket-ui/tokens/
|
|
1
|
+
import type { GradientToken } from '@becket-ui/tokens/types';
|
|
2
2
|
export type GradientBorderToken = Exclude<GradientToken, 'primaryHover'>;
|
|
3
3
|
export declare function isGradientBorderToken(value: unknown): value is GradientBorderToken;
|
|
4
4
|
export declare function getGradientBorderClassName(token: GradientBorderToken): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gradientBorder.d.ts","sourceRoot":"","sources":["../../src/helpers/gradientBorder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"gradientBorder.d.ts","sourceRoot":"","sources":["../../src/helpers/gradientBorder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAyBzE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAE7E"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { css } from "@becket-ui/tokens";
|
|
2
|
-
const
|
|
2
|
+
const outline = {
|
|
3
3
|
borderWidth: "2px",
|
|
4
4
|
borderStyle: "solid",
|
|
5
5
|
borderColor: "transparent",
|
|
6
|
-
backgroundImage: `linear-gradient({colors.background}, {colors.background}), ${image}`,
|
|
7
6
|
backgroundOrigin: "border-box",
|
|
8
7
|
backgroundClip: "padding-box, border-box"
|
|
9
|
-
}
|
|
8
|
+
};
|
|
10
9
|
const gradientBorderClassMap = {
|
|
11
|
-
primary:
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
primary: css(outline, {
|
|
11
|
+
backgroundImage: "linear-gradient({colors.background}, {colors.background}), {gradients.primary}"
|
|
12
|
+
}),
|
|
13
|
+
secondary: css(outline, {
|
|
14
|
+
backgroundImage: "linear-gradient({colors.background}, {colors.background}), {gradients.secondary}"
|
|
15
|
+
}),
|
|
16
|
+
neutral: css(outline, {
|
|
17
|
+
backgroundImage: "linear-gradient({colors.background}, {colors.background}), {gradients.neutral}"
|
|
18
|
+
})
|
|
14
19
|
};
|
|
15
20
|
function isGradientBorderToken(value) {
|
|
16
21
|
return typeof value === "string" && value in gradientBorderClassMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/helpers/gradientBorder.ts"],"sourcesContent":["import { css } from '@becket-ui/tokens';\nimport type { GradientToken } from '@becket-ui/tokens/
|
|
1
|
+
{"version":3,"sources":["../../src/helpers/gradientBorder.ts"],"sourcesContent":["import { css } from '@becket-ui/tokens';\nimport type { GradientToken } from '@becket-ui/tokens/types';\n\nexport type GradientBorderToken = Exclude<GradientToken, 'primaryHover'>;\n\n/** Double-layer border-box fill so left/right caps match the radius (no ::before sliver). */\nconst outline = {\n borderWidth: '2px',\n borderStyle: 'solid',\n borderColor: 'transparent',\n backgroundOrigin: 'border-box',\n backgroundClip: 'padding-box, border-box',\n};\n\n// Each backgroundImage is written out: Panda only generates CSS for values it can read at build\n// time, and a template string filled in at runtime has none (MAV-143 caught the missing borders).\nconst gradientBorderClassMap: Record<GradientBorderToken, string> = {\n primary: css(outline, {\n backgroundImage: 'linear-gradient({colors.background}, {colors.background}), {gradients.primary}',\n }),\n secondary: css(outline, {\n backgroundImage: 'linear-gradient({colors.background}, {colors.background}), {gradients.secondary}',\n }),\n neutral: css(outline, {\n backgroundImage: 'linear-gradient({colors.background}, {colors.background}), {gradients.neutral}',\n }),\n};\n\nexport function isGradientBorderToken(value: unknown): value is GradientBorderToken {\n return typeof value === 'string' && value in gradientBorderClassMap;\n}\n\nexport function getGradientBorderClassName(token: GradientBorderToken): string {\n return gradientBorderClassMap[token];\n}\n"],"mappings":"AAAA,SAAS,WAAW;AAMpB,MAAM,UAAU;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,gBAAgB;AAClB;AAIA,MAAM,yBAA8D;AAAA,EAClE,SAAS,IAAI,SAAS;AAAA,IACpB,iBAAiB;AAAA,EACnB,CAAC;AAAA,EACD,WAAW,IAAI,SAAS;AAAA,IACtB,iBAAiB;AAAA,EACnB,CAAC;AAAA,EACD,SAAS,IAAI,SAAS;AAAA,IACpB,iBAAiB;AAAA,EACnB,CAAC;AACH;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,OAAO,UAAU,YAAY,SAAS;AAC/C;AAEO,SAAS,2BAA2B,OAAoC;AAC7E,SAAO,uBAAuB,KAAK;AACrC;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
export declare const LABEL_COLOR_VARS: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
background: string;
|
|
4
|
+
border: string;
|
|
5
|
+
color: string;
|
|
6
|
+
gradient: string;
|
|
7
7
|
};
|
|
8
8
|
/** Downstream apps pass CSS values (tokens, vars, or literals) for label surfaces. */
|
|
9
9
|
export type LabelCustomColors = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelColors.d.ts","sourceRoot":"","sources":["../../src/helpers/labelColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"labelColors.d.ts","sourceRoot":"","sources":["../../src/helpers/labelColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,gBAAgB;IAC3B,UAAU;IACV,MAAM;IACN,KAAK;IACL,QAAQ;CACT,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAgC1E,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,WAAW,EACnB,YAAY,EAAE,OAAO,EACrB,YAAY,CAAC,EAAE,iBAAiB,GAC/B,aAAa,CAkBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/helpers/labelColors.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\n\nexport const LABEL_COLOR_VARS = {\n background: '--mav-label-bg',\n border: '--mav-label-border',\n color: '--mav-label-color',\n gradient: '--mav-label-gradient',\n}
|
|
1
|
+
{"version":3,"sources":["../../src/helpers/labelColors.ts"],"sourcesContent":["import type { CSSProperties } from 'react';\n\nexport const LABEL_COLOR_VARS = {\n background: '--mav-label-bg',\n border: '--mav-label-border',\n color: '--mav-label-color',\n gradient: '--mav-label-gradient',\n};\n\n/** Downstream apps pass CSS values (tokens, vars, or literals) for label surfaces. */\nexport type LabelCustomColors = {\n background?: string;\n border?: string;\n color?: string;\n gradient?: string;\n};\n\nexport type LabelVisual = 'primary' | 'secondary' | 'neutral' | 'outline';\n\nconst VISUAL_DEFAULTS: Record<LabelVisual, LabelCustomColors> = {\n primary: {\n background: 'var(--beckui--colors-primary)',\n color: 'var(--beckui--colors-neutral-900)',\n border: 'transparent',\n },\n secondary: {\n background: 'var(--beckui--colors-secondary)',\n color: 'var(--beckui--colors-neutral-900)',\n border: 'transparent',\n },\n neutral: {\n background: 'var(--beckui--colors-neutral-800)',\n color: 'var(--beckui--colors-neutral-50)',\n border: 'transparent',\n },\n outline: {\n background: 'transparent',\n color: 'var(--beckui--colors-accent)',\n border: 'var(--beckui--colors-accent)',\n },\n};\n\nconst GRADIENT_DEFAULTS: Record<LabelVisual, string> = {\n primary: 'var(--beckui--gradients-primary)',\n secondary: 'var(--beckui--gradients-secondary)',\n neutral: 'var(--beckui--gradients-neutral)',\n outline: 'var(--beckui--gradients-primary)',\n};\n\nexport function resolveLabelColorVars(\n visual: LabelVisual,\n withGradient: boolean,\n customColors?: LabelCustomColors,\n): CSSProperties {\n const defaults = VISUAL_DEFAULTS[visual];\n const merged: LabelCustomColors = { ...defaults, ...customColors };\n\n const vars: Record<string, string | undefined> = {\n [LABEL_COLOR_VARS.background]: merged.background,\n [LABEL_COLOR_VARS.border]: merged.border,\n [LABEL_COLOR_VARS.color]: merged.color,\n };\n\n if (withGradient) {\n vars[LABEL_COLOR_VARS.gradient] =\n customColors?.gradient ?? GRADIENT_DEFAULTS[visual];\n }\n\n return Object.fromEntries(\n Object.entries(vars).filter((entry): entry is [string, string] => Boolean(entry[1])),\n ) as CSSProperties;\n}\n"],"mappings":"AAEO,MAAM,mBAAmB;AAAA,EAC9B,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACZ;AAYA,MAAM,kBAA0D;AAAA,EAC9D,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,WAAW;AAAA,IACT,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AACF;AAEA,MAAM,oBAAiD;AAAA,EACrD,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AACX;AAEO,SAAS,sBACd,QACA,cACA,cACe;AACf,QAAM,WAAW,gBAAgB,MAAM;AACvC,QAAM,SAA4B,EAAE,GAAG,UAAU,GAAG,aAAa;AAEjE,QAAM,OAA2C;AAAA,IAC/C,CAAC,iBAAiB,UAAU,GAAG,OAAO;AAAA,IACtC,CAAC,iBAAiB,MAAM,GAAG,OAAO;AAAA,IAClC,CAAC,iBAAiB,KAAK,GAAG,OAAO;AAAA,EACnC;AAEA,MAAI,cAAc;AAChB,SAAK,iBAAiB,QAAQ,IAC5B,cAAc,YAAY,kBAAkB,MAAM;AAAA,EACtD;AAEA,SAAO,OAAO;AAAA,IACZ,OAAO,QAAQ,IAAI,EAAE,OAAO,CAAC,UAAqC,QAAQ,MAAM,CAAC,CAAC,CAAC;AAAA,EACrF;AACF;","names":[]}
|
|
@@ -24,14 +24,14 @@ export type BreakpointMap<T> = Partial<Record<BreakpointAlias, T>>;
|
|
|
24
24
|
export type ResponsiveValue<T> = ConditionalValue<T> | BreakpointMap<T>;
|
|
25
25
|
export declare const BREAKPOINTS: readonly ["base", "sm", "md", "lg", "xl", "2xl"];
|
|
26
26
|
export declare const SEMANTIC_BREAKPOINTS: readonly ["mobile", "tablet", "desktop", "largeDesktop"];
|
|
27
|
-
/** Semantic → token breakpoint (Chakra mobile-first scale). */
|
|
27
|
+
/** Semantic → token breakpoint (Chakra mobile-first scale). as const keeps each value a literal Breakpoint. */
|
|
28
28
|
export declare const SEMANTIC_TO_BREAKPOINT: {
|
|
29
29
|
readonly mobile: 'base';
|
|
30
30
|
readonly tablet: 'md';
|
|
31
31
|
readonly desktop: 'lg';
|
|
32
32
|
readonly largeDesktop: 'xl';
|
|
33
33
|
};
|
|
34
|
-
/** Becket-authored spacing steps (Fibonacci + zero). */
|
|
34
|
+
/** Becket-authored spacing steps (Fibonacci + zero). as const: SpacingStep below is derived from them. */
|
|
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. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../src/helpers/responsive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,CAAC;AAElF,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAE9D,2EAA2E;AAC3E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../src/helpers/responsive.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEpE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,CAAC;AAElF,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,kBAAkB,CAAC;AAE9D,2EAA2E;AAC3E,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAGxE,eAAO,MAAM,WAAW,kDAAmF,CAAC;AAG5G,eAAO,MAAM,oBAAoB,0DAKiB,CAAC;AAEnD,+GAA+G;AAC/G,eAAO,MAAM,sBAAsB;qBACzB,MAAM;qBACN,IAAI;sBACH,IAAI;2BACC,IAAI;CACuC,CAAC;AAE5D,0GAA0G;AAC1G,eAAO,MAAM,aAAa,YAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU,CAAC;AAErE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEvE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB,eAAe,GACf,WAAW,GACX,GAAG,WAAW,EAAE,GAChB,CAAC,MAAM,GAAG,EAAE,CAAC,GACb,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB,6DAA6D;AAC7D,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;AAErD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,kBAAkB,CAE3E;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,UAAU,CAEhE;AAED,sDAAsD;AACtD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CA4BvD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAgB9C"}
|
|
@@ -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' | '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":"
|
|
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\n// as const: public API; consumers get the breakpoint names as literal types, not string[].\nexport const BREAKPOINTS = ['base', 'sm', 'md', 'lg', 'xl', '2xl'] as const satisfies readonly Breakpoint[];\n\n// as const: public API, same reason as BREAKPOINTS.\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). as const keeps each value a literal Breakpoint. */\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). as const: SpacingStep below is derived from them. */\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":"AAgCO,MAAM,cAAc,CAAC,QAAQ,MAAM,MAAM,MAAM,MAAM,KAAK;AAG1D,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,13 +1,13 @@
|
|
|
1
1
|
/** Shared Storybook knob values. ConditionalValue props infer as object controls — always override. */
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
2
|
+
export declare const gapOptions: string[];
|
|
3
|
+
export declare const flexDirectionOptions: string[];
|
|
4
|
+
export declare const stackDirectionOptions: string[];
|
|
5
|
+
export declare const alignOptions: string[];
|
|
6
|
+
export declare const justifyOptions: string[];
|
|
7
|
+
export declare const flexWrapOptions: string[];
|
|
8
|
+
export declare const flexBasisOptions: string[];
|
|
9
|
+
export declare const gradientBorderOptions: string[];
|
|
10
|
+
export declare const breakpointOptions: string[];
|
|
11
11
|
export declare function knobs(include: string[]): {
|
|
12
12
|
controls: {
|
|
13
13
|
include: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storybookControls.d.ts","sourceRoot":"","sources":["../../src/helpers/storybookControls.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"storybookControls.d.ts","sourceRoot":"","sources":["../../src/helpers/storybookControls.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAEvG,eAAO,MAAM,UAAU,UAAwC,CAAC;AAEhE,eAAO,MAAM,oBAAoB,UAKhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAoB,CAAC;AAEvD,eAAO,MAAM,YAAY,UAAoD,CAAC;AAE9E,eAAO,MAAM,cAAc,UAA4D,CAAC;AAExF,eAAO,MAAM,eAAe,UAAqC,CAAC;AAElE,eAAO,MAAM,gBAAgB,UAA6D,CAAC;AAE3F,eAAO,MAAM,qBAAqB,UAAsC,CAAC;AAEzE,eAAO,MAAM,iBAAiB,UAU7B,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE;;;;EAEtC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const gapOptions = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
2
|
+
const flexDirectionOptions = [
|
|
3
3
|
"row",
|
|
4
4
|
"column",
|
|
5
5
|
"row-reverse",
|
|
6
6
|
"column-reverse"
|
|
7
7
|
];
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
8
|
+
const stackDirectionOptions = ["row", "column"];
|
|
9
|
+
const alignOptions = ["start", "center", "end", "stretch", "baseline"];
|
|
10
|
+
const justifyOptions = ["start", "center", "end", "between", "around", "evenly"];
|
|
11
|
+
const flexWrapOptions = ["wrap", "nowrap", "wrap-reverse"];
|
|
12
|
+
const flexBasisOptions = ["auto", "0", "full", "8", "13", "21", "34", "1/2", "1/3"];
|
|
13
|
+
const gradientBorderOptions = ["primary", "secondary", "neutral"];
|
|
14
|
+
const breakpointOptions = [
|
|
15
15
|
"sm",
|
|
16
16
|
"md",
|
|
17
17
|
"lg",
|
|
@@ -26,15 +26,15 @@ function knobs(include) {
|
|
|
26
26
|
return { controls: { include } };
|
|
27
27
|
}
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
alignOptions,
|
|
30
|
+
breakpointOptions,
|
|
31
|
+
flexBasisOptions,
|
|
32
|
+
flexDirectionOptions,
|
|
33
|
+
flexWrapOptions,
|
|
34
|
+
gapOptions,
|
|
35
|
+
gradientBorderOptions,
|
|
36
|
+
justifyOptions,
|
|
37
|
+
knobs,
|
|
38
|
+
stackDirectionOptions
|
|
39
39
|
};
|
|
40
40
|
//# sourceMappingURL=storybookControls.js.map
|
|
@@ -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
|
|
1
|
+
{"version":3,"sources":["../../src/helpers/storybookControls.ts"],"sourcesContent":["/** Shared Storybook knob values. ConditionalValue props infer as object controls — always override. */\n\nexport const gapOptions = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];\n\nexport const flexDirectionOptions = [\n 'row',\n 'column',\n 'row-reverse',\n 'column-reverse',\n];\n\nexport const stackDirectionOptions = ['row', 'column'];\n\nexport const alignOptions = ['start', 'center', 'end', 'stretch', 'baseline'];\n\nexport const justifyOptions = ['start', 'center', 'end', 'between', 'around', 'evenly'];\n\nexport const flexWrapOptions = ['wrap', 'nowrap', 'wrap-reverse'];\n\nexport const flexBasisOptions = ['auto', '0', 'full', '8', '13', '21', '34', '1/2', '1/3'];\n\nexport const gradientBorderOptions = ['primary', 'secondary', 'neutral'];\n\nexport const breakpointOptions = [\n 'sm',\n 'md',\n 'lg',\n 'xl',\n '2xl',\n 'mobile',\n 'tablet',\n 'desktop',\n 'largeDesktop',\n];\n\nexport function knobs(include: string[]) {\n return { controls: { include } };\n}\n"],"mappings":"AAEO,MAAM,aAAa,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK;AAEvD,MAAM,uBAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,wBAAwB,CAAC,OAAO,QAAQ;AAE9C,MAAM,eAAe,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU;AAErE,MAAM,iBAAiB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU,QAAQ;AAE/E,MAAM,kBAAkB,CAAC,QAAQ,UAAU,cAAc;AAEzD,MAAM,mBAAmB,CAAC,QAAQ,KAAK,QAAQ,KAAK,MAAM,MAAM,MAAM,OAAO,KAAK;AAElF,MAAM,wBAAwB,CAAC,WAAW,aAAa,SAAS;AAEhE,MAAM,oBAAoB;AAAA,EAC/B;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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@becket-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Becket React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,14 +38,17 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@becket-ui/tokens": "^0.
|
|
41
|
+
"@becket-ui/tokens": "^0.6.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.
|
|
48
|
-
"@
|
|
47
|
+
"@becket-ui/tokens": "0.6.0",
|
|
48
|
+
"@fontsource/inter": "^5.3.0",
|
|
49
|
+
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
50
|
+
"@pandacss/dev": "^2.3.0",
|
|
51
|
+
"@puppeteer/browsers": "2.13.2",
|
|
49
52
|
"@storybook/react": "^10.6.0",
|
|
50
53
|
"@storybook/react-vite": "^10.6.0",
|
|
51
54
|
"@testing-library/react": "^16.3.0",
|
|
@@ -53,17 +56,22 @@
|
|
|
53
56
|
"@types/node": "^22.18.0",
|
|
54
57
|
"@types/react": "^19.3.0",
|
|
55
58
|
"@types/react-dom": "^19.3.0",
|
|
59
|
+
"@vitest/browser": "5.0.0",
|
|
60
|
+
"@vitest/browser-webdriverio": "5.0.0",
|
|
56
61
|
"jsdom": "^26.1.0",
|
|
57
62
|
"react": "19.3.0",
|
|
58
63
|
"react-dom": "19.3.0",
|
|
59
64
|
"tsup": "^8.5.1",
|
|
60
65
|
"typescript": "7.0.2",
|
|
61
66
|
"vite": "^8.3.0",
|
|
62
|
-
"vitest": "
|
|
67
|
+
"vitest": "5.0.0",
|
|
68
|
+
"webdriverio": "^9.32.0"
|
|
63
69
|
},
|
|
64
70
|
"scripts": {
|
|
65
71
|
"build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json && node scripts/add-js-extensions.mjs",
|
|
66
72
|
"test": "vitest run",
|
|
73
|
+
"test:visual": "vitest run -c vitest.visual.config.ts",
|
|
74
|
+
"test:visual:update": "vitest run -c vitest.visual.config.ts --update",
|
|
67
75
|
"storybook": "storybook dev -p 6006 -c ../../apps/docs/.storybook --project-root ../../apps/docs",
|
|
68
76
|
"build-storybook": "storybook build -c ../../apps/docs/.storybook --project-root ../../apps/docs"
|
|
69
77
|
}
|