@commmerce/ui 1.17.0 → 1.17.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.
@@ -318,7 +318,10 @@ _CmColorPicker_id = new WeakMap(), _CmColorPicker_written = new WeakMap(), _CmCo
318
318
  if (e.button !== 0)
319
319
  return;
320
320
  const el = e.currentTarget;
321
- el.setPointerCapture?.(e.pointerId);
321
+ try {
322
+ el.setPointerCapture(e.pointerId);
323
+ }
324
+ catch { /* synthetic events have no active pointer */ }
322
325
  el.focus();
323
326
  __classPrivateFieldSet(this, _CmColorPicker_drag, 'area', "f");
324
327
  __classPrivateFieldGet(this, _CmColorPicker_instances, "m", _CmColorPicker_areaAt).call(this, e);
@@ -455,7 +458,10 @@ _CmColorPicker_id = new WeakMap(), _CmColorPicker_written = new WeakMap(), _CmCo
455
458
  if (e.button !== 0)
456
459
  return;
457
460
  e.stopPropagation();
458
- e.currentTarget.setPointerCapture?.(e.pointerId);
461
+ try {
462
+ e.currentTarget.setPointerCapture(e.pointerId);
463
+ }
464
+ catch { /* synthetic events have no active pointer */ }
459
465
  __classPrivateFieldGet(this, _CmColorPicker_instances, "m", _CmColorPicker_selectStop).call(this, i);
460
466
  __classPrivateFieldSet(this, _CmColorPicker_drag, i, "f");
