@keenmate/pure-css 1.0.0-rc07 → 1.0.0-rc09

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.
@@ -15,21 +15,23 @@
15
15
  // Primary brand/interactive color and its variants
16
16
  // =============================================================================
17
17
 
18
- $base-accent-color: #007bff !default;
19
- $base-accent-color-hover: color.adjust($base-accent-color, $lightness: 10%) !default;
20
- $base-accent-color-active: color.adjust($base-accent-color, $lightness: 20%) !default;
18
+ // Default theme = pure-admin Corporate (sky-blue). Matches the canonical
19
+ // --base-* contract in @keenmate/base-css-variables; a theme overrides these.
20
+ $base-accent-color: #0ea5e9 !default;
21
+ $base-accent-color-hover: #0284c7 !default;
22
+ $base-accent-color-active: #0369a1 !default;
21
23
  $base-accent-color-light: rgba($base-accent-color, 0.05) !default;
22
- $base-accent-color-light-hover: rgba($base-accent-color, 0.12) !default;
24
+ $base-accent-color-light-hover: rgba($base-accent-color, 0.08) !default;
23
25
 
24
26
  // =============================================================================
25
27
  // TEXT COLORS
26
28
  // Hierarchical text colors for different emphasis levels
27
29
  // =============================================================================
28
30
 
29
- $base-text-color-1: #2c3e50 !default; // Primary text (strongest)
30
- $base-text-color-2: #6c757d !default; // Secondary text (muted)
31
- $base-text-color-3: #7a8a99 !default; // Tertiary text (lighter)
32
- $base-text-color-4: #a3b1bf !default; // Quaternary text (lightest)
31
+ $base-text-color-1: #334155 !default; // Primary text (strongest) — Corporate slate-700
32
+ $base-text-color-2: #64748b !default; // Secondary text (muted) — slate-500
33
+ $base-text-color-3: #94a3b8 !default; // Tertiary text (lighter) — slate-400
34
+ $base-text-color-4: #cbd5e1 !default; // Quaternary text (lightest) — slate-300
33
35
  $base-text-color-on-accent: #ffffff !default; // Text on accent backgrounds
34
36
 
35
37
  // =============================================================================
@@ -37,31 +39,51 @@ $base-text-color-on-accent: #ffffff !default; // Text on accent backgrounds
37
39
  // Semantic background colors for different purposes
38
40
  // =============================================================================
39
41
 
40
- $base-main-bg: #ffffff !default; // Primary background (cards, modals, content)
41
- $base-page-bg: #f8f9fa !default; // Page background, subtle sections
42
- $base-subtle-bg: #e9ecef !default; // Muted areas, dividers
42
+ // SURFACE ELEVATION LADDER (static container backgrounds — one axis).
43
+ // Keep this axis separate from the interaction-STATE tokens below (hover/
44
+ // active/disabled) and from --base-border-color (dividers).
45
+ $base-main-bg: #ffffff !default; // Content surface (cards, modals, body) — the reference rung
46
+ $base-page-bg: #f8f9fa !default; // Canvas/backdrop the content sits on
47
+ // Recessed / inset surface — the "sunken" rung BELOW main: code blocks, wells,
48
+ // inset panels, pills, tiles. NOT a hover state (see $base-hover-bg) and NOT a
49
+ // divider (see $base-border-color); one crisp job. Raised chrome (headers,
50
+ // striped rows) uses $base-elevated-bg instead.
51
+ $base-subtle-bg: #e9ecef !default;
43
52
  $base-inverse-bg: #2c3e50 !default; // Inverse background (tooltips, dark elements)
44
53
  $base-overlay-bg: rgba(0, 0, 0, 0.5) !default; // Modal/overlay background
45
54
  $base-shadow-color: rgba(0, 0, 0, 0.15) !default; // Shadow color for elevation
46
55
  // Elevated surface (header rows, striped rows, popovers/toolbars). Defaults to
47
56
  // the page background so the default theme's header appearance is unchanged, but
48
57
  // themes can override it independently to create a distinct raised tone.
58
+ // Defaults to the page bg so it tracks a theme's canvas (dark themes stay dark);
59
+ // Corporate overrides it to slate-100 (#f1f5f9) for a distinct header tint.
49
60
  $base-elevated-bg: $base-page-bg !default;
50
61
  // Text on inverse/dark surfaces (web-component bridge: --base-text-inverted).
51
62
  $base-text-inverted: #ffffff !default;
52
63
 
53
- // Interactive state backgrounds
64
+ // Interaction-STATE backgrounds (a separate axis from the elevation ladder).
65
+ // These default to (derive from) $base-subtle-bg so unthemed hovers stay
66
+ // sensible, but they are their OWN tokens: override them to decouple hover/
67
+ // active from the recessed-surface tone. Components read --pc-hover-bg /
68
+ // --pc-active-bg for :hover/:active fills — never --pc-subtle-bg.
54
69
  $base-hover-bg: $base-subtle-bg !default; // Hover state background
55
70
  $base-active-bg: color.adjust($base-subtle-bg, $lightness: -5%) !default; // Active/pressed state
56
- $base-disabled-bg: $base-subtle-bg !default; // Disabled element background
71
+ // Disabled element background. Given its OWN lower-contrast default (an inert,
72
+ // near-page tone) so it no longer collides with $base-hover-bg/$base-subtle-bg —
73
+ // distinct purpose, distinct value. (WS7.3)
74
+ $base-disabled-bg: #f1f3f5 !default;
57
75
 
58
76
  // =============================================================================
59
77
  // BORDER COLORS
60
78
  // Border colors and shorthand
61
79
  // =============================================================================
62
80
 
63
- $base-border-color: #e1e5e9 !default;
64
- $base-border: 1px solid $base-border-color !default;
81
+ // Shared border width — the single knob the border shorthands compose from, so
82
+ // a theme can retune stroke weight in one place (web-component bridge:
83
+ // --base-border-width). (WS7.1)
84
+ $base-border-width: 1px !default;
85
+ $base-border-color: #e2e8f0 !default; // Corporate slate-200
86
+ $base-border: $base-border-width solid $base-border-color !default;
65
87
  // Checkbox/radio border (web-component bridge: --base-checkbox-border-color).
66
88
  $base-checkbox-border-color: $base-border-color !default;
67
89
 
@@ -71,14 +93,13 @@ $base-checkbox-border-color: $base-border-color !default;
71
93
  // =============================================================================
72
94
 
73
95
  $base-input-bg: $base-main-bg !default;
74
- $base-input-color: #495057 !default;
96
+ $base-input-color: #334155 !default; // Corporate slate-700
75
97
  // Input border as a colour (single source) + the 1px shorthand web components
76
- // read via --base-input-border. Note: pure-admin's own inputs currently border
77
- // off --base-border-color (#e1e5e9), not this (#ced4da) — a deliberate divergence
78
- // kept to preserve appearance; see _colors.scss $input-border.
79
- $base-input-border-color: #ced4da !default;
98
+ // read via --base-input-border. Now equals --base-border-color (both Corporate
99
+ // slate-200 #e2e8f0).
100
+ $base-input-border-color: #e2e8f0 !default; // = border-color (Corporate slate-200)
80
101
  $base-input-border: 1px solid $base-input-border-color !default;
81
- $base-input-border-hover: 1px solid #b8bfc6 !default;
102
+ $base-input-border-hover: 1px solid $base-accent-color !default; // Corporate: accent on hover
82
103
  $base-input-border-focus: 1px solid $base-accent-color !default;
83
104
  $base-input-placeholder-color: $base-text-color-4 !default;
84
105
  $base-input-bg-disabled: rgba($base-input-bg, 0.5) !default;
@@ -88,6 +109,8 @@ $base-input-clear-color: $base-text-color-3 !default;
88
109
  $base-input-clear-bg-hover: $base-hover-bg !default;
89
110
 
90
111
  // Input size heights (unitless multipliers for x10px base)
112
+ // Neutral heights (Corporate bumps these +0.3 itself for its wider font — that's a
113
+ // theme ergonomic tweak, not base identity, so the foundation default stays neutral).
91
114
  $base-input-size-xs-height: 3.1 !default; // 31px
92
115
  $base-input-size-sm-height: 3.3 !default; // 33px
93
116
  $base-input-size-md-height: 3.5 !default; // 35px
@@ -116,9 +139,9 @@ $base-tooltip-text-color: #ffffff !default;
116
139
  // Success/positive semantic colors
