@keenmate/pure-admin-core 2.7.1 → 2.9.0-rc01

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.
@@ -4,9 +4,23 @@
4
4
  scanning rather than per-tile depth — no view-mode toggle, no status
5
5
  pills. Container queries collapse 4-col → 2-row → 3-row as the card
6
6
  narrows.
7
+
8
+ Row template uses local SCSS variables for the four column widths
9
+ (`$spark-col-label`, `$spark-col-chart`, `$spark-col-value`,
10
+ `$spark-col-delta`) so all responsive overrides reference the same
11
+ widths — change one and every breakpoint follows. The `--no-delta`
12
+ modifier drops the rightmost column; the other three are load-bearing
13
+ (a sparkline list without label, chart, or value is a different
14
+ design).
7
15
  ======================================== */
8
16
  @use '../variables' as *;
9
17
 
18
+ /* Per-column track widths — referenced from every template selector. */
19
+ $spark-col-label: minmax(14rem, 28%);
20
+ $spark-col-chart: minmax(10rem, 1fr);
21
+ $spark-col-value: minmax(8rem, 18%);
22
+ $spark-col-delta: minmax(7rem, 12%);
23
+
10
24
  /* Card is a query container so rows react to *card* width, not viewport. */
11
25
  .pa-kpi-spark-list {
12
26
  container-type: inline-size;
@@ -17,10 +31,10 @@
17
31
  .pa-kpi-spark-row {
18
32
  display: grid;
19
33
  grid-template-columns:
20
- minmax(14rem, 28%)
21
- minmax(10rem, 1fr)
22
- minmax(8rem, 18%)
23
- minmax(7rem, 12%);
34
+ $spark-col-label
35
+ $spark-col-chart
36
+ $spark-col-value
37
+ $spark-col-delta;
24
38
  align-items: center;
25
39
  gap: 1.6rem;
26
40
  padding: 1.4rem 2rem;
@@ -29,6 +43,18 @@
29
43
  &:last-child { border-bottom: 0; }
30
44
  }
31
45
 
46
+ /* Modifier: --no-delta — drops the rightmost column. label · chart ·
47
+ value only. Useful when the chart's slope already conveys direction
48
+ and the delta would be redundant. Hides the delta element and shrinks
49
+ the row template to 3 columns. */
50
+ .pa-kpi-spark-list--no-delta .pa-kpi-spark-row {
51
+ grid-template-columns:
52
+ $spark-col-label
53
+ $spark-col-chart
54
+ $spark-col-value;
55
+ }
56
+ .pa-kpi-spark-list--no-delta .pa-kpi-spark-row__delta { display: none; }
57
+
32
58
  /* Mid-narrow card (1×3 page-grid + 45% column): stack to 2 rows.
33
59
  Label/value/delta on top, full-width chart below. Default order is
34
60
  value-above-chart; use .pa-kpi-spark-list--chart-first to flip. */
@@ -66,6 +92,23 @@
66
92
  .pa-kpi-spark-list--chart-first .pa-kpi-spark-row__label { align-self: start; }
67
93
  .pa-kpi-spark-list--chart-first .pa-kpi-spark-row__value { text-align: start; align-self: baseline; }
68
94
  .pa-kpi-spark-list--chart-first .pa-kpi-spark-row__delta { align-self: baseline; }
95
+
96
+ /* --no-delta at mid-narrow: 2-row layout, top row is label+value only. */
97
+ .pa-kpi-spark-list--no-delta .pa-kpi-spark-row {
98
+ grid-template-columns: minmax(0, 1fr) auto;
99
+ grid-template-areas:
100
+ "label value"
101
+ "chart chart";
102
+ }
103
+
104
+ /* --no-delta + --chart-first: 3-row single-column stack. */
105
+ .pa-kpi-spark-list--no-delta.pa-kpi-spark-list--chart-first .pa-kpi-spark-row {
106
+ grid-template-columns: 1fr;
107
+ grid-template-areas:
108
+ "label"
109
+ "chart"
110
+ "value";
111
+ }
69
112
  }
70
113
 
