@commmerce/ui 1.4.0 → 1.5.0

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.
Files changed (103) hide show
  1. package/dist/calendar.js +15 -19
  2. package/dist/cdn.js +1267 -1138
  3. package/dist/components/accordion.js +9 -8
  4. package/dist/components/action-bar.js +15 -15
  5. package/dist/components/action-menu.js +10 -9
  6. package/dist/components/app-card.js +15 -14
  7. package/dist/components/app-frame.d.ts +14 -0
  8. package/dist/components/app-frame.js +20 -1
  9. package/dist/components/badge.d.ts +2 -1
  10. package/dist/components/badge.js +4 -3
  11. package/dist/components/banner.js +6 -5
  12. package/dist/components/board.js +18 -18
  13. package/dist/components/bottom-navigation.d.ts +1 -1
  14. package/dist/components/bottom-navigation.js +9 -7
  15. package/dist/components/bottom-sheet.d.ts +1 -1
  16. package/dist/components/bottom-sheet.js +9 -8
  17. package/dist/components/button.d.ts +3 -3
  18. package/dist/components/button.js +22 -19
  19. package/dist/components/calendar.js +29 -28
  20. package/dist/components/card.d.ts +1 -1
  21. package/dist/components/card.js +18 -12
  22. package/dist/components/checkbox.js +8 -7
  23. package/dist/components/color-field.js +9 -13
  24. package/dist/components/combobox.d.ts +8 -0
  25. package/dist/components/combobox.js +18 -18
  26. package/dist/components/comment.d.ts +1 -1
  27. package/dist/components/comment.js +12 -13
  28. package/dist/components/data-table.js +12 -11
  29. package/dist/components/date-picker.js +1 -1
  30. package/dist/components/date-range-picker.js +7 -7
  31. package/dist/components/empty-state.d.ts +1 -1
  32. package/dist/components/empty-state.js +16 -16
  33. package/dist/components/file-upload.js +18 -16
  34. package/dist/components/filter-panel.js +1 -1
  35. package/dist/components/flash-offer-bar.js +8 -7
  36. package/dist/components/global-search.d.ts +1 -1
  37. package/dist/components/global-search.js +12 -9
  38. package/dist/components/grid.d.ts +1 -1
  39. package/dist/components/grid.js +1 -1
  40. package/dist/components/header-bar.js +38 -31
  41. package/dist/components/info-panel.d.ts +1 -1
  42. package/dist/components/info-panel.js +11 -10
  43. package/dist/components/layout.d.ts +1 -1
  44. package/dist/components/layout.js +1 -1
  45. package/dist/components/link-tabs.js +8 -7
  46. package/dist/components/metric.js +4 -4
  47. package/dist/components/mobile-menu.js +16 -15
  48. package/dist/components/modal.js +2 -1
  49. package/dist/components/nested-list.d.ts +2 -2
  50. package/dist/components/nested-list.js +21 -22
  51. package/dist/components/notification-panel.js +12 -11
  52. package/dist/components/option-group.js +10 -11
  53. package/dist/components/page-header.js +16 -15
  54. package/dist/components/page.d.ts +18 -4
  55. package/dist/components/page.js +22 -7
  56. package/dist/components/pagination.d.ts +1 -1
  57. package/dist/components/pagination.js +16 -9
  58. package/dist/components/progress-bar.js +4 -3
  59. package/dist/components/radio.js +12 -12
  60. package/dist/components/report-tile.d.ts +2 -2
  61. package/dist/components/report-tile.js +18 -18
  62. package/dist/components/resource-list.d.ts +22 -6
  63. package/dist/components/resource-list.js +92 -52
  64. package/dist/components/save-bar.js +8 -8
  65. package/dist/components/search.d.ts +5 -2
  66. package/dist/components/search.js +20 -14
  67. package/dist/components/segmented-control.d.ts +67 -0
  68. package/dist/components/segmented-control.js +76 -0
  69. package/dist/components/select.d.ts +8 -0
  70. package/dist/components/select.js +18 -18
  71. package/dist/components/side-navigation.js +20 -17
  72. package/dist/components/side-panel.js +4 -3
  73. package/dist/components/signature-field.js +20 -18
  74. package/dist/components/skeleton-display.js +4 -4
  75. package/dist/components/skeleton.d.ts +1 -1
  76. package/dist/components/skeleton.js +2 -2
  77. package/dist/components/smart-tip.d.ts +1 -1
  78. package/dist/components/smart-tip.js +16 -16
  79. package/dist/components/spinner.js +1 -1
  80. package/dist/components/stack.d.ts +1 -1
  81. package/dist/components/stack.js +1 -1
  82. package/dist/components/status-tabs.d.ts +4 -3
  83. package/dist/components/status-tabs.js +26 -12
  84. package/dist/components/table-header.d.ts +4 -3
  85. package/dist/components/table-header.js +22 -15
  86. package/dist/components/tag.js +3 -4
  87. package/dist/components/text-field.d.ts +1 -1
  88. package/dist/components/text-field.js +8 -15
  89. package/dist/components/thumbnail.js +1 -1
  90. package/dist/components/timeline.js +12 -11
  91. package/dist/components/toast.js +6 -6
  92. package/dist/components/toggle.js +12 -11
  93. package/dist/components/tooltip.js +4 -3
  94. package/dist/custom-elements.json +929 -160
  95. package/dist/field.d.ts +15 -0
  96. package/dist/field.js +47 -0
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.js +1 -0
  99. package/dist/overlay.js +5 -4
  100. package/dist/popover.js +8 -8
  101. package/dist/spacing.d.ts +14 -4
  102. package/dist/spacing.js +13 -4
  103. package/package.json +3 -3
