@7365admin1/layer-common 4.28.1-staging.358 → 4.28.1-staging.360
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/css/robot-hero.css +466 -0
- package/components/Robot/Battery.vue +18 -0
- package/components/Robot/CapabilityTag.vue +14 -0
- package/components/Robot/Card.vue +56 -0
- package/components/Robot/CommandBar.vue +47 -0
- package/components/Robot/CredentialField.vue +37 -0
- package/components/Robot/FaultBadge.vue +26 -0
- package/components/Robot/FloorLabel.vue +12 -0
- package/components/Robot/Hero.vue +32 -0
- package/components/Robot/LiftQueueRow.vue +28 -0
- package/components/Robot/MapToolbar.vue +53 -0
- package/components/Robot/NoMonitoring.vue +14 -0
- package/components/Robot/Reconnecting.vue +7 -0
- package/components/Robot/StatusChip.vue +15 -0
- package/components/Robot/SummaryCell.vue +64 -0
- package/components/Robot/SummaryStrip.vue +19 -0
- package/components/Robot/Table.vue +115 -0
- package/components/Robot/Toast.vue +27 -0
- package/components/Robot/ViewOnlyNotice.vue +3 -0
- package/components/RolePermissionFormCreate.vue +78 -1
- package/components/RolePermissionFormPreviewUpdate.vue +83 -2
- package/components/VehicleManagement.vue +150 -10
- package/package.json +1 -1
- package/plugins/API.ts +7 -2
- package/plugins/vuetify.ts +8 -1
- package/types/vehicle.d.ts +11 -0
- package/utils/permission-refusal.ts +40 -0
- package/utils/robot-display.ts +304 -0
- package/utils/theme.ts +152 -0
package/utils/theme.ts
CHANGED
|
@@ -319,3 +319,155 @@ const theme = (dark: boolean, p: Palette) => ({
|
|
|
319
319
|
export const LIGHT_THEME = theme(false, PALETTE.light);
|
|
320
320
|
|
|
321
321
|
export const DARK_THEME = theme(true, PALETTE.dark);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* HERO - THE ROBOT FLEET'S OWN LOOK, AND ONLY THE ROBOT FLEET'S.
|
|
325
|
+
*
|
|
326
|
+
* Owner decision, 2026-09-23: the HERO handoff (Archivo, square corners, a red
|
|
327
|
+
* accent) applies on robot pages only. Everything above this line - the
|
|
328
|
+
* product's light/dark/iservice365 themes, Manrope, the rounded radii - is
|
|
329
|
+
* untouched. These two themes are only ever reached through a
|
|
330
|
+
* `v-theme-provider` (`components/Robot/Hero.vue`), never as a default.
|
|
331
|
+
*
|
|
332
|
+
* Every value is the handoff's token sheet (`design_handoff_robot_fleet/_ds/
|
|
333
|
+
* .../styles.css` plus the dark overrides in the prototype) or the README's
|
|
334
|
+
* added status tones. The three tones are specified in OKLCH; Vuetify needs a
|
|
335
|
+
* hex, so they are resolved here (sRGB, clipped as a browser clips):
|
|
336
|
+
*
|
|
337
|
+
* success oklch(0.52 0.15 150) -> #007f35 white label
|
|
338
|
+
* warning oklch(0.8 0.16 80) -> #f3b01d ink label
|
|
339
|
+
* info oklch(0.55 0.13 240) -> #0079b5 white label
|
|
340
|
+
*
|
|
341
|
+
* `primary` is the accent (the one primary action, e.g. "Clean all"), and its
|
|
342
|
+
* label is the page background, exactly as the prototype's `.btn-primary`.
|
|
343
|
+
* A status whose tone is "primary" in the handoff (Cleaning / Patrolling) is
|
|
344
|
+
* drawn as "ink" - text colour as a fill, `assets/css/robot-hero.css` - so red
|
|
345
|
+
* stays reserved for errors and the one primary action.
|
|
346
|
+
*/
|
|
347
|
+
export const HERO_PALETTE = {
|
|
348
|
+
light: {
|
|
349
|
+
bg: "#f3f2f2",
|
|
350
|
+
surface: "#eae9e9",
|
|
351
|
+
text: "#201e1d",
|
|
352
|
+
accent: "#ec3013",
|
|
353
|
+
accent600: "#dd2b0f",
|
|
354
|
+
accent700: "#ae1800",
|
|
355
|
+
accent100: "#fff2ef",
|
|
356
|
+
accent800: "#7c1405",
|
|
357
|
+
neutral100: "#f8f4f4",
|
|
358
|
+
neutral300: "#d7d3d3",
|
|
359
|
+
neutral800: "#444141",
|
|
360
|
+
neutral900: "#2d2b2b",
|
|
361
|
+
/** Text at 60% / 40% over bg, resolved - Vuetify needs an opaque colour. */
|
|
362
|
+
muted: "#747372",
|
|
363
|
+
border: "#9f9d9d",
|
|
364
|
+
/** Divider = text at this alpha (`--color-divider`). */
|
|
365
|
+
dividerOpacity: 0.4,
|
|
366
|
+
shadowSm: "0 1px 2px rgba(45, 43, 43, 0.14)",
|
|
367
|
+
shadowLg: "0 12px 32px rgba(45, 43, 43, 0.22)",
|
|
368
|
+
},
|
|
369
|
+
dark: {
|
|
370
|
+
bg: "#141313",
|
|
371
|
+
surface: "#1e1c1c",
|
|
372
|
+
text: "#f3f2f2",
|
|
373
|
+
accent: "#ec3013",
|
|
374
|
+
accent600: "#dd2b0f",
|
|
375
|
+
accent700: "#ae1800",
|
|
376
|
+
accent100: "#4d170e",
|
|
377
|
+
accent800: "#ffc4b8",
|
|
378
|
+
neutral100: "#2a2828",
|
|
379
|
+
neutral300: "#444141",
|
|
380
|
+
neutral800: "#d7d3d3",
|
|
381
|
+
neutral900: "#f3f2f2",
|
|
382
|
+
muted: "#9a9999",
|
|
383
|
+
border: "#5b5a5a",
|
|
384
|
+
dividerOpacity: 0.32,
|
|
385
|
+
shadowSm: "0 0 0 1px rgba(255, 255, 255, 0.08)",
|
|
386
|
+
shadowLg: "0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 50px rgba(0, 0, 0, 0.7)",
|
|
387
|
+
},
|
|
388
|
+
tones: {
|
|
389
|
+
success: "#007f35",
|
|
390
|
+
warning: "#f3b01d",
|
|
391
|
+
info: "#0079b5",
|
|
392
|
+
onSuccess: "#ffffff",
|
|
393
|
+
onWarning: "#201e1d",
|
|
394
|
+
onInfo: "#ffffff",
|
|
395
|
+
onError: "#ffffff",
|
|
396
|
+
},
|
|
397
|
+
} as const;
|
|
398
|
+
|
|
399
|
+
/** Widened back from the literals, for the same reason as `TPalette`. */
|
|
400
|
+
type THeroPalette = {
|
|
401
|
+
readonly [K in keyof (typeof HERO_PALETTE)["light"]]: (typeof HERO_PALETTE)["light"][K] extends number ? number : string;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Only colour NAMES the product's own themes already have. Vuetify emits a
|
|
406
|
+
* global `.bg-*` / `.text-*` utility class for every colour name in any theme,
|
|
407
|
+
* so a new name here would be a new global class; reusing the existing names
|
|
408
|
+
* means the only global CSS these themes add is their own
|
|
409
|
+
* `.v-theme--hero-light` / `.v-theme--hero-dark` variable blocks. The handoff's
|
|
410
|
+
* extra shades (accent-600, neutral-100 ...) are theme VARIABLES instead
|
|
411
|
+
* (`--v-hero-*`), which Vuetify emits inside those blocks only.
|
|
412
|
+
*/
|
|
413
|
+
const heroTheme = (dark: boolean, p: THeroPalette) => {
|
|
414
|
+
const t = HERO_PALETTE.tones;
|
|
415
|
+
return {
|
|
416
|
+
dark,
|
|
417
|
+
colors: {
|
|
418
|
+
background: p.bg,
|
|
419
|
+
surface: p.surface,
|
|
420
|
+
"surface-bright": p.surface,
|
|
421
|
+
"surface-light": p.surface,
|
|
422
|
+
"surface-variant": p.neutral300,
|
|
423
|
+
"on-background": p.text,
|
|
424
|
+
"on-surface": p.text,
|
|
425
|
+
"on-surface-variant": p.neutral900,
|
|
426
|
+
primary: p.accent,
|
|
427
|
+
"on-primary": p.bg,
|
|
428
|
+
// The layer's own names, so a shared component dropped inside the scope
|
|
429
|
+
// resolves a HERO colour instead of inheriting the page theme's.
|
|
430
|
+
"primary-button": p.accent,
|
|
431
|
+
"on-primary-button": p.bg,
|
|
432
|
+
"text-primary": p.text,
|
|
433
|
+
"brand-surface": p.surface,
|
|
434
|
+
"on-brand-surface": p.text,
|
|
435
|
+
accent: p.accent,
|
|
436
|
+
"accent-strong": p.accent,
|
|
437
|
+
"accent-text": p.accent,
|
|
438
|
+
text2: p.neutral900,
|
|
439
|
+
muted: p.muted,
|
|
440
|
+
border: p.border,
|
|
441
|
+
sidebar: p.surface,
|
|
442
|
+
success: t.success,
|
|
443
|
+
"on-success": t.onSuccess,
|
|
444
|
+
warning: t.warning,
|
|
445
|
+
"on-warning": t.onWarning,
|
|
446
|
+
info: t.info,
|
|
447
|
+
"on-info": t.onInfo,
|
|
448
|
+
error: p.accent,
|
|
449
|
+
"on-error": t.onError,
|
|
450
|
+
},
|
|
451
|
+
variables: {
|
|
452
|
+
// Vuetify draws its own borders as on-surface at this opacity, so a
|
|
453
|
+
// v-btn outline or a table rule matches the handoff's divider.
|
|
454
|
+
"border-color": p.text,
|
|
455
|
+
"border-opacity": p.dividerOpacity,
|
|
456
|
+
"hero-divider-opacity": p.dividerOpacity,
|
|
457
|
+
"hero-accent-600": p.accent600,
|
|
458
|
+
"hero-accent-700": p.accent700,
|
|
459
|
+
"hero-accent-100": p.accent100,
|
|
460
|
+
"hero-accent-800": p.accent800,
|
|
461
|
+
"hero-neutral-100": p.neutral100,
|
|
462
|
+
"hero-neutral-300": p.neutral300,
|
|
463
|
+
"hero-neutral-800": p.neutral800,
|
|
464
|
+
"hero-neutral-900": p.neutral900,
|
|
465
|
+
"hero-shadow-sm": p.shadowSm,
|
|
466
|
+
"hero-shadow-lg": p.shadowLg,
|
|
467
|
+
},
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export const HERO_LIGHT_THEME = heroTheme(false, HERO_PALETTE.light);
|
|
472
|
+
|
|
473
|
+
export const HERO_DARK_THEME = heroTheme(true, HERO_PALETTE.dark);
|