@keenmate/pure-admin-core 2.8.0 → 2.9.0-rc03

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,206 @@
1
+ /* ========================================
2
+ Splitter Component
3
+ Resizable container with draggable gutters (2 or more panes).
4
+ Modifiers:
5
+ --horizontal panes side-by-side, vertical gutter (default)
6
+ --vertical panes stacked, horizontal gutter
7
+ --dragging applied to root while user is dragging
8
+ --collapsed start pane has been collapsed to 0
9
+ --minimize-mirror flip rail-title text 180° (bottom-to-top reading)
10
+
11
+ Rail mode is fully decoupled from any specific component. The splitter
12
+ only rotates elements marked `[data-pa-splitter-rail-title]` inside a
13
+ minimized pane; per-component adaptation (e.g. card body / footer
14
+ hiding) lives in that component's SCSS, keyed off
15
+ `.pa-splitter__pane--minimized > .pa-foo`. Card integration is in
16
+ `_cards.scss`.
17
+ ======================================== */
18
+ @use '../variables' as *;
19
+
20
+ // Default rail width — exposed as a runtime token so themes and per-instance
21
+ // inline styles can override without having to set both the SCSS variable
22
+ // (compile-time) and the JS attribute. The JS reads this same custom
23
+ // property via getComputedStyle to keep its default in sync.
24
+ :root {
25
+ --pa-splitter-rail-size: #{$splitter-rail-size};
26
+ }
27
+
28
+ .pa-splitter {
29
+ display: flex;
30
+ width: 100%;
31
+ height: 100%;
32
+ min-width: 0;
33
+ min-height: 0;
34
+ overflow: hidden;
35
+
36
+ // Horizontal split: panes laid out as a row, gutter is a vertical bar.
37
+ // Gutter thickness is overridable per-instance via --pa-splitter-gutter-size;
38
+ // breathing room around the gutter via native `gap` (the JS subtracts it
39
+ // from the available space, so percent constraints stay accurate).
40
+ &--horizontal {
41
+ flex-direction: row;
42
+
43
+ > .pa-splitter__gutter {
44
+ cursor: col-resize;
45
+ width: var(--pa-splitter-gutter-size, #{$splitter-gutter-size});
46
+ height: auto;
47
+ align-self: stretch;
48
+
49
+ &::before {
50
+ width: $splitter-gutter-grip-thickness;
51
+ height: $splitter-gutter-grip-length;
52
+ }
53
+ }
54
+ }
55
+
56
+ // Vertical split: panes stacked as a column, gutter is a horizontal bar.
57
+ &--vertical {
58
+ flex-direction: column;
59
+
60
+ > .pa-splitter__gutter {
61
+ cursor: row-resize;
62
+ width: auto;
63
+ height: var(--pa-splitter-gutter-size, #{$splitter-gutter-size});
64
+ align-self: stretch;
65
+
66
+ &::before {
67
+ width: $splitter-gutter-grip-length;
68
+ height: $splitter-gutter-grip-thickness;
69
+ }
70
+ }
71
+ }
72
+
73
+ // While dragging: kill text selection and transitions, neutralize pane content
74
+ // pointer events so dragging over an iframe/embedded widget doesn't get hijacked.
75
+ // Only the gutter that's actually being dragged gets the "active" highlight —
76
+ // siblings stay in their resting state. The JS adds `--active` on the dragged
77
+ // gutter in pointerdown and removes it in pointerup. Sibling gutters also get
78
+ // `pointer-events: none` so their `:hover` doesn't fire as the cursor passes
79
+ // over them during the drag (otherwise they'd light up via hover).
80
+ &--dragging {
81
+ user-select: none;
82
+
83
+ > .pa-splitter__pane {
84
+ pointer-events: none;
85
+ }
86
+
87
+ // Sibling gutters during drag: kill pointer events (no hover firing as
88
+ // cursor passes over them) AND override any lingering focus-visible
89
+ // styling (a previous keyboard focus on a non-active gutter would
90
+ // otherwise look identical to the active state — both colour the
91
+ // gutter blue).
92
+ > .pa-splitter__gutter:not(.pa-splitter__gutter--active) {
93
+ pointer-events: none;
94
+
95
+ &:focus-visible {
96
+ box-shadow: none;
97
+
98
+ &::before {
99
+ background-color: $splitter-gutter-grip-color;
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ &__gutter--active {
106
+ background-color: $splitter-gutter-active-bg;
107
+
108
+ &::before {
109
+ background-color: $splitter-gutter-grip-hover-color;
110
+ }
111
+ }
112
+
113
+ &__pane {
114
+ overflow: auto;
115
+ min-width: 0;
116
+ min-height: 0;
117
+
118
+ // Start pane carries the explicit size set inline by JS (flex-basis).
119
+ // flex-grow: 0 keeps it from absorbing free space; flex-shrink: 0 stops
120
+ // the browser from squishing it below the JS-applied size when content
121
+ // overflows.
122
+ &--start {
123
+ flex: 0 0 auto;
124
+ }
125
+
126
+ // End pane fills whatever's left over.
127
+ &--end {
128
+ flex: 1 1 0;
129
+ }
130
+
131
+ // Minimized state — pane locks to rail width via flex-basis (JS-set).
132
+ // The splitter's only job here is providing the rail-title rotation hook;
133
+ // it does NOT hide sibling content or know about specific components.
134
+ // Per-component adaptation (e.g. hiding card body / footer) lives in
135
+ // that component's SCSS, see `_cards.scss` for the card integration.
136
+ &--minimized {
137
+ cursor: pointer;
138
+ overflow: hidden;
139
+ }
140
+ }
141
+
142
+ // Generic rail-title hook. Any element marked `[data-pa-splitter-rail-title]`
143
+ // inside a minimized pane rotates to vertical writing. Consumers can put
144
+ // this attribute on a card header, a plain heading, a div with an icon —
145
+ // anything they want shown rotated when the pane is railed.
146
+ //
147
+ // sideways-rl: text reads top-to-bottom, glyphs rotated 90° clockwise
148
+ // (tilt head right). Script-agnostic — for Latin text this matches
149
+ // vertical-rl visually.
150
+ &__pane--minimized [data-pa-splitter-rail-title] {
151
+ writing-mode: sideways-rl;
152
+
153
+ // Keep icons upright — they inherit the parent writing-mode by default,
154
+ // which rotates the glyph along with the title. Resetting to initial
155
+ // (horizontal-tb) keeps them in their natural orientation.
156
+ i,
157
+ svg {
158
+ writing-mode: initial;
159
+ }
160
+ }
161
+
162
+ // Optional: mirror the minimized title 180° so the text reads bottom-to-top
163
+ // with upside-down glyphs. Applied to the heading element inside any
164
+ // rail-title element — padding, alignment, and sibling content are
165
+ // unaffected.
166
+ &--minimize-mirror .pa-splitter__pane--minimized [data-pa-splitter-rail-title] :is(h1, h2, h3, h4, h5, h6) {
167
+ transform: scale(-1, -1);
168
+ }
169
+
170
+ &__gutter {
171
+ position: relative;
172
+ flex: 0 0 auto;
173
+ background-color: $splitter-gutter-bg;
174
+ transition: $splitter-transition;
175
+ touch-action: none; // prevents browser scroll/zoom while dragging on touch
176
+ outline: none;
177
+
178
+ // Centered grip indicator. Width/height per orientation modifier above.
179
+ &::before {
180
+ content: '';
181
+ position: absolute;
182
+ top: 50%;
183
+ left: 50%;
184
+ transform: translate(-50%, -50%);
185
+ background-color: $splitter-gutter-grip-color;
186
+ border-radius: $border-radius-sm;
187
+ transition: $splitter-transition;
188
+ }
189
+
190
+ &:hover {
191
+ background-color: $splitter-gutter-hover-bg;
192
+
193
+ &::before {
194
+ background-color: $splitter-gutter-grip-hover-color;
195
+ }
196
+ }
197
+
198
+ &:focus-visible {
199
+ box-shadow: inset 0 0 0 $splitter-focus-ring-width $splitter-focus-ring-color;
200
+
201
+ &::before {
202
+ background-color: $splitter-gutter-grip-hover-color;
203
+ }
204
+ }
205
+ }
206
+ }
@@ -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
 
@@ -188,6 +187,11 @@ $card-tab-inline-padding-v: 0.3rem !default; // 3px - compact for header
188
187
  $card-tab-inline-padding-h: 0.8rem !default; // 8px
189
188
  $card-tab-hover-opacity: 0.1 !default;
190
189
 
190
+ // Responsive actions — header width below which the spread button list
191
+ // hides and the collapsed (split-button) form takes over. Default 28rem
192
+ // = 280px, which fits a 3-button action set comfortably.
193
+ $card-actions-collapse-at: 28rem !default;
194
+
191
195
  // ============================================================================
192
196
  // TABLE SYSTEM
193
197
  // ============================================================================
@@ -773,3 +777,20 @@ $bar-list-bar-bg: rgba(0, 0, 0, 0.06) !default;
773
777
  $bar-list-label-font-size: $font-size-sm !default;
774
778
  $bar-list-value-font-size: $font-size-sm !default;
775
779
  $bar-list-value-font-weight: $font-weight-semibold !default;
780
+
781
+ // ============================================================================
782
+ // SPLITTER SYSTEM
783
+ // ============================================================================
784
+ $splitter-gutter-size: 0.6rem !default; // 6px gutter thickness
785
+ $splitter-gutter-bg: rgba(128, 128, 128, 0.08) !default;
786
+ $splitter-gutter-hover-bg: rgba(128, 128, 128, 0.18) !default;
787
+ $splitter-gutter-active-bg: rgba($accent-color, 0.35) !default; // mid-drag
788
+ $splitter-gutter-grip-length: 2.4rem !default; // 24px grip indicator
789
+ $splitter-gutter-grip-thickness: 2px !default;
790
+ $splitter-gutter-grip-color: rgba(128, 128, 128, 0.45) !default;
791
+ $splitter-gutter-grip-hover-color: $accent-color !default;
792
+ $splitter-focus-ring-color: rgba($accent-color, 0.4) !default;
793
+ $splitter-focus-ring-width: 2px !default;
794
+ $splitter-transition: background-color 0.15s ease !default;
795
+ $splitter-pane-min-size: 0 !default; // absolute floor regardless of constraints
796
+ $splitter-rail-size: 4rem !default; // 40px — start pane width when minimized to rail
@@ -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
- }