@masterteam/components 0.0.250 → 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.
- package/assets/common.css +1 -1
- package/assets/ds-components/datepicker.css +180 -180
- package/assets/ds-components/misc.css +263 -263
- package/assets/ds-components/tabs.css +265 -331
- package/assets/ds-identity.css +284 -284
- package/assets/i18n/ar.json +2 -1
- package/assets/i18n/en.json +2 -1
- package/fesm2022/masterteam-components-business-fields.mjs +6 -2
- package/fesm2022/masterteam-components-business-fields.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +64 -12
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +14 -14
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-entities.d.ts +24 -4
- package/types/masterteam-components-table.d.ts +2 -2
package/assets/ds-identity.css
CHANGED
|
@@ -1,284 +1,284 @@
|
|
|
1
|
-
/* ==========================================================================
|
|
2
|
-
Masterteam Design System — EXPERIMENTAL design identity
|
|
3
|
-
--------------------------------------------------------------------------
|
|
4
|
-
Source of truth : Figma WTmRAkJVvw0IvZMA7wBdTC · DsMasterteam (Storybook)
|
|
5
|
-
Angular port : @masterteam/components
|
|
6
|
-
|
|
7
|
-
This file has two parts:
|
|
8
|
-
|
|
9
|
-
1. `--ds-*` raw tokens on :root. Definitions only — declaring a custom
|
|
10
|
-
property paints nothing, so this part is always safe to ship.
|
|
11
|
-
2. Everything under `html.mt-ds`. This is where the identity is actually
|
|
12
|
-
applied. Nothing here renders until the host opts in with
|
|
13
|
-
`provideMTComponents({ designIdentity: 'experimental' })` or
|
|
14
|
-
`setMTDesignIdentity('experimental')`.
|
|
15
|
-
|
|
16
|
-
Three layers make up the identity:
|
|
17
|
-
|
|
18
|
-
1. The PrimeUIX preset (`src/lib/config/ds-identity.preset.ts`) — the
|
|
19
|
-
palette and the coarse geometry, reaching every component at once.
|
|
20
|
-
2. `ds-components/*.css` — per-component specs transcribed from the DS
|
|
21
|
-
modules: exact heights, per-state borders, variant colours, focus
|
|
22
|
-
rings. These are what make an `mt-*` component read as its DS
|
|
23
|
-
counterpart rather than merely share its palette.
|
|
24
|
-
3. This file — the cross-cutting remainder: font, type, the animated
|
|
25
|
-
input underline, tooltip, charts.
|
|
26
|
-
|
|
27
|
-
Layers 2 and 3 are deliberately **unlayered** CSS. Tailwind utilities live
|
|
28
|
-
in `@layer utilities` and the PrimeNG theme in `@layer primeng`, and
|
|
29
|
-
unlayered rules outrank both — so the DS look lands on hand-rolled Tailwind
|
|
30
|
-
components and PrimeNG wrappers alike, with no `!important` and no template
|
|
31
|
-
changes.
|
|
32
|
-
========================================================================== */
|
|
33
|
-
|
|
34
|
-
@import "./ibm-plex-sans-arabic.css";
|
|
35
|
-
|
|
36
|
-
/* Per-component DS specs. Order matters: later files win ties. */
|
|
37
|
-
@import "./ds-components/button.css";
|
|
38
|
-
@import "./ds-components/field.css";
|
|
39
|
-
@import "./ds-components/datepicker.css";
|
|
40
|
-
@import "./ds-components/selection-controls.css";
|
|
41
|
-
@import "./ds-components/tabs.css";
|
|
42
|
-
@import "./ds-components/content-switcher.css";
|
|
43
|
-
@import "./ds-components/table.css";
|
|
44
|
-
@import "./ds-components/surfaces.css";
|
|
45
|
-
@import "./ds-components/overlay.css";
|
|
46
|
-
@import "./ds-components/feedback.css";
|
|
47
|
-
@import "./ds-components/pagination.css";
|
|
48
|
-
@import "./ds-components/misc.css";
|
|
49
|
-
|
|
50
|
-
:root {
|
|
51
|
-
/* ── Typography ─────────────────────────────────────────────── */
|
|
52
|
-
--ds-font-sans: "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
|
|
53
|
-
--ds-font-weight-regular: 400;
|
|
54
|
-
--ds-font-weight-medium: 500;
|
|
55
|
-
--ds-font-weight-semibold: 600;
|
|
56
|
-
--ds-font-weight-bold: 700;
|
|
57
|
-
|
|
58
|
-
/* Type scale — size / line-height pairs (Figma Typography / Desktop) */
|
|
59
|
-
--ds-text-xs: 0.75rem; /* 12px */
|
|
60
|
-
--ds-text-xs-lh: 1.125rem; /* 18px */
|
|
61
|
-
--ds-text-sm: 0.875rem; /* 14px */
|
|
62
|
-
--ds-text-sm-lh: 1.25rem; /* 20px */
|
|
63
|
-
--ds-text-md: 1rem; /* 16px */
|
|
64
|
-
--ds-text-md-lh: 1.5rem; /* 24px */
|
|
65
|
-
--ds-text-lg: 1.125rem; /* 18px */
|
|
66
|
-
--ds-text-lg-lh: 1.75rem; /* 28px */
|
|
67
|
-
--ds-text-xl: 1.25rem; /* 20px */
|
|
68
|
-
--ds-text-xl-lh: 1.875rem; /* 30px */
|
|
69
|
-
--ds-display-xs: 1.5rem; /* 24px */
|
|
70
|
-
--ds-display-xs-lh: 2rem; /* 32px */
|
|
71
|
-
--ds-display-sm: 1.875rem; /* 30px */
|
|
72
|
-
--ds-display-sm-lh: 2.375rem; /* 38px */
|
|
73
|
-
--ds-display-md: 2.25rem; /* 36px */
|
|
74
|
-
--ds-display-md-lh: 2.75rem; /* 44px */
|
|
75
|
-
|
|
76
|
-
/* ── Spacing (4px grid) ─────────────────────────────────────── */
|
|
77
|
-
--ds-space-xxs: 2px;
|
|
78
|
-
--ds-space-xs: 4px;
|
|
79
|
-
--ds-space-sm: 6px;
|
|
80
|
-
--ds-space-md: 8px;
|
|
81
|
-
--ds-space-lg: 12px;
|
|
82
|
-
--ds-space-xl: 16px;
|
|
83
|
-
--ds-space-2xl: 20px;
|
|
84
|
-
--ds-space-3xl: 24px;
|
|
85
|
-
--ds-space-4xl: 32px;
|
|
86
|
-
--ds-space-5xl: 40px;
|
|
87
|
-
--ds-space-6xl: 48px;
|
|
88
|
-
|
|
89
|
-
/* ── Radius ─────────────────────────────────────────────────── */
|
|
90
|
-
--ds-radius-xs: 2px;
|
|
91
|
-
--ds-radius-sm: 4px; /* default — buttons, inputs, dropdowns */
|
|
92
|
-
--ds-radius-md: 8px; /* cards, tooltips, popovers */
|
|
93
|
-
--ds-radius-lg: 16px; /* modals, drawers */
|
|
94
|
-
--ds-radius-xl: 24px;
|
|
95
|
-
--ds-radius-full: 9999px;
|
|
96
|
-
|
|
97
|
-
/* ── Elevation (Figma effect styles — do not invent new ones) ─ */
|
|
98
|
-
--ds-shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
|
|
99
|
-
--ds-shadow-sm:
|
|
100
|
-
0 1px 3px 0 rgba(16, 24, 40, 0.1), 0 1px 2px 0 rgba(16, 24, 40, 0.06);
|
|
101
|
-
--ds-shadow-md:
|
|
102
|
-
0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
|
|
103
|
-
--ds-shadow-lg:
|
|
104
|
-
0 12px 16px -6px rgba(16, 24, 40, 0.08),
|
|
105
|
-
0 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
106
|
-
--ds-shadow-xl:
|
|
107
|
-
0 20px 24px -4px rgba(16, 24, 40, 0.08),
|
|
108
|
-
0 8px 8px -4px rgba(16, 24, 40, 0.03);
|
|
109
|
-
--ds-shadow-2xl: 0 24px 48px -12px rgba(16, 24, 40, 0.18);
|
|
110
|
-
--ds-shadow-3xl: 0 32px 64px -12px rgba(16, 24, 40, 0.14);
|
|
111
|
-
|
|
112
|
-
/* ── Motion ─────────────────────────────────────────────────── */
|
|
113
|
-
--ds-transition-fast: 120ms ease;
|
|
114
|
-
--ds-transition-base: 200ms ease;
|
|
115
|
-
|
|
116
|
-
/* ── Field density ──────────────────────────────────────────────
|
|
117
|
-
The DS publishes two field sizes, medium (32/14/8) and large (40/16/12).
|
|
118
|
-
Large is the default here; switch these four values to move the whole
|
|
119
|
-
form scale back to medium in one place. */
|
|
120
|
-
--ds-field-height: 40px;
|
|
121
|
-
--ds-field-font: 16px;
|
|
122
|
-
--ds-field-line: 24px;
|
|
123
|
-
--ds-field-pad-x: 12px;
|
|
124
|
-
|
|
125
|
-
/* ── Control heights ────────────────────────────────────────── */
|
|
126
|
-
--ds-control-height-sm: 24px;
|
|
127
|
-
--ds-control-height-md: 32px;
|
|
128
|
-
--ds-control-height-lg: 40px;
|
|
129
|
-
|
|
130
|
-
/* ── Focus ring (double ring — inner primary, outer white) ──── */
|
|
131
|
-
--ds-focus-ring-color: #1849a9;
|
|
132
|
-
--ds-focus-outline-color: #ffffff;
|
|
133
|
-
|
|
134
|
-
/* ── Colours that no PrimeUIX token covers ──────────────────── */
|
|
135
|
-
--ds-text-strong: #000b36; /* default label / body text */
|
|
136
|
-
--ds-text-secondary: #3c5073;
|
|
137
|
-
--ds-text-placeholder: #b6bdca;
|
|
138
|
-
--ds-disabled-bg: #d2d6db;
|
|
139
|
-
--ds-disabled-text: #6c7c96;
|
|
140
|
-
--ds-input-border: #d2d6db;
|
|
141
|
-
--ds-input-border-hover: #1f2a37;
|
|
142
|
-
--ds-input-border-readonly: #ced3dc;
|
|
143
|
-
--ds-danger: #a30000;
|
|
144
|
-
--ds-avatar-text: #233a61;
|
|
145
|
-
|
|
146
|
-
/* DatePicker — Figma 4250:1943. */
|
|
147
|
-
--ds-datepicker-panel-inline-size: 26.5rem;
|
|
148
|
-
--ds-datepicker-header-height: 3.5rem;
|
|
149
|
-
--ds-datepicker-weekday-height: 2.5rem;
|
|
150
|
-
--ds-datepicker-cell-size: 3.5rem;
|
|
151
|
-
--ds-datepicker-date-size: 3rem;
|
|
152
|
-
|
|
153
|
-
/* ── Chart palette (max 6 series — never add a 7th) ─────────── */
|
|
154
|
-
--ds-chart-series-1: #1849a9;
|
|
155
|
-
--ds-chart-series-2: #175cd3;
|
|
156
|
-
--ds-chart-series-3: #2e90fa;
|
|
157
|
-
--ds-chart-series-4: #53b1fd;
|
|
158
|
-
--ds-chart-series-5: #b2ddff;
|
|
159
|
-
--ds-chart-series-6: #d1e9ff;
|
|
160
|
-
--ds-chart-null: #d2d6db;
|
|
161
|
-
--ds-chart-skeleton: #e7e9ed;
|
|
162
|
-
--ds-chart-grid: #f3f4f6;
|
|
163
|
-
--ds-chart-title: #000b36;
|
|
164
|
-
--ds-chart-subtitle: #3c5073;
|
|
165
|
-
--ds-chart-axis-label: #6c7c96;
|
|
166
|
-
--ds-chart-tooltip-bg: #1a2236;
|
|
167
|
-
--ds-chart-kpi-positive: #006121;
|
|
168
|
-
--ds-chart-kpi-bg: rgba(0, 97, 33, 0.1);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/* ==========================================================================
|
|
172
|
-
Opt-in layer — everything below requires `html.mt-ds`
|
|
173
|
-
========================================================================== */
|
|
174
|
-
|
|
175
|
-
html.mt-ds {
|
|
176
|
-
/* One font for LTR and RTL alike; the DS has no per-language stack. */
|
|
177
|
-
--default-font-family: var(--ds-font-sans);
|
|
178
|
-
font-size: 16px;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/* The base stylesheet swaps in Cairo for Arabic. The DS deliberately does not:
|
|
182
|
-
IBM Plex Sans Arabic covers both scripts, and swapping breaks the rhythm. */
|
|
183
|
-
html.mt-ds:lang(ar) {
|
|
184
|
-
--default-font-family: var(--ds-font-sans);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
@supports (font-variation-settings: normal) {
|
|
188
|
-
html.mt-ds,
|
|
189
|
-
html.mt-ds:lang(ar) {
|
|
190
|
-
--default-font-family: var(--ds-font-sans);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
html.mt-ds body {
|
|
195
|
-
font-size: var(--ds-text-sm);
|
|
196
|
-
line-height: var(--ds-text-sm-lh);
|
|
197
|
-
font-weight: var(--ds-font-weight-regular);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/* ── Input underline ───────────────────────────────────────────
|
|
201
|
-
Distinctive DS behaviour: the field grows a 2px primary bar along its bottom
|
|
202
|
-
edge — one third wide while pressed, full width once focused. Implemented as
|
|
203
|
-
an animated background layer so it works on the bare <input> element without
|
|
204
|
-
a wrapper. These rules sit outside @layer primeng, so the per-property
|
|
205
|
-
cascade keeps `background-image` even though PrimeNG sets the `background`
|
|
206
|
-
shorthand. */
|
|
207
|
-
html.mt-ds
|
|
208
|
-
:is(
|
|
209
|
-
.p-inputtext,
|
|
210
|
-
.p-textarea,
|
|
211
|
-
.p-select,
|
|
212
|
-
.p-multiselect,
|
|
213
|
-
.p-datepicker-input
|
|
214
|
-
) {
|
|
215
|
-
background-image: linear-gradient(
|
|
216
|
-
to right,
|
|
217
|
-
var(--p-primary-color),
|
|
218
|
-
var(--p-primary-color)
|
|
219
|
-
);
|
|
220
|
-
background-repeat: no-repeat;
|
|
221
|
-
background-position: bottom center;
|
|
222
|
-
background-size: 0% 2px;
|
|
223
|
-
transition:
|
|
224
|
-
background-size 150ms ease,
|
|
225
|
-
border-color var(--ds-transition-fast),
|
|
226
|
-
background-color var(--ds-transition-fast);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
html.mt-ds :is(.p-inputtext, .p-textarea):active:not(:focus) {
|
|
230
|
-
background-size: 33% 2px;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
html.mt-ds :is(.p-inputtext, .p-textarea):focus,
|
|
234
|
-
html.mt-ds
|
|
235
|
-
:is(.p-select, .p-multiselect, .p-datepicker):is(
|
|
236
|
-
.p-focus,
|
|
237
|
-
.p-inputwrapper-focus
|
|
238
|
-
)
|
|
239
|
-
> :is(.p-select-label, .p-multiselect-label-container, .p-datepicker-input),
|
|
240
|
-
html.mt-ds :is(.p-select, .p-multiselect).p-focus {
|
|
241
|
-
background-size: 100% 2px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/* Error fields flip the bar to the DS danger red. */
|
|
245
|
-
html.mt-ds
|
|
246
|
-
:is(
|
|
247
|
-
.p-inputtext,
|
|
248
|
-
.p-textarea,
|
|
249
|
-
.p-select,
|
|
250
|
-
.p-multiselect
|
|
251
|
-
).ng-invalid.ng-touched,
|
|
252
|
-
html.mt-ds :is(.p-inputtext, .p-textarea, .p-select, .p-multiselect).p-invalid {
|
|
253
|
-
background-image: linear-gradient(
|
|
254
|
-
to right,
|
|
255
|
-
var(--ds-danger),
|
|
256
|
-
var(--ds-danger)
|
|
257
|
-
);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/* ── Disabled ──────────────────────────────────────────────────
|
|
261
|
-
Hard DS rule: disabled state is a colour swap, never an opacity fade. The
|
|
262
|
-
preset zeroes `disabledOpacity`; this catches the components that dim
|
|
263
|
-
themselves in component CSS rather than through the token. */
|
|
264
|
-
html.mt-ds .p-disabled,
|
|
265
|
-
html.mt-ds .p-component:disabled {
|
|
266
|
-
opacity: 1;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/* Elevation, tooltip and toast live with their components in ds-components/. */
|
|
270
|
-
|
|
271
|
-
/* ── Charts ────────────────────────────────────────────────────
|
|
272
|
-
Series colours are consumed by @masterteam/dashboard-builder through these
|
|
273
|
-
variables, so a chart re-themes with the rest of the identity. */
|
|
274
|
-
html.mt-ds {
|
|
275
|
-
--mt-chart-series-1: var(--ds-chart-series-1);
|
|
276
|
-
--mt-chart-series-2: var(--ds-chart-series-2);
|
|
277
|
-
--mt-chart-series-3: var(--ds-chart-series-3);
|
|
278
|
-
--mt-chart-series-4: var(--ds-chart-series-4);
|
|
279
|
-
--mt-chart-series-5: var(--ds-chart-series-5);
|
|
280
|
-
--mt-chart-series-6: var(--ds-chart-series-6);
|
|
281
|
-
--mt-chart-grid: var(--ds-chart-grid);
|
|
282
|
-
--mt-chart-title: var(--ds-chart-title);
|
|
283
|
-
--mt-chart-subtitle: var(--ds-chart-subtitle);
|
|
284
|
-
}
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Masterteam Design System — EXPERIMENTAL design identity
|
|
3
|
+
--------------------------------------------------------------------------
|
|
4
|
+
Source of truth : Figma WTmRAkJVvw0IvZMA7wBdTC · DsMasterteam (Storybook)
|
|
5
|
+
Angular port : @masterteam/components
|
|
6
|
+
|
|
7
|
+
This file has two parts:
|
|
8
|
+
|
|
9
|
+
1. `--ds-*` raw tokens on :root. Definitions only — declaring a custom
|
|
10
|
+
property paints nothing, so this part is always safe to ship.
|
|
11
|
+
2. Everything under `html.mt-ds`. This is where the identity is actually
|
|
12
|
+
applied. Nothing here renders until the host opts in with
|
|
13
|
+
`provideMTComponents({ designIdentity: 'experimental' })` or
|
|
14
|
+
`setMTDesignIdentity('experimental')`.
|
|
15
|
+
|
|
16
|
+
Three layers make up the identity:
|
|
17
|
+
|
|
18
|
+
1. The PrimeUIX preset (`src/lib/config/ds-identity.preset.ts`) — the
|
|
19
|
+
palette and the coarse geometry, reaching every component at once.
|
|
20
|
+
2. `ds-components/*.css` — per-component specs transcribed from the DS
|
|
21
|
+
modules: exact heights, per-state borders, variant colours, focus
|
|
22
|
+
rings. These are what make an `mt-*` component read as its DS
|
|
23
|
+
counterpart rather than merely share its palette.
|
|
24
|
+
3. This file — the cross-cutting remainder: font, type, the animated
|
|
25
|
+
input underline, tooltip, charts.
|
|
26
|
+
|
|
27
|
+
Layers 2 and 3 are deliberately **unlayered** CSS. Tailwind utilities live
|
|
28
|
+
in `@layer utilities` and the PrimeNG theme in `@layer primeng`, and
|
|
29
|
+
unlayered rules outrank both — so the DS look lands on hand-rolled Tailwind
|
|
30
|
+
components and PrimeNG wrappers alike, with no `!important` and no template
|
|
31
|
+
changes.
|
|
32
|
+
========================================================================== */
|
|
33
|
+
|
|
34
|
+
@import "./ibm-plex-sans-arabic.css";
|
|
35
|
+
|
|
36
|
+
/* Per-component DS specs. Order matters: later files win ties. */
|
|
37
|
+
@import "./ds-components/button.css";
|
|
38
|
+
@import "./ds-components/field.css";
|
|
39
|
+
@import "./ds-components/datepicker.css";
|
|
40
|
+
@import "./ds-components/selection-controls.css";
|
|
41
|
+
@import "./ds-components/tabs.css";
|
|
42
|
+
@import "./ds-components/content-switcher.css";
|
|
43
|
+
@import "./ds-components/table.css";
|
|
44
|
+
@import "./ds-components/surfaces.css";
|
|
45
|
+
@import "./ds-components/overlay.css";
|
|
46
|
+
@import "./ds-components/feedback.css";
|
|
47
|
+
@import "./ds-components/pagination.css";
|
|
48
|
+
@import "./ds-components/misc.css";
|
|
49
|
+
|
|
50
|
+
:root {
|
|
51
|
+
/* ── Typography ─────────────────────────────────────────────── */
|
|
52
|
+
--ds-font-sans: "IBM Plex Sans Arabic", system-ui, "Segoe UI", sans-serif;
|
|
53
|
+
--ds-font-weight-regular: 400;
|
|
54
|
+
--ds-font-weight-medium: 500;
|
|
55
|
+
--ds-font-weight-semibold: 600;
|
|
56
|
+
--ds-font-weight-bold: 700;
|
|
57
|
+
|
|
58
|
+
/* Type scale — size / line-height pairs (Figma Typography / Desktop) */
|
|
59
|
+
--ds-text-xs: 0.75rem; /* 12px */
|
|
60
|
+
--ds-text-xs-lh: 1.125rem; /* 18px */
|
|
61
|
+
--ds-text-sm: 0.875rem; /* 14px */
|
|
62
|
+
--ds-text-sm-lh: 1.25rem; /* 20px */
|
|
63
|
+
--ds-text-md: 1rem; /* 16px */
|
|
64
|
+
--ds-text-md-lh: 1.5rem; /* 24px */
|
|
65
|
+
--ds-text-lg: 1.125rem; /* 18px */
|
|
66
|
+
--ds-text-lg-lh: 1.75rem; /* 28px */
|
|
67
|
+
--ds-text-xl: 1.25rem; /* 20px */
|
|
68
|
+
--ds-text-xl-lh: 1.875rem; /* 30px */
|
|
69
|
+
--ds-display-xs: 1.5rem; /* 24px */
|
|
70
|
+
--ds-display-xs-lh: 2rem; /* 32px */
|
|
71
|
+
--ds-display-sm: 1.875rem; /* 30px */
|
|
72
|
+
--ds-display-sm-lh: 2.375rem; /* 38px */
|
|
73
|
+
--ds-display-md: 2.25rem; /* 36px */
|
|
74
|
+
--ds-display-md-lh: 2.75rem; /* 44px */
|
|
75
|
+
|
|
76
|
+
/* ── Spacing (4px grid) ─────────────────────────────────────── */
|
|
77
|
+
--ds-space-xxs: 2px;
|
|
78
|
+
--ds-space-xs: 4px;
|
|
79
|
+
--ds-space-sm: 6px;
|
|
80
|
+
--ds-space-md: 8px;
|
|
81
|
+
--ds-space-lg: 12px;
|
|
82
|
+
--ds-space-xl: 16px;
|
|
83
|
+
--ds-space-2xl: 20px;
|
|
84
|
+
--ds-space-3xl: 24px;
|
|
85
|
+
--ds-space-4xl: 32px;
|
|
86
|
+
--ds-space-5xl: 40px;
|
|
87
|
+
--ds-space-6xl: 48px;
|
|
88
|
+
|
|
89
|
+
/* ── Radius ─────────────────────────────────────────────────── */
|
|
90
|
+
--ds-radius-xs: 2px;
|
|
91
|
+
--ds-radius-sm: 4px; /* default — buttons, inputs, dropdowns */
|
|
92
|
+
--ds-radius-md: 8px; /* cards, tooltips, popovers */
|
|
93
|
+
--ds-radius-lg: 16px; /* modals, drawers */
|
|
94
|
+
--ds-radius-xl: 24px;
|
|
95
|
+
--ds-radius-full: 9999px;
|
|
96
|
+
|
|
97
|
+
/* ── Elevation (Figma effect styles — do not invent new ones) ─ */
|
|
98
|
+
--ds-shadow-xs: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
|
|
99
|
+
--ds-shadow-sm:
|
|
100
|
+
0 1px 3px 0 rgba(16, 24, 40, 0.1), 0 1px 2px 0 rgba(16, 24, 40, 0.06);
|
|
101
|
+
--ds-shadow-md:
|
|
102
|
+
0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
|
|
103
|
+
--ds-shadow-lg:
|
|
104
|
+
0 12px 16px -6px rgba(16, 24, 40, 0.08),
|
|
105
|
+
0 4px 6px -2px rgba(16, 24, 40, 0.03);
|
|
106
|
+
--ds-shadow-xl:
|
|
107
|
+
0 20px 24px -4px rgba(16, 24, 40, 0.08),
|
|
108
|
+
0 8px 8px -4px rgba(16, 24, 40, 0.03);
|
|
109
|
+
--ds-shadow-2xl: 0 24px 48px -12px rgba(16, 24, 40, 0.18);
|
|
110
|
+
--ds-shadow-3xl: 0 32px 64px -12px rgba(16, 24, 40, 0.14);
|
|
111
|
+
|
|
112
|
+
/* ── Motion ─────────────────────────────────────────────────── */
|
|
113
|
+
--ds-transition-fast: 120ms ease;
|
|
114
|
+
--ds-transition-base: 200ms ease;
|
|
115
|
+
|
|
116
|
+
/* ── Field density ──────────────────────────────────────────────
|
|
117
|
+
The DS publishes two field sizes, medium (32/14/8) and large (40/16/12).
|
|
118
|
+
Large is the default here; switch these four values to move the whole
|
|
119
|
+
form scale back to medium in one place. */
|
|
120
|
+
--ds-field-height: 40px;
|
|
121
|
+
--ds-field-font: 16px;
|
|
122
|
+
--ds-field-line: 24px;
|
|
123
|
+
--ds-field-pad-x: 12px;
|
|
124
|
+
|
|
125
|
+
/* ── Control heights ────────────────────────────────────────── */
|
|
126
|
+
--ds-control-height-sm: 24px;
|
|
127
|
+
--ds-control-height-md: 32px;
|
|
128
|
+
--ds-control-height-lg: 40px;
|
|
129
|
+
|
|
130
|
+
/* ── Focus ring (double ring — inner primary, outer white) ──── */
|
|
131
|
+
--ds-focus-ring-color: #1849a9;
|
|
132
|
+
--ds-focus-outline-color: #ffffff;
|
|
133
|
+
|
|
134
|
+
/* ── Colours that no PrimeUIX token covers ──────────────────── */
|
|
135
|
+
--ds-text-strong: #000b36; /* default label / body text */
|
|
136
|
+
--ds-text-secondary: #3c5073;
|
|
137
|
+
--ds-text-placeholder: #b6bdca;
|
|
138
|
+
--ds-disabled-bg: #d2d6db;
|
|
139
|
+
--ds-disabled-text: #6c7c96;
|
|
140
|
+
--ds-input-border: #d2d6db;
|
|
141
|
+
--ds-input-border-hover: #1f2a37;
|
|
142
|
+
--ds-input-border-readonly: #ced3dc;
|
|
143
|
+
--ds-danger: #a30000;
|
|
144
|
+
--ds-avatar-text: #233a61;
|
|
145
|
+
|
|
146
|
+
/* DatePicker — Figma 4250:1943. */
|
|
147
|
+
--ds-datepicker-panel-inline-size: 26.5rem;
|
|
148
|
+
--ds-datepicker-header-height: 3.5rem;
|
|
149
|
+
--ds-datepicker-weekday-height: 2.5rem;
|
|
150
|
+
--ds-datepicker-cell-size: 3.5rem;
|
|
151
|
+
--ds-datepicker-date-size: 3rem;
|
|
152
|
+
|
|
153
|
+
/* ── Chart palette (max 6 series — never add a 7th) ─────────── */
|
|
154
|
+
--ds-chart-series-1: #1849a9;
|
|
155
|
+
--ds-chart-series-2: #175cd3;
|
|
156
|
+
--ds-chart-series-3: #2e90fa;
|
|
157
|
+
--ds-chart-series-4: #53b1fd;
|
|
158
|
+
--ds-chart-series-5: #b2ddff;
|
|
159
|
+
--ds-chart-series-6: #d1e9ff;
|
|
160
|
+
--ds-chart-null: #d2d6db;
|
|
161
|
+
--ds-chart-skeleton: #e7e9ed;
|
|
162
|
+
--ds-chart-grid: #f3f4f6;
|
|
163
|
+
--ds-chart-title: #000b36;
|
|
164
|
+
--ds-chart-subtitle: #3c5073;
|
|
165
|
+
--ds-chart-axis-label: #6c7c96;
|
|
166
|
+
--ds-chart-tooltip-bg: #1a2236;
|
|
167
|
+
--ds-chart-kpi-positive: #006121;
|
|
168
|
+
--ds-chart-kpi-bg: rgba(0, 97, 33, 0.1);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* ==========================================================================
|
|
172
|
+
Opt-in layer — everything below requires `html.mt-ds`
|
|
173
|
+
========================================================================== */
|
|
174
|
+
|
|
175
|
+
html.mt-ds {
|
|
176
|
+
/* One font for LTR and RTL alike; the DS has no per-language stack. */
|
|
177
|
+
--default-font-family: var(--ds-font-sans);
|
|
178
|
+
font-size: 16px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* The base stylesheet swaps in Cairo for Arabic. The DS deliberately does not:
|
|
182
|
+
IBM Plex Sans Arabic covers both scripts, and swapping breaks the rhythm. */
|
|
183
|
+
html.mt-ds:lang(ar) {
|
|
184
|
+
--default-font-family: var(--ds-font-sans);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@supports (font-variation-settings: normal) {
|
|
188
|
+
html.mt-ds,
|
|
189
|
+
html.mt-ds:lang(ar) {
|
|
190
|
+
--default-font-family: var(--ds-font-sans);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
html.mt-ds body {
|
|
195
|
+
font-size: var(--ds-text-sm);
|
|
196
|
+
line-height: var(--ds-text-sm-lh);
|
|
197
|
+
font-weight: var(--ds-font-weight-regular);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* ── Input underline ───────────────────────────────────────────
|
|
201
|
+
Distinctive DS behaviour: the field grows a 2px primary bar along its bottom
|
|
202
|
+
edge — one third wide while pressed, full width once focused. Implemented as
|
|
203
|
+
an animated background layer so it works on the bare <input> element without
|
|
204
|
+
a wrapper. These rules sit outside @layer primeng, so the per-property
|
|
205
|
+
cascade keeps `background-image` even though PrimeNG sets the `background`
|
|
206
|
+
shorthand. */
|
|
207
|
+
html.mt-ds
|
|
208
|
+
:is(
|
|
209
|
+
.p-inputtext,
|
|
210
|
+
.p-textarea,
|
|
211
|
+
.p-select,
|
|
212
|
+
.p-multiselect,
|
|
213
|
+
.p-datepicker-input
|
|
214
|
+
) {
|
|
215
|
+
background-image: linear-gradient(
|
|
216
|
+
to right,
|
|
217
|
+
var(--p-primary-color),
|
|
218
|
+
var(--p-primary-color)
|
|
219
|
+
);
|
|
220
|
+
background-repeat: no-repeat;
|
|
221
|
+
background-position: bottom center;
|
|
222
|
+
background-size: 0% 2px;
|
|
223
|
+
transition:
|
|
224
|
+
background-size 150ms ease,
|
|
225
|
+
border-color var(--ds-transition-fast),
|
|
226
|
+
background-color var(--ds-transition-fast);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
html.mt-ds :is(.p-inputtext, .p-textarea):active:not(:focus) {
|
|
230
|
+
background-size: 33% 2px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
html.mt-ds :is(.p-inputtext, .p-textarea):focus,
|
|
234
|
+
html.mt-ds
|
|
235
|
+
:is(.p-select, .p-multiselect, .p-datepicker):is(
|
|
236
|
+
.p-focus,
|
|
237
|
+
.p-inputwrapper-focus
|
|
238
|
+
)
|
|
239
|
+
> :is(.p-select-label, .p-multiselect-label-container, .p-datepicker-input),
|
|
240
|
+
html.mt-ds :is(.p-select, .p-multiselect).p-focus {
|
|
241
|
+
background-size: 100% 2px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* Error fields flip the bar to the DS danger red. */
|
|
245
|
+
html.mt-ds
|
|
246
|
+
:is(
|
|
247
|
+
.p-inputtext,
|
|
248
|
+
.p-textarea,
|
|
249
|
+
.p-select,
|
|
250
|
+
.p-multiselect
|
|
251
|
+
).ng-invalid.ng-touched,
|
|
252
|
+
html.mt-ds :is(.p-inputtext, .p-textarea, .p-select, .p-multiselect).p-invalid {
|
|
253
|
+
background-image: linear-gradient(
|
|
254
|
+
to right,
|
|
255
|
+
var(--ds-danger),
|
|
256
|
+
var(--ds-danger)
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* ── Disabled ──────────────────────────────────────────────────
|
|
261
|
+
Hard DS rule: disabled state is a colour swap, never an opacity fade. The
|
|
262
|
+
preset zeroes `disabledOpacity`; this catches the components that dim
|
|
263
|
+
themselves in component CSS rather than through the token. */
|
|
264
|
+
html.mt-ds .p-disabled,
|
|
265
|
+
html.mt-ds .p-component:disabled {
|
|
266
|
+
opacity: 1;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Elevation, tooltip and toast live with their components in ds-components/. */
|
|
270
|
+
|
|
271
|
+
/* ── Charts ────────────────────────────────────────────────────
|
|
272
|
+
Series colours are consumed by @masterteam/dashboard-builder through these
|
|
273
|
+
variables, so a chart re-themes with the rest of the identity. */
|
|
274
|
+
html.mt-ds {
|
|
275
|
+
--mt-chart-series-1: var(--ds-chart-series-1);
|
|
276
|
+
--mt-chart-series-2: var(--ds-chart-series-2);
|
|
277
|
+
--mt-chart-series-3: var(--ds-chart-series-3);
|
|
278
|
+
--mt-chart-series-4: var(--ds-chart-series-4);
|
|
279
|
+
--mt-chart-series-5: var(--ds-chart-series-5);
|
|
280
|
+
--mt-chart-series-6: var(--ds-chart-series-6);
|
|
281
|
+
--mt-chart-grid: var(--ds-chart-grid);
|
|
282
|
+
--mt-chart-title: var(--ds-chart-title);
|
|
283
|
+
--mt-chart-subtitle: var(--ds-chart-subtitle);
|
|
284
|
+
}
|
package/assets/i18n/ar.json
CHANGED
|
@@ -243,7 +243,8 @@
|
|
|
243
243
|
"search": "بحث..."
|
|
244
244
|
},
|
|
245
245
|
"userReference": {
|
|
246
|
-
"notLinked": "هذا المستخدم لم يعد مرتبطًا بهذا التطبيق. تم الاحتفاظ بالسجلات التاريخية للرجوع إليها."
|
|
246
|
+
"notLinked": "هذا المستخدم لم يعد مرتبطًا بهذا التطبيق. تم الاحتفاظ بالسجلات التاريخية للرجوع إليها.",
|
|
247
|
+
"showMore": "عرض {{count}} مستخدمين إضافيين"
|
|
247
248
|
},
|
|
248
249
|
"locationField": {
|
|
249
250
|
"search": "بحث...",
|
package/assets/i18n/en.json
CHANGED
|
@@ -243,7 +243,8 @@
|
|
|
243
243
|
"search": "Search..."
|
|
244
244
|
},
|
|
245
245
|
"userReference": {
|
|
246
|
-
"notLinked": "This user is no longer linked to this application. Historical records are kept for reference."
|
|
246
|
+
"notLinked": "This user is no longer linked to this application. Historical records are kept for reference.",
|
|
247
|
+
"showMore": "Show {{count}} more users"
|
|
247
248
|
},
|
|
248
249
|
"locationField": {
|
|
249
250
|
"search": "Search...",
|
|
@@ -639,8 +639,12 @@ class SchedulePredecessorField {
|
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
641
|
mapTaskOptions(data) {
|
|
642
|
-
|
|
643
|
-
|
|
642
|
+
// Labels show the ROW NUMBER (1-based position in the same pre-order walk
|
|
643
|
+
// the grid's ID column numbers), not the backend id — the two surfaces
|
|
644
|
+
// must speak one coordinate. The option VALUE stays the real id: the
|
|
645
|
+
// compact predecessor string this field produces is wire format.
|
|
646
|
+
return this.flattenRecords(this.resolveRootRecords(data?.records ?? [], data?.projectionMeta?.rootIds ?? [])).map((record, index) => ({
|
|
647
|
+
label: `${index + 1} - ${record.name ?? record.id}`,
|
|
644
648
|
value: String(record.id),
|
|
645
649
|
}));
|
|
646
650
|
}
|