@@ -58,26 +58,27 @@ CmAccordion.styles = [
58
58
  base,
59
59
  css `
60
60
  :host { display: block; }
61
- .wrap { border: var(--cm-border-1) solid var(--cm-border-default); border-radius: var(--cm-radius-md); background: var(--cm-bg-surface); }
61
+ .wrap { border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md); background: var(--cm-bg-surface); }
62
62
  .h { margin: 0; font: inherit; }
63
63
  button {
64
- display: flex; align-items: center; justify-content: space-between; gap: var(--cm-space-15); width: 100%;
65
- min-height: 60px; padding-block: var(--cm-space-12); padding-inline: var(--cm-space-20) var(--cm-space-15);
64
+ display: flex; align-items: center; justify-content: space-between; gap: var(--cm-space-12); width: 100%;
65
+ min-height: 48px; padding-block: var(--cm-space-8); padding-inline: var(--cm-space-16) var(--cm-space-12);
66
66
  border: 0; border-radius: inherit; background: none; color: var(--cm-text-default);
67
- font: inherit; font-size: 16px; text-align: start; cursor: pointer;
67
+ font: inherit; font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 500; text-align: start; cursor: pointer;
68
68
  }
69
69
  button:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
70
70
  button:disabled { color: var(--cm-text-secondary); cursor: not-allowed; }
71
71
  .chev {
72
- flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
72
+ flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
73
73
  border-radius: var(--cm-radius-full); background: var(--cm-bg-page); color: var(--cm-icon-selected);
74
- transition: transform .2s ease;
74
+ transition: transform var(--cm-duration-fast) var(--cm-easing-standard);
75
75
  }
76
76
  :host([open]) .chev { transform: rotate(180deg); }
77
77
  @media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
78
- .body { padding: var(--cm-space-15) var(--cm-space-20); border-top: var(--cm-border-1) solid var(--cm-border-default); font-size: 14px; }
78
+ .body { padding: var(--cm-space-12) var(--cm-space-16); border-top: var(--cm-border-1) solid var(--cm-border-subtle); font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); }
79
79
  .body[hidden] { display: none; }
80
- @media (max-width: 640px) { button { min-height: 50px; font-size: 14px; } .chev { width: 28px; height: 28px; } }
80
+
81
+
81
82
  `,
82
83
  ];
83
84
  define('cm-accordion', CmAccordion);
@@ -58,31 +58,31 @@ CmActionBar.styles = [
58
58
  :host([sticky]) { position: sticky; bottom: 0; z-index: 10; }
59
59
  .bar {
60
60
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--cm-space-20);
61
- min-height: 80px; padding: var(--cm-space-15) var(--cm-space-20);
62
- background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-card); border-radius: var(--cm-radius-md);
61
+ min-height: 64px; padding: var(--cm-space-12) var(--cm-space-20);
62
+ background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md);
63
63
  }
64
- :host([sticky]) .bar { box-shadow: var(--cm-shadow-100); }
64
+ :host([sticky]) .bar { box-shadow: var(--cm-shadow-sm); }
65
65
  :host([tone='critical']) .bar {
66
66
  background: var(--cm-bg-error-bar); border-color: transparent; border-top-color: var(--cm-border-critical); border-radius: 0;
67
67
  }
68
- .lead { flex: 1 1 280px; display: flex; align-items: center; gap: var(--cm-space-10); min-width: 0; }
69
- .text { min-width: 0; display: flex; flex-direction: column; gap: var(--cm-space-10); }
70
- .eyebrow { display: flex; align-items: center; gap: var(--cm-space-10); font-size: 14px; font-weight: 500; }
68
+ .lead { flex: 1 1 280px; display: flex; align-items: center; gap: var(--cm-space-8); min-width: 0; }
69
+ .text { min-width: 0; display: flex; flex-direction: column; gap: var(--cm-space-4); }
70
+ .eyebrow { display: flex; align-items: center; gap: var(--cm-space-8); font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13); font-weight: 500; }
71
71
  .eyebrow[hidden] { display: none; }
72
- .heading { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
72
+ .heading { margin: 0; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600; overflow-wrap: anywhere; }
73
73
  :host([tone='critical']) .heading { font-weight: 400; }
74
74
  .icon {
75
- flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
75
+ flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
76
76
  border-radius: var(--cm-radius-full); background: var(--cm-bg-surface); color: var(--cm-icon-critical);
77
77
  }
78
- .actions { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--cm-space-20); margin-inline-start: auto; }
78
+ .actions { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--cm-space-8); margin-inline-start: auto; }
79
79
  @media (max-width: 640px) {
80
- .bar { min-height: 68px; padding: var(--cm-space-10); gap: var(--cm-space-10); }
81
- .heading { font-size: 14px; }
82
- .eyebrow { font-size: 12px; }
83
- .text { gap: var(--cm-space-10); }
84
- .icon { width: 30px; height: 30px; }
85
- .actions { gap: var(--cm-space-10); }
80
+ .bar { min-height: 56px; padding: var(--cm-space-8) var(--cm-space-12); gap: var(--cm-space-8); }
81
+ .heading { font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); }
82
+ .eyebrow { font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); }
83
+ .icon { width: 32px; height: 32px; }
84
+
85
+ .actions { gap: var(--cm-space-8); }
86
86
  }
87
87
  `,
88
88
  ];
@@ -251,27 +251,28 @@ CmActionMenu.styles = [
251
251
  css `
252
252
  :host { display: inline-block; position: relative; vertical-align: middle; }
253
253
  .trigger {
254
- display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 500;
254
+ display: inline-flex; align-items: center; gap: var(--cm-space-8); min-height: var(--cm-control-height-md, 36px); padding: 0 var(--cm-space-12); font: inherit; font-size: var(--cm-font-size-14); font-weight: 500;
255
255
  color: var(--cm-text-default); background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-input);
256
256
  border-radius: var(--cm-radius-sm); cursor: pointer;
257
257
  }
258
- .trigger.icon { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: none; }
258
+ .trigger.icon { width: var(--cm-control-height-md, 36px); padding: 0; justify-content: center; border-color: transparent; background: none; }
259
259
  .trigger:hover { background: var(--cm-bg-hover); }
260
+ @media (pointer: coarse) { .trigger { min-height: var(--cm-control-height-touch, 44px); } .trigger.icon { width: var(--cm-control-height-touch, 44px); } .item { min-height: var(--cm-control-height-touch, 44px); } }
260
261
  .trigger:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
