@masterteam/components 0.0.332 → 0.0.334

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.
Files changed (47) hide show
  1. package/assets/common.css +1 -1
  2. package/assets/i18n/ar.json +1 -0
  3. package/assets/i18n/en.json +1 -0
  4. package/fesm2022/masterteam-components-client-page.mjs +10 -4
  5. package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
  6. package/fesm2022/masterteam-components-dynamic-drawer.mjs +10 -0
  7. package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
  8. package/fesm2022/masterteam-components-entities.mjs +8 -3
  9. package/fesm2022/masterteam-components-entities.mjs.map +1 -1
  10. package/fesm2022/masterteam-components-formula.mjs +4 -4
  11. package/fesm2022/masterteam-components-formula.mjs.map +1 -1
  12. package/fesm2022/masterteam-components-select-field.mjs +9 -2
  13. package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
  14. package/fesm2022/masterteam-components-slider-field.mjs +2 -2
  15. package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
  16. package/fesm2022/masterteam-components-tooltip.mjs +11 -3
  17. package/fesm2022/masterteam-components-tooltip.mjs.map +1 -1
  18. package/fesm2022/masterteam-components.mjs +3 -662
  19. package/fesm2022/masterteam-components.mjs.map +1 -1
  20. package/package.json +1 -1
  21. package/types/masterteam-components-client-page.d.ts +7 -2
  22. package/types/masterteam-components-dynamic-drawer.d.ts +6 -0
  23. package/types/masterteam-components-entities.d.ts +8 -5
  24. package/types/masterteam-components-select-field.d.ts +7 -0
  25. package/types/masterteam-components-tooltip.d.ts +1 -0
  26. package/types/masterteam-components.d.ts +2 -174
  27. package/assets/ds-components/button.css +0 -385
  28. package/assets/ds-components/content-switcher.css +0 -124
  29. package/assets/ds-components/feedback.css +0 -220
  30. package/assets/ds-components/field.css +0 -526
  31. package/assets/ds-components/misc.css +0 -252
  32. package/assets/ds-components/overlay.css +0 -268
  33. package/assets/ds-components/pagination.css +0 -140
  34. package/assets/ds-components/selection-controls.css +0 -245
  35. package/assets/ds-components/surfaces.css +0 -173
  36. package/assets/ds-components/table.css +0 -142
  37. package/assets/ds-components/tabs.css +0 -331
  38. package/assets/ds-identity.css +0 -275
  39. package/assets/fonts/IBMPlexSansArabic-400-arabic.woff2 +0 -0
  40. package/assets/fonts/IBMPlexSansArabic-400-latin.woff2 +0 -0
  41. package/assets/fonts/IBMPlexSansArabic-500-arabic.woff2 +0 -0
  42. package/assets/fonts/IBMPlexSansArabic-500-latin.woff2 +0 -0
  43. package/assets/fonts/IBMPlexSansArabic-600-arabic.woff2 +0 -0
  44. package/assets/fonts/IBMPlexSansArabic-600-latin.woff2 +0 -0
  45. package/assets/fonts/IBMPlexSansArabic-700-arabic.woff2 +0 -0
  46. package/assets/fonts/IBMPlexSansArabic-700-latin.woff2 +0 -0
  47. package/assets/ibm-plex-sans-arabic.css +0 -100
