@welcome-back/brand 0.11.0 → 0.13.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 +106 -3
- package/dist/cjs/IllustratedIcon.js +18 -0
- package/dist/cjs/ModuleIcon.js +63 -0
- package/dist/cjs/illustratedArt.generated.js +993 -0
- package/dist/cjs/illustrationColours.js +27 -0
- package/dist/cjs/index.js +9 -1
- package/dist/esm/IllustratedIcon.d.ts +16 -0
- package/dist/esm/IllustratedIcon.js +14 -0
- package/dist/esm/ModuleIcon.d.ts +27 -0
- package/dist/esm/ModuleIcon.js +59 -0
- package/dist/esm/categoryPalette.d.ts +2 -2
- package/dist/esm/illustratedArt.generated.d.ts +528 -0
- package/dist/esm/illustratedArt.generated.js +990 -0
- package/dist/esm/illustrationColours.d.ts +25 -0
- package/dist/esm/illustrationColours.js +24 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/posTokens.d.ts +16 -16
- package/package.json +3 -3
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ILLUSTRATION_COLOURS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Colours of the illustrated icons (Paper 01M72Y4K1ZCAWQ5WGA3CD16CFN, style of
|
|
6
|
+
* the weekly product email). The same values are the `--color-illus-*` tokens
|
|
7
|
+
* in the wb-ui design system file.
|
|
8
|
+
*
|
|
9
|
+
* Drawings only. Soft colours are for art, strong colours are for app
|
|
10
|
+
* messages: never use these as status colours, and never put coral on a badge
|
|
11
|
+
* or a pill with a number (it reads as an error or a notification).
|
|
12
|
+
*/
|
|
13
|
+
exports.ILLUSTRATION_COLOURS = {
|
|
14
|
+
ink: "#1D1D1F",
|
|
15
|
+
paper: "#FFFAF0",
|
|
16
|
+
paperBorder: "#EDEADE",
|
|
17
|
+
paperShade: "#F1EADB",
|
|
18
|
+
shadow: "#1D1D1F12",
|
|
19
|
+
muted: "#1D1D1F55",
|
|
20
|
+
white: "#FFFFFF",
|
|
21
|
+
yellow: "#FFE45C",
|
|
22
|
+
green: "#BFD98A",
|
|
23
|
+
coral: "#F07B5A",
|
|
24
|
+
crust: "#F2D49B",
|
|
25
|
+
kraft: "#E3BE7A",
|
|
26
|
+
kraftDark: "#C9A060",
|
|
27
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.productImageKeptArea = exports.productImageAspectRatio = exports.PRODUCT_IMAGE_FRAMES = exports.categorySlotForIndex = exports.DEFAULT_CATEGORY_SLOT = exports.CATEGORY_PALETTE_TOKENS = exports.CATEGORY_PALETTE_DARK_TOKENS = exports.CATEGORY_PALETTE_DARK = exports.CATEGORY_PALETTE = exports.posTokensCss = exports.posDarkTokensCss = exports.POS_WIDE_MIN_WIDTH = exports.POS_TOKENS = exports.POS_DARK_TOKENS = exports.POS_DARK_CLASS = 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_DARK_TOKENS = exports.CATEGORY_PALETTE_DARK = exports.CATEGORY_PALETTE = exports.posTokensCss = exports.posDarkTokensCss = exports.POS_WIDE_MIN_WIDTH = exports.POS_TOKENS = exports.POS_DARK_TOKENS = exports.POS_DARK_CLASS = exports.ILLUSTRATION_COLOURS = exports.ILLUSTRATED_ICONS = exports.IllustratedIcon = exports.MODULE_ICON_NAMES = exports.ModuleIcon = 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
|
+
var ModuleIcon_js_1 = require("./ModuleIcon.js");
|
|
7
|
+
Object.defineProperty(exports, "ModuleIcon", { enumerable: true, get: function () { return ModuleIcon_js_1.ModuleIcon; } });
|
|
8
|
+
Object.defineProperty(exports, "MODULE_ICON_NAMES", { enumerable: true, get: function () { return ModuleIcon_js_1.MODULE_ICON_NAMES; } });
|
|
9
|
+
var IllustratedIcon_js_1 = require("./IllustratedIcon.js");
|
|
10
|
+
Object.defineProperty(exports, "IllustratedIcon", { enumerable: true, get: function () { return IllustratedIcon_js_1.IllustratedIcon; } });
|
|
11
|
+
Object.defineProperty(exports, "ILLUSTRATED_ICONS", { enumerable: true, get: function () { return IllustratedIcon_js_1.ILLUSTRATED_ICONS; } });
|
|
12
|
+
var illustrationColours_js_1 = require("./illustrationColours.js");
|
|
13
|
+
Object.defineProperty(exports, "ILLUSTRATION_COLOURS", { enumerable: true, get: function () { return illustrationColours_js_1.ILLUSTRATION_COLOURS; } });
|
|
6
14
|
var posTokens_js_1 = require("./posTokens.js");
|
|
7
15
|
Object.defineProperty(exports, "POS_DARK_CLASS", { enumerable: true, get: function () { return posTokens_js_1.POS_DARK_CLASS; } });
|
|
8
16
|
Object.defineProperty(exports, "POS_DARK_TOKENS", { enumerable: true, get: function () { return posTokens_js_1.POS_DARK_TOKENS; } });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ILLUSTRATED_ICONS } from "./illustratedArt.generated.js";
|
|
2
|
+
export { ILLUSTRATED_ICONS };
|
|
3
|
+
export type IllustratedIconName = (typeof ILLUSTRATED_ICONS)[number]["name"];
|
|
4
|
+
export interface IllustratedIconProps {
|
|
5
|
+
name: IllustratedIconName;
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Accessible name. Without it the icon is decorative (aria-hidden). */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Draw the cream tile (default). `false` only on white areas. */
|
|
10
|
+
tile?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An illustrated icon (source: src/illustrations/<name>.svg). Size it with
|
|
14
|
+
* width (it is square). Reads well from 48 px; under that, use a line icon.
|
|
15
|
+
*/
|
|
16
|
+
export declare function IllustratedIcon({ name, className, label, tile }: IllustratedIconProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ILLUSTRATED_ART, ILLUSTRATED_ICONS } from "./illustratedArt.generated.js";
|
|
3
|
+
import { ILLUSTRATION_COLOURS as C } from "./illustrationColours.js";
|
|
4
|
+
export { ILLUSTRATED_ICONS };
|
|
5
|
+
/**
|
|
6
|
+
* An illustrated icon (source: src/illustrations/<name>.svg). Size it with
|
|
7
|
+
* width (it is square). Reads well from 48 px; under that, use a line icon.
|
|
8
|
+
*/
|
|
9
|
+
export function IllustratedIcon({ name, className, label, tile = true }) {
|
|
10
|
+
const a11y = label
|
|
11
|
+
? { role: "img", "aria-label": label }
|
|
12
|
+
: { "aria-hidden": true };
|
|
13
|
+
return (_jsxs("svg", { viewBox: "0 0 120 120", className: className ? `wb-illustrated-icon ${className}` : "wb-illustrated-icon", strokeLinecap: "round", strokeLinejoin: "round", ...a11y, children: [tile && (_jsx("rect", { x: "0.5", y: "0.5", width: "119", height: "119", rx: "30", fill: C.paper, stroke: C.paperBorder })), _jsx("g", { dangerouslySetInnerHTML: { __html: ILLUSTRATED_ART[name] } })] }));
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const ART: {
|
|
2
|
+
actividad: import("react").JSX.Element;
|
|
3
|
+
reporteria: import("react").JSX.Element;
|
|
4
|
+
finanzas: import("react").JSX.Element;
|
|
5
|
+
catalogo: import("react").JSX.Element;
|
|
6
|
+
canales: import("react").JSX.Element;
|
|
7
|
+
operaciones: import("react").JSX.Element;
|
|
8
|
+
fidelizacion: import("react").JSX.Element;
|
|
9
|
+
marketing: import("react").JSX.Element;
|
|
10
|
+
reputacion: import("react").JSX.Element;
|
|
11
|
+
configuracion: import("react").JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export type ModuleIconName = keyof typeof ART;
|
|
14
|
+
/** The dashboard modules that have an icon, in home-grid order. */
|
|
15
|
+
export declare const MODULE_ICON_NAMES: ModuleIconName[];
|
|
16
|
+
export interface ModuleIconProps {
|
|
17
|
+
name: ModuleIconName;
|
|
18
|
+
className?: string;
|
|
19
|
+
/** Accessible name. Without it the icon is decorative (aria-hidden). */
|
|
20
|
+
label?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* An illustrated dashboard-module icon on its cream tile. Size it with width
|
|
24
|
+
* (it is square). Reads well from 48 px; under that, use a line icon.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ModuleIcon({ name, className, label }: ModuleIconProps): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ILLUSTRATION_COLOURS as C } from "./illustrationColours.js";
|
|
3
|
+
const K = C.ink;
|
|
4
|
+
const W = C.white;
|
|
5
|
+
/** 2 px outline, 1.75 px detail, 1.5 px fine detail, in 120-unit art space. */
|
|
6
|
+
const line = (width = 2) => ({ stroke: K, strokeWidth: width });
|
|
7
|
+
const SPARK = { fill: "none", ...line(1.75) };
|
|
8
|
+
const STAR = "M0 -6 L1.76 -2.43 L5.71 -1.85 L2.85 0.93 L3.53 4.85 L0 3 L-3.53 4.85 L-2.85 0.93 L-5.71 -1.85 L-1.76 -2.43 Z";
|
|
9
|
+
// A coffee cup stamp on the loyalty card.
|
|
10
|
+
const CUP = (x, y) => `M${x - 2.5} ${y - 1.4}h4.2v1.8a2.1 2.1 0 0 1-4.2 0z M${x + 1.7} ${y - 0.9}a1.2 1.2 0 0 1 0 2.4`;
|
|
11
|
+
const coinStack = [86, 78, 70].map((y, i) => (_jsxs("g", { children: [_jsx("rect", { x: "72", y: y, width: "28", height: "6", fill: C.yellow }), _jsx("path", { d: `M72 ${y} V${y + 6} M100 ${y} V${y + 6}`, ...line() }), i === 0 ? (_jsx("ellipse", { cx: "86", cy: y + 6, rx: "14", ry: "4.5", fill: C.yellow, ...line() })) : (_jsx("path", { d: `M72 ${y + 6} A14 4.5 0 0 0 100 ${y + 6}`, fill: C.yellow, ...line() })), _jsx("ellipse", { cx: "86", cy: y, rx: "14", ry: "4.5", fill: C.yellow, ...line() })] }, y)));
|
|
12
|
+
const ART = {
|
|
13
|
+
// The shop: the business live today.
|
|
14
|
+
actividad: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "26", y: "44", width: "68", height: "52", fill: W, ...line() }), _jsx("rect", { x: "34", y: "56", width: "24", height: "22", rx: "3", fill: W, ...line(1.75) }), _jsx("path", { d: "M40 56 L42 65 M52 56 L50 65", fill: "none", ...line(1.25) }), _jsx("rect", { x: "37", y: "65", width: "18", height: "8", rx: "2", fill: C.green, ...line(1.5) }), _jsx("rect", { x: "66", y: "60", width: "20", height: "36", rx: "2", fill: C.yellow, ...line() }), _jsx("circle", { cx: "71", cy: "79", r: "1.4", fill: K }), _jsx("rect", { x: "20", y: "30", width: "80", height: "12", rx: "3", fill: W, ...line() }), _jsx("path", { d: "M36 31 V41 M52 31 V41 M68 31 V41 M84 31 V41", ...line(1.5) }), _jsx("rect", { x: "37", y: "31", width: "14", height: "10", fill: C.yellow }), _jsx("rect", { x: "69", y: "31", width: "14", height: "10", fill: C.yellow }), [20, 36, 52, 68, 84].map((x, i) => (_jsx("path", { d: `M${x} 42 q8 8 16 0 Z`, fill: i % 2 ? C.yellow : W, ...line(1.75) }, x))), _jsx("rect", { x: "44", y: "15", width: "32", height: "12", rx: "6", fill: K }), _jsx("path", { d: "M51 21 h18", stroke: C.paper, strokeWidth: "1.75" }), _jsx("path", { d: "M60 27 V30", ...line(1.75) }), _jsx("path", { d: "M14 86 H26 L24 96 H16 Z", fill: C.coral, ...line(1.75) }), _jsx("path", { d: "M20 86 Q12 78 14 70 Q22 74 20 86 Q24 76 30 74 Q30 82 20 86", fill: C.green, ...line(1.5) }), _jsx("path", { d: "M88 14 l3 -5 M96 18 l5 -2 M84 10 l-1 -5", ...SPARK })] })),
|
|
15
|
+
// A chart on a stand and a magnifier.
|
|
16
|
+
reporteria: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M36 80 L30 96 M64 80 L70 96 M50 80 V96", fill: "none", ...line() }), _jsx("rect", { x: "14", y: "26", width: "74", height: "56", rx: "6", fill: W, ...line() }), _jsx("path", { d: "M22 72 H80", ...line(1.25), strokeDasharray: "0.1 3" }), _jsx("rect", { x: "24", y: "56", width: "11", height: "16", rx: "2", fill: C.green, ...line(1.75) }), _jsx("rect", { x: "41", y: "46", width: "11", height: "26", rx: "2", fill: C.yellow, ...line(1.75) }), _jsx("rect", { x: "58", y: "36", width: "11", height: "36", rx: "2", fill: C.coral, ...line(1.75) }), _jsx("path", { d: "M96 84 L105 93", ...line(6) }), _jsx("circle", { cx: "86", cy: "74", r: "13", fill: W, ...line() }), _jsx("circle", { cx: "86", cy: "74", r: "8.5", fill: C.yellow, ...line(1.5) }), _jsx("path", { d: "M81 71 Q83 68 86 68", fill: "none", stroke: W, strokeWidth: "1.75" }), _jsx("path", { d: "M14 18 l-4 -3 M22 14 l-1 -5", ...SPARK })] })),
|
|
17
|
+
// A receipt, a bill and a stack of coins.
|
|
18
|
+
finanzas: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M30 12 H62 V58 l-4 -3 l-4 3 l-4 -3 l-4 3 l-4 -3 l-4 3 l-4 -3 l-4 3 Z", fill: W, ...line() }), _jsx("rect", { x: "36", y: "20", width: "16", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "36", y: "28", width: "20", height: "2.5", rx: "1.25", fill: C.muted }), _jsx("rect", { x: "36", y: "34", width: "14", height: "2.5", rx: "1.25", fill: C.muted }), _jsxs("g", { transform: "rotate(-8 44 70)", children: [_jsx("rect", { x: "12", y: "52", width: "64", height: "36", rx: "5", fill: C.green, ...line() }), _jsx("rect", { x: "17", y: "57", width: "54", height: "26", rx: "3", fill: "none", ...line(1.25), strokeDasharray: "0.1 3" }), _jsx("circle", { cx: "44", cy: "70", r: "8", fill: C.paper, ...line(1.75) }), _jsx("path", { d: "M46.8 66.6 c-1 -1.6 -5.6 -1.6 -5.6 0.9 s5.6 1.4 5.6 4 s-4.6 2.5 -5.6 0.9 M44 64.6 V75.4", fill: "none", ...line(1.5) })] }), coinStack, _jsx("ellipse", { cx: "86", cy: "70", rx: "8.5", ry: "2.4", fill: "none", ...line(1.25) }), _jsx("path", { d: "M92 52 l2 -6 M100 56 l5 -3 M84 50 l-1 -5", ...SPARK })] })),
|
|
19
|
+
// A menu card and a coffee to go.
|
|
20
|
+
catalogo: (_jsxs(_Fragment, { children: [_jsxs("g", { transform: "rotate(-7 50 56)", children: [_jsx("rect", { x: "20", y: "18", width: "58", height: "78", rx: "6", fill: W, ...line() }), _jsx("rect", { x: "29", y: "27", width: "26", height: "5", rx: "2.5", fill: K }), [
|
|
21
|
+
[40, C.yellow, 24, 14],
|
|
22
|
+
[56, C.coral, 20, 16],
|
|
23
|
+
[72, C.green, 22, 12],
|
|
24
|
+
].map(([y, fill, a, b]) => (_jsxs("g", { children: [_jsx("rect", { x: "29", y: y, width: "11", height: "11", rx: "3", fill: fill, ...line(1.5) }), _jsx("rect", { x: "45", y: y + 2, width: a, height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "45", y: y + 7.5, width: b, height: "2.5", rx: "1.25", fill: C.muted })] }, y)))] }), _jsx("path", { d: "M80 52 q-3 -4 0 -8 q3 -4 0 -8 M89 52 q-3 -4 0 -8 q3 -4 0 -8", fill: "none", ...line(1.75) }), _jsx("path", { d: "M72 64 H100 L96.5 96 H75.5 Z", fill: W, ...line() }), _jsx("path", { d: "M73.6 75 H98.4 L97.5 85 H74.5 Z", fill: C.yellow, ...line(1.75) }), _jsx("rect", { x: "69", y: "57", width: "34", height: "7", rx: "3", fill: W, ...line() }), _jsx("path", { d: "M14 26 l-5 -2 M16 18 l-3 -4 M24 14 l0 -5", ...SPARK })] })),
|
|
25
|
+
// A phone with the digital menu and a delivery bag.
|
|
26
|
+
canales: (_jsxs(_Fragment, { children: [_jsxs("g", { transform: "rotate(-8 44 58)", children: [_jsx("rect", { x: "22", y: "14", width: "44", height: "80", rx: "8", fill: W, ...line() }), _jsx("rect", { x: "38", y: "19", width: "12", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "28", y: "28", width: "32", height: "10", rx: "3", fill: C.yellow, ...line(1.5) }), [
|
|
27
|
+
[44, C.coral],
|
|
28
|
+
[61, C.green],
|
|
29
|
+
].map(([y, fill]) => (_jsxs("g", { children: [_jsx("rect", { x: "28", y: y, width: "13", height: "12", rx: "3", fill: fill, ...line(1.5) }), _jsx("rect", { x: "45", y: y + 2, width: "14", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "45", y: y + 7.5, width: "9", height: "2.5", rx: "1.25", fill: C.muted })] }, y))), _jsx("rect", { x: "28", y: "80", width: "32", height: "8", rx: "4", fill: K })] }), _jsx("path", { d: "M76 46 Q84 32 92 46", fill: "none", ...line() }), _jsx("path", { d: "M66 52 H102 L98 96 H70 Z", fill: C.crust, ...line() }), _jsx("path", { d: "M66 52 L70 46 H98 L102 52 Z", fill: C.kraft, ...line() }), _jsx("circle", { cx: "84", cy: "73", r: "8.5", fill: C.yellow, ...line(1.75) }), _jsx("path", { d: "M84 77 c-4 -3 -5 -5 -4 -6.5 c1 -1.3 3 -1 4 0.5 c1 -1.5 3 -1.8 4 -0.5 c1 1.5 0 3.5 -4 6.5z", fill: K }), _jsx("path", { d: "M107 64 h5 M105 72 h8 M107 80 h4", ...SPARK })] })),
|
|
30
|
+
// An open box with a bottle and bread.
|
|
31
|
+
operaciones: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M24 56 L38 46 H98 L84 56 Z", fill: C.kraftDark, ...line() }), _jsx("path", { d: "M44 52 V30 q0 -4 4 -6 V16 h7 v8 q4 2 4 6 V52", fill: W, ...line() }), _jsx("rect", { x: "44", y: "34", width: "15", height: "9", fill: C.yellow, ...line(1.5) }), _jsxs("g", { transform: "rotate(32 74 36)", children: [_jsx("rect", { x: "68", y: "12", width: "13", height: "46", rx: "6.5", fill: C.crust, ...line() }), _jsx("path", { d: "M71 22 l7 -3 M71 32 l7 -3 M71 42 l7 -3", fill: "none", ...line(1.5) })] }), _jsx("path", { d: "M24 56 H84 V94 H24 Z", fill: C.crust, ...line() }), _jsx("path", { d: "M84 56 L98 46 V84 L84 94 Z", fill: C.kraft, ...line() }), _jsx("path", { d: "M24 56 L12 66 L22 72 L34 56", fill: C.crust, ...line() }), _jsx("rect", { x: "34", y: "68", width: "28", height: "16", rx: "2", fill: W, ...line(1.5) }), _jsx("rect", { x: "38", y: "72", width: "14", height: "2.5", rx: "1.25", fill: K }), _jsx("rect", { x: "38", y: "77.5", width: "18", height: "2.5", rx: "1.25", fill: C.muted }), _jsx("path", { d: "M18 36 l-4 -3 M26 30 l-1 -5", ...SPARK })] })),
|
|
32
|
+
// The stamp card, from the weekly email.
|
|
33
|
+
fidelizacion: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "20", y: "30", width: "84", height: "54", rx: "8", transform: "rotate(7 60 60)", fill: C.paperShade, ...line() }), _jsxs("g", { transform: "rotate(-6 60 60)", children: [_jsx("rect", { x: "14", y: "32", width: "92", height: "58", rx: "8", fill: W, ...line() }), _jsx("rect", { x: "38", y: "40", width: "30", height: "3.5", rx: "1.75", fill: K }), _jsx("rect", { x: "38", y: "47", width: "20", height: "2.5", rx: "1.25", fill: C.muted }), _jsx("rect", { x: "84", y: "40", width: "15", height: "8", rx: "4", fill: C.yellow, ...line(1.25) }), [
|
|
34
|
+
[31, 64],
|
|
35
|
+
[48, 64],
|
|
36
|
+
[65, 64],
|
|
37
|
+
[82, 64],
|
|
38
|
+
[31, 79],
|
|
39
|
+
[48, 79],
|
|
40
|
+
].map(([x, y]) => (_jsxs("g", { children: [_jsx("circle", { cx: x, cy: y, r: "6", fill: C.yellow, ...line(1.5) }), _jsx("path", { d: CUP(x, y), fill: "none", ...line(1.1) })] }, `${x}-${y}`))), _jsx("circle", { cx: "65", cy: "79", r: "6", fill: "none", stroke: C.muted, strokeWidth: "1.25", strokeDasharray: "2 2.2" }), _jsx("circle", { cx: "82", cy: "79", r: "6.5", fill: K }), _jsx("path", { d: "M82 82.4c-3.2-2.1-3.6-3.9-2.8-5 0.8-1 2.2-0.7 2.8 0.3 0.6-1 2-1.3 2.8-0.3 0.8 1.1 0.4 2.9-2.8 5z", fill: C.yellow }), _jsx("path", { d: "M94 56 V86", fill: "none", stroke: C.paperBorder, strokeWidth: "2", strokeDasharray: "1.5 2.5" }), _jsx("rect", { x: "20", y: "38", width: "13", height: "13", rx: "3.5", fill: K }), _jsx("path", { d: "M24 42 l1.2 5 l1.3 -3.4 l1.3 3.4 l1.2 -5", fill: "none", stroke: C.yellow, strokeWidth: "1.3" })] }), _jsx("path", { d: "M100 20 L101.5 15 M105 25 L110 23 M104.5 19 L108 15.5", ...SPARK })] })),
|
|
41
|
+
// A megaphone with a heart.
|
|
42
|
+
marketing: (_jsxs(_Fragment, { children: [_jsxs("g", { transform: "rotate(-14 52 62)", children: [_jsx("path", { d: "M38 68 L44 90 H55 L50 70", fill: W, ...line() }), _jsx("path", { d: "M30 52 L74 32 V88 L30 70 Z", fill: W, ...line() }), _jsx("path", { d: "M44 46 V76", ...line(1.5) }), _jsx("rect", { x: "18", y: "50", width: "14", height: "22", rx: "4", fill: C.coral, ...line() }), _jsx("ellipse", { cx: "74", cy: "60", rx: "7", ry: "28", fill: C.yellow, ...line() }), _jsx("ellipse", { cx: "74", cy: "60", rx: "3", ry: "14", fill: K }), _jsx("path", { d: "M88 46 Q95 60 88 74 M96 38 Q107 60 96 82", fill: "none", ...line() })] }), _jsx("path", { d: "M94 26 C94 22 99 21 100 25 C101 21 106 22 106 26 C106 30 100 34 100 34 C100 34 94 30 94 26 Z", fill: C.coral, ...line(1.75) }), _jsx("path", { d: "M100 14 V9 M90 17 l-3 -4 M110 17 l3 -4", ...SPARK })] })),
|
|
43
|
+
// A review bubble and a smiling star.
|
|
44
|
+
reputacion: (_jsxs(_Fragment, { children: [_jsx("path", { d: "M20 22 H84 Q92 22 92 30 V60 Q92 68 84 68 H42 L28 82 V68 H20 Q12 68 12 60 V30 Q12 22 20 22 Z", fill: W, ...line() }), [25, 39, 53, 67].map((x) => (_jsx("path", { transform: `translate(${x} 38)`, d: STAR, fill: C.yellow, ...line(1.5) }, x))), _jsx("rect", { x: "21", y: "50", width: "42", height: "3", rx: "1.5", fill: K }), _jsx("rect", { x: "21", y: "56.5", width: "28", height: "2.5", rx: "1.25", fill: C.muted }), _jsx("path", { transform: "translate(88 78) scale(2.6)", d: STAR, fill: C.yellow, stroke: K, strokeWidth: "0.77" }), _jsx("path", { d: "M84 78 q4 4 8 0", fill: "none", ...line(1.75) }), _jsx("circle", { cx: "83.5", cy: "73", r: "1.4", fill: K }), _jsx("circle", { cx: "92.5", cy: "73", r: "1.4", fill: K }), _jsx("path", { d: "M104 54 l4 -4 M108 64 l5 0 M98 50 l1 -5", ...SPARK })] })),
|
|
45
|
+
// A sliders panel and a gear.
|
|
46
|
+
configuracion: (_jsxs(_Fragment, { children: [_jsx("rect", { x: "14", y: "20", width: "64", height: "72", rx: "6", fill: W, ...line() }), _jsx("path", { d: "M24 36 H68 M24 56 H68 M24 76 H68", ...line() }), _jsx("circle", { cx: "52", cy: "36", r: "6", fill: C.yellow, ...line() }), _jsx("circle", { cx: "34", cy: "56", r: "6", fill: C.coral, ...line() }), _jsx("circle", { cx: "60", cy: "76", r: "6", fill: C.green, ...line() }), _jsxs("g", { transform: "translate(88 76)", children: [[0, 45, 90, 135, 180, 225, 270, 315].map((deg) => (_jsx("rect", { x: "-4.5", y: "-22", width: "9", height: "11", rx: "2", transform: `rotate(${deg})`, fill: C.yellow, ...line(1.75) }, deg))), _jsx("circle", { r: "15", fill: C.yellow, ...line() }), _jsx("circle", { r: "6", fill: C.paper, ...line() })] }), _jsx("path", { d: "M92 26 l3 -5 M100 32 l5 -2 M88 20 l-1 -5", ...SPARK })] })),
|
|
47
|
+
};
|
|
48
|
+
/** The dashboard modules that have an icon, in home-grid order. */
|
|
49
|
+
export const MODULE_ICON_NAMES = Object.keys(ART);
|
|
50
|
+
/**
|
|
51
|
+
* An illustrated dashboard-module icon on its cream tile. Size it with width
|
|
52
|
+
* (it is square). Reads well from 48 px; under that, use a line icon.
|
|
53
|
+
*/
|
|
54
|
+
export function ModuleIcon({ name, className, label }) {
|
|
55
|
+
const a11y = label
|
|
56
|
+
? { role: "img", "aria-label": label }
|
|
57
|
+
: { "aria-hidden": true };
|
|
58
|
+
return (_jsxs("svg", { viewBox: "0 0 120 120", className: className ? `wb-module-icon ${className}` : "wb-module-icon", strokeLinecap: "round", strokeLinejoin: "round", ...a11y, children: [_jsx("rect", { x: "0.5", y: "0.5", width: "119", height: "119", rx: "30", fill: C.paper, stroke: C.paperBorder }), _jsx("ellipse", { cx: "60", cy: "99", rx: "44", ry: "4.5", fill: C.shadow }), ART[name]] }));
|
|
59
|
+
}
|
|
@@ -131,6 +131,6 @@ export declare const DEFAULT_CATEGORY_SLOT: CategorySlot;
|
|
|
131
131
|
/** Slot for the n-th category in tree order (0-based): 1…8, then 1… again. */
|
|
132
132
|
export declare function categorySlotForIndex(index: number): CategorySlot;
|
|
133
133
|
/** CSS variables of the palette: --wb-cat-N (swatch), -tint, -slot, -ink. */
|
|
134
|
-
export declare const CATEGORY_PALETTE_TOKENS: Record<"--wb-cat-1" | "--wb-cat-1-tint" | "--wb-cat-1-slot" | "--wb-cat-1-ink" | "--wb-cat-
|
|
134
|
+
export declare const CATEGORY_PALETTE_TOKENS: Record<"--wb-cat-1" | "--wb-cat-1-tint" | "--wb-cat-1-slot" | "--wb-cat-1-ink" | "--wb-cat-2" | "--wb-cat-2-tint" | "--wb-cat-2-slot" | "--wb-cat-2-ink" | "--wb-cat-3" | "--wb-cat-3-tint" | "--wb-cat-3-slot" | "--wb-cat-3-ink" | "--wb-cat-5" | "--wb-cat-5-tint" | "--wb-cat-5-slot" | "--wb-cat-5-ink" | "--wb-cat-4" | "--wb-cat-4-tint" | "--wb-cat-4-slot" | "--wb-cat-4-ink" | "--wb-cat-6" | "--wb-cat-6-tint" | "--wb-cat-6-slot" | "--wb-cat-6-ink" | "--wb-cat-8" | "--wb-cat-8-tint" | "--wb-cat-8-slot" | "--wb-cat-8-ink" | "--wb-cat-7" | "--wb-cat-7-tint" | "--wb-cat-7-slot" | "--wb-cat-7-ink", string>;
|
|
135
135
|
/** The same variables with the dark values. */
|
|
136
|
-
export declare const CATEGORY_PALETTE_DARK_TOKENS: Record<"--wb-cat-1" | "--wb-cat-1-tint" | "--wb-cat-1-slot" | "--wb-cat-1-ink" | "--wb-cat-
|
|
136
|
+
export declare const CATEGORY_PALETTE_DARK_TOKENS: Record<"--wb-cat-1" | "--wb-cat-1-tint" | "--wb-cat-1-slot" | "--wb-cat-1-ink" | "--wb-cat-2" | "--wb-cat-2-tint" | "--wb-cat-2-slot" | "--wb-cat-2-ink" | "--wb-cat-3" | "--wb-cat-3-tint" | "--wb-cat-3-slot" | "--wb-cat-3-ink" | "--wb-cat-5" | "--wb-cat-5-tint" | "--wb-cat-5-slot" | "--wb-cat-5-ink" | "--wb-cat-4" | "--wb-cat-4-tint" | "--wb-cat-4-slot" | "--wb-cat-4-ink" | "--wb-cat-6" | "--wb-cat-6-tint" | "--wb-cat-6-slot" | "--wb-cat-6-ink" | "--wb-cat-8" | "--wb-cat-8-tint" | "--wb-cat-8-slot" | "--wb-cat-8-ink" | "--wb-cat-7" | "--wb-cat-7-tint" | "--wb-cat-7-slot" | "--wb-cat-7-ink", string>;
|