tek-ms-header 1.0.7 → 1.0.11

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.
@@ -0,0 +1,6 @@
1
+ import type { Entreprise, Seller } from '../model';
2
+ export declare class Header {
3
+ private el;
4
+ constructor(mountPoint: HTMLElement);
5
+ render(entreprise: Entreprise, seller: Seller): void;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { Entreprise, Seller } from '../model';
2
+ export declare const mockedEntreprise: Entreprise;
3
+ export declare const mockedSeller: Seller;
@@ -0,0 +1,3 @@
1
+ export { mockedEntreprise, mockedSeller } from './constantes';
2
+ export { Header } from './Header';
3
+ export { injectSvgToContainer, paintStamps } from './utils';
package/dist/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ import 'tek-ms-ds/dist/style.css';
@@ -0,0 +1,12 @@
1
+ export interface Entreprise {
2
+ firstName: string;
3
+ secondName: string;
4
+ icone?: string;
5
+ }
6
+ export interface Seller {
7
+ name: string;
8
+ role: string;
9
+ dailySalesTotal: number;
10
+ svgAvatar?: string;
11
+ stringAvatar: string;
12
+ }
@@ -0,0 +1,70 @@
1
+ //#region src/constantes/index.ts
2
+ var e = {
3
+ firstName: "Maman",
4
+ secondName: "Solution",
5
+ icone: "\n <svg viewBox=\"0 0 100 100\">\n <path d=\"M26 66 L26 36 L41 58 L50 38 L59 58 L74 36 L74 66\"\n stroke=\"#FF6B35\" stroke-width=\"10\" fill=\"none\"\n stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n <circle cx=\"50\" cy=\"25\" r=\"7\" fill=\"#FF6B35\"/>\n </svg>"
6
+ }, t = {
7
+ name: "Tesia M.",
8
+ role: "Vendeur · Zone Nord",
9
+ dailySalesTotal: 5660,
10
+ stringAvatar: "TS",
11
+ svgAvatar: "\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" fill=\"white\">\n <circle cx=\"12\" cy=\"8\" r=\"4\"/>\n <path d=\"M12 14c-4.42 0-8 3.13-8 7h16c0-3.87-3.58-7-8-7z\"/>\n </svg>"
12
+ };
13
+ //#endregion
14
+ //#region src/utils/index.ts
15
+ function n(e, t) {
16
+ let n = new DOMParser().parseFromString(e, "image/svg+xml").documentElement;
17
+ t.innerHTML = "", t.appendChild(n);
18
+ }
19
+ function r(e, t, n) {
20
+ return `<svg viewBox="0 0 100 100" width="${e}" height="${e}">
21
+ ${t ? `<circle cx="50" cy="50" r="47" fill="none" stroke="${t}" stroke-width="2.5"/>
22
+ <circle cx="50" cy="50" r="40" fill="none" stroke="${t}" stroke-width="1" stroke-dasharray="2 3"/>` : ""}
23
+ <path d="M27 64 L27 37 L41 57 L50 39 L59 57 L73 37 L73 64"
24
+ stroke="${n}" stroke-width="7" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
25
+ <circle cx="50" cy="26" r="5" fill="${n}"/>
26
+ </svg>`;
27
+ }
28
+ function i() {
29
+ let e = document.getElementById("header-stamp");
30
+ e && (e.innerHTML = r(30, "", "#C95B2C"));
31
+ }
32
+ //#endregion
33
+ //#region src/Header/index.ts
34
+ var a = class {
35
+ el;
36
+ constructor(e) {
37
+ this.el = e;
38
+ }
39
+ render(e, t) {
40
+ this.el.innerHTML = `
41
+ <header class="app-header">
42
+ <div class="brand-row">
43
+ <div class="stamp sm" id="header-stamp"></div>
44
+ <div class="wordmark">${e.firstName} <em>${e.secondName}</em></div>
45
+ </div>
46
+ <div class="header-right">
47
+ <div class="seller">
48
+ <div class="avatar">${t.stringAvatar}</div>
49
+ <div class="seller-text">
50
+ <div class="name">${t.name}</div>
51
+ <div class="role">${t.role}</div>
52
+ </div>
53
+ </div>
54
+ <div class="daily-badge">
55
+ <span class="lab">VENTES DU JOUR</span>
56
+ <span class="amt">${t.dailySalesTotal} F</span>
57
+ </div>
58
+ <span class="logout-link" onclick="logout()">Déconnexion</span>
59
+ <button class="icon-btn section-menu-btn" id="section-menu-btn" onclick="openSectionMenu()" aria-label="Menu">
60
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.3" stroke-linecap="round"><line x1="4" y1="7" x2="20" y2="7"/><line x1="4" y1="12" x2="20" y2="12"/><line x1="4" y1="17" x2="20" y2="17"/></svg>
61
+ </button>
62
+ </div>
63
+ </header>
64
+ `;
65
+ let r = document.querySelector(".avatar");
66
+ t.svgAvatar && r && n(t.svgAvatar, r), i();
67
+ }
68
+ };
69
+ //#endregion
70
+ export { a as Header, n as injectSvgToContainer, e as mockedEntreprise, t as mockedSeller, i as paintStamps };
@@ -0,0 +1,3 @@
1
+ export declare function injectSvgToContainer(avatar: string, element: HTMLElement): void;
2
+ export declare function stampSVG(size: number, ring: string, glyphColor: string): string;
3
+ export declare function paintStamps(): void;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "tek-ms-header",
3
3
  "private": false,
4
- "version": "v1.0.7",
4
+ "version": "v1.0.11",
5
5
  "type": "module",
6
+ "main": "./dist/ms-header.js",
7
+ "module": "./dist/ms-header.js",
8
+ "types": "./dist/index.d.ts",
6
9
  "files": [
7
10
  "dist/"
8
11
  ],
9
12
  "scripts": {
10
13
  "dev": "vite",
11
- "build": "tsc && vite build",
14
+ "build": "vite build && tsc -p tsconfig.json",
12
15
  "test": "npx vitest run",
13
16
  "test -- --coverage": "npx vitest run --coverage",
14
17
  "preview": "vite preview",
@@ -30,6 +33,6 @@
30
33
  "vitest": "^4.1.9"
31
34
  },
32
35
  "dependencies": {
33
- "tek-ms-ds": "^1.0.8"
36
+ "tek-ms-ds": "^1.0.9"
34
37
  }
35
38
  }
