@3dsource/source-ui-native 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dsource/source-ui-native",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "dependencies": {
@@ -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
+ }
@@ -0,0 +1,82 @@
1
+ .src-list {
2
+ display: block;
3
+ width: 100%;
4
+ margin: 0;
5
+ list-style: none;
6
+ padding: 8px;
7
+
8
+ .src-list__item {
9
+ display: block;
10
+ margin-bottom: 4px;
11
+ }
12
+
13
+ &--compact {
14
+ padding: 0;
15
+
16
+ .src-list__item {
17
+ margin-bottom: 0;
18
+ }
19
+ }
20
+ }
21
+
22
+ // source-list-item.component.scss
23
+ .src-list__item {
24
+ --srcListItemBgColor: var(--src-color-bg-default);
25
+ --srcListItemBgHoverColor: var(--src-color-bg-default-hover);
26
+ --srcListItemBorderRadius: var(--src-br-small);
27
+ --srcListItemBoxShadow: none;
28
+ --srcListItemFontColor: var(--src-color-text-default);
29
+ --srcListItemFontSize: var(--src-fs-base);
30
+ --srcListItemFontWeight: var(--src-fw-regular, 400);
31
+ --srcListItemLineHeight: var(--src-lh-base);
32
+ --srcListItemPaddings: 8px;
33
+ --srcListItemTextTransform: default;
34
+ --srcListItemIconColor: var(--src-color-icon-default);
35
+ position: relative;
36
+ align-items: flex-start;
37
+ width: 100%;
38
+ padding: var(--srcListItemPaddings);
39
+ font-weight: var(--srcListItemFontWeight);
40
+ display: inline-flex;
41
+ font-size: var(--srcListItemFontSize);
42
+ line-height: var(--srcListItemLineHeight);
43
+ text-align: left;
44
+ color: var(--srcListItemFontColor);
45
+ text-transform: var(--srcListItemTextTransform);
46
+ letter-spacing: 0;
47
+ white-space: normal;
48
+ background-color: var(--srcListItemBgColor);
49
+ border-radius: var(--srcListItemBorderRadius);
50
+ cursor: pointer;
51
+ word-break: break-word;
52
+
53
+ @media (hover: hover) and (pointer: fine) {
54
+ &:hover,
55
+ &:focus-visible {
56
+ background-color: var(--srcListItemBgHoverColor);
57
+ }
58
+ }
59
+
60
+ &:disabled,
61
+ &[disabled],
62
+ &.disabled,
63
+ &.src-list__item--disabled {
64
+ cursor: default;
65
+ pointer-events: none;
66
+ --srcListItemFontColor: var(--src-color-text-default-disabled);
67
+ --srcListItemIconColor: var(--src-color-icon-default-disabled);
68
+ background-color: var(--src-color-bg-default);
69
+ }
70
+ }
71
+
72
+ .src-list__item--selected {
73
+ --srcListItemBgColor: var(--src-color-bg-default-active);
74
+ --srcListItemIconColor: var(--src-color-icon-primary);
75
+
76
+ @media (hover: hover) and (pointer: fine) {
77
+ &:hover,
78
+ &:focus-visible {
79
+ --srcListItemBgHoverColor: var(--src-color-bg-default-active);
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,49 @@
1
+ .src-radio-group {
2
+ --srcRadioGroupGap: 6px;
3
+
4
+ --srcRadioSize: 20px;
5
+ --srcRadioBgColor: var(--src-color-bg-default);
6
+ --srcRadioBorderColor: var(--src-color-border-strong);
7
+ --srcRadioBorderWidth: 2px;
8
+ --srcRadioFocusRing: var(--srcFormElementFocusRing);
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: var(--srcRadioGroupGap);
12
+
13
+ &--horizontal {
14
+ display: flex;
15
+ flex-direction: row;
16
+ flex-wrap: wrap;
17
+ gap: var(--srcRadioGroupGap);
18
+ }
19
+ }
20
+ .src-radio {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 4px;
24
+ cursor: pointer;
25
+ }
26
+ input[type='radio'] {
27
+ position: relative;
28
+ appearance: none;
29
+ width: var(--srcRadioSize);
30
+ height: var(--srcRadioSize);
31
+ border-radius: 50%;
32
+ background-color: #fff;
33
+ border: var(--srcRadioBorderWidth) solid var(--srcRadioBorderColor);
34
+ cursor: pointer;
35
+
36
+ &:hover {
37
+ --srcRadioBorderColor: var(--src-color-border-strong-hover);
38
+ }
39
+
40
+ &:checked {
41
+ --srcRadioBorderColor: var(--src-color-bg-primary);
42
+ box-shadow: inset 0 0 0 3px var(--srcRadioBorderColor);
43
+ }
44
+
45
+ &[disabled] {
46
+ --srcRadioBorderColor: var(--src-color-border-strong-disabled);
47
+ // --srcRadioCheckedBgColor: var(--color-text-inverse);
48
+ }
49
+ }
@@ -0,0 +1,74 @@
1
+ .src-select {
2
+ --srcSelectFontSize: var(--srcFormElementFontSize);
3
+ --srcSelectLineHeight: var(--srcFormElementLineHeight);
4
+ --srcSelectFontColor: var(--srcFormElementFontColor);
5
+ --srcSelectFieldBg: var(--srcFormElementBg);
6
+ --srcSelectFieldBorderColor: var(--srcFormElementBorderColor);
7
+ --srcSelectHeight: var(--srcFormElementHeight);
8
+ --srcSelectBorderRadius: var(--srcFormElementBorderRadius);
9
+ --srcSelectBoxShadow: var(--srcFormElementBoxShadow);
10
+ // Focus ring it's a multiple box-shadow
11
+ --srcSelectFocusRing: var(--srcFormElementFocusRing);
12
+
13
+ -webkit-appearance: none;
14
+ appearance: none;
15
+ position: relative;
16
+ display: flex;
17
+ align-items: center;
18
+ width: 100%;
19
+ height: var(--srcSelectHeight);
20
+ border-radius: var(--srcSelectBorderRadius);
21
+ font-size: var(--srcSelectFontSize);
22
+ line-height: var(--srcSelectLineHeight);
23
+ color: var(--srcSelectFontColor);
24
+ padding: 7px 28px 7px 12px;
25
+ font-family: var(--src-font-family-sans);
26
+ font-style: normal;
27
+ font-weight: var(--src-fw-regular, 400);
28
+ border: 1px solid var(--srcSelectFieldBorderColor);
29
+ background-color: var(--srcSelectFieldBg);
30
+ background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.40573 4.3L0.805725 1.7C0.489058 1.38333 0.418392 1.021 0.593725 0.613C0.768392 0.204333 1.08073 0 1.53073 0H6.68072C7.13072 0 7.44306 0.204333 7.61772 0.613C7.79306 1.021 7.72239 1.38333 7.40573 1.7L4.80572 4.3C4.70572 4.4 4.59739 4.475 4.48073 4.525C4.36406 4.575 4.23906 4.6 4.10573 4.6C3.97239 4.6 3.84739 4.575 3.73073 4.525C3.61406 4.475 3.50573 4.4 3.40573 4.3Z' fill='%236B7280'/%3E%3C/svg%3E%0A");
31
+ background-repeat: no-repeat;
32
+ background-position: calc(100% - 12px) center;
33
+
34
+ box-shadow: var(--srcSelectBoxShadow);
35
+
36
+ &:focus {
37
+ outline: none;
38
+ box-shadow: var(--srcSelectFocusRing);
39
+ }
40
+
41
+ &[disabled],
42
+ &:disabled {
43
+ --srcSelectFieldBg: var(--srcFormElementDisabledBg);
44
+ --srcSelectFieldBorderColor: var(--srcFormElementDisabledBorderColor);
45
+ --srcSelectBoxShadow: none;
46
+ color: var(--src-color-text-default-disabled);
47
+
48
+ pointer-events: none;
49
+ }
50
+
51
+ option {
52
+ background-color: #fff;
53
+ }
54
+ }
55
+
56
+ .src-select--compact {
57
+ --srcSelectHeight: 32px;
58
+ --srcSelectFontSize: var(--src-fs-small);
59
+ --srcSelectLineHeight: var(--src-lh-small);
60
+ }
61
+ /* Error State */
62
+ .src-select--has-error {
63
+ --srcSelectFieldBg: var(--src-color-bg-critical-subdued);
64
+ --srcSelectFieldBorderColor: var(--src-color-border-critical-strong);
65
+ }
66
+
67
+ /* Disabled State */
68
+ .src-select--disabled {
69
+ --srcSelectFieldBg: var(--srcFormElementDisabledBg);
70
+ --srcSelectFieldBorderColor: var(--srcFormElementDisabledBorderColor);
71
+ --srcSelectBoxShadow: none;
72
+
73
+ pointer-events: none;
74
+ }
@@ -0,0 +1,70 @@
1
+ .src-textarea {
2
+ --srcTexareaFontSize: var(--srcFormElementFontSize);
3
+ --srcTexareaLineHeight: var(--srcFormElementLineHeight);
4
+ --srcTexareaFontColor: var(--srcFormElementFontColor);
5
+ --srcTexareaBg: var(--srcFormElementBg);
6
+ --srcTexareaBorderColor: var(--srcFormElementBorderColor);
7
+ --srcTexareaMinHeight: var(--srcFormElementHeight);
8
+ --srcTexareaBorderRadius: var(--srcFormElementBorderRadius);
9
+ --srcTexareaBoxShadow: var(--srcFormElementBoxShadow);
10
+ // Focus ring it's a multiple box-shadow
11
+ --srcTextareaFocusRing: var(--srcFormElementFocusRing);
12
+
13
+ position: relative;
14
+
15
+ width: 100%;
16
+ min-height: var(--srcTexareaMinHeight);
17
+
18
+ display: flex;
19
+ align-items: center;
20
+ padding: 7px 12px;
21
+
22
+ font-family: var(--src-font-family-sans);
23
+ font-style: normal;
24
+ font-weight: var(--src-fw-regular, 400);
25
+ font-size: var(--srcTexareaFontSize);
26
+ line-height: var(--srcTexareaLineHeight);
27
+ color: var(--srcTexareaFontColor);
28
+
29
+ border: 1px solid var(--srcTexareaBorderColor);
30
+ border-radius: var(--srcTexareaBorderRadius);
31
+ background-color: var(--srcTexareaBg);
32
+ box-shadow: var(--srcTexareaBoxShadow);
33
+
34
+ resize: vertical;
35
+
36
+ &:focus {
37
+ outline: none;
38
+ box-shadow: var(--srcTextareaFocusRing);
39
+ }
40
+
41
+ &[disabled],
42
+ &:disabled {
43
+ --srcTextareaBg: var(--src-color-bg-default-disabled);
44
+ --srcTextareaBorderColor: var(--src-color-border-strong-disabled);
45
+ --srcTextareaBoxShadow: none;
46
+ color: var(--src-color-text-default-disabled);
47
+
48
+ pointer-events: none;
49
+ }
50
+ }
51
+
52
+ .src-textarea--compact {
53
+ --srcTexareaMinHeight: 32px;
54
+ --srcTexareaFontSize: var(--src-fs-small);
55
+ --srcTexareaLineHeight: var(--src-lh-small);
56
+ }
57
+ /* Error State */
58
+ .src-textarea--has-error {
59
+ --srcTexareaBg: var(--src-color-bg-critical-subdued);
60
+ --srcTexareaBorderColor: var(--src-color-border-critical-strong);
61
+ }
62
+
63
+ /* Disabled State */
64
+ .src-textarea--disabled {
65
+ --srcTexareaBg: var(--src-color-bg-default-disabled);
66
+ --srcTexareaBorderColor: var(--src-color-border-strong-disabled);
67
+ --srcTexareaBoxShadow: none;
68
+
69
+ pointer-events: none;
70
+ }
@@ -0,0 +1,9 @@
1
+ @use './src-list';
2
+ @use './src-button';
3
+ @use './src-form';
4
+ @use './src-input';
5
+ @use './src-select';
6
+ @use './src-textarea';
7
+ @use './src-label';
8
+ @use './src-checkbox';
9
+ @use './src-radio';
@@ -0,0 +1,18 @@
1
+ // SourceUI Global Styles: fonts.scss
2
+ :root {
3
+ --src-font-family-sans: 'Inter', sans-serif;
4
+ --src-font-family-mono: monospace;
5
+ }
6
+
7
+ /* Set up Inter as variable fonts */
8
+ @supports (font-variation-settings: normal) {
9
+ @font-face {
10
+ font-family: 'Inter';
11
+ src:
12
+ url('fonts/Inter-VariableFont_slnt,wght.woff2')
13
+ format('woff2 supports variations'),
14
+ url('fonts/Inter-VariableFont_slnt,wght.woff2') format('woff2-variations');
15
+ font-weight: 100 900;
16
+ font-stretch: 50% 100%;
17
+ }
18
+ }
@@ -0,0 +1,90 @@
1
+ // SourceUI Global Styles: typography.scss
2
+ .section_3dsourcecom,
3
+ .cdk-overlay-container {
4
+ h1,
5
+ h2,
6
+ h3,
7
+ h4,
8
+ h5,
9
+ h6,
10
+ .src-heading-massive,
11
+ .src-heading-h1,
12
+ .src-heading-h2,
13
+ .src-heading-h3,
14
+ .src-heading-h4,
15
+ .src-heading-h5,
16
+ .src-heading-h6 {
17
+ margin: 0;
18
+ font-style: normal;
19
+ font-family: var(--src-font-family-sans);
20
+ font-weight: var(--src-fw-semibold, 600);
21
+ // Works only in Chrome and Edge - 11 Jul 2023 - Progressively Enhanced
22
+ text-wrap: balance;
23
+ }
24
+
25
+ .src-heading-massive {
26
+ font-size: var(--src-fs-massive);
27
+ line-height: var(--src-lh-massive);
28
+ letter-spacing: var(--src-ls-massive);
29
+ }
30
+
31
+ [class^='src-heading'] {
32
+ letter-spacing: 0;
33
+ }
34
+
35
+ h1,
36
+ .src-heading-h1 {
37
+ font-size: var(--src-fs-huge);
38
+ line-height: var(--src-lh-huge);
39
+ letter-spacing: var(--src-ls-large);
40
+ }
41
+
42
+ h2,
43
+ .src-heading-h2 {
44
+ font-size: var(--src-fs-3xlarge);
45
+ line-height: var(--src-lh-3xlarge);
46
+ letter-spacing: var(--src-ls-medium);
47
+ }
48
+
49
+ h3,
50
+ .src-heading-h3 {
51
+ font-size: var(--src-fs-2xlarge);
52
+ line-height: var(--src-lh-2xlarge);
53
+ letter-spacing: var(--src-ls-small);
54
+ }
55
+
56
+ h4,
57
+ .src-heading-h4 {
58
+ font-size: var(--src-fs-xlarge);
59
+ line-height: var(--src-lh-xlarge);
60
+ }
61
+
62
+ h5,
63
+ .src-heading-h5 {
64
+ font-size: var(--src-fs-large);
65
+ line-height: var(--src-lh-large);
66
+ }
67
+
68
+ h6,
69
+ .src-heading-h6 {
70
+ font-size: var(--src-fs-medium);
71
+ line-height: var(--src-lh-medium);
72
+ }
73
+
74
+ body {
75
+ font-size: var(--src-fs-base);
76
+ font-weight: var(--src-fw-regular, 400);
77
+ line-height: var(--src-lh-base);
78
+ }
79
+
80
+ body p {
81
+ color: var(--src-color-text-default);
82
+ font-size: var(--src-fs-base);
83
+ font-weight: var(--src-fw-regular, 400);
84
+ line-height: var(--src-lh-base);
85
+ }
86
+
87
+ strong {
88
+ font-weight: var(--src-fw-medium, 500);
89
+ }
90
+ }
@@ -0,0 +1,40 @@
1
+ // SourceUI Global Styles: utils.scss
2
+ // Use only prefixed classes
3
+ .section_3dsourcecom,
4
+ .cdk-overlay-container {
5
+ .visuallyhidden:not(:focus):not(:active),
6
+ .src-visuallyhidden:not(:focus):not(:active) {
7
+ position: absolute;
8
+ width: 1px;
9
+ height: 1px;
10
+ overflow: hidden;
11
+ white-space: nowrap;
12
+ clip-path: inset(50%);
13
+ }
14
+
15
+ .hidden,
16
+ .src-hidden {
17
+ display: none !important;
18
+ }
19
+
20
+ .disabled,
21
+ .src-disabled {
22
+ pointer-events: none;
23
+ }
24
+
25
+ .keyboard-key {
26
+ padding: 2px 5px;
27
+ display: flex;
28
+ align-items: center;
29
+ height: 20px;
30
+ border-radius: 3px;
31
+ background: rgba(255, 255, 255, 0.2);
32
+ color: var(--src-colors-gray-color-gray-0, #fff);
33
+ text-align: center;
34
+ font-family: var(--src-font-family-sans);
35
+ font-size: 12px;
36
+ font-style: normal;
37
+ font-weight: 500;
38
+ line-height: 16px;
39
+ }
40
+ }
@@ -0,0 +1,14 @@
1
+ // SourceUI Variables: Borders
2
+ :root {
3
+ --src-br-4: 4px;
4
+ --src-br-8: 8px;
5
+ --src-br-16: 16px;
6
+ --src-br-24: 24px;
7
+ --src-br-9999: 9999px;
8
+ // Aliases
9
+ --src-br-small: var(--src-br-4);
10
+ --src-br-medium: var(--src-br-8);
11
+ --src-br-large: var(--src-br-16);
12
+ --src-br-xlarge: var(--src-br-24);
13
+ --src-br-full: var(--src-br-9999);
14
+ }
@@ -0,0 +1,39 @@
1
+ // SourceUI Variables: Color Aliases
2
+ :root {
3
+ // Text Colors
4
+ --src-color-text-default: var(--src-color-gray-800);
5
+ --src-color-text-default-disabled: var(--src-color-gray-400);
6
+ --src-color-text-default-subdued: var(--src-color-gray-500);
7
+ --src-color-text-inverse: var(--src-color-gray-0);
8
+ --src-color-text-primary: var(--src-color-brand-500);
9
+ --src-color-text-critical: var(--src-color-red-700);
10
+ // Background Color Tokens
11
+ --src-color-bg-default: var(--src-color-gray-0);
12
+ --src-color-bg-default-subdued: var(--src-color-gray-50);
13
+ --src-color-bg-default-hover: var(--src-color-gray-100);
14
+ --src-color-bg-default-disabled: var(--src-color-gray-50);
15
+ --src-color-bg-default-active: var(--src-color-brand-50);
16
+ --src-color-bg-primary: var(--src-color-brand-500);
17
+ --src-color-bg-primary-hover: var(--src-color-brand-700);
18
+ --src-color-bg-primary-disabled: var(--src-color-gray-200);
19
+ --src-color-bg-strong-subdued: var(--src-color-gray-100);
20
+ --src-color-bg-strong-subdued-hover: var(--src-color-gray-200);
21
+ --src-color-bg-strong: var(--src-color-gray-200);
22
+ --src-color-bg-strong-disabled: var(--src-color-gray-100);
23
+ --src-color-bg-critical: var(--src-color-red-600);
24
+ --src-color-bg-critical-strong: var(--src-color-red-700);
25
+ --src-color-bg-critical-subdued: var(--src-color-red-50);
26
+ // Icon Color Tokens
27
+ --src-color-icon-default: var(--src-color-gray-500);
28
+ --src-color-icon-default-hover: var(--src-color-gray-600);
29
+ --src-color-icon-default-disabled: var(--src-color-gray-400);
30
+ --src-color-icon-primary: var(--src-color-brand-500);
31
+ --src-color-icon-critical: var(--src-color-red-700);
32
+ // Border Color Tokens
33
+ --src-color-border-default: var(--src-color-gray-200);
34
+ --src-color-border-strong: var(--src-color-gray-400);
35
+ --src-color-border-strong-hover: var(--src-color-gray-500);
36
+ --src-color-border-strong-disabled: var(--src-color-gray-300);
37
+ --src-color-border-primary: var(--src-color-brand-500);
38
+ --src-color-border-critical-strong: var(--src-color-red-700);
39
+ }
@@ -0,0 +1,64 @@
1
+ // SourceUI Variables: Color Primitives
2
+ :root {
3
+ // Brand Colors
4
+ --src-color-brand-700: #0162cc;
5
+ --src-color-brand-500: #017bff;
6
+ --src-color-brand-50: #f1f6ff;
7
+ // Gray Shades
8
+ --src-color-gray-900: #111827;
9
+ --src-color-gray-800: #1f2937;
10
+ --src-color-gray-700: #374151;
11
+ --src-color-gray-600: #4b5563;
12
+ --src-color-gray-500: #6b7280;
13
+ --src-color-gray-400: #abb2be;
14
+ --src-color-gray-300: #d1d5db;
15
+ --src-color-gray-200: #e5e7eb;
16
+ --src-color-gray-100: #f1f2f3;
17
+ --src-color-gray-100-trnsp: rgba(17, 24, 39, 0.06);
18
+ --src-color-gray-50: #f9fafb;
19
+ --src-color-gray-0: #ffffff;
20
+ // Blue Shades
21
+ --src-color-blue-900: #10294c;
22
+ --src-color-blue-800: #0e356c;
23
+ --src-color-blue-700: #144995;
24
+ --src-color-blue-600: #2463bc;
25
+ --src-color-blue-500: #3e7dd5;
26
+ --src-color-blue-400: #6699e1;
27
+ --src-color-blue-300: #93baf1;
28
+ --src-color-blue-200: #bbd4f7;
29
+ --src-color-blue-100: #e8f0fd;
30
+ --src-color-blue-50: #f0f5fd;
31
+ // Red Shades
32
+ --src-color-red-900: #430e04;
33
+ --src-color-red-800: #731807;
34
+ --src-color-red-700: #9f200a;
35
+ --src-color-red-600: #c5280c;
36
+ --src-color-red-500: #f24122;
37
+ --src-color-red-400: #f56b52;
38
+ --src-color-red-300: #f79482;
39
+ --src-color-red-200: #fbc5bc;
40
+ --src-color-red-100: #fde2dd;
41
+ --src-color-red-50: #fef3f1;
42
+ // Yellow Shades
43
+ --src-color-yellow-900: #4d2e05;
44
+ --src-color-yellow-800: #875c08;
45
+ --src-color-yellow-700: #b77e0b;
46
+ --src-color-yellow-600: #d89b0d;
47
+ --src-color-yellow-500: #f2b322;
48
+ --src-color-yellow-400: #f5c452;
49
+ --src-color-yellow-300: #f8d990;
50
+ --src-color-yellow-200: #fae5b2;
51
+ --src-color-yellow-100: #fcf0d4;
52
+ --src-color-yellow-50: #fef8ec;
53
+ // Green Shades
54
+ --src-color-green-900: #0c3b2f;
55
+ --src-color-green-800: #125443;
56
+ --src-color-green-700: #007a5c;
57
+ --src-color-green-600: #16a679;
58
+ --src-color-green-500: #23c48c;
59
+ --src-color-green-400: #50dca9;
60
+ --src-color-green-300: #a1edd0;
61
+ --src-color-green-200: #c0f2dd;
62
+ --src-color-green-100: #e0f8ee;
63
+ --src-color-green-50: #f0fdf8;
64
+ }
@@ -0,0 +1,16 @@
1
+ :root {
2
+ --srcFormElementFontSize: var(--src-fs-base);
3
+ --srcFormElementLineHeight: var(--src-lh-base);
4
+ --srcFormElementFontColor: var(--src-color-text-default);
5
+
6
+ --srcFormElementBg: var(--src-color-bg-default);
7
+ --srcFormElementDisabledBg: var(--src-color-bg-default-disabled);
8
+ --srcFormElementBorderColor: var(--src-color-border-strong);
9
+ --srcFormElementDisabledBorderColor: var(--src-color-border-strong-disabled);
10
+ --srcFormElementHeight: 36px;
11
+ --srcFormElementBorderRadius: var(--src-br-small);
12
+ --srcFormElementBoxShadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
13
+ // Focus ring it's a multiple box-shadow
14
+ --srcFormElementFocusRing:
15
+ 0 0 0 1px #fff, 0 0 0 3px var(--src-color-border-primary);
16
+ }
@@ -0,0 +1,9 @@
1
+ // SourceUI Variables: Shadows
2
+ :root {
3
+ --src-shadow-small: 0px 1px 2px rgba(0, 0, 0, 0.05);
4
+ --src-shadow-large:
5
+ 0px 3px 6px rgba(23, 24, 24, 0.08), 0px 8px 20px rgba(23, 24, 24, 0.12);
6
+ --src-shadow-large-top: 0px -4px 20px rgba(23, 24, 24, 0.12);
7
+ --src-shadow-xlarge:
8
+ 0px 0px 1px rgba(0, 0, 0, 0.2), 0px 26px 80px rgba(0, 0, 0, 0.2);
9
+ }
@@ -0,0 +1,32 @@
1
+ // SourceUI Variables: Typography
2
+ :root {
3
+ --src-fs-small: 12px;
4
+ --src-fs-base: 14px;
5
+ --src-fs-medium: 16px;
6
+ --src-fs-large: 18px;
7
+ --src-fs-xlarge: 20px;
8
+ --src-fs-2xlarge: 24px;
9
+ --src-fs-3xlarge: 28px;
10
+ --src-fs-huge: 32px;
11
+ --src-fs-massive: 40px;
12
+ // Line height
13
+ --src-lh-small: 16px;
14
+ --src-lh-base: 20px;
15
+ --src-lh-medium: 24px;
16
+ --src-lh-large: 26px;
17
+ --src-lh-xlarge: 28px;
18
+ --src-lh-2xlarge: 32px;
19
+ --src-lh-3xlarge: 36px;
20
+ --src-lh-huge: 40px;
21
+ --src-lh-massive: 48px;
22
+ // Font weight
23
+ --src-fw-regular: 400;
24
+ --src-fw-medium: 500;
25
+ --src-fw-semibold: 600;
26
+ --src-fw-bold: 700;
27
+ // Letter spacing
28
+ --src-ls-small: -0.2px;
29
+ --src-ls-medium: -0.3px;
30
+ --src-ls-large: -0.5px;
31
+ --src-ls-massive: -1px;
32
+ }
@@ -0,0 +1,6 @@
1
+ @use 'colors';
2
+ @use 'colors-aliases';
3
+ @use 'typography';
4
+ @use 'borders';
5
+ @use 'shadows';
6
+ @use 'form-aliases';