261
262
  .pop {
262
263
  position: absolute; z-index: 20; top: calc(100% + 4px); inset-inline-start: 0; min-width: 180px; max-width: min(320px, calc(100vw - 32px));
263
- padding: 6px; text-align: start; background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-default);
264
- border-radius: var(--cm-radius-sm); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
264
+ padding: var(--cm-space-4); text-align: start; background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-subtle);
265
+ border-radius: var(--cm-radius-md); box-shadow: var(--cm-shadow-md);
265
266
  }
266
267
  :host([align='end']) .pop { inset-inline-start: auto; inset-inline-end: 0; }
267
268
  .pop[hidden] { display: none; }
268
- .head { padding: 4px 6px 8px; margin-bottom: 4px; border-bottom: var(--cm-border-1) solid var(--cm-border-default); overflow-wrap: anywhere; }
269
+ .head { padding: var(--cm-space-4) var(--cm-space-8) var(--cm-space-8); margin-bottom: 4px; border-bottom: var(--cm-border-1) solid var(--cm-border-subtle); overflow-wrap: anywhere; }
269
270
  .head strong { display: block; font-size: 14px; font-weight: 500; }
270
- .head span { display: block; font-size: 11px; color: var(--cm-text-tertiary); }
271
+ .head span { display: block; font-size: var(--cm-font-size-12); color: var(--cm-text-tertiary); }
271
272
  [role='menu'] { display: flex; flex-direction: column; outline: none; }
272
273
  .item {
273
- display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 5px 8px; font: inherit; font-size: 13px; line-height: 18px;
274
- color: var(--cm-text-default); text-align: start; text-decoration: none; background: none; border: 0; border-radius: var(--cm-radius-xs);
274
+ display: flex; align-items: center; gap: var(--cm-space-8); width: 100%; min-height: var(--cm-control-height-sm, 32px); padding: var(--cm-space-4) var(--cm-space-8); font: inherit; font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14);
275
+ color: var(--cm-text-default); text-align: start; text-decoration: none; background: none; border: 0; border-radius: var(--cm-radius-sm);
275
276
  cursor: pointer; outline: none;
276
277
  }
277
278
  .item.critical { color: var(--cm-text-critical); }
@@ -280,7 +281,7 @@ CmActionMenu.styles = [
280
281
  background: var(--cm-bg-panel-header); color: var(--cm-text-on-dark);
281
282
  }
282
283
  .item.active:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 1px; }
283
- [role='separator'] { height: 0; margin: 4px 0; border-top: var(--cm-border-1) solid var(--cm-border-default); }
284
+ [role='separator'] { height: 0; margin: 4px 0; border-top: var(--cm-border-1) solid var(--cm-border-subtle); }
284
285
  `,
285
286
  ];
286
287
  define('cm-action-menu', CmActionMenu);
@@ -77,37 +77,38 @@ CmAppCard.styles = [
77
77
  css `
78
78
  :host { display: block; container-type: inline-size; }
79
79
  article {
80
- position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: var(--cm-space-20);
81
- background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-default); border-radius: var(--cm-radius-md);
82
- font-size: 12px;
80
+ position: relative; display: flex; flex-direction: column; gap: var(--cm-space-8); height: 100%; padding: var(--cm-space-20);
81
+ background: var(--cm-bg-surface); border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md);
82
+ font-size: var(--cm-font-size-13); line-height: var(--cm-line-height-13);
83
83
  }
84
84
  .logo {
85
- display: grid; place-items: center; width: 130px; height: 54px; margin-bottom: 10px; padding: 8px; overflow: hidden;
85
+ display: grid; place-items: center; width: 128px; height: 56px; margin-bottom: var(--cm-space-8); padding: var(--cm-space-8); overflow: hidden;
86
86
  background: var(--cm-bg-inset); border-radius: var(--cm-radius-xs);
87
87
  }
88
88
  ::slotted([slot='logo']) { max-width: 100%; max-height: 100%; object-fit: contain; }
89
89
  .status { position: absolute; top: var(--cm-space-20); inset-inline-end: var(--cm-space-20); }
90
- .name { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
91
- .by { margin: -6px 0 0; }
92
- .rating { display: flex; align-items: center; gap: 5px; margin: 0; }
90
+ .name { margin: 0; font-size: var(--cm-type-heading-sm-size); line-height: var(--cm-type-heading-sm-line-height); font-weight: 600; overflow-wrap: anywhere; }
91
+ .by { margin: -4px 0 0; color: var(--cm-text-tertiary); }
92
+ .rating { display: flex; align-items: center; gap: var(--cm-space-4); margin: 0; }
93
93
  .star { color: var(--cm-icon-rating); }
94
94
  .star::part(svg) { fill: currentColor; }
95
95
  .rating a, .details { color: var(--cm-text-default); text-decoration: underline; text-underline-offset: 2px; }
96
- .rating a:focus-visible, .details:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; border-radius: 2px; }
96
+ .rating a:focus-visible, .details:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; border-radius: var(--cm-radius-xs); }
97
97
  .pricing { margin: 4px 0 0; }
98
98
  .offer {
99
- display: flex; align-items: center; gap: 5px; margin: 0; padding: 4px 6px; font-size: 11px; line-height: 1.3;
99
+ display: flex; align-items: center; gap: var(--cm-space-4); margin: 0; padding: var(--cm-space-4) var(--cm-space-8); font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12);
100
100
  background: var(--cm-bg-offer-card); border-radius: var(--cm-radius-xs);
101
101
  }
102
- .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cm-space-20); margin-top: auto; padding-top: 6px; }
102
+ .actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cm-space-16); margin-top: auto; padding-top: var(--cm-space-8); }
103
103
  .actions slot { display: contents; }
104
104
  .details { font-weight: 500; }
105
105
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
106
106
  @container (max-width: 380px) {
107
- article { padding: var(--cm-space-10); }
108
- .logo { width: 100px; height: 40px; padding: 6px; }
109
- .status { top: var(--cm-space-10); inset-inline-end: var(--cm-space-10); }
110
- .actions { gap: var(--cm-space-10); }
107
+ article { padding: var(--cm-space-8); }
108
+ .logo { width: 100px; height: 40px; padding: var(--cm-space-4); }
109
+
110
+ .status { top: var(--cm-space-8); inset-inline-end: var(--cm-space-8); }
111
+ .actions { gap: var(--cm-space-8); }
111
112
  .details { margin-inline-start: auto; }
112
113
  }