117
140
  // =============================================================================
118
141
 
119
- $base-success-color: #22c55e !default; // Tailwind green-500 — aligns with --pc-positive in the sentiment scale
142
+ $base-success-color: #10b981 !default; // Corporate emerald-500 — also --pa-positive in the sentiment scale
120
143
  $base-success-bg: $base-success-color !default; // Solid role fill (web-component bridge: --base-success-bg)
121
- $base-success-color-hover: color.adjust($base-success-color, $lightness: -10%) !default;
144
+ $base-success-color-hover: #059669 !default; // Corporate emerald-600
122
145
  $base-success-bg-light: rgba($base-success-color, 0.1) !default;
123
146
  $base-success-bg-subtle: rgba($base-success-color, 0.08) !default;
124
147
  $base-success-border: rgba($base-success-color, 0.2) !default;
@@ -131,9 +154,9 @@ $base-text-on-success: #ffffff !default;
131
154
  // Danger/error semantic colors
132
155
  // =============================================================================
133
156
 
134
- $base-danger-color: #ef4444 !default; // Tailwind red-500 — aligns with --pc-negative in the sentiment scale
157
+ $base-danger-color: #ef4444 !default; // Tailwind red-500 — aligns with --pa-negative in the sentiment scale
135
158
  $base-danger-bg: $base-danger-color !default; // Solid role fill (web-component bridge: --base-danger-bg)
136
- $base-danger-color-hover: color.adjust($base-danger-color, $lightness: -10%) !default;
159
+ $base-danger-color-hover: #dc2626 !default; // Corporate red-600
137
160
  $base-danger-bg-light: rgba($base-danger-color, 0.1) !default;
138
161
  $base-danger-bg-subtle: rgba($base-danger-color, 0.08) !default;
139
162
  $base-danger-border: rgba($base-danger-color, 0.2) !default;
@@ -146,23 +169,24 @@ $base-text-on-danger: #ffffff !default;
146
169
  // Warning semantic colors
147
170
  // =============================================================================
148
171
 
149
- $base-warning-color: #f97316 !default; // Tailwind orange-500 — also serves as the off-target axis in KPI components
172
+ $base-warning-color: #f59e0b !default; // Corporate amber-500 — also the off-target axis in KPI components
150
173
  $base-warning-bg: $base-warning-color !default; // Solid role fill (web-component bridge: --base-warning-bg)
151
- $base-warning-color-hover: color.adjust($base-warning-color, $lightness: -10%) !default;
174
+ $base-warning-color-hover: #d97706 !default; // Corporate amber-600
152
175
  $base-warning-bg-light: rgba($base-warning-color, 0.1) !default;
153
176
  $base-warning-bg-subtle: rgba($base-warning-color, 0.08) !default;
154
177
  $base-warning-border: rgba($base-warning-color, 0.2) !default;
155
178
  $base-warning-text: #856404 !default;
156
179
  $base-warning-text-light: #fff3cd !default;
157
- $base-text-on-warning: #212529 !default; // Dark text for yellow backgrounds
180
+ $base-text-on-warning: #ffffff !default; // Corporate uses white on amber
158
181
 
159
182
  // =============================================================================
160
183
  // CONTEXTUAL COLORS - INFO
161
184
  // Info semantic colors
162
185
  // =============================================================================
163
186
 
164
- $base-info-color: #17a2b8 !default;
165
- $base-info-color-hover: color.adjust($base-info-color, $lightness: -10%) !default;
187
+ $base-info-color: #06b6d4 !default; // Corporate cyan-500
188
+ $base-info-bg: $base-info-color !default; // Solid role fill — role symmetry with success/danger/warning (WS7.4)
189
+ $base-info-color-hover: #0891b2 !default; // Corporate cyan-600
166
190
  $base-info-bg-light: rgba($base-info-color, 0.1) !default;
167
191
  $base-info-bg-subtle: rgba($base-info-color, 0.08) !default;
168
192
  $base-info-border: rgba($base-info-color, 0.2) !default;
@@ -170,10 +194,22 @@ $base-info-text: #0c5460 !default;
170
194
  $base-info-text-light: #d1ecf1 !default;
171
195
  $base-text-on-info: #ffffff !default;
172
196
 
