platform-core-ng 21.1.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.
Files changed (37) hide show
  1. package/README.md +73 -0
  2. package/fesm2022/platform-core-ng.mjs +7139 -0
  3. package/fesm2022/platform-core-ng.mjs.map +1 -0
  4. package/package.json +20 -0
  5. package/styles/base/_breakpoints.scss +1 -0
  6. package/styles/base/_interaction-mixins.scss +37 -0
  7. package/styles/base/_tokens.scss +255 -0
  8. package/styles/base/reset.scss +66 -0
  9. package/styles/base/scrollbar.scss +22 -0
  10. package/styles/base/theme.scss +424 -0
  11. package/styles/base/typography.scss +50 -0
  12. package/styles/components/index.scss +7 -0
  13. package/styles/components/mail-client.scss +2165 -0
  14. package/styles/components/master-detail.scss +137 -0
  15. package/styles/components/mobile-list-directives.scss +355 -0
  16. package/styles/control/button.scss +565 -0
  17. package/styles/control/switch.scss +85 -0
  18. package/styles/data/table/base.scss +31 -0
  19. package/styles/data/table/pattern-admin.scss +136 -0
  20. package/styles/data/table/pattern-screen.scss +36 -0
  21. package/styles/data/table.scss +3 -0
  22. package/styles/form/checkbox.scss +97 -0
  23. package/styles/form/input.scss +201 -0
  24. package/styles/form/number.scss +17 -0
  25. package/styles/form/radio.scss +84 -0
  26. package/styles/form/range.scss +118 -0
  27. package/styles/form/select.scss +50 -0
  28. package/styles/form/textarea.scss +65 -0
  29. package/styles/foundation.scss +16 -0
  30. package/styles/index.scss +1 -0
  31. package/styles/profiles/b/index.scss +4 -0
  32. package/styles/profiles/b/layout.scss +88 -0
  33. package/styles/profiles/b/theme.scss +44 -0
  34. package/styles/profiles/screen/index.scss +3 -0
  35. package/styles/profiles/screen/layout.scss +125 -0
  36. package/styles/profiles/screen/theme.scss +131 -0
  37. package/types/platform-core-ng.d.ts +3217 -0
