@masterteam/components 0.0.244 → 0.0.245

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.
@@ -33,7 +33,7 @@ html.mt-ds .p-selectbutton {
33
33
  }
34
34
 
35
35
  html.mt-ds .p-selectbutton .p-togglebutton {
36
- height: 40px;
36
+ height: 32px;
37
37
  min-width: 76px;
38
38
  padding: 0;
39
39
  border: none;
@@ -50,13 +50,13 @@ html.mt-ds .p-selectbutton .p-togglebutton {
50
50
  html.mt-ds .p-selectbutton .p-togglebutton .p-togglebutton-content {
51
51
  width: 100%;
52
52
  height: 100%;
53
- padding: 0 12px;
53
+ padding: 0 8px;
54
54
  background: transparent;
55
55
  border-radius: 0;
56
56
  box-shadow: none;
57
57
  color: inherit;
58
- font-size: 18px;
59
- line-height: 28px;
58
+ font-size: 14px;
59
+ line-height: 20px;
60
60
  font-weight: inherit;
61
61
  }
62
62
 
@@ -114,11 +114,11 @@ html.mt-ds .p-selectbutton .p-togglebutton-sm .p-togglebutton-content {
114
114
  }
115
115
 
116
116
  html.mt-ds .p-selectbutton .p-togglebutton-lg {
117
- height: 48px;
117
+ height: 40px;
118
118
  }
119
119
 
120
120
  html.mt-ds .p-selectbutton .p-togglebutton-lg .p-togglebutton-content {
121
- padding: 0 16px;
122
- font-size: 20px;
123
- line-height: 30px;
121
+ padding: 0 12px;
122
+ font-size: 16px;
123
+ line-height: 24px;
124
124
  }
@@ -1,200 +1,331 @@
1
- /* ==========================================================================
2
- Tabs — transcribed from DS `Tabs/Tabs.module.css` (Figma node 4747:83313)
3
- --------------------------------------------------------------------------
4
- Horizontal (medium): 44px tall · 12px/16px padding · 3px bottom bar #1849A9
5
- list divider 3px #D2D6DB · text always 14px
6
- weight 500 unselected → 700 selected · colour #000B36
7
- hover bg #E5E7EB · pressed #D2D6DB · disabled #6C7C96
8
- Vertical (medium): 44px tall · 12px padding · 3px pill-rounded left bar
9
- weight 400 unselected → 600 selected
10
-
11
- Two targets, because the library has two tab implementations: `mt-tabs`
12
- (hand-rolled with Tailwind utilities) and PrimeNG `p-tabs`. Unlayered rules
13
- outrank both `@layer utilities` and `@layer primeng`, so neither needs a
14
- template change.
15
- ========================================================================== */
16
-
17
- /* ══ mt-tabs — underline (horizontal) mode ══════════════════════════════ */
18
-
19
- html.mt-ds mt-tabs [role="tablist"][aria-orientation="horizontal"] > div {
20
- border-bottom: 3px solid #d2d6db;
21
- gap: 0;
22
- }
23
-
24
- html.mt-ds
25
- mt-tabs
26
- [role="tablist"][aria-orientation="horizontal"]
27
- [role="tab"] {
28
- height: 44px;
29
- padding: 12px 16px;
30
- margin-bottom: -3px;
31
- border-bottom: 3px solid transparent;
32
- border-radius: 0;
33
- font-family: var(--ds-font-sans);
34
- font-size: 14px;
35
- font-weight: 500;
36
- line-height: 20px;
37
- color: #000b36;
38
- transition:
39
- background-color var(--ds-transition-fast),
40
- border-color var(--ds-transition-fast);
41
- }
42
-
43
- html.mt-ds
44
- mt-tabs
45
- [role="tablist"][aria-orientation="horizontal"]
46
- [role="tab"]:not([aria-selected="true"], :disabled):hover {
47
- background: #e5e7eb;
48
- color: #000b36;
49
- }
50
-
51
- html.mt-ds
52
- mt-tabs
53
- [role="tablist"][aria-orientation="horizontal"]
54
- [role="tab"]:not([aria-selected="true"], :disabled):active {
55
- background: #d2d6db;
56
- }
57
-
58
- html.mt-ds
59
- mt-tabs
60
- [role="tablist"][aria-orientation="horizontal"]
61
- [role="tab"][aria-selected="true"] {
62
- border-bottom-color: #1849a9;
63
- color: #000b36;
64
- font-weight: 700;
65
- background: transparent;
66
- }
67
-
68
- html.mt-ds
69
- mt-tabs
70
- [role="tablist"][aria-orientation="horizontal"]
71
- [role="tab"]:disabled {
72
- color: #6c7c96;
73
- background: transparent;
74
- opacity: 1;
75
- }
76
-
77
- html.mt-ds
78
- mt-tabs
79
- [role="tablist"][aria-orientation="horizontal"]
80
- [role="tab"][aria-selected="true"]:disabled {
81
- border-bottom-color: #6c7c96;
82
- }
83
-
84
- /* ══ mt-tabs — vertical mode ════════════════════════════════════════════ */
85
-
86
- html.mt-ds mt-tabs [role="tablist"][aria-orientation="vertical"] {
87
- width: 150px;
88
- gap: 0;
89
- padding: 0;
90
- border: none;
91
- border-radius: 0;
92
- background: transparent;
93
- }
94
-
95
- html.mt-ds mt-tabs [role="tablist"][aria-orientation="vertical"] [role="tab"] {
96
- position: relative;
97
- height: 44px;
98
- padding: 12px;
99
- border-radius: 0;
100
- font-family: var(--ds-font-sans);
101
- font-size: 14px;
102
- font-weight: 400;
103
- color: #000b36;
104
- background: transparent;
105
- }
106
-
107
- html.mt-ds
108
- mt-tabs
109
- [role="tablist"][aria-orientation="vertical"]
110
- [role="tab"]::before {
111
- content: "";
112
- position: absolute;
113
- inset-inline-start: 0;
114
- inset-block: 0;
115
- width: 3px;
116
- border-radius: 9999px;
117
- background: transparent;
118
- transition: background-color var(--ds-transition-fast);
119
- }
120
-
121
- html.mt-ds
122
- mt-tabs
123
- [role="tablist"][aria-orientation="vertical"]
124
- [role="tab"]:not([aria-selected="true"], :disabled):hover {
125
- background: #e5e7eb;
126
- }
127
-
128
- html.mt-ds
129
- mt-tabs
130
- [role="tablist"][aria-orientation="vertical"]
131
- [role="tab"]:not([aria-selected="true"], :disabled):hover::before {
132
- background: #1f2a37;
133
- }
134
-
135
- html.mt-ds
136
- mt-tabs
137
- [role="tablist"][aria-orientation="vertical"]
138
- [role="tab"][aria-selected="true"] {
139
- background: transparent;
140
- color: #000b36;
141
- font-weight: 600;
142
- }
143
-
144
- html.mt-ds
145
- mt-tabs
146
- [role="tablist"][aria-orientation="vertical"]
147
- [role="tab"][aria-selected="true"]::before {
148
- background: #1849a9;
149
- }
150
-
151
- html.mt-ds
152
- mt-tabs
153
- [role="tablist"][aria-orientation="vertical"]
154
- [role="tab"][aria-selected="true"]:disabled::before {
155
- background: #d2d6db;
156
- }
157
-
158
- /* ── Shared: focus ring ────────────────────────────────────────────────── */
159
-
160
- html.mt-ds mt-tabs [role="tab"]:focus-visible {
161
- outline: 2px solid #1849a9;
162
- outline-offset: 2px;
163
- box-shadow: none;
164
- }
165
-
166
- /* ══ PrimeNG p-tabs ═════════════════════════════════════════════════════ */
167
-
168
- html.mt-ds .p-tablist {
169
- border-bottom: 3px solid #d2d6db;
170
- }
171
-
172
- html.mt-ds .p-tab {
173
- height: 44px;
174
- padding: 12px 16px;
175
- border-width: 0 0 3px 0;
176
- border-color: transparent;
177
- font-family: var(--ds-font-sans);
178
- font-size: 14px;
179
- font-weight: 500;
180
- color: #000b36;
181
- margin-bottom: -3px;
182
- }
183
-
184
- html.mt-ds .p-tab:not(.p-tab-active, .p-disabled):hover {
185
- background: #e5e7eb;
186
- color: #000b36;
187
- border-color: transparent;
188
- }
189
-
190
- html.mt-ds .p-tab-active {
191
- color: #000b36;
192
- font-weight: 700;
193
- border-color: #1849a9;
194
- }
195
-
196
- html.mt-ds .p-tablist-active-bar {
197
- height: 3px;
198
- bottom: -3px;
199
- background: #1849a9;
200
- }
1
+ /* ==========================================================================
2
+ Tabs — transcribed from DS `Tabs/Tabs.module.css` (Figma node 4747:83313)
3
+ --------------------------------------------------------------------------
4
+ Horizontal (small): 36px tall · 8px/12px padding [DS Medium is 44/12/16;
5
+ small is used as the default - this product is denser
6
+ than the DS reference layouts] · 3px bottom bar #1849A9
7
+ list divider 3px #D2D6DB · text always 14px
8
+ weight 500 unselected → 700 selected · colour #000B36
9
+ hover bg #E5E7EB · pressed #D2D6DB · disabled #6C7C96
10
+ Vertical (medium): 44px tall · 12px padding · 3px pill-rounded left bar
11
+ weight 400 unselected → 600 selected
12
+
13
+ Two targets, because the library has two tab implementations: `mt-tabs`
14
+ (hand-rolled with Tailwind utilities) and PrimeNG `p-tabs`. Unlayered rules
15
+ outrank both `@layer utilities` and `@layer primeng`, so neither needs a
16
+ template change.
17
+ ========================================================================== */
18
+
19
+ /* ══ mt-tabs — underline (horizontal) mode ══════════════════════════════ */
20
+ /* Transcribed from the real .htab rules, not the summary at the top of the DS
21
+ module - that comment claims 36/44/52 per size, but every .htabSmall /
22
+ Medium / Large block is identical: 52px tall, 16px padding, 14/20 text.
23
+
24
+ The active indicator is NOT a bottom border. It is a 3px pill inset 16px
25
+ from each inline edge, so it sits under the label rather than spanning the
26
+ full tab - which is why a border-bottom never looked right. Hover paints
27
+ the same bar in #1F2A37. */
28
+
29
+ html.mt-ds mt-tabs [role="tablist"][aria-orientation="horizontal"] > div {
30
+ border-bottom: 3px solid #d2d6db;
31
+ gap: 0;
32
+ }
33
+
34
+ html.mt-ds
35
+ mt-tabs
36
+ [role="tablist"][aria-orientation="horizontal"]
37
+ [role="tab"] {
38
+ position: relative;
39
+ height: 52px;
40
+ padding: 16px;
41
+ gap: 8px;
42
+ margin-bottom: 0;
43
+ border: none;
44
+ border-radius: 4px;
45
+ font-family: var(--ds-font-sans);
46
+ font-size: 14px;
47
+ font-weight: 500;
48
+ line-height: 20px;
49
+ color: #000b36;
50
+ transition: background-color var(--ds-transition-fast);
51
+ }
52
+
53
+ html.mt-ds
54
+ mt-tabs
55
+ [role="tablist"][aria-orientation="horizontal"]
56
+ [role="tab"]::after {
57
+ content: "";
58
+ position: absolute;
59
+ bottom: 0;
60
+ inset-inline: 16px;
61
+ height: 3px;
62
+ border-radius: 9999px;
63
+ background: transparent;
64
+ transition: background-color var(--ds-transition-fast);
65
+ }
66
+
67
+ html.mt-ds
68
+ mt-tabs
69
+ [role="tablist"][aria-orientation="horizontal"]
70
+ [role="tab"]:not([aria-selected="true"], :disabled):hover {
71
+ background: #e5e7eb;
72
+ color: #000b36;
73
+ }
74
+
75
+ html.mt-ds
76
+ mt-tabs
77
+ [role="tablist"][aria-orientation="horizontal"]
78
+ [role="tab"]:not([aria-selected="true"], :disabled):hover::after {
79
+ background: #1f2a37;
80
+ }
81
+
82
+ html.mt-ds
83
+ mt-tabs
84
+ [role="tablist"][aria-orientation="horizontal"]
85
+ [role="tab"]:not([aria-selected="true"], :disabled):active {
86
+ background: #d2d6db;
87
+ }
88
+
89
+ html.mt-ds
90
+ mt-tabs
91
+ [role="tablist"][aria-orientation="horizontal"]
92
+ [role="tab"][aria-selected="true"] {
93
+ background: transparent;
94
+ color: #000b36;
95
+ font-weight: 700;
96
+ }
97
+
98
+ html.mt-ds
99
+ mt-tabs
100
+ [role="tablist"][aria-orientation="horizontal"]
101
+ [role="tab"][aria-selected="true"]::after {
102
+ background: #1849a9;
103
+ }
104
+
105
+ html.mt-ds
106
+ mt-tabs
107
+ [role="tablist"][aria-orientation="horizontal"]
108
+ [role="tab"]:disabled {
109
+ color: #6c7c96;
110
+ background: transparent;
111
+ opacity: 1;
112
+ }
113
+
114
+ html.mt-ds
115
+ mt-tabs
116
+ [role="tablist"][aria-orientation="horizontal"]
117
+ [role="tab"][aria-selected="true"]:disabled::after {
118
+ background: #6c7c96;
119
+ }
120
+
121
+ /* ══ mt-tabs — vertical mode ════════════════════════════════════════════ */
122
+
123
+ html.mt-ds mt-tabs [role="tablist"][aria-orientation="vertical"] {
124
+ width: 150px;
125
+ gap: 0;
126
+ padding: 0;
127
+ border: none;
128
+ border-radius: 0;
129
+ background: transparent;
130
+ }
131
+
132
+ html.mt-ds mt-tabs [role="tablist"][aria-orientation="vertical"] [role="tab"] {
133
+ position: relative;
134
+ height: 36px;
135
+ padding: 8px 12px;
136
+ border-radius: 0;
137
+ font-family: var(--ds-font-sans);
138
+ font-size: 14px;
139
+ font-weight: 400;
140
+ color: #000b36;
141
+ background: transparent;
142
+ }
143
+
144
+ html.mt-ds
145
+ mt-tabs
146
+ [role="tablist"][aria-orientation="vertical"]
147
+ [role="tab"]::before {
148
+ content: "";
149
+ position: absolute;
150
+ inset-inline-start: 0;
151
+ inset-block: 0;
152
+ width: 3px;
153
+ border-radius: 9999px;
154
+ background: transparent;
155
+ transition: background-color var(--ds-transition-fast);
156
+ }
157
+
158
+ html.mt-ds
159
+ mt-tabs
160
+ [role="tablist"][aria-orientation="vertical"]
161
+ [role="tab"]:not([aria-selected="true"], :disabled):hover {
162
+ background: #e5e7eb;
163
+ }
164
+
165
+ html.mt-ds
166
+ mt-tabs
167
+ [role="tablist"][aria-orientation="vertical"]
168
+ [role="tab"]:not([aria-selected="true"], :disabled):hover::before {
169
+ background: #1f2a37;
170
+ }
171
+
172
+ html.mt-ds
173
+ mt-tabs
174
+ [role="tablist"][aria-orientation="vertical"]
175
+ [role="tab"][aria-selected="true"] {
176
+ background: transparent;
177
+ color: #000b36;
178
+ font-weight: 600;
179
+ }
180
+
181
+ html.mt-ds
182
+ mt-tabs
183
+ [role="tablist"][aria-orientation="vertical"]
184
+ [role="tab"][aria-selected="true"]::before {
185
+ background: #1849a9;
186
+ }
187
+
188
+ html.mt-ds
189
+ mt-tabs
190
+ [role="tablist"][aria-orientation="vertical"]
191
+ [role="tab"][aria-selected="true"]:disabled::before {
192
+ background: #d2d6db;
193
+ }
194
+
195
+ /* ── Shared: focus ring ────────────────────────────────────────────────── */
196
+
197
+ html.mt-ds mt-tabs [role="tab"]:focus-visible {
198
+ outline: 3px solid #1849a9;
199
+ outline-offset: 2px;
200
+ box-shadow: none;
201
+ }
202
+
203
+ /* ══ PrimeNG p-tabs ═════════════════════════════════════════════════════ */
204
+
205
+ html.mt-ds .p-tablist {
206
+ border-bottom: 3px solid #d2d6db;
207
+ }
208
+
209
+ html.mt-ds .p-tab {
210
+ height: 44px;
211
+ padding: 12px 16px;
212
+ border-width: 0 0 3px 0;
213
+ border-color: transparent;
214
+ font-family: var(--ds-font-sans);
215
+ font-size: 14px;
216
+ font-weight: 500;
217
+ color: #000b36;
218
+ margin-bottom: -3px;
219
+ }
220
+
221
+ html.mt-ds .p-tab:not(.p-tab-active, .p-disabled):hover {
222
+ background: #e5e7eb;
223
+ color: #000b36;
224
+ border-color: transparent;
225
+ }
226
+
227
+ html.mt-ds .p-tab-active {
228
+ color: #000b36;
229
+ font-weight: 700;
230
+ border-color: #1849a9;
231
+ }
232
+
233
+ html.mt-ds .p-tablist-active-bar {
234
+ height: 3px;
235
+ bottom: -3px;
236
+ background: #1849a9;
237
+ }
238
+
239
+ /* ══ mt-tabs default mode — render as DS Tabs, not a content switcher ═══ */
240
+ /* mt-tabs with no mode set renders a p-selectbutton, so it was picking up the
241
+ content-switcher look: a grey track with one solid blue filled segment. But
242
+ callers use it as a tab strip, and a DS tab is an underline rather than a
243
+ segmented control — so it read as the wrong component entirely, whatever its
244
+ dimensions.
245
+
246
+ Scoped to mt-tabs, so a bare p-selectbutton used as a genuine view toggle
247
+ keeps the content-switcher treatment from content-switcher.css. */
248
+
249
+ html.mt-ds mt-tabs .p-selectbutton {
250
+ gap: 0;
251
+ padding: 0;
252
+ border: none;
253
+ border-bottom: 3px solid #d2d6db;
254
+ border-radius: 0;
255
+ background: transparent;
256
+ overflow: visible;
257
+ }
258
+
259
+ html.mt-ds mt-tabs .p-selectbutton .p-togglebutton {
260
+ position: relative;
261
+ height: 52px;
262
+ min-width: 0;
263
+ border: none;
264
+ border-radius: 4px;
265
+ background: transparent;
266
+ color: #000b36;
267
+ font-weight: 500;
268
+ }
269
+
270
+ /* No inter-item dividers on a tab strip - those belong to the switcher. */
271
+ html.mt-ds mt-tabs .p-selectbutton .p-togglebutton + .p-togglebutton {
272
+ border-inline-start: none;
273
+ }
274
+
275
+ html.mt-ds mt-tabs .p-selectbutton .p-togglebutton .p-togglebutton-content {
276
+ gap: 8px;
277
+ padding: 16px;
278
+ background: transparent;
279
+ color: inherit;
280
+ font-size: 14px;
281
+ font-weight: inherit;
282
+ line-height: 20px;
283
+ }
284
+
285
+ html.mt-ds mt-tabs .p-selectbutton .p-togglebutton::after {
286
+ content: "";
287
+ position: absolute;
288
+ bottom: 0;
289
+ inset-inline: 16px;
290
+ height: 3px;
291
+ border-radius: 9999px;
292
+ background: transparent;
293
+ transition: background-color var(--ds-transition-fast);
294
+ }
295
+
296
+ html.mt-ds
297
+ mt-tabs
298
+ .p-selectbutton
299
+ .p-togglebutton:not(.p-togglebutton-checked, .p-disabled):hover {
300
+ background: #e5e7eb;
301
+ color: #000b36;
302
+ }
303
+
304
+ html.mt-ds
305
+ mt-tabs
306
+ .p-selectbutton
307
+ .p-togglebutton:not(.p-togglebutton-checked, .p-disabled):hover::after {
308
+ background: #1f2a37;
309
+ }
310
+
311
+ html.mt-ds mt-tabs .p-selectbutton .p-togglebutton.p-togglebutton-checked {
312
+ background: transparent;
313
+ color: #000b36;
314
+ font-weight: 700;
315
+ }
316
+
317
+ html.mt-ds
318
+ mt-tabs
319
+ .p-selectbutton
320
+ .p-togglebutton.p-togglebutton-checked
321
+ .p-togglebutton-content {
322
+ background: transparent;
323
+ color: #000b36;
324
+ }
325
+
326
+ html.mt-ds
327
+ mt-tabs
328
+ .p-selectbutton
329
+ .p-togglebutton.p-togglebutton-checked::after {
330
+ background: #1849a9;
331
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.244",
3
+ "version": "0.0.245",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,