@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
@@ -7,14 +7,18 @@
7
7
  // Alerts
8
8
  .pa-alert {
9
9
  position: relative;
10
- padding: $card-footer-padding-v $card-footer-padding-h;
10
+ padding: $alert-padding-v $alert-padding-h;
11
11
  margin-bottom: $spacing-base;
12
12
  border: $border-width-base solid transparent;
13
13
  border-radius: var(--pa-border-radius);
14
14
  font-size: $font-size-sm;
15
15
  display: flex;
16
16
  flex-wrap: wrap;
17
- align-items: flex-start;
17
+ // Centre by default — keeps icon + single-line content vertically
18
+ // aligned with the text glyph (the most common case). Opt out with
19
+ // .pa-alert--multiline when you have icon + multi-line __content
20
+ // and need the icon to stick to the top with the heading.
21
+ align-items: center;
18
22
 
19
23
  // Remove margins when first/last child in card body
20
24
  .pa-card__body &:first-child {
@@ -121,15 +125,17 @@
121
125
  }
122
126
  }
123
127
 
124
- // Alert sizes (size modifiers only change font-size, padding controlled by theme)
128
+ // Alert sizes both padding AND font-size step at each size.
129
+ // See $alert-padding-{sm,lg}-{v,h} and $alert-font-size-{sm,lg} in
130
+ // variables/_components.scss for theme-overridable scales.
125
131
  &--sm {
126
- padding: $alert-padding-v $alert-padding-h;
127
- font-size: $font-size-sm;
132
+ padding: $alert-padding-sm-v $alert-padding-sm-h;
133
+ font-size: $alert-font-size-sm;
128
134
  }
129
135
 
130
136
  &--lg {
131
- padding: $alert-padding-v $alert-padding-h;
132
- font-size: $font-size-base;
137
+ padding: $alert-padding-lg-v $alert-padding-lg-h;
138
+ font-size: $alert-font-size-lg;
133
139
  }
134
140
 
135
141
  // Dismissible alerts
@@ -137,6 +143,17 @@
137
143
  padding-inline-end: $alert-dismissible-padding-right; // RTL: flips to padding-left
138
144
  }
139
145
 
146
+ // Multiline content modifier — opt out of the default `align-items: center`
147
+ // so that an icon next to a multi-line .pa-alert__content (heading +
148
+ // paragraph + actions, etc.) stays top-aligned with the heading instead
149
+ // of floating in the vertical middle of the stack.
150
+ // Pure structural stacks without an icon don't need this — their children
151
+ // get `flex-basis: 100%` (one per row) so the alert's `align-items` is
152
+ // visually irrelevant for them.
153
+ &--multiline {
154
+ align-items: flex-start;
155
+ }
156
+
140
157
  // Alert components
141
158
  &__icon {
142
159
  flex-shrink: 0;
@@ -146,24 +163,46 @@
146
163
 
147
164
  &__content {
148
165
  flex: 1;
166
+ min-width: 0; // allow long content to shrink + wrap rather than overflow
167
+ }
168
+
169
+ // Force structural sub-elements + top-level <p> / <hr> onto their own row
170
+ // in the alert's flex-wrap layout. Without this, they sit at content width
171
+ // beside each other (heading next to body, actions next to list, …).
172
+ &__heading,
173
+ &__list,
174
+ &__actions,
175
+ > p,
176
+ > hr {
177
+ flex-basis: 100%;
149
178
  }
150
179
 
151
180
  &__heading {
152
- margin: 0 0 $spacing-sm 0;
181
+ margin: 0; // alert flex-gap supplies the spacing — don't double up
153
182
  color: inherit;
154
- font-size: $font-size-lg;
155
183
  font-weight: $font-weight-semibold;
184
+ // No explicit font-size — inherits the alert's body font-size ($font-size-sm)
185
+ // so heading + body read at the same scale (compact look). Add --lg to opt
186
+ // into the bigger, "punchy" presentation when the alert needs deliberate
187
+ // attention.
188
+
189
+ &--lg {
190
+ font-size: $font-size-lg;
191
+ }
156
192
  }
157
193
 
158
194
  &__list {
159
- margin: $spacing-sm 0;
195
+ margin: 0; // alert flex-gap supplies the spacing
160
196
  padding-inline-start: $alert-list-padding-left; // RTL: flips to padding-right
161
197
  }
162
198
 
163
199
  &__actions {
164
- margin-top: $alert-list-item-margin-top;
200
+ margin-top: 0; // alert flex-gap supplies the spacing above the divider
201
+ padding-top: $spacing-base;
202
+ border-top: $border-width-base solid rgba(0, 0, 0, $opacity-light);
165
203
  display: flex;
166
204
  gap: $spacing-sm;
205
+ flex-wrap: wrap;
167
206
  }
168
207
 
169
208
  &__close {
@@ -171,7 +210,7 @@
171
210
  top: 0;
172
211
  inset-inline-end: 0; // RTL: flips to left
173
212
  z-index: $focus-outline-width;
174
- padding: $card-footer-padding-v $card-footer-padding-h;
213
+ padding: $alert-padding-v $alert-padding-h; // matches the alert body's padding
175
214
  background: none;
176
215
  border: none;
177
216
  font-size: $font-size-xl;
@@ -124,7 +124,7 @@
124
124
  width: $spinner-size;
125
125
  height: $spinner-size;
126
126
  border: $spinner-border-width solid var(--pa-border-color);
127
- border-top: $spinner-border-width solid $accent-color;
127
+ border-top: $spinner-border-width solid var(--pa-accent);
128
128
  border-radius: 50%;
129
129
  }
130
130
 
@@ -98,59 +98,81 @@
98
98
  }
