@commmerce/ui 1.7.0 → 1.7.2
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
|
@@ -1482,7 +1482,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
|
|
|
1482
1482
|
:host { display: block; }
|
|
1483
1483
|
section {
|
|
1484
1484
|
background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-subtle);
|
|
1485
|
-
border-radius: var(--cm-radius-md); padding: var(--cm-space-
|
|
1485
|
+
border-radius: var(--cm-radius-md); padding: var(--cm-space-24);
|
|
1486
1486
|
}
|
|
1487
1487
|
header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--cm-space-16); margin-bottom: var(--cm-space-16); }
|
|
1488
1488
|
.title { margin: 0; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600; }
|
|
@@ -1495,6 +1495,7 @@ var Ru=o=>{throw TypeError(o)};var Uh=(o,n,e)=>n.has(o)||Ru("Cannot "+e);var r=(
|
|
|
1495
1495
|
.action:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
|
|
1496
1496
|
.items { display: grid; grid-template-columns: 1fr 1fr; gap: var(--cm-space-12) var(--cm-space-20); }
|
|
1497
1497
|
:host([variant='compact']) section { padding: var(--cm-space-16); }
|
|
1498
|
+
@media (max-width: 640px) { section { padding: var(--cm-space-16); } }
|
|
1498
1499
|
:host([variant='compact']) header { margin-bottom: var(--cm-space-12); }
|
|
1499
1500
|
/* Rows (1.7): the item's label and value become two columns of its own grid. */
|
|
1500
1501
|
:host([layout='rows']) .items { grid-template-columns: minmax(0, 1fr); }
|
|
@@ -2083,7 +2084,7 @@ cm-data-table > table .numeric, cm-data-table > table [data-type='numeric'], cm-
|
|
|
2083
2084
|
cm-data-table > table .numeric, cm-data-table > table [data-type='numeric'], cm-data-table > table [data-type='money'], cm-data-table > table [data-type='date'] { white-space: nowrap; }
|
|
2084
2085
|
cm-data-table > table [data-type='actions'] { width: 1%; white-space: nowrap; }
|
|
2085
2086
|
cm-data-table > table td [data-lines] { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
|
|
2086
|
-
cm-data-table > table td [data-lines='1'] { display: block; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; max-inline-size: var(--cm-data-table-cell-max-width, 320px); }
|
|
2087
|
+
cm-data-table > table td [data-lines='1'] { display: block; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; max-inline-size: min(var(--cm-data-table-cell-max-width, 320px), 100%); }
|
|
2087
2088
|
cm-data-table > table td [data-lines='3'] { -webkit-line-clamp: 3; line-clamp: 3; }
|
|
2088
2089
|
cm-data-table > table td [data-lines='4'] { -webkit-line-clamp: 4; line-clamp: 4; }
|
|
2089
2090
|
cm-data-table > table tbody td[data-type='actions'] { padding-block: 0; }
|
|
@@ -2101,6 +2102,8 @@ cm-data-table:has(> table) { container-type: inline-size; }
|
|
|
2101
2102
|
cm-data-table[mobile='cards'] > table tr { display: block; margin-block-end: var(--cm-space-8); padding: var(--cm-space-12) var(--cm-space-16); border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md); background: var(--cm-bg-surface); }
|
|
2102
2103
|
cm-data-table[mobile='cards'] > table tr > * { display: flex; justify-content: space-between; gap: var(--cm-space-12); height: auto; padding: var(--cm-space-4) 0; border: 0; background: none; text-align: end; white-space: normal; }
|
|
2103
2104
|
cm-data-table[mobile='cards'] > table tbody tr:hover > * { background: none; }
|
|
2105
|
+
/* The value side of a card row may shrink, so one-line [data-lines] items end in "\u2026" inside the card (CRM 1.7.1). */
|
|
2106
|
+
cm-data-table[mobile='cards'] > table tr > * > * { min-inline-size: 0; max-inline-size: 100%; }
|
|
2104
2107
|
cm-data-table[mobile='cards'] > table tr > :first-child { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 600; text-align: start; }
|
|
2105
2108
|
cm-data-table[mobile='cards'] > table tr > :not(:first-child)[data-label]::before { content: attr(data-label); font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); color: var(--cm-text-tertiary); text-align: start; font-weight: 400; }
|
|
2106
2109
|
cm-data-table[mobile='cards'] > table td[data-type='actions'] { justify-content: flex-start; flex-wrap: wrap; padding-block-start: var(--cm-space-8); }
|
|
@@ -72,7 +72,7 @@ cm-data-table > table .numeric, cm-data-table > table [data-type='numeric'], cm-
|
|
|
72
72
|
cm-data-table > table .numeric, cm-data-table > table [data-type='numeric'], cm-data-table > table [data-type='money'], cm-data-table > table [data-type='date'] { white-space: nowrap; }
|
|
73
73
|
cm-data-table > table [data-type='actions'] { width: 1%; white-space: nowrap; }
|
|
74
74
|
cm-data-table > table td [data-lines] { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
|
|
75
|
-
cm-data-table > table td [data-lines='1'] { display: block; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; max-inline-size: var(--cm-data-table-cell-max-width, 320px); }
|
|
75
|
+
cm-data-table > table td [data-lines='1'] { display: block; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; max-inline-size: min(var(--cm-data-table-cell-max-width, 320px), 100%); }
|
|
76
76
|
cm-data-table > table td [data-lines='3'] { -webkit-line-clamp: 3; line-clamp: 3; }
|
|
77
77
|
cm-data-table > table td [data-lines='4'] { -webkit-line-clamp: 4; line-clamp: 4; }
|
|
78
78
|
cm-data-table > table tbody td[data-type='actions'] { padding-block: 0; }
|
|
@@ -90,6 +90,8 @@ cm-data-table:has(> table) { container-type: inline-size; }
|
|
|
90
90
|
cm-data-table[mobile='cards'] > table tr { display: block; margin-block-end: var(--cm-space-8); padding: var(--cm-space-12) var(--cm-space-16); border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md); background: var(--cm-bg-surface); }
|
|
91
91
|
cm-data-table[mobile='cards'] > table tr > * { display: flex; justify-content: space-between; gap: var(--cm-space-12); height: auto; padding: var(--cm-space-4) 0; border: 0; background: none; text-align: end; white-space: normal; }
|
|
92
92
|
cm-data-table[mobile='cards'] > table tbody tr:hover > * { background: none; }
|
|
93
|
+
/* The value side of a card row may shrink, so one-line [data-lines] items end in "…" inside the card (CRM 1.7.1). */
|
|
94
|
+
cm-data-table[mobile='cards'] > table tr > * > * { min-inline-size: 0; max-inline-size: 100%; }
|
|
93
95
|
cm-data-table[mobile='cards'] > table tr > :first-child { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 600; text-align: start; }
|
|
94
96
|
cm-data-table[mobile='cards'] > table tr > :not(:first-child)[data-label]::before { content: attr(data-label); font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); color: var(--cm-text-tertiary); text-align: start; font-weight: 400; }
|
|
95
97
|
cm-data-table[mobile='cards'] > table td[data-type='actions'] { justify-content: flex-start; flex-wrap: wrap; padding-block-start: var(--cm-space-8); }
|
|
@@ -40,7 +40,7 @@ export declare class CmInfoPanel extends LitElement {
|
|
|
40
40
|
actionLabel: string;
|
|
41
41
|
/** Heading level for the title. Default 2. */
|
|
42
42
|
headingLevel: 2 | 3 | 4 | 5 | 6;
|
|
43
|
-
/** `default` (
|
|
43
|
+
/** `default` (24px padding, like a standard `cm-card`; 16px on phones; 20px before 1.7.1) or `compact` (16px padding and 12px under the title, like a compact `cm-card`). Since 1.7. */
|
|
44
44
|
variant: 'default' | 'compact';
|
|
45
45
|
/**
|
|
46
46
|
* `stacked` (default: each label over its value; `half` items share a line) or `rows` (each label beside its value,
|
|
@@ -23,7 +23,7 @@ export class CmInfoPanel extends LitElement {
|
|
|
23
23
|
this.actionLabel = '';
|
|
24
24
|
/** Heading level for the title. Default 2. */
|
|
25
25
|
this.headingLevel = 2;
|
|
26
|
-
/** `default` (
|
|
26
|
+
/** `default` (24px padding, like a standard `cm-card`; 16px on phones; 20px before 1.7.1) or `compact` (16px padding and 12px under the title, like a compact `cm-card`). Since 1.7. */
|
|
27
27
|
this.variant = 'default';
|
|
28
28
|
/**
|
|
29
29
|
* `stacked` (default: each label over its value; `half` items share a line) or `rows` (each label beside its value,
|
|
@@ -66,7 +66,7 @@ CmInfoPanel.styles = [
|
|
|
66
66
|
:host { display: block; }
|
|
67
67
|
section {
|
|
68
68
|
background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-subtle);
|
|
69
|
-
border-radius: var(--cm-radius-md); padding: var(--cm-space-
|
|
69
|
+
border-radius: var(--cm-radius-md); padding: var(--cm-space-24);
|
|
70
70
|
}
|
|
71
71
|
header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--cm-space-16); margin-bottom: var(--cm-space-16); }
|
|
72
72
|
.title { margin: 0; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600; }
|
|
@@ -79,6 +79,7 @@ CmInfoPanel.styles = [
|
|
|
79
79
|
.action:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
|
|
80
80
|
.items { display: grid; grid-template-columns: 1fr 1fr; gap: var(--cm-space-12) var(--cm-space-20); }
|
|
81
81
|
:host([variant='compact']) section { padding: var(--cm-space-16); }
|
|
82
|
+
@media (max-width: 640px) { section { padding: var(--cm-space-16); } }
|
|
82
83
|
:host([variant='compact']) header { margin-bottom: var(--cm-space-12); }
|
|
83
84
|
/* Rows (1.7): the item's label and value become two columns of its own grid. */
|
|
84
85
|
:host([layout='rows']) .items { grid-template-columns: minmax(0, 1fr); }
|
|
@@ -18255,7 +18255,7 @@
|
|
|
18255
18255
|
"text": "'default' | 'compact'"
|
|
18256
18256
|
},
|
|
18257
18257
|
"default": "'default'",
|
|
18258
|
-
"description": "`default` (
|
|
18258
|
+
"description": "`default` (24px padding, like a standard `cm-card`; 16px on phones; 20px before 1.7.1) or `compact` (16px padding and 12px under the title, like a compact `cm-card`). Since 1.7.",
|
|
18259
18259
|
"attribute": "variant",
|
|
18260
18260
|
"reflects": true
|
|
18261
18261
|
},
|
|
@@ -18335,7 +18335,7 @@
|
|
|
18335
18335
|
"text": "'default' | 'compact'"
|
|
18336
18336
|
},
|
|
18337
18337
|
"default": "'default'",
|
|
18338
|
-
"description": "`default` (
|
|
18338
|
+
"description": "`default` (24px padding, like a standard `cm-card`; 16px on phones; 20px before 1.7.1) or `compact` (16px padding and 12px under the title, like a compact `cm-card`). Since 1.7.",
|
|
18339
18339
|
"fieldName": "variant"
|
|
18340
18340
|
},
|
|
18341
18341
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commmerce/ui",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
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.7.
|
|
54
|
-
"@commmerce/tokens": "1.7.
|
|
53
|
+
"@commmerce/icons": "1.7.2",
|
|
54
|
+
"@commmerce/tokens": "1.7.2",
|
|
55
55
|
"lit": "3.2.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|