ngx-strata 0.4.4 → 0.5.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.
@@ -3,12 +3,14 @@ st-avatar {
3
3
  --st-avatar-bg-color: var(--st-color-bg-subtle);
4
4
  --st-avatar-text-color: var(--st-color-text-primary);
5
5
  --st-avatar-object-fit: cover;
6
+ --st-avatar-border-radius: var(--st-border-radius-full);
7
+ --st-avatar-radius-rounded: var(--st-border-radius-md);
6
8
 
7
9
  z-index: var(--z, 0);
8
10
  transition: z-index 0s;
9
11
  /* avoids flicker */
10
12
  background-color: var(--st-avatar-bg-color);
11
- border-radius: var(--avatar-size);
13
+ border-radius: var(--st-avatar-border-radius);
12
14
  overflow: hidden;
13
15
  display: inline-flex;
14
16
  align-items: center;
@@ -39,7 +41,37 @@ st-avatar {
39
41
  overflow: visible;
40
42
 
41
43
  img {
42
- border-radius: var(--avatar-size);
44
+ border-radius: var(--st-avatar-border-radius);
45
+ }
46
+ }
47
+
48
+ &.rounded {
49
+ --st-avatar-border-radius: var(--st-avatar-radius-rounded);
50
+
51
+ > st-badge:not(.st-badge-placement-inline) {
52
+ &.st-badge-placement-bottom-right {
53
+ bottom: 0;
54
+ right: 0;
55
+ transform: translate(30%, 30%);
56
+ }
57
+
58
+ &.st-badge-placement-top-right {
59
+ top: 0;
60
+ right: 0;
61
+ transform: translate(30%, -30%);
62
+ }
63
+
64
+ &.st-badge-placement-bottom-left {
65
+ bottom: 0;
66
+ left: 0;
67
+ transform: translate(-30%, 30%);
68
+ }
69
+
70
+ &.st-badge-placement-top-left {
71
+ top: 0;
72
+ left: 0;
73
+ transform: translate(-30%, -30%);
74
+ }
43
75
  }
44
76
  }
45
77
 
@@ -101,6 +133,7 @@ st-avatar.st-theme-brand {
101
133
 
102
134
  st-avatar-stack.xs>st-avatar {
103
135
  --avatar-size: 20px;
136
+ --st-avatar-radius-rounded: var(--st-border-radius-xs);
104
137
 
105
138
  > span {
106
139
  font-size: 0.6rem !important;
@@ -109,6 +142,7 @@ st-avatar-stack.xs>st-avatar {
109
142
 
110
143
  st-avatar.xs {
111
144
  --avatar-size: 20px;
145
+ --st-avatar-radius-rounded: var(--st-border-radius-xs);
112
146
 
113
147
  > span {
114
148
  font-size: 0.6rem;
@@ -117,6 +151,7 @@ st-avatar.xs {
117
151
 
118
152
  st-avatar-stack.sm>st-avatar {
119
153
  --avatar-size: 32px;
154
+ --st-avatar-radius-rounded: var(--st-border-radius-sm);
120
155
 
121
156
  > span {
122
157
  font-size: 0.8rem !important;
@@ -125,6 +160,7 @@ st-avatar-stack.sm>st-avatar {
125
160
 
126
161
  st-avatar.sm {
127
162
  --avatar-size: 32px;
163
+ --st-avatar-radius-rounded: var(--st-border-radius-sm);
128
164
 
129
165
  > span {
130
166
  font-size: 0.8rem;
@@ -133,6 +169,7 @@ st-avatar.sm {
133
169
 
134
170
  st-avatar-stack.md>st-avatar {
135
171
  --avatar-size: 48px;
172
+ --st-avatar-radius-rounded: var(--st-border-radius-md);
136
173
 
137
174
  > span {
138
175
  font-size: 1rem !important;
@@ -141,6 +178,7 @@ st-avatar-stack.md>st-avatar {
141
178
 
142
179
  st-avatar.md {
143
180
  --avatar-size: 48px;
181
+ --st-avatar-radius-rounded: var(--st-border-radius-md);
144
182
 
145
183
  > span {
146
184
  font-size: 1rem;
@@ -149,6 +187,7 @@ st-avatar.md {
149
187
 
150
188
  st-avatar-stack.lg>st-avatar {
151
189
  --avatar-size: 72px;
190
+ --st-avatar-radius-rounded: var(--st-border-radius-lg);
152
191
 
153
192
  > span {
154
193
  font-size: 1.6rem !important;
@@ -157,6 +196,7 @@ st-avatar-stack.lg>st-avatar {
157
196
 
158
197
  st-avatar.lg {
159
198
  --avatar-size: 72px;
199
+ --st-avatar-radius-rounded: var(--st-border-radius-lg);
160
200
 
161
201
  > span {
162
202
  font-size: 1.6rem;
@@ -3,12 +3,21 @@ st-checkbox {
3
3
  --st-checkbox-checked-bg-hover-color: var(--st-color-accent-hover);
4
4
  --st-checkbox-checked-icon-color: var(--st-color-text-on-accent);
5
5
  --st-checkbox-border-radius: var(--st-border-radius-sm);
6
+ --st-checkbox-border-color: var(--st-border);
6
7
 
7
8
  user-select: none;
8
9
  display: inline-flex;
9
- align-items: center;
10
+ flex-direction: column;
11
+ align-items: flex-start;
10
12
  min-height: var(--st-interactive-element-height-md);
11
- gap: var(--st-size-xxs);
13
+
14
+ .st-checkbox-row {
15
+ display: inline-flex;
16
+ align-items: center;
17
+ gap: var(--st-size-xxs);
18
+ min-height: var(--st-interactive-element-height-md);
19
+ }
20
+
12
21
  input {
13
22
  position: absolute;
14
23
  opacity: 0;
@@ -23,7 +32,7 @@ st-checkbox {
23
32
 
24
33
  input:checked + .checkbox-visual {
25
34
  background-color: var(--st-checkbox-checked-bg-color);
26
- border: none;
35
+ border-color: var(--st-checkbox-checked-bg-color);
27
36
  svg {
28
37
  justify-self: center;
29
38
  width: 100%;
@@ -34,7 +43,6 @@ st-checkbox {
34
43
 
35
44
  input:focus + .checkbox-visual {
36
45
  outline: 1px solid var(--st-color-accent-default);
37
-
38
46
  outline-offset: 2px;
39
47
  }
40
48
 
@@ -45,7 +53,7 @@ st-checkbox {
45
53
  max-width: var(--st-selection-control-size);
46
54
  max-height: var(--st-selection-control-size);
47
55
  background-color: var(--st-color-bg-raised);
48
- border: 1px solid var(--st-border);
56
+ border: 1px solid var(--st-checkbox-border-color);
49
57
  border-radius: var(--st-checkbox-border-radius);
50
58
  color: var(--st-checkbox-checked-icon-color);
51
59
  padding: 2px;
@@ -60,6 +68,7 @@ st-checkbox {
60
68
  visibility: hidden;
61
69
  }
62
70
  }
71
+
63
72
  &:hover {
64
73
  cursor: pointer;
65
74
  .checkbox-visual {
@@ -71,6 +80,58 @@ st-checkbox {
71
80
  }
72
81
  }
73
82
 
83
+ &.st-state-error,
84
+ &.st-error {
85
+ --st-checkbox-border-color: var(--st-color-feedback-error-default);
86
+ --st-checkbox-checked-bg-color: var(--st-color-feedback-error-default);
87
+ --st-checkbox-checked-bg-hover-color: var(--st-color-feedback-error-hover, var(--st-color-feedback-error-default));
88
+
89
+ input:focus + .checkbox-visual {
90
+ outline-color: var(--st-color-feedback-error-default);
91
+ }
92
+ }
93
+
94
+ &.st-state-success {
95
+ --st-checkbox-border-color: var(--st-color-feedback-success-default);
96
+ --st-checkbox-checked-bg-color: var(--st-color-feedback-success-default);
97
+ --st-checkbox-checked-bg-hover-color: var(--st-color-feedback-success-hover, var(--st-color-feedback-success-default));
98
+
99
+ input:focus + .checkbox-visual {
100
+ outline-color: var(--st-color-feedback-success-default);
101
+ }
102
+ }
103
+
104
+ &.st-state-warning {
105
+ --st-checkbox-border-color: var(--st-color-feedback-warning-default);
106
+ --st-checkbox-checked-bg-color: var(--st-color-feedback-warning-default);
107
+ --st-checkbox-checked-bg-hover-color: var(--st-color-feedback-warning-hover, var(--st-color-feedback-warning-default));
108
+ --st-checkbox-checked-icon-color: var(--st-color-feedback-warning-text);
109
+
110
+ input:focus + .checkbox-visual {
111
+ outline-color: var(--st-color-feedback-warning-default);
112
+ }
113
+ }
114
+
115
+ .st-checkbox-message {
116
+ margin-top: calc(var(--st-space-1) * -1 + 2px);
117
+ margin-left: calc(var(--st-selection-control-size) + var(--st-size-xxs));
118
+ font-size: var(--st-font-sm, 12px);
119
+ color: var(--st-color-text-secondary);
120
+ line-height: 1.25;
121
+
122
+ &.st-message-error {
123
+ color: var(--st-color-feedback-error-text);
124
+ }
125
+
126
+ &.st-message-success {
127
+ color: var(--st-color-feedback-success-text);
128
+ }
129
+
130
+ &.st-message-warning {
131
+ color: var(--st-color-feedback-warning-text);
132
+ }
133
+ }
134
+
74
135
  &[data-disabled="true"],
75
136
  &.disabled {
76
137
  cursor: not-allowed;
@@ -109,8 +109,60 @@ st-file-upload {
109
109
  color: var(--st-file-upload-text);
110
110
  }
111
111
 
112
+ &.st-state-error,
113
+ &.st-error {
114
+ --st-file-upload-border: var(--st-color-feedback-error-default);
115
+ --st-file-upload-hover-border: var(--st-color-feedback-error-hover, var(--st-color-feedback-error-default));
116
+
117
+ &:hover:not(.st-disabled) .st-file-upload-icon {
118
+ color: var(--st-color-feedback-error-default);
119
+ }
120
+
121
+ &:focus-visible:not(.st-disabled) {
122
+ outline-color: var(--st-color-feedback-error-default);
123
+ }
124
+ }
125
+
126
+ &.st-state-success {
127
+ --st-file-upload-border: var(--st-color-feedback-success-default);
128
+ --st-file-upload-hover-border: var(--st-color-feedback-success-hover, var(--st-color-feedback-success-default));
129
+
130
+ &:hover:not(.st-disabled) .st-file-upload-icon {
131
+ color: var(--st-color-feedback-success-default);
132
+ }
133
+
134
+ &:focus-visible:not(.st-disabled) {
135
+ outline-color: var(--st-color-feedback-success-default);
136
+ }
137
+ }
138
+
139
+ &.st-state-warning {
140
+ --st-file-upload-border: var(--st-color-feedback-warning-default);
141
+ --st-file-upload-hover-border: var(--st-color-feedback-warning-hover, var(--st-color-feedback-warning-default));
142
+
143
+ &:hover:not(.st-disabled) .st-file-upload-icon {
144
+ color: var(--st-color-feedback-warning-default);
145
+ }
146
+
147
+ &:focus-visible:not(.st-disabled) {
148
+ outline-color: var(--st-color-feedback-warning-default);
149
+ }
150
+ }
151
+
112
152
  .st-file-upload-hint {
113
153
  font-size: 0.8rem;
114
154
  color: var(--st-file-upload-hint);
155
+
156
+ &.st-message-error {
157
+ color: var(--st-color-feedback-error-text);
158
+ }
159
+
160
+ &.st-message-success {
161
+ color: var(--st-color-feedback-success-text);
162
+ }
163
+
164
+ &.st-message-warning {
165
+ color: var(--st-color-feedback-warning-text);
166
+ }
115
167
  }
116
168
  }
@@ -1,24 +1,24 @@
1
1
  st-input-field {
2
2
  --st-input-field-bg-color: var(--st-color-bg-raised);
3
3
  --st-input-field-bg-hover-color: var(--st-color-bg-raised);
4
- --st-input-field-bg-disabled-color: var(--st-color-bg-disabled);
5
4
  --st-input-field-text-color: var(--st-color-text-primary);
6
- --st-input-field-text-disabled-color: var(--st-color-text-disabled);
7
5
  --st-input-field-border-color: var(--st-border-muted);
8
- --st-input-field-border-disabled-color: var(--st-border-faded);
9
- --st-input-field-opacity-disabled: 0.6;
6
+ --st-input-field-opacity-disabled: 0.55;
10
7
  --st-input-field-height: var(--st-interactive-element-height-md);
11
8
  --st-input-field-font-size: var(--st-font-md);
12
9
  --st-input-field-padding-x: var(--st-size-xs);
13
10
  --st-input-field-border-radius: var(--st-border-radius-md);
14
11
  --st-input-field-counter-font-size: var(--st-font-sm);
15
12
  --st-input-field-counter-color: var(--st-color-text-tertiary);
16
- --st-input-field-counter-disabled-color: var(--st-color-text-disabled);
17
13
 
18
14
  display: flex;
19
15
  flex-direction: column;
20
16
  box-sizing: border-box;
21
17
 
18
+ label {
19
+ margin-bottom: var(--st-space-2);
20
+ }
21
+
22
22
  &.st-size-sm {
23
23
  --st-input-field-height: var(--st-interactive-element-height-sm);
24
24
  --st-input-field-font-size: var(--st-font-sm);
@@ -66,11 +66,39 @@ st-input-field {
66
66
  }
67
67
  &:has(textarea) {
68
68
  height: auto;
69
+ flex-direction: column;
70
+ align-items: stretch;
71
+
72
+ &:has(.affix:last-of-type:not(:empty)) textarea {
73
+ padding-bottom: var(--st-space-1);
74
+ }
75
+
76
+ .affix {
77
+ &:first-of-type {
78
+ padding-left: var(--st-input-field-padding-x);
79
+ padding-top: var(--st-space-1);
80
+ padding-bottom: 0;
81
+ align-self: flex-start;
82
+ }
83
+
84
+ &:last-of-type {
85
+ align-self: flex-end;
86
+ padding-left: var(--st-input-field-padding-x);
87
+ padding-right: var(--st-input-field-padding-x);
88
+ padding-bottom: var(--st-space-2);
89
+ padding-top: 0;
90
+
91
+ &:has(button, st-button-group) {
92
+ padding-right: var(--st-space-1);
93
+ padding-bottom: var(--st-space-1);
94
+ }
95
+ }
96
+ }
69
97
  }
70
98
  }
71
99
 
72
100
  .affix {
73
- width: min-content;
101
+ width: auto;
74
102
  display: flex;
75
103
  justify-items: center;
76
104
  align-items: center;
@@ -84,10 +112,18 @@ st-input-field {
84
112
 
85
113
  &:first-of-type {
86
114
  padding-right: 0;
115
+
116
+ &:has(button, st-button-group) {
117
+ padding-left: var(--st-space-1);
118
+ }
87
119
  }
88
120
 
89
121
  &:last-of-type {
90
122
  padding-left: 0;
123
+
124
+ &:has(button, st-button-group) {
125
+ padding-right: var(--st-space-1);
126
+ }
91
127
  }
92
128
  }
93
129
 
@@ -119,19 +155,64 @@ st-input-field {
119
155
  }
120
156
  }
121
157
 
158
+ &.st-state-error,
159
+ &.st-error {
160
+ --st-input-field-border-color: var(--st-color-feedback-error-default);
161
+
162
+ .st-input-wrapper:focus-within {
163
+ outline-color: var(--st-color-feedback-error-default);
164
+ }
165
+ }
166
+
167
+ &.st-state-success {
168
+ --st-input-field-border-color: var(--st-color-feedback-success-default);
169
+
170
+ .st-input-wrapper:focus-within {
171
+ outline-color: var(--st-color-feedback-success-default);
172
+ }
173
+ }
174
+
175
+ &.st-state-warning {
176
+ --st-input-field-border-color: var(--st-color-feedback-warning-default);
177
+
178
+ .st-input-wrapper:focus-within {
179
+ outline-color: var(--st-color-feedback-warning-default);
180
+ }
181
+ }
182
+
122
183
  .st-input-field-footer {
123
184
  display: flex;
124
- justify-content: flex-end;
125
- align-items: center;
185
+ justify-content: space-between;
186
+ align-items: flex-start;
187
+ gap: var(--st-space-2);
126
188
  margin-top: var(--st-space-1);
127
189
  line-height: 1.25;
128
190
  }
129
191
 
192
+ .st-input-field-message {
193
+ font-size: var(--st-input-field-counter-font-size);
194
+ color: var(--st-color-text-secondary);
195
+
196
+ &.st-message-error {
197
+ color: var(--st-color-feedback-error-text);
198
+ }
199
+
200
+ &.st-message-success {
201
+ color: var(--st-color-feedback-success-text);
202
+ }
203
+
204
+ &.st-message-warning {
205
+ color: var(--st-color-feedback-warning-text);
206
+ }
207
+ }
208
+
130
209
  .st-input-field-counter {
210
+ margin-left: auto;
131
211
  font-size: var(--st-input-field-counter-font-size);
132
212
  color: var(--st-input-field-counter-color);
133
213
  font-variant-numeric: tabular-nums;
134
214
  user-select: none;
215
+ white-space: nowrap;
135
216
  }
136
217
 
137
218
  &.st-disabled,
@@ -141,50 +222,18 @@ st-input-field {
141
222
  &:has(textarea:disabled),
142
223
  &:has([aria-disabled='true']) {
143
224
  cursor: not-allowed;
144
-
145
- label {
146
- cursor: not-allowed;
147
- color: var(--st-input-field-text-disabled-color);
148
- }
225
+ opacity: var(--st-input-field-opacity-disabled);
226
+ pointer-events: none;
149
227
 
150
228
  .st-input-wrapper {
151
- background-color: var(--st-input-field-bg-disabled-color);
152
- border-color: var(--st-input-field-border-disabled-color);
153
- cursor: not-allowed;
154
- opacity: var(--st-input-field-opacity-disabled);
155
-
156
229
  &:hover {
157
- background-color: var(--st-input-field-bg-disabled-color);
230
+ background-color: var(--st-input-field-bg-color);
158
231
  }
159
232
 
160
233
  &:focus-within {
161
234
  outline: none;
162
235
  }
163
236
  }
164
-
165
- input,
166
- textarea {
167
- cursor: not-allowed;
168
- color: var(--st-input-field-text-disabled-color);
169
-
170
- &::placeholder {
171
- color: var(--st-input-field-text-disabled-color);
172
- }
173
- }
174
-
175
- .affix {
176
- cursor: not-allowed;
177
- color: var(--st-input-field-text-disabled-color);
178
-
179
- button,
180
- [stButton] {
181
- pointer-events: none;
182
- }
183
- }
184
-
185
- .st-input-field-counter {
186
- color: var(--st-input-field-counter-disabled-color);
187
- }
188
237
  }
189
238
  }
190
239
 
@@ -1,13 +1,38 @@
1
1
  st-radio-group {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- gap: var(--st-size-xs);
4
+ gap: var(--st-size-xxs);
5
+
6
+ .st-radio-group-radios {
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: var(--st-size-xs);
10
+ }
11
+
12
+ .st-radio-message {
13
+ margin-top: var(--st-space-1);
14
+ font-size: var(--st-font-sm, 12px);
15
+ color: var(--st-color-text-secondary);
16
+ line-height: 1.25;
17
+
18
+ &.st-message-error {
19
+ color: var(--st-color-feedback-error-text);
20
+ }
21
+
22
+ &.st-message-success {
23
+ color: var(--st-color-feedback-success-text);
24
+ }
25
+
26
+ &.st-message-warning {
27
+ color: var(--st-color-feedback-warning-text);
28
+ }
29
+ }
5
30
  }
6
31
 
7
32
  st-radio {
8
33
  --st-radio-checked-bg-color: var(--st-color-accent-default);
9
34
  --st-radio-checked-bg-hover-color: var(--st-color-accent-hover);
10
-
35
+ --st-radio-border-color: var(--st-border);
11
36
 
12
37
  user-select: none;
13
38
  display: inline-flex;
@@ -34,8 +59,7 @@ st-radio {
34
59
  min-width: var(--st-selection-control-size);
35
60
  min-height: var(--st-selection-control-size);
36
61
  background-color: var(--st-color-bg-raised);
37
-
38
- border: 1px solid var(--st-border);
62
+ border: 1px solid var(--st-radio-border-color);
39
63
  border-radius: 50%;
40
64
  display: grid;
41
65
  place-items: center;
@@ -99,4 +123,35 @@ st-radio {
99
123
  }
100
124
  }
101
125
  }
126
+
127
+ &.st-state-error,
128
+ &.st-error {
129
+ --st-radio-border-color: var(--st-color-feedback-error-default);
130
+ --st-radio-checked-bg-color: var(--st-color-feedback-error-default);
131
+ --st-radio-checked-bg-hover-color: var(--st-color-feedback-error-hover, var(--st-color-feedback-error-default));
132
+
133
+ input:focus + .radio-visual {
134
+ outline-color: var(--st-color-feedback-error-default);
135
+ }
136
+ }
137
+
138
+ &.st-state-success {
139
+ --st-radio-border-color: var(--st-color-feedback-success-default);
140
+ --st-radio-checked-bg-color: var(--st-color-feedback-success-default);
141
+ --st-radio-checked-bg-hover-color: var(--st-color-feedback-success-hover, var(--st-color-feedback-success-default));
142
+
143
+ input:focus + .radio-visual {
144
+ outline-color: var(--st-color-feedback-success-default);
145
+ }
146
+ }
147
+
148
+ &.st-state-warning {
149
+ --st-radio-border-color: var(--st-color-feedback-warning-default);
150
+ --st-radio-checked-bg-color: var(--st-color-feedback-warning-default);
151
+ --st-radio-checked-bg-hover-color: var(--st-color-feedback-warning-hover, var(--st-color-feedback-warning-default));
152
+
153
+ input:focus + .radio-visual {
154
+ outline-color: var(--st-color-feedback-warning-default);
155
+ }
156
+ }
102
157
  }