@keenmate/pure-admin-core 2.4.0 → 2.5.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.
Files changed (44) hide show
  1. package/README.md +11 -6
  2. package/dist/css/main.css +47 -130
  3. package/package.json +1 -1
  4. package/snippets/AUDIT.md +94 -0
  5. package/snippets/alerts.html +264 -89
  6. package/snippets/badges.html +193 -61
  7. package/snippets/buttons.html +178 -0
  8. package/snippets/callouts.html +210 -129
  9. package/snippets/cards.html +383 -200
  10. package/snippets/checkbox-lists.html +199 -65
  11. package/snippets/code.html +55 -11
  12. package/snippets/command-palette.html +401 -111
  13. package/snippets/comparison.html +144 -93
  14. package/snippets/customization.html +311 -104
  15. package/snippets/data-display.html +584 -0
  16. package/snippets/detail-panel.html +470 -138
  17. package/snippets/filter-card.html +246 -0
  18. package/snippets/forms.html +408 -308
  19. package/snippets/grid.html +253 -141
  20. package/snippets/layout.html +379 -480
  21. package/snippets/lists.html +144 -47
  22. package/snippets/loaders.html +64 -39
  23. package/snippets/manifest.json +330 -280
  24. package/snippets/modal-dialogs.html +137 -64
  25. package/snippets/modals.html +221 -151
  26. package/snippets/notifications.html +285 -0
  27. package/snippets/popconfirm.html +213 -19
  28. package/snippets/profile.html +290 -330
  29. package/snippets/statistics.html +247 -0
  30. package/snippets/tables.html +359 -150
  31. package/snippets/tabs.html +129 -45
  32. package/snippets/timeline.html +123 -56
  33. package/snippets/toasts.html +179 -31
  34. package/snippets/tooltips.html +199 -81
  35. package/snippets/typography.html +183 -58
  36. package/snippets/utilities.html +511 -415
  37. package/snippets/virtual-scroll.html +201 -75
  38. package/snippets/web-daterangepicker.html +369 -189
  39. package/snippets/web-multiselect.html +360 -124
  40. package/src/scss/core-components/_alerts.scss +51 -12
  41. package/src/scss/core-components/_pagers.scss +1 -1
  42. package/src/scss/core-components/_popconfirm.scss +35 -13
  43. package/src/scss/core-components/_tables.scss +2 -134
  44. package/src/scss/variables/_components.scss +17 -2
@@ -1,8 +1,21 @@
1
1
  <!-- ================================
2
2
  COMPARISON TABLE SNIPPETS
3
3
  Pure Admin Visual Framework
4
+
5
+ Two- or three-column tables for "what changed?" scenarios —
6
+ version history, merge review, data diff views. Highlights rows
7
+ whose values differ from a base column, with an extra "conflict"
8
+ state for three-way merges where both branches touched the same
9
+ field.
10
+
11
+ Desktop: standard table layout.
12
+ Mobile (≤ $mobile-breakpoint): each <tr> stacks into a card-like
13
+ block, one cell per line. Each value cell uses a data-label="…"
14
+ attribute to render its column name on the left via ::before —
15
+ omit the attribute and you get a blank 120px column.
4
16
  ================================ -->
5
17
 
18
+
6
19
  <!-- ================================
7
20
  TWO-COLUMN COMPARISON
8
21
  Base values vs New values
@@ -33,10 +46,11 @@
33
46
  </tr>
34
47
  </thead>
35
48
  <tbody>
36
- <!-- Regular row (no changes) -->
49
+ <!-- Regular row (no changes). data-label renders the
50
+ column header beside each value when stacked on mobile. -->
37
51
  <tr>
38
52
  <td class="pa-comparison-table__label">Country Iso 2</td>
39
- <td>
53
+ <td data-label="Base">
40
54
  <div class="pa-comparison-table__value">
41
55
  <span>be</span>
42
56
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -44,7 +58,7 @@
44
58
  </button>
45
59
  </div>
