@becket-ui/react 0.1.0 → 0.1.1

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.
@@ -7,23 +7,23 @@ const LABEL_COLOR_VARS = {
7
7
  const VISUAL_DEFAULTS = {
8
8
  primary: {
9
9
  background: "var(--beckui--colors-primary)",
10
- color: "var(--beckui--colors-neutral-50)",
10
+ color: "var(--beckui--colors-neutral-900)",
11
11
  border: "transparent"
12
12
  },
13
13
  secondary: {
14
14
  background: "var(--beckui--colors-secondary)",
15
- color: "var(--beckui--colors-neutral-50)",
15
+ color: "var(--beckui--colors-neutral-900)",
16
16
  border: "transparent"
17
17
  },
18
18
  neutral: {
19
19
  background: "var(--beckui--colors-neutral-800)",
20
- color: "var(--beckui--colors-text)",
20
+ color: "var(--beckui--colors-neutral-50)",
21
21
  border: "transparent"
22
22
  },
23
23
  outline: {
24
24
  background: "transparent",
25
- color: "var(--beckui--colors-secondary)",
26
- border: "var(--beckui--colors-secondary)"
25
+ color: "var(--beckui--colors-accent)",
26
+ border: "var(--beckui--colors-accent)"
27
27
  }
28
28
  };
29
29
  const GRADIENT_DEFAULTS = {
@@ -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} as const;\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-50)',\n border: 'transparent',\n },\n secondary: {\n background: 'var(--beckui--colors-secondary)',\n color: 'var(--beckui--colors-neutral-50)',\n border: 'transparent',\n },\n neutral: {\n background: 'var(--beckui--colors-neutral-800)',\n color: 'var(--beckui--colors-text)',\n border: 'transparent',\n },\n outline: {\n background: 'transparent',\n color: 'var(--beckui--colors-secondary)',\n border: 'var(--beckui--colors-secondary)',\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":[]}
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} as const;\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":[]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Layout-story chips. Each `css()` is a static object so Panda extracts the
3
+ * utilities. Cream ink on `neutral.800` (not inherited `text` on 500–700).
4
+ */
5
+ export declare const demoChip: string;
6
+ export declare const demoChipMd: string;
7
+ export declare const demoChipLg: string;
8
+ export declare const demoChipWide: string;
9
+ export declare const demoChipBlock: string;
10
+ //# sourceMappingURL=storybookDemoChip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storybookDemoChip.d.ts","sourceRoot":"","sources":["../../src/helpers/storybookDemoChip.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,QAAQ,QAMnB,CAAC;AAEH,eAAO,MAAM,UAAU,QAMrB,CAAC;AAEH,eAAO,MAAM,UAAU,QAMrB,CAAC;AAEH,eAAO,MAAM,YAAY,QAOvB,CAAC;AAEH,eAAO,MAAM,aAAa,QAMxB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { css } from "@becket-ui/tokens";
2
+ const demoChip = css({
3
+ color: "neutral.50",
4
+ bg: "neutral.800",
5
+ p: 2,
6
+ minW: 13,
7
+ h: 8
8
+ });
9
+ const demoChipMd = css({
10
+ color: "neutral.50",
11
+ bg: "neutral.800",
12
+ p: 2,
13
+ minW: 13,
14
+ h: 13
15
+ });
16
+ const demoChipLg = css({
17
+ color: "neutral.50",
18
+ bg: "neutral.800",
19
+ p: 2,
20
+ minW: 13,
21
+ h: 21
22
+ });
23
+ const demoChipWide = css({
24
+ color: "neutral.50",
25
+ bg: "neutral.800",
26
+ p: 2,
27
+ minW: 13,
28
+ h: 8,
29
+ w: 21
30
+ });
31
+ const demoChipBlock = css({
32
+ color: "neutral.50",
33
+ bg: "neutral.800",
34
+ p: 2,
35
+ w: 21,
36
+ h: 8
37
+ });
38
+ export {
39
+ demoChip,
40
+ demoChipBlock,
41
+ demoChipLg,
42
+ demoChipMd,
43
+ demoChipWide
44
+ };
45
+ //# sourceMappingURL=storybookDemoChip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/helpers/storybookDemoChip.ts"],"sourcesContent":["import { css } from '@becket-ui/tokens';\n\n/**\n * Layout-story chips. Each `css()` is a static object so Panda extracts the\n * utilities. Cream ink on `neutral.800` (not inherited `text` on 500–700).\n */\nexport const demoChip = css({\n color: 'neutral.50',\n bg: 'neutral.800',\n p: 2,\n minW: 13,\n h: 8,\n});\n\nexport const demoChipMd = css({\n color: 'neutral.50',\n bg: 'neutral.800',\n p: 2,\n minW: 13,\n h: 13,\n});\n\nexport const demoChipLg = css({\n color: 'neutral.50',\n bg: 'neutral.800',\n p: 2,\n minW: 13,\n h: 21,\n});\n\nexport const demoChipWide = css({\n color: 'neutral.50',\n bg: 'neutral.800',\n p: 2,\n minW: 13,\n h: 8,\n w: 21,\n});\n\nexport const demoChipBlock = css({\n color: 'neutral.50',\n bg: 'neutral.800',\n p: 2,\n w: 21,\n h: 8,\n});\n"],"mappings":"AAAA,SAAS,WAAW;AAMb,MAAM,WAAW,IAAI;AAAA,EAC1B,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,MAAM;AAAA,EACN,GAAG;AACL,CAAC;AAEM,MAAM,aAAa,IAAI;AAAA,EAC5B,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,MAAM;AAAA,EACN,GAAG;AACL,CAAC;AAEM,MAAM,aAAa,IAAI;AAAA,EAC5B,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,MAAM;AAAA,EACN,GAAG;AACL,CAAC;AAEM,MAAM,eAAe,IAAI;AAAA,EAC9B,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,MAAM;AAAA,EACN,GAAG;AAAA,EACH,GAAG;AACL,CAAC;AAEM,MAAM,gBAAgB,IAAI;AAAA,EAC/B,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL,CAAC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@becket-ui/react",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Becket React component library",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,46 +20,30 @@
20
20
  "components",