71
114
  /* Very narrow card (~280–360px, 25% page-grid stress test): force the
@@ -86,6 +129,15 @@
86
129
  .pa-kpi-spark-row__chart { grid-area: chart; }
87
130
  .pa-kpi-spark-row__value { grid-area: value; text-align: start; align-self: baseline; }
88
131
  .pa-kpi-spark-row__delta { grid-area: delta; align-self: baseline; }
132
+
133
+ /* --no-delta at very-narrow: 3-row single-column stack (no delta cell). */
134
+ .pa-kpi-spark-list--no-delta .pa-kpi-spark-row {
135
+ grid-template-columns: 1fr;
136
+ grid-template-areas:
137
+ "label"
138
+ "chart"
139
+ "value";
140
+ }
89
141
  }
90
142
 
91
143
  /* ----- Cell typography -------------------------------------------------- */
@@ -1,25 +1,31 @@
1
1
  /* ========================================
2
2
  KPI · Terminal grid
3
3
  Bloomberg-style dense panel: mono numbers, status pills, inline SVG
4
- sparklines, ▲▼ deltas, segmented view-mode toggle (VALUE/Δ%/TREND).
4
+ sparklines, ▲▼ deltas, optional segmented tab strip for swapping
5
+ the body content (different tile sets / grids per tab).
5
6
  Shared chrome (header, live, footer, detail popover, spark-dot) is in
6
7
  _kpi-base.scss.
7
8
  ======================================== */
8
9
  @use '../variables' as *;
9
10
 
10
- /* ----- View-mode toggle (segmented button group) ------------------------ */
11
+ /* ----- Tab strip (segmented button group) ------------------------------
12
+ Generalised tabs — each `.pa-kpi-terminal__tab` carries a `data-tab`
13
+ slug that matches a `.pa-kpi-terminal__pane[data-tab="…"]` in the body.
14
+ JS toggles `.is-active` on the clicked tab + matching pane; tabs and
15
+ panes are otherwise independent so each pane can hold a completely
16
+ different grid (different tile count, different grid modifier). */
11
17
  .pa-kpi-terminal__controls {
12
18
  display: inline-flex;
13
19
  align-items: center;
14
20
  gap: 1.6rem;
15
21
  }
16
- .pa-kpi-terminal__viewtoggle {
22
+ .pa-kpi-terminal__tabs {
17
23
  display: inline-flex;
18
24
  border: 1px solid var(--pa-border-color);
19
25
  border-radius: 0.4rem;
20
26
  overflow: hidden;
21
27
  }
22
- .pa-kpi-terminal__viewbtn {
28
+ .pa-kpi-terminal__tab {
23
29
  background: transparent;
24
30
  border: 0;
25
31
  color: var(--pa-text-color-2);
@@ -41,6 +47,13 @@
41
47
  }
42
48
  }
43
49
 
50
+ /* ----- Pane visibility ------------------------------------------------- */
51
+ .pa-kpi-terminal__pane {
52
+ display: none;
53
+
54
+ &.is-active { display: block; }
55
+ }
56
+
44
57
  /* ----- Grid + tile borders ----------------------------------------------
45
58
  Hairline 1px borders between tiles, no gap. Last-row/last-column
46
59
  borders suppressed via :nth-last-child / :nth-child selectors. */
@@ -132,16 +145,15 @@
132
145
  margin-bottom: 0.8rem;
133
146
  }
134
147
 
135
- /* ----- Big value with 3-mode swap --------------------------------------
136
- Author renders three .pa-kpi-tile__value siblings (data-mode="value" /
137
- "delta" / "trend"); the active mode is selected via the
138
- .pa-kpi-terminal[data-view="X"] attribute. JS toggles that attribute
139
- when the segmented control is clicked. */
148
+ /* ----- Big value -------------------------------------------------------
149
+ One value per tile sentiment colour set via `--very-positive` /
150
+ `--positive` / `--neutral` / `--negative` / `--very-negative` modifier
151
+ on the value element. */
140
152
  .pa-kpi-tile__values {
141
153
  margin-bottom: 0.4rem;
142
154
  }
