@commmerce/ui 1.5.0 → 1.5.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/dist/cdn.js
CHANGED
|
@@ -3208,6 +3208,8 @@ ${t.label}</button>
|
|
|
3208
3208
|
box-sizing: border-box; margin: var(--_gutter); min-block-size: calc(var(--cm-app-frame-height, 100dvh) - var(--_header) - 2 * var(--_gutter));
|
|
3209
3209
|
border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-lg);
|
|
3210
3210
|
}
|
|
3211
|
+
/* Inherited, so a cm-page inside a wrapper element (not slotted directly) is transparent too. */
|
|
3212
|
+
:host([panel]) { --cm-page-background: transparent; }
|
|
3211
3213
|
:host([panel]) ::slotted(cm-page) { background: transparent; }
|
|
3212
3214
|
main:focus { outline: none; }
|
|
3213
3215
|
.bottom { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; }
|
|
@@ -3219,7 +3221,7 @@ ${t.label}</button>
|
|
|
3219
3221
|
.probe { block-size: 0; }
|
|
3220
3222
|
[hidden] { display: none !important; }
|
|
3221
3223
|
`];w("cm-app-frame",Oa);var Ba=class extends C{constructor(){super(...arguments);this.width="";this.fullWidth=!1;this.narrow=!1}render(){return c`<slot name="header"></slot><div class="content" part="content"><slot></slot></div><slot name="footer"></slot>`}};Ba.properties={width:{reflect:!0},fullWidth:{type:Boolean,attribute:"full-width",reflect:!0},narrow:{type:Boolean,reflect:!0}},Ba.styles=[k,y`
|
|
3222
|
-
:host { display: block; container: cm-page / inline-size; background: var(--cm-bg-page); min-block-size: 100%; }
|
|
3224
|
+
:host { display: block; container: cm-page / inline-size; background: var(--cm-page-background, var(--cm-bg-page)); min-block-size: 100%; }
|
|
3223
3225
|
.content {
|
|
3224
3226
|
box-sizing: content-box; max-inline-size: 1600px; margin-inline: auto;
|
|
3225
3227
|
padding: var(--cm-space-24);
|
|
@@ -207,6 +207,8 @@ CmAppFrame.styles = [
|
|
|
207
207
|
box-sizing: border-box; margin: var(--_gutter); min-block-size: calc(var(--cm-app-frame-height, 100dvh) - var(--_header) - 2 * var(--_gutter));
|
|
208
208
|
border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-lg);
|
|
209
209
|
}
|
|
210
|
+
/* Inherited, so a cm-page inside a wrapper element (not slotted directly) is transparent too. */
|
|
211
|
+
:host([panel]) { --cm-page-background: transparent; }
|
|
210
212
|
:host([panel]) ::slotted(cm-page) { background: transparent; }
|
|
211
213
|
main:focus { outline: none; }
|
|
212
214
|
.bottom { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; }
|
|
@@ -8,7 +8,8 @@ import { LitElement } from 'lit';
|
|
|
8
8
|
* Page anatomy: the header (title, primary action at the end), then a filter or toolbar row, then the content.
|
|
9
9
|
* Pick the width by what the page holds: `form` (640px) for settings and single-column forms, `detail` (1040px) for
|
|
10
10
|
* one record (an order, a customer), the default (1600px) for lists and dashboards, `full` for wide tables and reports.
|
|
11
|
-
* The background is `bg-page`; inside `cm-app-frame panel` it is transparent, so the page sits on the white panel.
|
|
11
|
+
* The background is `bg-page`; inside `cm-app-frame panel` (at any depth) it is transparent, so the page sits on the white panel.
|
|
12
|
+
* @cssprop --cm-page-background - The page background. Default `bg-page`; `cm-app-frame panel` sets it to `transparent`.
|
|
12
13
|
* @element cm-page
|
|
13
14
|
* @slot header - A `cm-page-header`. Runs edge to edge.
|
|
14
15
|
* @slot - The page content, usually a `cm-layout`.
|
package/dist/components/page.js
CHANGED
|
@@ -9,7 +9,8 @@ import { base, define } from '../base.js';
|
|
|
9
9
|
* Page anatomy: the header (title, primary action at the end), then a filter or toolbar row, then the content.
|
|
10
10
|
* Pick the width by what the page holds: `form` (640px) for settings and single-column forms, `detail` (1040px) for
|
|
11
11
|
* one record (an order, a customer), the default (1600px) for lists and dashboards, `full` for wide tables and reports.
|
|
12
|
-
* The background is `bg-page`; inside `cm-app-frame panel` it is transparent, so the page sits on the white panel.
|
|
12
|
+
* The background is `bg-page`; inside `cm-app-frame panel` (at any depth) it is transparent, so the page sits on the white panel.
|
|
13
|
+
* @cssprop --cm-page-background - The page background. Default `bg-page`; `cm-app-frame panel` sets it to `transparent`.
|
|
13
14
|
* @element cm-page
|
|
14
15
|
* @slot header - A `cm-page-header`. Runs edge to edge.
|
|
15
16
|
* @slot - The page content, usually a `cm-layout`.
|
|
@@ -40,7 +41,7 @@ CmPage.properties = {
|
|
|
40
41
|
CmPage.styles = [
|
|
41
42
|
base,
|
|
42
43
|
css `
|
|
43
|
-
:host { display: block; container: cm-page / inline-size; background: var(--cm-bg-page); min-block-size: 100%; }
|
|
44
|
+
:host { display: block; container: cm-page / inline-size; background: var(--cm-page-background, var(--cm-bg-page)); min-block-size: 100%; }
|
|
44
45
|
.content {
|
|
45
46
|
box-sizing: content-box; max-inline-size: 1600px; margin-inline: auto;
|
|
46
47
|
padding: var(--cm-space-24);
|
|
@@ -20525,8 +20525,14 @@
|
|
|
20525
20525
|
"declarations": [
|
|
20526
20526
|
{
|
|
20527
20527
|
"kind": "class",
|
|
20528
|
-
"description": "A whole admin page: the page header across the top, then the content with the page padding (`space-24`, or\n`space-16` when the page is 640px wide or less; the same side padding as `cm-page-header`, so titles and content\nline up), centred at a width that suits the page.\n`<cm-page><cm-page-header slot=\"header\" heading=\"Orders\"></cm-page-header><cm-layout>…</cm-layout></cm-page>`\n\nPage anatomy: the header (title, primary action at the end), then a filter or toolbar row, then the content.\nPick the width by what the page holds: `form` (640px) for settings and single-column forms, `detail` (1040px) for\none record (an order, a customer), the default (1600px) for lists and dashboards, `full` for wide tables and reports.\nThe background is `bg-page`; inside `cm-app-frame panel` it is transparent, so the page sits on the white panel.",
|
|
20528
|
+
"description": "A whole admin page: the page header across the top, then the content with the page padding (`space-24`, or\n`space-16` when the page is 640px wide or less; the same side padding as `cm-page-header`, so titles and content\nline up), centred at a width that suits the page.\n`<cm-page><cm-page-header slot=\"header\" heading=\"Orders\"></cm-page-header><cm-layout>…</cm-layout></cm-page>`\n\nPage anatomy: the header (title, primary action at the end), then a filter or toolbar row, then the content.\nPick the width by what the page holds: `form` (640px) for settings and single-column forms, `detail` (1040px) for\none record (an order, a customer), the default (1600px) for lists and dashboards, `full` for wide tables and reports.\nThe background is `bg-page`; inside `cm-app-frame panel` (at any depth) it is transparent, so the page sits on the white panel.",
|
|
20529
20529
|
"name": "CmPage",
|
|
20530
|
+
"cssProperties": [
|
|
20531
|
+
{
|
|
20532
|
+
"description": "The page background. Default `bg-page`; `cm-app-frame panel` sets it to `transparent`.",
|
|
20533
|
+
"name": "--cm-page-background"
|
|
20534
|
+
}
|
|
20535
|
+
],
|
|
20530
20536
|
"slots": [
|
|
20531
20537
|
{
|
|
20532
20538
|
"description": "A `cm-page-header`. Runs edge to edge.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commmerce/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Commmerce UI web components: build apps that feel native to the Commmerce admin. Works in plain HTML, React, Vue and server-rendered pages.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"test": "vitest run"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@commmerce/icons": "1.5.
|
|
54
|
-
"@commmerce/tokens": "1.5.
|
|
53
|
+
"@commmerce/icons": "1.5.1",
|
|
54
|
+
"@commmerce/tokens": "1.5.1",
|
|
55
55
|
"lit": "3.2.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|