@welcome-back/brand 0.4.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/README.md CHANGED
@@ -320,6 +320,18 @@ POS_TOKENS['--wb-accent']; // '#171717'
320
320
 
321
321
  `posTokensCss(selector)` returns the same rule for another selector.
322
322
 
323
+ ### Category colours
324
+
325
+ `CATEGORY_PALETTE` (`src/categoryPalette.ts`) is the 8-colour set of the POS
326
+ (set F2, owner 2026-10-21). Each colour has a swatch, a tile `tint`, a photo
327
+ `slot` and an `ink` for the initials; they are also in `POS_TOKENS` as
328
+ `--wb-cat-1` … `--wb-cat-8` (+ `-tint`, `-slot`, `-ink`).
329
+
330
+ A category stores its **slot number** (1–8), never a hex. `categorySlotForIndex(i)`
331
+ gives the automatic slot in tree order (1…8, 1…), so neighbours never share a
332
+ colour; `DEFAULT_CATEGORY_SLOT` (8, Piedra) is the neutral one. The test checks the
333
+ contrast rules for every colour. Design: Paper 01M5FB9SPXPPK51CYD7VT2GP6F, F2.
334
+
323
335
  ## Product image frames
324
336
 
325
337
  The frames a product photo is shown in: `1:1`, `4:3`, `3:2`, `16:9`. The
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CATEGORY_PALETTE_TOKENS = exports.DEFAULT_CATEGORY_SLOT = exports.CATEGORY_PALETTE = void 0;
4
+ exports.categorySlotForIndex = categorySlotForIndex;
5
+ exports.CATEGORY_PALETTE = [
6
+ { name: "Dorado", swatch: "#a07c2b", tint: "#f3ecdd", slot: "#eae2d0", ink: "#785d20" },
7
+ { name: "Azul mar", swatch: "#1f81a6", tint: "#e2eff4", slot: "#cee3eb", ink: "#17617c" },
8
+ { name: "Terracota", swatch: "#b55a3c", tint: "#f5eae6", slot: "#efdbd4", ink: "#88442d" },
9
+ { name: "Verde", swatch: "#458d5c", tint: "#e7f0ea", slot: "#d6e6db", ink: "#346a45" },
10
+ { name: "Ciruela", swatch: "#9c5389", tint: "#f2e9f0", slot: "#e9d9e5", ink: "#753e67" },
11
+ { name: "Azul", swatch: "#3f6fb5", tint: "#e6ecf5", slot: "#d5dfef", ink: "#2f5388" },
12
+ { name: "Pizarra", swatch: "#5e7a80", tint: "#eaeeee", slot: "#dce2e3", ink: "#465c60" },
13
+ { name: "Piedra", swatch: "#8a7f6e", tint: "#f0eeec", slot: "#e5e3df", ink: "#685f52" },
14
+ ];
15
+ /** The neutral slot a category gets when nothing else applies. */
16
+ exports.DEFAULT_CATEGORY_SLOT = 8;
17
+ /** Slot for the n-th category in tree order (0-based): 1…8, then 1… again. */
18
+ function categorySlotForIndex(index) {
19
+ return ((((index % 8) + 8) % 8) + 1);
20
+ }
21
+ /** CSS variables of the palette: --wb-cat-N (swatch), -tint, -slot, -ink. */
22
+ exports.CATEGORY_PALETTE_TOKENS = Object.fromEntries(exports.CATEGORY_PALETTE.flatMap((c, i) => [
23
+ [`--wb-cat-${i + 1}`, c.swatch],
24
+ [`--wb-cat-${i + 1}-tint`, c.tint],
25
+ [`--wb-cat-${i + 1}-slot`, c.slot],
26
+ [`--wb-cat-${i + 1}-ink`, c.ink],
27
+ ]));
package/dist/cjs/index.js CHANGED
@@ -1,11 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.productImageKeptArea = exports.productImageAspectRatio = exports.PRODUCT_IMAGE_FRAMES = exports.posTokensCss = exports.POS_TOKENS = exports.RunnerLoader = void 0;
3
+ exports.productImageKeptArea = exports.productImageAspectRatio = exports.PRODUCT_IMAGE_FRAMES = exports.categorySlotForIndex = exports.DEFAULT_CATEGORY_SLOT = exports.CATEGORY_PALETTE_TOKENS = exports.CATEGORY_PALETTE = exports.posTokensCss = exports.POS_TOKENS = exports.RunnerLoader = void 0;
4
4
  var RunnerLoader_js_1 = require("./RunnerLoader.js");