99
99
 
100
100
  // ====================
101
- // Position Variants
101
+ // Position Variants (logical — mirror in RTL)
102
102
  // ====================
103
103
 
104
- // Bottom (default) - arrow on top
104
+ // Bottom popconfirm below trigger, arrow on top (block-axis; no RTL flip)
105
105
  .pa-popconfirm--bottom {
106
106
  margin-top: $spacing-sm;
107
107
 
108
108
  .pa-popconfirm__arrow {
109
109
  top: -0.64rem;
110
- left: 50%;
110
+ inset-inline-start: 50%;
111
111
  transform: translateX(-50%) rotate(45deg);
112
112
  border-right: none;
113
113
  border-bottom: none;
114
114
  }
115
+
116
+ // RTL: translateX needs to invert because inset-inline-start flipped sides
117
+ [dir="rtl"] & .pa-popconfirm__arrow {
118
+ transform: translateX(50%) rotate(45deg);
119
+ }
115
120
  }
116
121
 
117
- // Top - arrow on bottom
122
+ // Top popconfirm above trigger, arrow on bottom (block-axis; no RTL flip)
118
123
  .pa-popconfirm--top {
119
124
  margin-bottom: $spacing-sm;
120
125
 
121
126
  .pa-popconfirm__arrow {
122
127
  bottom: -0.64rem;
123
- left: 50%;
128
+ inset-inline-start: 50%;
124
129
  transform: translateX(-50%) rotate(45deg);
125
130
  border-left: none;
126
131
  border-top: none;
127
132
  }
133
+
134
+ [dir="rtl"] & .pa-popconfirm__arrow {
135
+ transform: translateX(50%) rotate(45deg);
136
+ }
128
137
  }
129
138
 
130
- // Right - arrow on left
131
- .pa-popconfirm--right {
132
- margin-left: $spacing-sm;
139
+ // End popconfirm on the inline-end side of trigger (right in LTR, left in RTL)
140
+ // Arrow sits on the inline-start side of the popconfirm, pointing at the trigger.
141
+ .pa-popconfirm--end {
142
+ margin-inline-start: $spacing-sm;
133
143
 
134
144
  .pa-popconfirm__arrow {
135
- left: -0.64rem;
145
+ inset-inline-start: -0.64rem;
136
146
  top: 50%;
137
147
  transform: translateY(-50%) rotate(45deg);
138
148
  border-top: none;
139
149
  border-right: none;
140
150
  }
151
+
152
+ // RTL: mirror the rotated arrow via scaleX(-1) so the hidden borders still
153
+ // mask the side facing the popconfirm body, and the triangle points the
154
+ // right way (toward the trigger on the visually-right).
155
+ [dir="rtl"] & .pa-popconfirm__arrow {
156
+ transform: translateY(-50%) rotate(45deg) scaleX(-1);
157
+ }
141
158
  }
142
159
 
143
- // Left - arrow on right
144
- .pa-popconfirm--left {
145
- margin-right: $spacing-sm;
160
+ // Start popconfirm on the inline-start side of trigger (left in LTR, right in RTL)
161
+ // Arrow sits on the inline-end side of the popconfirm, pointing at the trigger.
162
+ .pa-popconfirm--start {
163
+ margin-inline-end: $spacing-sm;
146
164
 
147
165
  .pa-popconfirm__arrow {
148
- right: -0.64rem;
166
+ inset-inline-end: -0.64rem;
149
167
  top: 50%;
150
168
  transform: translateY(-50%) rotate(45deg);
151
169
  border-bottom: none;
152
170
  border-left: none;
153
171
  }
172
+
173
+ [dir="rtl"] & .pa-popconfirm__arrow {
174
+ transform: translateY(-50%) rotate(45deg) scaleX(-1);
175
+ }
154
176
  }
155
177
 
156
178
  // ====================
@@ -471,140 +471,8 @@
471
471
  }
472
472
  }
473
473
 