21
21
  "panda-css"
22
22
  ],
23
- "main": "./src/index.ts",
24
- "types": "./src/index.ts",
23
+ "main": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
25
25
  "sideEffects": false,
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
29
  "exports": {
30
30
  ".": {
31
- "types": "./src/index.ts",
32
- "import": "./src/index.ts",
33
- "default": "./src/index.ts"
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js",
33
+ "default": "./dist/index.js"
34
34
  }
35
35
  },
36
36
  "publishConfig": {
37
- "access": "public",
38
- "main": "./dist/index.js",
39
- "types": "./dist/index.d.ts",
40
- "exports": {
41
- ".": {
42
- "types": "./dist/index.d.ts",
43
- "import": "./dist/index.js",
44
- "default": "./dist/index.js"
45
- }
46
- }
47
- },
48
- "scripts": {
49
- "build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json",
50
- "prepack": "pnpm build",
51
- "test": "vitest run",
52
- "storybook": "storybook dev -p 6006 -c ../../apps/docs/.storybook --project-root ../../apps/docs",
53
- "build-storybook": "storybook build -c ../../apps/docs/.storybook --project-root ../../apps/docs"
37
+ "access": "public"
54
38
  },
55
39
  "peerDependencies": {
56
- "@becket-ui/tokens": "^0.1.0",
40
+ "@becket-ui/tokens": "^0.1.1",
57
41
  "react": ">=19",
58
42
  "react-dom": ">=19"
59
43
  },
60
44
  "devDependencies": {
61
- "@becket-ui/a11y": "workspace:*",
62
- "@becket-ui/tokens": "workspace:*",
45
+ "@becket-ui/a11y": "0.0.0",
46
+ "@becket-ui/tokens": "0.1.1",
63
47
  "@pandacss/dev": "^1.12.1",
64
48
  "@storybook/react": "^10.6.0",
65
49
  "@storybook/react-vite": "^10.6.0",
@@ -75,5 +59,11 @@
75
59
  "typescript": "7.0.2",
76
60
  "vite": "^8.3.0",
77
61
  "vitest": "^5.0.0"
62
+ },
63
+ "scripts": {
64
+ "build": "tsup && tsc --emitDeclarationOnly -p tsconfig.build.json",
65
+ "test": "vitest run",
66
+ "storybook": "storybook dev -p 6006 -c ../../apps/docs/.storybook --project-root ../../apps/docs",
67
+ "build-storybook": "storybook build -c ../../apps/docs/.storybook --project-root ../../apps/docs"
78
68
  }
79
- }
69
+ }