@masterteam/components 0.0.333 → 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.
- package/assets/common.css +1 -1
- package/fesm2022/masterteam-components-client-page.mjs +10 -4
- package/fesm2022/masterteam-components-client-page.mjs.map +1 -1
- package/fesm2022/masterteam-components-dynamic-drawer.mjs +112 -112
- package/fesm2022/masterteam-components-dynamic-drawer.mjs.map +1 -1
- package/fesm2022/masterteam-components-entities.mjs +8 -3
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-formula.mjs +4 -4
- package/fesm2022/masterteam-components-formula.mjs.map +1 -1
- package/fesm2022/masterteam-components-select-field.mjs +2 -2
- package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-slider-field.mjs +2 -2
- package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-tooltip.mjs +11 -3
- package/fesm2022/masterteam-components-tooltip.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs +3 -662
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-client-page.d.ts +7 -2
- package/types/masterteam-components-entities.d.ts +8 -5
- package/types/masterteam-components-tooltip.d.ts +1 -0
- package/types/masterteam-components.d.ts +2 -174
- package/assets/ds-components/button.css +0 -385
- package/assets/ds-components/content-switcher.css +0 -124
- package/assets/ds-components/feedback.css +0 -220
- package/assets/ds-components/field.css +0 -526
- package/assets/ds-components/misc.css +0 -252
- package/assets/ds-components/overlay.css +0 -268
- package/assets/ds-components/pagination.css +0 -140
- package/assets/ds-components/selection-controls.css +0 -245
- package/assets/ds-components/surfaces.css +0 -173
- package/assets/ds-components/table.css +0 -142
- package/assets/ds-components/tabs.css +0 -331
- package/assets/ds-identity.css +0 -275
- package/assets/fonts/IBMPlexSansArabic-400-arabic.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-400-latin.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-500-arabic.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-500-latin.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-600-arabic.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-600-latin.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-700-arabic.woff2 +0 -0
- package/assets/fonts/IBMPlexSansArabic-700-latin.woff2 +0 -0
- package/assets/ibm-plex-sans-arabic.css +0 -100
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { providePrimeNG } from 'primeng/config';
|
|
2
2
|
import Aura from '@primeuix/themes/aura';
|
|
3
|
-
import { updatePreset, definePreset
|
|
3
|
+
import { updatePreset, definePreset } from '@primeuix/themes';
|
|
4
4
|
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { InjectionToken, makeEnvironmentProviders, computed, inject, LOCALE_ID, Pipe } from '@angular/core';
|
|
@@ -161,634 +161,6 @@ function generateTailwindPalette(baseColorHex, baseColorShade = '500') {
|
|
|
161
161
|
return palette;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
/**
|
|
165
|
-
* Masterteam Design System — raw palettes and scales.
|
|
166
|
-
*
|
|
167
|
-
* Transcribed from the DS Storybook foundations (Figma
|
|
168
|
-
* `WTmRAkJVvw0IvZMA7wBdTC`). These are primitives: they name colours, not
|
|
169
|
-
* roles. The mapping from primitive to role lives in `ds-identity.preset.ts`.
|
|
170
|
-
*
|
|
171
|
-
* Adding a value here without a corresponding Figma variable is how a design
|
|
172
|
-
* system drifts — extend the Figma file first, then mirror it.
|
|
173
|
-
*/
|
|
174
|
-
/** Primary blue. 800 is the primary button background. */
|
|
175
|
-
const DS_BLUE = {
|
|
176
|
-
25: '#F5FAFF',
|
|
177
|
-
50: '#EFF8FF',
|
|
178
|
-
100: '#D1E9FF',
|
|
179
|
-
200: '#B2DDFF',
|
|
180
|
-
300: '#84CAFF',
|
|
181
|
-
400: '#53B1FD',
|
|
182
|
-
500: '#2E90FA',
|
|
183
|
-
600: '#1570EF',
|
|
184
|
-
700: '#175CD3',
|
|
185
|
-
800: '#1849A9',
|
|
186
|
-
900: '#194185',
|
|
187
|
-
950: '#102A56',
|
|
188
|
-
};
|
|
189
|
-
/** Secondary indigo — accents, tags, selected states. */
|
|
190
|
-
const DS_INDIGO = {
|
|
191
|
-
25: '#F5F8FF',
|
|
192
|
-
50: '#EEF4FF',
|
|
193
|
-
100: '#E0EAFF',
|
|
194
|
-
200: '#C7D7FE',
|
|
195
|
-
300: '#A4BCFD',
|
|
196
|
-
400: '#8098F9',
|
|
197
|
-
500: '#6172F3',
|
|
198
|
-
600: '#444CE7',
|
|
199
|
-
700: '#3538CD',
|
|
200
|
-
800: '#2D31A6',
|
|
201
|
-
900: '#2D3282',
|
|
202
|
-
950: '#1F235B',
|
|
203
|
-
};
|
|
204
|
-
const DS_SUCCESS = {
|
|
205
|
-
25: '#F6FEF9',
|
|
206
|
-
50: '#ECFDF3',
|
|
207
|
-
100: '#DCFAE6',
|
|
208
|
-
200: '#A9EFC5',
|
|
209
|
-
300: '#75E0A7',
|
|
210
|
-
400: '#47CD89',
|
|
211
|
-
500: '#17B26A',
|
|
212
|
-
600: '#079455',
|
|
213
|
-
700: '#067647',
|
|
214
|
-
800: '#085D3A',
|
|
215
|
-
900: '#074D31',
|
|
216
|
-
950: '#053321',
|
|
217
|
-
};
|
|
218
|
-
const DS_WARNING = {
|
|
219
|
-
25: '#FFFCF5',
|
|
220
|
-
50: '#FFFAEB',
|
|
221
|
-
100: '#FEF0C7',
|
|
222
|
-
200: '#FEDF89',
|
|
223
|
-
300: '#FEC84B',
|
|
224
|
-
400: '#FDB022',
|
|
225
|
-
500: '#F79009',
|
|
226
|
-
600: '#DC6803',
|
|
227
|
-
700: '#B54708',
|
|
228
|
-
800: '#93370D',
|
|
229
|
-
900: '#7A2E0E',
|
|
230
|
-
950: '#4E1D09',
|
|
231
|
-
};
|
|
232
|
-
const DS_ERROR = {
|
|
233
|
-
25: '#FFFBFA',
|
|
234
|
-
50: '#FEF3F2',
|
|
235
|
-
100: '#FEE4E2',
|
|
236
|
-
200: '#FECDCA',
|
|
237
|
-
300: '#FDA29B',
|
|
238
|
-
400: '#F97066',
|
|
239
|
-
500: '#F04438',
|
|
240
|
-
600: '#D92D20',
|
|
241
|
-
700: '#B42318',
|
|
242
|
-
800: '#912018',
|
|
243
|
-
900: '#7A271A',
|
|
244
|
-
950: '#55160C',
|
|
245
|
-
};
|
|
246
|
-
/** Neutral scale. Note it stops at 900 in Figma; 0/25/950 are extrapolated
|
|
247
|
-
* because PrimeUIX requires a full 0–950 surface ramp. */
|
|
248
|
-
const DS_GRAY = {
|
|
249
|
-
0: '#FFFFFF',
|
|
250
|
-
25: '#FCFCFD',
|
|
251
|
-
50: '#F9FAFB',
|
|
252
|
-
100: '#F3F4F6',
|
|
253
|
-
200: '#E5E7EB',
|
|
254
|
-
300: '#D1D5DB',
|
|
255
|
-
400: '#9CA3AF',
|
|
256
|
-
500: '#6B7280',
|
|
257
|
-
600: '#4B5563',
|
|
258
|
-
700: '#374151',
|
|
259
|
-
800: '#1F2937',
|
|
260
|
-
900: '#111827',
|
|
261
|
-
950: '#0A0F1C',
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* Semantic values that are not part of a ramp. Each one is a named Figma
|
|
265
|
-
* variable in its own right.
|
|
266
|
-
*/
|
|
267
|
-
const DS_SEMANTIC = {
|
|
268
|
-
/** Default body / label text. Deliberately navy-black, not gray-900. */
|
|
269
|
-
textStrong: '#000B36',
|
|
270
|
-
textSecondary: '#3C5073',
|
|
271
|
-
textPlaceholder: '#B6BDCA',
|
|
272
|
-
textHelper: '#384250',
|
|
273
|
-
surface: '#FFFFFF',
|
|
274
|
-
border: '#E5E7EB',
|
|
275
|
-
/** Disabled is a colour swap, never an opacity fade. */
|
|
276
|
-
disabledBg: '#D2D6DB',
|
|
277
|
-
disabledText: '#6C7C96',
|
|
278
|
-
inputBorder: '#D2D6DB',
|
|
279
|
-
inputBorderHover: '#1F2A37',
|
|
280
|
-
inputBorderReadonly: '#CED3DC',
|
|
281
|
-
inputBgPressed: '#F3F4F6',
|
|
282
|
-
/** Destructive red. Distinct from the error ramp — this is the button colour. */
|
|
283
|
-
danger: '#A30000',
|
|
284
|
-
dangerSecondaryBg: '#FCDAD7',
|
|
285
|
-
dangerSecondaryBgHover: '#F8BAB5',
|
|
286
|
-
dangerSecondaryBgPressed: '#F3908A',
|
|
287
|
-
/** Tinted secondary button, expressed as primary-at-opacity. */
|
|
288
|
-
secondaryBg: 'rgba(24, 73, 169, 0.2)',
|
|
289
|
-
secondaryBgHover: 'rgba(24, 73, 169, 0.1)',
|
|
290
|
-
focusRing: '#1849A9',
|
|
291
|
-
focusOutline: '#FFFFFF',
|
|
292
|
-
tooltipBg: '#1A2236',
|
|
293
|
-
};
|
|
294
|
-
/** Figma effect styles. Never invent a shadow outside this set. */
|
|
295
|
-
const DS_SHADOW = {
|
|
296
|
-
xs: '0 1px 2px 0 rgba(16, 24, 40, 0.05)',
|
|
297
|
-
sm: '0 1px 3px 0 rgba(16, 24, 40, 0.10), 0 1px 2px 0 rgba(16, 24, 40, 0.06)',
|
|
298
|
-
md: '0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06)',
|
|
299
|
-
lg: '0 12px 16px -6px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03)',
|
|
300
|
-
xl: '0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03)',
|
|
301
|
-
'2xl': '0 24px 48px -12px rgba(16, 24, 40, 0.18)',
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Radius scale. The DS names differ from the PrimeUIX names by one step —
|
|
305
|
-
* DS `radius-sm` (4px, the default for buttons and inputs) lands on PrimeUIX
|
|
306
|
-
* `md`, because that is the key PrimeNG components reference. Mapping them
|
|
307
|
-
* here keeps the shift in one place instead of spreading it across overrides.
|
|
308
|
-
*/
|
|
309
|
-
const DS_RADIUS = {
|
|
310
|
-
none: '0',
|
|
311
|
-
/** DS radius-xs — code badges, small tags */
|
|
312
|
-
xs: '2px',
|
|
313
|
-
/** DS radius-xs..sm boundary */
|
|
314
|
-
sm: '4px',
|
|
315
|
-
/** DS radius-sm — buttons, inputs, dropdowns (PrimeNG's default reference) */
|
|
316
|
-
md: '4px',
|
|
317
|
-
/** DS radius-md — cards, tooltips, popovers */
|
|
318
|
-
lg: '8px',
|
|
319
|
-
/** DS radius-lg — modals, drawers */
|
|
320
|
-
xl: '16px',
|
|
321
|
-
};
|
|
322
|
-
/** Control heights, in px, from the Figma button spacing frame. */
|
|
323
|
-
const DS_CONTROL_HEIGHT = {
|
|
324
|
-
sm: 24,
|
|
325
|
-
md: 32,
|
|
326
|
-
lg: 40,
|
|
327
|
-
};
|
|
328
|
-
const DS_FONT_FAMILY = "'IBM Plex Sans Arabic', system-ui, 'Segoe UI', sans-serif";
|
|
329
|
-
/** Ordered chart series. Six is the hard maximum. */
|
|
330
|
-
const DS_CHART_SERIES = [
|
|
331
|
-
'#1849A9',
|
|
332
|
-
'#175CD3',
|
|
333
|
-
'#2E90FA',
|
|
334
|
-
'#53B1FD',
|
|
335
|
-
'#B2DDFF',
|
|
336
|
-
'#D1E9FF',
|
|
337
|
-
];
|
|
338
|
-
|
|
339
|
-
/** Root class that gates the CSS half of the identity. */
|
|
340
|
-
const MT_DESIGN_IDENTITY_CLASS = 'mt-ds';
|
|
341
|
-
/** DS primary button background. Used when the host does not brand the app. */
|
|
342
|
-
const DS_DEFAULT_PRIMARY_COLOR = DS_BLUE[800];
|
|
343
|
-
/**
|
|
344
|
-
* PrimeUIX wants a 50–950 ramp; the DS publishes 25–950. Drop the 25 step and
|
|
345
|
-
* keep the rest — the ramp is dense enough that nothing downstream misses it.
|
|
346
|
-
*/
|
|
347
|
-
function toPrimeRamp(scale) {
|
|
348
|
-
return {
|
|
349
|
-
50: scale[50],
|
|
350
|
-
100: scale[100],
|
|
351
|
-
200: scale[200],
|
|
352
|
-
300: scale[300],
|
|
353
|
-
400: scale[400],
|
|
354
|
-
500: scale[500],
|
|
355
|
-
600: scale[600],
|
|
356
|
-
700: scale[700],
|
|
357
|
-
800: scale[800],
|
|
358
|
-
900: scale[900],
|
|
359
|
-
950: scale[950],
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Control geometry, derived rather than hardcoded so the relationship between
|
|
364
|
-
* height, line-height and border stays visible:
|
|
365
|
-
*
|
|
366
|
-
* height = lineHeight + 2 * paddingY + 2 * border(1px)
|
|
367
|
-
*
|
|
368
|
-
* sm 24px = 18 + 2*2 + 2
|
|
369
|
-
* md 32px = 20 + 2*5 + 2 ← default
|
|
370
|
-
* lg 40px = 24 + 2*7 + 2
|
|
371
|
-
*/
|
|
372
|
-
const FIELD = {
|
|
373
|
-
sm: { fontSize: '0.75rem', paddingX: '0.5rem', paddingY: '0.125rem' },
|
|
374
|
-
md: { fontSize: '0.875rem', paddingX: '0.5rem', paddingY: '0.3125rem' },
|
|
375
|
-
lg: { fontSize: '1rem', paddingX: '0.75rem', paddingY: '0.4375rem' },
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* The DS identity as a partial preset.
|
|
379
|
-
*
|
|
380
|
-
* @param primaryColor Optional brand override. Tenants that white-label the
|
|
381
|
-
* product still need their own colour; when omitted the DS blue is used.
|
|
382
|
-
* Note the DS itself treats the blue as fixed — an override is a deliberate
|
|
383
|
-
* deviation, not a supported DS variant.
|
|
384
|
-
*/
|
|
385
|
-
function dsIdentityConfigs(primaryColor) {
|
|
386
|
-
const primary = primaryColor
|
|
387
|
-
? // A branded run keeps the DS ramp shape but re-anchors the key steps, so
|
|
388
|
-
// hover/pressed stay one and two steps darker as the DS specifies.
|
|
389
|
-
{ ...toPrimeRamp(DS_BLUE), 800: primaryColor }
|
|
390
|
-
: toPrimeRamp(DS_BLUE);
|
|
391
|
-
return {
|
|
392
|
-
primitive: {
|
|
393
|
-
borderRadius: { ...DS_RADIUS },
|
|
394
|
-
blue: toPrimeRamp(DS_BLUE),
|
|
395
|
-
indigo: toPrimeRamp(DS_INDIGO),
|
|
396
|
-
green: toPrimeRamp(DS_SUCCESS),
|
|
397
|
-
emerald: toPrimeRamp(DS_SUCCESS),
|
|
398
|
-
amber: toPrimeRamp(DS_WARNING),
|
|
399
|
-
orange: toPrimeRamp(DS_WARNING),
|
|
400
|
-
yellow: toPrimeRamp(DS_WARNING),
|
|
401
|
-
red: toPrimeRamp(DS_ERROR),
|
|
402
|
-
rose: toPrimeRamp(DS_ERROR),
|
|
403
|
-
gray: toPrimeRamp(DS_GRAY),
|
|
404
|
-
slate: toPrimeRamp(DS_GRAY),
|
|
405
|
-
zinc: toPrimeRamp(DS_GRAY),
|
|
406
|
-
},
|
|
407
|
-
semantic: {
|
|
408
|
-
primary,
|
|
409
|
-
transitionDuration: '0.2s',
|
|
410
|
-
/**
|
|
411
|
-
* Disabled is a colour swap, never a fade — a hard DS rule, because a
|
|
412
|
-
* faded control on a tinted surface stops meeting contrast at all.
|
|
413
|
-
*/
|
|
414
|
-
disabledOpacity: '1',
|
|
415
|
-
iconSize: '1rem',
|
|
416
|
-
/**
|
|
417
|
-
* Inner 2px primary ring. The outer 3px white halo cannot be expressed as
|
|
418
|
-
* a token (PrimeUIX renders `focusRing` as a single outline) and is added
|
|
419
|
-
* in `ds-identity.css`.
|
|
420
|
-
*/
|
|
421
|
-
focusRing: {
|
|
422
|
-
width: '2px',
|
|
423
|
-
style: 'solid',
|
|
424
|
-
color: '{primary.color}',
|
|
425
|
-
offset: '0',
|
|
426
|
-
shadow: 'none',
|
|
427
|
-
},
|
|
428
|
-
formField: {
|
|
429
|
-
paddingX: FIELD.md.paddingX,
|
|
430
|
-
paddingY: FIELD.md.paddingY,
|
|
431
|
-
sm: FIELD.sm,
|
|
432
|
-
lg: FIELD.lg,
|
|
433
|
-
borderRadius: '{border.radius.md}',
|
|
434
|
-
focusRing: {
|
|
435
|
-
width: '0',
|
|
436
|
-
style: 'none',
|
|
437
|
-
color: 'transparent',
|
|
438
|
-
offset: '0',
|
|
439
|
-
shadow: 'none',
|
|
440
|
-
},
|
|
441
|
-
transitionDuration: '{transition.duration}',
|
|
442
|
-
},
|
|
443
|
-
content: { borderRadius: '{border.radius.lg}' },
|
|
444
|
-
overlay: {
|
|
445
|
-
select: {
|
|
446
|
-
borderRadius: '{border.radius.lg}',
|
|
447
|
-
shadow: DS_SHADOW.md,
|
|
448
|
-
},
|
|
449
|
-
popover: {
|
|
450
|
-
borderRadius: '{border.radius.lg}',
|
|
451
|
-
padding: '0.75rem',
|
|
452
|
-
shadow: DS_SHADOW.md,
|
|
453
|
-
},
|
|
454
|
-
modal: {
|
|
455
|
-
// 8px, not the 16px the foundations table implies for "modals" —
|
|
456
|
-
// the DS Modal component itself ships radius-md and shadow-3xl.
|
|
457
|
-
borderRadius: '{border.radius.lg}',
|
|
458
|
-
padding: '1.5rem',
|
|
459
|
-
shadow: '0 32px 64px -12px rgba(16, 24, 40, 0.14)',
|
|
460
|
-
},
|
|
461
|
-
navigation: { shadow: DS_SHADOW.md },
|
|
462
|
-
},
|
|
463
|
-
list: {
|
|
464
|
-
padding: '0.25rem',
|
|
465
|
-
gap: '2px',
|
|
466
|
-
option: {
|
|
467
|
-
padding: '0.375rem 0.5rem',
|
|
468
|
-
borderRadius: '{border.radius.md}',
|
|
469
|
-
},
|
|
470
|
-
optionGroup: { padding: '0.375rem 0.5rem', fontWeight: '600' },
|
|
471
|
-
},
|
|
472
|
-
navigation: {
|
|
473
|
-
item: {
|
|
474
|
-
padding: '0.375rem 0.5rem',
|
|
475
|
-
borderRadius: '{border.radius.md}',
|
|
476
|
-
gap: '0.5rem',
|
|
477
|
-
},
|
|
478
|
-
},
|
|
479
|
-
colorScheme: {
|
|
480
|
-
light: {
|
|
481
|
-
surface: {
|
|
482
|
-
0: DS_GRAY[0],
|
|
483
|
-
...toPrimeRamp(DS_GRAY),
|
|
484
|
-
},
|
|
485
|
-
/**
|
|
486
|
-
* The DS anchors the primary button on blue-800, with hover and
|
|
487
|
-
* pressed one and two steps darker. Aura anchors on 500, so the whole
|
|
488
|
-
* triple is remapped rather than inherited.
|
|
489
|
-
*/
|
|
490
|
-
primary: {
|
|
491
|
-
color: '{primary.800}',
|
|
492
|
-
contrastColor: DS_GRAY[50],
|
|
493
|
-
hoverColor: '{primary.900}',
|
|
494
|
-
activeColor: '{primary.950}',
|
|
495
|
-
},
|
|
496
|
-
highlight: {
|
|
497
|
-
background: '{primary.50}',
|
|
498
|
-
focusBackground: '{primary.100}',
|
|
499
|
-
color: '{primary.800}',
|
|
500
|
-
focusColor: '{primary.900}',
|
|
501
|
-
},
|
|
502
|
-
mask: { background: 'rgba(16, 24, 40, 0.6)', color: '{surface.200}' },
|
|
503
|
-
formField: {
|
|
504
|
-
background: DS_SEMANTIC.surface,
|
|
505
|
-
disabledBackground: DS_SEMANTIC.disabledBg,
|
|
506
|
-
filledBackground: '{surface.50}',
|
|
507
|
-
filledHoverBackground: '{surface.50}',
|
|
508
|
-
filledFocusBackground: '{surface.50}',
|
|
509
|
-
borderColor: DS_SEMANTIC.inputBorder,
|
|
510
|
-
hoverBorderColor: DS_SEMANTIC.inputBorderHover,
|
|
511
|
-
// The DS keeps the border neutral on focus and signals focus with
|
|
512
|
-
// the underline bar instead (see ds-identity.css).
|
|
513
|
-
focusBorderColor: DS_SEMANTIC.inputBorder,
|
|
514
|
-
invalidBorderColor: DS_SEMANTIC.danger,
|
|
515
|
-
color: DS_SEMANTIC.textStrong,
|
|
516
|
-
disabledColor: DS_SEMANTIC.disabledText,
|
|
517
|
-
placeholderColor: DS_SEMANTIC.textPlaceholder,
|
|
518
|
-
invalidPlaceholderColor: DS_SEMANTIC.danger,
|
|
519
|
-
floatLabelColor: '{surface.500}',
|
|
520
|
-
floatLabelFocusColor: '{primary.800}',
|
|
521
|
-
floatLabelActiveColor: '{surface.500}',
|
|
522
|
-
floatLabelInvalidColor: DS_SEMANTIC.danger,
|
|
523
|
-
iconColor: '{surface.500}',
|
|
524
|
-
shadow: 'none',
|
|
525
|
-
},
|
|
526
|
-
text: {
|
|
527
|
-
color: DS_SEMANTIC.textStrong,
|
|
528
|
-
hoverColor: DS_SEMANTIC.textStrong,
|
|
529
|
-
mutedColor: '{surface.500}',
|
|
530
|
-
hoverMutedColor: '{surface.600}',
|
|
531
|
-
},
|
|
532
|
-
content: {
|
|
533
|
-
background: DS_SEMANTIC.surface,
|
|
534
|
-
hoverBackground: '{surface.50}',
|
|
535
|
-
borderColor: DS_SEMANTIC.border,
|
|
536
|
-
color: '{text.color}',
|
|
537
|
-
hoverColor: '{text.hover.color}',
|
|
538
|
-
},
|
|
539
|
-
list: {
|
|
540
|
-
option: {
|
|
541
|
-
focusBackground: '{surface.100}',
|
|
542
|
-
selectedBackground: '{primary.50}',
|
|
543
|
-
selectedFocusBackground: '{primary.100}',
|
|
544
|
-
color: '{text.color}',
|
|
545
|
-
focusColor: '{text.color}',
|
|
546
|
-
selectedColor: '{primary.800}',
|
|
547
|
-
selectedFocusColor: '{primary.900}',
|
|
548
|
-
},
|
|
549
|
-
},
|
|
550
|
-
},
|
|
551
|
-
/**
|
|
552
|
-
* The DS does not publish a dark theme. Dark mode is still a shipped
|
|
553
|
-
* capability here, so this is an extrapolation: the ramps are the DS
|
|
554
|
-
* ramps, re-anchored to lighter primary steps for contrast on dark
|
|
555
|
-
* surfaces. Treat these values as ours, not as design-approved.
|
|
556
|
-
*/
|
|
557
|
-
dark: {
|
|
558
|
-
surface: {
|
|
559
|
-
0: DS_GRAY[0],
|
|
560
|
-
...toPrimeRamp(DS_GRAY),
|
|
561
|
-
},
|
|
562
|
-
primary: {
|
|
563
|
-
color: '{primary.400}',
|
|
564
|
-
contrastColor: '{surface.950}',
|
|
565
|
-
hoverColor: '{primary.300}',
|
|
566
|
-
activeColor: '{primary.200}',
|
|
567
|
-
},
|
|
568
|
-
formField: {
|
|
569
|
-
borderColor: '{surface.600}',
|
|
570
|
-
hoverBorderColor: '{surface.500}',
|
|
571
|
-
focusBorderColor: '{surface.600}',
|
|
572
|
-
invalidBorderColor: '{red.400}',
|
|
573
|
-
disabledBackground: '{surface.700}',
|
|
574
|
-
disabledColor: '{surface.400}',
|
|
575
|
-
placeholderColor: '{surface.400}',
|
|
576
|
-
shadow: 'none',
|
|
577
|
-
},
|
|
578
|
-
mask: { background: 'rgba(0, 0, 0, 0.6)', color: '{surface.200}' },
|
|
579
|
-
},
|
|
580
|
-
},
|
|
581
|
-
},
|
|
582
|
-
components: {
|
|
583
|
-
button: {
|
|
584
|
-
root: {
|
|
585
|
-
borderRadius: '{border.radius.md}',
|
|
586
|
-
gap: '0.25rem',
|
|
587
|
-
paddingX: FIELD.md.paddingX,
|
|
588
|
-
paddingY: FIELD.md.paddingY,
|
|
589
|
-
iconOnlyWidth: '2rem',
|
|
590
|
-
sm: { ...FIELD.sm, iconOnlyWidth: '1.5rem' },
|
|
591
|
-
lg: { ...FIELD.lg, iconOnlyWidth: '2.5rem' },
|
|
592
|
-
label: { fontWeight: '500' },
|
|
593
|
-
badgeSize: '1rem',
|
|
594
|
-
},
|
|
595
|
-
colorScheme: {
|
|
596
|
-
light: {
|
|
597
|
-
root: {
|
|
598
|
-
/** DS "neutral" button — the standard Cancel / secondary action. */
|
|
599
|
-
secondary: {
|
|
600
|
-
background: '{surface.100}',
|
|
601
|
-
hoverBackground: '{surface.200}',
|
|
602
|
-
activeBackground: DS_SEMANTIC.disabledBg,
|
|
603
|
-
borderColor: '{surface.100}',
|
|
604
|
-
hoverBorderColor: '{surface.200}',
|
|
605
|
-
activeBorderColor: DS_SEMANTIC.disabledBg,
|
|
606
|
-
color: DS_SEMANTIC.textStrong,
|
|
607
|
-
hoverColor: DS_SEMANTIC.textStrong,
|
|
608
|
-
activeColor: DS_SEMANTIC.textStrong,
|
|
609
|
-
},
|
|
610
|
-
/** DS "danger-primary" — irreversible actions only. */
|
|
611
|
-
danger: {
|
|
612
|
-
background: DS_SEMANTIC.danger,
|
|
613
|
-
hoverBackground: '#8A0000',
|
|
614
|
-
activeBackground: '#6E0000',
|
|
615
|
-
borderColor: DS_SEMANTIC.danger,
|
|
616
|
-
hoverBorderColor: '#8A0000',
|
|
617
|
-
activeBorderColor: '#6E0000',
|
|
618
|
-
color: DS_GRAY[50],
|
|
619
|
-
hoverColor: DS_GRAY[50],
|
|
620
|
-
activeColor: DS_GRAY[50],
|
|
621
|
-
},
|
|
622
|
-
},
|
|
623
|
-
/** DS "transparent" / ghost — link-style text buttons. */
|
|
624
|
-
text: {
|
|
625
|
-
primary: {
|
|
626
|
-
color: DS_BLUE[700],
|
|
627
|
-
hoverBackground: '{primary.50}',
|
|
628
|
-
activeBackground: '{primary.100}',
|
|
629
|
-
},
|
|
630
|
-
danger: {
|
|
631
|
-
color: DS_SEMANTIC.danger,
|
|
632
|
-
hoverBackground: DS_SEMANTIC.dangerSecondaryBg,
|
|
633
|
-
activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,
|
|
634
|
-
},
|
|
635
|
-
},
|
|
636
|
-
/** DS "secondary-solid" is a tint, closest to the outlined slot. */
|
|
637
|
-
outlined: {
|
|
638
|
-
primary: {
|
|
639
|
-
borderColor: '{primary.200}',
|
|
640
|
-
color: '{primary.800}',
|
|
641
|
-
hoverBackground: DS_SEMANTIC.secondaryBgHover,
|
|
642
|
-
activeBackground: DS_SEMANTIC.secondaryBg,
|
|
643
|
-
},
|
|
644
|
-
danger: {
|
|
645
|
-
borderColor: DS_SEMANTIC.dangerSecondaryBgPressed,
|
|
646
|
-
color: DS_SEMANTIC.danger,
|
|
647
|
-
hoverBackground: DS_SEMANTIC.dangerSecondaryBg,
|
|
648
|
-
activeBackground: DS_SEMANTIC.dangerSecondaryBgHover,
|
|
649
|
-
},
|
|
650
|
-
},
|
|
651
|
-
link: {
|
|
652
|
-
color: DS_BLUE[700],
|
|
653
|
-
hoverColor: DS_BLUE[600],
|
|
654
|
-
activeColor: DS_BLUE[800],
|
|
655
|
-
},
|
|
656
|
-
},
|
|
657
|
-
},
|
|
658
|
-
css: () => `
|
|
659
|
-
.p-button.p-button-icon-only { padding-inline: 0; }
|
|
660
|
-
/* Disabled is a colour swap, not a fade. */
|
|
661
|
-
.p-button:disabled {
|
|
662
|
-
background: ${DS_SEMANTIC.disabledBg};
|
|
663
|
-
border-color: ${DS_SEMANTIC.disabledBg};
|
|
664
|
-
color: ${DS_SEMANTIC.disabledText};
|
|
665
|
-
cursor: not-allowed;
|
|
666
|
-
}
|
|
667
|
-
.p-button.p-button-text:disabled,
|
|
668
|
-
.p-button.p-button-outlined:disabled {
|
|
669
|
-
background: transparent;
|
|
670
|
-
color: ${DS_SEMANTIC.disabledText};
|
|
671
|
-
}
|
|
672
|
-
`,
|
|
673
|
-
},
|
|
674
|
-
card: {
|
|
675
|
-
root: {
|
|
676
|
-
borderRadius: '{border.radius.lg}',
|
|
677
|
-
shadow: DS_SHADOW.sm,
|
|
678
|
-
},
|
|
679
|
-
body: { padding: '1rem', gap: '0.5rem' },
|
|
680
|
-
title: { fontSize: '1rem', fontWeight: '600' },
|
|
681
|
-
subtitle: { color: DS_SEMANTIC.textSecondary },
|
|
682
|
-
},
|
|
683
|
-
tabs: {
|
|
684
|
-
tab: {
|
|
685
|
-
padding: '0.5rem 0.75rem',
|
|
686
|
-
fontWeight: '500',
|
|
687
|
-
borderWidth: '0 0 2px 0',
|
|
688
|
-
},
|
|
689
|
-
activeBar: { height: '2px', bottom: '-2px' },
|
|
690
|
-
colorScheme: {
|
|
691
|
-
light: {
|
|
692
|
-
tab: {
|
|
693
|
-
color: '{surface.500}',
|
|
694
|
-
hoverColor: DS_SEMANTIC.textStrong,
|
|
695
|
-
activeColor: '{primary.800}',
|
|
696
|
-
borderColor: DS_SEMANTIC.border,
|
|
697
|
-
hoverBorderColor: '{surface.300}',
|
|
698
|
-
activeBorderColor: '{primary.800}',
|
|
699
|
-
},
|
|
700
|
-
activeBar: { background: '{primary.800}' },
|
|
701
|
-
},
|
|
702
|
-
},
|
|
703
|
-
},
|
|
704
|
-
datatable: {
|
|
705
|
-
headerCell: { padding: '0.5rem 0.75rem' },
|
|
706
|
-
bodyCell: { padding: '0.5rem 0.75rem' },
|
|
707
|
-
footerCell: { padding: '0.5rem 0.75rem' },
|
|
708
|
-
colorScheme: {
|
|
709
|
-
light: {
|
|
710
|
-
headerCell: {
|
|
711
|
-
background: '{surface.50}',
|
|
712
|
-
color: '{surface.600}',
|
|
713
|
-
borderColor: DS_SEMANTIC.border,
|
|
714
|
-
hoverBackground: '{surface.100}',
|
|
715
|
-
},
|
|
716
|
-
bodyCell: { borderColor: DS_SEMANTIC.border },
|
|
717
|
-
row: {
|
|
718
|
-
background: DS_SEMANTIC.surface,
|
|
719
|
-
hoverBackground: '{surface.50}',
|
|
720
|
-
color: DS_SEMANTIC.textStrong,
|
|
721
|
-
selectedBackground: '{primary.50}',
|
|
722
|
-
selectedColor: DS_SEMANTIC.textStrong,
|
|
723
|
-
},
|
|
724
|
-
},
|
|
725
|
-
},
|
|
726
|
-
},
|
|
727
|
-
tag: {
|
|
728
|
-
root: {
|
|
729
|
-
fontSize: '0.75rem',
|
|
730
|
-
fontWeight: '500',
|
|
731
|
-
padding: '0.125rem 0.5rem',
|
|
732
|
-
borderRadius: '{border.radius.md}',
|
|
733
|
-
},
|
|
734
|
-
colorScheme: {
|
|
735
|
-
light: {
|
|
736
|
-
primary: { background: DS_BLUE[100], color: DS_BLUE[700] },
|
|
737
|
-
secondary: { background: '{surface.100}', color: '{surface.700}' },
|
|
738
|
-
success: { background: DS_SUCCESS[100], color: DS_SUCCESS[700] },
|
|
739
|
-
info: { background: DS_BLUE[100], color: DS_BLUE[700] },
|
|
740
|
-
warn: { background: DS_WARNING[100], color: DS_WARNING[700] },
|
|
741
|
-
danger: { background: DS_ERROR[100], color: DS_ERROR[700] },
|
|
742
|
-
},
|
|
743
|
-
},
|
|
744
|
-
},
|
|
745
|
-
toast: {
|
|
746
|
-
root: { borderRadius: '{border.radius.lg}' },
|
|
747
|
-
},
|
|
748
|
-
tooltip: {
|
|
749
|
-
root: {
|
|
750
|
-
borderRadius: '6px',
|
|
751
|
-
padding: '0.5rem 0.75rem',
|
|
752
|
-
maxWidth: '20rem',
|
|
753
|
-
},
|
|
754
|
-
colorScheme: {
|
|
755
|
-
light: {
|
|
756
|
-
root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },
|
|
757
|
-
},
|
|
758
|
-
dark: {
|
|
759
|
-
root: { background: DS_SEMANTIC.tooltipBg, color: '#ffffff' },
|
|
760
|
-
},
|
|
761
|
-
},
|
|
762
|
-
},
|
|
763
|
-
progressbar: {
|
|
764
|
-
root: { borderRadius: '{border.radius.full}', height: '0.5rem' },
|
|
765
|
-
},
|
|
766
|
-
skeleton: {
|
|
767
|
-
colorScheme: {
|
|
768
|
-
light: { root: { background: '#e7e9ed' } },
|
|
769
|
-
},
|
|
770
|
-
},
|
|
771
|
-
avatar: {
|
|
772
|
-
root: { borderRadius: '{border.radius.full}' },
|
|
773
|
-
},
|
|
774
|
-
chip: {
|
|
775
|
-
root: { borderRadius: '{border.radius.full}' },
|
|
776
|
-
},
|
|
777
|
-
},
|
|
778
|
-
};
|
|
779
|
-
}
|
|
780
|
-
/** The DS chart ramp, for hosts that render charts outside PrimeNG. */
|
|
781
|
-
const dsChartSeries = DS_CHART_SERIES;
|
|
782
|
-
/**
|
|
783
|
-
* Adds or removes the root class that activates the CSS half of the identity.
|
|
784
|
-
* No-ops outside the browser so SSR builds stay safe.
|
|
785
|
-
*/
|
|
786
|
-
function applyDesignIdentityClass(identity) {
|
|
787
|
-
if (typeof document === 'undefined')
|
|
788
|
-
return;
|
|
789
|
-
document.documentElement.classList.toggle(MT_DESIGN_IDENTITY_CLASS, identity === 'experimental');
|
|
790
|
-
}
|
|
791
|
-
|
|
792
164
|
const inputBorderRadius = '{border.radius.md}';
|
|
793
165
|
const toastStyle = {
|
|
794
166
|
// borderColor: '{surface.300}',
|
|
@@ -801,24 +173,10 @@ const toastStyle = {
|
|
|
801
173
|
// },
|
|
802
174
|
// },
|
|
803
175
|
};
|
|
804
|
-
/**
|
|
805
|
-
* Which identity the app is currently wearing. Tracked because the runtime
|
|
806
|
-
* colour helpers below have to anchor a generated ramp on a different step per
|
|
807
|
-
* identity — classic reads the brand colour as the 500 shade, the DS reads it
|
|
808
|
-
* as 800.
|
|
809
|
-
*/
|
|
810
|
-
let activeDesignIdentity = 'classic';
|
|
811
|
-
function getMTDesignIdentity() {
|
|
812
|
-
return activeDesignIdentity;
|
|
813
|
-
}
|
|
814
176
|
function changePrimaryColor(color) {
|
|
815
|
-
const isDS = activeDesignIdentity === 'experimental';
|
|
816
|
-
const base = color || (isDS ? DS_DEFAULT_PRIMARY_COLOR : '#2AAEC0');
|
|
817
177
|
updatePreset({
|
|
818
178
|
semantic: {
|
|
819
|
-
primary:
|
|
820
|
-
? generateTailwindPalette(base, '800')
|
|
821
|
-
: generateTailwindPalette(base),
|
|
179
|
+
primary: generateTailwindPalette(color || '#2AAEC0'),
|
|
822
180
|
},
|
|
823
181
|
});
|
|
824
182
|
}
|
|
@@ -1158,26 +516,9 @@ const MTPreset = (themeOptions) => {
|
|
|
1158
516
|
// },
|
|
1159
517
|
},
|
|
1160
518
|
};
|
|
1161
|
-
// The DS layer is merged last so it wins on the tokens it names, while
|
|
1162
|
-
// everything it stays silent about keeps the classic behaviour.
|
|
1163
|
-
if ((themeOptions?.designIdentity ?? 'classic') === 'experimental') {
|
|
1164
|
-
return definePreset(Aura, configs, dsIdentityConfigs(themeOptions?.primaryColor));
|
|
1165
|
-
}
|
|
1166
519
|
return definePreset(Aura, configs);
|
|
1167
520
|
};
|
|
1168
|
-
/**
|
|
1169
|
-
* Switches identity at runtime — for the showcase toggle and for side-by-side
|
|
1170
|
-
* review. Replaces the active preset outright (rather than merging into it, as
|
|
1171
|
-
* `updatePreset` would) so switching back to classic is lossless.
|
|
1172
|
-
*/
|
|
1173
|
-
function setMTDesignIdentity(identity, themeOptions) {
|
|
1174
|
-
activeDesignIdentity = identity;
|
|
1175
|
-
applyDesignIdentityClass(identity);
|
|
1176
|
-
usePreset(MTPreset({ ...themeOptions, designIdentity: identity }));
|
|
1177
|
-
}
|
|
1178
521
|
function provideMTComponents(themeOptions) {
|
|
1179
|
-
activeDesignIdentity = themeOptions?.designIdentity ?? 'classic';
|
|
1180
|
-
applyDesignIdentityClass(activeDesignIdentity);
|
|
1181
522
|
changeBackgroundColor(themeOptions?.backgroundColor);
|
|
1182
523
|
return providePrimeNG({
|
|
1183
524
|
zIndex: {
|
|
@@ -2524,5 +1865,5 @@ function parseDateOnlyValue(value) {
|
|
|
2524
1865
|
* Generated bundle index. Do not edit.
|
|
2525
1866
|
*/
|
|
2526
1867
|
|
|
2527
|
-
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS,
|
|
1868
|
+
export { BaseFacade, BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, CrudStateBase, DEFAULT_MT_DATE_FORMATS, DateFieldConfig, EditorFieldConfig, EntityListFieldConfig, IconFieldConfig, LocationFieldConfig, LookupMatrixFieldConfig, LookupModuleCheckListFieldConfig, MTDateFormatPipe, MT_DATE_FORMATS, MultiSelectFieldConfig, NumberFieldConfig, PickListFieldConfig, READABLE_DARK_INK, REQUEST_CONTEXT, RadioButtonFieldConfig, RadioCardsFieldConfig, ScheduleItemSelectorFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, SliderFieldConfig, SpacerFieldConfig, TextFieldConfig, TextareaFieldConfig, ToggleFieldConfig, UploadFileFieldConfig, UserSearchFieldConfig, ValidatorConfig, WCAG_AA_NORMAL_TEXT, changeBackgroundColor, changePrimaryColor, changeTextColor, clockTimeToSeconds, coerceCheckboxValue, contrastRatio, createCustomValidator, createEntityAdapter, endLoading, formatClockTime, generateTailwindPalette, getContrastColor, getLightColor, handleApiRequest, isInvalid, newFieldId, parseClockTime, provideMTComponents, provideMTConfirmation, provideMTDateFormats, provideMTMessages, readableTextOn, relativeLuminance, setLoadingError, startLoading, toAngularDateFormat, toClockTimeParts, wrapValidatorWithMessage };
|
|
2528
1869
|
//# sourceMappingURL=masterteam-components.mjs.map
|