@@ -1,245 +0,0 @@
1
- /* ==========================================================================
2
- Checkbox · Radio · Switch
3
- --------------------------------------------------------------------------
4
- Transcribed from the DS `Checkbox` (node 4112:15), `Radio` (node 4399:23544)
5
- and `Switch` (nodes 4457:791 / 4501:160) modules.
6
-
7
- All three share a DS idiom the PrimeNG defaults do not have: a circular
8
- "ripple disc" that appears behind the control on hover and press, drawn as a
9
- ::before inset outside the control box.
10
- ========================================================================== */
11
-
12
- /* ══ Checkbox ═══════════════════════════════════════════════════════════ */
13
- /* DS: 20px box, 1.5px border, radius 1px (near-square, deliberate),
14
- unchecked border #6C737F, checked #1849A9 with #F9FAFB glyph. */
15
-
16
- html.mt-ds .p-checkbox {
17
- width: 20px;
18
- height: 20px;
19
- }
20
-
21
- html.mt-ds .p-checkbox-box {
22
- width: 20px;
23
- height: 20px;
24
- border-width: 1.5px;
25
- border-color: #6c737f;
26
- border-radius: 1px;
27
- background: #ffffff;
28
- position: relative;
29
- transition:
30
- background-color var(--ds-transition-fast),
31
- border-color var(--ds-transition-fast);
32
- }
33
-
34
- html.mt-ds .p-checkbox-box::before {
35
- content: "";
36
- position: absolute;
37
- inset: -8px;
38
- border-radius: 50%;
39
- background: transparent;
40
- transition: background var(--ds-transition-fast);
41
- pointer-events: none;
42
- z-index: -1;
43
- }
44
-
45
- html.mt-ds .p-checkbox:not(.p-disabled):hover .p-checkbox-box::before,
46
- html.mt-ds .p-checkbox:not(.p-disabled):active .p-checkbox-box::before {
47
- background: #f3f4f6;
48
- }
49
-
50
- html.mt-ds .p-checkbox:not(.p-disabled):active .p-checkbox-box {
51
- background: #e5e7eb;
52
- }
53
-
54
- html.mt-ds .p-checkbox-checked .p-checkbox-box {
55
- background: #1849a9;
56
- border-color: #1849a9;
57
- }
58
-
59
- html.mt-ds .p-checkbox-checked:not(.p-disabled):hover .p-checkbox-box {
60
- background: #194185;
61
- border-color: #194185;
62
- }
63
-
64
- html.mt-ds .p-checkbox-checked:not(.p-disabled):active .p-checkbox-box {
65
- background: #102a56;
66
- border-color: #102a56;
67
- }
68
-
69
- html.mt-ds .p-checkbox-icon {
70
- color: #f9fafb;
71
- width: 14px;
72
- height: 14px;
73
- }
74
-
75
- html.mt-ds .p-checkbox.p-disabled .p-checkbox-box {
76
- background: #d2d6db;
77
- border-color: #d2d6db;
78
- opacity: 1;
79
- }
80
-
81
- html.mt-ds .p-checkbox-input:focus-visible + .p-checkbox-box {
82
- outline: none;
83
- box-shadow:
84
- 0 0 0 2px #ffffff,
85
- 0 0 0 4px #00001c;
86
- }
87
-
88
- /* ══ Radio ══════════════════════════════════════════════════════════════ */
89
- /* DS: 24px ring, 1px border #6C737F, 16px inner dot that scales in. */
90
-
91
- html.mt-ds .p-radiobutton {
92
- width: 24px;
93
- height: 24px;
94
- }
95
-
96
- html.mt-ds .p-radiobutton-box {
97
- width: 24px;
98
- height: 24px;
99
- border: 1px solid #6c737f;
100
- background: transparent;
101
- position: relative;
102
- transition:
103
- border-color 0.15s ease,
104
- background-color 0.15s ease;
105
- }
106
-
107
- html.mt-ds .p-radiobutton-box::before {
108
- content: "";
109
- position: absolute;
110
- inset: -4px;
111
- border-radius: 50%;
112
- background: transparent;
113
- transition: background-color 0.15s ease;
114
- pointer-events: none;
115
- z-index: -1;
116
- }
117
-
118
- html.mt-ds .p-radiobutton:not(.p-disabled):hover .p-radiobutton-box::before {
119
- background: #f3f4f6;
120
- }
121
-
122
- html.mt-ds .p-radiobutton:not(.p-disabled):active .p-radiobutton-box::before {
123
- background: #e5e7eb;
124
- }
125
-
126
- html.mt-ds .p-radiobutton-checked .p-radiobutton-box {
127
- border-color: #1849a9;
128
- background: transparent;
129
- }
130
-
131
- /* The dot exists in the DOM at all times and scales in on check — so it must
132
- be explicitly hidden while unchecked, or every radio shows a filled centre. */
133
- html.mt-ds .p-radiobutton-icon {
134
- width: 16px;
135
- height: 16px;
136
- background: transparent;
137
- transform: scale(0);
138
- transition:
139
- transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
140
- background-color 0.15s ease;
141
- }
142
-
143
- html.mt-ds .p-radiobutton-checked .p-radiobutton-icon {
144
- background: #1849a9;
145
- transform: scale(1);
146
- }
147
-
148
- html.mt-ds .p-radiobutton.p-disabled .p-radiobutton-box {
149
- border-color: #d2d6db;
150
- opacity: 1;
151
- }
152
-
153
- html.mt-ds .p-radiobutton.p-disabled.p-radiobutton-checked .p-radiobutton-icon {
154
- background: #d2d6db;
155
- }
156
-
157
- html.mt-ds .p-radiobutton-input:focus-visible + .p-radiobutton-box {
158
- outline: 2px solid #00001c;
159
- outline-offset: -2px;
160
- box-shadow: none;
161
- }
162
-
163
- /* ══ Switch ═════════════════════════════════════════════════════════════ */
164
- /* DS: 48×24 track, 16px thumb, 3px gap. OFF is an outline — transparent track
165
- with a #1F2A37 border and a matching thumb. ON fills with #1849A9.
166
-
167
- Driven through PrimeNG's own custom properties rather than raw width/height/
168
- inset declarations. PrimeNG centres the handle with a negative
169
- margin-block-start of half the handle size, and positions the checked handle
170
- at "width minus (handle-size + gap)". Override those properties directly and
171
- both calculations break — the thumb drops out of the track and lands in the
172
- wrong place when checked. Override the variables and they stay correct. */
173
-
174
- html.mt-ds .p-toggleswitch {
175
- --p-toggleswitch-width: 48px;
176
- --p-toggleswitch-height: 24px;
177
- --p-toggleswitch-handle-size: 16px;
178
- --p-toggleswitch-gap: 3px;
179
- --p-toggleswitch-border-radius: 9999px;
180
- --p-toggleswitch-handle-border-radius: 50%;
181
- --p-toggleswitch-border-width: 1px;
182
- --p-toggleswitch-shadow: none;
183
-
184
- /* OFF — outline only */
185
- --p-toggleswitch-background: transparent;
186
- --p-toggleswitch-border-color: #1f2a37;
187
- --p-toggleswitch-handle-background: #1f2a37;
188
- --p-toggleswitch-hover-background: transparent;
189
- --p-toggleswitch-hover-border-color: #0d121c;
190
- --p-toggleswitch-handle-hover-background: #0d121c;
191
-
192
- /* ON — filled */
193
- --p-toggleswitch-checked-background: #1849a9;
194
- --p-toggleswitch-checked-border-color: #1849a9;
195
- --p-toggleswitch-checked-hover-background: #102a56;
196
- --p-toggleswitch-checked-hover-border-color: #102a56;
197
- --p-toggleswitch-handle-checked-background: #f9fafb;
198
- --p-toggleswitch-handle-checked-hover-background: #f9fafb;
199
-
200
- /* Disabled is a colour swap, never a fade. */
201
- --p-toggleswitch-disabled-background: transparent;
202
- --p-toggleswitch-handle-disabled-background: #d2d6db;
203
- }
204
-
205
- html.mt-ds .p-toggleswitch.p-disabled {
206
- opacity: 1;
207
- }
208
-
209
- html.mt-ds .p-toggleswitch.p-disabled .p-toggleswitch-slider {
210
- border-color: #6c7c96;
211
- }
212
-
213
- html.mt-ds
214
- .p-toggleswitch.p-disabled.p-toggleswitch-checked
215
- .p-toggleswitch-slider {
216
- background: #1849a9;
217
- border-color: #1849a9;
218
- }
219
-
220
- html.mt-ds
221
- .p-toggleswitch.p-disabled.p-toggleswitch-checked
222
- .p-toggleswitch-handle {
223
- background: #f9fafb;
224
- }
225
-
226
- html.mt-ds .p-toggleswitch-input:focus-visible + .p-toggleswitch-slider {
227
- outline: 2px solid #00001c;
228
- outline-offset: 2px;
229
- box-shadow: none;
230
- }
231
-
232
- /* ── Control label — DS pairs every control with 16px/500 label text ───── */
233
-
234
- html.mt-ds
235
- :is(mt-checkbox-field, mt-toggle-field, mt-radio-button-field)
236
- :is(.p-checkbox, .p-radiobutton, .p-toggleswitch)
237
- + label {
238
- font-family: var(--ds-font-sans);
239
- font-size: 16px;
240
- font-weight: 500;
241
- line-height: 24px;
242
- color: #000b36;
243
- margin-bottom: 0;
244
- padding-inline-start: 8px;
245
- }
@@ -1,173 +0,0 @@
1
- /* ==========================================================================
2
- Surfaces — Modal · Drawer · Card · Tag · Menu · Tooltip
3
- --------------------------------------------------------------------------
4
- Modal transcribed from DS `Modal/Modal.module.css` (node 4393:101686).
5
- Note the modal radius is **8px**, not the 16px the foundations table implies
6
- for "modals/drawers" — the component spec wins, and it ships shadow-3xl
7
- rather than shadow-lg.
8
- ========================================================================== */
9
-
10
- /* ══ Modal ══════════════════════════════════════════════════════════════ */
11
-
12
- html.mt-ds .p-dialog {
13
- border-radius: 8px;
14
- background: #ffffff;
15
- box-shadow: 0 32px 64px -12px rgb(16 24 40 / 0.14);
16
- font-family: var(--ds-font-sans);
17
- overflow: hidden;
18
- }
19
-
20
- /* Padding is split deliberately: the *header* carries the DS 24px, but content
21
- and footer stay at 0 because the hosts already pad those themselves —
22
- dialogs through the shared modal.contentClass / footerClass, drawers through
23
- their own templates. Padding all three here double-pads the body; padding
24
- none of them leaves the title flush against the edge. */
25
- html.mt-ds .p-dialog-header {
26
- padding-block: 24px 8px;
27
- padding-inline: 24px;
28
- background: #ffffff;
29
- border: none;
30
- font-size: 18px;
31
- font-weight: 600;
32
- line-height: 28px;
33
- color: #000b36;
34
- }
35
-
36
- html.mt-ds .p-dialog-content {
37
- padding: 0;
38
- font-size: 14px;
39
- line-height: 20px;
40
- color: #3c5073;
41
- }
42
-
43
- html.mt-ds .p-dialog-footer {
44
- display: flex;
45
- justify-content: flex-end;
46
- gap: 8px;
47
- padding-block: 24px;
48
- padding-inline: 0;
49
- border: none;
50
- }
51
-
52
- /* DS close button overhangs the card corner by 10px. */
53
- html.mt-ds .p-dialog-header .p-dialog-close-button {
54
- width: 32px;
55
- height: 32px;
56
- border-radius: 4px;
57
- background: transparent;
58
- color: #000b36;
59
- }
60
-
61
- html.mt-ds .p-dialog-header .p-dialog-close-button:hover {
62
- background: rgb(0 0 0 / 0.06);
63
- }
64
-
65
- html.mt-ds .p-dialog-mask {
66
- background: rgb(16 24 40 / 0.6);
67
- }
68
-
69
- /* ══ Drawer ═════════════════════════════════════════════════════════════ */
70
-
71
- html.mt-ds .p-drawer {
72
- font-family: var(--ds-font-sans);
73
- box-shadow: var(--ds-shadow-xl);
74
- }
75
-
76
- html.mt-ds .p-drawer-header {
77
- padding-block: 16px;
78
- padding-inline: 24px;
79
- font-size: 18px;
80
- font-weight: 600;
81
- color: #000b36;
82
- }
83
-
84
- html.mt-ds .p-drawer-content {
85
- padding-block: 0 24px;
86
- padding-inline: 0;
87
- }
88
-
89
- /* ══ Card ═══════════════════════════════════════════════════════════════ */
90
- /* DS: 8px radius, shadow-sm, 16px body padding. Shadow and stroke are
91
- alternatives — never both, so a bordered card drops its shadow. */
92
-
93
- html.mt-ds .p-card {
94
- border-radius: 8px;
95
- background: #ffffff;
96
- box-shadow: var(--ds-shadow-sm);
97
- font-family: var(--ds-font-sans);
98
- }
99
-
100
- html.mt-ds .p-card.p-card-bordered,
101
- html.mt-ds .p-card[class*="border"] {
102
- box-shadow: none;
103
- border: 1px solid #e5e7eb;
104
- }
105
-
106
- html.mt-ds .p-card-body {
107
- padding: 16px;
108
- gap: 8px;
109
- }
110
-
111
- html.mt-ds .p-card-title {
112
- font-size: 16px;
113
- font-weight: 600;
114
- line-height: 24px;
115
- color: #000b36;
116
- }
117
-
118
- html.mt-ds .p-card-subtitle {
119
- font-size: 14px;
120
- font-weight: 400;
121
- line-height: 20px;
122
- color: #3c5073;
123
- }
124
-
125
- /* ══ Tag / status pill ══════════════════════════════════════════════════ */
126
- /* DS ships two shapes: `Tag` (4px radius, 1px border) and `StatusTag`
127
- (fully rounded, with a leading status dot). `p-tag` renders the first,
128
- `mt-chip` the second. */
129
-
130
- html.mt-ds .p-tag {
131
- height: 24px;
132
- gap: 4px;
133
- padding-inline: 8px;
134
- border: 1px solid transparent;
135
- border-radius: 4px;
136
- font-family: var(--ds-font-sans);
137
- font-size: 12px;
138
- font-weight: 500;
139
- line-height: 18px;
140
- white-space: nowrap;
141
- }
142
-
143
- /* `p-chip` takes the DS Tag shape: 24px tall, 4px radius, symmetric 8px
144
- inline padding, 4px gap. PrimeNG's default padding is asymmetric (more
145
- leading than trailing), which reads as a misaligned label. */
146
- html.mt-ds .p-chip {
147
- height: 24px;
148
- gap: 4px;
149
- padding: 0 8px;
150
- border: 1px solid transparent;
151
- border-radius: 4px;
152
- background: #f3f4f6;
153
- color: #000b36;
154
- font-family: var(--ds-font-sans);
155
- font-size: 12px;
156
- font-weight: 500;
157
- line-height: 18px;
158
- }
159
-
160
- html.mt-ds .p-chip .p-chip-remove-icon {
161
- width: 14px;
162
- height: 14px;
163
- margin: 0;
164
- color: #3c5073;
165
- }
166
-
167
- /* The DS StatusTag is the pill form, with a leading status dot. */
168
- html.mt-ds .p-chip.mt-ds-status {
169
- border-radius: 9999px;
170
- }
171
-
172
- /* Dropdown panels and menus live in ds-components/overlay.css — they are
173
- different surfaces (4px/#D2D6DB vs 8px/#E5E7EB) and are specified apart. */
@@ -1,142 +0,0 @@
1
- /* ==========================================================================
2
- Table — transcribed from DS `Table/Table.module.css` (Figma node 4804:93375)
3
- --------------------------------------------------------------------------
4
- Header bg #F3F4F6, 1px #F3F4F6 top and bottom rule
5
- th 48px, padding 8px 16px, 12px/500 #3C5073, NOT uppercase
6
- sortable hover: colour #000B36, bg #E9EAEC
7
- Body td 64px, padding 8px 16px, 16px/400 #000B36
8
- cell divider 1px #F3F4F6, none on the last cell
9
- row hover #F3F4F6 · selected #F3FCF6
10
- Container `contained` = 1px #E5E7EB border, 8px radius, clipped
11
-
12
- The DS row is 64px tall with 16px text — considerably airier than the
13
- library default. That is the design; `.mt-ds-table-compact` on an ancestor
14
- opts a dense surface back down to 40px/14px.
15
- ========================================================================== */
16
-
17
- html.mt-ds .p-datatable {
18
- font-family: var(--ds-font-sans);
19
- }
20
-
21
- /* ── Header ────────────────────────────────────────────────────────────── */
22
-
23
- html.mt-ds .p-datatable-thead > tr > th {
24
- height: 48px;
25
- padding: 8px 16px;
26
- background: #f3f4f6;
27
- border-top: 1px solid #f3f4f6;
28
- border-bottom: 1px solid #f3f4f6;
29
- border-inline-end: 1px solid #f3f4f6;
30
- font-size: 12px;
31
- font-weight: 500;
32
- line-height: 18px;
33
- color: #3c5073;
34
- text-transform: none;
35
- white-space: nowrap;
36
- vertical-align: middle;
37
- }
38
-
39
- html.mt-ds .p-datatable-thead > tr > th:last-child {
40
- border-inline-end: none;
41
- }
42
-
43
- html.mt-ds .p-datatable-thead > tr > th.p-datatable-sortable-column:hover {
44
- background: #e9eaec;
45
- color: #000b36;
46
- }
47
-
48
- html.mt-ds .p-datatable-sort-icon {
49
- color: inherit;
50
- width: 14px;
51
- height: 14px;
52
- }
53
-
54
- /* ── Body ──────────────────────────────────────────────────────────────── */
55
-
56
- html.mt-ds .p-datatable-tbody > tr > td {
57
- height: 64px;
58
- padding: 8px 16px;
59
- border-inline-end: 1px solid #f3f4f6;
60
- border-bottom: 1px solid #f3f4f6;
61
- font-size: 16px;
62
- font-weight: 400;
63
- line-height: 1.5;
64
- color: #000b36;
65
- vertical-align: middle;
66
- }
67
-
68
- html.mt-ds .p-datatable-tbody > tr > td:last-child {
69
- border-inline-end: none;
70
- }
71
-
72
- html.mt-ds .p-datatable-tbody > tr:hover {
73
- background: #f3f4f6;
74
- }
75
-
76
- html.mt-ds .p-datatable-tbody > tr.p-datatable-row-selected {
77
- background: #f3fcf6;
78
- color: #000b36;
79
- }
80
-
81
- /* ── Container ─────────────────────────────────────────────────────────
82
- DS cells are square; the rounding belongs to the container, at 8px. The
83
- `mt-table` template hard-codes `rounded-[10px]` on its scroll wrapper, so
84
- that element is reached structurally — it is whatever directly contains the
85
- `.p-datatable`. */
86
-
87
- html.mt-ds .p-datatable-thead > tr > th,
88
- html.mt-ds .p-datatable-tbody > tr > td {
89
- border-radius: 0;
90
- }
91
-
92
- html.mt-ds mt-table :has(> .p-datatable) {
93
- border-radius: 8px;
94
- border-color: #e5e7eb;
95
- }
96
-
97
- /* `table/table.css` rounds the four outer cells to 0.625rem (10px) through
98
- `:host ::ng-deep`, which is unlayered and more specific than a plain
99
- `.p-datatable-thead > tr > th` rule — so the corners are re-stated here at
100
- the DS radius rather than zeroed. Both the logical and physical properties
101
- are set because the component uses the physical ones. */
102
-
103
- html.mt-ds mt-table .p-datatable-thead > tr > th:first-child {
104
- border-top-left-radius: 8px;
105
- border-start-start-radius: 8px;
106
- }
107
-
108
- html.mt-ds mt-table .p-datatable-thead > tr > th:last-child {
109
- border-top-right-radius: 8px;
110
- border-start-end-radius: 8px;
111
- }
112
-
113
- html.mt-ds mt-table .p-datatable-tbody > tr:last-child > td:first-child {
114
- border-bottom-left-radius: 8px;
115
- border-end-start-radius: 8px;
116
- }
117
-
118
- html.mt-ds mt-table .p-datatable-tbody > tr:last-child > td:last-child {
119
- border-bottom-right-radius: 8px;
120
- border-end-end-radius: 8px;
121
- }
122
-
123
- html.mt-ds .p-datatable-table-container {
124
- border-radius: 8px;
125
- }
126
-
127
- html.mt-ds .p-datatable.p-datatable-gridlines .p-datatable-table-container {
128
- border: 1px solid #e5e7eb;
129
- overflow: hidden;
130
- }
131
-
132
- /* ── Dense opt-out ─────────────────────────────────────────────────────── */
133
-
134
- html.mt-ds .mt-ds-table-compact .p-datatable-tbody > tr > td {
135
- height: 40px;
136
- font-size: 14px;
137
- line-height: 20px;
138
- }
139
-
140
- html.mt-ds .mt-ds-table-compact .p-datatable-thead > tr > th {
141
- height: 36px;
142
- }