@3dsource/source-ui-native 1.0.2 → 1.0.5
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 +196 -463
- package/fesm2022/3dsource-source-ui-native.mjs.map +1 -1
- package/lib/components/source-badge/components/source-badge.component.d.ts +12 -23
- package/lib/components/source-badge/constants/sourceBadgeSize.d.ts +1 -1
- package/lib/components/source-badge/constants/sourceBadgeType.d.ts +1 -1
- package/lib/components/source-banner/components/source-banner.component.d.ts +2 -2
- package/lib/components/source-banner/constants/sourceBannerType.d.ts +1 -1
- package/lib/components/source-button/components/source-button.component.d.ts +20 -77
- package/lib/components/source-button/constants/sourceButtonAppearance.d.ts +1 -1
- package/lib/components/source-button/constants/sourceButtonColorScheme.d.ts +1 -1
- package/lib/components/source-button/constants/sourceButtonSize.d.ts +1 -1
- package/lib/components/source-button/constants/sourceButtonType.d.ts +1 -1
- package/lib/components/source-button/interfaces/sourceButton.interface.d.ts +5 -6
- package/lib/components/source-icon-button/components/source-icon-button.component.d.ts +8 -31
- package/lib/components/source-icon-button/constants/sourceIconButtonShape.d.ts +1 -1
- package/lib/components/source-icon-button/constants/sourceIconButtonSize.d.ts +1 -1
- package/lib/components/source-icon-button/constants/sourceIconButtonType.d.ts +1 -1
- package/lib/components/source-loading/components/source-loading.component.d.ts +13 -32
- package/lib/components/source-loading/constants/sourceLoadingLineCap.d.ts +1 -1
- package/lib/components/source-slider/components/source-slider.component.d.ts +18 -56
- package/package.json +1 -1
- package/styles/base.scss +68 -0
- package/styles/elements/_src-button.scss +235 -0
- package/styles/elements/_src-checkbox.scss +52 -0
- package/styles/elements/_src-form.scss +22 -0
- package/styles/elements/_src-input.scss +82 -0
- package/styles/elements/_src-label.scss +23 -0
- package/styles/elements/_src-list.scss +82 -0
- package/styles/elements/_src-radio.scss +49 -0
- package/styles/elements/_src-select.scss +74 -0
- package/styles/elements/_src-textarea.scss +70 -0
- package/styles/elements/elements.scss +9 -0
- package/styles/fonts/Inter-VariableFont_slnt,wght.woff2 +0 -0
- package/styles/fonts.scss +18 -0
- package/styles/typography.scss +90 -0
- package/styles/utils.scss +40 -0
- package/styles/variables/_borders.scss +14 -0
- package/styles/variables/_colors-aliases.scss +39 -0
- package/styles/variables/_colors.scss +64 -0
- package/styles/variables/_form-aliases.scss +16 -0
- package/styles/variables/_shadows.scss +9 -0
- package/styles/variables/_typography.scss +32 -0
- package/styles/variables/index.scss +6 -0
- /package/styles/{source.ui.scss → source.ui.native.scss} +0 -0
|
@@ -3,4 +3,4 @@ export declare const SourceIconButtonType: {
|
|
|
3
3
|
readonly SUBMIT: "submit";
|
|
4
4
|
readonly RESET: "reset";
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type SourceIconButtonTypeKeys = (typeof SourceIconButtonType)[keyof typeof SourceIconButtonType];
|
|
@@ -1,37 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SourceLoadingLineCapKeys } from '../constants/sourceLoadingLineCap';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SourceLoadingComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
progress?: number | null;
|
|
12
|
-
/**
|
|
13
|
-
* The stroke-linecap attribute is a presentation attribute defining the shape to be used at the end of open subpaths when they are stroked.
|
|
14
|
-
*/
|
|
15
|
-
lineCap: SourceLoadingLineCapValues;
|
|
16
|
-
/**
|
|
17
|
-
* Color of the strokes
|
|
18
|
-
*/
|
|
19
|
-
backgroundStrokeColor: string;
|
|
20
|
-
progressStrokeColor: string;
|
|
21
|
-
/**
|
|
22
|
-
* Width of the line
|
|
23
|
-
*/
|
|
24
|
-
strokeWidth: number;
|
|
25
|
-
/**
|
|
26
|
-
* Test ID for the component. Provide descriptive uniq id in kebab-case.
|
|
27
|
-
*/
|
|
4
|
+
size: import("@angular/core").InputSignal<number>;
|
|
5
|
+
progress: import("@angular/core").InputSignal<number | null>;
|
|
6
|
+
lineCap: import("@angular/core").InputSignal<SourceLoadingLineCapKeys>;
|
|
7
|
+
backgroundStrokeColor: import("@angular/core").InputSignal<string>;
|
|
8
|
+
progressStrokeColor: import("@angular/core").InputSignal<string>;
|
|
9
|
+
strokeWidth: import("@angular/core").InputSignal<number>;
|
|
28
10
|
testID: import("@angular/core").InputSignal<string>;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
getPercentage(): number;
|
|
11
|
+
classes: import("@angular/core").Signal<string[]>;
|
|
12
|
+
calculateRadius: import("@angular/core").Signal<number>;
|
|
13
|
+
circumference: import("@angular/core").Signal<number>;
|
|
14
|
+
viewBox: import("@angular/core").Signal<string>;
|
|
15
|
+
percentage: import("@angular/core").Signal<number>;
|
|
35
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SourceLoadingComponent, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SourceLoadingComponent, "src-loading", never, { "size": { "alias": "size"; "required": false; }; "progress": { "alias": "progress"; "required": false; }; "lineCap": { "alias": "lineCap"; "required": false; }; "backgroundStrokeColor": { "alias": "backgroundStrokeColor"; "required": false; }; "progressStrokeColor": { "alias": "progressStrokeColor"; "required": false; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; }; "testID": { "alias": "data-testid"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SourceLoadingComponent, "src-loading", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "progress": { "alias": "progress"; "required": false; "isSignal": true; }; "lineCap": { "alias": "lineCap"; "required": false; "isSignal": true; }; "backgroundStrokeColor": { "alias": "backgroundStrokeColor"; "required": false; "isSignal": true; }; "progressStrokeColor": { "alias": "progressStrokeColor"; "required": false; "isSignal": true; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "testID": { "alias": "data-testid"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
37
18
|
}
|
|
@@ -3,4 +3,4 @@ export declare const SourceLoadingLineCap: {
|
|
|
3
3
|
readonly SQUARE: "square";
|
|
4
4
|
readonly BUTT: "butt";
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type SourceLoadingLineCapKeys = (typeof SourceLoadingLineCap)[keyof typeof SourceLoadingLineCap];
|
|
@@ -1,63 +1,25 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter } from '@angular/core';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class SourceSliderComponent
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
max: number;
|
|
16
|
-
/**
|
|
17
|
-
* The size of the thumb
|
|
18
|
-
*/
|
|
19
|
-
thumbSize: number;
|
|
20
|
-
/**
|
|
21
|
-
* The height of the visual track. Height of the input won't be affected
|
|
22
|
-
*/
|
|
23
|
-
trackHeight: number;
|
|
24
|
-
/**
|
|
25
|
-
* The step length of the slider
|
|
26
|
-
*/
|
|
27
|
-
step: number;
|
|
28
|
-
/**
|
|
29
|
-
* Whether to show the ticks on each step
|
|
30
|
-
*/
|
|
31
|
-
showTicks: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* If slider is disabled
|
|
34
|
-
*/
|
|
35
|
-
isDisabled: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Slider orientation - WIP
|
|
38
|
-
*/
|
|
39
|
-
orientation: 'horizontal' | 'vertical';
|
|
40
|
-
tickPositions: string[];
|
|
41
|
-
/**
|
|
42
|
-
* The value of the slider
|
|
43
|
-
*/
|
|
44
|
-
value: number;
|
|
45
|
-
/**
|
|
46
|
-
* Test ID for the component. Provide descriptive uniq id in kebab-case.
|
|
47
|
-
*/
|
|
2
|
+
export declare class SourceSliderComponent {
|
|
3
|
+
id: import("@angular/core").InputSignal<string | undefined>;
|
|
4
|
+
value: import("@angular/core").InputSignal<number>;
|
|
5
|
+
sliderValue: import("@angular/core").WritableSignal<number>;
|
|
6
|
+
min: import("@angular/core").InputSignal<number>;
|
|
7
|
+
max: import("@angular/core").InputSignal<number>;
|
|
8
|
+
thumbSize: import("@angular/core").InputSignal<number>;
|
|
9
|
+
trackHeight: import("@angular/core").InputSignal<number>;
|
|
10
|
+
step: import("@angular/core").InputSignal<number>;
|
|
11
|
+
showTicks: import("@angular/core").InputSignal<boolean>;
|
|
12
|
+
isDisabled: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
orientation: import("@angular/core").InputSignal<"horizontal" | "vertical">;
|
|
48
14
|
testID: import("@angular/core").InputSignal<string>;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
ngAfterViewInit(): void;
|
|
15
|
+
onChange: import("@angular/core").OutputEmitterRef<number>;
|
|
16
|
+
onInput: import("@angular/core").OutputEmitterRef<number>;
|
|
17
|
+
tickPositions: import("@angular/core").Signal<string[]>;
|
|
18
|
+
thumbPosition: import("@angular/core").Signal<string>;
|
|
19
|
+
filledWidth: import("@angular/core").Signal<string>;
|
|
55
20
|
input(valueEvent: Event): void;
|
|
56
21
|
change(valueEvent: Event): void;
|
|
57
|
-
calculateThumbPosition(): string;
|
|
58
|
-
calculateFilledWidth(): string;
|
|
59
22
|
private getValue;
|
|
60
|
-
private calculateTickPositions;
|
|
61
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<SourceSliderComponent, never>;
|
|
62
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SourceSliderComponent, "src-slider", never, { "id": { "alias": "id"; "required": false; }; "
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SourceSliderComponent, "src-slider", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "min": { "alias": "min"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": true; "isSignal": true; }; "thumbSize": { "alias": "thumbSize"; "required": false; "isSignal": true; }; "trackHeight": { "alias": "trackHeight"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "testID": { "alias": "data-testid"; "required": false; "isSignal": true; }; }, { "onChange": "onChange"; "onInput": "onInput"; }, never, ["[srcIconThumb]"], true, never>;
|
|
63
25
|
}
|
package/package.json
CHANGED
package/styles/base.scss
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.src-checkbox {
|
|
2
|
+
--srcCheckboxBorderColor: var(--src-color-border-strong);
|
|
3
|
+
--srcCheckboxSize: 20px;
|
|
4
|
+
--srcCheckboxBorderWidth: 2px;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 4px;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
|
|
10
|
+
input[type='checkbox'] {
|
|
11
|
+
position: relative;
|
|
12
|
+
appearance: none;
|
|
13
|
+
width: var(--srcCheckboxSize);
|
|
14
|
+
height: var(--srcCheckboxSize);
|
|
15
|
+
padding: 2px;
|
|
16
|
+
border-radius: var(--src-br-small);
|
|
17
|
+
background-color: #fff;
|
|
18
|
+
border: var(--srcCheckboxBorderWidth) solid var(--srcCheckboxBorderColor);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
--srcCheckboxBorderColor: var(--src-color-border-strong-hover);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:checked {
|
|
26
|
+
background-color: #007bff;
|
|
27
|
+
--srcCheckboxBorderColor: #007bff;
|
|
28
|
+
|
|
29
|
+
&::after {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
left: 0;
|
|
34
|
+
width: calc(var(--srcCheckboxSize) - 2 * var(--srcCheckboxBorderWidth));
|
|
35
|
+
height: calc(
|
|
36
|
+
var(--srcCheckboxSize) - 2 * var(--srcCheckboxBorderWidth)
|
|
37
|
+
);
|
|
38
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 8'%3E%3Cpath fill='%23fff' fill-rule='evenodd' d='M9.72.24c.35.33.37.9.06 1.27L4.4 7.71A.83.83 0 0 1 3.8 8a.83.83 0 0 1-.62-.26L.25 4.64a.94.94 0 0 1 0-1.28.82.82 0 0 1 1.2 0l2.3 2.43L8.52.3a.82.82 0 0 1 1.2-.05Z' clip-rule='evenodd'/%3E%3C/svg%3E");
|
|
39
|
+
background-size: 10px 8px;
|
|
40
|
+
background-position: center;
|
|
41
|
+
background-repeat: no-repeat;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus {
|
|
46
|
+
outline: none;
|
|
47
|
+
box-shadow:
|
|
48
|
+
0 0 0 1px #fff,
|
|
49
|
+
0 0 0 3px var(--src-color-border-primary);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.src-form {
|
|
2
|
+
--srcFormRowGap: 16px;
|
|
3
|
+
--srcFormItemsGap: 12px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: var(--srcFormRowGap);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.src-form__row {
|
|
11
|
+
display: grid;
|
|
12
|
+
gap: var(--srcFormItemsGap);
|
|
13
|
+
grid-template-columns: minmax(0, 1fr);
|
|
14
|
+
|
|
15
|
+
&--double {
|
|
16
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&--triple {
|
|
20
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.src-input {
|
|
2
|
+
--srcInputFontSize: var(--srcFormElementFontSize);
|
|
3
|
+
--srcInputLineHeight: var(--srcFormElementLineHeight);
|
|
4
|
+
--srcInputFontColor: var(--srcFormElementFontColor);
|
|
5
|
+
--srcInputFieldBg: var(--srcFormElementBg);
|
|
6
|
+
--srcInputFieldBorderColor: var(--srcFormElementBorderColor);
|
|
7
|
+
--srcInputHeight: var(--srcFormElementHeight);
|
|
8
|
+
--srcInputBorderRadius: var(--srcFormElementBorderRadius);
|
|
9
|
+
--srcInputBoxShadow: var(--srcFormElementBoxShadow);
|
|
10
|
+
// Focus ring it's a multiple box-shadow
|
|
11
|
+
--srcInputFocusRing: var(--srcFormElementFocusRing);
|
|
12
|
+
position: relative;
|
|
13
|
+
|
|
14
|
+
height: var(--srcInputHeight);
|
|
15
|
+
border-radius: var(--srcInputBorderRadius);
|
|
16
|
+
font-size: var(--srcInputFontSize);
|
|
17
|
+
line-height: var(--srcInputLineHeight);
|
|
18
|
+
color: var(--srcInputFontColor);
|
|
19
|
+
padding: 7px 12px;
|
|
20
|
+
font-family: var(--src-font-family-sans);
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: var(--src-fw-regular, 400);
|
|
23
|
+
background-color: var(--srcInputFieldBg);
|
|
24
|
+
border: 1px solid var(--srcInputFieldBorderColor);
|
|
25
|
+
box-shadow: var(--srcInputBoxShadow);
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
|
|
29
|
+
width: 100%;
|
|
30
|
+
&[type='number'] {
|
|
31
|
+
-moz-appearance: textfield;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Remove default background for autofilled inputs
|
|
35
|
+
&:-webkit-autofill,
|
|
36
|
+
&:-webkit-autofill:focus {
|
|
37
|
+
transition:
|
|
38
|
+
background-color 0s 600000s,
|
|
39
|
+
color 0s 600000s;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&::-webkit-outer-spin-button,
|
|
43
|
+
&::-webkit-inner-spin-button {
|
|
44
|
+
-webkit-appearance: none;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:focus {
|
|
49
|
+
outline: none;
|
|
50
|
+
box-shadow: var(--srcFormElementFocusRing);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[disabled],
|
|
54
|
+
&:disabled {
|
|
55
|
+
--srcInputFieldBg: var(--srcFormElementDisabledBg);
|
|
56
|
+
--srcInputFieldBorderColor: var(--srcFormElementDisabledBorderColor);
|
|
57
|
+
--srcInputBoxShadow: none;
|
|
58
|
+
color: var(--src-color-text-default-disabled);
|
|
59
|
+
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.src-input--compact {
|
|
65
|
+
--srcInputHeight: 32px;
|
|
66
|
+
--srcInputFontSize: var(--src-fs-small);
|
|
67
|
+
--srcInputLineHeight: var(--src-lh-small);
|
|
68
|
+
}
|
|
69
|
+
/* Error State */
|
|
70
|
+
.src-input--has-error {
|
|
71
|
+
--srcInputFieldBg: var(--src-color-bg-critical-subdued);
|
|
72
|
+
--srcInputFieldBorderColor: var(--src-color-border-critical-strong);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Disabled State */
|
|
76
|
+
.src-input--disabled {
|
|
77
|
+
--srcInputFieldBg: var(--srcFormElementDisabledBg);
|
|
78
|
+
--srcInputFieldBorderColor: var(--srcFormElementDisabledBorderColor);
|
|
79
|
+
--srcInputBoxShadow: none;
|
|
80
|
+
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.src-label {
|
|
2
|
+
--srcLabelFontSize: var(--src-fs-base);
|
|
3
|
+
--srcLabelLineHeight: var(--src-lh-base);
|
|
4
|
+
--srcLabelFontWeight: 500;
|
|
5
|
+
--srcLabelColor: var(--src-color-text-default);
|
|
6
|
+
--srcLabelMarginBottom: 4px;
|
|
7
|
+
display: block;
|
|
8
|
+
font-size: var(--srcLabelFontSize);
|
|
9
|
+
line-height: var(--srcLabelLineHeight);
|
|
10
|
+
font-family: var(--src-font-family-sans);
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-weight: var(--srcLabelFontWeight);
|
|
13
|
+
color: var(--srcLabelColor);
|
|
14
|
+
margin-bottom: var(--srcLabelMarginBottom);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.src-radio,
|
|
18
|
+
.src-checkbox {
|
|
19
|
+
.src-label {
|
|
20
|
+
--srcLabelMarginBottom: 0;
|
|
21
|
+
--srcLabelFontWeight: 400;
|
|
22
|
+
}
|
|
23
|
+
}
|