@welcome-back/brand 0.5.0 → 0.6.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.
- package/README.md +12 -0
- package/dist/cjs/categoryPalette.js +27 -0
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/posTokens.js +27 -0
- package/dist/esm/categoryPalette.d.ts +76 -0
- package/dist/esm/categoryPalette.js +23 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/posTokens.d.ts +49 -11
- package/dist/esm/posTokens.js +27 -0
- package/dist/pos-tokens.css +49 -0
- package/package.json +1 -1
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; } });
|
package/dist/cjs/posTokens.js
CHANGED
|
@@ -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",
|
|
@@ -44,7 +45,17 @@ exports.POS_TOKENS = {
|
|
|
44
45
|
"--wb-amber-soft": "rgba(245, 158, 11, 0.15)",
|
|
45
46
|
"--wb-error": "#ef4444",
|
|
46
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",
|
|
47
56
|
"--wb-primary-soft": "rgba(23, 23, 23, 0.15)",
|
|
57
|
+
// The keyboard focus ring (3 px), pos-ui `.focus-ring`. Paper C1.
|
|
58
|
+
"--wb-ring-soft": "rgba(23, 23, 23, 0.5)",
|
|
48
59
|
// The brand tone. Same as the primary: the POS is monochrome.
|
|
49
60
|
"--wb-brand": "#171717",
|
|
50
61
|
// 12 px everywhere like the dashboard, 6 px for items inside a control
|
|
@@ -57,7 +68,23 @@ exports.POS_TOKENS = {
|
|
|
57
68
|
"--wb-control-height": "48px",
|
|
58
69
|
"--wb-control-height-lg": "56px",
|
|
59
70
|
"--wb-touch-min": "44px",
|
|
71
|
+
// The money keypad: 64 on tablet and phone, 56 on a payment terminal.
|
|
72
|
+
"--wb-keypad-key": "64px",
|
|
73
|
+
"--wb-keypad-key-compact": "56px",
|
|
74
|
+
// Type scale (owner, 2026-10-21). Body is 15 px: the POS is read at arm's
|
|
75
|
+
// length. Money is tabular; below 600 px wide the -narrow sizes apply.
|
|
76
|
+
"--wb-text-money-xl": "48px",
|
|
77
|
+
"--wb-text-money-xl-narrow": "32px",
|
|
78
|
+
"--wb-text-money-lg": "40px",
|
|
79
|
+
"--wb-text-money-lg-narrow": "28px",
|
|
80
|
+
"--wb-text-title": "22px",
|
|
81
|
+
"--wb-text-heading": "18px",
|
|
82
|
+
"--wb-text-body": "15px",
|
|
83
|
+
"--wb-text-small": "13px",
|
|
84
|
+
"--wb-text-caption": "12px",
|
|
60
85
|
"--wb-font": "'Inter'",
|
|
86
|
+
// Category colours: --wb-cat-1 … --wb-cat-8 (+ -tint, -slot, -ink).
|
|
87
|
+
...categoryPalette_js_1.CATEGORY_PALETTE_TOKENS,
|
|
61
88
|
};
|
|
62
89
|
/** The tokens as one CSS rule, for apps that load them as a stylesheet. */
|
|
63
90
|
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
|
+
]));
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/esm/posTokens.d.ts
CHANGED
|
@@ -1,15 +1,36 @@
|
|
|
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";
|
|
@@ -30,7 +51,13 @@ 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)";
|
|
60
|
+
readonly "--wb-ring-soft": "rgba(23, 23, 23, 0.5)";
|
|
34
61
|
readonly "--wb-brand": "#171717";
|
|
35
62
|
readonly "--wb-radius": "12px";
|
|
36
63
|
readonly "--wb-radius-lg": "12px";
|
|
@@ -38,6 +65,17 @@ export declare const POS_TOKENS: {
|
|
|
38
65
|
readonly "--wb-control-height": "48px";
|
|
39
66
|
readonly "--wb-control-height-lg": "56px";
|
|
40
67
|
readonly "--wb-touch-min": "44px";
|
|
68
|
+
readonly "--wb-keypad-key": "64px";
|
|
69
|
+
readonly "--wb-keypad-key-compact": "56px";
|
|
70
|
+
readonly "--wb-text-money-xl": "48px";
|
|
71
|
+
readonly "--wb-text-money-xl-narrow": "32px";
|
|
72
|
+
readonly "--wb-text-money-lg": "40px";
|
|
73
|
+
readonly "--wb-text-money-lg-narrow": "28px";
|
|
74
|
+
readonly "--wb-text-title": "22px";
|
|
75
|
+
readonly "--wb-text-heading": "18px";
|
|
76
|
+
readonly "--wb-text-body": "15px";
|
|
77
|
+
readonly "--wb-text-small": "13px";
|
|
78
|
+
readonly "--wb-text-caption": "12px";
|
|
41
79
|
readonly "--wb-font": "'Inter'";
|
|
42
80
|
};
|
|
43
81
|
export type PosToken = keyof typeof POS_TOKENS;
|
package/dist/esm/posTokens.js
CHANGED
|
@@ -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",
|
|
@@ -40,7 +41,17 @@ export const POS_TOKENS = {
|
|
|
40
41
|
"--wb-amber-soft": "rgba(245, 158, 11, 0.15)",
|
|
41
42
|
"--wb-error": "#ef4444",
|
|
42
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",
|
|
43
52
|
"--wb-primary-soft": "rgba(23, 23, 23, 0.15)",
|
|
53
|
+
// The keyboard focus ring (3 px), pos-ui `.focus-ring`. Paper C1.
|
|
54
|
+
"--wb-ring-soft": "rgba(23, 23, 23, 0.5)",
|
|
44
55
|
// The brand tone. Same as the primary: the POS is monochrome.
|
|
45
56
|
"--wb-brand": "#171717",
|
|
46
57
|
// 12 px everywhere like the dashboard, 6 px for items inside a control
|
|
@@ -53,7 +64,23 @@ export const POS_TOKENS = {
|
|
|
53
64
|
"--wb-control-height": "48px",
|
|
54
65
|
"--wb-control-height-lg": "56px",
|
|
55
66
|
"--wb-touch-min": "44px",
|
|
67
|
+
// The money keypad: 64 on tablet and phone, 56 on a payment terminal.
|
|
68
|
+
"--wb-keypad-key": "64px",
|
|
69
|
+
"--wb-keypad-key-compact": "56px",
|
|
70
|
+
// Type scale (owner, 2026-10-21). Body is 15 px: the POS is read at arm's
|
|
71
|
+
// length. Money is tabular; below 600 px wide the -narrow sizes apply.
|
|
72
|
+
"--wb-text-money-xl": "48px",
|
|
73
|
+
"--wb-text-money-xl-narrow": "32px",
|
|
74
|
+
"--wb-text-money-lg": "40px",
|
|
75
|
+
"--wb-text-money-lg-narrow": "28px",
|
|
76
|
+
"--wb-text-title": "22px",
|
|
77
|
+
"--wb-text-heading": "18px",
|
|
78
|
+
"--wb-text-body": "15px",
|
|
79
|
+
"--wb-text-small": "13px",
|
|
80
|
+
"--wb-text-caption": "12px",
|
|
56
81
|
"--wb-font": "'Inter'",
|
|
82
|
+
// Category colours: --wb-cat-1 … --wb-cat-8 (+ -tint, -slot, -ink).
|
|
83
|
+
...CATEGORY_PALETTE_TOKENS,
|
|
57
84
|
};
|
|
58
85
|
/** The tokens as one CSS rule, for apps that load them as a stylesheet. */
|
|
59
86
|
export function posTokensCss(selector = ":root") {
|
package/dist/pos-tokens.css
CHANGED
|
@@ -20,7 +20,13 @@
|
|
|
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);
|
|
29
|
+
--wb-ring-soft: rgba(23, 23, 23, 0.5);
|
|
24
30
|
--wb-brand: #171717;
|
|
25
31
|
--wb-radius: 12px;
|
|
26
32
|
--wb-radius-lg: 12px;
|
|
@@ -28,5 +34,48 @@
|
|
|
28
34
|
--wb-control-height: 48px;
|
|
29
35
|
--wb-control-height-lg: 56px;
|
|
30
36
|
--wb-touch-min: 44px;
|
|
37
|
+
--wb-keypad-key: 64px;
|
|
38
|
+
--wb-keypad-key-compact: 56px;
|
|
39
|
+
--wb-text-money-xl: 48px;
|
|
40
|
+
--wb-text-money-xl-narrow: 32px;
|
|
41
|
+
--wb-text-money-lg: 40px;
|
|
42
|
+
--wb-text-money-lg-narrow: 28px;
|
|
43
|
+
--wb-text-title: 22px;
|
|
44
|
+
--wb-text-heading: 18px;
|
|
45
|
+
--wb-text-body: 15px;
|
|
46
|
+
--wb-text-small: 13px;
|
|
47
|
+
--wb-text-caption: 12px;
|
|
31
48
|
--wb-font: 'Inter';
|
|
49
|
+
--wb-cat-1: #a07c2b;
|
|
50
|
+
--wb-cat-1-tint: #f3ecdd;
|
|
51
|
+
--wb-cat-1-slot: #eae2d0;
|
|
52
|
+
--wb-cat-1-ink: #785d20;
|
|
53
|
+
--wb-cat-2: #1f81a6;
|
|
54
|
+
--wb-cat-2-tint: #e2eff4;
|
|
55
|
+
--wb-cat-2-slot: #cee3eb;
|
|
56
|
+
--wb-cat-2-ink: #17617c;
|
|
57
|
+
--wb-cat-3: #b55a3c;
|
|
58
|
+
--wb-cat-3-tint: #f5eae6;
|
|
59
|
+
--wb-cat-3-slot: #efdbd4;
|
|
60
|
+
--wb-cat-3-ink: #88442d;
|
|
61
|
+
--wb-cat-4: #458d5c;
|
|
62
|
+
--wb-cat-4-tint: #e7f0ea;
|
|
63
|
+
--wb-cat-4-slot: #d6e6db;
|
|
64
|
+
--wb-cat-4-ink: #346a45;
|
|
65
|
+
--wb-cat-5: #9c5389;
|
|
66
|
+
--wb-cat-5-tint: #f2e9f0;
|
|
67
|
+
--wb-cat-5-slot: #e9d9e5;
|
|
68
|
+
--wb-cat-5-ink: #753e67;
|
|
69
|
+
--wb-cat-6: #3f6fb5;
|
|
70
|
+
--wb-cat-6-tint: #e6ecf5;
|
|
71
|
+
--wb-cat-6-slot: #d5dfef;
|
|
72
|
+
--wb-cat-6-ink: #2f5388;
|
|
73
|
+
--wb-cat-7: #5e7a80;
|
|
74
|
+
--wb-cat-7-tint: #eaeeee;
|
|
75
|
+
--wb-cat-7-slot: #dce2e3;
|
|
76
|
+
--wb-cat-7-ink: #465c60;
|
|
77
|
+
--wb-cat-8: #8a7f6e;
|
|
78
|
+
--wb-cat-8-tint: #f0eeec;
|
|
79
|
+
--wb-cat-8-slot: #e5e3df;
|
|
80
|
+
--wb-cat-8-ink: #685f52;
|
|
32
81
|
}
|