@pecb-ui/components 1.1.12 → 1.1.13
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 +321 -0
- package/fesm2022/pecb-ui-components-navigation.mjs +1 -1
- package/fesm2022/pecb-ui-components-navigation.mjs.map +1 -1
- package/fesm2022/pecb-ui-components.mjs +1735 -168
- package/fesm2022/pecb-ui-components.mjs.map +1 -1
- package/index.d.ts +980 -5
- package/lib/components/shadow/shadow.directive.scss +42 -0
- package/navigation/index.d.ts +1 -1
- package/package.json +6 -2
- package/styles/abstracts/_mixins.scss +331 -0
- package/styles/abstracts/_variables.scss +328 -0
- package/styles/base/_container.scss +26 -0
- package/styles/base/_reset.scss +72 -0
- package/styles/main.scss +12 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
// ============================================
|
|
2
|
+
// PECB UI Components - Design Tokens
|
|
3
|
+
// ============================================
|
|
4
|
+
|
|
5
|
+
// --------------------------------------------
|
|
6
|
+
// COLOR PALETTE
|
|
7
|
+
// --------------------------------------------
|
|
8
|
+
|
|
9
|
+
// Primary Colors
|
|
10
|
+
$primary-1: #a11e29;
|
|
11
|
+
$primary-2: #212427;
|
|
12
|
+
$primary-3: #ffffff;
|
|
13
|
+
|
|
14
|
+
// Semantic aliases
|
|
15
|
+
$primary-color: $primary-1;
|
|
16
|
+
$primary-dark: $primary-2;
|
|
17
|
+
$primary-light: $primary-3;
|
|
18
|
+
|
|
19
|
+
// Neutral Colors
|
|
20
|
+
$neutral-1: #313131;
|
|
21
|
+
$neutral-2: #616161;
|
|
22
|
+
$neutral-3: #919191;
|
|
23
|
+
$neutral-4: #c2c2c2;
|
|
24
|
+
$neutral-5: #ececec;
|
|
25
|
+
$neutral-6: #f7f5f5;
|
|
26
|
+
$neutral-7: #f4f4f4;
|
|
27
|
+
$neutral-8: #fafafa;
|
|
28
|
+
|
|
29
|
+
// Semantic neutral aliases
|
|
30
|
+
$text-primary: $neutral-1;
|
|
31
|
+
$text-secondary: $neutral-2;
|
|
32
|
+
$text-muted: $neutral-3;
|
|
33
|
+
$border-color: $neutral-4;
|
|
34
|
+
$background-light: $neutral-5;
|
|
35
|
+
$background-lighter: $neutral-6;
|
|
36
|
+
$background-subtle: $neutral-7;
|
|
37
|
+
$background-page: $neutral-8;
|
|
38
|
+
|
|
39
|
+
// Base colors
|
|
40
|
+
$white: #ffffff;
|
|
41
|
+
$black: #000000;
|
|
42
|
+
|
|
43
|
+
// --------------------------------------------
|
|
44
|
+
// STATUS COLORS
|
|
45
|
+
// --------------------------------------------
|
|
46
|
+
|
|
47
|
+
// Cancelled / Error / Danger
|
|
48
|
+
$cancelled-text: #dc3545;
|
|
49
|
+
$cancelled-bg: #fdecea;
|
|
50
|
+
$cancelled-light: #ff606f;
|
|
51
|
+
|
|
52
|
+
// Pending / Warning
|
|
53
|
+
$pending-text: #fd7e14;
|
|
54
|
+
$pending-bg: #fff4e5;
|
|
55
|
+
$pending-light: #ff9c4a;
|
|
56
|
+
|
|
57
|
+
// Successful / Success
|
|
58
|
+
$successful-text: #008000;
|
|
59
|
+
$successful-bg: #e6f4ea;
|
|
60
|
+
$successful-light: #57bc57;
|
|
61
|
+
|
|
62
|
+
// New / Info
|
|
63
|
+
$new-text: #007bff;
|
|
64
|
+
$new-bg: #e6f0fa;
|
|
65
|
+
$new-light: #5eacff;
|
|
66
|
+
|
|
67
|
+
// Purple / Accent
|
|
68
|
+
$purple-text: #8e6df0;
|
|
69
|
+
$purple-icon: #eee8ff;
|
|
70
|
+
$purple-light: #a98cff;
|
|
71
|
+
|
|
72
|
+
// Semantic status aliases
|
|
73
|
+
$error-color: $cancelled-text;
|
|
74
|
+
$error-bg: $cancelled-bg;
|
|
75
|
+
$error-light: $cancelled-light;
|
|
76
|
+
|
|
77
|
+
$warning-color: $pending-text;
|
|
78
|
+
$warning-bg: $pending-bg;
|
|
79
|
+
$warning-light: $pending-light;
|
|
80
|
+
|
|
81
|
+
$success-color: $successful-text;
|
|
82
|
+
$success-bg: $successful-bg;
|
|
83
|
+
$success-light: $successful-light;
|
|
84
|
+
|
|
85
|
+
$info-color: $new-text;
|
|
86
|
+
$info-bg: $new-bg;
|
|
87
|
+
$info-light: $new-light;
|
|
88
|
+
|
|
89
|
+
$accent-color: $purple-text;
|
|
90
|
+
$accent-bg: $purple-icon;
|
|
91
|
+
$accent-light: $purple-light;
|
|
92
|
+
|
|
93
|
+
// --------------------------------------------
|
|
94
|
+
// TYPOGRAPHY
|
|
95
|
+
// --------------------------------------------
|
|
96
|
+
|
|
97
|
+
// Font Family
|
|
98
|
+
$font-family-base:
|
|
99
|
+
"Plus Jakarta Sans",
|
|
100
|
+
-apple-system,
|
|
101
|
+
BlinkMacSystemFont,
|
|
102
|
+
"Segoe UI",
|
|
103
|
+
Roboto,
|
|
104
|
+
sans-serif;
|
|
105
|
+
$font-family-monospace: "Courier New", Courier, monospace;
|
|
106
|
+
|
|
107
|
+
// Font Sizes
|
|
108
|
+
$font-size-12: 12px;
|
|
109
|
+
$font-size-13: 13px;
|
|
110
|
+
$font-size-14: 14px;
|
|
111
|
+
$font-size-16: 16px;
|
|
112
|
+
$font-size-18: 18px;
|
|
113
|
+
$font-size-20: 20px;
|
|
114
|
+
$font-size-24: 24px;
|
|
115
|
+
$font-size-32: 32px;
|
|
116
|
+
$font-size-40: 40px;
|
|
117
|
+
$font-size-48: 48px;
|
|
118
|
+
|
|
119
|
+
// Semantic Font Size Aliases
|
|
120
|
+
$font-size-base: $font-size-16;
|
|
121
|
+
$font-size-xs: $font-size-12;
|
|
122
|
+
$font-size-sm: $font-size-14;
|
|
123
|
+
$font-size-md: $font-size-16;
|
|
124
|
+
$font-size-lg: $font-size-18;
|
|
125
|
+
$font-size-xl: $font-size-20;
|
|
126
|
+
$font-size-xxl: $font-size-24;
|
|
127
|
+
$font-size-xxxl: $font-size-32;
|
|
128
|
+
|
|
129
|
+
// Caption
|
|
130
|
+
$font-size-caption: $font-size-12;
|
|
131
|
+
|
|
132
|
+
// Font Weights
|
|
133
|
+
$font-weight-regular: 400;
|
|
134
|
+
$font-weight-medium: 500;
|
|
135
|
+
$font-weight-bold: 700;
|
|
136
|
+
|
|
137
|
+
// Line Heights
|
|
138
|
+
$line-height-base: 1.5;
|
|
139
|
+
$line-height-tight: 1.25;
|
|
140
|
+
$line-height-heading: 1.2;
|
|
141
|
+
$line-height-loose: 1.75;
|
|
142
|
+
|
|
143
|
+
// Letter Spacing
|
|
144
|
+
$letter-spacing-tight: -0.02em;
|
|
145
|
+
$letter-spacing-normal: 0;
|
|
146
|
+
$letter-spacing-wide: 0.02em;
|
|
147
|
+
$letter-spacing-wider: 0.04em;
|
|
148
|
+
|
|
149
|
+
// --------------------------------------------
|
|
150
|
+
// SPACING (Base Scale)
|
|
151
|
+
// --------------------------------------------
|
|
152
|
+
|
|
153
|
+
$spacing-0: 0;
|
|
154
|
+
$spacing-1: 6px;
|
|
155
|
+
$spacing-2: 8px;
|
|
156
|
+
$spacing-3: 12px;
|
|
157
|
+
$spacing-4: 16px;
|
|
158
|
+
$spacing-5: 18px;
|
|
159
|
+
$spacing-6: 20px;
|
|
160
|
+
$spacing-7: 24px;
|
|
161
|
+
$spacing-8: 32px;
|
|
162
|
+
$spacing-9: 40px;
|
|
163
|
+
$spacing-10: 48px;
|
|
164
|
+
$spacing-11: 56px;
|
|
165
|
+
$spacing-12: 64px;
|
|
166
|
+
|
|
167
|
+
// Semantic Spacing Aliases
|
|
168
|
+
$spacing-none: $spacing-0; // 0
|
|
169
|
+
$spacing-xxs: $spacing-1; // 6px
|
|
170
|
+
$spacing-xs: $spacing-3; // 12px
|
|
171
|
+
$spacing-sm: $spacing-4; // 16px
|
|
172
|
+
$spacing-md: $spacing-4; // 16px
|
|
173
|
+
$spacing-lg: $spacing-6; // 20px
|
|
174
|
+
$spacing-xl: $spacing-7; // 24px
|
|
175
|
+
|
|
176
|
+
// --------------------------------------------
|
|
177
|
+
// BORDER RADIUS
|
|
178
|
+
// --------------------------------------------
|
|
179
|
+
|
|
180
|
+
$radius-xs: $spacing-1; // 6px
|
|
181
|
+
$radius-sm: $spacing-2; // 8px
|
|
182
|
+
$radius-md: $spacing-3; // 12px
|
|
183
|
+
$radius-lg: $spacing-4; // 16px
|
|
184
|
+
|
|
185
|
+
// Legacy aliases (for backwards compatibility)
|
|
186
|
+
$border-radius-none: 0;
|
|
187
|
+
$border-radius-sm: $radius-sm;
|
|
188
|
+
$border-radius-md: $radius-md;
|
|
189
|
+
$border-radius-lg: $radius-lg;
|
|
190
|
+
$border-radius-xl: $spacing-6; // 20px
|
|
191
|
+
$border-radius-2xl: $spacing-7; // 24px
|
|
192
|
+
$border-radius-full: 9999px;
|
|
193
|
+
$border-radius-round: 50%;
|
|
194
|
+
|
|
195
|
+
// --------------------------------------------
|
|
196
|
+
// SIZES (Component Sizes)
|
|
197
|
+
// --------------------------------------------
|
|
198
|
+
|
|
199
|
+
$size-xs: $spacing-7; // 24px
|
|
200
|
+
$size-sm: $spacing-8; // 32px
|
|
201
|
+
$size-md: $spacing-9; // 40px
|
|
202
|
+
$size-lg: $spacing-10; // 48px
|
|
203
|
+
$size-xl: $spacing-11; // 56px
|
|
204
|
+
$size-2xl: $spacing-12; // 64px
|
|
205
|
+
|
|
206
|
+
// --------------------------------------------
|
|
207
|
+
// SHADOWS
|
|
208
|
+
// --------------------------------------------
|
|
209
|
+
|
|
210
|
+
$shadow-none: none;
|
|
211
|
+
|
|
212
|
+
// Legacy aliases (kept for backwards compatibility)
|
|
213
|
+
$shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
214
|
+
$shadow-md:
|
|
215
|
+
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
216
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
217
|
+
$shadow-lg:
|
|
218
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
219
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
220
|
+
$shadow-xl:
|
|
221
|
+
0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
|
222
|
+
0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
223
|
+
$shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
224
|
+
|
|
225
|
+
// Shadow Soft — diffused, subtle depth
|
|
226
|
+
$shadow-soft-xxsmall: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
|
227
|
+
$shadow-soft-xsmall:
|
|
228
|
+
0 1px 3px 0 rgba(0, 0, 0, 0.06),
|
|
229
|
+
0 1px 2px -1px rgba(0, 0, 0, 0.03);
|
|
230
|
+
$shadow-soft-small:
|
|
231
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.06),
|
|
232
|
+
0 1px 3px -1px rgba(0, 0, 0, 0.04);
|
|
233
|
+
$shadow-soft-medium:
|
|
234
|
+
0 4px 8px -2px rgba(0, 0, 0, 0.06),
|
|
235
|
+
0 2px 4px -2px rgba(0, 0, 0, 0.04);
|
|
236
|
+
$shadow-soft-large:
|
|
237
|
+
0 8px 16px -4px rgba(0, 0, 0, 0.08),
|
|
238
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.03);
|
|
239
|
+
$shadow-soft-xlarge:
|
|
240
|
+
0 16px 24px -6px rgba(0, 0, 0, 0.08),
|
|
241
|
+
0 6px 10px -2px rgba(0, 0, 0, 0.03);
|
|
242
|
+
$shadow-soft-xxlarge:
|
|
243
|
+
0 24px 48px -12px rgba(0, 0, 0, 0.1),
|
|
244
|
+
0 8px 16px -4px rgba(0, 0, 0, 0.04);
|
|
245
|
+
$shadow-soft-xxxlarge:
|
|
246
|
+
0 32px 64px -16px rgba(0, 0, 0, 0.12),
|
|
247
|
+
0 12px 24px -4px rgba(0, 0, 0, 0.05);
|
|
248
|
+
|
|
249
|
+
// Shadow Hard — sharper, more pronounced depth
|
|
250
|
+
$shadow-hard-xxsmall: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
|
|
251
|
+
$shadow-hard-xsmall:
|
|
252
|
+
0 1px 3px 0 rgba(0, 0, 0, 0.16),
|
|
253
|
+
0 1px 2px -1px rgba(0, 0, 0, 0.08);
|
|
254
|
+
$shadow-hard-small:
|
|
255
|
+
0 2px 6px 0 rgba(0, 0, 0, 0.16),
|
|
256
|
+
0 1px 4px -1px rgba(0, 0, 0, 0.1);
|
|
257
|
+
$shadow-hard-medium:
|
|
258
|
+
0 4px 12px -2px rgba(0, 0, 0, 0.18),
|
|
259
|
+
0 2px 6px -2px rgba(0, 0, 0, 0.1);
|
|
260
|
+
|
|
261
|
+
// Shadow token maps (for programmatic access)
|
|
262
|
+
$shadow-soft-map: (
|
|
263
|
+
"xxsmall": $shadow-soft-xxsmall,
|
|
264
|
+
"xsmall": $shadow-soft-xsmall,
|
|
265
|
+
"small": $shadow-soft-small,
|
|
266
|
+
"medium": $shadow-soft-medium,
|
|
267
|
+
"large": $shadow-soft-large,
|
|
268
|
+
"xlarge": $shadow-soft-xlarge,
|
|
269
|
+
"xxlarge": $shadow-soft-xxlarge,
|
|
270
|
+
"xxxlarge": $shadow-soft-xxxlarge,
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
$shadow-hard-map: (
|
|
274
|
+
"xxsmall": $shadow-hard-xxsmall,
|
|
275
|
+
"xsmall": $shadow-hard-xsmall,
|
|
276
|
+
"small": $shadow-hard-small,
|
|
277
|
+
"medium": $shadow-hard-medium,
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
// --------------------------------------------
|
|
281
|
+
// BLURS
|
|
282
|
+
// --------------------------------------------
|
|
283
|
+
|
|
284
|
+
$blur-none: 0;
|
|
285
|
+
$blur-xsmall: 2px;
|
|
286
|
+
$blur-small: 4px;
|
|
287
|
+
$blur-medium: 8px;
|
|
288
|
+
$blur-large: 12px;
|
|
289
|
+
$blur-xlarge: 20px;
|
|
290
|
+
|
|
291
|
+
$blur-map: (
|
|
292
|
+
"none": $blur-none,
|
|
293
|
+
"xsmall": $blur-xsmall,
|
|
294
|
+
"small": $blur-small,
|
|
295
|
+
"medium": $blur-medium,
|
|
296
|
+
"large": $blur-large,
|
|
297
|
+
"xlarge": $blur-xlarge,
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
// --------------------------------------------
|
|
301
|
+
// TRANSITIONS
|
|
302
|
+
// --------------------------------------------
|
|
303
|
+
|
|
304
|
+
$transition-fast: 150ms ease-in-out;
|
|
305
|
+
$transition-base: 250ms ease-in-out;
|
|
306
|
+
$transition-slow: 350ms ease-in-out;
|
|
307
|
+
|
|
308
|
+
// --------------------------------------------
|
|
309
|
+
// BREAKPOINTS
|
|
310
|
+
// --------------------------------------------
|
|
311
|
+
|
|
312
|
+
$breakpoint-xs: 480px;
|
|
313
|
+
$breakpoint-sm: 768px;
|
|
314
|
+
$breakpoint-md: 1024px;
|
|
315
|
+
$breakpoint-lg: 1280px;
|
|
316
|
+
$breakpoint-xl: 1536px;
|
|
317
|
+
|
|
318
|
+
// --------------------------------------------
|
|
319
|
+
// Z-INDEX LAYERS
|
|
320
|
+
// --------------------------------------------
|
|
321
|
+
|
|
322
|
+
$z-index-dropdown: 1000;
|
|
323
|
+
$z-index-sticky: 1020;
|
|
324
|
+
$z-index-fixed: 1030;
|
|
325
|
+
$z-index-modal-backdrop: 1040;
|
|
326
|
+
$z-index-modal: 1050;
|
|
327
|
+
$z-index-popover: 1060;
|
|
328
|
+
$z-index-tooltip: 1070;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use "../abstracts/mixins" as *;
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// CONTAINER — the one page-measure rule, applied everywhere content is shown.
|
|
5
|
+
//
|
|
6
|
+
// Reproduces the content wrapper from the PECB designs ("PECB Profile —
|
|
7
|
+
// Layout 3": `max-width: 1180px; margin: 0 auto; padding: 14px`, widening the
|
|
8
|
+
// gutter to 16px below 880px). Wrap any page in it and the side spacing is the
|
|
9
|
+
// same throughout the project:
|
|
10
|
+
//
|
|
11
|
+
// <div class="pecb-container"> …page content… </div>
|
|
12
|
+
//
|
|
13
|
+
// One knob, settable on the element or any ancestor:
|
|
14
|
+
//
|
|
15
|
+
// --pecb-container-max-width content measure cap (1180px; `none` = full bleed)
|
|
16
|
+
//
|
|
17
|
+
// Purely additive and opt-in: nothing changes until the class is applied, so
|
|
18
|
+
// existing layouts (including `pecb-project-layout` consumers) render exactly
|
|
19
|
+
// as before. Inside a layout, put it on the page you project:
|
|
20
|
+
//
|
|
21
|
+
// <div layoutContent><div class="pecb-container"> … </div></div>
|
|
22
|
+
// =============================================================================
|
|
23
|
+
|
|
24
|
+
.pecb-container {
|
|
25
|
+
@include content-container;
|
|
26
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@use "../abstracts/variables" as *;
|
|
2
|
+
|
|
3
|
+
// Modern CSS Reset
|
|
4
|
+
*,
|
|
5
|
+
*::before,
|
|
6
|
+
*::after {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
html {
|
|
13
|
+
-webkit-font-smoothing: antialiased;
|
|
14
|
+
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
text-rendering: optimizeLegibility;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
font-family: $font-family-base;
|
|
20
|
+
font-size: $font-size-base;
|
|
21
|
+
line-height: $line-height-base;
|
|
22
|
+
color: $text-primary;
|
|
23
|
+
background-color: $white;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Remove default list styles
|
|
27
|
+
ul,
|
|
28
|
+
ol {
|
|
29
|
+
list-style: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Remove default button styles
|
|
33
|
+
button {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
font-family: inherit;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Remove default link styles
|
|
39
|
+
a {
|
|
40
|
+
color: inherit;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Improve media defaults
|
|
45
|
+
img,
|
|
46
|
+
picture,
|
|
47
|
+
video,
|
|
48
|
+
canvas,
|
|
49
|
+
svg {
|
|
50
|
+
display: block;
|
|
51
|
+
max-width: 100%;
|
|
52
|
+
height: auto;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Remove built-in form typography styles
|
|
56
|
+
input,
|
|
57
|
+
button,
|
|
58
|
+
textarea,
|
|
59
|
+
select {
|
|
60
|
+
font: inherit;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Avoid text overflows
|
|
64
|
+
p,
|
|
65
|
+
h1,
|
|
66
|
+
h2,
|
|
67
|
+
h3,
|
|
68
|
+
h4,
|
|
69
|
+
h5,
|
|
70
|
+
h6 {
|
|
71
|
+
overflow-wrap: break-word;
|
|
72
|
+
}
|
package/styles/main.scss
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Main SCSS entry point for UI Components Library
|
|
2
|
+
|
|
3
|
+
// Abstracts
|
|
4
|
+
@use "abstracts/variables" as *;
|
|
5
|
+
@use "abstracts/mixins" as *;
|
|
6
|
+
|
|
7
|
+
// Base
|
|
8
|
+
@use "base/reset";
|
|
9
|
+
@use "base/container";
|
|
10
|
+
|
|
11
|
+
// Utility classes (directive-driven)
|
|
12
|
+
@use "../lib/components/shadow/shadow.directive";
|