46
60
  </td>
47
- <td>
61
+ <td data-label="New">
48
62
  <div class="pa-comparison-table__value">
49
63
  <span>be</span>
50
64
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -54,17 +68,18 @@
54
68
  </td>
55
69
  </tr>
56
70
 
57
- <!-- Empty row -->
71
+ <!-- Empty row (keep the <td>s so the table structure
72
+ stays balanced on mobile card stacking) -->
58
73
  <tr>
59
74
  <td class="pa-comparison-table__label">Region</td>
60
- <td></td>
61
- <td></td>
75
+ <td data-label="Base"></td>
76
+ <td data-label="New"></td>
62
77
  </tr>
63
78
 
64
- <!-- Changed row (pink highlight) -->
79
+ <!-- Changed row: pink highlight with inline-start border accent -->
65
80
  <tr>
66
81
  <td class="pa-comparison-table__label">Town</td>
67
- <td>
82
+ <td data-label="Base">
68
83
  <div class="pa-comparison-table__value">
69
84
  <span>Beveren</span>
70
85
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -72,7 +87,7 @@
72
87
  </button>
73
88
  </div>
74
89
  </td>
75
- <td class="pa-comparison-table__changed">
90
+ <td data-label="New" class="pa-comparison-table__changed">
76
91
  <div class="pa-comparison-table__value">
77
92
  <span>Antwerpen</span>
78
93
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -82,7 +97,8 @@
82
97
  </td>
83
98
  </tr>
84
99
 
85
- <!-- Section header -->
100
+ <!-- Section header (single td with colspan covering all columns).
101
+ Its ::before is suppressed on mobile. -->
86
102
  <tr class="pa-comparison-table__section">
87
103
  <td colspan="3">Address metadata</td>
88
104
  </tr>
@@ -90,10 +106,10 @@
90
106
  <!-- Row with status indicator -->
91
107
  <tr>
92
108
  <td class="pa-comparison-table__label">Is active</td>
93
- <td>
109
+ <td data-label="Base">
94
110
  <i class="fa-solid fa-check" style="color: var(--base-success-color);"></i>
95
111
  </td>
96
- <td>
112
+ <td data-label="New">
97
113
  <i class="fa-solid fa-check" style="color: var(--base-success-color);"></i>
98
114
  </td>
99
115
  </tr>
@@ -101,10 +117,10 @@
101
117
  <!-- Row with badge -->
102
118
  <tr>
103
119
  <td class="pa-comparison-table__label">Status</td>
104
- <td>
120
+ <td data-label="Base">
105
121
  <span class="pa-badge pa-badge--success">Active</span>
106
122
  </td>
107
- <td>
123
+ <td data-label="New">
108
124
  <span class="pa-badge pa-badge--success">Active</span>
109
125
  </td>
110
126
  </tr>
@@ -145,7 +161,6 @@
145
161
  </tr>
146
162
  </thead>
147
163
  <tbody>
148
- <!-- Section header -->
149
164
  <tr class="pa-comparison-table__section">
150
165
  <td colspan="4">Contact Information</td>
151
166
  </tr>
@@ -153,7 +168,7 @@
153
168
  <!-- Single change in column A -->
154
169
  <tr>
155
170
  <td class="pa-comparison-table__label">Email</td>
156
- <td>
171
+ <td data-label="Base">
157
172
  <div class="pa-comparison-table__value">
158
173
  <span>john.doe@company.com</span>
159
174
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -161,7 +176,7 @@
161
176
  </button>
162
177
  </div>
163
178
  </td>
164
- <td class="pa-comparison-table__changed">
179
+ <td data-label="Change A" class="pa-comparison-table__changed">
165
180
  <div class="pa-comparison-table__value">
166
181
  <span>john.doe@newcompany.com</span>
167
182
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -169,7 +184,7 @@
169
184
  </button>
170
185
  </div>
171
186
  </td>
172
- <td>
187
+ <td data-label="Change B">
173
188
  <div class="pa-comparison-table__value">