197
+ // =============================================================================
198
+ // SECONDARY ROLE
199
+ // Neutral/secondary role, promoted into the base contract so themes can retune
200
+ // it like any other role instead of it being a hardcoded grey in _colors.scss.
201
+ // (WS7.5) Fill + hover + text-on-fill; the derived $btn-secondary-*/$secondary-*
202
+ // vocabulary in _colors.scss now traces to these.
203
+ // =============================================================================
204
+
205
+ $base-secondary-color: #6c757d !default;
206
+ $base-secondary-color-hover: #545b62 !default;
207
+ $base-text-on-secondary: #ffffff !default;
208
+
173
209
  // =============================================================================
174
210
  // SENTIMENT SCALE — 5-step direction-of-change
175
211
  // Used by KPI / data-display components to indicate movement direction.
176
- // `--pc-positive` and `--pc-negative` alias the role colours above; the
212
+ // `--pa-positive` and `--pa-negative` alias the role colours above; the
177
213
  // outlier shades (`very-positive` / `very-negative`) are explicit darker
178
214
  // stops since they're not derivable cleanly via color.adjust.
179
215
  // =============================================================================
@@ -182,6 +218,33 @@ $base-very-positive: #16a34a !default; // Tailwind green-600 — outlier positi
182
218
  $base-very-negative: #dc2626 !default; // Tailwind red-600 — outlier negative
183
219
  $base-neutral: #9ca3af !default; // Tailwind gray-400 — "no meaningful change"
184
220
 
221
+ // =============================================================================
222
+ // THEME PALETTE SLOTS (1–9) + paired contrast text
223
+ // Arbitrary branded / data-viz slots. These are the SOURCE for $color-1..9
224
+ // (variables/_colors.scss derives `$color-N: $base-color-N`) and the emitted
225
+ // --base-color-N / --pc-color-N, so the palette follows the same $base-* → $X
226
+ // chain as every other token. Default = Corporate palette.
227
+ // =============================================================================
228
+
229
+ $base-color-1: #f59e0b !default; // Amber
230
+ $base-color-2: #ec4899 !default; // Pink
231
+ $base-color-3: #10b981 !default; // Emerald
232
+ $base-color-4: #0ea5e9 !default; // Sky blue
233
+ $base-color-5: #8b5cf6 !default; // Violet
234
+ $base-color-6: #6366f1 !default; // Indigo
235
+ $base-color-7: #64748b !default; // Slate
236
+ $base-color-8: #0284c7 !default; // Corporate blue
237
+ $base-color-9: #334155 !default; // Dark slate
238
+ $base-color-1-text: #1a1a1a !default; // dark on amber
239
+ $base-color-2-text: #ffffff !default;
240
+ $base-color-3-text: #ffffff !default;
241
+ $base-color-4-text: #ffffff !default;
242
+ $base-color-5-text: #ffffff !default;
243
+ $base-color-6-text: #ffffff !default;
244
+ $base-color-7-text: #ffffff !default;
245
+ $base-color-8-text: #ffffff !default;
246
+ $base-color-9-text: #ffffff !default;
247
+
185
248
  // =============================================================================
186
249
  // INTERACTIVE STATES
187
250
  // Generic interaction feedback colors
@@ -234,13 +297,62 @@ $base-border-radius-lg: 0.8 !default; // 8px
234
297
  // `html { font-size: 10px }` (reboot), so `1rem` tracks that base adaptively.
235
298
  $base-rem: 1rem !default;
236
299
 