143
155
  .pa-kpi-tile__value {
144
- display: none;
156
+ display: inline-flex;
145
157
  align-items: baseline;
146
158
  gap: 0.3rem;
147
159
  font-family: var(--base-font-family-mono);
@@ -153,11 +165,6 @@
153
165
  &--negative .pa-kpi-tile__num { color: var(--pa-negative); }
154
166
  &--very-negative .pa-kpi-tile__num { color: var(--pa-very-negative); }
155
167
  }
156
- .pa-kpi-terminal[data-view="value"] .pa-kpi-tile__value[data-mode="value"],
157
- .pa-kpi-terminal[data-view="delta"] .pa-kpi-tile__value[data-mode="delta"],
158
- .pa-kpi-terminal[data-view="trend"] .pa-kpi-tile__value[data-mode="trend"] {
159
- display: inline-flex;
160
- }
161
168
 
162
169
  .pa-kpi-tile__num {
163
170
  font-size: 3.8rem;
@@ -162,20 +162,12 @@
162
162
  white-space: nowrap;
163
163
  }
164
164
 
165
- &__role {
166
- display: inline-block;
167
- padding: $btn-padding-v $btn-padding-h;
168
- // Tinted bg derived from the header's name color so it reads on any
169
- // header dark or light. Fallback kept for older browsers.
170
- background-color: var(--pa-accent-light);
171
- background-color: color-mix(in srgb, var(--pa-header-profile-name-color) 15%, transparent);
172
- color: var(--pa-header-profile-name-color);
173
- font-size: $font-size-xs;
174
- font-weight: $font-weight-medium;
175
- border-radius: var(--pa-border-radius);
176
- text-transform: uppercase;
177
- letter-spacing: $profile-role-letter-spacing;
178
- }
165
+ // Role badge: use the standard `.pa-badge` component in markup instead of
166
+ // a custom `__role` element. Previously this declared its own bg/colour/
167
+ // padding/uppercase styling — duplicating badge work that already existed
168
+ // in the framework, and coupling to `--pa-header-profile-name-color` which
169
+ // went invisible inside dark-mode panel bodies. Snippets and demo markup
170
+ // updated accordingly in 2.9.0.
179
171
 