174
189
  <span>john.doe@company.com</span>
175
190
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -182,7 +197,7 @@
182
197
  <!-- Single change in column B -->
183
198
  <tr>
184
199
  <td class="pa-comparison-table__label">Phone</td>
185
- <td>
200
+ <td data-label="Base">
186
201
  <div class="pa-comparison-table__value">
187
202
  <span>+32 123 456 789</span>
188
203
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -190,7 +205,7 @@
190
205
  </button>
191
206
  </div>
192
207
  </td>
193
- <td>
208
+ <td data-label="Change A">
194
209
  <div class="pa-comparison-table__value">
195
210
  <span>+32 123 456 789</span>
196
211
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -198,7 +213,7 @@
198
213
  </button>
199
214
  </div>
200
215
  </td>
201
- <td class="pa-comparison-table__changed">
216
+ <td data-label="Change B" class="pa-comparison-table__changed">
202
217
  <div class="pa-comparison-table__value">
203
218
  <span>+32 987 654 321</span>
204
219
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -208,10 +223,13 @@
208
223
  </td>
209
224
  </tr>
210
225
 
211
- <!-- Conflict (both A and B changed differently) -->
226
+ <!-- Conflict: both A and B changed differently.
227
+ Note that __conflict composes with __changed — it
228
+ recolours the left-border ::before that __changed
229
+ provides; alone, __conflict has no border accent. -->
212
230
  <tr>
213
231
  <td class="pa-comparison-table__label">Department</td>
214
- <td>
232
+ <td data-label="Base">
215
233
  <div class="pa-comparison-table__value">
216
234
  <span>Sales</span>
217
235
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -219,7 +237,7 @@
219
237
  </button>
220
238
  </div>
221
239
  </td>
222
- <td class="pa-comparison-table__changed">
240
+ <td data-label="Change A" class="pa-comparison-table__changed">
223
241
  <div class="pa-comparison-table__value">
224
242
  <span>Marketing</span>
225
243
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -227,7 +245,7 @@
227
245
  </button>
228
246
  </div>
229
247
  </td>
230
- <td class="pa-comparison-table__changed pa-comparison-table__conflict">
248
+ <td data-label="Change B" class="pa-comparison-table__changed pa-comparison-table__conflict">
231
249
  <div class="pa-comparison-table__value">
232
250
  <span>Engineering</span>
233
251
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -261,10 +279,9 @@
261
279
  </tr>
262
280
  </thead>
263
281
  <tbody>
264
- <!-- Regular row (no changes) -->
265
282
  <tr>
266
283
  <td class="pa-comparison-table__label">Country Iso 2</td>
267
- <td>
284
+ <td data-label="Base">
268
285
  <div class="pa-comparison-table__value">
269
286
  <span>be</span>
270
287
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -272,7 +289,7 @@
272
289
  </button>
273
290
  </div>
274
291
  </td>
275
- <td>
292
+ <td data-label="New">
276
293
  <div class="pa-comparison-table__value">
277
294
  <span>be</span>
278
295
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -282,10 +299,10 @@
282
299
  </td>
283
300
  </tr>
284
301
 
285
- <!-- Changed row with solid background (no left border) -->
302
+ <!-- Solid highlight: deeper pink fill, no inline-start border -->
286
303
  <tr>
287
304
  <td class="pa-comparison-table__label">Town</td>
288
- <td>
305
+ <td data-label="Base">
289
306
  <div class="pa-comparison-table__value">
290
307
  <span>Beveren</span>
291
308
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -293,7 +310,7 @@
293
310
  </button>
294
311
  </div>
295
312
  </td>
296
- <td class="pa-comparison-table__changed pa-comparison-table__changed--solid">
313
+ <td data-label="New" class="pa-comparison-table__changed pa-comparison-table__changed--solid">
297
314
  <div class="pa-comparison-table__value">
298
315
  <span>Antwerpen</span>
299
316
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -303,10 +320,9 @@
303
320
  </td>