@@ -1 +0,0 @@
1
- :root{--paper:#f3ead9;--paper-deep:#e9dcc0;--paper-line:#dccca8;--ink:#1e2a42;--ink-soft:#283a58;--ink-softer:#33476c;--ink-line:#3d517a;--clay:#b6481e;--clay-bright:#c95b2c;--clay-deep:#963a18;--gold:#c68a1f;--green:#3f7d58;--rust:#b23a33;--cream:#f3ead9;--cream-muted:#f3ead999;--ink-text:#1e2a42;--ink-muted:#8c7f68;--font-display:"Fraunces", Georgia, serif;--font-body:"Inter", -apple-system, "Segoe UI", sans-serif;--font-mono:"IBM Plex Mono", "SFMono-Regular", monospace}*{box-sizing:border-box}html,body{margin:0;padding:0}body{font-family:var(--font-body);background:var(--ink);color:var(--ink-text);-webkit-font-smoothing:antialiased;min-height:100vh}button,input{font-family:inherit}button{-webkit-tap-highlight-color:transparent}:focus-visible{outline:2px solid var(--gold);outline-offset:2px}@media (prefers-reduced-motion:reduce){*{transition-duration:.001ms!important;animation-duration:.001ms!important;animation-iteration-count:1!important}}.stamp{flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.stamp svg{display:block}.stamp.lg{transform:rotate(-4deg)}.stamp.stamping{animation:.42s cubic-bezier(.2,1.6,.4,1) stampDown}@keyframes stampDown{0%{opacity:0;transform:rotate(-4deg)scale(1.9)}55%{opacity:1;transform:rotate(-4deg)scale(.92)}to{transform:rotate(-4deg)scale(1)}}.stamp.shaking{animation:.42s stampShake}@keyframes stampShake{0%,to{transform:rotate(-4deg)translate(0)}20%{transform:rotate(-4deg)translate(-6px)}40%{transform:rotate(-4deg)translate(5px)}60%{transform:rotate(-4deg)translate(-3px)}80%{transform:rotate(-4deg)translate(2px)}}#login-screen{background:radial-gradient(circle at 18% 12%, #c95b2c29, transparent 42%), radial-gradient(circle at 86% 88%, #c68a1f24, transparent 46%), radial-gradient(#ffffff0d 1px, transparent 1px) 0 0/22px 22px, var(--ink);justify-content:center;align-items:center;min-height:100vh;padding:32px 18px;display:flex}.login-card{background:var(--paper);border-radius:6px 6px 18px 18px;width:100%;max-width:368px;padding:38px 30px 30px;position:relative;box-shadow:0 40px 80px #00000073}.login-card:before{content:"";background:repeating-linear-gradient(90deg, var(--clay) 0 14px, var(--gold) 14px 28px);border-radius:0 0 3px 3px;height:5px;position:absolute;top:0;left:24px;right:24px}.login-card .stamp{margin:6px auto 14px;display:flex}.login-card h1{font-family:var(--font-display);text-align:center;color:var(--ink);letter-spacing:.01em;margin:0 0 4px;font-size:21px;font-weight:600}.login-card .tag{text-align:center;font-family:var(--font-display);color:var(--ink-muted);margin-bottom:28px;font-size:12.5px;font-style:italic;font-weight:500}.field{border:1.5px solid var(--paper-line);background:#fff;border-radius:10px;margin-bottom:12px;padding:10px 14px;transition:border-color .15s}.field.focus{border-color:var(--clay)}.field label{letter-spacing:.09em;text-transform:uppercase;color:var(--ink-muted);font-size:9px;font-weight:600;font-family:var(--font-mono);margin-bottom:3px;display:block}.field.focus label{color:var(--clay)}.field input{width:100%;color:var(--ink);background:0 0;border:none;outline:none;font-family:inherit;font-size:13.5px}.forgot{text-align:right;color:var(--clay);cursor:pointer;margin-bottom:18px;font-size:10.5px;font-weight:600}.forgot:hover{text-decoration:underline}.btn-primary{background:var(--ink);width:100%;color:var(--cream);cursor:pointer;font-size:13px;font-weight:700;font-family:var(--font-body);letter-spacing:.02em;border:none;border-radius:10px;padding:13px;transition:background .15s,transform .1s}.btn-primary:hover{background:var(--ink-soft)}.btn-primary:active{transform:scale(.98)}.or-row{align-items:center;gap:10px;margin:18px 0 14px;display:flex}.or-row .line{background:var(--paper-line);flex:1;height:1px}.or-row span{color:var(--ink-muted);font-size:9px;font-family:var(--font-mono);letter-spacing:.04em}.oauth-row{gap:10px;display:flex}.oauth-btn{border:1.5px solid var(--paper-line);color:var(--ink);cursor:pointer;background:#fff;border-radius:10px;flex:1;justify-content:center;align-items:center;gap:6px;padding:11px 8px;font-family:inherit;font-size:11px;font-weight:600;display:flex}.oauth-btn:hover{border-color:var(--ink-muted)}#app-screen{background:var(--ink);flex-direction:column;min-height:100vh;display:none}header.app-header{background:var(--ink);border-bottom:1px solid var(--ink-line);flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;padding:13px 18px;display:flex}.brand-row{align-items:center;gap:9px;display:flex}.brand-row .wordmark{font-family:var(--font-display);color:var(--cream);letter-spacing:.01em;font-size:14px;font-weight:700}.brand-row .wordmark em{color:var(--clay-bright);font-style:normal}.header-right{align-items:center;gap:16px;display:flex}.seller{align-items:center;gap:9px;display:flex}.avatar{background:var(--clay-bright);color:#fff;width:32px;height:32px;font-size:10.5px;font-weight:700;font-family:var(--font-mono);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;display:flex}.seller .name{color:var(--cream);font-size:11.5px;font-weight:700}.seller .role{color:var(--cream-muted);font-size:9px}.seller-text{display:none}.daily-badge{background:var(--ink-soft);border:1px solid var(--gold);text-align:right;border-radius:9px;padding:6px 12px}.daily-badge .lab{color:var(--gold);letter-spacing:.08em;font-size:7px;font-weight:700;font-family:var(--font-mono);display:block}.daily-badge .amt{color:var(--cream);font-size:13px;font-weight:700;font-family:var(--font-mono)}.logout-link{color:var(--cream-muted);cursor:pointer;font-size:10.5px;display:none}.logout-link:hover{color:var(--cream)}.tabbar{background:var(--ink);flex-shrink:0;gap:6px;padding:9px 14px;display:flex}.tabbar .tab{text-align:center;cursor:pointer;letter-spacing:.04em;background:var(--ink-soft);color:var(--cream-muted);font-size:10.5px;font-weight:700;font-family:var(--font-body);border:none;border-radius:8px;flex:1;padding:9px 0;position:relative}.tabbar .tab.active{background:var(--clay-bright);color:#fff}.tab-count{background:var(--gold);min-width:15px;height:15px;color:var(--ink);font-size:8.5px;font-weight:800;font-family:var(--font-mono);border-radius:8px;justify-content:center;align-items:center;margin-left:4px;padding:0 3px;display:inline-flex}.body-wrap{flex-direction:column;flex:1;display:flex;overflow:hidden}nav.side-left{display:none}main.catalog-area{background:var(--paper);flex:1;padding:16px 16px 24px;overflow-y:auto}.catalog-head{display:none}.catalog-head h2{font-family:var(--font-display);color:var(--ink);margin:0 0 2px;font-size:19px;font-weight:600}.catalog-head .sub{color:var(--ink-muted);font-size:11.5px}.tab-panel{flex-direction:column;flex:1;display:none;overflow:hidden}.tab-panel.visible{display:flex}.search-bar{z-index:50;background:var(--paper);border-bottom:1px solid #0000;margin:0 -16px 4px;padding-bottom:10px;padding-left:16px;padding-right:16px;transition:border-color .2s,box-shadow .2s;position:sticky;top:0}.search-bar.scrolled{border-bottom-color:var(--paper-line);box-shadow:0 8px 14px -10px #1e2a4259}.search-input-wrap{border:1.5px solid var(--paper-line);background:#fff;border-radius:11px;align-items:center;gap:8px;margin-bottom:9px;padding:9px 12px;transition:border-color .15s;display:flex}.search-input-wrap.focus{border-color:var(--clay)}.search-input-wrap svg{color:var(--ink-muted);flex-shrink:0}.search-input-wrap input{color:var(--ink);background:0 0;border:none;outline:none;flex:1;font-family:inherit;font-size:12.5px}.search-input-wrap input::placeholder{color:var(--ink-muted)}.search-clear{background:var(--paper-deep);width:18px;height:18px;color:var(--ink-muted);cursor:pointer;border:none;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-size:11px;line-height:1;display:none}.search-clear.visible{display:flex}.category-row{scrollbar-width:none;gap:6px;padding-bottom:2px;display:flex;overflow-x:auto}.category-row::-webkit-scrollbar{display:none}.chip{border:1px solid var(--paper-line);color:var(--ink-muted);cursor:pointer;white-space:nowrap;background:#fff;border-radius:20px;flex-shrink:0;padding:6px 13px;font-size:10px;font-weight:600;transition:background .15s,color .15s,border-color .15s}.chip:hover{border-color:var(--clay)}.chip.active{background:var(--ink);color:var(--cream);border-color:var(--ink)}.grid{grid-template-columns:1fr 1fr;gap:10px;transition:opacity .15s;display:grid}.grid.fading{opacity:0}.no-results{text-align:center;color:var(--ink-muted);grid-column:1/-1;padding:54px 16px;font-size:11.5px}.no-results .mark{font-family:var(--font-display);color:var(--ink);margin-bottom:6px;font-size:15px;font-style:italic;display:block}.product-card{border:1px solid var(--paper-line);cursor:pointer;background:#fff;border-radius:13px;padding:11px;transition:border-color .15s,transform .15s;animation:.2s fadeIn}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.product-card:hover{border-color:var(--clay);transform:translateY(-2px)}.product-card:active{transform:translateY(0)}.product-card .ic-wrap{border-radius:9px;justify-content:center;align-items:center;width:100%;height:58px;margin-bottom:8px;font-size:26px;display:flex}.product-card .pname{color:var(--ink);margin-bottom:7px;font-size:10.5px;font-weight:600;line-height:1.25}.product-card .pprice-pill{background:var(--paper-deep);text-align:center;border-radius:7px;padding:5px 0}.product-card .pprice-pill span{color:var(--clay);font-size:10.5px;font-weight:700;font-family:var(--font-mono)}aside.cart-panel{background:var(--ink);flex-direction:column;display:flex;overflow:hidden}.cart-header{flex-shrink:0;padding:14px 16px 0}.cart-header h3{color:var(--cream);letter-spacing:.08em;text-transform:uppercase;font-size:9.5px;font-weight:700;font-family:var(--font-mono);margin:0 0 3px}.ticket-meta{color:var(--cream-muted);font-size:9.5px;font-family:var(--font-mono);margin-bottom:10px}.receipt{background:var(--paper);border-radius:10px 10px 0 0;flex-direction:column;flex:1;margin:0 14px;display:flex;overflow:hidden}.cart-list{flex:1;padding:12px 14px 6px;overflow-y:auto}.cart-card{border:1px solid var(--paper-line);background:#fff;border-radius:11px;align-items:center;gap:9px;margin-bottom:8px;padding:9px;display:flex}.cart-card .ic{border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:32px;height:32px;font-size:16px;display:flex}.cart-card .info{flex:1;min-width:0}.cart-card .pname{color:var(--ink);font-size:10.5px;font-weight:600}.cart-card .pprice{color:var(--clay);font-size:9.5px;font-weight:700;font-family:var(--font-mono);margin-top:2px}.cart-card .meta{color:var(--ink-muted);font-size:8.5px;font-family:var(--font-mono);margin-top:1px}.cart-card .del{background:var(--paper-deep);width:22px;height:22px;color:var(--rust);cursor:pointer;border:none;border-radius:50%;flex-shrink:0;font-size:11px;line-height:1}.cart-card .del:hover{background:#e4d4ae}.empty-state{text-align:center;color:var(--ink-muted);padding:48px 14px;font-size:11px}.empty-state .mark{font-family:var(--font-display);color:var(--ink);margin-bottom:6px;font-size:14px;font-style:italic;display:block}.receipt-tear{background:var(--paper);clip-path:polygon(0% 0%,100% 0%,100% 100%,92% 35%,84% 100%,76% 35%,68% 100%,60% 35%,52% 100%,44% 35%,36% 100%,28% 35%,20% 100%,12% 35%,4% 100%,0% 35%);flex-shrink:0;height:13px;margin:0 14px}.bottom-summary{background:var(--ink);flex-shrink:0;padding:12px 16px 16px}.sum-row{color:var(--cream-muted);font-size:10px;font-family:var(--font-mono);justify-content:space-between;margin-bottom:4px;display:flex}.sum-row.total{color:var(--cream);font-size:13px;font-weight:700;font-family:var(--font-body);margin:7px 0 11px}.sum-row.total .amt{color:var(--gold);font-size:16px;font-family:var(--font-mono)}.btn-validate{background:var(--clay-bright);color:#fff;cursor:pointer;width:100%;font-size:12.5px;font-weight:700;font-family:var(--font-body);border:none;border-radius:10px;padding:13px;transition:background .15s,transform .1s}.btn-validate:hover{background:var(--clay)}.btn-validate:active{transform:scale(.98)}footer.app-footer{background:var(--ink);border-top:1px solid var(--ink-line);text-align:center;color:var(--cream-muted);font-size:10px;font-family:var(--font-mono);flex-shrink:0;padding:9px;display:none}.overlay{z-index:600;background:#141c2c99;justify-content:center;align-items:flex-end;display:none;position:fixed;inset:0}.overlay.show{display:flex}.sheet{background:var(--paper);border-radius:20px 20px 0 0;flex-direction:column;width:100%;max-height:86vh;padding:16px 20px 24px;animation:.22s sheetUp;display:flex;overflow-y:auto}@keyframes sheetUp{0%{opacity:.4;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}.sheet-handle{background:var(--paper-line);border-radius:2px;flex-shrink:0;width:40px;height:4px;margin:0 auto 14px}.sheet-preview{border-radius:16px;justify-content:center;align-items:center;width:80px;height:66px;margin:0 auto 10px;font-size:32px;display:flex}.sheet h3{text-align:center;font-family:var(--font-display);color:var(--ink);margin:0 0 4px;font-size:15px;font-weight:600}.sheet .catalog-price{text-align:center;color:var(--ink-muted);font-size:10.5px;font-family:var(--font-mono);margin-bottom:16px}.price-field{border:1.5px solid var(--clay);background:#fff;border-radius:11px;justify-content:space-between;align-items:baseline;margin-bottom:14px;padding:9px 14px;display:flex}.price-field label{color:var(--clay);letter-spacing:.07em;font-size:8px;font-weight:700;font-family:var(--font-mono);display:block}.price-field input{width:100%;color:var(--ink);font-size:18px;font-weight:700;font-family:var(--font-mono);background:0 0;border:none;outline:none}.price-field .unit{color:var(--ink-muted);font-size:11px;font-weight:600;font-family:var(--font-mono);flex-shrink:0}.qty-row{justify-content:center;align-items:center;gap:0;margin-bottom:16px;display:flex}.qty-row button{border:none;border:1px solid var(--paper-line);width:38px;height:38px;color:var(--ink);cursor:pointer;background:#fff;border-radius:9px;font-size:16px}.qty-row button:hover{border-color:var(--clay)}.qty-row input{text-align:center;width:58px;height:38px;color:var(--ink);font-size:14px;font-family:var(--font-mono);background:0 0;border:none;font-weight:600}.sheet-actions{flex-shrink:0;gap:10px;display:flex}.sheet-actions button{font-family:var(--font-body);cursor:pointer;border:none;border-radius:11px;flex:1;padding:13px;font-size:11.5px;font-weight:700;transition:background .15s}.btn-cancel{background:var(--paper-deep);color:var(--ink-muted)}.btn-cancel:hover{background:#e4d4ae}.btn-confirm{background:var(--clay-bright);color:#fff}.btn-confirm:hover{background:var(--clay)}.recap-row{border-bottom:1px dashed var(--paper-line);align-items:center;gap:8px;padding:9px 0;font-size:10.5px;display:flex}.recap-row .ic{font-size:16px}.recap-row .info{flex:1;min-width:0}.recap-row .pname{color:var(--ink);font-weight:600}.recap-row .qty{color:var(--ink-muted);font-size:9px;font-family:var(--font-mono)}.recap-row .amt{color:var(--ink);font-weight:600;font-family:var(--font-mono)}.recap-row .del{background:var(--paper-deep);width:18px;height:18px;color:var(--rust);cursor:pointer;border:none;border-radius:50%;flex-shrink:0;font-size:9px}.recap-items{flex-shrink:1;max-height:200px;margin-bottom:8px;overflow-y:auto}.recap-totals .sum-row{color:var(--ink-muted)}.recap-total-box{background:var(--ink);border-radius:11px;flex-shrink:0;justify-content:space-between;align-items:center;margin:10px 0 12px;padding:11px 15px;display:flex}.recap-total-box .lab{color:var(--cream);font-size:12px;font-weight:700;font-family:var(--font-mono)}.recap-total-box .amt{color:var(--gold);font-size:17px;font-weight:700;font-family:var(--font-mono)}.payment-hint{text-align:center;color:var(--ink-muted);font-size:9.5px;font-family:var(--font-mono);flex-shrink:0;margin-bottom:13px}#confirm-screen,#error-screen{text-align:center;background:var(--ink);flex-direction:column;justify-content:center;align-items:center;min-height:100vh;padding:40px 22px;display:none}#confirm-screen .stamp,#error-screen .stamp{margin-bottom:18px}#confirm-screen h2,#error-screen h2{color:var(--cream);font-family:var(--font-display);margin:0 0 6px;font-size:19px;font-weight:600}#confirm-screen .desc,#error-screen .desc{color:var(--cream-muted);margin-bottom:4px;font-size:11.5px}.timestamp{color:var(--cream-muted);font-size:10px;font-family:var(--font-mono);margin-bottom:20px}.amount-pill{background:var(--ink-soft);border:1px solid var(--ink-line);border-radius:14px;margin-bottom:18px;padding:11px 28px}.amount-pill .lab{color:var(--cream-muted);font-size:9px;font-family:var(--font-mono);letter-spacing:.05em}.amount-pill .amt{color:var(--green);font-size:22px;font-weight:700;font-family:var(--font-mono)}.detail-box{background:var(--ink-soft);border:1px solid var(--ink-line);border-radius:13px;width:100%;max-width:360px;margin-bottom:20px;padding:5px 16px}.detail-line{border-bottom:1px solid var(--ink-line);justify-content:space-between;padding:9px 0;font-size:10.5px;display:flex}.detail-line:last-child{border-bottom:none}.detail-line .k{color:var(--cream-muted)}.detail-line .v{color:var(--cream);font-weight:600;font-family:var(--font-mono)}.detail-line .v.accent{color:var(--gold)}.confirm-actions{gap:10px;width:100%;max-width:360px;display:flex}.confirm-actions button{font-family:var(--font-body);cursor:pointer;border:none;border-radius:11px;flex:1;padding:13px;font-size:11px;font-weight:700;transition:background .15s}.btn-ghost{color:var(--cream-muted);border:1px solid var(--ink-line);background:0 0}.btn-ghost:hover{background:var(--ink-soft)}.btn-new{background:var(--clay-bright);color:#fff}.btn-new:hover{background:var(--clay)}.btn-retry{background:var(--rust);color:#fff;cursor:pointer;width:100%;max-width:360px;font-size:11.5px;font-weight:700;font-family:var(--font-body);border:none;border-radius:11px;margin-bottom:10px;padding:13px}.btn-retry:hover{background:#9c302a}.btn-back{color:var(--cream-muted);border:1px solid var(--ink-line);cursor:pointer;width:100%;max-width:360px;font-size:10.5px;font-family:var(--font-body);background:0 0;border-radius:11px;padding:11px}.error-box{background:var(--ink-soft);border:1px solid var(--rust);color:#f0a9a4;width:100%;max-width:360px;font-size:10.5px;font-family:var(--font-mono);border-radius:11px;margin-bottom:18px;padding:11px}#toast{background:var(--ink);border:1px solid var(--gold);color:var(--cream);z-index:700;white-space:nowrap;border-radius:9px;padding:10px 20px;font-size:11px;font-weight:600;display:none;position:fixed;bottom:24px;left:50%;transform:translate(-50%)}@media (width>=880px){.seller-text,.logout-link{display:block}.tabbar{display:none}footer.app-footer{display:block}.catalog-head{margin-bottom:14px;display:block}header.app-header{padding:14px 28px}.body-wrap{flex-direction:row}nav.side-left{background:var(--ink);border-right:1px solid var(--ink-line);flex-direction:column;flex-shrink:0;width:188px;padding:18px 0;display:flex}nav.side-left .nav-item{cursor:pointer;color:var(--cream-muted);border-left:3px solid #0000;align-items:center;gap:9px;padding:10px 22px;font-size:12px;display:flex}nav.side-left .nav-item.active{border-left-color:var(--clay-bright);color:var(--cream);background:#c95b2c1a;font-weight:600}nav.side-left .nav-item:hover{color:var(--cream)}.tab-panel,.tab-panel.visible{display:flex!important}main.catalog-area{flex:1;padding:26px 30px}.search-bar{margin:0 -30px 8px;padding-top:2px;padding-left:30px;padding-right:30px}.search-input-wrap{max-width:340px}.grid{grid-template-columns:repeat(auto-fill,minmax(152px,1fr));gap:14px}.product-card{padding:13px}.product-card .ic-wrap{height:68px;font-size:30px}aside.cart-panel{border-left:1px solid var(--ink-line);flex-shrink:0;width:320px}.overlay{align-items:center}.sheet{border-radius:18px;width:420px;max-height:82vh}.modal-recap{width:460px}}@media (width>=1180px){main.catalog-area{padding:30px 44px}.search-bar{margin:0 -44px 8px;padding-left:44px;padding-right:44px}aside.cart-panel{width:340px}}
@@ -1,38 +0,0 @@
1
- (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e,t){let n=new DOMParser().parseFromString(e,`image/svg+xml`).documentElement;t.innerHTML=``,t.appendChild(n)}function t(e,t,n){return`<svg viewBox="0 0 100 100" width="${e}" height="${e}">
2
- ${t?`<circle cx="50" cy="50" r="47" fill="none" stroke="${t}" stroke-width="2.5"/>
3
- <circle cx="50" cy="50" r="40" fill="none" stroke="${t}" stroke-width="1" stroke-dasharray="2 3"/>`:``}
4
- <path d="M27 64 L27 37 L41 57 L50 39 L59 57 L73 37 L73 64"
5
- stroke="${n}" stroke-width="7" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
6
- <circle cx="50" cy="26" r="5" fill="${n}"/>
7
- </svg>`}function n(){let e=document.getElementById(`header-stamp`);e&&(e.innerHTML=t(30,``,`#C95B2C`))}new class{el;constructor(e){this.el=e}render(t,r){this.el.innerHTML=`
8
- <header class="app-header">
9
- <div class="brand-row">
10
- <div class="stamp sm" id="header-stamp"></div>
11
- <div class="wordmark">${t.firstName} <em>${t.secondName}</em></div>
12
- </div>
13
- <div class="header-right">
14
- <div class="seller">
15
- <div class="avatar">${r.stringAvatar}</div>
16
- <div class="seller-text">
17
- <div class="name">${r.name}</div>
18
- <div class="role">${r.role}</div>
19
- </div>
20
- </div>
21
- <div class="daily-badge">
22
- <span class="lab">VENTES DU JOUR</span>
23
- <span class="amt">${r.dailySalesTotal} F</span>
24
- </div>
25
- <span class="logout-link" onclick="logout()">Déconnexion</span>
26
- </div>
27
- </header>
28
- `;let i=document.querySelector(`.avatar`);r.svgAvatar&&i&&e(r.svgAvatar,i),n()}}(document.querySelector(`#app`)).render({firstName:`Maman`,secondName:`Solution`,icone:`
29
- <svg viewBox="0 0 100 100">
30
- <path d="M26 66 L26 36 L41 58 L50 38 L59 58 L74 36 L74 66"
31
- stroke="#FF6B35" stroke-width="10" fill="none"
32
- stroke-linecap="round" stroke-linejoin="round"/>
33
- <circle cx="50" cy="25" r="7" fill="#FF6B35"/>
34
- </svg>`},{name:`Tesia M.`,role:`Vendeur · Zone Nord`,dailySalesTotal:5660,stringAvatar:`TS`,svgAvatar:`
35
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="white">
36
- <circle cx="12" cy="8" r="4"/>
37
- <path d="M12 14c-4.42 0-8 3.13-8 7h16c0-3.87-3.58-7-8-7z"/>
38
- </svg>`});
@@ -1,36 +0,0 @@
1
- <svg width="100%" viewBox="0 0 680 680" role="img" xmlns="http://www.w3.org/2000/svg" style="">
2
- <title style="fill:rgb(0, 0, 0);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">Mama Solution icon</title>
3
- <desc style="fill:rgb(0, 0, 0);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">A warm, friendly icon representing Mama Solution — a heart-shaped home with nurturing colors and the letter M</desc>
4
-
5
-
6
-
7
- <circle cx="340" cy="310" r="260" style="fill:rgb(59, 32, 22);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
8
-
9
- <g transform="translate(340, 300)" style="fill:rgb(0, 0, 0);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
10
- <path d="M0,-140 C-10,-180 -80,-200 -120,-150 C-160,-100 -160,-40 0,80 C160,-40 160,-100 120,-150 C80,-200 10,-180 0,-140 Z" style="fill:rgb(232, 114, 74);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
11
- </g>
12
-
13
- <polygon points="340,130 210,250 470,250" style="fill:rgb(192, 73, 43);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
14
-
15
- <rect x="295" y="250" width="90" height="130" rx="8" style="fill:rgb(232, 114, 74);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
16
- <rect x="303" y="258" width="74" height="114" rx="5" fill="#C0492B" opacity="0.3" style="fill:rgb(192, 73, 43);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.3;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
17
- <rect x="303" y="258" width="34" height="50" rx="3" style="fill:rgb(253, 246, 237);stroke:rgb(192, 73, 43);color:rgb(0, 0, 0);stroke-width:3px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
18
- <rect x="343" y="258" width="34" height="50" rx="3" style="fill:rgb(253, 246, 237);stroke:rgb(192, 73, 43);color:rgb(0, 0, 0);stroke-width:3px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
19
- <rect x="310" y="318" width="60" height="62" rx="6" fill="#7B2D12" style="fill:rgb(123, 45, 18);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
20
- <circle cx="358" cy="352" r="4" fill="#F5B942" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
21
-
22
- <text x="340" y="220" text-anchor="middle" opacity="0" style="fill:rgb(253, 246, 237);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0;font-family:Georgia, serif;font-size:88px;font-weight:700;text-anchor:middle;dominant-baseline:auto">M</text>
23
-
24
- <circle cx="220" cy="155" r="10" opacity="0.85" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.85;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
25
- <circle cx="460" cy="155" r="7" opacity="0.7" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.7;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
26
- <circle cx="190" cy="300" r="5" opacity="0.6" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.6;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
27
- <circle cx="490" cy="280" r="8" opacity="0.75" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.75;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
28
- <circle cx="240" cy="430" r="6" opacity="0.55" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.55;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
29
- <circle cx="440" cy="440" r="9" opacity="0.65" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.65;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
30
-
31
- <path d="M215,150 L222,143 L229,150 L222,157 Z" opacity="0.9" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.9;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
32
- <path d="M455,148 L462,141 L469,148 L462,155 Z" opacity="0.8" style="fill:rgb(245, 185, 66);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.8;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
33
-
34
- <text x="340" y="620" text-anchor="middle" style="fill:rgb(240, 201, 168);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:sans-serif;font-size:28px;font-weight:500;text-anchor:middle;dominant-baseline:auto">Mama Solution</text>
35
- <text x="340" y="648" text-anchor="middle" style="fill:rgb(201, 146, 106);stroke:none;color:rgb(0, 0, 0);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:sans-serif;font-size:18px;font-weight:400;text-anchor:middle;dominant-baseline:auto">Votre maison, notre mission</text>
36
- </svg>
package/dist/index.html DELETED
@@ -1,14 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/assets/mama_solution_icon-C3CyFw6W.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>ms-header</title>
8
- <script type="module" crossorigin src="/assets/index-CrMp4nnN.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-CUGd06Dc.css">
10
- </head>
11
- <body>
12
- <div id="app"></div>
13
- </body>
14
- </html>