474
- // Pager
475
- .pa-pager {
476
- display: flex;
477
- margin: $pager-button-margin 0;
478
-
479
- // Remove margins when first/last child in card body
480
- .pa-card__body &:first-child {
481
- margin-top: 0;
482
- }
483
- .pa-card__body &:last-child {
484
- margin-bottom: 0;
485
- }
486
-
487
- // Default center alignment
488
- justify-content: center;
489
-
490
- // Positioning modifiers
491
- &--start {
492
- justify-content: flex-start;
493
- }
494
-
495
- &--center {
496
- justify-content: center;
497
- }
498
-
499
- &--end {
500
- justify-content: flex-end;
501
- }
502
-
503
- &__container {
504
- display: flex;
505
- align-items: center;
506
- gap: $spacing-sm;
507
- white-space: nowrap;
508
- }
509
-
510
- &__controls {
511
- display: flex;
512
- gap: $pager-controls-gap;
513
- }
514
-
515
- &__info {
516
- display: flex;
517
- align-items: center;
518
- gap: $spacing-sm;
519
- }
520
-
521
- &__input {
522
- width: $pager-input-width !important;
523
- text-align: center;
524
- }
525
-
526
- &__text {
527
- color: var(--pa-text-color-2);
528
- font-size: $font-size-sm;
529
- }
530
- }
531
-
532
- // Load More
533
- .pa-load-more {
534
- display: flex;
535
- margin: $spacing-base 0;
536
-
537
- // Remove margins when first/last child in card body
538
- .pa-card__body &:first-child {
539
- margin-top: 0;
540
- }
541
- .pa-card__body &:last-child {
542
- margin-bottom: 0;
543
- }
544
-
545
- // Default center alignment
546
- justify-content: center;
547
-
548
- // Positioning modifiers
549
- &--start {
550
- justify-content: flex-start;
551
- }
552
-
553
- &--center {
554
- justify-content: center;
555
- }
556
-
557
- &--end {
558
- justify-content: flex-end;
559
- }
560
-
561
- &__button {
562
- display: flex;
563
- align-items: center;
564
- gap: $spacing-sm;
565
- padding: $btn-padding-v $btn-padding-h;
566
- background-color: transparent;
567
- border: $border-width-base solid var(--pa-border-color);
568
- border-radius: var(--pa-border-radius);
569
- color: var(--pa-text-color-1);
570
- font-size: $font-size-sm;
571
- cursor: pointer;
572
- transition: all $transition-fast $easing-snappy;
573
-
574
- &:hover {
575
- border-color: var(--pa-accent);
576
- color: var(--pa-accent);
577
- background-color: var(--pa-accent-light);
578
- }
579
-
580
- &--loading {
581
- pointer-events: none;
582
- opacity: 0.7;
583
-
584
- .pa-load-more__spinner {
585
- animation: pa-spin 1s linear infinite;
586
- }
587
- }
588
- }
589
-
590
- &__spinner {
591
- width: $spinner-size;
592
- height: $spinner-size;
593
- border: $spinner-border-width solid var(--pa-border-color);
594
- border-top: $spinner-border-width solid var(--pa-accent);
595
- border-radius: 50%;
596
- }
597
-
598
- &__text {
599
- color: inherit;
600
- }
601
-
602
- &__count {
603
- color: var(--pa-text-color-2);
604
- font-size: $font-size-xs;
605
- margin-inline-start: $spacing-xs; // RTL: flips to margin-right
606
- }
607
- }
474
+ // .pa-pager and .pa-load-more live in _pagers.scss — this file used to
475
+ // duplicate them. Removed so there's a single source of truth.
608
476
 
609
477
  // Virtual Table Styles
610
478
  .pa-virtual-table {
@@ -295,8 +295,23 @@ $multiselect-selected-popover-width: 32rem !default; // 320px (was 20rem)
295
295
  // ============================================================================
296
296
  // ALERT SYSTEM
297
297
  // ============================================================================
298
- $alert-padding-v: $card-footer-padding-v !default;
299
- $alert-padding-h: $card-footer-padding-h !default;
298
+ // Default alert padding — decoupled from $card-footer-padding so alerts
299
+ // can have their own scale. The previous coupling left default with V
300
+ // padding (1.2rem) bigger than --lg's (1rem) and H padding (1rem) equal
301
+ // to --sm's, so default sat visually outside the size scale instead of
302
+ // in the middle.
303
+ $alert-padding-v: $spacing-md !default; // 0.75rem
304
+ $alert-padding-h: 1.25rem !default; // sits between --sm (1rem) and --lg (1.5rem)
305
+
306
+ // Size-modifier scales — themes can override to tighten/loosen each size
307
+ // independently. V steps 0.5 → 0.75 → 1, H steps 1 → 1.25 → 1.5.
308
+ $alert-padding-sm-v: $spacing-sm !default; // 0.5rem
309
+ $alert-padding-sm-h: $spacing-base !default; // 1rem
310
+ $alert-font-size-sm: $font-size-xs !default; // 1.2rem (12px)
311
+ $alert-padding-lg-v: $spacing-base !default; // 1rem
312
+ $alert-padding-lg-h: $spacing-lg !default; // 1.5rem
313
+ $alert-font-size-lg: $font-size-base !default; // 1.6rem (16px)
314
+
300
315
  $alert-dismissible-padding-right: 4.8rem !default; // 48px (was 3rem)
301
316
  $alert-close-opacity: $opacity-muted !default;
302
317
  $alert-icon-margin: $spacing-sm !default;