113
114
  `,
@@ -23,6 +23,11 @@ import { LitElement } from 'lit';
23
23
  * @slot bottom-navigation - A `cm-bottom-navigation`. Shown, fixed to the bottom of the window, when the frame is narrower than 1024px. No need to set its `fixed` attribute.
24
24
  * @slot mobile-menu - A `cm-mobile-menu`. Shown over the page while `menu-open` is set and the frame is narrower than 1024px.
25
25
  * @fires cm-menu-toggle - When the frame opens or closes the mobile menu itself: from the `menu-item` in the bottom navigation, Escape, or a choice in the menu. `detail: { open }`. Not fired when you set `menu-open` yourself.
26
+ * With `panel` the frame takes the merchant dashboard's look: the page sits in a white rounded panel (`bg-surface`,
27
+ * `radius-lg`, a 1px `border-subtle`) with a `space-20` gutter beside and below the side navigation card, on the grey
28
+ * `bg-page` under the white header. A `cm-page` inside drops its own grey background. Narrower than 1024px (bottom
29
+ * navigation) the panel runs edge to edge, white, without a gutter or corners, so phones keep every pixel of width.
30
+ * @cssprop --cm-app-frame-gutter - Gap around the panel (`panel`) and around the side navigation. Default `var(--cm-space-20)`.
26
31
  * @cssprop --cm-app-frame-bottom-offset - Extra space at the end of the page, for a bar of your own fixed to the bottom of the window (e.g. a field app's own bottom navigation). Added to the frame's padding for its bottom navigation. Default `0px`.
27
32
  * @cssprop --cm-app-frame-height - Height the side navigation fits in (it scrolls when taller). Default `100dvh`, the window. Set it when the frame is inside a box of its own.
28
33
  */
@@ -37,6 +42,10 @@ export declare class CmAppFrame extends LitElement {
37
42
  menuItem: {
38
43
  attribute: string;
39
44
  };
45
+ panel: {
46
+ type: BooleanConstructor;
47
+ reflect: boolean;
48
+ };
40
49
  _wide: {
41
50
  state: boolean;
42
51
  };
@@ -49,6 +58,11 @@ export declare class CmAppFrame extends LitElement {
49
58
  * menu, and choosing a row in the menu closes it. Empty: you wire the menu yourself.
50
59
  */
51
60
  menuItem: string;
61
+ /**
62
+ * Shows the page in a white rounded panel beside the side navigation, with a gutter around it, on the grey page:
63
+ * the merchant dashboard frame. A `cm-page` inside gets a transparent background. Phones: the panel is edge to edge.
64
+ */
65
+ panel: boolean;
52
66
  _wide: boolean;
53
67
  static styles: import("lit").CSSResult[];
54
68
  connectedCallback(): void;
@@ -45,6 +45,11 @@ const deepActive = () => {
45
45
  * @slot bottom-navigation - A `cm-bottom-navigation`. Shown, fixed to the bottom of the window, when the frame is narrower than 1024px. No need to set its `fixed` attribute.
46
46
  * @slot mobile-menu - A `cm-mobile-menu`. Shown over the page while `menu-open` is set and the frame is narrower than 1024px.
47
47
  * @fires cm-menu-toggle - When the frame opens or closes the mobile menu itself: from the `menu-item` in the bottom navigation, Escape, or a choice in the menu. `detail: { open }`. Not fired when you set `menu-open` yourself.
48
+ * With `panel` the frame takes the merchant dashboard's look: the page sits in a white rounded panel (`bg-surface`,
49
+ * `radius-lg`, a 1px `border-subtle`) with a `space-20` gutter beside and below the side navigation card, on the grey
50
+ * `bg-page` under the white header. A `cm-page` inside drops its own grey background. Narrower than 1024px (bottom
51
+ * navigation) the panel runs edge to edge, white, without a gutter or corners, so phones keep every pixel of width.
52
+ * @cssprop --cm-app-frame-gutter - Gap around the panel (`panel`) and around the side navigation. Default `var(--cm-space-20)`.
48
53
  * @cssprop --cm-app-frame-bottom-offset - Extra space at the end of the page, for a bar of your own fixed to the bottom of the window (e.g. a field app's own bottom navigation). Added to the frame's padding for its bottom navigation. Default `0px`.
49
54
  * @cssprop --cm-app-frame-height - Height the side navigation fits in (it scrolls when taller). Default `100dvh`, the window. Set it when the frame is inside a box of its own.
50
55
  */
@@ -60,6 +65,11 @@ export class CmAppFrame extends LitElement {
60
65
  * menu, and choosing a row in the menu closes it. Empty: you wire the menu yourself.
61
66
  */
62
67
  this.menuItem = '';
68
+ /**
69
+ * Shows the page in a white rounded panel beside the side navigation, with a gutter around it, on the grey page:
70
+ * the merchant dashboard frame. A `cm-page` inside gets a transparent background. Phones: the panel is edge to edge.
71
+ */
72
+ this.panel = false;
63
73
  this._wide = false;
64
74
  _CmAppFrame_ro.set(this, void 0);
65
75
  _CmAppFrame_returnFocus.set(this, null);
@@ -173,6 +183,7 @@ _CmAppFrame_ro = new WeakMap(), _CmAppFrame_returnFocus = new WeakMap(), _CmAppF
173
183
  CmAppFrame.properties = {
174
184
  menuOpen: { type: Boolean, attribute: 'menu-open', reflect: true },
175
185
  menuItem: { attribute: 'menu-item' },
186
+ panel: { type: Boolean, reflect: true },
176
187
  _wide: { state: true },
177
188
  };
178
189
  CmAppFrame.styles = [
@@ -186,9 +197,17 @@ CmAppFrame.styles = [
186
197
  position: sticky; inset-block-start: var(--_header); box-sizing: border-box;
187
198
  max-block-size: calc(var(--cm-app-frame-height, 100dvh) - var(--_header));
188
199
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
189
- padding: var(--cm-space-20); padding-inline-end: 0;
200
+ padding: var(--_gutter); padding-inline-end: 0;
190
201
  }
202
+ .frame { --_gutter: var(--cm-app-frame-gutter, var(--cm-space-20)); }
191
203
  main { display: block; min-inline-size: 0; padding-block-end: calc(var(--_bottom) + var(--cm-app-frame-bottom-offset, 0px)); }
204
+ /* Panel: the page in a white rounded card with a gutter on the grey page (the merchant dashboard frame). */
205
+ :host([panel]) main { background: var(--cm-bg-surface); }
206
+ :host([panel]) .wide main {
207
+ box-sizing: border-box; margin: var(--_gutter); min-block-size: calc(var(--cm-app-frame-height, 100dvh) - var(--_header) - 2 * var(--_gutter));
208
+ border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-lg);
209
+ }
210
+ :host([panel]) ::slotted(cm-page) { background: transparent; }
192
211
  main:focus { outline: none; }
193
212
  .bottom { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 40; }
194
213
  ::slotted([slot='bottom-navigation']) { position: static; }
@@ -1,7 +1,8 @@
1
1
  import { LitElement } from 'lit';
2
2
  import { type Tone } from '../base.js';
3
3
  /**
4
- * Uppercase status pill ("ORDER PLACED", "ACCEPTED").
4
+ * Status pill in sentence case ("Order placed", "5 open"): 12px medium text on a tinted 20px pill. Write the text in
5
+ * sentence case; since 1.5 it is shown as written (it was upper-cased with wide letter-spacing before).
5
6
  * @element cm-badge
6
7
  * @slot - Status text.
7
8
  */
@@ -1,7 +1,8 @@
1
1
  import { LitElement, html, css } from 'lit';
2
2
  import { base, define } from '../base.js';
3
3
  /**
4
- * Uppercase status pill ("ORDER PLACED", "ACCEPTED").
4
+ * Status pill in sentence case ("Order placed", "5 open"): 12px medium text on a tinted 20px pill. Write the text in
5
+ * sentence case; since 1.5 it is shown as written (it was upper-cased with wide letter-spacing before).
5
6
  * @element cm-badge
6
7
  * @slot - Status text.
7
8
  */
@@ -21,8 +22,8 @@ CmBadge.styles = [
21
22
  css `