5
5
  Object.defineProperty(exports, "RunnerLoader", { enumerable: true, get: function () { return RunnerLoader_js_1.RunnerLoader; } });
6
6
  var posTokens_js_1 = require("./posTokens.js");
7
7
  Object.defineProperty(exports, "POS_TOKENS", { enumerable: true, get: function () { return posTokens_js_1.POS_TOKENS; } });
8
8
  Object.defineProperty(exports, "posTokensCss", { enumerable: true, get: function () { return posTokens_js_1.posTokensCss; } });
9
+ var categoryPalette_js_1 = require("./categoryPalette.js");
10
+ Object.defineProperty(exports, "CATEGORY_PALETTE", { enumerable: true, get: function () { return categoryPalette_js_1.CATEGORY_PALETTE; } });
11
+ Object.defineProperty(exports, "CATEGORY_PALETTE_TOKENS", { enumerable: true, get: function () { return categoryPalette_js_1.CATEGORY_PALETTE_TOKENS; } });
12
+ Object.defineProperty(exports, "DEFAULT_CATEGORY_SLOT", { enumerable: true, get: function () { return categoryPalette_js_1.DEFAULT_CATEGORY_SLOT; } });
13
+ Object.defineProperty(exports, "categorySlotForIndex", { enumerable: true, get: function () { return categoryPalette_js_1.categorySlotForIndex; } });
9
14
  var productImageFrames_js_1 = require("./productImageFrames.js");
10
15
  Object.defineProperty(exports, "PRODUCT_IMAGE_FRAMES", { enumerable: true, get: function () { return productImageFrames_js_1.PRODUCT_IMAGE_FRAMES; } });
11
16
  Object.defineProperty(exports, "productImageAspectRatio", { enumerable: true, get: function () { return productImageFrames_js_1.productImageAspectRatio; } });
@@ -13,6 +13,7 @@ exports.posTokensCss = posTokensCss;
13
13
  * pos-ui imports the generated `@welcome-back/brand/pos-tokens.css`; React code
14
14
  * reads `POS_TOKENS`.
15
15
  */
