@webority/theme 0.0.10 → 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/README.md +11 -4
- package/dist/webority-theme.css +1 -1
- package/package.json +2 -1
- package/scss/_components.scss +61 -82
- package/scss/_flags.scss +270 -0
- package/scss/_tokens.scss +37 -19
- package/scss/_variables.scss +27 -24
- package/scss/_wui-aliases.scss +3 -1
- package/scss/_wui-components.scss +468 -99
package/scss/_tokens.scss
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
// =====================================================================
|
|
2
|
-
//
|
|
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
|
|
10
|
-
--wui-primary
|
|
11
|
-
--wui-primary
|
|
12
|
-
--wui-primary-
|
|
13
|
-
--wui-primary-
|
|
14
|
-
--wui-primary-
|
|
15
|
-
--wui-primary-
|
|
16
|
-
--wui-primary-
|
|
17
|
-
--wui-primary-
|
|
18
|
-
--wui-primary-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
//
|
|
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
|
|
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: #
|
|
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:
|
|
134
|
-
--wui-radius-lg:
|
|
135
|
-
--wui-radius-xl:
|
|
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
|
package/scss/_variables.scss
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
// =====================================================================
|
|
2
|
-
//
|
|
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
|
|
6
|
-
//
|
|
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
|
-
//
|
|
15
|
-
//
|
|
16
|
-
$primary: #
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
$border-radius
|
|
57
|
-
$border-radius-
|
|
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
|
-
|
|
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
|
|
137
|
-
$btn-border-radius-sm: $border-radius;
|
|
138
|
-
$btn-border-radius-lg: $border-radius-
|
|
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:
|
|
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
|
|
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
|
|
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-
|
|
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: #
|
|
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(
|
|
201
|
+
$focus-ring-color: rgba($primary, 0.30); // tracks $primary automatically
|
|
199
202
|
$focus-ring-blur: 0;
|
package/scss/_wui-aliases.scss
CHANGED
|
@@ -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);
|