22
23
  :host { display: inline-flex; vertical-align: middle; }
23
24
  span {
24
- display: inline-flex; align-items: center; height: 28px; padding: 0 var(--cm-space-10);
25
- font-size: 10px; font-weight: 500; letter-spacing: var(--cm-tracking-caps); text-transform: uppercase;
25
+ display: inline-flex; align-items: center; height: 20px; padding: 0 var(--cm-space-8); white-space: nowrap;
26
+ font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); font-weight: 500; font-variant-numeric: tabular-nums;
26
27
  border-radius: var(--cm-radius-full); background: var(--cm-bg-tag); color: var(--cm-text-default);
27
28
  }
28
29
  /* Tinted tones are laid over the surface colour, so the text keeps AA contrast on any page background. */
@@ -64,9 +64,9 @@ CmBanner.styles = [
64
64
  css `
65
65
  :host { display: block; }
66
66
  .banner {
67
- display: flex; gap: var(--cm-space-15); align-items: flex-start;
68
- padding: var(--cm-space-15) var(--cm-space-20); border-radius: var(--cm-radius-md);
69
- background: var(--cm-bg-attention); color: var(--cm-text-default); font-size: 14px;
67
+ display: flex; gap: var(--cm-space-12); align-items: flex-start;
68
+ padding: var(--cm-space-12) var(--cm-space-20); border-radius: var(--cm-radius-md);
69
+ background: var(--cm-bg-attention); color: var(--cm-text-default); font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14);
70
70
  }
71
71
  :host([tone='information']) .banner { background: var(--cm-bg-information); }
72
72
  :host([tone='success']) .banner { background: var(--cm-bg-success); }
@@ -75,9 +75,10 @@ CmBanner.styles = [
75
75
  :host([tone='critical']) .icon { color: var(--cm-icon-critical); }
76
76
  :host([tone='information']) .icon, :host([tone='success']) .icon { color: var(--cm-text-default); }
77
77
  .body { flex: 1; display: flex; flex-direction: column; gap: 4px; }
78
- .title { margin: 0; font-size: 16px; font-weight: 600; }
78
+ .title { margin: 0; font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14); font-weight: 600; }
79
+
79
80
  :host([tone='critical']) .title { color: var(--cm-text-critical); }
80
- .actions { display: flex; gap: var(--cm-space-10); margin-top: var(--cm-space-10); }
81
+ .actions { display: flex; gap: var(--cm-space-8); margin-top: var(--cm-space-8); }
81
82
  .actions[hidden] { display: none; }
82
83
  .close {
83
84
  flex: none; display: inline-flex; padding: 4px; margin: -4px; background: none; border: 0;
@@ -176,27 +176,27 @@ CmBoardCard.styles = [
176
176
  css `
177
177
  :host { display: block; position: relative; -webkit-touch-callout: none; font-size: 14px; line-height: 20px; }
178
178
  .card {
179
- position: relative; display: block; padding: var(--cm-space-12) var(--cm-space-15); background: var(--cm-bg-surface);
180
- border: var(--cm-border-1) solid var(--cm-border-card); border-radius: var(--cm-radius-md); cursor: grab;
179
+ position: relative; display: block; padding: var(--cm-space-12) var(--cm-space-12); background: var(--cm-bg-surface);
180
+ border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md); cursor: grab;
181
181
  }
182
182
  :host([locked]) .card { cursor: default; }
183
183
  .handle { position: absolute; inset: 0; z-index: 0; border-radius: inherit; outline: none; }
184
184
  .handle:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
185
185
  .content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