16
+ const categoryPalette_js_1 = require("./categoryPalette.js");
16
17
  exports.POS_TOKENS = {
17
18
  // Monochrome chrome on a warm ivory canvas (pos-ui DESIGN.md §3).
18
19
  "--wb-primary": "#171717",
@@ -24,11 +25,12 @@ exports.POS_TOKENS = {
24
25
  // tokens are complete colors — Tailwind's `/NN` alpha modifier on them
25
26
  // compiles to an invalid rgb() and renders transparent.
26
27
  "--wb-accent-soft": "rgba(23, 23, 23, 0.06)",
27
- // Warm ivory neutrals — the identity. Never cool gray.
28
- "--wb-bg": "#f6f4e9",
28
+ // White page like the dashboard (owner, 2026-10-21); warm neutrals for
29
+ // surfaces and borders. Ivory stays on the ticket, like paper.
30
+ "--wb-bg": "#ffffff",
29
31
  "--wb-surface": "#ffffff",
30
32
  "--wb-surface2": "#f2f1ec",
31
- "--wb-ticket-bg": "#f2f1ec",
33
+ "--wb-ticket-bg": "#f6f4e9",
32
34
  "--wb-border": "#e5e2d6",
33
35
  // Translucent ivory veil for overlays (e.g. "Agotado").
34
36
  "--wb-veil": "rgba(246, 244, 233, 0.72)",
@@ -43,12 +45,44 @@ exports.POS_TOKENS = {
43
45
  "--wb-amber-soft": "rgba(245, 158, 11, 0.15)",
44
46
  "--wb-error": "#ef4444",
45
47
  "--wb-error-soft": "rgba(239, 68, 68, 0.15)",
48
+ // Text on a status tint (the plain status colour is too light to read there).
49
+ "--wb-amber-strong": "#92400e",
50
+ "--wb-error-strong": "#b91c1c",
51
+ // The «Agotado · vuelve mañana» badge.
52
+ "--wb-soldout": "#fef3c7",
53
+ "--wb-soldout-ink": "#713f12",
54
+ // Placeholder and hint text.
55
+ "--wb-faint": "#6e6a5e",
46
56
  "--wb-primary-soft": "rgba(23, 23, 23, 0.15)",
47
57
  // The brand tone. Same as the primary: the POS is monochrome.
48
58
  "--wb-brand": "#171717",
59
+ // 12 px everywhere like the dashboard, 6 px for items inside a control
60
+ // (segmented options). Owner, 2026-10-21.
49
61
  "--wb-radius": "12px",
50
- "--wb-radius-lg": "16px",
51
- "--wb-font": "'Montserrat'",
62
+ "--wb-radius-lg": "12px",
63
+ "--wb-radius-sm": "6px",
64
+ // Touch sizes: the POS differs from the dashboard (36 px) on purpose.
65
+ // 48 px controls, 56 px for money actions (Cobrar, keypad), 44 px floor.
66
+ "--wb-control-height": "48px",
67
+ "--wb-control-height-lg": "56px",
68
+ "--wb-touch-min": "44px",
69
+ // The money keypad: 64 on tablet and phone, 56 on a payment terminal.
70
+ "--wb-keypad-key": "64px",
71
+ "--wb-keypad-key-compact": "56px",
72
+ // Type scale (owner, 2026-10-21). Body is 15 px: the POS is read at arm's
73
+ // length. Money is tabular; below 600 px wide the -narrow sizes apply.
74
+ "--wb-text-money-xl": "48px",
75
+ "--wb-text-money-xl-narrow": "32px",
76
+ "--wb-text-money-lg": "40px",
77
+ "--wb-text-money-lg-narrow": "28px",
78
+ "--wb-text-title": "22px",
79
+ "--wb-text-heading": "18px",
80
+ "--wb-text-body": "15px",
81
+ "--wb-text-small": "13px",
82
+ "--wb-text-caption": "12px",
83
+ "--wb-font": "'Inter'",
84
+ // Category colours: --wb-cat-1 … --wb-cat-8 (+ -tint, -slot, -ink).
85
+ ...categoryPalette_js_1.CATEGORY_PALETTE_TOKENS,
52
86
  };
53
87
  /** The tokens as one CSS rule, for apps that load them as a stylesheet. */
54
88
  function posTokensCss(selector = ":root") {
@@ -0,0 +1,76 @@
1
+ /**
2
+ * The category colours of the POS (owner, 2026-10-21: set F2 is the default).
3
+ * A category stores its slot number (1–8), never a hex, so a later
4
+ * «choose your palette» swaps every category at once. Slot 8 is the neutral
5
+ * default in every set. Catálogo assigns slots in tree order (1…8, 1…) so two
6
+ * neighbours never share a colour; the owner may override.
7
+ *
8
+ * Each colour has four values: swatch (the dot), tint (tile background),
9
+ * slot (photo slot without a photo) and ink (the initials on the slot).
10
+ * Text on a tint is always the foreground (#000) and muted (#404040).
11
+ */
12
+ export interface CategoryColour {
13
+ readonly name: string;
14
+ readonly swatch: string;
15
+ readonly tint: string;
16
+ readonly slot: string;
17
+ readonly ink: string;
18
+ }
19
+ export declare const CATEGORY_PALETTE: readonly [{
20
+ readonly name: "Dorado";
21
+ readonly swatch: "#a07c2b";
22
+ readonly tint: "#f3ecdd";
23
+ readonly slot: "#eae2d0";
24
+ readonly ink: "#785d20";
25
+ }, {
26
+ readonly name: "Azul mar";
27
+ readonly swatch: "#1f81a6";
28
+ readonly tint: "#e2eff4";
29
+ readonly slot: "#cee3eb";
30
+ readonly ink: "#17617c";
31
+ }, {
32
+ readonly name: "Terracota";
33
+ readonly swatch: "#b55a3c";
34
+ readonly tint: "#f5eae6";
35
+ readonly slot: "#efdbd4";
36
+ readonly ink: "#88442d";
37
+ }, {
38
+ readonly name: "Verde";
39
+ readonly swatch: "#458d5c";
40
+ readonly tint: "#e7f0ea";
41
+ readonly slot: "#d6e6db";
42
+ readonly ink: "#346a45";
43
+ }, {
44
+ readonly name: "Ciruela";
45
+ readonly swatch: "#9c5389";
46
+ readonly tint: "#f2e9f0";
47
+ readonly slot: "#e9d9e5";
48
+ readonly ink: "#753e67";
49
+ }, {
50
+ readonly name: "Azul";
51
+ readonly swatch: "#3f6fb5";
52
+ readonly tint: "#e6ecf5";
53
+ readonly slot: "#d5dfef";
54
+ readonly ink: "#2f5388";
55
+ }, {
56
+ readonly name: "Pizarra";
57
+ readonly swatch: "#5e7a80";
58
+ readonly tint: "#eaeeee";
59
+ readonly slot: "#dce2e3";
60
+ readonly ink: "#465c60";
61
+ }, {
62
+ readonly name: "Piedra";
63
+ readonly swatch: "#8a7f6e";
64
+ readonly tint: "#f0eeec";
65
+ readonly slot: "#e5e3df";
66
+ readonly ink: "#685f52";
67
+ }];
68
+ export type CategorySlot = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
69
+ /** The neutral slot a category gets when nothing else applies. */
70
+ export declare const DEFAULT_CATEGORY_SLOT: CategorySlot;
71
+ /** Slot for the n-th category in tree order (0-based): 1…8, then 1… again. */
72
+ export declare function categorySlotForIndex(index: number): CategorySlot;
73
+ type CategoryVar = `--wb-cat-${CategorySlot}${"" | "-tint" | "-slot" | "-ink"}`;
74
+ /** CSS variables of the palette: --wb-cat-N (swatch), -tint, -slot, -ink. */
75
+ export declare const CATEGORY_PALETTE_TOKENS: Record<CategoryVar, string>;
76
+ export {};
@@ -0,0 +1,23 @@
1
+ export const CATEGORY_PALETTE = [
2
+ { name: "Dorado", swatch: "#a07c2b", tint: "#f3ecdd", slot: "#eae2d0", ink: "#785d20" },
3
+ { name: "Azul mar", swatch: "#1f81a6", tint: "#e2eff4", slot: "#cee3eb", ink: "#17617c" },
4
+ { name: "Terracota", swatch: "#b55a3c", tint: "#f5eae6", slot: "#efdbd4", ink: "#88442d" },
5
+ { name: "Verde", swatch: "#458d5c", tint: "#e7f0ea", slot: "#d6e6db", ink: "#346a45" },
6
+ { name: "Ciruela", swatch: "#9c5389", tint: "#f2e9f0", slot: "#e9d9e5", ink: "#753e67" },
7
+ { name: "Azul", swatch: "#3f6fb5", tint: "#e6ecf5", slot: "#d5dfef", ink: "#2f5388" },
8
+ { name: "Pizarra", swatch: "#5e7a80", tint: "#eaeeee", slot: "#dce2e3", ink: "#465c60" },
9
+ { name: "Piedra", swatch: "#8a7f6e", tint: "#f0eeec", slot: "#e5e3df", ink: "#685f52" },
10
+ ];
11
+ /** The neutral slot a category gets when nothing else applies. */
12
+ export const DEFAULT_CATEGORY_SLOT = 8;
13
+ /** Slot for the n-th category in tree order (0-based): 1…8, then 1… again. */
14
+ export function categorySlotForIndex(index) {
15
+ return ((((index % 8) + 8) % 8) + 1);
16
+ }
17
+ /** CSS variables of the palette: --wb-cat-N (swatch), -tint, -slot, -ink. */
18
+ export const CATEGORY_PALETTE_TOKENS = Object.fromEntries(CATEGORY_PALETTE.flatMap((c, i) => [
19
+ [`--wb-cat-${i + 1}`, c.swatch],
20
+ [`--wb-cat-${i + 1}-tint`, c.tint],
21
+ [`--wb-cat-${i + 1}-slot`, c.slot],
22
+ [`--wb-cat-${i + 1}-ink`, c.ink],
23
+ ]));
@@ -2,5 +2,7 @@ export { RunnerLoader } from "./RunnerLoader.js";
2
2
  export type { RunnerLoaderProps } from "./RunnerLoader.js";
3
3
  export { POS_TOKENS, posTokensCss } from "./posTokens.js";
4
4
  export type { PosToken } from "./posTokens.js";
5
+ export { CATEGORY_PALETTE, CATEGORY_PALETTE_TOKENS, DEFAULT_CATEGORY_SLOT, categorySlotForIndex, } from "./categoryPalette.js";
6
+ export type { CategoryColour, CategorySlot } from "./categoryPalette.js";
5
7
  export { PRODUCT_IMAGE_FRAMES, productImageAspectRatio, productImageKeptArea, } from "./productImageFrames.js";
6
8
  export type { ProductImageFrame } from "./productImageFrames.js";
package/dist/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { RunnerLoader } from "./RunnerLoader.js";
2
2
  export { POS_TOKENS, posTokensCss } from "./posTokens.js";
3
+ export { CATEGORY_PALETTE, CATEGORY_PALETTE_TOKENS, DEFAULT_CATEGORY_SLOT, categorySlotForIndex, } from "./categoryPalette.js";
3
4
  export { PRODUCT_IMAGE_FRAMES, productImageAspectRatio, productImageKeptArea, } from "./productImageFrames.js";
@@ -1,24 +1,45 @@
1
- /**
2
- * The WelcomeBack POS look: the CSS custom properties pos-ui paints with, and
3
- * the ones the dashboard's POS / KDS previews copy. One source, so a preview
4
- * can never drift from the register.
5
- *
6
- * The POS is not themable (owner decision, 2026-09-28): every business gets
7
- * this same look. Nothing overrides these per tenant.
8
- *
9
- * pos-ui imports the generated `@welcome-back/brand/pos-tokens.css`; React code
10
- * reads `POS_TOKENS`.
11
- */
12
1
  export declare const POS_TOKENS: {
2
+ readonly "--wb-cat-1": string;
3
+ readonly "--wb-cat-1-tint": string;
4
+ readonly "--wb-cat-1-slot": string;
5
+ readonly "--wb-cat-1-ink": string;
6
+ readonly "--wb-cat-8": string;
7
+ readonly "--wb-cat-8-tint": string;
8
+ readonly "--wb-cat-8-slot": string;
9
+ readonly "--wb-cat-8-ink": string;
10
+ readonly "--wb-cat-2": string;
11
+ readonly "--wb-cat-2-tint": string;
12
+ readonly "--wb-cat-2-slot": string;
13
+ readonly "--wb-cat-2-ink": string;
14
+ readonly "--wb-cat-3": string;
15
+ readonly "--wb-cat-3-tint": string;
16
+ readonly "--wb-cat-3-slot": string;
17
+ readonly "--wb-cat-3-ink": string;
18
+ readonly "--wb-cat-4": string;
19
+ readonly "--wb-cat-4-tint": string;
20
+ readonly "--wb-cat-4-slot": string;
21
+ readonly "--wb-cat-4-ink": string;
22
+ readonly "--wb-cat-5": string;
23
+ readonly "--wb-cat-5-tint": string;
24
+ readonly "--wb-cat-5-slot": string;
25
+ readonly "--wb-cat-5-ink": string;
26
+ readonly "--wb-cat-6": string;
27
+ readonly "--wb-cat-6-tint": string;
28
+ readonly "--wb-cat-6-slot": string;
29
+ readonly "--wb-cat-6-ink": string;
30
+ readonly "--wb-cat-7": string;
31
+ readonly "--wb-cat-7-tint": string;
32
+ readonly "--wb-cat-7-slot": string;
33
+ readonly "--wb-cat-7-ink": string;
13
34
  readonly "--wb-primary": "#171717";
14
35
  readonly "--wb-accent": "#171717";
15
36
  readonly "--wb-on-accent": "#ffffff";
16
37
  readonly "--wb-on-accent-soft": "rgba(255, 255, 255, 0.2)";
17
38
  readonly "--wb-accent-soft": "rgba(23, 23, 23, 0.06)";
18
- readonly "--wb-bg": "#f6f4e9";
39
+ readonly "--wb-bg": "#ffffff";
19
40
  readonly "--wb-surface": "#ffffff";
20
41
  readonly "--wb-surface2": "#f2f1ec";
21
- readonly "--wb-ticket-bg": "#f2f1ec";
42
+ readonly "--wb-ticket-bg": "#f6f4e9";
22
43
  readonly "--wb-border": "#e5e2d6";
23
44
  readonly "--wb-veil": "rgba(246, 244, 233, 0.72)";
24
45
  readonly "--wb-text": "#000000";
@@ -30,11 +51,31 @@ export declare const POS_TOKENS: {
30
51
  readonly "--wb-amber-soft": "rgba(245, 158, 11, 0.15)";
31
52
  readonly "--wb-error": "#ef4444";
32
53
  readonly "--wb-error-soft": "rgba(239, 68, 68, 0.15)";
54
+ readonly "--wb-amber-strong": "#92400e";
55
+ readonly "--wb-error-strong": "#b91c1c";
56
+ readonly "--wb-soldout": "#fef3c7";
57
+ readonly "--wb-soldout-ink": "#713f12";
58
+ readonly "--wb-faint": "#6e6a5e";
33
59
  readonly "--wb-primary-soft": "rgba(23, 23, 23, 0.15)";
34
60
  readonly "--wb-brand": "#171717";
35
61
  readonly "--wb-radius": "12px";
36
- readonly "--wb-radius-lg": "16px";
37
- readonly "--wb-font": "'Montserrat'";
62
+ readonly "--wb-radius-lg": "12px";
63
+ readonly "--wb-radius-sm": "6px";
64
+ readonly "--wb-control-height": "48px";
65
+ readonly "--wb-control-height-lg": "56px";
66
+ readonly "--wb-touch-min": "44px";
67
+ readonly "--wb-keypad-key": "64px";
68
+ readonly "--wb-keypad-key-compact": "56px";
69
+ readonly "--wb-text-money-xl": "48px";
70
+ readonly "--wb-text-money-xl-narrow": "32px";
71
+ readonly "--wb-text-money-lg": "40px";
72
+ readonly "--wb-text-money-lg-narrow": "28px";
73
+ readonly "--wb-text-title": "22px";
74
+ readonly "--wb-text-heading": "18px";
75
+ readonly "--wb-text-body": "15px";
76
+ readonly "--wb-text-small": "13px";
77
+ readonly "--wb-text-caption": "12px";
78
+ readonly "--wb-font": "'Inter'";
38
79
  };
39
80
  export type PosToken = keyof typeof POS_TOKENS;
40
81
  /** The tokens as one CSS rule, for apps that load them as a stylesheet. */
@@ -9,6 +9,7 @@
9
9
  * pos-ui imports the generated `@welcome-back/brand/pos-tokens.css`; React code
10
10
  * reads `POS_TOKENS`.
11
11
  */
12
+ import { CATEGORY_PALETTE_TOKENS } from "./categoryPalette.js";
12
13
  export const POS_TOKENS = {
13
14
  // Monochrome chrome on a warm ivory canvas (pos-ui DESIGN.md §3).
14
15
  "--wb-primary": "#171717",
@@ -20,11 +21,12 @@ export const POS_TOKENS = {
20
21
  // tokens are complete colors — Tailwind's `/NN` alpha modifier on them
21
22
  // compiles to an invalid rgb() and renders transparent.
22
23
  "--wb-accent-soft": "rgba(23, 23, 23, 0.06)",
23
- // Warm ivory neutrals — the identity. Never cool gray.
24
- "--wb-bg": "#f6f4e9",
24
+ // White page like the dashboard (owner, 2026-10-21); warm neutrals for
25
+ // surfaces and borders. Ivory stays on the ticket, like paper.
26
+ "--wb-bg": "#ffffff",
25
27
  "--wb-surface": "#ffffff",
26
28
  "--wb-surface2": "#f2f1ec",
27
- "--wb-ticket-bg": "#f2f1ec",
29
+ "--wb-ticket-bg": "#f6f4e9",
28
30
  "--wb-border": "#e5e2d6",
29
31
  // Translucent ivory veil for overlays (e.g. "Agotado").
30
32
  "--wb-veil": "rgba(246, 244, 233, 0.72)",
@@ -39,12 +41,44 @@ export const POS_TOKENS = {
39
41
  "--wb-amber-soft": "rgba(245, 158, 11, 0.15)",
40
42
  "--wb-error": "#ef4444",
41
43
  "--wb-error-soft": "rgba(239, 68, 68, 0.15)",
44
+ // Text on a status tint (the plain status colour is too light to read there).
45
+ "--wb-amber-strong": "#92400e",
46
+ "--wb-error-strong": "#b91c1c",
47
+ // The «Agotado · vuelve mañana» badge.
48
+ "--wb-soldout": "#fef3c7",
49
+ "--wb-soldout-ink": "#713f12",
50
+ // Placeholder and hint text.
51
+ "--wb-faint": "#6e6a5e",
42
52
  "--wb-primary-soft": "rgba(23, 23, 23, 0.15)",
43
53
  // The brand tone. Same as the primary: the POS is monochrome.
44
54
  "--wb-brand": "#171717",
55
+ // 12 px everywhere like the dashboard, 6 px for items inside a control
56
+ // (segmented options). Owner, 2026-10-21.
45
57
  "--wb-radius": "12px",
46
- "--wb-radius-lg": "16px",
47
- "--wb-font": "'Montserrat'",
58
+ "--wb-radius-lg": "12px",
59
+ "--wb-radius-sm": "6px",
60
+ // Touch sizes: the POS differs from the dashboard (36 px) on purpose.
61
+ // 48 px controls, 56 px for money actions (Cobrar, keypad), 44 px floor.
62
+ "--wb-control-height": "48px",
63
+ "--wb-control-height-lg": "56px",
64
+ "--wb-touch-min": "44px",
65
+ // The money keypad: 64 on tablet and phone, 56 on a payment terminal.
66
+ "--wb-keypad-key": "64px",
67
+ "--wb-keypad-key-compact": "56px",
68
+ // Type scale (owner, 2026-10-21). Body is 15 px: the POS is read at arm's
69
+ // length. Money is tabular; below 600 px wide the -narrow sizes apply.
70
+ "--wb-text-money-xl": "48px",
71
+ "--wb-text-money-xl-narrow": "32px",
72
+ "--wb-text-money-lg": "40px",
73
+ "--wb-text-money-lg-narrow": "28px",
74
+ "--wb-text-title": "22px",
75
+ "--wb-text-heading": "18px",
76
+ "--wb-text-body": "15px",
77
+ "--wb-text-small": "13px",
78
+ "--wb-text-caption": "12px",
79
+ "--wb-font": "'Inter'",
80
+ // Category colours: --wb-cat-1 … --wb-cat-8 (+ -tint, -slot, -ink).
81
+ ...CATEGORY_PALETTE_TOKENS,
48
82
  };
49
83
  /** The tokens as one CSS rule, for apps that load them as a stylesheet. */
50
84
  export function posTokensCss(selector = ":root") {
@@ -5,10 +5,10 @@
5
5
  --wb-on-accent: #ffffff;
6
6
  --wb-on-accent-soft: rgba(255, 255, 255, 0.2);
7
7
  --wb-accent-soft: rgba(23, 23, 23, 0.06);
8
- --wb-bg: #f6f4e9;
8
+ --wb-bg: #ffffff;
9
9
  --wb-surface: #ffffff;
10
10
  --wb-surface2: #f2f1ec;
11
- --wb-ticket-bg: #f2f1ec;
11
+ --wb-ticket-bg: #f6f4e9;
12
12
  --wb-border: #e5e2d6;
13
13
  --wb-veil: rgba(246, 244, 233, 0.72);
14
14
  --wb-text: #000000;
@@ -20,9 +20,61 @@
20
20
  --wb-amber-soft: rgba(245, 158, 11, 0.15);
21
21
  --wb-error: #ef4444;
22
22
  --wb-error-soft: rgba(239, 68, 68, 0.15);
23
+ --wb-amber-strong: #92400e;
24
+ --wb-error-strong: #b91c1c;
25
+ --wb-soldout: #fef3c7;
26
+ --wb-soldout-ink: #713f12;
27
+ --wb-faint: #6e6a5e;
23
28
  --wb-primary-soft: rgba(23, 23, 23, 0.15);
24
29
  --wb-brand: #171717;
25
30
  --wb-radius: 12px;
26
- --wb-radius-lg: 16px;
27
- --wb-font: 'Montserrat';
31
+ --wb-radius-lg: 12px;
32
+ --wb-radius-sm: 6px;
33
+ --wb-control-height: 48px;
34
+ --wb-control-height-lg: 56px;
35
+ --wb-touch-min: 44px;
36
+ --wb-keypad-key: 64px;
37
+ --wb-keypad-key-compact: 56px;
38
+ --wb-text-money-xl: 48px;
39
+ --wb-text-money-xl-narrow: 32px;
40
+ --wb-text-money-lg: 40px;
41
+ --wb-text-money-lg-narrow: 28px;
42
+ --wb-text-title: 22px;
43
+ --wb-text-heading: 18px;
44
+ --wb-text-body: 15px;
45
+ --wb-text-small: 13px;
46
+ --wb-text-caption: 12px;
47
+ --wb-font: 'Inter';
48
+ --wb-cat-1: #a07c2b;
49
+ --wb-cat-1-tint: #f3ecdd;
50
+ --wb-cat-1-slot: #eae2d0;
51
+ --wb-cat-1-ink: #785d20;
52
+ --wb-cat-2: #1f81a6;
53
+ --wb-cat-2-tint: #e2eff4;
54
+ --wb-cat-2-slot: #cee3eb;
55
+ --wb-cat-2-ink: #17617c;
56
+ --wb-cat-3: #b55a3c;
57
+ --wb-cat-3-tint: #f5eae6;
58
+ --wb-cat-3-slot: #efdbd4;
59
+ --wb-cat-3-ink: #88442d;
60
+ --wb-cat-4: #458d5c;
61
+ --wb-cat-4-tint: #e7f0ea;
62
+ --wb-cat-4-slot: #d6e6db;
63
+ --wb-cat-4-ink: #346a45;
64
+ --wb-cat-5: #9c5389;
65
+ --wb-cat-5-tint: #f2e9f0;
66
+ --wb-cat-5-slot: #e9d9e5;
67
+ --wb-cat-5-ink: #753e67;
68
+ --wb-cat-6: #3f6fb5;
69
+ --wb-cat-6-tint: #e6ecf5;
70
+ --wb-cat-6-slot: #d5dfef;
71
+ --wb-cat-6-ink: #2f5388;
72
+ --wb-cat-7: #5e7a80;
73
+ --wb-cat-7-tint: #eaeeee;
74
+ --wb-cat-7-slot: #dce2e3;
75
+ --wb-cat-7-ink: #465c60;
76
+ --wb-cat-8: #8a7f6e;
77
+ --wb-cat-8-tint: #f0eeec;
78
+ --wb-cat-8-slot: #e5e3df;
79
+ --wb-cat-8-ink: #685f52;
28
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@welcome-back/brand",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "WelcomeBack brand assets for React apps: the running-W loader and the POS design tokens.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {