wertyz-vue 3.13.5 → 3.15.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/AUDIT.md ADDED
@@ -0,0 +1,222 @@
1
+ # Audit WertyzVue: 2026-11-18
2
+
3
+ Rozsah: všetky komponenty v `src/components/wertyz`, `global.css` / `globalMobile.css`, `wTable.js`, `wChartPlugins.js` a `index.js`, porovnané s `DESIGN.md`.
4
+ Spôsob: impeccable detector a ručné čítanie kódu. V prehliadači sa nič nespúšťalo.
5
+ Kontrasty sú vypočítané z hex hodnôt tokenov. Riadky platia pre stav k dátumu auditu.
6
+
7
+ ## Skóre: 9/20 (Poor)
8
+
9
+ | Oblasť | Skóre | Hlavný problém |
10
+ |---|---|---|
11
+ | Prístupnosť | 1 | klikateľné `div`/`img` bez klávesnice; modal nemá dialog semantiku; teal ↔ biela má kontrast 3.49:1 |
12
+ | Výkon | 2 | deep watchery v tabuľke a grafoch; `chart.update()` pri každom pohybe myši; timery v SortedStack |
13
+ | Theming | 2 | tokeny sú dobré, ale použité len napoly: `.12s linear` ~20×, chýba `--radius-lg` a font-family, farby grafov sú v JS |
14
+ | Responzivita | 2 | IntervalPanel `calc(84% - 30px)`, legenda 245px, VerticalNavbar `15vw`, pagination na 375px |
15
+ | Integrita | 2 | reálne logické chyby (dátumy, select-all, tooltip, náhodné farby), duplicitné id, nadväzovanie cez DOM |
16
+
17
+ **Detector:** všetkých 9 hlásení „side-tab“ sú false positive (3px akcent je predpísaný v DESIGN.md). Šedé farby natvrdo sú P3.
18
+
19
+ ---
20
+
21
+ ## Fáza 1: logické chyby (bez dizajnového rozhodnutia, nízke riziko)
22
+
23
+ **Stav 2026-11-18:** body 1.1–1.23 a 1.25 sú opravené, build prechádza, zálohy sú v `*.bak-audit1`.
24
+ Body 1.24 a 1.26 sú otvorené, lebo menia správanie pre appky.
25
+
26
+ | # | P | Miesto | Chyba | Oprava |
27
+ |---|---|---|---|---|
28
+ | 1.1 | P1 | `WertyzIntervalPanel.vue:243, 313` | „7/31 dní“ posiela `getMinutes()` ako hodiny → posun o ~2 dni | doplniť `d.getHours()` |
29
+ | 1.2 | P1 | `WertyzIntervalPanel.vue:431` | Realtime nezruší `selectedItem` | vynulovať `selectedItem`/`selectedSubItem` |
30
+ | 1.3 | P2 | `WertyzIntervalPanel.vue:225, 257` | „Minulý týždeň“ v nedeľu ukáže aktuálny týždeň | `((getDay()+6)%7)+7` |
31
+ | 1.4 | P2 | `WertyzIntervalPanel.vue:528` | `find` volá `dateRange()` aj na „Custom“ → TypeError | guard `item.dateRange &&` |
32
+ | 1.5 | P2 | `WertyzIntervalPanel.vue:513-519` | pri mount dvojitý emit → 2× fetch | emit raz |
33
+ | 1.6 | P1 | `WertyzSelectList.vue:243-253` | „vybrať všetko“ pri hľadaní zahodí skryté výbery | pridávať/odoberať len filtrované |
34
+ | 1.7 | P2 | `WertyzSelectList.vue:122, 332` | input nevymaže text pri zmene `items` | `v-model` |
35
+ | 1.8 | P2 | `wTable.js:53-56` | Enter s `;` dáva do regexu neescapovaný text → hľadanie spadne | splitovať escapovanú hodnotu |
36
+ | 1.9 | P2 | `WertyzTable.vue:517, 578, 715` | setTimeout po unmount → `null.updateSize` | clear v `beforeUnmount` |
37
+ | 1.10 | P2 | `WertyzTable.vue:511, 574` | „Počet výsledkov“ sa po hľadaní neaktualizuje (48 appiek to obchádza) | `dt.on('draw')` |
38
+ | 1.11 | P2 | `WertyzBarChart.vue:391, 395` | tooltip „Total“ pri horizontálnom grafe sčíta indexy; hard-coded EN | arrow fn a `$t` |
39
+ | 1.12 | P1 | `WertyzBarChart.vue:212, 255`, `ChartLegend:144`, `ChartRowLegend:71` | `randomColor()` bez indexu → legenda nesedí s grafom, farby skáču | `randomColor(index)` / fixná paleta |
40
+ | 1.13 | P2 | `WertyzChartRowLegend.vue:74` | volá `randomColor` bez `wMixin` → TypeError | pridať mixin |
41
+ | 1.14 | P2 | `WertyzBarChart.vue:474-491` | po hoveri sa stratí `useOpacity` | obnoviť pôvodnú alfu |
42
+ | 1.15 | P2 | `WertyzBarChart.vue:289-300` | computed mutuje `this.options.plugins` rodiča | vrátiť kópiu |
43
+ | 1.16 | P2 | `wChartPlugins.js:89, 114, 145` | nový 20s timer každý frame; `scales.yAxis` (v Chart.js 4 je to `y`); `return` pri nule | zmazať timer, `scales.y`, `continue` |
44
+ | 1.17 | P2 | `ChartLegend:156` | legenda sa prihlási po jednorazovom emite → hover nefunguje pri async dátach | odovzdať inštanciu cez ref |
45
+ | 1.18 | P2 | `WertyzRadioGroup.vue:71, 7/11, 50`, `WertyzRadio.vue:38` | chýba medzera v triede; value vs index; zdieľaný `name` | opraviť |
46
+ | 1.19 | P2 | `WertyzMenu.vue:184, 227` | `getElementById` bez null checku; `subItemMap` sa neresetuje | `?.`, reset |
47
+ | 1.20 | P2 | `WertyzMobileMenu.vue:46-71` | neskopovaný CSS → na mobile všetky `.glyphicons` 30px a všetky `h3` teal | scope pod `#w-mobile-menu` |
48
+ | 1.21 | P2 | `WertyzModal.vue:110-142` | scroll lock z `--scroll-y` → skok na začiatok; vnorený modal odomkne body | `window.scrollY`, počítadlo |
49
+ | 1.22 | P2 | `WertyzDetailHeader.vue:103` | back pri deep linku vedie na `''` → nerobí nič | fallback route |
50
+ | 1.23 | P2 | `WertyzDetailHeaderMobile.vue:22, 26` | triedy `class-xs-*` neexistujú | `flex: 1` |
51
+ | 1.24 | P2 | `WertyzInput.vue:99` | emit len na `change`, číslo ako string | `input`, `valueAsNumber` (**mení správanie → over v appkách**) |
52
+ | 1.25 | P2 | `package.json` | chart.js, vue-chartjs a pluginy sú `"latest"` | pinnúť na aktuálne verzie |
53
+ | 1.26 | P2 | `WertyzTable.vue:2`, ďalšie | root `id="wertyz-table"` = default `tableId`; natvrdo zadané id | triedy namiesto id |
54
+
55
+ ## Fáza 2: kontrast (vyžaduje dizajnové rozhodnutie)
56
+
57
+ **Stav 2026-11-18:** hotové.
58
+ - Nové tokeny `--orange-strong`, `--orange-ink`, `--coal-muted`; badges používajú tmavé varianty textu.
59
+ - `btn.orange`, warning toast, `.txt-orange`, QuickFilter, tlačidlá v IntervalPanel, skupiny v menu, titulok ConfirmationWindow.
60
+ - Štítky v grafoch volia coal alebo bielu podľa kontrastu.
61
+ - Hranica inputu (`--grey`, 1.80:1) ostáva, lebo nie je v rozsahu rozhodnutia.
62
+
63
+ **Rozhodnutie 2026-11-18:** teal ↔ biela ostáva, výnimka je zapísaná v DESIGN.md. Opravujú sa len páry, ktoré sú výrazne pod hranicou: orange, badges, `--grey` text, QuickFilter, ConfirmationWindow titulok, skupiny v menu, štítky v grafoch.
64
+
65
+ Teal `#009999` na bielej je 3.49:1, biela na teal tiež 3.49:1. Orange na bielej je 2.71:1. Badges: success 2.86, warning 1.80, error 3.27.
66
+ Hranica inputu `#C1C1C1` je 1.80:1 (WCAG 1.4.11 vyžaduje 3:1).
67
+ Ďalšie miesta:
68
+ - dátové štítky v grafoch: biela na svetlých sériách (1.1–1.5:1)
69
+ - ConfirmationWindow: titulok na orange (2.7:1)
70
+ - skupiny v menu `#6f6867` na coal (3.0:1)
71
+ - QuickFilter `--grey` (1.8:1)
72
+ - IntervalPanel: všetky tlačidlá
73
+
74
+ Návrh riešenia: malý text a výplne tlačidiel s bielym textom dať na `--darkgreen` (6.79:1). Teal ponechať pre plochy, ikony a veľký text.
75
+ Badges a text na svetlých tónoch prepnúť na tmavé varianty. Hranicu inputu stmaviť.
76
+
77
+ ## Fáza 3: klávesnica a ARIA
78
+
79
+ **Stav 2026-11-18:** body P0 a P1 sú opravené, build prechádza, v prehliadači to ešte nikto neskúšal.
80
+ Hotové: riadok tabuľky, Modal, Pagination, Menu, MobileMenu, VerticalNavbar, QuickFilter, ChartLegend, Input (`error`, `id`), SelectList, `ariaLabel` grafov, RadioGroup a fokus checkboxu.
81
+ Otvorené sú body P2.
82
+
83
+ | P | Miesto | Problém |
84
+ |---|---|---|
85
+ | P0 | `WertyzTable` + `global.css:906` | riadok sa nedá otvoriť klávesnicou (appky majú `cell.onclick` na 101 miestach) → `rowActivate` emit, `tabindex`, Enter |
86
+ | P1 | `WertyzModal.vue` | chýba `role="dialog"`, `aria-modal`, Esc, focus trap a návrat fokusu; zatváracie tlačidlo je `<img>` |
87
+ | P1 | `WertyzPagination.vue` | stránky sú `div` → `<button>`, `aria-current`, `<nav>` |
88
+ | P1 | `WertyzMenu.vue` | toggle a skupiny sú `div`/`li` → `<button aria-expanded>`; zatvorené submenu ostáva v tab poradí (`inert`) |
89
+ | P1 | `WertyzMobileMenu`, `WertyzVerticalNavbar`, `WertyzQuickFilter`, `ChartLegend` | klikateľné `span`/`div` → `<button>` + `aria-pressed`/`selected` |
90
+ | P1 | `WertyzInput.vue` | label bez `for`/`id`; chýba prop `error` (`aria-invalid`, správa) |
91
+ | P1 | `WertyzSelectList.vue` | checkboxy bez mena |
92
+ | P1 | grafy | `<canvas>` bez `aria-label` → prop `ariaLabel` |
93
+ | P1 | `WertyzRadioGroup` | `fieldset`/`legend` |
94
+ | P1 | `global.css:1446` | zaškrtnutý checkbox nemá viditeľný fokus |
95
+ | P2 | `IntervalPanel`, `ListNavbar`, `DetailNavbar` | aktívny stav len triedou → `aria-pressed`/`aria-current`/`aria-selected`; `href="#"` bez `.prevent`; chýba `type="button"` |
96
+ | P2 | `TablePanel`, `ListNavbar`, `IntervalPanel`, `SwitchButton`, `Checkbox` | inputy a selecty bez labelu; switch bez `role="switch"`; `required` sa nedostane na input |
97
+ | P2 | loadery, ProgressBar, KpiCard | `role="status"`/`progressbar`; trend vyjadrený len farbou |
98
+ | P2 | `WertyzConfirmationWindow` | „Nie“ je zelené primárne tlačidlo (DESIGN: white outline), chýba default fokus |
99
+
100
+ ## Fáza 4: tokeny a pohyb
101
+
102
+ - `.12s linear` (~20×) nahradiť `var(--transition-micro)`
103
+ - doplniť `--radius-lg: 5px` (DESIGN ho má, CSS nie) a použiť ho v Modal a global.css
104
+ - `ChartContent` radius 10px → `--radius-md`; font-weight `bold`/`550` → škála 600
105
+ - doplniť token `--font-family` a nastaviť `Chart.defaults.font.family`/`color`
106
+ - farby grafov (mriežka, ticky, plugin šedé) čítať z CSS premenných; paleta v poradí podľa DESIGN
107
+ - reduced-motion pre animácie grafov, ProgressBar (1s), `.slide`/`.scale` v global.css, modal slideside, `scroll-behavior`
108
+ - hover scale na legendách (DESIGN: bez scale)
109
+ - mŕtvy kód: `.w__table td` padding, `isShowNavbarContent`, staré chart options, `SortedStack` helpery, `IntervalPanel_Old.vue`, `.bak*` súbory
110
+
111
+ ## Fáza 5: responzivita
112
+
113
+ - IntervalPanel: JS sticky s `calc(84% - 30px)` nahradiť `position: sticky` a JS zmazať
114
+ - ChartContent: inline 45/55% bez mobilného prepisu
115
+ - ChartLegend: text 180px, na mobile 2 stĺpce → horizontálny scroll
116
+ - Pagination: šípky 11–16px, na 375px pretečie
117
+ - VerticalNavbar: `15vw` bez mobilného pravidla, aktívny marker 1.2:1
118
+ - Modal: 40% na tabletoch je úzky
119
+ - WertyzHeader: mobilná vetva zahodí `thirdBtn`, `other-row` a má iný názov slotu
120
+ - `IS_MOBILE` sa vypočíta raz a nereaguje na otočenie
121
+
122
+ ## Čo funguje dobre
123
+
124
+ - WertyzKpiCard, WertyzEmptyState a WertyzFormSection sú referenčné: plne tokenizované, sedia so spec.
125
+ - globálny `:focus-visible` ring; väčšina komponentov má reduced-motion blok
126
+ - listenery a observery sa upratujú (Menu, Modal, ColumnPicker, ListNavbar, DetailNavbar); vue-chartjs ničí inštancie
127
+ - DataTables 2 dáva `aria-sort` a sortovanie klávesnicou
128
+
129
+ ---
130
+
131
+ # Re-audit: 2026-11-18 (po fázach 1, 2 a 3 P0/P1)
132
+
133
+ Rozsah ten istý ako pri prvom audite, plus kontrola regresií voči `*.bak-audit1`. V prehliadači sa nič nespúšťalo.
134
+
135
+ ## Skóre: 10/20 (Acceptable), predtým 9/20
136
+
137
+ | Oblasť | Pred | Teraz | Čo drží skóre dole |
138
+ |---|---|---|---|
139
+ | Prístupnosť | 1 | 2 | P2 body Fázy 3 (DetailNavbar, SwitchButton, loadery, KpiCard trend), appky neposielajú `ariaLabel` grafom, `--red` 4.0:1, teal fokus na `--lightgreen` 2.86:1 |
140
+ | Výkon | 2 | 2 | deep watcher `tableData`, `chart.update()` pri každom pohybe myši |
141
+ | Theming | 2 | 2 | Fáza 4 nezačatá (`.12s linear`, `--radius-lg`, font token, paleta grafov v JS) |
142
+ | Responzivita | 2 | 2 | Fáza 5 nezačatá |
143
+ | Integrita | 2 | 2–3 | regresie z opráv sú opravené; zostáva 1.24, 1.26 a `dist` |
144
+
145
+ ## Regresie, ktoré re-audit našiel a ktoré sú už opravené
146
+
147
+ - **WertyzTable (P0):** Enter na riadku klikal na prvú bunku s `onclick`. V Clearing2 to bol delete šablóny faktúry bez potvrdenia. Teraz Enter na riadku spustí iba `row.onclick` a bunky s `onclick` sú samostatné tlačidlá.
148
+ - **WertyzTable:** počet výsledkov pri serverSide ukazoval veľkosť strany. Teraz sa berie `page.info().recordsDisplay` a `draw.dt` sa pri unmount odpojí.
149
+ - **SelectList:** hlavičkový checkbox počítal aj skryté výbery.
150
+ - **Pagination:** fokus sa po kliknutí strácal a fokus ring bol orezaný.
151
+ - **QuickFilter:** vybraná položka bola po kontrastnej oprave takmer na nerozoznanie. Pribudol 3px akcent.
152
+ - **Modal:**
153
+ - Esc pri otvorenom multiselecte alebo datepickeri zatváral celý modal.
154
+ - Hlavička bola o ~20px vyššia, opravené absolútne umiestneným tlačidlom.
155
+ - Tab trap pustil fokus von, ak bol fokus mimo dialógu.
156
+ - Pri súčasnom mount bolo zlé poradie zásobníka modalov.
157
+ - Dialóg s vlastnou hlavičkou nemal meno.
158
+ - **DetailHeader:** fallback „späť“ odrezával posledný segment URL, čo v Clearing2 viedlo na zlú route alebo 404. Teraz ide na rodičovskú route, inak na `/`.
159
+ - **MobileMenu:** po prepnutí sa strácal fokus. Teraz je to jeden prepínač s `aria-expanded`.
160
+ - **ChartLegend:**
161
+ - nebral do úvahy `useOpacity`
162
+ - bol fokusovateľný aj bez funkcie
163
+ - padal počas unmountu grafu
164
+ - **PieChart:**
165
+ - bez `colors` nesedela farba legendy s grafom
166
+ - offsety sa nastavovali podľa `colors` namiesto `data`
167
+ - `parseInt` skrýval výseky menšie ako 1
168
+ - **ChartRowLegend:** farba progress baru.
169
+ - **Grafy:** súčet v tooltipe je formátovaný ako `sk`; `readableLabelColor` pri hsl alebo pomenovanej farbe vráti coal.
170
+ - **DESIGN.md:** zastarané údaje o orange a badges sú aktualizované.
171
+
172
+ ## Otvorené
173
+
174
+ - **`dist/` vlastní root (13. 11.)**, `npm run build` ho nevie prepísať. Žiadna z dnešných opráv ešte nie je v buildovanom balíku. Treba zmeniť vlastníka (chown), spraviť build a zvýšiť verziu.
175
+ - Fáza 1: 1.24 (Input `@change`, žiadna appka ho nepoužíva) a 1.26 (natvrdo zadané id).
176
+ - Fáza 3 P2 a nové P2:
177
+ - DetailNavbar ARIA a `href="#"`
178
+ - SwitchButton (`role="switch"`, emit pri mount, default id)
179
+ - Checkbox `required`
180
+ - loadery a ProgressBar
181
+ - KpiCard trend
182
+ - ColumnPicker Esc a fokus
183
+ - vyhľadávanie v Menu a disabled položky
184
+ - DetailHeaderMobile späť bez mena
185
+ - tlačidlá v IntervalPanel bez `type="button"`
186
+ - každý klikateľný riadok je samostatný tab stop (roving tabindex)
187
+ - `--red` (4.0:1) a teal fokus ring na `--lightgreen` (2.86:1) nie sú pokryté rozhodnutím o výnimke.
188
+ - Grafy: SortedStack s `asDataset` prepisuje kontajnery a s `indexAxis: 'y'` počíta zlú os; `chartOverflowHandler` lezie cez DOM pomocou id.
189
+ - Fázy 4 a 5 bez zmeny.
190
+
191
+ # Re-audit 3 (18. 11. 2026, po redizajne)
192
+
193
+ ## Skóre: 11/20 (Acceptable), predtým 10/20. Dizajnová kritika (impeccable): 24/40, predtým 23/40
194
+
195
+ Detektor: červená 4.0:1 a placeholder 2.8:1 sú preč (`--darkred`, `#767676`); help text má 13px, darkgrey. Teal 3.5:1 zostáva ako vedomá výnimka.
196
+
197
+ ## Opravené po re-audite (regresie z redizajnu)
198
+
199
+ - **R1:** `WertyzModal` – `:aria-labelledby` (bol tam literál `titleId`, dialog nemal meno).
200
+ - **R2:** karta tabuľky bez tab baru má plný rámik a radius; bez horného okraja je len pod tab barom.
201
+ - **R3:** `.w__header-row` sa zalamuje (titul min. 320px); pod 1200px sa vyhľadávanie zmenšuje.
202
+ - **R4:** `WertyzNavbarMore` – Tab v menu ho zavrie a vráti fokus na tlačidlo; tlačidlo otvára aj Medzerník.
203
+ - **R5:** `WertyzListContent` posiela `search-slot` len keď je vyplnený (zmizol prázdny stĺpec); na mobile `search` padá späť na `search-slot`.
204
+ - **R6:** `WertyzBarChart` skracuje popisky len na osi kategórií (číselná alebo časová os má formát Chart.js). V deme je horizontálny graf.
205
+ - **R7:** `WertyzDetailHeaderMobile` má rovnaké poradie tlačidiel ako desktop (primárne posledné).
206
+
207
+ ## Otvorené z re-auditu 3
208
+
209
+ - **R8:** jazyk sa zapisuje do propu rodiča; `$t` warningy.
210
+ - **R9:** X v modale je na svetlej hlavičke neviditeľné; cieľ kliku má 20px.
211
+ - **R10:** vstupy v paneli tabuľky nemajú label.
212
+ - **R11:** šípka natívneho selectu zmizne, ak appka použije skratku `background`.
213
+ - **R12:** scroll oblasť grafu nie je fokusovateľná.
214
+ - **R13:** úrovne nadpisov.
215
+ - **Kritika (app úroveň):**
216
+ - slovník stavov a badge v tabuľke
217
+ - schválenie a read-only detail
218
+ - dôvod zamietnutia
219
+ - top-N v grafe
220
+ - kartový režim na mobile
221
+ - oddeľovače tisícov
222
+ - vyváženie tónov fact chipov
package/CLAUDE.md ADDED
@@ -0,0 +1,41 @@
1
+ # WertyzVue
2
+
3
+ Komponentová knižnica `wertyz-vue` pre Wertyz weby (WEB_* aplikácie).
4
+
5
+ ## Synchronizácia so skillmi
6
+
7
+ Z tejto knižnice sú odvodené dva skilly v repe `AI/Skills` (marketplace `wertyz-ai-skills`,
8
+ lokálny klon `~/.claude/plugins/marketplaces/wertyz-ai-skills`, vetva `develop`):
9
+
10
+ - `plugins/wertyz-vue-frontend/skills/use-wertyz-vue-components/`: katalóg komponentov
11
+ (`SKILL.md` + `references/*.md` podľa oblasti: layout-navigation, data-display, forms-inputs,
12
+ feedback-overlays, charts, maps, helpers, export-routediagram-webpush)
13
+ - `plugins/wertyz-web-app/skills/create-wertyz-web-app/`: šablóna WEB_* aplikácie
14
+ (`SKILL.md`, `references/design.md`, `references/vue-frontend.md`, `assets/` templaty)
15
+
16
+ **Pravidlo:** každá zmena v knižnici, ktorá mení to, čo skill popisuje, sa v tom istom kroku
17
+ premietne aj do skillu. Ide o:
18
+ - nový / odstránený / premenovaný komponent, prop, event, slot, export v `src/index.js`
19
+ - zmenené správanie, opravený alebo nový „gotcha“
20
+ - dizajnové tokeny a CSS triedy (`DESIGN.md`, `w__*`), ktoré používa `design.md` alebo šablóna
21
+ - nová verzia v `package.json` (skilly uvádzajú verziu, napr. „3.13“)
22
+
23
+ Postup:
24
+ 1. Uprav knižnicu.
25
+ 2. Nájdi dotknuté miesta: `grep -rn "<NázovKomponentu|prop>" ~/.claude/plugins/marketplaces/wertyz-ai-skills/plugins/wertyz-{vue-frontend,web-app}`.
26
+ 3. Uprav skill (aj šablóny v `assets/`, ak komponent používajú).
27
+ 4. Na konci vypíš zoznam zmenených súborov skillu. Commit a push do `AI/Skills` až po súhlase používateľa.
28
+ Ostatní dostanú zmenu cez `/plugin marketplace update wertyz-ai-skills`.
29
+
30
+ Čisto interné zmeny (refaktor bez zmeny API, správania a vzhľadu) skill neovplyvňujú.
31
+
32
+ ## Demo a vizuálne overenie
33
+
34
+ `npm run demo` postaví ukážku všetkých komponentov zo `src/` a spustí ju na http://127.0.0.1:8765/
35
+ (`#list`, `#detail`, `#parts`). Prostredie zodpovedá appkám v CMS: Source Sans Pro, Bootstrap 3, DataTables 2,
36
+ jQuery a select2 je len náhrada. Peer závislosti (vue-multiselect) sa berú z `WERTYZ_DEMO_MODULES`,
37
+ predvolene z `node_modules` WEB_Onboard.
38
+
39
+ **Pravidlo:** každú vizuálnu zmenu (CSS, šablóna komponentu) pred odovzdaním pozri v deme v prehliadači,
40
+ prípadne naživo v appke na app.wertyzdev.com. Kontrola iba z kódu nestačí. Nový komponent alebo prop pridaj
41
+ aj do `demo/main.js`.
package/DESIGN.md CHANGED
@@ -21,8 +21,11 @@ colors:
21
21
  danger-dark: "#AB0101"
22
22
  danger-light: "#FDE2E2"
23
23
  warning: "#FF7400" # --orange
24
- warning-dark: "#DA6C10"
24
+ warning-dark: "#DA6C10" # --darkorange: legacy, no longer used by the library
25
25
  warning-light: "#FFC89A"
26
+ warning-strong: "#B35500" # --orange-strong: orange fills with white text, orange text on white (4.98:1)
27
+ warning-ink: "#8A3F00" # --orange-ink: text on warning-light (5.01:1)
28
+ coal-muted: "#9A9394" # --coal-muted: muted text on coal, e.g. menu group labels (5.41:1)
26
29
  info: "#1240AB" # --darkblue
27
30
  info-light: "#DCE6F7"
28
31
  accent-yellow: "#FFF989"
@@ -31,8 +34,9 @@ colors:
31
34
  typography:
32
35
  font-family: "'Source Sans Pro', 'Segoe UI', Arial, sans-serif"
33
36
  weights: { light: 300, regular: 400, medium: 500, semibold: 600 }
34
- page-title: { size: 32px, weight: 500, color: primary }
35
- modal-title: { size: 24px, weight: 600, color: "#FFFFFF" }
37
+ page-title: { size: 26px, weight: 600, color: coal }
38
+ card-title: { size: 15px, weight: 600, color: coal } # WertyzFormSection, chart cards, Onboard .section-title
39
+ modal-title: { size: 20px, weight: 600, color: "#FFFFFF" } # left-aligned on the teal header bar
36
40
  input-value: { size: 18px, weight: 300 }
37
41
  tab-label: { size: 15px, weight: 600 }
38
42
  body: { size: 14px, weight: 400, line-height: 1.35 }
@@ -42,7 +46,7 @@ typography:
42
46
  shape:
43
47
  radius-sm: 3px # checkbox, radio, tags, chips, pagination, small icon buttons
44
48
  radius-md: 4px # inputs, selects, buttons, search, dropdowns, cards, KPI
45
- radius-lg: 5px # modal only
49
+ radius-lg: 5px # legacy token; the modal uses radius-md (4px) since 2026-11-18
46
50
  accent-width: 3px # left/top accent bars
47
51
  control-height: 40px
48
52
  elevation:
@@ -71,9 +75,22 @@ terminals, reports. Users are dispatchers, accountants and administrators who lo
71
75
  numbers all day**. The visual language is called **"Ostrý minimál"** (sharp minimal):
72
76
 
73
77
  - **Sharp, not soft.** Corners 3–4 px, never pills (except decorative circles). Thin 1 px borders.
74
- - **Tight, hard shadows** tinted with coal, never large diffuse glows.
78
+ - **Flat cards, shadows only for overlays**: cards on the canvas are separated by a 1 px border, no shadow
79
+ (decision 2026-11-18: card shadows looked heavy and bled into the tab bar). Menus, dropdowns and modals that
80
+ float above the page keep a tight coal-tinted shadow; never large diffuse glows.
75
81
  - **One brand colour – teal `#009999`** – carries every action and active state. Everything else is
76
82
  greyscale + coal. Status colours (red / orange / blue) only for meaning, never decoration.
83
+ *Accepted contrast exception (decision 2026-11-18):* teal ↔ white is 3.49:1, below WCAG AA 4.5:1 for
84
+ normal text. The brand teal stays for buttons, links and active states; it passes for text ≥ 18.66 px bold
85
+ / 24 px. Pairs far below that are not covered by the exception and get fixed: orange on white (2.71:1),
86
+ the light-tint badges (success 2.86, warning 1.80, error 3.27), `--grey` text on white (1.80).
87
+ Red (decision 2026-11-18): `--red #FF0000` is 4.0:1 on white — red text, red outline buttons, `red--full`
88
+ fills, required marks, error toasts and the active error badge use `--darkred #AB0101` (7.7:1); raw `--red` only
89
+ for error field borders (non-text, 3:1 suffices) and the KPI red edge.
90
+ How they are fixed:
91
+ - Text on a tint uses the dark variant: success `--darkgreen`, warning `--orange-ink`, error `--darkred`.
92
+ - Orange fills and orange text use `--orange-strong`; raw `--orange` is only for non-text marks (KPI bar, chart series).
93
+ - Chart data labels pick coal or white by contrast with the series colour.
77
94
  - **Coal anchors**: the sidebar menu and table headers are near-black `#231F20` with a faint teal
78
95
  radial glow and a 1 px diagonal hairline texture. This dark/light contrast is the signature.
79
96
  - **3 px accent bars** mark "active / selected / important": top border of the active tab, left border of a
@@ -91,9 +108,10 @@ Apps render inside the WEB_Wertyz CMS (iframe), so there is no app top bar of ou
91
108
 
92
109
  ```
93
110
  ┌──────────────┬──────────────────────────────────────────────────────┐
94
- │ SIDEBAR │ CONTENT (padding 15px, white) │
95
- │ coal + │ ┌ Header: page title 32px teal ─── [search] [btn] ┐ │
96
- │ texture │ └─────────────────── 2px #F3F3F3 bottom line ─────┘ │
111
+ │ SIDEBAR │ CANVAS #E9EDED (padding 15px, full viewport height) │
112
+ │ coal + │ ┃ Page title 26px coal semibold [search] [btn] │
113
+ │ texture │ description 13px muted │
114
+ │ │───────────────── 1px #D5DCDC hairline ────────────────│
97
115
  │ width 16% │ ┌ Tab bar (light teal) ───────── count · [10 ▾] ──┐ │
98
116
  │ │ ├ Table panel: search · Stĺpce · Počet výsledkov ─┤ │
99
117
  │ logo 100px │ ├ TABLE: coal header, 2px teal underline ─────────┤ │
@@ -102,6 +120,47 @@ Apps render inside the WEB_Wertyz CMS (iframe), so there is no app top bar of ou
102
120
  └──────────────┴──────────────────────────────────────────────────────┘
103
121
  ```
104
122
 
123
+ - **Canvas**: `--surface-canvas #E9EDED` fills the whole viewport (`WertyzContent` min-height 100vh) — a
124
+ page never ends in a white strip. Content blocks are **white cards** on it (1 px `#DDE3E3`, raised
125
+ radius 4 px, no shadow); the list table is a card attached under the tab bar.
126
+ - **Table panel = filter bar** (`WertyzTablePanel`, inside the table card): neutral `--surface-well` area with a
127
+ card border and radius 4 px that groups the search, the custom filters of the `first-item` / `second-item` slots (dates, selects) on white fields,
128
+ and the result count. Never a second teal band under the tab bar. All its controls are 40 px (search,
129
+ "Stĺpce" button, page-length select). Search = field + green magnifier block on the right (same as the
130
+ header search in the apps); the page-length select keeps the teal arrow block like every select.
131
+ - **Numbers are content**: tabular figures in tables, KPI values 600, numeric table columns semibold and right
132
+ aligned (DataTables `dt-type-numeric`); IDs in their own treatment (record chip). DataTables texts are
133
+ localised by WertyzTable (keys `TableInfo`, `TableEmpty`, `TableNoMatch`, … with Slovak fallbacks) and its own
134
+ page-length select is hidden (the panel / navbar has one).
135
+ - **Form fields are one family** (input, native `select.form-control`, select2, vue-multiselect, datepicker): 40 px,
136
+ 1 px `--grey` edge, radius 4 px, value 18 px light coal, placeholder `#767676` 18 px; every single select has the
137
+ same teal 40 px arrow block with a white triangle (native selects get it via CSS). Field labels 16 px regular
138
+ (also the `WertyzRadioGroup` heading). Stacked checkboxes 10 px apart. Switch texts from `SwitchOn`/`SwitchOff`
139
+ (fallback Áno / Nie).
140
+ - **Header actions** are one group on the right, buttons as wide as their text (min 140 px), primary action last
141
+ (rightmost, same order on phones); when title (min 320 px) + search + actions do not fit, the row wraps.
142
+ Phones show the same header content (facts, record chip, state, meta).
143
+ - **Confirmations name the object and the consequence** ("Žiadosť #1002 (DPB a.s.) bude zamietnutá a
144
+ organizácia dostane e-mail."), buttons are verbs ("Ponechať" / "Zamietnuť"), cancel first as a white outline
145
+ button (initial focus), confirm red.
146
+ - **One card language** for everything on the canvas: white, 1 px `--card-border #DDE3E3`, **no shadow**,
147
+ radius 4 px, padding 20 px — list table card, detail content items, chart cards, KPI cards, option tiles.
148
+ Card titles: 15 px semibold coal, sentence case (`WertyzFormSection`, chart cards). 12 px uppercase is only
149
+ for micro-labels (table head, KPI label). **The teal mark means active / selected / important only**
150
+ (active tab, active menu item, selected row/tile, KPI edge, required input) — never decoration on titles. A tab bar and the card under it form **one box**: the bar
151
+ carries the card's 1 px side edges and the top radius, the card has no top edge — so the active white tab
152
+ never sticks out past the card border. Inside a card, tool rows (table search / count) are separated by
153
+ a hairline, never by another tinted band.
154
+ - **Page header (WertyzHeader on lists = WertyzDetailHeader on details)**: one look for both, sitting on the
155
+ canvas — no coloured band (the CMS above already has a black top bar; a dark band clashed with it, decision
156
+ 2026-11-18). Full-bleed 1 px `#D5DCDC` hairline under it, title 26 px semibold coal, actions right.
157
+ The header carries **content, not decoration** (impeccable critique 2026-11-18: the teal-tick + title +
158
+ subtitle header read as a generic AI template):
159
+ - Lists: `description` (14 px muted) and **facts** — what waits for the operator ("5 čaká na schválenie",
160
+ "2 aktivácie zlyhali"), tinted by status tone, clickable to the matching tab.
161
+ - Details: the **record number chip** (coal, 16 px semibold tabular, "#1002") before the title, the entity
162
+ name as the title (not a generic noun like "Žiadosť"), ONE status badge and a meta line
163
+ (type · date · author). The decorative icon box is only a fallback when there is no record number.
105
164
  - **Sidebar (WertyzMenu)**: coal background + texture, logo block 100 px, then a 2 px teal line. Items: teal
106
165
  icon (25 px glyph in a 28 px box) + white label with ellipsis; hover = coal-hover. **Active item = dark teal
107
166
  `#006666` background + 3 px teal left accent, white icon, semibold label**; its open submenu sits on
@@ -114,18 +173,20 @@ Apps render inside the WEB_Wertyz CMS (iframe), so there is no app top bar of ou
114
173
  ## 3. Page types
115
174
 
116
175
  ### List page (most common)
117
- 1. **Header** – title (32 px, medium, teal, single line with ellipsis) left; optional search and up to 3
118
- buttons right (`col-lg-2` each). Bottom: 2 px `#F3F3F3` line, 10 px gap.
176
+ 1. **Header** – see §2 *Page header*: 26 px semibold coal title, description, actionable **facts**; optional
177
+ search; actions as one right-aligned group sized by text. Full-bleed 1 px `#D5DCDC` hairline under it.
119
178
  2. **Filter tab bar** (WertyzListNavbar) – light-teal strip (`#D5EEE8`), tabs 45 px high, 15 px semibold,
120
179
  inactive grey `#686868`, active black with **3 px teal top border**. Right side tools: column picker,
121
180
  "Počet výsledkov: **128**" (20 px semibold number), rows-per-page select (100 px).
122
- 3. **Table panel** (optional, instead of the count in the tab bar) – light teal, 2 px teal bottom border:
123
- search input with teal square search button, date filters, column picker, result count, page length.
181
+ 3. **Table panel** (optional, instead of the count in the tab bar) – the neutral **filter bar** from §2
182
+ (`--surface-well`, card border, radius 4 px): search field with the green magnifier block, date / select
183
+ filters from the slots, column picker, result count, page length — all 40 px.
124
184
  4. **Table** – see components.
125
185
  5. **Pagination** – arrow images `« ‹ › »` + square page chips (radius 3 px, active = teal fill).
126
186
 
127
187
  ### Detail page
128
- - **Detail header**: back arrow, icon chip, title, up to 2 buttons.
188
+ - **Detail header**: back link, **record number chip** (#1002) + entity name as title + ONE status badge +
189
+ meta line (icon box only as a fallback without a record number); action group right, primary last.
129
190
  - **Two blocks**: an *informations* card (key facts as label/value grid) and a *content* card with
130
191
  **detail tabs** (same tab bar as lists) and the tab content directly inside the card (~10 px from edge).
131
192
  - Forms inside tabs are grouped with **form sections**.
@@ -143,7 +204,7 @@ Apps render inside the WEB_Wertyz CMS (iframe), so there is no app top bar of ou
143
204
  | `white` (secondary) | white bg, teal text, 1 px teal border | teal bg, white text |
144
205
  | `red` (destructive outline) | white bg, red text + border | red bg, white text |
145
206
  | `red--full` | red bg, white | `#AB0101` |
146
- | `orange` | orange bg, white | `#DA6C10` |
207
+ | `orange` | `--orange-strong` bg, white | `--orange-ink` |
147
208
  | `lightgrey` | `#F3F3F3`, black | white |
148
209
  | `darkgreen`, `black` | solid | coal |
149
210
  | disabled | `#F3F3F3` bg, grey text, 60 % opacity, no shadow | – |
@@ -171,13 +232,14 @@ Usually full width of their grid column (`btn-block`). Labels sentence case, sho
171
232
  - Numbers right-aligned or centred with tabular figures; missing data as red semibold "NO DATA".
172
233
  - First column often a small logo/icon (40 px high).
173
234
  - Footer (tfoot) summary rows per currency, semibold.
174
- - **Column picker** (desktop): white "Stĺpce **5 / 8**" button (32 px, count chip light teal/dark teal) next
235
+ - **Column picker** (desktop): white "Stĺpce **5 / 8**" button (40 px, count chip light teal/dark teal) next
175
236
  to the result count; menu = floating card with checkboxes, locked columns dimmed, "Obnoviť predvolené" link.
176
- - **Mobile – cards mode**: each row becomes a white card (radius 4 px, raised shadow, padding 10 × 12 px,
237
+ - **Mobile – cards mode**: each row becomes a white card (radius 4 px, 1 px card border, padding 10 × 12 px,
177
238
  8 px gap). Optional **icon** (logo ≤ 64 × 40 px) left of the **title** (16 px semibold); badge top-right;
178
239
  then rows "LABEL value" where the label is 11 px uppercase muted, 38 % width. Above the cards a sort
179
240
  select (standard select look) + direction arrow.
180
- - **Mobile – scroll mode**: plain horizontal scroll; first column may be pinned.
241
+ - **Mobile – scroll mode**: plain horizontal scroll inside the table card (never the page), with the house
242
+ scrollbar (teal thumb on `--lightgrey`); no scrollbar when the table fits. First column may be pinned.
181
243
 
182
244
  ### Tabs
183
245
  - Bar background light teal, bottom 1 px `#D8D4D4`. Tab: 45 px, padding 8 × 30 px, 15 px semibold,
@@ -185,27 +247,49 @@ Usually full width of their grid column (`btn-block`). Labels sentence case, sho
185
247
  white bar (active tab `#F3F3F3`).
186
248
  - **Mobile**: horizontally scrollable strip with fade + arrow hints (arrow images from pagination); with
187
249
  many tabs a select with a 3 px teal left border; optional accordion of raised cards (44 px headers).
250
+ - **Overflow "More"** (`overflow="more"`, desktop + mobile strip): the strip never scrolls; tabs that don't
251
+ fit move into "Viac" pinned to the **right end** of the bar — a compact control, not a tab: hairline
252
+ divider on its left, 14 px semibold muted text, count in a white 20 px chip (dark teal digits), 12 px
253
+ chevron icon. Open: white with the 3 px teal top bar like an active tab, chevron flipped, and the menu
254
+ hangs flush underneath (square top corners, 1 px `#D8D4D4`, bottom radius 4 px, floating shadow,
255
+ 40 px rows, hover = light-teal row + 3 px teal left accent). The active tab always stays in the strip.
188
256
 
189
257
  ### KPI card
190
- White, radius 4 px, raised shadow, **3 px coloured left accent** (teal default; dark teal / orange / red /
258
+ White, radius 4 px, 1 px card border, **3 px coloured left accent** (teal default; dark teal / orange / red /
191
259
  blue / grey by meaning), padding 14 × 16 px. Label 12 px uppercase semibold muted (+ 14 px icon), value
192
260
  30 px medium coal + 14 px unit, optional trend badge (radius 3 px, success/error tint), optional thin progress
193
- bar, optional description. Clickable variant: hover light-teal bg + floating shadow. Grid: auto-fill, min
261
+ bar, optional description. Clickable variant: hover light-teal bg + teal-tinted border. Grid: auto-fill, min
194
262
  160 px, gap 10 px.
195
263
 
264
+ ### Selectable tiles (WertyzTileSelect)
265
+ Choice between options as horizontal **option cards** (package, tariff, payment type, card type) — built so
266
+ text never wraps: `[icon well] [title / description] [meta] [control]`. Grid auto-fill, min 260 px, cards
267
+ stretch to fill the row, gap 10 px, one column on a phone. Card: white, 1 px `#D8D4D4`, radius 4 px,
268
+ min height 72 px, padding 12 × 16 px. Icon well 44 px, light teal, icon 24 px dark teal
269
+ (monochrome `icon` as a mask, or a colour `image`). Title 15 px semibold and description 13 px muted, **one
270
+ line each with an ellipsis**, full text in the tooltip. Meta (price) 15 px semibold tabular. Control 20 px:
271
+ circle = pick one, square = pick several, empty ring coal 50 % (3.2:1).
272
+ Hover: teal-tinted border (no shadow, no scale). Selected: 2 px teal edge (inset), faint teal surface
273
+ `#F2F9F8`, icon well + control filled dark teal with white icon / check, meta dark teal — no full teal fill,
274
+ no white text on teal. Disabled: light-grey card, content at .6. One native radio/checkbox per card.
275
+ (The square centred tiles of WEB_Onboard `PackageTile` wrap their texts — don't copy them.)
276
+
196
277
  ### Form section
197
- Title 12 px uppercase semibold **dark teal**, letter-spacing .06 em, optional 13 px muted description;
278
+ Title = **card title**: 15 px semibold coal, sentence case, no teal mark; optional 13 px muted description;
198
279
  16 px between grid rows; consecutive sections separated by 1 px `#F3F3F3` line + 18 px padding.
199
280
 
200
281
  ### Badges / chips
201
- Tinted pairs, padding 4 × 10 px, radius 3 px, 12 px semibold: success light-teal/teal, warning light-orange/orange, error
202
- `#FDE2E2`/red, info `#DCE6F7`/dark blue, neutral `#F3F3F3`/dark grey. Active (selected) chip = solid colour
282
+ Tinted pairs, padding 4 × 10 px, radius 3 px, 12 px semibold: success light-teal/dark teal, warning light-orange/`--orange-ink`, error
283
+ `#FDE2E2`/dark red, info `#DCE6F7`/dark blue, neutral `#F3F3F3`/dark grey. Active (selected) chip = solid colour
203
284
  with white text.
204
285
 
205
286
  ### Modal
206
- Scrim `rgba(0,0,0,.5)`; dialog white, **radius 5 px**, modal shadow, width 40 % desktop / full on mobile.
207
- Header **teal bar** with white 24 px semibold title and close icon; body padding 30 px; footer buttons right
208
- (`white` cancel + `green` confirm). Confirmation dialog: short question, red confirm for destructive actions.
287
+ Scrim `rgba(0,0,0,.5)`; dialog white, radius 4 px, modal shadow, width 40 % desktop / full on mobile.
288
+ Header **teal bar** (kept on purpose, decision 2026-11-18) with a white 20 px semibold title **left-aligned**
289
+ like the page header and a white 20 px X close (36 px click target, no red icon); body padding 24 px; footer buttons right
290
+ (`white` cancel + `green` confirm). On open the first body field gets focus, unless it opens a popup on
291
+ focus (multiselect, datepicker, select2) — then the dialog itself, so nothing drops down by itself. Confirmation dialog: `--orange-strong` header bar, red confirm for
292
+ destructive actions.
209
293
 
210
294
  ### Empty state
211
295
  1 px **dashed** grey box, radius 4 px, padding 18 px: 38 px grey circle with icon, coal semibold title, muted
@@ -216,7 +300,10 @@ Loader: teal spinner on white scrim. Small inline loader for buttons/sections. P
216
300
  grey. Toast/alerts use the badge tint pairs.
217
301
 
218
302
  ### Charts
219
- Chart.js (pie / bar / line) in white chart cards with a title row, arranged in a responsive `.charts` grid.
303
+ Chart.js (pie / bar / line) in white chart cards (`WertyzChartContent`: card border, no shadow, radius 4 px)
304
+ whose title is the **card title** (15 px semibold coal, sentence case, no mark — same as `WertyzFormSection`,
305
+ also for an `h4` an app puts into the `#header` slot), arranged in a responsive `.charts` grid. Chart text uses the app font (Source Sans Pro,
306
+ 12 px, `#4E4E4E`), grid lines coal 8 %, legend marks 10 px (`applyChartTheme`).
220
307
  Series colours come from the app's `CHART_COLORS` and should be drawn from the palette above (teal first,
221
308
  then dark teal, orange, dark blue, purple, light blue, yellow); light grey grid lines, legend below.
222
309
 
@@ -0,0 +1 @@
1
+ export default "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMy4yOSAyMC4yMyI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMwMDcxY2U7c3Ryb2tlOiNmZmY7c3Ryb2tlLW1pdGVybGltaXQ6MTA7c3Ryb2tlLXdpZHRoOjAuNXB4O308L3N0eWxlPjwvZGVmcz48ZyBpZD0iVnJzdHZhXzIiIGRhdGEtbmFtZT0iVnJzdHZhIDIiPjxnIGlkPSJMYXllcl8zIiBkYXRhLW5hbWU9IkxheWVyIDMiPjxlbGxpcHNlIGNsYXNzPSJjbHMtMSIgY3g9IjMuMjUiIGN5PSIxNy42IiByeD0iMyIgcnk9IjIuMzgiLz48cGF0aCBkPSJNNCwxNi44OGMwLC41Ni0uMzQsMS0uNzUsMWgwYy0uNDIsMC0uNzYtLjQ1LS43Ni0xVjEuNDJjMC0uNTYuMzQtMSwuNzYtMWgwYy40MSwwLC43NS40NS43NSwxWiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTQuNjIsOC43MXMyLjY5LTIuNTcsNC40Ny0uMDVjMS4yMiwxLjc3LDMuOTUuNywzLjk1LjA1VjEuNTZzLTMsMS4yNy00LjIxLS4yNmMwLDAtMi4yMS0yLjE1LTQuMjctLjNaIi8+PC9nPjwvZz48L3N2Zz4="