@@ -0,0 +1,565 @@
1
+ @use '../base/tokens' as tk;
2
+ @use '../base/interaction-mixins' as mx;
3
+
4
+ $btn-surface: tk.$color-surface;
5
+ $btn-surface-soft: tk.$color-surface-soft;
6
+ $btn-text: tk.$color-text-primary;
7
+ $btn-border: tk.$color-border;
8
+ $btn-border-strong: tk.$color-border-strong;
9
+ $btn-primary: tk.$button-primary-bg;
10
+ $btn-primary-hover: tk.$button-primary-bg-hover;
11
+ $btn-primary-active: tk.$button-primary-bg-active;
12
+ $btn-primary-disabled: tk.$color-primary-disabled;
13
+ $btn-danger: tk.$color-danger;
14
+ $btn-danger-hover: tk.$color-danger-hover;
15
+ $btn-danger-active: tk.$color-danger-active;
16
+ $btn-danger-disabled: tk.$color-danger-disabled;
17
+ $btn-focus: tk.$color-focus-ring;
18
+ $btn-neutral-soft: tk.$button-neutral-bg;
19
+ $btn-neutral-soft-hover: tk.$button-neutral-bg-hover;
20
+
21
+ $btn-font-sm: tk.$font-size-sm;
22
+ $btn-font-md: tk.$font-size-md;
23
+ $btn-font-lg: tk.$font-size-lg;
24
+ $space-0: tk.$space-0;
25
+ $space-1: tk.$space-1;
26
+ $space-2: tk.$space-2;
27
+ $space-2-5: tk.$space-2-5;
28
+ $space-3: tk.$space-3;
29
+ $space-4: tk.$space-4;
30
+ $space-5: tk.$space-5;
31
+
32
+ button {
33
+ --button-spinner-color: #{$btn-text};
34
+ display: inline-flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ gap: $space-1;
38
+ cursor: pointer;
39
+ border-radius: tk.$button-radius;
40
+ padding: $space-1 $space-2;
41
+ border: 1px solid transparent;
42
+ background-color: $btn-surface;
43
+ color: $btn-text;
44
+ font-weight: tk.$button-font-weight;
45
+ line-height: 1.25rem;
46
+ white-space: nowrap;
47
+ transition:
48
+ background-color 0.2s ease,
49
+ border-color 0.2s ease,
50
+ color 0.2s ease,
51
+ box-shadow 0.2s ease,
52
+ filter 0.2s ease;
53
+
54
+ &:focus-visible {
55
+ @include mx.focus-ring(3px, $btn-focus, null, true);
56
+ }
57
+
58
+ &:disabled,
59
+ &.disabled {
60
+ cursor: not-allowed;
61
+ box-shadow: none;
62
+ filter: none;
63
+ }
64
+
65
+ &.no-padding {
66
+ padding: $space-0;
67
+ }
68
+
69
+ &.default,
70
+ &.secondary {
71
+ background-color: $btn-neutral-soft;
72
+ color: $btn-text;
73
+ border-color: transparent;
74
+ --button-spinner-color: #{$btn-text};
75
+
76
+ @include mx.hover-enabled {
77
+ background-color: $btn-neutral-soft-hover;
78
+ }
79
+
80
+ @include mx.active-enabled {
81
+ background-color: tk.$button-neutral-bg-active;
82
+ }
83
+
84
+ @include mx.disabled-state {
85
+ background-color: $btn-neutral-soft;
86
+ color: tk.$color-text-disabled;
87
+ border-color: transparent;
88
+ }
89
+ }
90
+
91
+ &.primary {
92
+ background-color: $btn-primary;
93
+ color: $btn-surface;
94
+ border-color: $btn-primary;
95
+ --button-spinner-color: #{$btn-surface};
96
+
97
+ @include mx.hover-enabled {
98
+ background-color: $btn-primary-hover;
99
+ border-color: $btn-primary-hover;
100
+ }
101
+
102
+ @include mx.active-enabled {
103
+ background-color: $btn-primary-active;
104
+ border-color: $btn-primary-active;
105
+ }
106
+
107
+ @include mx.disabled-state {
108
+ background-color: $btn-primary-disabled;
109
+ border-color: $btn-primary-disabled;
110
+ color: $btn-surface;
111
+ }
112
+ }
113
+
114
+ &.success,
115
+ &.warning,
116
+ &.danger,
117
+ &.error,
118
+ &.info {
119
+ border-color: transparent;
120
+
121
+ @include mx.hover-enabled {
122
+ filter: none;
123
+ }
124
+
125
+ @include mx.active-enabled {
126
+ filter: brightness(0.97);
127
+ }
128
+ }
129
+
130
+ &.success {
131
+ color: tk.$color-success;
132
+ background-color: tk.$color-success-subtle;
133
+ --button-spinner-color: #{tk.$color-success};
134
+
135
+ @include mx.hover-enabled {
136
+ color: tk.$color-success-hover;
137
+ }
138
+
139
+ @include mx.active-enabled {
140
+ color: tk.$color-success-active;
141
+ }
142
+ }
143
+
144
+ &.warning {
145
+ color: tk.$color-warning;
146
+ background-color: tk.$color-warning-subtle;
147
+ --button-spinner-color: #{tk.$color-warning};
148
+
149
+ @include mx.hover-enabled {
150
+ color: tk.$color-warning-hover;
151
+ }
152
+
153
+ @include mx.active-enabled {
154
+ color: tk.$color-warning-active;
155
+ }
156
+ }
157
+
158
+ &.danger {
159
+ color: $btn-danger;
160
+ background-color: tk.$color-danger-subtle;
161
+ --button-spinner-color: #{$btn-danger};
162
+
163
+ @include mx.hover-enabled {
164
+ color: $btn-danger-hover;
165
+ }
166
+
167
+ @include mx.active-enabled {
168
+ color: $btn-danger-active;
169
+ }
170
+ }
171
+
172
+ &.error {
173
+ color: tk.$color-error;
174
+ background-color: tk.$color-danger-subtle;
175
+ --button-spinner-color: #{tk.$color-error};
176
+
177
+ @include mx.hover-enabled {
178
+ color: $btn-danger-hover;
179
+ }
180
+
181
+ @include mx.active-enabled {
182
+ color: $btn-danger-active;
183
+ }
184
+ }
185
+
186
+ &.info {
187
+ color: tk.$color-info;
188
+ background-color: tk.$color-info-subtle;
189
+ --button-spinner-color: #{tk.$color-info};
190
+
191
+ @include mx.hover-enabled {
192
+ color: tk.$color-info-hover;
193
+ }
194
+
195
+ @include mx.active-enabled {
196
+ color: tk.$color-info-active;
197
+ }
198
+ }
199
+
200
+ &.solid {
201
+ background-color: $btn-text;
202
+ border-color: $btn-text;
203
+ color: $btn-surface;
204
+ --button-spinner-color: #{$btn-surface};
205
+
206
+ @include mx.hover-enabled {
207
+ filter: brightness(0.95);
208
+ }
209
+ }
210
+
211
+ &.primary.solid {
212
+ background-color: $btn-primary;
213
+ border-color: $btn-primary;
214
+
215
+ @include mx.hover-enabled {
216
+ background-color: $btn-primary-hover;
217
+ border-color: $btn-primary-hover;
218
+ filter: none;
219
+ }
220
+
221
+ @include mx.active-enabled {
222
+ background-color: $btn-primary-active;
223
+ border-color: $btn-primary-active;
224
+ }
225
+ }
226
+
227
+ &.success.solid {
228
+ background-color: tk.$color-success;
229
+ border-color: tk.$color-success;
230
+
231
+ @include mx.hover-enabled {
232
+ background-color: tk.$color-success-hover;
233
+ border-color: tk.$color-success-hover;
234
+ }
235
+
236
+ @include mx.active-enabled {
237
+ background-color: tk.$color-success-active;
238
+ border-color: tk.$color-success-active;
239
+ }
240
+ }
241
+
242
+ &.warning.solid {
243
+ background-color: tk.$color-warning;
244
+ border-color: tk.$color-warning;
245
+
246
+ @include mx.hover-enabled {
247
+ background-color: tk.$color-warning-hover;
248
+ border-color: tk.$color-warning-hover;
249
+ }
250
+
251
+ @include mx.active-enabled {
252
+ background-color: tk.$color-warning-active;
253
+ border-color: tk.$color-warning-active;
254
+ }
255
+ }
256
+
257
+ &.danger.solid {
258
+ background-color: $btn-danger;
259
+ border-color: $btn-danger;
260
+ }
261
+
262
+ &.error.solid {
263
+ background-color: tk.$color-error;
264
+ border-color: tk.$color-error;
265
+ }
266
+
267
+ &.info.solid {
268
+ background-color: tk.$color-info;
269
+ border-color: tk.$color-info;
270
+ }
271
+
272
+ &.soft,
273
+ &.subtle {
274
+ background-color: $btn-neutral-soft;
275
+ border-color: transparent;
276
+ color: $btn-text;
277
+ --button-spinner-color: #{$btn-text};
278
+ }
279
+
280
+ &.primary.soft,
281
+ &.primary.subtle {
282
+ background-color: tk.$button-primary-soft-bg;
283
+ border-color: transparent;
284
+ color: tk.$color-primary-600;
285
+ --button-spinner-color: #{tk.$color-primary-600};
286
+
287
+ @include mx.hover-enabled {
288
+ background-color: tk.$button-primary-soft-bg-hover;
289
+ }
290
+ }
291
+
292
+ &.success-light,
293
+ &.success.soft,
294
+ &.success.subtle,
295
+ &.warning-light,
296
+ &.warning.soft,
297
+ &.warning.subtle,
298
+ &.error-light,
299
+ &.error.soft,
300
+ &.error.subtle,
301
+ &.danger.soft,
302
+ &.danger.subtle,
303
+ &.info.soft,
304
+ &.info.subtle,
305
+ &.info-light {
306
+ border-color: transparent;
307
+
308
+ @include mx.hover-enabled {
309
+ filter: brightness(0.97);
310
+ }
311
+ }
312
+
313
+ &.success-light {
314
+ color: tk.$color-success;
315
+ border-color: transparent;
316
+ background-color: tk.$color-success-subtle;
317
+ }
318
+
319
+ &.warning-light {
320
+ color: tk.$color-warning;
321
+ border-color: transparent;
322
+ background-color: tk.$color-warning-subtle;
323
+ }
324
+
325
+ &.danger.soft,
326
+ &.danger.subtle {
327
+ color: $btn-danger;
328
+ background-color: tk.$color-danger-subtle;
329
+ }
330
+
331
+ &.error-light {
332
+ color: tk.$color-error;
333
+ border-color: transparent;
334
+ background-color: tk.$color-danger-subtle;
335
+ }
336
+
337
+ &.info-light {
338
+ color: tk.$color-info;
339
+ border-color: transparent;
340
+ background-color: tk.$color-info-subtle;
341
+ }
342
+
343
+ &.outline,
344
+ &.outlined {
345
+ background-color: $btn-surface;
346
+ color: $btn-text;
347
+ border-color: tk.$button-outline-border;
348
+
349
+ @include mx.hover-enabled {
350
+ background-color: transparent;
351
+ border-color: tk.$button-outline-border-hover;
352
+ }
353
+ }
354
+
355
+ &.primary.outline,
356
+ &.primary.outlined {
357
+ color: tk.$color-primary-600;
358
+ border-color: tk.$button-outline-border;
359
+ --button-spinner-color: #{tk.$color-primary-600};
360
+
361
+ @include mx.hover-enabled {
362
+ background-color: tk.$button-primary-soft-bg;
363
+ border-color: color-mix(in srgb, #{tk.$color-primary} 22%, transparent);
364
+ }
365
+ }
366
+
367
+ &.success.outline,
368
+ &.success.outlined {
369
+ color: tk.$color-success;
370
+ border-color: tk.$color-success-border;
371
+ }
372
+
373
+ &.warning.outline,
374
+ &.warning.outlined {
375
+ color: tk.$color-warning;
376
+ border-color: tk.$color-warning-border;
377
+ }
378
+
379
+ &.danger.outline,
380
+ &.danger.outlined,
381
+ &.error.outline,
382
+ &.error.outlined {
383
+ color: $btn-danger;
384
+ border-color: tk.$color-danger-border;
385
+ }
386
+
387
+ &.info.outline,
388
+ &.info.outlined {
389
+ color: tk.$color-info;
390
+ border-color: tk.$color-info-border;
391
+ }
392
+
393
+ &.dashed {
394
+ background-color: transparent;
395
+ color: $btn-text;
396
+ border: 1px dashed $btn-border;
397
+
398
+ @include mx.hover-enabled {
399
+ border-color: $btn-primary;
400
+ color: $btn-primary;
401
+ background-color: tk.$color-primary-50;
402
+ }
403
+ }
404
+
405
+ &.text {
406
+ background-color: transparent;
407
+ color: $btn-text;
408
+ border: none;
409
+ --button-spinner-color: #{$btn-text};
410
+
411
+ @include mx.hover-enabled {
412
+ background-color: $btn-neutral-soft;
413
+ }
414
+
415
+ @include mx.active-enabled {
416
+ background-color: $btn-neutral-soft-hover;
417
+ }
418
+
419
+ @include mx.disabled-state {
420
+ color: tk.$color-text-disabled;
421
+ }
422
+ }
423
+
424
+ &.link {
425
+ background-color: transparent;
426
+ color: tk.$color-link;
427
+ border: none;
428
+ --button-spinner-color: #{tk.$color-link};
429
+
430
+ @include mx.hover-enabled {
431
+ color: tk.$color-link-hover;
432
+ text-decoration: underline;
433
+ }
434
+
435
+ @include mx.active-enabled {
436
+ color: tk.$color-link-active;
437
+ }
438
+
439
+ @include mx.disabled-state {
440
+ color: tk.$color-text-disabled;
441
+ }
442
+ }
443
+
444
+ &.ghost {
445
+ background-color: transparent;
446
+ color: currentColor;
447
+ border-color: transparent;
448
+
449
+ @include mx.hover-enabled {
450
+ background-color: tk.$color-overlay-hover;
451
+ }
452
+
453
+ @include mx.active-enabled {
454
+ background-color: tk.$color-overlay-press;
455
+ }
456
+ }
457
+
458
+ &.lg,
459
+ &.large {
460
+ height: tk.$button-height-lg;
461
+ padding-top: $space-0;
462
+ padding-bottom: $space-0;
463
+ padding-left: tk.$button-padding-x-lg;
464
+ padding-right: tk.$button-padding-x-lg;
465
+ font-size: tk.$button-font-size;
466
+ }
467
+
468
+ &.md,
469
+ &.middle {
470
+ height: tk.$button-height-md;
471
+ padding-top: $space-0;
472
+ padding-bottom: $space-0;
473
+ padding-left: tk.$button-padding-x-md;
474
+ padding-right: tk.$button-padding-x-md;
475
+ font-size: tk.$button-font-size;
476
+ }
477
+
478
+ &.sm,
479
+ &.small {
480
+ height: tk.$button-height-sm;
481
+ padding-top: $space-0;
482
+ padding-bottom: $space-0;
483
+ padding-left: tk.$button-padding-x-sm;
484
+ padding-right: tk.$button-padding-x-sm;
485
+ font-size: tk.$font-size-xs;
486
+ }
487
+
488
+ &.xs {
489
+ height: tk.$button-height-xs;
490
+ padding-top: $space-0;
491
+ padding-bottom: $space-0;
492
+ padding-left: tk.$button-padding-x-xs;
493
+ padding-right: tk.$button-padding-x-xs;
494
+ font-size: tk.$font-size-xs;
495
+ }
496
+
497
+ &.round,
498
+ &.circle {
499
+ border-radius: tk.$radius-full;
500
+ }
501
+
502
+ &.square {
503
+ border-radius: tk.$radius-sm;
504
+ }
505
+
506
+ &.circle {
507
+ width: tk.$button-height-md;
508
+ height: tk.$button-height-md;
509
+ padding: $space-0;
510
+ }
511
+
512
+ &.circle.lg,
513
+ &.circle.large {
514
+ width: tk.$button-height-lg;
515
+ height: tk.$button-height-lg;
516
+ }
517
+
518
+ &.circle.sm,
519
+ &.circle.small {
520
+ width: tk.$button-height-sm;
521
+ height: tk.$button-height-sm;
522
+ }
523
+
524
+ &.circle.xs {
525
+ width: tk.$button-height-xs;
526
+ height: tk.$button-height-xs;
527
+ }
528
+
529
+ &.loading,
530
+ &[aria-busy='true'] {
531
+ position: relative;
532
+ pointer-events: none;
533
+ text-indent: -9999px;
534
+ overflow: hidden;
535
+ white-space: nowrap;
536
+
537
+ &::after {
538
+ content: '';
539
+ position: absolute;
540
+ width: 0.75rem;
541
+ height: 0.75rem;
542
+ border-radius: 999px;
543
+ border: 1.5px solid color-mix(in srgb, var(--button-spinner-color) 28%, transparent);
544
+ border-right-color: transparent;
545
+ border-top-color: var(--button-spinner-color);
546
+ animation: button-spin 0.75s linear infinite;
547
+ top: 50%;
548
+ left: 50%;
549
+ transform: translate(-50%, -50%) rotate(0deg);
550
+ transform-origin: center;
551
+ text-indent: 0;
552
+ pointer-events: none;
553
+ }
554
+ }
555
+ }
556
+
557
+ @keyframes button-spin {
558
+ from {
559
+ transform: translate(-50%, -50%) rotate(0deg);
560
+ }
561
+
562
+ to {
563
+ transform: translate(-50%, -50%) rotate(360deg);
564
+ }
565
+ }
@@ -0,0 +1,85 @@
1
+ @use '../base/tokens' as tk;
2
+ @use '../base/interaction-mixins' as mx;
3
+
4
+ $switch-width: 2.375rem;
5
+ $switch-height: 1.375rem;
6
+ $switch-thumb-size: 1rem;
7
+ $switch-thumb-offset: 0.125rem;
8
+ $switch-border: tk.$color-border-strong;
9
+ $switch-bg: tk.$color-surface-soft;
10
+ $switch-bg-hover: tk.$color-primary-subtle;
11
+ $switch-bg-checked: tk.$color-primary;
12
+ $switch-thumb: tk.$color-surface;
13
+ $switch-label: tk.$color-text-primary;
14
+ $switch-help: tk.$color-text-secondary;
15
+ $switch-disabled-bg: tk.$color-divider;
16
+ $switch-disabled-thumb: tk.$color-text-disabled;
17
+ $switch-disabled-label: tk.$color-text-disabled;
18
+
19
+ input[type='checkbox'][role='switch'] {
20
+ appearance: none;
21
+ position: relative;
22
+ flex: 0 0 auto;
23
+ width: $switch-width;
24
+ height: $switch-height;
25
+ margin: 0;
26
+ border: 1px solid $switch-border;
27
+ border-radius: 999px;
28
+ background: $switch-bg;
29
+ cursor: pointer;
30
+ transition:
31
+ background-color 160ms ease,
32
+ border-color 160ms ease,
33
+ box-shadow 160ms ease;
34
+
35
+ &::after {
36
+ content: '';
37
+ position: absolute;
38
+ top: $switch-thumb-offset;
39
+ left: $switch-thumb-offset;
40
+ width: $switch-thumb-size;
41
+ height: $switch-thumb-size;
42
+ border-radius: 999px;
43
+ background: $switch-thumb;
44
+ box-shadow: tk.$shadow-common-s;
45
+ transition:
46
+ background-color 160ms ease,
47
+ transform 160ms ease;
48
+ }
49
+
50
+ &:hover {
51
+ border-color: tk.$color-primary-hover;
52
+ background: $switch-bg-hover;
53
+ }
54
+
55
+ &:checked {
56
+ border-color: $switch-bg-checked;
57
+ background: $switch-bg-checked;
58
+ }
59
+
60
+ &:checked::after {
61
+ transform: translateX(calc(#{$switch-width} - #{$switch-thumb-size} - (#{$switch-thumb-offset} * 2) - 2px));
62
+ }
63
+
64
+ &:focus-visible {
65
+ @include mx.focus-ring(2px, tk.$color-focus-ring, tk.$color-primary);
66
+ }
67
+
68
+ @include mx.disabled-state {
69
+ border-color: transparent;
70
+ background: $switch-disabled-bg;
71
+ cursor: not-allowed;
72
+
73
+ &::after {
74
+ background: $switch-disabled-thumb;
75
+ box-shadow: none;
76
+ }
77
+
78
+ & + .switch__content,
79
+ & + .form-switch__content,
80
+ & + .switch__label,
81
+ & + .form-switch__label {
82
+ color: $switch-disabled-label;
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,31 @@
1
+ @use '../../base/tokens' as tk;
2
+ @use '../../base/interaction-mixins' as mx;
3
+
4
+ $font-sm: tk.$font-size-sm;
5
+
6
+ table,
7
+ .table-pattern-admin,
8
+ [data-table-pattern='admin'],
9
+ .table-pattern-screen,
10
+ [data-table-pattern='screen'] {
11
+ width: 100%;
12
+ max-width: 100%;
13
+ table-layout: auto;
14
+ overflow: hidden;
15
+
16
+ td {
17
+ input[type='text'] {
18
+ width: 100%;
19
+ height: 2rem;
20
+ padding: tk.$space-1 tk.$space-2;
21
+ border: 1px solid tk.$color-border;
22
+ border-radius: tk.$radius-common-m;
23
+ font-size: $font-sm;
24
+ color: tk.$color-text-primary;
25
+
26
+ &:focus {
27
+ @include mx.focus-ring(1px, tk.$color-primary, tk.$color-primary);
28
+ }
29
+ }
30
+ }
31
+ }