237
- // =============================================================================
238
- // COMPONENT-SPECIFIC DERIVED VALUES
239
- // Variables that components need, derived from base
240
- // =============================================================================
241
-
242
- // Command palette input height (must be after $base-input-size-* variables)
243
- $command-palette-input-height: #{$base-input-size-lg-height}rem !default;
300
+ // $command-palette-input-height moved to pure-admin-core (variables/
301
+ // _components.scss) — a niche component dimension, not a foundation primitive.
302
+
303
+ // =============================================================================
304
+ // ICONS
305
+ // Mask-friendly SVG glyphs for the shared UI affordances, so every consumer
306
+ // (pure-css shell, pure-admin components, the web/svelte components) can render
307
+ // the SAME toggle/close marks and a theme can swap the icon set in ONE place.
308
+ // Rendered via `mask` + `background: currentColor`, so the glyph inherits text
309
+ // colour and needs no fill/stroke theming. Values are percent-encoded data-URIs
310
+ // (no raw `#`, so Sass never mistakes it for interpolation). Defaults are Lucide.
311
+ // - chevron: thin STROKED angle bracket, DIRECTIONAL/rotatable — expanders,
312
+ // nav, submenus ("more this way"). Resting glyph points RIGHT
313
+ // (LTR); consumers rotate it 90deg to point down when open. This
314
+ // is the ROTATE-one-glyph disclosure model (cf. expand/collapse).
315
+ // - caret-up /
316
+ // caret-down: small SOLID triangles, STATIC — the dropdown/select affordance
317
+ // (down = "a menu opens below") and its sort-direction / upward-
318
+ // dropdown counterpart (up). A component SWAPS up/down; a caret
319
+ // never rotates (that's the chevron's job).
320
+ // - close: the ✕ — dismiss a transient SURFACE (dialog, panel, popover,
321
+ // toast). NOT the same as remove / delete below.
322
+ // - clear: clear-a-FIELD ✕ — distinct purpose, same glyph; follows
323
+ // --base-icon-close at runtime (override alone to diverge).
324
+ // - remove: take an ITEM out of a collection (chip / tag / selected row) —
325
+ // non-destructive, reversible. ✕ glyph, follows close (own knob).
326
+ // - expand/collapse: the +/− pair for the SWAP-two-glyphs disclosure model
327
+ // (tree nodes, accordions) — distinct from `chevron`, the
328
+ // ROTATE-one-glyph model. Shows `expand` (+) collapsed, `collapse`
329
+ // (−) open, swapping on state (no rotation). Lucide plus / minus.
330
+ //
331
+ // Action icons — CRUD verbs with distinct glyphs so they read as actions, NOT as
332
+ // dismiss/disclosure affordances:
333
+ // - add: + — create / insert (row, tag, item). Same + shape as `expand`
334
+ // but an INDEPENDENT knob (create ≠ disclosure).
335
+ // - edit: pencil — modify.
336
+ // - delete: trash can — DESTROY permanently (destructive). Deliberately a
337
+ // bin, not an ✕, so it never reads like close / remove.
338
+ //
339
+ // Utility:
340
+ // - search: magnifying glass — search inputs, filter fields, command palette.
341
+ // =============================================================================
342
+
343
+ $base-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22m9 18 6-6-6-6%22/%3E%3C/svg%3E") !default;
344
+ $base-icon-caret-down: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22%23000%22 d=%22M12 15 6 9h12z%22/%3E%3C/svg%3E") !default;
345
+ $base-icon-caret-up: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22%23000%22 d=%22M12 9 6 15h12z%22/%3E%3C/svg%3E") !default;
346
+ $base-icon-close: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M18 6 6 18%22/%3E%3Cpath d=%22m6 6 12 12%22/%3E%3C/svg%3E") !default;
347
+ // expand = "+" (shown when collapsed, invites expand); collapse = "−" (shown when open).
348
+ $base-icon-expand: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12h14%22/%3E%3Cpath d=%22M12 5v14%22/%3E%3C/svg%3E") !default;
349
+ $base-icon-collapse: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12h14%22/%3E%3C/svg%3E") !default;
350
+ // Action icons (CRUD). `add` shares the + shape with `expand` but is its own knob.
351
+ $base-icon-add: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M5 12h14%22/%3E%3Cpath d=%22M12 5v14%22/%3E%3C/svg%3E") !default;
352
+ $base-icon-edit: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z%22/%3E%3C/svg%3E") !default;
353
+ $base-icon-delete: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M3 6h18%22/%3E%3Cpath d=%22M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2%22/%3E%3Cpath d=%22M10 11v6%22/%3E%3Cpath d=%22M14 11v6%22/%3E%3C/svg%3E") !default;
354
+ // Utility: magnifying glass (Lucide search).
355
+ $base-icon-search: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2211%22 cy=%2211%22 r=%228%22/%3E%3Cpath d=%22m21 21-4.3-4.3%22/%3E%3C/svg%3E") !default;
244
356
 
245
357
  // =============================================================================
246
358
  // ALERT COLOR DERIVATION PARAMETERS