@webority/theme 0.0.9 → 0.2.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.
package/scss/_tokens.scss CHANGED
@@ -1,21 +1,22 @@
1
1
  // =====================================================================
2
- // Lumex — Custom CSS variables.
2
+ // Webority UI — custom CSS variables.
3
3
  // Things Bootstrap doesn't natively have a slot for: extended brand
4
4
  // ramps, gradient definitions, easing curves, etc. Imported AFTER
5
5
  // `bootstrap/scss/bootstrap` so we don't clobber its computed values.
6
6
  // =====================================================================
7
7
 
8
8
  :root {
9
- // Extended Lumex primary-blue ramp — used for tints, washes, hovers.
10
- --wui-primary: #2F50E4;
11
- --wui-primary-hover: #4A66E8;
12
- --wui-primary-pressed: #2440C4;
13
- --wui-primary-50: #97A8F2;
14
- --wui-primary-30: #C1CBF7;
15
- --wui-primary-20: #D5DCFA;
16
- --wui-primary-15: #E0E5FB;
17
- --wui-primary-10: #EAEEFC;
18
- --wui-primary-5: #F5F6FE;
9
+ // Extended primary ramp — neutral indigo default; used for tints,
10
+ // washes, hovers. Products override --wui-primary* with their brand.
11
+ --wui-primary: #4F46E5;
12
+ --wui-primary-hover: #6366F1;
13
+ --wui-primary-pressed: #4338CA;
14
+ --wui-primary-50: #818CF8;
15
+ --wui-primary-30: #A5B4FC;
16
+ --wui-primary-20: #C7D2FE;
17
+ --wui-primary-15: #DDE1FD;
18
+ --wui-primary-10: #E0E7FF;
19
+ --wui-primary-5: #EEF2FF;
19
20
 
20
21
  // Foreground ramp (cool blue-grey neutrals) — for text hierarchy
21
22
  // beyond Bootstrap's body-color / body-secondary-color.
@@ -37,22 +38,39 @@
37
38
  // Gradients (hero, CTA)
38
39
  --wui-hero-gradient:
39
40
  radial-gradient(ellipse 120% 80% at 50% 30%,
40
- #6E86F0 0%, #2F50E4 35%, #2440C4 75%, #16297A 100%);
41
+ #818CF8 0%, #4F46E5 35%, #4338CA 75%, #312E81 100%);
41
42
  --wui-cta-gradient:
42
43
  radial-gradient(ellipse 120% 100% at 50% 50%,
43
- #1F2F8C 0%, #0E1450 60%, #04082A 100%);
44
+ #312E81 0%, #1E1B4B 60%, #0F0D2E 100%);
44
45
 
45
46
  // Easing curves — match locked design's CSS / Framer Motion exports
46
47
  --wui-ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);
47
48
  --wui-ease-ui: cubic-bezier(0.32, 0.72, 0, 1);
48
49
 
49
50
  // Elevation — exposes the Bootstrap $box-shadow* SCSS vars (set in
50
- // _lumex-variables.scss) as CSS vars so inline styles / JS / the portal
51
+ // _variables.scss) as CSS vars so inline styles / JS / the portal
51
52
  // can reach the same values Bootstrap utilities use.
52
53
  --wui-shadow-card: #{$box-shadow-sm};
53
54
  --wui-shadow-card-lifted: #{$box-shadow};
54
55
  --wui-shadow-card-lifted-hover: #{$box-shadow-lg};
55
56
 
57
+ // Overlay elevation. The rule: in-page surfaces stay FLAT (a card is a
58
+ // border, not a shadow); only things that float above the page lift —
59
+ // menus, popovers, modals. One ink (the heading navy) so every overlay
60
+ // casts the same light; components must never hand-roll a shadow.
61
+ --wui-shadow-overlay: 0 8px 28px -6px rgba(7, 20, 55, 0.14);
62
+ --wui-shadow-overlay-lg: 0 24px 60px -16px rgba(7, 20, 55, 0.28);
63
+
64
+ // One height for every form control. Buttons, inputs and selects share form
65
+ // rows, so they must line up — they were 46.8px and 45px, which reads as a
66
+ // misalignment on every filter bar. 44px is also the WCAG touch-target floor.
67
+ --wui-control-height: 44px;
68
+
69
+ // Scrollbar thumb — one quiet grey-blue at three interaction strengths.
70
+ --wui-scrollbar: rgba(145, 158, 171, 0.45);
71
+ --wui-scrollbar-hover: rgba(145, 158, 171, 0.65);
72
+ --wui-scrollbar-active: rgba(145, 158, 171, 0.85);
73
+
56
74
  // ---- Marketing surface ramp -------------------------------------
57
75
  // Soft tints + neutral washes used by mega-menu hover, callout cards,
58
76
  // and section accents. Distinct from --wui-bg-* (which are the
@@ -82,9 +100,9 @@
82
100
 
83
101
  // ---- Accent-dark -----------------------------------------------
84
102
  // Link hover, focused button, deep-purple CTA underline. Matches
85
- // $link-hover-color in _lumex-variables.scss but exposed as a CSS
103
+ // $link-hover-color in _variables.scss but exposed as a CSS
86
104
  // var so JS / inline styles can reach it.
87
- --wui-accent-dark: #2440C4;
105
+ --wui-accent-dark: #4338CA;
88
106
 
89
107
  // ---- Container width + responsive padding ----------------------
90
108
  // The standalone design uses a 1512px max canvas with generous side
@@ -130,9 +148,9 @@
130
148
 
131
149
  // Corner radii (DESIGN.md scale) — portal aliases as --radius-*
132
150
  --wui-radius-sm: 6px;
133
- --wui-radius: 10px;
134
- --wui-radius-lg: 16px;
135
- --wui-radius-xl: 24px;
151
+ --wui-radius: 8px;
152
+ --wui-radius-lg: 12px;
153
+ --wui-radius-xl: 16px;
136
154
 
137
155
  // ---- Portal dark palette ----------------------------------------
138
156
  // Marketing stays light. Portal flips [data-theme="dark"] and maps
@@ -1,19 +1,17 @@
1
1
  // =====================================================================
2
- // Lumex — Bootstrap variable overrides.
2
+ // Webority UI — Bootstrap variable overrides.
3
3
  // Imported BEFORE `bootstrap/scss/bootstrap` so Bootstrap derives every
4
4
  // utility class (.btn-primary, .bg-info, .text-success, etc.) from these
5
- // values. Shared by Lumex.Web (Razor) and Lumex.Web.Customer.Frontend
6
- // (React) so the marketing site and portal stay visually identical.
7
- //
8
- // Source of truth: docs/DESIGN-SYSTEM.md (mirrors locked palette from
9
- // Design/Lumex-Updated/src/app/globals.css).
5
+ // values. Shared by every product's Razor marketing site and React portal
6
+ // so both surfaces stay visually identical. Products override these with
7
+ // their own _variables imported before this file.
10
8
  // =====================================================================
11
9
 
12
10
 
13
11
  // ---- Brand colors ---------------------------------------------------
14
- // Lumex primary blue. The full blue ramp lives in _lumex-tokens.scss as
15
- // CSS variables since Bootstrap only consumes the named theme colors.
16
- $primary: #2F50E4;
12
+ // Neutral indigo default. The full ramp lives in _tokens.scss as CSS
13
+ // variables since Bootstrap only consumes the named theme colors.
14
+ $primary: #4F46E5;
17
15
  $secondary: #4B5675; // foreground-3 — quiet text + secondary buttons
18
16
  $success: #04B440;
19
17
  $info: #056EE9;
@@ -50,11 +48,14 @@ $body-tertiary-bg: #F5F6FA;
50
48
  $border-color: #EBEDF3;
51
49
  $border-color-translucent: rgba(13, 24, 43, 0.08);
52
50
 
53
- $border-radius: 0.625rem; // 10px — Bootstrap default 0.375rem felt small for our card chrome
54
- $border-radius-sm: 0.375rem;
55
- $border-radius-lg: 1rem;
56
- $border-radius-xl: 1.5rem;
57
- $border-radius-2xl: 2rem;
51
+ // One ladder; every component derives from it (Bootstrap's own model). Set a
52
+ // component's radius by pointing it at a rung, never by hardcoding a px value —
53
+ // that is what let buttons drift to ~3x Bootstrap's.
54
+ $border-radius: 0.5rem; // 8px — buttons, inputs, dropdowns
55
+ $border-radius-sm: 0.375rem; // 6px
56
+ $border-radius-lg: 0.75rem; // 12px — cards, toasts
57
+ $border-radius-xl: 1rem; // 16px — modals
58
+ $border-radius-2xl: 1.5rem; // 24px
58
59
  $border-radius-pill: 9999px;
59
60
 
60
61
 
@@ -129,13 +130,15 @@ $box-shadow-lg: 0 0 2px 0 rgba(145, 158, 171, 0.20), 0 20px 40px -4px rgba(145,
129
130
 
130
131
  // ---- Buttons --------------------------------------------------------
131
132
  $btn-font-weight: 500;
132
- $btn-padding-y: 0.625rem;
133
+ // Height comes from --wui-control-height (see _components.scss) so buttons line
134
+ // up with inputs; the padding just needs to sit inside that.
135
+ $btn-padding-y: 0.5rem;
133
136
  $btn-padding-x: 1.25rem;
134
137
  $btn-padding-y-lg: 0.875rem;
135
138
  $btn-padding-x-lg: 1.75rem;
136
- $btn-border-radius: $border-radius-lg;
137
- $btn-border-radius-sm: $border-radius;
138
- $btn-border-radius-lg: $border-radius-xl;
139
+ $btn-border-radius: $border-radius; // 8px
140
+ $btn-border-radius-sm: $border-radius-sm; // 6px
141
+ $btn-border-radius-lg: $border-radius-lg; // 12px
139
142
  $btn-transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
140
143
 
141
144
 
@@ -153,7 +156,7 @@ $input-focus-box-shadow: none; // border IS the focus cue
153
156
  $input-focus-color: $body-color;
154
157
  $input-padding-y: 0.5rem; // 8px → 40px total height with 1rem font + 1.5 line-height
155
158
  $input-padding-x: 0.875rem; // 14px — comfortable inset for leading icon space
156
- $input-border-radius: 0.625rem; // 10px — refined from 16px to match reference rounded-lg
159
+ $input-border-radius: $border-radius; // 8px — matches buttons; controls share one corner
157
160
  $input-placeholder-color: #99A1B7; // --wui-text-4
158
161
 
159
162
 
@@ -162,7 +165,7 @@ $card-border-color: $border-color;
162
165
  $card-border-radius: $border-radius-lg;
163
166
  // Flat surfaces — no drop shadow on default .card. Depth is conveyed
164
167
  // via background tint + hairline border instead. Use .card-lifted
165
- // utility (in _lumex-components.scss) only when a card legitimately
168
+ // utility (in _components.scss) only when a card legitimately
166
169
  // needs to sit "above" the page (currently disabled — set to `none`).
167
170
  $card-box-shadow: none;
168
171
  $card-spacer-y: 1.5rem;
@@ -172,7 +175,7 @@ $card-spacer-x: 1.5rem;
172
175
  // ---- Nav / dropdown --------------------------------------------------
173
176
  $nav-link-font-weight: 500;
174
177
  $dropdown-border-color: $border-color;
175
- $dropdown-border-radius: $border-radius-lg;
178
+ $dropdown-border-radius: $border-radius;
176
179
  $dropdown-box-shadow: $box-shadow-lg;
177
180
 
178
181
 
@@ -182,18 +185,18 @@ $modal-content-border-radius: $border-radius-xl;
182
185
  $modal-content-box-shadow-xs: $box-shadow-lg;
183
186
 
184
187
  $toast-border-color: $border-color;
185
- $toast-border-radius: $border-radius-pill; // pill-shape toast — matches locked Sonner override
188
+ $toast-border-radius: $border-radius-lg;
186
189
  $toast-box-shadow: $box-shadow-lg;
187
190
 
188
191
 
189
192
  // ---- Links ----------------------------------------------------------
190
193
  $link-color: $primary;
191
- $link-hover-color: #2440C4; // accent-dark
194
+ $link-hover-color: #4338CA; // accent-dark (primary pressed)
192
195
  $link-decoration: none;
193
196
  $link-hover-decoration: underline;
194
197
 
195
198
 
196
199
  // ---- Focus ring -----------------------------------------------------
197
200
  $focus-ring-width: 3px;
198
- $focus-ring-color: rgba(47, 80, 228, 0.30);
201
+ $focus-ring-color: rgba($primary, 0.30); // tracks $primary automatically
199
202
  $focus-ring-blur: 0;
@@ -86,10 +86,12 @@
86
86
  --color-scrim: color-mix(in srgb, var(--wui-text-heading) 62%, transparent);
87
87
  --color-on-scrim: var(--wui-bg-light);
88
88
 
89
- // Elevation — flat (borders only)
89
+ // Elevation — in-page surfaces flat (borders only); floating overlays lift.
90
90
  --shadow-sm: none;
91
91
  --shadow-md: none;
92
92
  --shadow-lg: none;
93
+ --shadow-overlay: var(--wui-shadow-overlay);
94
+ --shadow-overlay-lg: var(--wui-shadow-overlay-lg);
93
95
 
94
96
  // Corner radii
95
97
  --radius-sm: var(--wui-radius-sm);