304
321
  </tr>
305
322
 
306
- <!-- Another changed row with solid background -->
307
323
  <tr>
308
324
  <td class="pa-comparison-table__label">Postal Code</td>
309
- <td>
325
+ <td data-label="Base">
310
326
  <div class="pa-comparison-table__value">
311
327
  <span>9120</span>
312
328
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -314,7 +330,7 @@
314
330
  </button>
315
331
  </div>
316
332
  </td>
317
- <td class="pa-comparison-table__changed pa-comparison-table__changed--solid">
333
+ <td data-label="New" class="pa-comparison-table__changed pa-comparison-table__changed--solid">
318
334
  <div class="pa-comparison-table__value">
319
335
  <span>2000</span>
320
336
  <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
@@ -363,66 +379,101 @@ document.querySelectorAll('[data-action="accept-a"]').forEach(btn => {
363
379
 
364
380
 
365
381
  <!-- ================================
366
- CSS CLASSES REFERENCE
382
+ COMPONENT REFERENCE
367
383
  ================================ -->
368
384
 
369
385
  <!--
370
- COMPONENT CLASSES:
371
- - pa-comparison-table Main table class
372
- - pa-comparison-table__label Field name column (left)
373
- - pa-comparison-table__value Value wrapper (contains text + copy button)
374
- - pa-comparison-table__copy Copy button styling
375
- - pa-comparison-table__changed Pink highlight for changes (light bg + left border accent)
376
- - pa-comparison-table__changed--solid Solid pink background (no left border)
377
- - pa-comparison-table__conflict Orange highlight for merge conflicts (3-column only)
378
- - pa-comparison-table__conflict--solid Solid orange background (no left border)
379
- - pa-comparison-table__section Section header row
380
-
381
- USAGE PATTERNS:
382
-
383
- Two-column comparison:
384
- - Column 1: Field labels (pa-comparison-table__label)
385
- - Column 2: Base values
386
- - Column 3: New values
387
- - Add pa-comparison-table__changed to cells that changed
388
- - Add pa-comparison-table__changed--solid for solid background highlighting
389
-
390
- Three-column comparison:
391
- - Column 1: Field labels (pa-comparison-table__label)
392
- - Column 2: Base values
393
- - Column 3: Change A values
394
- - Column 4: Change B values
395
- - Add pa-comparison-table__changed to cells that changed
396
- - Add pa-comparison-table__changed--solid for solid background (no border accent)
397
- - Add pa-comparison-table__conflict to cells with conflicting changes
398
- - Add pa-comparison-table__conflict--solid for solid conflict highlighting
399
-
400
- Highlighting Styles:
401
- - Default (pa-comparison-table__changed): Light background + colored left border accent
402
- - Solid (pa-comparison-table__changed--solid): More opaque background, no border accent
403
- - Use --solid variant when left border might interfere with table layout or when you prefer uniform background highlighting
404
-
405
- Section headers:
406
- - Use <tr class="pa-comparison-table__section">
407
- - Single <td> with colspan covering all columns
408
- - Contains section name text
409
-
410
- Empty rows:
411
- - Keep empty <td> elements to maintain table structure
412
- - Helps with visual scanning
413
-
414
- Value cells:
415
- - Wrap content in pa-comparison-table__value div
416
- - Include copy button for copyable values
417
- - Use icons, badges, or plain text as needed
418
-
419
- FEATURES:
420
- Responsive design (stacks on mobile)
421
- Copy to clipboard functionality
422
- Hover-visible copy buttons
423
- Section grouping
424
- Change highlighting (pink)
425
- Conflict highlighting (orange)
426
- Support for icons, badges, and rich content
427
- ✅ Empty row preservation for structure
386
+ TABLE:
387
+ - .pa-comparison-table Base class. Pairs well with .pa-table
388
+ (inherits cell spacing) but also works
389
+ standalone. border-collapse on the root.
390
+
391
+ SUB-ELEMENTS:
392
+ - .pa-comparison-table__label Field-name column (leftmost). Muted
393
+ text on main-bg; reads as a header-ish
394
+ label column.
395
+ - .pa-comparison-table__value Flex wrapper inside a value <td>;
396
+ hosts the text <span> (flex: 1,
397
+ word-break) and the optional __copy
398
+ button.
399
+ - .pa-comparison-table__copy Copy-to-clipboard button. opacity: 0
400
+ by default; revealed on tbody tr:hover.
401
+ Pair with a <button class="pa-btn
402
+ pa-btn--xs pa-btn--icon-only">.
403
+ - .pa-comparison-table__section <tr> modifier: section-header row.
404
+ Use a single <td colspan="N"> child
405
+ spanning all columns. Background
406
+ matches the table header.
407
+
408
+ HIGHLIGHT STATES (apply to individual <td>):
409
+ - .pa-comparison-table__changed Pink tint + inline-start
410
+ border accent (::before).
411
+ Inline-start in LTR; flips in
412
+ RTL.
413
+ - .pa-comparison-table__changed--solid Deeper pink fill, NO border
414
+ accent (the ::before is
415
+ cancelled with content: none).
416
+ Use when the border stripe
417
+ interferes with layout, or
418
+ you just prefer solid fill.
419
+ - .pa-comparison-table__conflict Orange tint (for 3-way merge
420
+ conflicts). IMPORTANT: this
421
+ only recolours the existing
422
+ border accent it does NOT
423
+ define its own ::before.
424
+ Compose with __changed to get
425
+ the full visual:
426
+ class="pa-comparison-table__changed
427
+ pa-comparison-table__conflict"
428
+ - .pa-comparison-table__conflict--solid Deeper orange fill, no border
429
+ accent (same pattern as
430
+ __changed--solid).
431
+
432
+ MOBILE STACKING (automatic below $mobile-breakpoint = 768px):
433
+ - thead is hidden.
434
+ - Each <tr> becomes a card-shaped block with a border and rounded corners.
435
+ - Each <td> becomes a flex row: [label via ::before] [value].
436
+ - The label comes from `data-label="…"` on the <td> — add this attribute
437
+ to every value cell you want a column header for on mobile. Without
438
+ it, the ::before still reserves 120px of empty space to keep layout
439
+ aligned, but the user sees no column name.
440
+ - Section headers (<tr class="__section">) center their text and skip
441
+ the ::before.
442
+ - The __label column becomes a bold single row above each card's values.
443
+
444
+ COPY BUTTON JS CONTRACT:
445
+ - Reads the adjacent <span>'s text via button.previousElementSibling.textContent
446
+ - navigator.clipboard.writeText(...)
447
+ - Swaps the fa-clipboard icon to fa-check for 1s as feedback
448
+
449
+ STRUCTURE PATTERNS:
450
+
451
+ Basic value cell with copy button:
452
+ <td data-label="New">
453
+ <div class="pa-comparison-table__value">
454
+ <span>some value</span>
455
+ <button class="pa-btn pa-btn--xs pa-btn--icon-only pa-comparison-table__copy">
456
+ <i class="fa-solid fa-clipboard"></i>
457
+ </button>
458
+ </div>
459
+ </td>
460
+
461
+ Row with a change highlight:
462
+ <tr>
463
+ <td class="pa-comparison-table__label">Town</td>
464
+ <td data-label="Base">…</td>
465
+ <td data-label="New" class="pa-comparison-table__changed">…</td>
466
+ </tr>
467
+
468
+ Section header row:
469
+ <tr class="pa-comparison-table__section">
470
+ <td colspan="3">Address metadata</td>
471
+ </tr>
472
+
473
+ Three-way conflict cell (must compose __conflict with __changed):
474
+ <td data-label="Change B"
475
+ class="pa-comparison-table__changed pa-comparison-table__conflict">
476
+ <div class="pa-comparison-table__value">…</div>
477
+ </td>
428
478
  -->
479
+