186
- .head { display: flex; align-items: flex-start; gap: var(--cm-space-10); }
186
+ .head { display: flex; align-items: flex-start; gap: var(--cm-space-8); }
187
187
  .title { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
188
188
  .title a { color: inherit; text-decoration: none; }
189
189
  .title a:hover { text-decoration: underline; }
190
190
  .lines { display: flex; flex-direction: column; font-size: 12px; line-height: 16px; color: var(--cm-text-tertiary); overflow-wrap: anywhere; }
191
- .badges { display: flex; flex-wrap: wrap; gap: 4px; margin-block-start: 6px; }
191
+ .badges { display: flex; flex-wrap: wrap; gap: var(--cm-space-4); margin-block-start: var(--cm-space-8); }
192
192
  .badges[hidden] { display: none; }
193
193
  ::slotted([slot='avatar']), ::slotted([slot='actions']) { flex: none; }
194
- .spin { position: absolute; z-index: 2; inset-block-start: var(--cm-space-10); inset-inline-end: var(--cm-space-10); }
194
+ .spin { position: absolute; z-index: 2; inset-block-start: var(--cm-space-8); inset-inline-end: var(--cm-space-8); }
195
195
  :host([pending]) .card { background: var(--cm-bg-page); cursor: progress; }
196
196
  :host([pending]) .content { padding-inline-end: 24px; }
197
197
  :host([moving]) .card { border-style: dashed; border-color: var(--cm-border-strong); background: var(--cm-bg-page); }
198
198
  :host([moving]) .content { opacity: 0.5; }
199
- :host([ghost]) .card { cursor: grabbing; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); border-color: var(--cm-border-default); }
199
+ :host([ghost]) .card { cursor: grabbing; box-shadow: var(--cm-shadow-lg); border-color: var(--cm-border-subtle); }
200
200
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
201
201
  `,
202
202
  ];
@@ -357,31 +357,31 @@ CmBoardColumn.styles = [
357
357
  :host([collapsed]) { inline-size: 48px; }
358
358
  section {
359
359
  position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; background: var(--cm-bg-page);
360
- border: var(--cm-border-1) solid var(--cm-border-card); border-radius: var(--cm-radius-md);
360
+ border: var(--cm-border-1) solid var(--cm-border-subtle); border-radius: var(--cm-radius-md);
361
361
  }
362
- header { display: flex; align-items: center; gap: var(--cm-space-10); min-height: 48px; padding: var(--cm-space-10) var(--cm-space-15); }
362
+ header { display: flex; align-items: center; gap: var(--cm-space-8); min-height: 48px; padding: var(--cm-space-8) var(--cm-space-12); }
363
363
  .title { flex: 1; min-width: 0; margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; overflow-wrap: anywhere; }
364
364
  .count {
365
365
  flex: none; min-width: 24px; padding: 0 8px; font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums;
366
366
  background: var(--cm-bg-surface); color: var(--cm-text-default); border-radius: var(--cm-radius-full);
367
367
  }
368
- .scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--cm-space-10) var(--cm-space-10); }
369
- ul { display: flex; flex-direction: column; gap: var(--cm-space-10); margin: 0; padding: 0; list-style: none; }
368
+ .scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--cm-space-8) var(--cm-space-8); }
369
+ ul { display: flex; flex-direction: column; gap: var(--cm-space-8); margin: 0; padding: 0; list-style: none; }
370
370
  ul:focus { outline: none; }
371
371
  li { display: block; min-width: 0; }
372
372
  .drop > div {
373
- display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--cm-space-15);
373
+ display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 var(--cm-space-12);
374
374
  border: 2px dashed var(--cm-border-strong); border-radius: var(--cm-radius-md); background: var(--cm-bg-surface);
375
375
  color: var(--cm-text-tertiary); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
376
376
  }
377
- .empty { padding: var(--cm-space-15) var(--cm-space-10); font-size: 12px; color: var(--cm-text-tertiary); text-align: center; }
378
- .loading { display: grid; gap: var(--cm-space-10); }
377
+ .empty { padding: var(--cm-space-12) var(--cm-space-8); font-size: 12px; color: var(--cm-text-tertiary); text-align: center; }
378
+ .loading { display: grid; gap: var(--cm-space-8); }
379
379
  .loading cm-skeleton { --cm-skeleton-height: 72px; }
380
- .more { display: flex; justify-content: center; padding-block-start: var(--cm-space-10); }
380
+ .more { display: flex; justify-content: center; padding-block-start: var(--cm-space-8); }
381
381
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
382
382
  [hidden] { display: none !important; }
383
383
  /* Rail: the heading turned on its side, the count on top. Still a drop target. */
384
- :host([collapsed]) header { flex-direction: column; justify-content: flex-start; padding: var(--cm-space-10) 0; gap: var(--cm-space-10); }
384
+ :host([collapsed]) header { flex-direction: column; justify-content: flex-start; padding: var(--cm-space-8) 0; gap: var(--cm-space-8); }
385
385
  :host([collapsed]) .title { flex: none; writing-mode: vertical-rl; white-space: nowrap; overflow-wrap: normal; }
386
386
  :host([collapsed]) .scroll { padding: 0; overflow: hidden; }
387
387
  :host([collapsed]) .actions { display: none; }
@@ -1002,13 +1002,13 @@ CmBoard.styles = [
1002
1002
  :host { position: relative; display: block; container-type: inline-size; container-name: cm-board; min-width: 0; }
1003
1003
  .board { height: 100%; }
1004
1004
  .columns {
1005
- position: relative; display: flex; align-items: stretch; gap: var(--cm-space-15); height: 100%; overflow-x: auto; overflow-y: hidden;
1006
- padding-block-end: var(--cm-space-10); overscroll-behavior-x: contain;
1005
+ position: relative; display: flex; align-items: stretch; gap: var(--cm-space-12); height: 100%; overflow-x: auto; overflow-y: hidden;
1006
+ padding-block-end: var(--cm-space-8); overscroll-behavior-x: contain;
1007
1007
  }
1008
1008
  :host([dragging]) .columns { scroll-snap-type: none !important; }
1009
1009
  :host([dragging]) { cursor: grabbing; user-select: none; -webkit-user-select: none; }
1010
1010
  @container cm-board (max-width: 480px) {
1011
- .columns { scroll-snap-type: x mandatory; scroll-padding-inline: 0; gap: var(--cm-space-10); }
1011
+ .columns { scroll-snap-type: x mandatory; scroll-padding-inline: 0; gap: var(--cm-space-8); }
1012
1012
  ::slotted(cm-board-column) { inline-size: calc(100% - 40px); scroll-snap-align: start; }
1013
1013
  ::slotted(cm-board-column[collapsed]) { inline-size: 48px; }
1014
1014
  }
@@ -11,7 +11,7 @@ declare module '../localize.js' {
11
11
  }
12
12
  }
13
13
  /**
14
- * The admin's tab bar on phones and small tablets: up to five destinations with an icon over an uppercase
14
+ * The admin's tab bar on phones and small tablets: up to five destinations with an icon over a short
15
15
  * label, in a white bar with rounded top corners. The last item ("More") usually opens the Mobile menu.
16
16
  * For Commmerce products only, not for apps.
17
17
  *
@@ -20,7 +20,7 @@ const strings = defineStrings('bottomNavigation', {
20
20
  label: 'Main',
21
21
  });
22
22
  /**
23
- * The admin's tab bar on phones and small tablets: up to five destinations with an icon over an uppercase
23
+ * The admin's tab bar on phones and small tablets: up to five destinations with an icon over a short
24
24
  * label, in a white bar with rounded top corners. The last item ("More") usually opens the Mobile menu.
25
25
  * For Commmerce products only, not for apps.
26
26
  *
@@ -61,7 +61,7 @@ export class CmBottomNavigation extends CmLocalizedElement {
61
61
  }
62
62
  _CmBottomNavigation_observer = new WeakMap(), _CmBottomNavigation_instances = new WeakSet(), _CmBottomNavigation_read = function _CmBottomNavigation_read() { this._slotted = readNavItems(this); }, _CmBottomNavigation_item = function _CmBottomNavigation_item(it) {
63
63
  const cls = `item ${it.primary ? 'primary' : ''}`;
64
- const inner = html `<span class="icon">${it.icon ? html `<cm-icon name=${it.icon} size=${it.primary ? 16 : 24}></cm-icon>` : nothing}</span><span class="label">${it.label}</span>`;
64
+ const inner = html `<span class="icon">${it.icon ? html `<cm-icon name=${it.icon} size=${it.primary ? 16 : 20}></cm-icon>` : nothing}</span><span class="label">${it.label}</span>`;
65
65
  const go = (e) => { if (!fireNavigate(this, it))
66
66
  e.preventDefault(); };
67
67
  return it.href
@@ -80,20 +80,22 @@ CmBottomNavigation.styles = [
80
80
  :host { display: block; }
81
81
  :host([fixed]) { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; }
82
82
  nav {
83
- background: var(--cm-bg-surface); border-radius: 16px 16px 0 0; box-shadow: var(--cm-shadow-100);
84
- padding: 10px 6px calc(8px + env(safe-area-inset-bottom, 0px));
83
+ background: var(--cm-bg-surface); border-radius: var(--cm-radius-lg) var(--cm-radius-lg) 0 0;
84
+ border-block-start: var(--cm-border-1) solid var(--cm-border-subtle);
85
+ padding: var(--cm-space-8) var(--cm-space-4) calc(var(--cm-space-8) + env(safe-area-inset-bottom, 0px));
85
86
  }
86
87
  ul { display: flex; list-style: none; margin: 0; padding: 0; }
87
88
  li { flex: 1; min-width: 0; display: flex; }
88
89
  .item {
89
- flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 48px; padding: 2px 2px 0;
90
- font: inherit; font-size: 10px; font-weight: 500; letter-spacing: var(--cm-tracking-caps); text-transform: uppercase;
90
+ flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--cm-space-4);
91
+ min-height: var(--cm-space-48); padding: var(--cm-space-4) var(--cm-space-4) 0;
92
+ font: inherit; font-size: var(--cm-font-size-12); line-height: var(--cm-line-height-12); font-weight: 500;
91
93
  color: var(--cm-text-tertiary); text-decoration: none; background: none; border: 0; border-radius: var(--cm-radius-sm); cursor: pointer;
92
94
  }
93
95
  .item:hover, .item[aria-current='page'] { color: var(--cm-text-default); }
94
96
  .item[aria-current='page'] .icon { color: var(--cm-icon-selected); }
95
97
  .item:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 0; }
96
- .icon { display: grid; place-items: center; width: 26px; height: 26px; }
98
+ .icon { display: grid; place-items: center; width: var(--cm-icon-size-lg); height: var(--cm-icon-size-lg); }
97
99
  .primary .icon { color: var(--cm-action-primary-text); background: var(--cm-action-primary); border-radius: var(--cm-radius-xs); }
98
100
  .label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
99
101
  `,