180
172
  &__close {
181
173
  position: absolute;
@@ -5,3 +5,14 @@
5
5
 
6
6
  // Core framework (includes variables and all core-components)
7
7
  @use 'core' as *;
8
+
9
+ // CSS variable defaults at :root. Themes don't go through main.scss — they
10
+ // @import core + base-css-variables and emit their own values — so this only
11
+ // affects the unthemed bundle (dist/css/main.css) and the FOUC window before
12
+ // a theme stylesheet resolves.
13
+ @use 'base-css-variables' as bcv;
14
+ :root {
15
+ @include bcv.output-base-css-variables;
16
+ @include bcv.output-pa-css-variables;
17
+ @include bcv.output-pa-alert-variables-light;
18
+ }
@@ -50,14 +50,6 @@ $base-hover-bg: $base-subtle-bg !default; // Hover state background
50
50
  $base-active-bg: color.adjust($base-subtle-bg, $lightness: -5%) !default; // Active/pressed state
51
51
  $base-disabled-bg: $base-subtle-bg !default; // Disabled element background
52
52
 
53
- // Legacy aliases (backward compatibility)
54
- $base-surface-1: $base-main-bg !default;
55
- $base-surface-2: $base-page-bg !default;
56
- $base-surface-3: $base-subtle-bg !default;
57
- $base-surface-inverse: $base-inverse-bg !default;
58
- $base-primary-bg: $base-main-bg !default;
59
- $base-primary-bg-hover: color.adjust($base-main-bg, $lightness: -5%) !default;
60
-
61
53
  // =============================================================================
62
54
  // BORDER COLORS
63
55
  // Border colors and shorthand
@@ -71,7 +63,7 @@ $base-border: 1px solid $base-border-color !default;
71
63
  // Input field styling and states
72
64
  // =============================================================================
73
65
 
74
- $base-input-bg: $base-surface-1 !default;
66
+ $base-input-bg: $base-main-bg !default;
75
67
  $base-input-color: #495057 !default;
76
68
  $base-input-border: 1px solid #ced4da !default;
77
69
  $base-input-border-hover: 1px solid #b8bfc6 !default;
@@ -91,7 +83,7 @@ $base-input-size-xl-height: 4.1 !default; // 41px
91
83
  // Floating element styling
92
84
  // =============================================================================
93
85
 
94
- $base-dropdown-bg: $base-surface-1 !default;
86
+ $base-dropdown-bg: $base-main-bg !default;
95
87
  $base-dropdown-border: 1px solid $base-border-color !default;
96
88
  $base-dropdown-box-shadow: 0 8px 16px $base-shadow-color !default;
97
89
 
@@ -100,7 +92,7 @@ $base-dropdown-box-shadow: 0 8px 16px $base-shadow-color !default;
100
92
  // Tooltip styling
101
93
  // =============================================================================
102
94
 
103
- $base-tooltip-bg: $base-surface-inverse !default;
95
+ $base-tooltip-bg: $base-inverse-bg !default;
104
96
  $base-tooltip-text-color: #ffffff !default;
105
97
 
106
98
  // =============================================================================
@@ -20,23 +20,23 @@ $text-color-2: $base-text-color-2 !default;
20
20
  $border-color: $base-border-color !default;
21
21
 
22
22
  // Header colors
23
- $header-bg: $base-surface-1 !default;
23
+ $header-bg: $base-main-bg !default;
24
24
  $header-border-color: $base-border-color !default;
25
25
  $header-text: $base-text-color-1 !default;
26
26
  $header-text-secondary: $base-text-color-2 !default;
27
27
  $header-profile-name-color: $base-text-color-1 !default;
28
28
 
29
29
  // Sidebar colors
30
- $sidebar-bg: $base-surface-2 !default;
30
+ $sidebar-bg: $base-page-bg !default;
31
31
  $sidebar-text: $base-text-color-1 !default;
32
32
  $sidebar-text-secondary: $base-text-color-2 !default;
33
- $sidebar-submenu-bg: $base-surface-3 !default;
34
- $sidebar-submenu-hover-bg: color.adjust($base-surface-3, $lightness: -5%) !default;
35
- $sidebar-submenu-active-bg: color.adjust($base-surface-3, $lightness: -10%) !default;
33
+ $sidebar-submenu-bg: $base-subtle-bg !default;
34
+ $sidebar-submenu-hover-bg: color.adjust($base-subtle-bg, $lightness: -5%) !default;
35
+ $sidebar-submenu-active-bg: color.adjust($base-subtle-bg, $lightness: -10%) !default;
36
36
  $sidebar-submenu-active-text: $sidebar-text !default;
37
37
 
38
38
  // Footer colors
39
- $footer-bg: $base-surface-1 !default;
39
+ $footer-bg: $base-main-bg !default;
40
40
  $footer-border-color: $base-border-color !default;
41
41
 
42
42
  // Accent colors (derived from base)
@@ -48,10 +48,10 @@ $accent-light: $base-accent-color-light !default;
48
48
  // CARD COLORS (derived from base surfaces)
49
49
  // =============================================================================
50
50
 
51
- $card-bg: $base-surface-1 !default;
52
- $card-header-bg: $base-surface-2 !default;
53
- $card-footer-bg: $base-surface-1 !default;
54
- $card-tabs-bg: $base-surface-2 !default;
51
+ $card-bg: $base-main-bg !default;
52
+ $card-header-bg: $base-page-bg !default;
53
+ $card-footer-bg: $base-main-bg !default;
54
+ $card-tabs-bg: $base-page-bg !default;
55
55
 
56
56
  // =============================================================================
57
57
  // INPUT COLORS (derived from base input vars)
@@ -65,10 +65,10 @@ $input-text: $base-input-color !default;
65
65
  // TABLE COLORS (derived from base surfaces)
66
66
  // =============================================================================
67
67
 
68
- $table-stripe: $base-surface-2 !default;
69
- $table-bg: $base-surface-1 !default;
70
- $table-header-bg: $base-surface-2 !default;
71
- $table-hover-bg: $base-surface-2 !default;
68
+ $table-stripe: $base-page-bg !default;
69
+ $table-bg: $base-main-bg !default;
70
+ $table-header-bg: $base-page-bg !default;
71
+ $table-hover-bg: $base-page-bg !default;
72
72
 
73
73
  // Table row hover accent (border)
74
74
  $table-hover-accent-width: 0 !default;
@@ -111,8 +111,8 @@ $btn-info-bg-hover: $base-info-color-hover !default;
111
111
  $btn-info-text: $base-text-on-info !default;
112
112
 
113
113
  // Light button
114
- $btn-light-bg: $base-surface-2 !default;
115
- $btn-light-bg-hover: $base-surface-3 !default;
114
+ $btn-light-bg: $base-page-bg !default;
115
+ $btn-light-bg-hover: $base-subtle-bg !default;
116
116
  $btn-light-text: $base-text-color-1 !default;
117
117
 
118
118
  // Dark button
@@ -164,9 +164,9 @@ $info-text-light: $base-info-text-light !default;
164
164
  $secondary-bg: $btn-secondary-bg !default;
165
165
  $secondary-bg-hover: $btn-secondary-bg-hover !default;
166
166
  $secondary-text: #383d41 !default;
167
- $secondary-light-bg: $base-surface-3 !default;
167
+ $secondary-light-bg: $base-subtle-bg !default;
168
168
  $secondary-light-text: $base-text-color-1 !default;
169
- $secondary-lighter-bg: $base-surface-3 !default;
169
+ $secondary-lighter-bg: $base-subtle-bg !default;
170
170
 
171
171
  // =============================================================================
172
172
  // TOOLTIP & POPOVER COLORS (derived from base)
@@ -177,7 +177,7 @@ $tooltip-text: $base-tooltip-text-color !default;
177
177
 
178
178
  $popover-text-light: #ffffff !default;
179
179
  $popover-text-dark: #000000 !default;
180
- $popover-content-bg: $base-surface-1 !default;
180
+ $popover-content-bg: $base-main-bg !default;
181
181
 
182
182
  // =============================================================================
183
183
  // CODE LANGUAGE COLORS (standalone - not themed)
@@ -143,7 +143,6 @@ $profile-section-gap: $spacing-xl !default;
143
143
  $profile-overlay-bg: rgba(0, 0, 0, 0.3) !default;
144
144
  $profile-button-padding-v: $spacing-sm !default;
145
145
  $profile-button-padding-h: $spacing-md !default;
146
- $profile-role-letter-spacing: 0.5px !default;
147
146
  $profile-panel-mobile-max-width: 40rem !default; // 400px (was 25rem)
148
147
  $profile-panel-content-padding: 1.6rem !default; // Matches sidebar-padding horizontal (16px)
149
148
 
@@ -3,6 +3,14 @@
3
3
  // Z-index, opacity, transitions, animations, shadows
4
4
  // ============================================================================
5
5
 
6
+ // Theme color-scheme signal to the browser. Drives native UA elements
7
+ // (scrollbars, form controls) and the `light-dark()` CSS function. Themes
8
+ // override BEFORE `@import variables/index`. Values: `light`, `dark`,
9
+ // `light dark` (let OS preference decide), or `only light` / `only dark`
10
+ // to ignore OS preference. Per-mode overrides (e.g. `color-scheme: dark;`
11
+ // inside a `.pa-mode-dark` block) take precedence via the cascade.
12
+ $theme-color-scheme: light !default;
13
+
6
14
  // Z-index scale (increments of 1000 for easy adjustment)
7
15
  $z-index-base: 0 !default;
8
16
  $z-index-content: 1000 !default;
@@ -1,11 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Bash(mkdir:*)",
5
- "Read(//c/Git/KM/pure-admin/pure-admin-visual/**)",
6
- "Bash(npm run build-all:*)"
7
- ],
8
- "deny": [],
9
- "ask": []
10
- }
11
- }