461
467
  }, _CmColorPicker_onHandleMove = function _CmColorPicker_onHandleMove(e, i) {
@@ -167,7 +167,8 @@ CmResourceItem.styles = [
167
167
  (resource-rows in table-header.ts): change both together. */
168
168
  .row {
169
169
  display: flex; align-items: center; gap: var(--cm-space-12); box-sizing: border-box;
170
- min-height: var(--cm-resource-row-height, 56px); padding: var(--cm-resource-row-padding, 8px) var(--cm-space-8);
170
+ min-height: var(--cm-resource-row-height, 56px);
171
+ padding: var(--cm-resource-row-padding, 8px) calc(var(--_cm-row-inset, 0px) + var(--cm-space-8));
171
172
  font-size: var(--cm-font-size-14); line-height: var(--cm-line-height-14);
172
173
  }
173
174
  @media (pointer: coarse) { .row { min-height: max(var(--cm-resource-row-height, 56px), var(--cm-control-height-touch, 44px)); } }
@@ -199,7 +200,7 @@ CmResourceItem.styles = [
199
200
  @media (max-width: 640px) {
200
201
  :host(:not([actions='inline']):not([columns])) .row.has-actions { flex-wrap: wrap; }
201
202
  :host(:not([actions='inline']):not([columns])) .has-actions .content { flex: 1 1 12rem; }
202
- .row { gap: var(--cm-space-8); padding-inline: 0; }
203
+ .row { gap: var(--cm-space-8); padding-inline: var(--_cm-row-inset, 0px); }
203
204
  .check { width: 20px; height: 20px; }
204
205
  ::slotted([slot='media']) { width: 32px; height: 32px; }
205
206
  ::slotted(cm-thumbnail[slot='media']) { --cm-thumbnail-size: 32px; }
@@ -439,11 +440,11 @@ CmResourceList.styles = [
439
440
  base,
440
441
  checkboxStyles,
441
442
  css `
442
- :host { display: block; position: relative; background: var(--cm-bg-surface); border-radius: var(--cm-radius-md); --_pad: var(--cm-space-12); }
443
+ :host { display: block; position: relative; background: var(--cm-bg-surface); border-radius: var(--cm-radius-md); --_pad: var(--cm-space-12); --_cm-row-inset: var(--_pad); }
443
444
  /* Density (since 1.6): the rows are this element's children, so they inherit these. See density.ts. */
444
445
  :host([density='compact']) { --cm-resource-row-height: 40px; --cm-resource-row-padding: 4px; --cm-resource-media-size: 32px; }
445
446
  :host([density='comfortable']) { --cm-resource-row-height: 56px; --cm-resource-row-padding: 8px; --cm-resource-media-size: 40px; }
446
- /* The header row. Rows sit --_pad in from the list's edges and pad space-8 inside (0 on phones), so their 16px
447
+ /* The header row. Rows pad --_pad + space-8 inside (--_pad on phones), so their 16px
447
448
  checkbox starts space-20 from the edge (space-12 on phones, 20px box). The header row runs edge to edge and puts
448
449
  its box at the same place. The slotted header and the toolbar share one grid cell: the toolbar lies over the
449
450
  header's checkbox column, and while rows are selected it covers the column names. */
@@ -479,7 +480,9 @@ CmResourceList.styles = [
479
480
  .top { display: flex; justify-content: flex-end; gap: var(--cm-space-8); padding: var(--cm-space-8) var(--_pad); }
480
481
  .top:not(.has) { display: none; }
481
482
  .body { position: relative; }
482
- .list { padding: 0 var(--_pad) var(--cm-space-8); }
483
+ /* Rows run edge to edge (1.17.1, owner rule: a hover or selected row is highlighted across the full width). The
484
+ list's --_pad inset lives in each row's padding instead (--_cm-row-inset), so content stays where it was. */
485
+ .list { padding: 0 0 var(--cm-space-8); }
483
486
  :host([loading]) .list ::slotted(*) { opacity: 0.4; }
484
487
  .spinner {
485
488
  position: absolute; inset-inline-start: 50%; top: 50%; width: 48px; height: 48px; margin: -24px; border-radius: 50%;
@@ -162,11 +162,11 @@ CmTableHeader.styles = [
162
162
  input:focus-visible + .box { outline: 2px solid var(--cm-border-strong); outline-offset: 2px; }
163
163
  slot { display: none; }
164
164
  /* In a cm-resource-list (resource-rows): the bar's content box matches a row's content box, so the same
165
- --cm-table-columns grid (with column-gap space-20) lands on the same x positions. The list pads its rows
166
- --_rl from its edges; rows pad --_rp inline, start with a 16px checkbox and a space-12 gap when selectable,
167
- and end with the gap before their (possibly empty) actions. On phones: no row padding, a 20px checkbox, space-8 gaps.
165
+ --cm-table-columns grid (with column-gap space-20) lands on the same x positions. Rows run to the list's edges
166
+ and pad --_rl + --_rp inline (--_rl on phones), start with a 16px checkbox and a space-12 gap when selectable,
167
+ and end with the gap before their (possibly empty) actions. On phones: a 20px checkbox, space-8 gaps.
168
168
  The bar runs to the list's edges with hairlines above and below, and lies under the list's select-all box.
169
- --_rl and --_rp are cm-resource-list's list padding (--_pad) and row padding: change both together. */
169
+ --_rl and --_rp are cm-resource-list's --_pad and the row's own space-8: change both together. */
170
170
  :host([resource-rows]) { --_rl: var(--cm-space-12); --_rp: var(--cm-space-8); }
171
171
  :host([resource-rows]) .bar {
172
172
  margin-inline: calc(-1 * var(--_rl));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commmerce/ui",
3
- "version": "1.17.0",
3
+ "version": "1.17.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",
@@ -16,6 +16,11 @@
16
16
  "email": "support@commmerce.com"
17
17
  },
18
18
  "license": "SEE LICENSE IN LICENSE.md",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/commmerce-dev/commmerce-ui.git",
22
+ "directory": "packages/ui"
23
+ },
19
24
  "type": "module",
20
25
  "main": "./dist/index.js",
21
26
  "types": "./dist/index.d.ts",
@@ -50,8 +55,8 @@
50
55
  "test": "vitest run"
51
56
  },
52
57
  "dependencies": {
53
- "@commmerce/icons": "1.17.0",
54
- "@commmerce/tokens": "1.17.0",
58
+ "@commmerce/icons": "1.17.1",
59
+ "@commmerce/tokens": "1.17.1",
55
60
  "lit": "3.2.1"
56
61
  },
57
62
  "devDependencies": {