@mt-gloss/styles 0.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.
@@ -0,0 +1,228 @@
1
+ // ============================================
2
+ // COMPONENT: CARDS
3
+ // ============================================
4
+
5
+ @use '../tokens' as *;
6
+ @use '../mixins' as *;
7
+
8
+ // --- BASE CARD ---
9
+ .gloss-card {
10
+ display: flex;
11
+ flex-direction: column;
12
+ overflow: hidden;
13
+ border-radius: $radius-lg;
14
+ }
15
+
16
+ // --- VARIANTS ---
17
+ .gloss-card--elevated {
18
+ background: $alias-bg-surface;
19
+ border: 1px solid $alias-border-default;
20
+ @include shadow-card;
21
+ }
22
+
23
+ .gloss-card--outlined {
24
+ background: $alias-bg-surface;
25
+ border: 1px solid $alias-border-default;
26
+ box-shadow: none;
27
+ }
28
+
29
+ .gloss-card--filled {
30
+ background: $alias-bg-muted;
31
+ border: 1px solid transparent;
32
+ box-shadow: none;
33
+ }
34
+
35
+ // --- SIZES (affects padding in children) ---
36
+ .gloss-card--sm {
37
+ .gloss-card__header,
38
+ .gloss-card__body,
39
+ .gloss-card__footer {
40
+ padding: $space-4;
41
+ }
42
+
43
+ .gloss-card__actions {
44
+ padding: $space-3 $space-4;
45
+ }
46
+
47
+ .gloss-card__title {
48
+ font-size: $text-base;
49
+ }
50
+ }
51
+
52
+ .gloss-card--md {
53
+ .gloss-card__header,
54
+ .gloss-card__body {
55
+ padding: $space-5;
56
+ }
57
+
58
+ .gloss-card__footer {
59
+ padding: $space-4 $space-5;
60
+ }
61
+
62
+ .gloss-card__actions {
63
+ padding: $space-3 $space-5;
64
+ }
65
+ }
66
+
67
+ .gloss-card--lg {
68
+ .gloss-card__header,
69
+ .gloss-card__body {
70
+ padding: $space-6;
71
+ }
72
+
73
+ .gloss-card__footer {
74
+ padding: $space-5 $space-6;
75
+ }
76
+
77
+ .gloss-card__actions {
78
+ padding: $space-4 $space-6;
79
+ }
80
+
81
+ .gloss-card__title {
82
+ font-size: $text-xl;
83
+ }
84
+ }
85
+
86
+ // --- INTERACTIVE MODIFIER ---
87
+ .gloss-card--interactive {
88
+ transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
89
+ cursor: pointer;
90
+
91
+ &:hover {
92
+ transform: translateY(-4px);
93
+ @include shadow-button-hover;
94
+ border-color: $alias-border-hover;
95
+ }
96
+
97
+ &:active {
98
+ transform: translateY(-2px);
99
+ }
100
+
101
+ // Variant-specific hover states
102
+ &.gloss-card--outlined:hover {
103
+ border-color: $alias-primary;
104
+ }
105
+
106
+ &.gloss-card--filled:hover {
107
+ background: $alias-bg-secondary;
108
+ border-color: $alias-border-default;
109
+ }
110
+ }
111
+
112
+ // --- SELECTED STATE ---
113
+ .gloss-card--selected {
114
+ border-color: $alias-primary;
115
+ box-shadow: 0 0 0 3px rgba($color-blue-500, 0.15);
116
+
117
+ &.gloss-card--filled {
118
+ background: $color-blue-50;
119
+ }
120
+ }
121
+
122
+ // --- MEDIA ---
123
+ .gloss-card__media {
124
+ position: relative;
125
+ overflow: hidden;
126
+ background: $color-gray-100;
127
+ flex-shrink: 0;
128
+
129
+ img {
130
+ width: 100%;
131
+ height: 100%;
132
+ object-fit: cover;
133
+ display: block;
134
+ }
135
+ }
136
+
137
+ // --- HEADER ---
138
+ .gloss-card__header {
139
+ border-bottom: 1px solid $alias-border-default;
140
+ background: $alias-bg-muted;
141
+ display: flex;
142
+ flex-direction: column;
143
+ gap: $space-1;
144
+
145
+ // When filled variant, header doesn't need different background
146
+ .gloss-card--filled & {
147
+ background: transparent;
148
+ border-bottom-color: $alias-border-default;
149
+ }
150
+ }
151
+
152
+ // --- TITLE ---
153
+ .gloss-card__title {
154
+ font-family: $font-display;
155
+ font-size: $text-lg;
156
+ font-weight: 600;
157
+ color: $alias-text-primary;
158
+ margin: 0;
159
+ line-height: 1.3;
160
+ }
161
+
162
+ // --- SUBTITLE ---
163
+ .gloss-card__subtitle {
164
+ font-size: $text-sm;
165
+ color: $alias-text-secondary;
166
+ margin: 0;
167
+ line-height: 1.4;
168
+ }
169
+
170
+ // --- BODY ---
171
+ .gloss-card__body {
172
+ flex: 1;
173
+ color: $alias-text-secondary;
174
+ font-size: $text-base;
175
+ line-height: 1.6;
176
+
177
+ p {
178
+ margin: 0;
179
+
180
+ & + p {
181
+ margin-top: $space-3;
182
+ }
183
+ }
184
+ }
185
+
186
+ // --- ACTIONS (inline, no background) ---
187
+ .gloss-card__actions {
188
+ display: flex;
189
+ gap: $space-3;
190
+ align-items: center;
191
+ border-top: 1px solid $alias-border-default;
192
+
193
+ &--start {
194
+ justify-content: flex-start;
195
+ }
196
+
197
+ &--center {
198
+ justify-content: center;
199
+ }
200
+
201
+ &--end {
202
+ justify-content: flex-end;
203
+ }
204
+
205
+ &--between {
206
+ justify-content: space-between;
207
+ }
208
+
209
+ // When filled variant
210
+ .gloss-card--filled & {
211
+ border-top-color: $alias-border-default;
212
+ }
213
+ }
214
+
215
+ // --- FOOTER (with background) ---
216
+ .gloss-card__footer {
217
+ border-top: 1px solid $alias-border-default;
218
+ background: $alias-bg-muted;
219
+ display: flex;
220
+ gap: $space-3;
221
+ justify-content: flex-end;
222
+ align-items: center;
223
+
224
+ // When filled variant
225
+ .gloss-card--filled & {
226
+ background: rgba($color-white, 0.5);
227
+ }
228
+ }
@@ -0,0 +1,276 @@
1
+ // ============================================
2
+ // COMPONENT: CHIP
3
+ // ============================================
4
+
5
+ @use '../tokens' as *;
6
+ @use '../mixins' as *;
7
+
8
+ // --- BASE CHIP ---
9
+ .gloss-chip {
10
+ display: inline-flex;
11
+ align-items: center;
12
+ gap: $space-1;
13
+ font-weight: 500;
14
+ line-height: 1;
15
+ white-space: nowrap;
16
+ border-radius: $radius-full;
17
+ vertical-align: middle;
18
+ transition: all 0.15s ease-out;
19
+ }
20
+
21
+ // --- SIZES ---
22
+ .gloss-chip--sm {
23
+ font-size: $text-xs;
24
+ padding: $space-1 $space-2;
25
+ gap: 4px;
26
+
27
+ .gloss-chip__icon {
28
+ width: 12px;
29
+ height: 12px;
30
+ }
31
+
32
+ .gloss-chip__delete {
33
+ width: 14px;
34
+ height: 14px;
35
+ margin-left: 2px;
36
+ margin-right: -4px;
37
+ }
38
+ }
39
+
40
+ .gloss-chip--md {
41
+ font-size: $text-sm;
42
+ padding: $space-1 $space-3;
43
+ gap: 6px;
44
+
45
+ .gloss-chip__icon {
46
+ width: 14px;
47
+ height: 14px;
48
+ }
49
+
50
+ .gloss-chip__delete {
51
+ width: 16px;
52
+ height: 16px;
53
+ margin-left: 4px;
54
+ margin-right: -6px;
55
+ }
56
+ }
57
+
58
+ .gloss-chip--lg {
59
+ font-size: $text-base;
60
+ padding: $space-2 $space-4;
61
+ gap: 8px;
62
+
63
+ .gloss-chip__icon {
64
+ width: 16px;
65
+ height: 16px;
66
+ }
67
+
68
+ .gloss-chip__delete {
69
+ width: 18px;
70
+ height: 18px;
71
+ margin-left: 6px;
72
+ margin-right: -8px;
73
+ }
74
+ }
75
+
76
+ // --- VARIANT: DEFAULT ---
77
+ .gloss-chip--default {
78
+ background: $color-white;
79
+ border: 1px solid $alias-border-default;
80
+ color: $alias-text-primary;
81
+ @include shadow-input-default;
82
+
83
+ &.gloss-chip--interactive:hover:not(.gloss-chip--disabled) {
84
+ background: $alias-bg-hover;
85
+ border-color: $alias-border-hover;
86
+ }
87
+
88
+ &.gloss-chip--selected {
89
+ background: $alias-primary;
90
+ border-color: $alias-primary;
91
+ color: $color-white;
92
+ }
93
+ }
94
+
95
+ // --- VARIANT: FILLED ---
96
+ .gloss-chip--filled {
97
+ border: 1px solid transparent;
98
+ box-shadow: none;
99
+
100
+ &.gloss-chip--interactive:hover:not(.gloss-chip--disabled) {
101
+ filter: brightness(0.95);
102
+ }
103
+ }
104
+
105
+ // --- VARIANT: OUTLINED ---
106
+ .gloss-chip--outlined {
107
+ background: transparent;
108
+ box-shadow: none;
109
+
110
+ &.gloss-chip--interactive:hover:not(.gloss-chip--disabled) {
111
+ background: rgba($color-gray-500, 0.08);
112
+ }
113
+ }
114
+
115
+ // --- COLORS (for filled and outlined) ---
116
+ .gloss-chip--default.gloss-chip--filled {
117
+ background: $color-gray-100;
118
+ color: $alias-text-primary;
119
+ }
120
+
121
+ .gloss-chip--default.gloss-chip--outlined {
122
+ border-color: $alias-border-default;
123
+ color: $alias-text-primary;
124
+ }
125
+
126
+ .gloss-chip--primary {
127
+ &.gloss-chip--filled {
128
+ background: $color-blue-100;
129
+ color: $color-blue-700;
130
+ }
131
+
132
+ &.gloss-chip--outlined {
133
+ border-color: $color-blue-300;
134
+ color: $color-blue-600;
135
+ }
136
+
137
+ &.gloss-chip--selected {
138
+ background: $alias-primary;
139
+ border-color: $alias-primary;
140
+ color: $color-white;
141
+ }
142
+ }
143
+
144
+ .gloss-chip--success {
145
+ &.gloss-chip--filled {
146
+ background: $color-green-100;
147
+ color: $color-green-700;
148
+ }
149
+
150
+ &.gloss-chip--outlined {
151
+ border-color: $color-green-500;
152
+ color: $color-green-600;
153
+ }
154
+
155
+ &.gloss-chip--selected {
156
+ background: $color-green-600;
157
+ border-color: $color-green-600;
158
+ color: $color-white;
159
+ }
160
+ }
161
+
162
+ .gloss-chip--warning {
163
+ &.gloss-chip--filled {
164
+ background: $color-amber-100;
165
+ color: $color-amber-600;
166
+ }
167
+
168
+ &.gloss-chip--outlined {
169
+ border-color: $color-amber-500;
170
+ color: $color-amber-600;
171
+ }
172
+
173
+ &.gloss-chip--selected {
174
+ background: $color-amber-500;
175
+ border-color: $color-amber-500;
176
+ color: $color-white;
177
+ }
178
+ }
179
+
180
+ .gloss-chip--error {
181
+ &.gloss-chip--filled {
182
+ background: $color-red-100;
183
+ color: $color-red-700;
184
+ }
185
+
186
+ &.gloss-chip--outlined {
187
+ border-color: $color-red-400;
188
+ color: $color-red-600;
189
+ }
190
+
191
+ &.gloss-chip--selected {
192
+ background: $color-red-600;
193
+ border-color: $color-red-600;
194
+ color: $color-white;
195
+ }
196
+ }
197
+
198
+ // --- INTERACTIVE ---
199
+ .gloss-chip--interactive {
200
+ cursor: pointer;
201
+ user-select: none;
202
+
203
+ &:focus-visible {
204
+ outline: 2px solid $alias-border-focus;
205
+ outline-offset: 2px;
206
+ }
207
+ }
208
+
209
+ .gloss-chip--clickable {
210
+ &:active:not(.gloss-chip--disabled) {
211
+ transform: scale(0.97);
212
+ }
213
+ }
214
+
215
+ // --- DISABLED ---
216
+ .gloss-chip--disabled {
217
+ opacity: 0.5;
218
+ cursor: not-allowed;
219
+ pointer-events: none;
220
+ }
221
+
222
+ // --- ICON ---
223
+ .gloss-chip__icon {
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: center;
227
+ flex-shrink: 0;
228
+
229
+ svg {
230
+ width: 100%;
231
+ height: 100%;
232
+ }
233
+ }
234
+
235
+ // --- LABEL ---
236
+ .gloss-chip__label {
237
+ flex: 1;
238
+ min-width: 0;
239
+ overflow: hidden;
240
+ text-overflow: ellipsis;
241
+ }
242
+
243
+ // --- DELETE BUTTON ---
244
+ .gloss-chip__delete {
245
+ display: flex;
246
+ align-items: center;
247
+ justify-content: center;
248
+ flex-shrink: 0;
249
+ padding: 0;
250
+ border: none;
251
+ background: transparent;
252
+ color: currentColor;
253
+ opacity: 0.6;
254
+ cursor: pointer;
255
+ border-radius: $radius-full;
256
+ transition: all 0.15s ease-out;
257
+
258
+ &:hover:not(:disabled) {
259
+ opacity: 1;
260
+ background: rgba(0, 0, 0, 0.1);
261
+ }
262
+
263
+ &:focus-visible {
264
+ outline: 2px solid $alias-border-focus;
265
+ outline-offset: 1px;
266
+ }
267
+
268
+ &:disabled {
269
+ cursor: not-allowed;
270
+ }
271
+
272
+ svg {
273
+ width: 100%;
274
+ height: 100%;
275
+ }
276
+ }