@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 CHANGED
@@ -2,9 +2,13 @@
2
2
 
3
3
  WelcomeBack brand assets for React apps.
4
4
 
5
- Today the package has one component: **`RunnerLoader`**, the isotipo W running
6
- left. Its legs swing on their hips and cross under the body while the body bobs.
7
- Use it for loading moments that mean "on the way to the next step".
5
+ Two components:
6
+
7
+ - **`RunnerLoader`**, the isotipo W running left. Its legs swing on their hips
8
+ and cross under the body while the body bobs. Use it for loading moments that
9
+ mean "on the way to the next step".
10
+ - **`ModuleIcon`**, the illustrated icon of each dashboard module (see
11
+ [Module icons](#module-icons)).
8
12
 
9
13
  - React 18 or 19. Works in Next.js (App Router and Pages), Vite and plain React.
10
14
  - No CSS import, no Tailwind, no bundler setup: the animation ships inside the SVG.
@@ -20,6 +24,8 @@ Use it for loading moments that mean "on the way to the next step".
20
24
  - [Examples](#examples)
21
25
  - [POS design tokens](#pos-design-tokens)
22
26
  - [Product image frames](#product-image-frames)
27
+ - [Module icons](#module-icons)
28
+ - [Illustrated icons](#illustrated-icons)
23
29
  - [Accessibility](#accessibility)
24
30
  - [Where to use it, and where not](#where-to-use-it-and-where-not)
25
31
  - [Troubleshooting](#troubleshooting)
@@ -376,6 +382,101 @@ productImageKeptArea('16:9'); // { width: 1, height: 0.5625 } of the square, cen
376
382
 
377
383
  `PRODUCT_IMAGE_FRAMES` holds the raw `{ width, height }` of each frame.
378
384
 
385
+ ## Module icons
386
+
387
+ One illustrated icon per dashboard module, drawn on its cream tile, in the style
388
+ of the weekly product email. Design: Paper 01M72Y4K1ZCAWQ5WGA3CD16CFN (library)
389
+ and the B.00 home grid in Paper 01M6SCB9QBX9A2DGSX70XB4AH6.
390
+
391
+ ```tsx
392
+ import { ModuleIcon, MODULE_ICON_NAMES } from '@welcome-back/brand';
393
+
394
+ <ModuleIcon name="catalogo" className="w-22" />; // decorative, next to a visible label
395
+ <ModuleIcon name="finanzas" className="w-16" label="Finanzas" />; // alone: give it a name
396
+ MODULE_ICON_NAMES; // ['actividad', 'reporteria', …, 'configuracion'], home-grid order
397
+ ```
398
+
399
+ | Name | Drawing |
400
+ |---|---|
401
+ | `actividad` | Shop with an awning |
402
+ | `reporteria` | Chart on a stand and a magnifier |
403
+ | `finanzas` | Receipt, bill and coins |
404
+ | `catalogo` | Menu card and a coffee to go |
405
+ | `canales` | Phone with the digital menu and a delivery bag |
406
+ | `operaciones` | Open box with a bottle and bread |
407
+ | `fidelizacion` | Stamp card |
408
+ | `marketing` | Megaphone with a heart |
409
+ | `reputacion` | Review bubble and a star |
410
+ | `configuracion` | Sliders panel and a gear |
411
+
412
+ - **Size.** It is square: set a width. It reads well from 48 px. Under 48 px the
413
+ detail turns into noise: use a line icon (lucide) there, for example in a
414
+ sidebar.
415
+ - **Tile.** The cream tile and its border are part of the SVG. Add a shadow or a
416
+ radius on the parent if the surface needs one (the B.00 grid uses 88 px).
417
+ - **No text inside.** The art has no `<text>`, so it needs no font. A test
418
+ checks this.
419
+
420
+ ### Illustration colours
421
+
422
+ `ILLUSTRATION_COLOURS` holds the palette of the drawings. The same values are the
423
+ `--color-illus-*` tokens in the wb-ui design system file.
424
+
425
+ Soft colours are for art, strong colours are for app messages. Do not use these
426
+ as status colours, and never put `coral` on a badge or a pill with a number: it
427
+ reads as an error or a notification.
428
+
429
+ ## Illustrated icons
430
+
431
+ 105 general illustrated icons in the same style as the module icons, for empty
432
+ states, onboarding, feature cards and marketing surfaces. Each one replaces one
433
+ or more lucide icons. Design: Paper 01M72Y4K1ZCAWQ5WGA3CD16CFN, page 2, in four
434
+ groups: `comercio`, `lugar`, `personas`, `datos`.
435
+
436
+ ```tsx
437
+ import { IllustratedIcon, ILLUSTRATED_ICONS } from '@welcome-back/brand';
438
+
439
+ <IllustratedIcon name="tarjeta-de-pago" className="w-22" />; // decorative, next to a visible label
440
+ <IllustratedIcon name="regalo" className="w-16" label="Regalo" />; // alone: give it a name
441
+ <IllustratedIcon name="codigo-qr" className="w-16" tile={false} />; // no cream tile, white areas only
442
+ ILLUSTRATED_ICONS; // [{ name: 'tarjeta-de-pago', label: 'Tarjeta de pago', group: 'comercio', lucide: ['CreditCard'] }, …]
443
+ ```
444
+
445
+ To find an icon, search `ILLUSTRATED_ICONS` by `label` or by the `lucide` name
446
+ it replaces. The names are the Spanish labels in kebab-case ASCII
447
+ (`Fuego / cocina` → `fuego-cocina`). The `IllustratedIconName` type lists them.
448
+
449
+ - **Size.** It is square: set a width. Use it at 48 px and up. Under 48 px the
450
+ detail turns into noise: use the lucide icon there.
451
+ - **Tile.** `tile` is on by default and draws the same cream tile as
452
+ `ModuleIcon`. Use `tile={false}` only on a white area. In dark mode or on a
453
+ coloured surface, keep the tile: the ink outlines need the cream behind them.
454
+ The ground shadow is part of the art, so it stays without the tile.
455
+ - **Class.** The `<svg>` has the class `wb-illustrated-icon` next to yours.
456
+ - **No text inside.** The art has no `<text>` or `<image>`, and only colours
457
+ from `ILLUSTRATION_COLOURS` (plus the see-through yellow `#FFE45C59` under
458
+ the line chart). Tests check this.
459
+
460
+ ### Edit an icon
461
+
462
+ Each icon is its own file: `src/illustrations/<name>.svg`.
463
+
464
+ 1. Open the file in a design tool (Paper, Illustrator, Inkscape…).
465
+ 2. Keep the `viewBox="0 0 120 120"`, the ground-shadow ellipse first, and no
466
+ tile background (the component draws the tile). Use palette colours only,
467
+ no text, no images. If you add `id`s (gradients, masks), start them with the
468
+ icon name so they cannot clash on a page with many icons.
469
+ 3. Run `npm run build`. It writes `src/illustratedArt.generated.ts` from the
470
+ SVG files; commit that file too. `npm test` fails if you forget.
471
+ 4. Open a PR (see [Publish a change](#publish-a-change)).
472
+
473
+ ### Add an icon
474
+
475
+ 1. Add `src/illustrations/<name>.svg` (same rules as above).
476
+ 2. Add an entry to `src/illustrations/index.json`:
477
+ `{ "name", "label", "group", "lucide": [...] }`.
478
+ 3. Run `npm run build`, update the icon count in the test, and open a PR.
479
+
379
480
  ## Accessibility
380
481
 
381
482
  - **Give exactly one accessible name per loading state.** Either put `label` on
@@ -418,6 +519,8 @@ the content will appear.
418
519
  | `src/RunnerLoader.tsx` | The component: SVG structure, clip paths, props |
419
520
  | `src/runnerCss.ts` | The animation: keyframes, timing, swing angles, reduced motion |
420
521
  | `src/runnerArt.ts` | Vector data: paths, pants fills, clip polygons |
522
+ | `src/illustrations/` | One `.svg` per illustrated icon, plus `index.json` (the manifest) |
523
+ | `src/illustratedArt.generated.ts` | Written by `scripts/build-illustrations.mjs` from `src/illustrations`. Do not edit. |
421
524
  | `src/*.test.tsx` | Vitest tests (server render, no browser) |
422
525
  | `scripts/mark-cjs.mjs` | Marks `dist/cjs` as CommonJS after the build |
423
526
  | `.github/workflows/ci.yml` | Runs on every PR and on `main` |
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ILLUSTRATED_ICONS = void 0;
4
+ exports.IllustratedIcon = IllustratedIcon;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const illustratedArt_generated_js_1 = require("./illustratedArt.generated.js");
7
+ Object.defineProperty(exports, "ILLUSTRATED_ICONS", { enumerable: true, get: function () { return illustratedArt_generated_js_1.ILLUSTRATED_ICONS; } });
8
+ const illustrationColours_js_1 = require("./illustrationColours.js");
9
+ /**
10
+ * An illustrated icon (source: src/illustrations/<name>.svg). Size it with
11
+ * width (it is square). Reads well from 48 px; under that, use a line icon.
12
+ */
13
+ function IllustratedIcon({ name, className, label, tile = true }) {
14
+ const a11y = label
15
+ ? { role: "img", "aria-label": label }
16
+ : { "aria-hidden": true };
17
+ return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 120 120", className: className ? `wb-illustrated-icon ${className}` : "wb-illustrated-icon", strokeLinecap: "round", strokeLinejoin: "round", ...a11y, children: [tile && ((0, jsx_runtime_1.jsx)("rect", { x: "0.5", y: "0.5", width: "119", height: "119", rx: "30", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paper, stroke: illustrationColours_js_1.ILLUSTRATION_COLOURS.paperBorder })), (0, jsx_runtime_1.jsx)("g", { dangerouslySetInnerHTML: { __html: illustratedArt_generated_js_1.ILLUSTRATED_ART[name] } })] }));
18
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MODULE_ICON_NAMES = void 0;
4
+ exports.ModuleIcon = ModuleIcon;
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const illustrationColours_js_1 = require("./illustrationColours.js");
7
+ const K = illustrationColours_js_1.ILLUSTRATION_COLOURS.ink;
8
+ const W = illustrationColours_js_1.ILLUSTRATION_COLOURS.white;
9
+ /** 2 px outline, 1.75 px detail, 1.5 px fine detail, in 120-unit art space. */
10
+ const line = (width = 2) => ({ stroke: K, strokeWidth: width });
11
+ const SPARK = { fill: "none", ...line(1.75) };
12
+ 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";
13
+ // A coffee cup stamp on the loyalty card.
14
+ 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`;
15
+ const coinStack = [86, 78, 70].map((y, i) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("rect", { x: "72", y: y, width: "28", height: "6", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow }), (0, jsx_runtime_1.jsx)("path", { d: `M72 ${y} V${y + 6} M100 ${y} V${y + 6}`, ...line() }), i === 0 ? ((0, jsx_runtime_1.jsx)("ellipse", { cx: "86", cy: y + 6, rx: "14", ry: "4.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() })) : ((0, jsx_runtime_1.jsx)("path", { d: `M72 ${y + 6} A14 4.5 0 0 0 100 ${y + 6}`, fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() })), (0, jsx_runtime_1.jsx)("ellipse", { cx: "86", cy: y, rx: "14", ry: "4.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() })] }, y)));
16
+ const ART = {
17
+ // The shop: the business live today.
18
+ actividad: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("rect", { x: "26", y: "44", width: "68", height: "52", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "34", y: "56", width: "24", height: "22", rx: "3", fill: W, ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M40 56 L42 65 M52 56 L50 65", fill: "none", ...line(1.25) }), (0, jsx_runtime_1.jsx)("rect", { x: "37", y: "65", width: "18", height: "8", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.green, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "66", y: "60", width: "20", height: "36", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "71", cy: "79", r: "1.4", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "20", y: "30", width: "80", height: "12", rx: "3", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M36 31 V41 M52 31 V41 M68 31 V41 M84 31 V41", ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "37", y: "31", width: "14", height: "10", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow }), (0, jsx_runtime_1.jsx)("rect", { x: "69", y: "31", width: "14", height: "10", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow }), [20, 36, 52, 68, 84].map((x, i) => ((0, jsx_runtime_1.jsx)("path", { d: `M${x} 42 q8 8 16 0 Z`, fill: i % 2 ? illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow : W, ...line(1.75) }, x))), (0, jsx_runtime_1.jsx)("rect", { x: "44", y: "15", width: "32", height: "12", rx: "6", fill: K }), (0, jsx_runtime_1.jsx)("path", { d: "M51 21 h18", stroke: illustrationColours_js_1.ILLUSTRATION_COLOURS.paper, strokeWidth: "1.75" }), (0, jsx_runtime_1.jsx)("path", { d: "M60 27 V30", ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M14 86 H26 L24 96 H16 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M20 86 Q12 78 14 70 Q22 74 20 86 Q24 76 30 74 Q30 82 20 86", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.green, ...line(1.5) }), (0, jsx_runtime_1.jsx)("path", { d: "M88 14 l3 -5 M96 18 l5 -2 M84 10 l-1 -5", ...SPARK })] })),
19
+ // A chart on a stand and a magnifier.
20
+ reporteria: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M36 80 L30 96 M64 80 L70 96 M50 80 V96", fill: "none", ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "14", y: "26", width: "74", height: "56", rx: "6", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M22 72 H80", ...line(1.25), strokeDasharray: "0.1 3" }), (0, jsx_runtime_1.jsx)("rect", { x: "24", y: "56", width: "11", height: "16", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.green, ...line(1.75) }), (0, jsx_runtime_1.jsx)("rect", { x: "41", y: "46", width: "11", height: "26", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.75) }), (0, jsx_runtime_1.jsx)("rect", { x: "58", y: "36", width: "11", height: "36", rx: "2", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M96 84 L105 93", ...line(6) }), (0, jsx_runtime_1.jsx)("circle", { cx: "86", cy: "74", r: "13", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "86", cy: "74", r: "8.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }), (0, jsx_runtime_1.jsx)("path", { d: "M81 71 Q83 68 86 68", fill: "none", stroke: W, strokeWidth: "1.75" }), (0, jsx_runtime_1.jsx)("path", { d: "M14 18 l-4 -3 M22 14 l-1 -5", ...SPARK })] })),
21
+ // A receipt, a bill and a stack of coins.
22
+ finanzas: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.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() }), (0, jsx_runtime_1.jsx)("rect", { x: "36", y: "20", width: "16", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "36", y: "28", width: "20", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted }), (0, jsx_runtime_1.jsx)("rect", { x: "36", y: "34", width: "14", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted }), (0, jsx_runtime_1.jsxs)("g", { transform: "rotate(-8 44 70)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "12", y: "52", width: "64", height: "36", rx: "5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.green, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "17", y: "57", width: "54", height: "26", rx: "3", fill: "none", ...line(1.25), strokeDasharray: "0.1 3" }), (0, jsx_runtime_1.jsx)("circle", { cx: "44", cy: "70", r: "8", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paper, ...line(1.75) }), (0, jsx_runtime_1.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, (0, jsx_runtime_1.jsx)("ellipse", { cx: "86", cy: "70", rx: "8.5", ry: "2.4", fill: "none", ...line(1.25) }), (0, jsx_runtime_1.jsx)("path", { d: "M92 52 l2 -6 M100 56 l5 -3 M84 50 l-1 -5", ...SPARK })] })),
23
+ // A menu card and a coffee to go.
24
+ catalogo: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("g", { transform: "rotate(-7 50 56)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "20", y: "18", width: "58", height: "78", rx: "6", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "29", y: "27", width: "26", height: "5", rx: "2.5", fill: K }), [
25
+ [40, illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, 24, 14],
26
+ [56, illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, 20, 16],
27
+ [72, illustrationColours_js_1.ILLUSTRATION_COLOURS.green, 22, 12],
28
+ ].map(([y, fill, a, b]) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("rect", { x: "29", y: y, width: "11", height: "11", rx: "3", fill: fill, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 2, width: a, height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 7.5, width: b, height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted })] }, y)))] }), (0, jsx_runtime_1.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) }), (0, jsx_runtime_1.jsx)("path", { d: "M72 64 H100 L96.5 96 H75.5 Z", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M73.6 75 H98.4 L97.5 85 H74.5 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.75) }), (0, jsx_runtime_1.jsx)("rect", { x: "69", y: "57", width: "34", height: "7", rx: "3", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M14 26 l-5 -2 M16 18 l-3 -4 M24 14 l0 -5", ...SPARK })] })),
29
+ // A phone with the digital menu and a delivery bag.
30
+ canales: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("g", { transform: "rotate(-8 44 58)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "22", y: "14", width: "44", height: "80", rx: "8", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "19", width: "12", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "28", y: "28", width: "32", height: "10", rx: "3", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }), [
31
+ [44, illustrationColours_js_1.ILLUSTRATION_COLOURS.coral],
32
+ [61, illustrationColours_js_1.ILLUSTRATION_COLOURS.green],
33
+ ].map(([y, fill]) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("rect", { x: "28", y: y, width: "13", height: "12", rx: "3", fill: fill, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 2, width: "14", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "45", y: y + 7.5, width: "9", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted })] }, y))), (0, jsx_runtime_1.jsx)("rect", { x: "28", y: "80", width: "32", height: "8", rx: "4", fill: K })] }), (0, jsx_runtime_1.jsx)("path", { d: "M76 46 Q84 32 92 46", fill: "none", ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M66 52 H102 L98 96 H70 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M66 52 L70 46 H98 L102 52 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraft, ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "84", cy: "73", r: "8.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.75) }), (0, jsx_runtime_1.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 }), (0, jsx_runtime_1.jsx)("path", { d: "M107 64 h5 M105 72 h8 M107 80 h4", ...SPARK })] })),
34
+ // An open box with a bottle and bread.
35
+ operaciones: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("path", { d: "M24 56 L38 46 H98 L84 56 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraftDark, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M44 52 V30 q0 -4 4 -6 V16 h7 v8 q4 2 4 6 V52", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "44", y: "34", width: "15", height: "9", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }), (0, jsx_runtime_1.jsxs)("g", { transform: "rotate(32 74 36)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "68", y: "12", width: "13", height: "46", rx: "6.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M71 22 l7 -3 M71 32 l7 -3 M71 42 l7 -3", fill: "none", ...line(1.5) })] }), (0, jsx_runtime_1.jsx)("path", { d: "M24 56 H84 V94 H24 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M84 56 L98 46 V84 L84 94 Z", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.kraft, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M24 56 L12 66 L22 72 L34 56", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.crust, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "34", y: "68", width: "28", height: "16", rx: "2", fill: W, ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "72", width: "14", height: "2.5", rx: "1.25", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "77.5", width: "18", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted }), (0, jsx_runtime_1.jsx)("path", { d: "M18 36 l-4 -3 M26 30 l-1 -5", ...SPARK })] })),
36
+ // The stamp card, from the weekly email.
37
+ fidelizacion: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("rect", { x: "20", y: "30", width: "84", height: "54", rx: "8", transform: "rotate(7 60 60)", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paperShade, ...line() }), (0, jsx_runtime_1.jsxs)("g", { transform: "rotate(-6 60 60)", children: [(0, jsx_runtime_1.jsx)("rect", { x: "14", y: "32", width: "92", height: "58", rx: "8", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "40", width: "30", height: "3.5", rx: "1.75", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "38", y: "47", width: "20", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted }), (0, jsx_runtime_1.jsx)("rect", { x: "84", y: "40", width: "15", height: "8", rx: "4", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.25) }), [
38
+ [31, 64],
39
+ [48, 64],
40
+ [65, 64],
41
+ [82, 64],
42
+ [31, 79],
43
+ [48, 79],
44
+ ].map(([x, y]) => ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("circle", { cx: x, cy: y, r: "6", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }), (0, jsx_runtime_1.jsx)("path", { d: CUP(x, y), fill: "none", ...line(1.1) })] }, `${x}-${y}`))), (0, jsx_runtime_1.jsx)("circle", { cx: "65", cy: "79", r: "6", fill: "none", stroke: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted, strokeWidth: "1.25", strokeDasharray: "2 2.2" }), (0, jsx_runtime_1.jsx)("circle", { cx: "82", cy: "79", r: "6.5", fill: K }), (0, jsx_runtime_1.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: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow }), (0, jsx_runtime_1.jsx)("path", { d: "M94 56 V86", fill: "none", stroke: illustrationColours_js_1.ILLUSTRATION_COLOURS.paperBorder, strokeWidth: "2", strokeDasharray: "1.5 2.5" }), (0, jsx_runtime_1.jsx)("rect", { x: "20", y: "38", width: "13", height: "13", rx: "3.5", fill: K }), (0, jsx_runtime_1.jsx)("path", { d: "M24 42 l1.2 5 l1.3 -3.4 l1.3 3.4 l1.2 -5", fill: "none", stroke: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, strokeWidth: "1.3" })] }), (0, jsx_runtime_1.jsx)("path", { d: "M100 20 L101.5 15 M105 25 L110 23 M104.5 19 L108 15.5", ...SPARK })] })),
45
+ // A megaphone with a heart.
46
+ marketing: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("g", { transform: "rotate(-14 52 62)", children: [(0, jsx_runtime_1.jsx)("path", { d: "M38 68 L44 90 H55 L50 70", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M30 52 L74 32 V88 L30 70 Z", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M44 46 V76", ...line(1.5) }), (0, jsx_runtime_1.jsx)("rect", { x: "18", y: "50", width: "14", height: "22", rx: "4", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, ...line() }), (0, jsx_runtime_1.jsx)("ellipse", { cx: "74", cy: "60", rx: "7", ry: "28", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() }), (0, jsx_runtime_1.jsx)("ellipse", { cx: "74", cy: "60", rx: "3", ry: "14", fill: K }), (0, jsx_runtime_1.jsx)("path", { d: "M88 46 Q95 60 88 74 M96 38 Q107 60 96 82", fill: "none", ...line() })] }), (0, jsx_runtime_1.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: illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, ...line(1.75) }), (0, jsx_runtime_1.jsx)("path", { d: "M100 14 V9 M90 17 l-3 -4 M110 17 l3 -4", ...SPARK })] })),
47
+ // A review bubble and a smiling star.
48
+ reputacion: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.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) => ((0, jsx_runtime_1.jsx)("path", { transform: `translate(${x} 38)`, d: STAR, fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.5) }, x))), (0, jsx_runtime_1.jsx)("rect", { x: "21", y: "50", width: "42", height: "3", rx: "1.5", fill: K }), (0, jsx_runtime_1.jsx)("rect", { x: "21", y: "56.5", width: "28", height: "2.5", rx: "1.25", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.muted }), (0, jsx_runtime_1.jsx)("path", { transform: "translate(88 78) scale(2.6)", d: STAR, fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, stroke: K, strokeWidth: "0.77" }), (0, jsx_runtime_1.jsx)("path", { d: "M84 78 q4 4 8 0", fill: "none", ...line(1.75) }), (0, jsx_runtime_1.jsx)("circle", { cx: "83.5", cy: "73", r: "1.4", fill: K }), (0, jsx_runtime_1.jsx)("circle", { cx: "92.5", cy: "73", r: "1.4", fill: K }), (0, jsx_runtime_1.jsx)("path", { d: "M104 54 l4 -4 M108 64 l5 0 M98 50 l1 -5", ...SPARK })] })),
49
+ // A sliders panel and a gear.
50
+ configuracion: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("rect", { x: "14", y: "20", width: "64", height: "72", rx: "6", fill: W, ...line() }), (0, jsx_runtime_1.jsx)("path", { d: "M24 36 H68 M24 56 H68 M24 76 H68", ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "52", cy: "36", r: "6", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "34", cy: "56", r: "6", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.coral, ...line() }), (0, jsx_runtime_1.jsx)("circle", { cx: "60", cy: "76", r: "6", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.green, ...line() }), (0, jsx_runtime_1.jsxs)("g", { transform: "translate(88 76)", children: [[0, 45, 90, 135, 180, 225, 270, 315].map((deg) => ((0, jsx_runtime_1.jsx)("rect", { x: "-4.5", y: "-22", width: "9", height: "11", rx: "2", transform: `rotate(${deg})`, fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line(1.75) }, deg))), (0, jsx_runtime_1.jsx)("circle", { r: "15", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.yellow, ...line() }), (0, jsx_runtime_1.jsx)("circle", { r: "6", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paper, ...line() })] }), (0, jsx_runtime_1.jsx)("path", { d: "M92 26 l3 -5 M100 32 l5 -2 M88 20 l-1 -5", ...SPARK })] })),
51
+ };
52
+ /** The dashboard modules that have an icon, in home-grid order. */
53
+ exports.MODULE_ICON_NAMES = Object.keys(ART);
54
+ /**
55
+ * An illustrated dashboard-module icon on its cream tile. Size it with width
56
+ * (it is square). Reads well from 48 px; under that, use a line icon.
57
+ */
58
+ function ModuleIcon({ name, className, label }) {
59
+ const a11y = label
60
+ ? { role: "img", "aria-label": label }
61
+ : { "aria-hidden": true };
62
+ return ((0, jsx_runtime_1.jsxs)("svg", { viewBox: "0 0 120 120", className: className ? `wb-module-icon ${className}` : "wb-module-icon", strokeLinecap: "round", strokeLinejoin: "round", ...a11y, children: [(0, jsx_runtime_1.jsx)("rect", { x: "0.5", y: "0.5", width: "119", height: "119", rx: "30", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.paper, stroke: illustrationColours_js_1.ILLUSTRATION_COLOURS.paperBorder }), (0, jsx_runtime_1.jsx)("ellipse", { cx: "60", cy: "99", rx: "44", ry: "4.5", fill: illustrationColours_js_1.ILLUSTRATION_COLOURS.shadow }), ART[name]] }));
63
+ }