@crombolo/backoffice-host 0.42.1 → 0.43.1

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/NOTICE CHANGED
@@ -27,6 +27,15 @@ The Umbraco backoffice
27
27
  @umbraco-cms/backoffice 18.2.0 — MIT — https://github.com/umbraco/Umbraco-CMS
28
28
  @umbraco-ui/uui 2.0.2 — MIT — https://github.com/umbraco/Umbraco.UI
29
29
 
30
+ The Lato fonts
31
+ -------------
32
+ LatoLatin-*.woff2 — Copyright (c) 2011-2015 by tyPoland Lukasz Dziedzic, with
33
+ Reserved Font Name "Lato" — SIL Open Font License 1.1 — https://www.latofonts.com
34
+ Shipped unmodified, as @umbraco-ui/uui ships them, in @crombolo/backoffice-dist
35
+ under `dist/assets/fonts/`, with the licence beside them as `OFL.txt`
36
+ (`packages/backoffice-dist/licenses/Lato-OFL.txt` in this repository). The
37
+ fonts carry the same notice in their own metadata.
38
+
30
39
  Static files from the Umbraco client source tree
31
40
  ------------------------------------------------
32
41
  css/umb-css.css, css/rte-content.css, css/umbraco-blockgridlayout.css
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crombolo/backoffice-host",
3
- "version": "0.42.1",
3
+ "version": "0.43.1",
4
4
  "description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Serves the Umbraco backoffice SPA: shell HTML, import map and package manifests.",
5
5
  "license": "MIT",
6
6
  "author": "Crombolo",
@@ -32,7 +32,7 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "@crombolo/core": "0.42.1",
36
- "@crombolo/backoffice-dist": "0.42.1"
35
+ "@crombolo/core": "0.43.1",
36
+ "@crombolo/backoffice-dist": "0.43.1"
37
37
  }
38
38
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo App Preview",
4
4
  "id": "Crombolo.AppPreview",
5
- "version": "0.42.1",
5
+ "version": "0.43.1",
6
6
  "allowPublicAccess": false,
