@masterteam/components 0.0.251 → 0.0.252

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,180 @@
1
+ /* ==========================================================================
2
+ DatePicker
3
+ --------------------------------------------------------------------------
4
+ DS `DatePicker` (Figma 4250:1943)
5
+
6
+ PrimeNG supplies the interaction and accessibility model. These rules map
7
+ its table-based DOM onto the DS 424px calendar, 56px cell hit area, 48px
8
+ date circle, outlined Today state, range strip, and double focus ring.
9
+ ========================================================================== */
10
+
11
+ html.mt-ds .p-datepicker-panel {
12
+ font-family: var(--ds-font-sans);
13
+ }
14
+
15
+ html.mt-ds .p-datepicker-calendar-container .p-datepicker-calendar {
16
+ box-sizing: border-box;
17
+ inline-size: var(--ds-datepicker-panel-inline-size);
18
+ padding: 0 var(--ds-space-xl) var(--ds-space-xl);
19
+ }
20
+
21
+ html.mt-ds
22
+ .p-datepicker-calendar-container
23
+ .p-datepicker-calendar
24
+ + .p-datepicker-calendar {
25
+ border-inline-start: 1px solid var(--p-datepicker-group-border-color);
26
+ }
27
+
28
+ html.mt-ds .p-datepicker-header {
29
+ block-size: var(--ds-datepicker-header-height);
30
+ border-block-end: 0;
31
+ }
32
+
33
+ html.mt-ds .p-datepicker-title {
34
+ font-size: var(--ds-text-md);
35
+ line-height: var(--ds-text-md-lh);
36
+ }
37
+
38
+ html.mt-ds :is(.p-datepicker-prev-button, .p-datepicker-next-button) {
39
+ inline-size: var(--ds-control-height-md);
40
+ block-size: var(--ds-control-height-md);
41
+ min-inline-size: var(--ds-control-height-md);
42
+ padding: 0;
43
+ border: 0;
44
+ background: transparent;
45
+ color: var(--ds-text-strong);
46
+ }
47
+
48
+ html.mt-ds
49
+ :is(
50
+ .p-datepicker-prev-button,
51
+ .p-datepicker-next-button,
52
+ .p-datepicker-select-month,
53
+ .p-datepicker-select-year,
54
+ .p-datepicker-day
55
+ ):focus-visible {
56
+ outline: none;
57
+ box-shadow:
58
+ 0 0 0 2px var(--ds-focus-ring-color),
59
+ 0 0 0 5px var(--ds-focus-outline-color);
60
+ }
61
+
62
+ html.mt-ds .p-datepicker-day-view {
63
+ table-layout: fixed;
64
+ font-size: var(--ds-text-md);
65
+ }
66
+
67
+ html.mt-ds .p-datepicker-weekday-cell {
68
+ block-size: var(--ds-datepicker-weekday-height);
69
+ padding: 0;
70
+ text-align: center;
71
+ }
72
+
73
+ html.mt-ds .p-datepicker-weekday {
74
+ font-size: var(--ds-text-md);
75
+ line-height: var(--ds-text-md-lh);
76
+ }
77
+
78
+ html.mt-ds .p-datepicker-day-cell {
79
+ position: relative;
80
+ box-sizing: border-box;
81
+ inline-size: var(--ds-datepicker-cell-size);
82
+ block-size: var(--ds-datepicker-cell-size);
83
+ padding: var(--ds-space-xs);
84
+ }
85
+
86
+ html.mt-ds .p-datepicker-day {
87
+ z-index: 1;
88
+ inline-size: var(--ds-datepicker-date-size);
89
+ block-size: var(--ds-datepicker-date-size);
90
+ border-radius: var(--ds-radius-full);
91
+ font-size: var(--ds-text-md);
92
+ font-weight: var(--ds-font-weight-regular);
93
+ line-height: var(--ds-text-md-lh);
94
+ }
95
+
96
+ html.mt-ds .p-datepicker-day-selected:not(.p-disabled) {
97
+ font-weight: var(--ds-font-weight-bold);
98
+ }
99
+
100
+ html.mt-ds .p-datepicker-day-selected:not(.p-disabled):hover {
101
+ background: var(--p-primary-900);
102
+ color: var(--p-primary-contrast-color);
103
+ }
104
+
105
+ html.mt-ds .p-datepicker-day-selected:not(.p-disabled):active {
106
+ background: var(--p-primary-950);
107
+ }
108
+
109
+ html.mt-ds
110
+ .p-datepicker-today
111
+ > .p-datepicker-day:not(.p-datepicker-day-selected) {
112
+ border: 2px solid var(--p-primary-color);
113
+ background: transparent;
114
+ color: var(--p-primary-color);
115
+ font-weight: var(--ds-font-weight-bold);
116
+ }
117
+
118
+ html.mt-ds
119
+ .p-datepicker-other-month
120
+ > .p-datepicker-day:not(.p-datepicker-day-selected) {
121
+ color: var(--ds-text-secondary);
122
+ }
123
+
124
+ html.mt-ds .p-datepicker-day.p-disabled {
125
+ color: var(--ds-disabled-bg);
126
+ opacity: 1;
127
+ pointer-events: none;
128
+ }
129
+
130
+ /* PrimeNG paints range state on the 48px date element. The DS paints a
131
+ continuous 40px strip behind the circles, so the cell owns that layer. */
132
+ html.mt-ds
133
+ .p-datepicker-day-cell:has(> .p-datepicker-day-selected-range)::before,
134
+ html.mt-ds
135
+ .p-datepicker-day-cell:has(> .p-datepicker-day-selected):has(
136
+ + .p-datepicker-day-cell > .p-datepicker-day-selected-range
137
+ )::before,
138
+ html.mt-ds
139
+ .p-datepicker-day-cell:has(> .p-datepicker-day-selected-range)
140
+ + .p-datepicker-day-cell:has(> .p-datepicker-day-selected)::before {
141
+ content: "";
142
+ position: absolute;
143
+ z-index: 0;
144
+ inset-block: var(--ds-space-md);
145
+ inset-inline: 0;
146
+ background: var(--p-datepicker-date-range-selected-background);
147
+ pointer-events: none;
148
+ }
149
+
150
+ html.mt-ds
151
+ .p-datepicker-day-cell:has(> .p-datepicker-day-selected):has(
152
+ + .p-datepicker-day-cell > .p-datepicker-day-selected-range
153
+ )::before {
154
+ inset-inline-start: 50%;
155
+ }
156
+
157
+ html.mt-ds
158
+ .p-datepicker-day-cell:has(> .p-datepicker-day-selected-range)
159
+ + .p-datepicker-day-cell:has(> .p-datepicker-day-selected)::before {
160
+ inset-inline-end: 50%;
161
+ }
162
+
163
+ html.mt-ds .p-datepicker-day-selected-range {
164
+ background: transparent;
165
+ color: var(--ds-text-strong);
166
+ }
167
+
168
+ html.mt-ds .p-datepicker-buttonbar {
169
+ min-block-size: calc(var(--ds-control-height-lg) + (2 * var(--ds-space-lg)));
170
+ }
171
+
172
+ @media (max-width: 30rem) {
173
+ html.mt-ds .p-datepicker-calendar-container .p-datepicker-calendar {
174
+ inline-size: calc(100vw - (2 * var(--ds-space-xl)));
175
+ }
176
+
177
+ html.mt-ds .p-datepicker-day-cell {
178
+ inline-size: auto;
179
+ }
180
+ }
@@ -157,15 +157,26 @@ html.mt-ds .p-slider-handle:focus-visible {
157
157
  /* ══ Avatar ═════════════════════════════════════════════════════════════ */
158
158
 
159
159
  html.mt-ds .p-avatar {
160
- border-radius: 9999px;
161
- background: #f3f4f6;
162
- color: #3c5073;
160
+ border-radius: var(--p-avatar-border-radius);
161
+ background: var(--p-avatar-background);
162
+ color: var(--p-avatar-color);
163
163
  font-family: var(--ds-font-sans);
164
164
  font-weight: 500;
165
165
  }
166
166
 
167
+ /* PrimeNG exposes avatar paint through inherited custom properties. Keep
168
+ caller-supplied semantic/tenant colours authoritative under the DS layer. */
169
+ html.mt-ds .p-avatar.p-avatar-circle,
170
+ html.mt-ds .p-avatar.p-avatar-circle img {
171
+ border-radius: var(--ds-radius-full);
172
+ }
173
+
174
+ html.mt-ds .p-avatar.p-avatar-image {
175
+ background: transparent;
176
+ }
177
+
167
178
  html.mt-ds .p-avatar-group .p-avatar {
168
- border: 2px solid #ffffff;
179
+ border: 2px solid var(--p-avatar-group-border-color);
169
180
  }
170
181
 
171
182
  /* ══ Tree ═══════════════════════════════════════════════════════════════ */