@3dsource/source-ui-native 0.0.1 → 1.0.1
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/fesm2022/3dsource-source-ui-native.mjs +662 -0
- package/fesm2022/3dsource-source-ui-native.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/source-badge/components/source-badge.component.d.ts +27 -0
- package/lib/components/source-badge/constants/sourceBadgeSize.d.ts +6 -0
- package/lib/components/source-badge/constants/sourceBadgeType.d.ts +9 -0
- package/lib/components/source-banner/components/source-banner.component.d.ts +9 -0
- package/lib/components/source-banner/constants/sourceBannerType.d.ts +8 -0
- package/lib/components/source-button/components/source-button.component.d.ts +86 -0
- package/lib/components/source-button/constants/sourceButtonAppearance.d.ts +5 -0
- package/lib/components/source-button/constants/sourceButtonColorScheme.d.ts +6 -0
- package/lib/components/source-button/constants/sourceButtonSize.d.ts +7 -0
- package/lib/components/source-button/constants/sourceButtonType.d.ts +6 -0
- package/lib/components/source-button/interfaces/defaultSourceButton.config.d.ts +2 -0
- package/lib/components/source-button/interfaces/sourceButton.interface.d.ts +19 -0
- package/lib/components/source-copyright/components/source-copyright.component.d.ts +7 -0
- package/lib/components/source-divider/components/source-divider.component.d.ts +7 -0
- package/lib/components/source-hint/components/source-hint.component.d.ts +7 -0
- package/lib/components/source-icon-button/components/source-icon-button.component.d.ts +40 -0
- package/lib/components/source-icon-button/constants/sourceIconButtonShape.d.ts +5 -0
- package/lib/components/source-icon-button/constants/sourceIconButtonSize.d.ts +8 -0
- package/lib/components/source-icon-button/constants/sourceIconButtonType.d.ts +6 -0
- package/lib/components/source-loading/components/source-loading.component.d.ts +37 -0
- package/lib/components/source-loading/constants/sourceLoadingLineCap.d.ts +6 -0
- package/lib/components/source-logo-loading/components/source-logo-loading.component.d.ts +8 -0
- package/lib/components/source-slider/components/source-slider.component.d.ts +63 -0
- package/package.json +13 -2
- package/eslint.config.js +0 -37
- package/ng-package.json +0 -7
- package/src/lib/components/source-badge/components/source-badge.component.html +0 -20
- package/src/lib/components/source-badge/components/source-badge.component.scss +0 -76
- package/src/lib/components/source-badge/components/source-badge.component.ts +0 -62
- package/src/lib/components/source-badge/constants/sourceBadgeSize.ts +0 -8
- package/src/lib/components/source-badge/constants/sourceBadgeType.ts +0 -11
- package/src/lib/components/source-banner/components/source-banner.component.html +0 -10
- package/src/lib/components/source-banner/components/source-banner.component.scss +0 -75
- package/src/lib/components/source-banner/components/source-banner.component.ts +0 -25
- package/src/lib/components/source-banner/constants/sourceBannerType.ts +0 -10
- package/src/lib/components/source-button/components/source-button.component.html +0 -44
- package/src/lib/components/source-button/components/source-button.component.scss +0 -355
- package/src/lib/components/source-button/components/source-button.component.ts +0 -220
- package/src/lib/components/source-button/constants/sourceButtonAppearance.ts +0 -7
- package/src/lib/components/source-button/constants/sourceButtonColorScheme.ts +0 -8
- package/src/lib/components/source-button/constants/sourceButtonSize.ts +0 -8
- package/src/lib/components/source-button/constants/sourceButtonType.ts +0 -8
- package/src/lib/components/source-button/interfaces/defaultSourceButton.config.ts +0 -24
- package/src/lib/components/source-button/interfaces/sourceButton.interface.ts +0 -26
- package/src/lib/components/source-copyright/components/source-copyright.component.html +0 -20
- package/src/lib/components/source-copyright/components/source-copyright.component.scss +0 -81
- package/src/lib/components/source-copyright/components/source-copyright.component.ts +0 -18
- package/src/lib/components/source-divider/components/source-divider.component.html +0 -5
- package/src/lib/components/source-divider/components/source-divider.component.scss +0 -15
- package/src/lib/components/source-divider/components/source-divider.component.ts +0 -18
- package/src/lib/components/source-hint/components/source-hint.component.html +0 -8
- package/src/lib/components/source-hint/components/source-hint.component.scss +0 -31
- package/src/lib/components/source-hint/components/source-hint.component.ts +0 -18
- package/src/lib/components/source-icon-button/components/source-icon-button.component.html +0 -18
- package/src/lib/components/source-icon-button/components/source-icon-button.component.scss +0 -89
- package/src/lib/components/source-icon-button/components/source-icon-button.component.ts +0 -87
- package/src/lib/components/source-icon-button/constants/sourceIconButtonShape.ts +0 -7
- package/src/lib/components/source-icon-button/constants/sourceIconButtonSize.ts +0 -10
- package/src/lib/components/source-icon-button/constants/sourceIconButtonType.ts +0 -8
- package/src/lib/components/source-loading/components/source-loading.component.html +0 -40
- package/src/lib/components/source-loading/components/source-loading.component.scss +0 -62
- package/src/lib/components/source-loading/components/source-loading.component.ts +0 -79
- package/src/lib/components/source-loading/constants/sourceLoadingLineCap.ts +0 -7
- package/src/lib/components/source-logo-loading/components/source-logo-loading.component.html +0 -23
- package/src/lib/components/source-logo-loading/components/source-logo-loading.component.scss +0 -33
- package/src/lib/components/source-logo-loading/components/source-logo-loading.component.ts +0 -21
- package/src/lib/components/source-slider/components/source-slider.component.html +0 -38
- package/src/lib/components/source-slider/components/source-slider.component.scss +0 -132
- package/src/lib/components/source-slider/components/source-slider.component.ts +0 -122
- package/src/lib/styles/base.scss +0 -68
- package/src/lib/styles/elements/_src-button.scss +0 -235
- package/src/lib/styles/elements/_src-input.scss +0 -83
- package/src/lib/styles/elements/_src-list.scss +0 -82
- package/src/lib/styles/elements/_src-select.scss +0 -71
- package/src/lib/styles/elements/elements.scss +0 -4
- package/src/lib/styles/fonts/Inter-VariableFont_slnt,wght.woff2 +0 -0
- package/src/lib/styles/fonts.scss +0 -18
- package/src/lib/styles/source.ui.scss +0 -23
- package/src/lib/styles/typography.scss +0 -90
- package/src/lib/styles/utils.scss +0 -40
- package/src/lib/styles/variables/_borders.scss +0 -14
- package/src/lib/styles/variables/_colors-aliases.scss +0 -39
- package/src/lib/styles/variables/_colors.scss +0 -64
- package/src/lib/styles/variables/_shadows.scss +0 -9
- package/src/lib/styles/variables/_typography.scss +0 -32
- package/src/lib/styles/variables/index.scss +0 -5
- package/tsconfig.lib.json +0 -13
- package/tsconfig.lib.prod.json +0 -11
- /package/{src/lib/components/source-badge/constants/index.ts → lib/components/source-badge/constants/index.d.ts} +0 -0
- /package/{src/lib/components/source-badge/index.ts → lib/components/source-badge/index.d.ts} +0 -0
- /package/{src/lib/components/source-banner/index.ts → lib/components/source-banner/index.d.ts} +0 -0
- /package/{src/lib/components/source-button/constants/index.ts → lib/components/source-button/constants/index.d.ts} +0 -0
- /package/{src/lib/components/source-button/index.ts → lib/components/source-button/index.d.ts} +0 -0
- /package/{src/lib/components/source-button/interfaces/index.ts → lib/components/source-button/interfaces/index.d.ts} +0 -0
- /package/{src/lib/components/source-copyright/index.ts → lib/components/source-copyright/index.d.ts} +0 -0
- /package/{src/lib/components/source-divider/index.ts → lib/components/source-divider/index.d.ts} +0 -0
- /package/{src/lib/components/source-hint/index.ts → lib/components/source-hint/index.d.ts} +0 -0
- /package/{src/lib/components/source-icon-button/constants/index.ts → lib/components/source-icon-button/constants/index.d.ts} +0 -0
- /package/{src/lib/components/source-icon-button/index.ts → lib/components/source-icon-button/index.d.ts} +0 -0
- /package/{src/lib/components/source-loading/index.ts → lib/components/source-loading/index.d.ts} +0 -0
- /package/{src/lib/components/source-logo-loading/index.ts → lib/components/source-logo-loading/index.d.ts} +0 -0
- /package/{src/lib/components/source-slider/index.ts → lib/components/source-slider/index.d.ts} +0 -0
- /package/{src/public-api.ts → public-api.d.ts} +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NgStyle } from '@angular/common';
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
input,
|
|
6
|
-
ViewEncapsulation,
|
|
7
|
-
} from '@angular/core';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'src-logo-loading',
|
|
11
|
-
templateUrl: './source-logo-loading.component.html',
|
|
12
|
-
styleUrls: ['./source-logo-loading.component.scss'],
|
|
13
|
-
imports: [NgStyle],
|
|
14
|
-
encapsulation: ViewEncapsulation.None,
|
|
15
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16
|
-
})
|
|
17
|
-
export class SourceLogoLoadingComponent {
|
|
18
|
-
size = input(32);
|
|
19
|
-
strokeColor = input('var(--src-color-brand-500)');
|
|
20
|
-
testID = input('', { alias: 'data-testid' });
|
|
21
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="src-slider"
|
|
3
|
-
[style.--srcSliderThumbSize.px]="thumbSize"
|
|
4
|
-
[style.--srcSliderTrackHeight.px]="trackHeight"
|
|
5
|
-
[class.src-slider--disabled]="isDisabled"
|
|
6
|
-
[class.src-slider--vertical]="orientation === 'vertical'"
|
|
7
|
-
[attr.data-testid]="testID()"
|
|
8
|
-
>
|
|
9
|
-
<input
|
|
10
|
-
type="range"
|
|
11
|
-
class="src-slider__input"
|
|
12
|
-
[id]="id"
|
|
13
|
-
[min]="min"
|
|
14
|
-
[max]="max"
|
|
15
|
-
[step]="step"
|
|
16
|
-
[disabled]="isDisabled"
|
|
17
|
-
[value]="value"
|
|
18
|
-
[attr.data-testid]="testID() + '-input'"
|
|
19
|
-
(change)="change($event)"
|
|
20
|
-
(input)="input($event)"
|
|
21
|
-
/>
|
|
22
|
-
<div
|
|
23
|
-
class="src-slider__filled-track"
|
|
24
|
-
[style.width]="calculateFilledWidth()"
|
|
25
|
-
></div>
|
|
26
|
-
|
|
27
|
-
<div class="src-slider__thumb" [style.left]="calculateThumbPosition()">
|
|
28
|
-
<ng-content select="[srcIconThumb]"></ng-content>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
@if (showTicks) {
|
|
32
|
-
<div class="src-slider__ticks-container">
|
|
33
|
-
@for (tick of tickPositions; track tick) {
|
|
34
|
-
<div class="tick" [style.left]="tick"></div>
|
|
35
|
-
}
|
|
36
|
-
</div>
|
|
37
|
-
}
|
|
38
|
-
</div>
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// source-slider.component.scss
|
|
2
|
-
.src-slider {
|
|
3
|
-
position: relative;
|
|
4
|
-
--srcSliderThumbBackground: #fff;
|
|
5
|
-
--srcSliderThumbShadow:
|
|
6
|
-
0 0 0 2px #abb2be, 0 2px 0 2px #e6e7e7, 0 0 0 4px #fff;
|
|
7
|
-
--srcSliderThumbIconColor: var(--src-color-icon-default);
|
|
8
|
-
--srcSliderClickableTrackHeight: var(--srcSliderThumbSize);
|
|
9
|
-
--srcSliderTrackShape: 0px;
|
|
10
|
-
--srcSliderTrackBg: var(--src-color-border-default, #e5e7eb);
|
|
11
|
-
--srcSliderTrackFilledBg: transparent;
|
|
12
|
-
--srcSliderTickBg: var(--src-color-border-default, #e5e7eb);
|
|
13
|
-
--srcSliderTickWidth: 2px;
|
|
14
|
-
--srcSliderTickHeight: 10px;
|
|
15
|
-
--srcSliderTickShape: 50%;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
|
|
19
|
-
&--vertical {
|
|
20
|
-
//
|
|
21
|
-
// transform: rotate(-90deg);
|
|
22
|
-
// transform-origin: left bottom;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&--disabled {
|
|
26
|
-
pointer-events: none;
|
|
27
|
-
--srcSliderThumbShadow: 0 0 0 2px #d1d5db, 0 0 0 4px #fff;
|
|
28
|
-
--srcSliderTrackBg: #f1f2f3;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&:hover {
|
|
32
|
-
--srcSliderThumbShadow:
|
|
33
|
-
0 0 0 2px #6b7280, 0 2px 0 2px #e6e7e7, 0 0 0 4px #fff;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
input.src-slider__input {
|
|
37
|
-
width: 100%;
|
|
38
|
-
height: var(--srcSliderClickableTrackHeight);
|
|
39
|
-
appearance: none;
|
|
40
|
-
background: transparent;
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
|
|
43
|
-
&::-webkit-slider-thumb {
|
|
44
|
-
-webkit-appearance: none;
|
|
45
|
-
width: 0;
|
|
46
|
-
height: 0;
|
|
47
|
-
border: 0;
|
|
48
|
-
background: transparent;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&::-moz-range-thumb {
|
|
52
|
-
width: 0;
|
|
53
|
-
height: 0;
|
|
54
|
-
border: 0;
|
|
55
|
-
background: transparent;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&::-webkit-slider-runnable-track {
|
|
59
|
-
width: 100%;
|
|
60
|
-
height: var(--srcSliderTrackHeight);
|
|
61
|
-
background: var(--srcSliderTrackBg);
|
|
62
|
-
border-radius: var(--srcSliderTrackShape);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&::-moz-range-track {
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: var(--srcSliderTrackHeight);
|
|
68
|
-
background: var(--srcSliderTrackBg);
|
|
69
|
-
border-radius: var(--srcSliderTrackShape);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&::-ms-fill-lower {
|
|
73
|
-
background: var(--srcSliderTrackFilledBg);
|
|
74
|
-
border-radius: var(--srcSliderTrackShape);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.src-slider__thumb {
|
|
80
|
-
position: absolute;
|
|
81
|
-
top: 50%;
|
|
82
|
-
border-radius: 50%;
|
|
83
|
-
background: var(--srcSliderThumbBackground);
|
|
84
|
-
transform: translate(-50%, -50%);
|
|
85
|
-
width: var(--srcSliderThumbSize);
|
|
86
|
-
height: var(--srcSliderThumbSize);
|
|
87
|
-
pointer-events: none;
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
color: var(--srcSliderThumbIconColor);
|
|
92
|
-
cursor: pointer;
|
|
93
|
-
box-shadow: var(--srcSliderThumbShadow);
|
|
94
|
-
z-index: 1;
|
|
95
|
-
transition: all 0.35s ease;
|
|
96
|
-
|
|
97
|
-
& > [srcIconThumb] {
|
|
98
|
-
width: 100%;
|
|
99
|
-
height: 100%;
|
|
100
|
-
object-fit: contain;
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.src-slider__filled-track {
|
|
106
|
-
position: absolute;
|
|
107
|
-
top: 50%;
|
|
108
|
-
height: var(--srcSliderTrackHeight);
|
|
109
|
-
background: var(--srcSliderTrackFilledBg);
|
|
110
|
-
border-radius: var(--srcSliderTrackShape);
|
|
111
|
-
left: 0;
|
|
112
|
-
transform: translateY(-50%);
|
|
113
|
-
pointer-events: none;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.src-slider__ticks-container {
|
|
117
|
-
width: 100%;
|
|
118
|
-
position: absolute;
|
|
119
|
-
top: 50%;
|
|
120
|
-
height: 0;
|
|
121
|
-
|
|
122
|
-
.tick {
|
|
123
|
-
width: var(--srcSliderTickWidth);
|
|
124
|
-
height: var(--srcSliderTickHeight);
|
|
125
|
-
transform: translate(-50%, -50%);
|
|
126
|
-
position: absolute;
|
|
127
|
-
background: var(--srcSliderTickBg);
|
|
128
|
-
border-radius: var(--srcSliderTickShape);
|
|
129
|
-
top: 0;
|
|
130
|
-
pointer-events: none;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Input,
|
|
7
|
-
Output,
|
|
8
|
-
input,
|
|
9
|
-
ViewEncapsulation,
|
|
10
|
-
} from '@angular/core';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'src-slider',
|
|
14
|
-
templateUrl: './source-slider.component.html',
|
|
15
|
-
styleUrls: ['./source-slider.component.scss'],
|
|
16
|
-
encapsulation: ViewEncapsulation.None,
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
})
|
|
19
|
-
export class SourceSliderComponent implements AfterViewInit {
|
|
20
|
-
/**
|
|
21
|
-
* id of input to connect label and input[type=range]
|
|
22
|
-
*/
|
|
23
|
-
@Input() id?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The minimum value of the slider
|
|
26
|
-
*/
|
|
27
|
-
@Input() min!: number;
|
|
28
|
-
/**
|
|
29
|
-
* The maximum value of the slider
|
|
30
|
-
*/
|
|
31
|
-
@Input() max!: number;
|
|
32
|
-
/**
|
|
33
|
-
* The size of the thumb
|
|
34
|
-
*/
|
|
35
|
-
@Input() thumbSize = 12;
|
|
36
|
-
/**
|
|
37
|
-
* The height of the visual track. Height of the input won't be affected
|
|
38
|
-
*/
|
|
39
|
-
@Input() trackHeight = 2;
|
|
40
|
-
/**
|
|
41
|
-
* The step length of the slider
|
|
42
|
-
*/
|
|
43
|
-
@Input() step = 1;
|
|
44
|
-
/**
|
|
45
|
-
* Whether to show the ticks on each step
|
|
46
|
-
*/
|
|
47
|
-
@Input() showTicks = false;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* If slider is disabled
|
|
51
|
-
*/
|
|
52
|
-
@Input() isDisabled = false;
|
|
53
|
-
/**
|
|
54
|
-
* Slider orientation - WIP
|
|
55
|
-
*/
|
|
56
|
-
@Input() orientation: 'horizontal' | 'vertical' = 'horizontal';
|
|
57
|
-
|
|
58
|
-
tickPositions: string[] = [];
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* The value of the slider
|
|
62
|
-
*/
|
|
63
|
-
@Input() value!: number;
|
|
64
|
-
/**
|
|
65
|
-
* Test ID for the component. Provide descriptive uniq id in kebab-case.
|
|
66
|
-
*/
|
|
67
|
-
testID = input('', { alias: 'data-testid' });
|
|
68
|
-
/**
|
|
69
|
-
* Emits the value of the slider when it changes
|
|
70
|
-
*/
|
|
71
|
-
@Output() onChange = new EventEmitter<number>();
|
|
72
|
-
@Output() onInput = new EventEmitter<number>();
|
|
73
|
-
|
|
74
|
-
ngAfterViewInit() {
|
|
75
|
-
if (this.showTicks) {
|
|
76
|
-
this.calculateTickPositions();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
input(valueEvent: Event) {
|
|
81
|
-
if (valueEvent.target instanceof HTMLInputElement) {
|
|
82
|
-
this.onInput.emit(this.getValue(valueEvent.target));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
change(valueEvent: Event) {
|
|
87
|
-
if (valueEvent.target instanceof HTMLInputElement) {
|
|
88
|
-
this.onChange.emit(this.getValue(valueEvent.target));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
calculateThumbPosition(): string {
|
|
93
|
-
const percent = ((this.value - this.min) * 100) / (this.max - this.min);
|
|
94
|
-
return isNaN(percent) ? '0%' : `${percent}%`;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
calculateFilledWidth(): string {
|
|
98
|
-
const percent = ((this.value - this.min) / (this.max - this.min)) * 100;
|
|
99
|
-
return isNaN(percent) ? '0%' : `${percent}%`;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
private getValue(value: HTMLInputElement) {
|
|
103
|
-
const newValue = value.valueAsNumber;
|
|
104
|
-
const steppedValue = Math.round(newValue / this.step) * this.step;
|
|
105
|
-
this.value = Math.min(Math.max(steppedValue, this.min), this.max);
|
|
106
|
-
|
|
107
|
-
return newValue;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
private calculateTickPositions() {
|
|
111
|
-
const numberOfTicks = (this.max - this.min) / this.step;
|
|
112
|
-
|
|
113
|
-
this.tickPositions = Array.from(
|
|
114
|
-
{ length: numberOfTicks + 1 },
|
|
115
|
-
(_, index) => {
|
|
116
|
-
const percent = (index / numberOfTicks) * 100;
|
|
117
|
-
|
|
118
|
-
return isNaN(percent) ? '0%' : `${percent}%`;
|
|
119
|
-
},
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
}
|
package/src/lib/styles/base.scss
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// SourceUI Global Styles: base.scss
|
|
2
|
-
// TODO: get rid of tags, subscitute them with classes
|
|
3
|
-
|
|
4
|
-
.section_3dsourcecom,
|
|
5
|
-
.cdk-overlay-container {
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
|
|
9
|
-
*,
|
|
10
|
-
*::before,
|
|
11
|
-
*::after {
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
-webkit-tap-highlight-color: transparent;
|
|
14
|
-
font-family: var(--src-font-family-sans);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
code {
|
|
18
|
-
font-family: monospace;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// NEVER use user-select: none for ALL page!
|
|
22
|
-
// * {
|
|
23
|
-
// user-select: none;
|
|
24
|
-
// }
|
|
25
|
-
button {
|
|
26
|
-
// safari adds unwanted margin-top and margin-bottom
|
|
27
|
-
margin: 0;
|
|
28
|
-
font-family: var(--src-font-family-sans);
|
|
29
|
-
border: none;
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
|
|
32
|
-
&:focus {
|
|
33
|
-
outline: none;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.src-select,
|
|
38
|
-
select,
|
|
39
|
-
.src-input,
|
|
40
|
-
input,
|
|
41
|
-
.src-textarea,
|
|
42
|
-
textarea {
|
|
43
|
-
// safari adds unwanted margin-top and margin-bottom
|
|
44
|
-
margin: 0;
|
|
45
|
-
|
|
46
|
-
&:focus-visible,
|
|
47
|
-
&:focus {
|
|
48
|
-
outline: none;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// accent-color property is available only for some inputs and progress
|
|
53
|
-
input[type='checkbox'],
|
|
54
|
-
input[type='radio'],
|
|
55
|
-
input [type='range'],
|
|
56
|
-
progress {
|
|
57
|
-
accent-color: var(--src-color-brand-500);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
table,
|
|
61
|
-
.src-table {
|
|
62
|
-
border-spacing: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
p {
|
|
66
|
-
margin-top: 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
// source-button.component.scss
|
|
2
|
-
.src-button {
|
|
3
|
-
--srcButtonBgColor: var(--src-color-bg-default, #fff);
|
|
4
|
-
--srcButtonBgHoverColor: var(--src-color-bg-default-hover, #f1f2f3);
|
|
5
|
-
--srcButtonBorderRadius: var(--src-br-small, 4px);
|
|
6
|
-
--srcButtonBoxShadow:
|
|
7
|
-
0px 0px 0px 1px var(--src-color-border-strong, #abb2be) inset,
|
|
8
|
-
0px 1px 0px 0px rgba(0, 0, 0, 0.05);
|
|
9
|
-
--srcButtonFontColor: var(--src-color-text-default);
|
|
10
|
-
--srcButtonFontSize: var(--src-fs-base, 16px);
|
|
11
|
-
--srcButtonFontWeight: var(--src-fw-medium, 500);
|
|
12
|
-
--srcButtonLineHeight: var(--src-lh-base, 20px);
|
|
13
|
-
--srcButtonPaddings: 8px 16px;
|
|
14
|
-
--srcButtonTextTransform: default;
|
|
15
|
-
--srcButtonWidth: auto;
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: var(--srcButtonWidth);
|
|
20
|
-
padding: var(--srcButtonPaddings);
|
|
21
|
-
font-weight: var(--srcButtonFontWeight);
|
|
22
|
-
font-size: var(--srcButtonFontSize);
|
|
23
|
-
font-style: normal;
|
|
24
|
-
line-height: var(--srcButtonLineHeight);
|
|
25
|
-
text-align: center;
|
|
26
|
-
color: var(--srcButtonFontColor);
|
|
27
|
-
text-transform: var(--srcButtonTextTransform);
|
|
28
|
-
letter-spacing: 0;
|
|
29
|
-
white-space: nowrap;
|
|
30
|
-
background-color: var(--srcButtonBgColor);
|
|
31
|
-
border: none;
|
|
32
|
-
border-radius: var(--srcButtonBorderRadius);
|
|
33
|
-
box-shadow: var(--srcButtonBoxShadow);
|
|
34
|
-
cursor: pointer;
|
|
35
|
-
|
|
36
|
-
& > div,
|
|
37
|
-
& > span {
|
|
38
|
-
display: flex;
|
|
39
|
-
justify-content: center;
|
|
40
|
-
align-items: center;
|
|
41
|
-
width: auto;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:active,
|
|
45
|
-
&--pressed {
|
|
46
|
-
background-color: var(--srcButtonBgHoverColor);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@media (pointer: fine) {
|
|
50
|
-
&:hover,
|
|
51
|
-
&:focus-visible {
|
|
52
|
-
background-color: var(--srcButtonBgHoverColor);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:disabled,
|
|
57
|
-
&[disabled],
|
|
58
|
-
&.disabled {
|
|
59
|
-
cursor: default;
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// size
|
|
64
|
-
&--slim {
|
|
65
|
-
--srcButtonPaddings: 6px 12px;
|
|
66
|
-
|
|
67
|
-
&.src-button--icon-prefix {
|
|
68
|
-
--srcButtonPaddings: 6px 12px 6px 8px;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&--medium {
|
|
73
|
-
--srcButtonPaddings: 8px 16px;
|
|
74
|
-
|
|
75
|
-
&.src-button--icon-prefix {
|
|
76
|
-
--srcButtonPaddings: 8px 16px 8px 12px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&--large {
|
|
81
|
-
--srcButtonPaddings: 12px 24px;
|
|
82
|
-
|
|
83
|
-
&.src-button--icon-prefix {
|
|
84
|
-
--srcButtonPaddings: 12px 24px 12px 20px;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&--primary {
|
|
89
|
-
--srcButtonBgColor: var(--src-color-bg-primary);
|
|
90
|
-
--srcButtonBgHoverColor: var(--src-color-bg-primary-hover);
|
|
91
|
-
--srcButtonBoxShadow:
|
|
92
|
-
0px 1px 0px 0px rgba(0, 0, 0, 0.08),
|
|
93
|
-
0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset;
|
|
94
|
-
--srcButtonFontColor: var(--src-color-text-inverse, #fff);
|
|
95
|
-
|
|
96
|
-
&:disabled,
|
|
97
|
-
&[disabled] {
|
|
98
|
-
--srcButtonBgColor: var(--src-color-bg-primary-disabled);
|
|
99
|
-
--srcButtonBoxShadow: none;
|
|
100
|
-
--srcButtonFontColor: var(--src-color-text-default-disabled);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&--secondary {
|
|
105
|
-
--srcButtonFontColor: var(--src-color-text-default);
|
|
106
|
-
|
|
107
|
-
&:disabled,
|
|
108
|
-
&[disabled] {
|
|
109
|
-
--srcButtonBgColor: var(--src-color-bg-default-disabled);
|
|
110
|
-
--srcButtonBoxShadow: none;
|
|
111
|
-
--srcButtonFontColor: var(--src-color-text-default-disabled);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&--destructive {
|
|
116
|
-
--srcButtonBgColor: var(--src-color-bg-critical);
|
|
117
|
-
--srcButtonBgHoverColor: var(--src-color-bg-critical-strong);
|
|
118
|
-
--srcButtonBoxShadow:
|
|
119
|
-
0px 1px 0px 0px rgba(0, 0, 0, 0.08),
|
|
120
|
-
0px -1px 0px 0px rgba(0, 0, 0, 0.2) inset;
|
|
121
|
-
--srcButtonFontColor: var(--src-color-text-inverse, #fff);
|
|
122
|
-
|
|
123
|
-
&:disabled,
|
|
124
|
-
&[disabled] {
|
|
125
|
-
--srcButtonBgColor: var(--src-color-bg-primary-disabled);
|
|
126
|
-
--srcButtonBoxShadow: none;
|
|
127
|
-
--srcButtonFontColor: var(--src-color-text-default-disabled);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&--plain {
|
|
132
|
-
padding: 0;
|
|
133
|
-
--srcButtonBgColor: transparent;
|
|
134
|
-
--srcButtonBgHoverColor: transparent;
|
|
135
|
-
--srcButtonBoxShadow: none;
|
|
136
|
-
|
|
137
|
-
&:active,
|
|
138
|
-
&.src-button--pressed {
|
|
139
|
-
text-decoration: underline;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@media (pointer: fine) {
|
|
143
|
-
&:hover,
|
|
144
|
-
&:focus {
|
|
145
|
-
text-decoration: underline;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
&:disabled,
|
|
149
|
-
&[disabled] {
|
|
150
|
-
--srcButtonFontColor: var(--src-color-text-default-disabled);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
//colorScheme
|
|
154
|
-
&.src-button--primary {
|
|
155
|
-
--srcButtonFontColor: var(--src-color-text-primary);
|
|
156
|
-
|
|
157
|
-
&:active,
|
|
158
|
-
&--pressed {
|
|
159
|
-
--srcButtonFontColor: var(--src-color-text-primary);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@media (pointer: fine) {
|
|
163
|
-
&:hover,
|
|
164
|
-
&:focus {
|
|
165
|
-
--srcButtonFontColor: var(--src-color-text-primary);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
&.src-button--destructive {
|
|
171
|
-
--srcButtonFontColor: var(--src-color-text-critical);
|
|
172
|
-
|
|
173
|
-
&:active,
|
|
174
|
-
&--pressed {
|
|
175
|
-
--srcButtonFontColor: var(--src-color-text-critical);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
@media (pointer: fine) {
|
|
179
|
-
&:hover,
|
|
180
|
-
&:focus {
|
|
181
|
-
--srcButtonFontColor: var(--src-color-text-critical);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&.src-button--secondary {
|
|
187
|
-
--srcButtonFontColor: var(--src-color-text-default);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&.src-button--primary,
|
|
191
|
-
&.src-button--destructive,
|
|
192
|
-
&.src-button--secondary {
|
|
193
|
-
&:disabled,
|
|
194
|
-
&[disabled] {
|
|
195
|
-
--srcButtonBgColor: transparent;
|
|
196
|
-
--srcButtonFontColor: var(--src-color-text-default-disabled);
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// full-width
|
|
202
|
-
&--full-width {
|
|
203
|
-
--srcButtonWidth: 100%;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&--icon-button {
|
|
207
|
-
--srcButtonIconColor: var(--src-color-icon-default);
|
|
208
|
-
|
|
209
|
-
.icon {
|
|
210
|
-
flex-shrink: 0;
|
|
211
|
-
color: var(--srcButtonIconColor);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
&.src-button--primary,
|
|
215
|
-
&.src-button--destructive {
|
|
216
|
-
--srcButtonIconColor: var(--src-color-text-inverse);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
&.src-button--secondary {
|
|
220
|
-
--srcButtonIconColor: var(--src-color-icon-default);
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&.src-button--slim {
|
|
224
|
-
--srcButtonPaddings: 6px;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&.src-button--medium {
|
|
228
|
-
--srcButtonPaddings: 8px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
&.src-button--large {
|
|
232
|
-
--srcButtonPaddings: 12px;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
.src-input {
|
|
2
|
-
--srcInputFontSize: var(--src-fs-base);
|
|
3
|
-
--srcInputLineHeight: var(--src-lh-base);
|
|
4
|
-
--srcInputFontColor: var(--src-color-text-default);
|
|
5
|
-
--srcInputFieldBg: var(--src-color-bg-default);
|
|
6
|
-
--srcInputFieldBorderColor: var(--src-color-border-strong);
|
|
7
|
-
--srcInputHeight: 36px;
|
|
8
|
-
--srcInputBorderRadius: var(--src-br-small);
|
|
9
|
-
--srcInputBoxShadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
|
|
10
|
-
// Focus ring it's a multiple box-shadow
|
|
11
|
-
--srcInputFocusRing:
|
|
12
|
-
0 0 0 1px #fff, 0 0 0 3px var(--src-color-border-primary);
|
|
13
|
-
position: relative;
|
|
14
|
-
|
|
15
|
-
height: var(--srcInputHeight);
|
|
16
|
-
border-radius: var(--srcInputBorderRadius);
|
|
17
|
-
font-size: var(--srcInputFontSize);
|
|
18
|
-
line-height: var(--srcInputLineHeight);
|
|
19
|
-
color: var(--srcInputFontColor);
|
|
20
|
-
padding: 7px 12px;
|
|
21
|
-
font-family: var(--src-font-family-sans);
|
|
22
|
-
font-style: normal;
|
|
23
|
-
font-weight: var(--src-fw-regular, 400);
|
|
24
|
-
background-color: var(--srcInputFieldBg);
|
|
25
|
-
border: 1px solid var(--srcInputFieldBorderColor);
|
|
26
|
-
box-shadow: var(--srcInputBoxShadow);
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
|
|
30
|
-
width: 100%;
|
|
31
|
-
&[type='number'] {
|
|
32
|
-
-moz-appearance: textfield;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Remove default background for autofilled inputs
|
|
36
|
-
&:-webkit-autofill,
|
|
37
|
-
&:-webkit-autofill:focus {
|
|
38
|
-
transition:
|
|
39
|
-
background-color 0s 600000s,
|
|
40
|
-
color 0s 600000s;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&::-webkit-outer-spin-button,
|
|
44
|
-
&::-webkit-inner-spin-button {
|
|
45
|
-
-webkit-appearance: none;
|
|
46
|
-
margin: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:focus {
|
|
50
|
-
outline: none;
|
|
51
|
-
box-shadow: var(--srcInputFocusRing);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&[disabled],
|
|
55
|
-
&:disabled {
|
|
56
|
-
--srcInputFieldBg: var(--src-color-bg-default-disabled);
|
|
57
|
-
--srcInputFieldBorderColor: var(--src-color-border-strong-disabled);
|
|
58
|
-
--srcInputBoxShadow: none;
|
|
59
|
-
color: var(--src-color-text-default-disabled);
|
|
60
|
-
|
|
61
|
-
pointer-events: none;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.src-input--compact {
|
|
66
|
-
--srcInputHeight: 32px;
|
|
67
|
-
--srcInputFontSize: var(--src-fs-small);
|
|
68
|
-
--srcInputLineHeight: var(--src-lh-small);
|
|
69
|
-
}
|
|
70
|
-
/* Error State */
|
|
71
|
-
.src-input--has-error {
|
|
72
|
-
--srcInputFieldBg: var(--src-color-bg-critical-subdued);
|
|
73
|
-
--srcInputFieldBorderColor: var(--src-color-border-critical-strong);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Disabled State */
|
|
77
|
-
.src-input--disabled {
|
|
78
|
-
--srcInputFieldBg: var(--src-color-bg-default-disabled);
|
|
79
|
-
--srcInputFieldBorderColor: var(--src-color-border-strong-disabled);
|
|
80
|
-
--srcInputBoxShadow: none;
|
|
81
|
-
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
}
|