7
7
  "extensions": [
8
8
  {
@@ -0,0 +1,40 @@
1
+ /**
2
+ * `Crombolo.Condition.ApprovalsActive`: the Approvals section and a page's
3
+ * Workflow tab show only while the site has a workflow or a request is open
4
+ * (story 234). The designer calls `approvalsChanged()` after a save or a delete,
5
+ * so the first workflow brings them in without a reload.
6
+ */
7
+ import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry'
8
+ import { approvalsActive } from './workflow-client.js'
9
+
10
+ const listeners = new Set()
11
+
12
+ /** Asks every condition to check again. */
13
+ export function approvalsChanged() {
14
+ for (const listener of listeners) listener()
15
+ }
16
+
17
+ export class CromboloApprovalsActiveCondition extends UmbConditionBase {
18
+ #listener = () => this.#check()
19
+
20
+ constructor(host, args) {
21
+ super(host, args)
22
+ listeners.add(this.#listener)
23
+ this.#check()
24
+ }
25
+
26
+ async #check() {
27
+ const answer = await approvalsActive()
28
+ // A failed check leaves Approvals where people can still reach their requests.
29
+ this.permitted = answer.ok ? answer.active === true : true
30
+ }
31
+
32
+ destroy() {
33
+ listeners.delete(this.#listener)
34
+ super.destroy()
35
+ }
36
+ }
37
+
38
+ export default CromboloApprovalsActiveCondition
39
+
40
+ export { CromboloApprovalsActiveCondition as api }
@@ -19,6 +19,8 @@
19
19
  --crombolo-night-alt: #342922;
20
20
  --crombolo-night-header: #2b1d15;
21
21
  --crombolo-cocoa-deep: #25160e;
22
+ /* Terracotta light enough to read as text on the night surfaces (7.7:1 and up). */
23
+ --crombolo-terracotta-light: #e8a688;
22
24
 
23
25
  --uui-color-background: var(--crombolo-night);
24
26
  --uui-color-surface: var(--crombolo-night-surface);
@@ -27,7 +29,7 @@
27
29
  --uui-color-text: var(--crombolo-ink);
28
30
  --uui-color-text-alt: var(--crombolo-ink-dimmed);
29
31
  --uui-color-interactive: var(--crombolo-ink);
30
- --uui-color-interactive-emphasis: var(--crombolo-orange-light);
32
+ --uui-color-interactive-emphasis: var(--crombolo-terracotta-light);
31
33
 
32
34
  /* The accent is light, so what sits on it is dark, as in the light mode. */
33
35
  --uui-color-default: var(--crombolo-orange);
@@ -38,16 +40,28 @@
38
40
  --uui-color-selected-emphasis: var(--crombolo-orange-light);
39
41
  --uui-color-selected-standalone: var(--crombolo-orange);
40
42
  --uui-color-selected-contrast: var(--crombolo-cocoa-deep);
41
- --uui-color-current: var(--crombolo-orange);
43
+ /* "Current" marks the active tab; the tree's current item has its own tokens (237). */
44
+ --uui-color-current: var(--crombolo-terracotta-light);
42
45
  --uui-color-current-emphasis: var(--crombolo-orange-light);
43
46
  --uui-color-current-contrast: var(--crombolo-cocoa-deep);
47
+ --uui-menu-item-background-color-active: var(--crombolo-night-alt);
48
+ --uui-menu-item-background-color-active-hover: #3b2e26;
49
+ --uui-menu-item-color-active: var(--crombolo-terracotta-light);
44
50
  --uui-color-focus: var(--crombolo-orange);
45
51
 
46
- /* A dark header with cream text; the active section's marker is the accent. */
47
- --uui-color-header-surface: var(--crombolo-night-header);
52
+ /*
53
+ * The header is a panel like the cards, with a hairline under it; the current
54
+ * section's name and marker are terracotta, as in light (story 237).
55
+ */
56
+ --uui-color-header-surface: var(--crombolo-night-surface);
48
57
  --uui-color-header-contrast: rgb(246 237 228 / 80%);
49
58
  --uui-color-header-contrast-emphasis: var(--crombolo-ink);
50
- --crombolo-header-current: var(--crombolo-orange);
59
+ --crombolo-header-current: var(--crombolo-terracotta-light);
60
+ --crombolo-header-current-text: var(--crombolo-terracotta-light);
61
+ --crombolo-header-line: #3b2e25;
62
+ --crombolo-section-sidebar-background: var(--crombolo-night-surface);
63
+ --crombolo-card-shadow: none;
64
+ --crombolo-terracotta-tint: var(--crombolo-night-alt);
51
65
 
52
66
  /* The SEO view's search-result preview, in Google's dark-mode link blue. */
53
67
  --crombolo-snippet-title: #8ab4f8;
@@ -1,5 +1,6 @@
1
1
  /*
2
- * Crombolo's colour scheme: white surfaces, terracotta accents taken from the logo.
2
+ * Crombolo's colour scheme: white cards on a cream ground, a light header, and one
3
+ * deep terracotta accent taken from the logo (story 237).
3
4
  *
4
5
  * Loaded by both shells immediately after the vendored `light.css`, rather than
5
6
  * registered as a `theme` extension, so it reaches the login page too — the
@@ -17,6 +18,14 @@
17
18
  --crombolo-orange-deep: #cb6f48;
18
19
  /* The darkest of the three, and the only one that clears AA as body text. */
19
20
  --crombolo-orange-text: #974b2b;
21
+ /*
22
+ * The accent: the logo's terracotta, deepened until white on it clears AA
23
+ * (5.3:1). It fills buttons and the selected item, and is the links' colour.
24
+ */
25
+ --crombolo-terracotta: #ad4f2c;
26
+ --crombolo-terracotta-hover: #9b4526;
27
+ /* A pale tint of it, behind the current tree item and the Overview's labels. */
28
+ --crombolo-terracotta-tint: #fbeee7;
20
29
  --crombolo-cocoa: #54321f;
21
30
  --crombolo-cream: #fff7ea;
22
31
 
@@ -24,8 +33,8 @@
24
33
  * `light.css` routes default, selected and interactive-emphasis through the
25
34
  * violet-blue palette, so swapping the palette carries all of them at once.
26
35
  */
27
- --uui-palette-violet-blue: var(--crombolo-orange);
28
- --uui-palette-violet-blue-light: var(--crombolo-orange-light);
36
+ --uui-palette-violet-blue: var(--crombolo-terracotta);
37
+ --uui-palette-violet-blue-light: var(--crombolo-terracotta-hover);
29
38
  --uui-palette-violet-blue-dark: var(--crombolo-orange-text);
30
39
  --uui-palette-violet-blue-dimmed: #bd8b75;
31
40
 
@@ -39,9 +48,12 @@
39
48
  --uui-palette-space-cadet-dark: #25160e;
40
49
  --uui-palette-space-cadet-dimmed: #8a6c5c;
41
50
 
42
- /* The "current item" marker, warmed from pink to the same orange family. */
43
- --uui-palette-spanish-pink: #fdebd4;
44
- --uui-palette-spanish-pink-light: #fef4e7;
51
+ /*
52
+ * "Current": the accent, which is what marks the active tab. The tree's
53
+ * current item takes its own tokens below, so it can be a tint instead.
54
+ */
55
+ --uui-palette-spanish-pink: var(--crombolo-terracotta);
56
+ --uui-palette-spanish-pink-light: var(--crombolo-terracotta-hover);
45
57
  --uui-palette-spanish-pink-dark: #ebc7b8;
46
58
  --uui-palette-spanish-pink-dimmed: #f3e3ce;
47
59
 
@@ -56,20 +68,31 @@
56
68
  --uui-palette-white-dark: #fffaf2;
57
69
  --uui-palette-white-dimmed: #f4ede1;
58
70
 
71
+ /* White on the deep accent, 5.3:1. */
72
+ --uui-color-default-contrast: #fff;
73
+ --uui-color-selected-contrast: #fff;
74
+ --uui-color-current-contrast: #fff;
75
+ /* The tree's current item: a pale tint, its text and icon in the accent (4.7:1). */
76
+ --uui-menu-item-background-color-active: var(--crombolo-terracotta-tint);
77
+ --uui-menu-item-background-color-active-hover: #faeae1;
78
+ --uui-menu-item-color-active: var(--crombolo-terracotta);
79
+
59
80
  /*
60
- * The accent is light, so what sits on it has to be dark. Stock `light.css`
61
- * puts white on the accent, which against this orange is about 2.4:1; cocoa
62
- * on the same fill is 4.7:1.
81
+ * A white header with a hairline under it. The current section's name and
82
+ * marker are the accent; the fork reads the line and the name's colour from
83
+ * these tokens.
63
84
  */
64
- --uui-color-default-contrast: var(--crombolo-cocoa);
65
- --uui-color-selected-contrast: var(--crombolo-cocoa);
66
-
67
- /* An orange header bar, with its own text dark for the same reason. */
68
- --uui-color-header-surface: var(--crombolo-orange);
85
+ --uui-color-header-surface: #fff;
69
86
  --uui-color-header-contrast: rgb(84 50 31 / 80%);
70
87
  --uui-color-header-contrast-emphasis: var(--crombolo-cocoa);
71
- /* The active section's marker, dark so it stands out from the white submenu below. */
72
- --crombolo-header-current: var(--crombolo-orange-text);
88
+ --crombolo-header-current: var(--crombolo-terracotta);
89
+ --crombolo-header-current-text: var(--crombolo-terracotta);
90
+ --crombolo-header-line: #efe3d6;
91
+
92
+ /* The sidebar is a white panel, like the cards, beside the cream page. */
93
+ --crombolo-section-sidebar-background: #fff;
94
+ /* Crombolo's own cards (the Overview, Settings) stand off the page; Umbraco's stay flat. */
95
+ --crombolo-card-shadow: 0 1px 2px rgb(84 50 31 / 6%), 0 10px 28px -18px rgb(84 50 31 / 30%);
73
96
 
74
97
  /* Pure white panels on a warm off-white page, so cards still separate. */
75
98
  --uui-color-background: var(--crombolo-cream);
@@ -79,9 +102,8 @@
79
102
 
80
103
  --uui-color-focus: var(--crombolo-orange-deep);
81
104
 
82
- /* Hover text on an unfilled interactive element: the palette's light orange
83
- would be 2:1 here, so it takes the text-weight orange instead. */
84
- --uui-color-interactive-emphasis: var(--crombolo-orange-text);
105
+ /* Hover text and links: the accent itself, 5.0:1 on cream and 5.3:1 on white. */
106
+ --uui-color-interactive-emphasis: var(--crombolo-terracotta);
85
107
 
86
108
  --uui-color-border: #e7dcd2;
87
109
  --uui-color-border-standalone: #cdbcac;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * A trail of links to where a page sits (story 234): UUI's breadcrumbs, as
3
+ * Umbraco's own editors show them, given `items` of `{ label, href? }`. The last
4
+ * item is the page itself; an item without `href` is not a link.
5
+ */
6
+ import { html, ifDefined } from '@umbraco-cms/backoffice/external/lit'
7
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'
8
+
9
+ export class CromboloBreadcrumbElement extends UmbLitElement {
10
+ static properties = { items: { attribute: false } }
11
+
12
+ constructor() {
13
+ super()
14
+ this.items = []
15
+ }
16
+
17
+ render() {
18
+ return html`<nav aria-label="Breadcrumb">
19
+ <uui-breadcrumbs>
20
+ ${this.items.map(
21
+ (item) =>
22
+ html`<uui-breadcrumb-item href=${ifDefined(item.href)}>${item.label}</uui-breadcrumb-item>`,
23
+ )}
24
+ </uui-breadcrumbs>
25
+ </nav>`
26
+ }
27
+ }
28
+
29
+ customElements.define('crombolo-breadcrumb', CromboloBreadcrumbElement)
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo Localizations",
4
4
  "id": "Crombolo.Localizations",
5
- "version": "0.42.1",
5
+ "version": "0.43.1",
6
6
  "allowPublicAccess": true,
7
7
  "extensions": [
8
8
  {