@@ -3,7 +3,7 @@ import { type MenuItem } from './menu-item.js';
3
3
  import './icon.js';
4
4
  /**
5
5
  * A sheet that rises from the bottom of a phone screen with a few actions ("Mark as paid", "Generate invoice")
6
- * or shortcuts ("Orders", "Add orders"). White with 20px top corners, a round black close button on its top
6
+ * or shortcuts ("Orders", "Add orders"). White with 12px top corners, a round black close button on its top
7
7
  * edge, and rows split by thin lines. Rows without icons are centred; rows with icons line up left and end in a
8
8
  * chevron. Use `cm-menu-item` children (or `items`); anything else in the sheet is shown as it is.
9
9
  *
@@ -17,7 +17,7 @@ import { readMenuItems, watchMenuItems } from './menu-item.js';
17
17
  import './icon.js';
18
18
  /**
19
19
  * A sheet that rises from the bottom of a phone screen with a few actions ("Mark as paid", "Generate invoice")
20
- * or shortcuts ("Orders", "Add orders"). White with 20px top corners, a round black close button on its top
20
+ * or shortcuts ("Orders", "Add orders"). White with 12px top corners, a round black close button on its top
21
21
  * edge, and rows split by thin lines. Rows without icons are centred; rows with icons line up left and end in a
22
22
  * chevron. Use `cm-menu-item` children (or `items`); anything else in the sheet is shown as it is.
23
23
  *
@@ -81,7 +81,8 @@ _CmBottomSheet_observer = new WeakMap(), _CmBottomSheet_instances = new WeakSet(
81
81
  this.requestClose('action');
82
82
  }, _CmBottomSheet_row = function _CmBottomSheet_row(it) {
83
83
  const cls = `row${it.critical ? ' critical' : ''}`;
84
- const inner = html `${it.icon ? html `<cm-icon class="lead" name=${it.icon} size="18"></cm-icon>` : nothing}<span class="label">${it.label}</span>${it.icon ? html `<cm-icon name="chevron-right" size="16"></cm-icon>` : nothing}`;
84
+ const inner = html `${it.icon ? html `<cm-icon class="lead" name=${it.icon} size="16"></cm-icon>
85
+ ` : nothing}<span class="label">${it.label}</span>${it.icon ? html `<cm-icon name="chevron-right" size="16"></cm-icon>` : nothing}`;
85
86
  return it.href && !it.disabled
86
87
  ? html `<a class=${cls} part="row" href=${it.href} @click=${(e) => __classPrivateFieldGet(this, _CmBottomSheet_instances, "m", _CmBottomSheet_choose).call(this, e, it)}>${inner}</a>`
87
88
  : html `<button type="button" class=${cls} part="row" aria-disabled=${it.disabled ? 'true' : nothing}
@@ -96,11 +97,11 @@ CmBottomSheet.styles = [
96
97
  ...CmOverlay.overlayStyles,
97
98
  css `
98
99
  dialog {
99
- position: fixed; inset: auto 0 0 0; margin: 0 auto; width: min(600px, 100vw); padding-top: 22px;
100
+ position: fixed; inset: auto 0 0 0; margin: 0 auto; width: min(600px, 100vw); padding-top: var(--cm-space-24);
100
101
  }
101
102
  .panel {
102
- position: relative; overflow: visible; max-height: calc(100dvh - 80px); padding: 18px var(--cm-space-20) max(var(--cm-space-20), env(safe-area-inset-bottom));
103
- border-radius: 20px 20px 0 0; box-shadow: var(--cm-shadow-100);
103
+ position: relative; overflow: visible; max-height: calc(100dvh - 80px); padding: var(--cm-space-20) var(--cm-space-16) max(var(--cm-space-16), env(safe-area-inset-bottom));
104
+ border-radius: var(--cm-radius-lg) var(--cm-radius-lg) 0 0; box-shadow: var(--cm-shadow-lg);
104
105
  }
105
106
  .x {
106
107
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%); /* centred: the same in both directions */ width: 36px; height: 36px; border-radius: 50%;
@@ -109,9 +110,9 @@ CmBottomSheet.styles = [
109
110
  .x:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
110
111
  .content { overflow: auto; min-height: 0; }
111
112
  ul { list-style: none; margin: 0; padding: 0; }
112
- li + li { border-top: var(--cm-border-1) solid var(--cm-border-default); }
113
+ li + li { border-top: var(--cm-border-1) solid var(--cm-border-subtle); }
113
114
  .row {
114
- display: flex; align-items: center; justify-content: center; gap: var(--cm-space-10); width: 100%; min-height: 44px; padding: 8px 4px;
115
+ display: flex; align-items: center; justify-content: center; gap: var(--cm-space-8); width: 100%; min-height: 44px; padding: 8px 4px;
115
116
  font: inherit; font-size: 14px; color: var(--cm-text-default); text-decoration: none; background: none; border: 0; cursor: pointer;
116
117
  }
117
118
  .icons .row { justify-content: flex-start; }
@@ -124,7 +125,7 @@ CmBottomSheet.styles = [
124
125
  .row:focus-visible { outline: 2px solid var(--cm-border-strong); outline-offset: -2px; border-radius: var(--cm-radius-sm); }
125
126
  .lead { color: var(--cm-icon-default); }
126
127
  @media (prefers-reduced-motion: no-preference) {
127
- dialog[open] .panel { animation: cm-sheet-in 200ms ease-out; }
128
+ dialog[open] .panel { animation: cm-sheet-in var(--cm-duration-base) var(--cm-easing-standard); }
128
129
  }
129
130
  @keyframes cm-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
130
131
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@@ -59,9 +59,9 @@ export declare class CmButton extends CmLocalizedElement {
59
59
  reflect: boolean;
60
60
  };
61
61
  };
62
- /** `primary` = black fill (one per group); `secondary` = light fill, black outline. */
62
+ /** `primary` = black fill (one per group); `secondary` = white fill with a grey outline, like a field (since 1.5; was a black outline). */
63
63
  variant: 'primary' | 'secondary';
64
- /** `large` 46px (save bars), `medium` 32px, `slim` 24px. */
64
+ /** `large` 40px (save bars, page actions), `medium` 36px (default), `slim` 32px (toolbars, table rows). Text is 14px (13px on slim). On touch screens every size is at least 44px tall. Sizes changed in 1.5 (were 46, 32 and 24px). */
65
65
  size: 'large' | 'medium' | 'slim';
66
66
  /** Form behaviour when inside a `<form>`: `submit` submits it, `reset` resets it. */
67
67
  type: 'button' | 'submit' | 'reset';
@@ -75,7 +75,7 @@ export declare class CmButton extends CmLocalizedElement {
75
75
  target?: string;
76
76
  /** Square button that shows only its icon (from `icon` or the `icon` slot). Give it a `label`. */
77
77
  iconOnly: boolean;
78
- /** Name of a @commmerce/icons icon shown before the label (16px; 20px when `size="large"`). */
78
+ /** Name of a @commmerce/icons icon shown before the label (16px at every size). */
79
79
  icon: string;
80
80
  /** Accessible name of an `icon-only` button ("Notifications", "Refresh"). Required with `icon-only`; ignored otherwise, so the visible text stays the name. */
81
81
  label: string;