@operato/data-grist 10.29.90 → 10.29.96

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.
@@ -98,11 +98,23 @@ DataCardField.styles = [
98
98
  holds (record-card [detail] does not stretch it), so the third was of a width the label itself made: it cut
99
99
  the label to 「주…」 and the value to 「2020-01-…」 (Office shareholder register, 2026-11-06).
100
100
  */
101
+ /*
102
+ The name reads as a name, the value as the value (2026-11-22, the user: 「'라벨'과 '값'이 전혀 구분이 안되는」 - both
103
+ were 11.7px, weight 400, the same ink, 4px apart). Quietly: the name takes the value's ink faded to 60%, the
104
+ value keeps its own, and 6px stands between them. A theme can set the name's ink (--data-card-item-etc-label-color).
105
+ */
101
106
  label {
102
107
  flex: none;
103
108
  /* the room before the value: :host > * takes every margin away, and a gap on the host is not counted in its width */
104
- padding: 0 var(--spacing-small, 4px) 2px 0;
109
+ padding: 0 6px 2px 0;
110
+ /*
111
+ The values of a card stand on one line down the card: a name takes at least four characters' room (2026-11-22,
112
+ the user: 「세로줄을 맞추도록」 · 「최소값을 주는 것으로」); a longer name runs past it. A card that lays its details
113
+ in a row (--data-card-detail-direction: row) sets the room to 0 - there is no line down it to keep.
114
+ */
115
+ min-width: var(--data-card-item-etc-label-min-width, 4em);
105
116
  font: var(--data-card-item-etc-label-font);
117
+ color: var(--data-card-item-etc-label-color, color-mix(in srgb, currentColor 60%, transparent));
106
118
  text-transform: capitalize;
107
119
  }
108
120
 
@@ -45,6 +45,28 @@ let DataCardGutter = class DataCardGutter extends LitElement {
45
45
  };
46
46
  DataCardGutter.styles = [
47
47
  css `
48
+
49
+ /*
50
+ The row picker on a card or a list row is Material's (gutter-row-selector), a box larger than the browser's with
51
+ its own states and a touch area. It is not a worded gutter: no outline, fill or padding of its own here.
52
+ */
53
+ md-checkbox,
54
+ md-radio {
55
+ border: 0;
56
+ padding: 0;
57
+ background-color: transparent;
58
+ --md-checkbox-container-size: 20px;
59
+ --md-checkbox-icon-size: 20px;
60
+ --md-checkbox-container-shape: 5px;
61
+ /*
62
+ Each control in the rail takes the touch only in a slot of its own, 28 x 36 (2026-11-22, the user: 「아이콘의
63
+ 바운더리가 겹칠 것 같은데」). Material lays a 48px touch area over the 20px box; under it, 2px away, an icon's
64
+ top took the picker's tap. The margin makes the slot, and clip-path cuts the touch area to it - a clipped part
65
+ takes no pointer. The icon below takes the same slot by its padding.
66
+ */
67
+ margin: 8px 4px;
68
+ clip-path: inset(-8px -4px);
69
+ }
48
70
  :host {
49
71
  display: flex;
50
72
  background-color: transparent;
@@ -79,12 +101,18 @@ DataCardGutter.styles = [
79
101
 
80
102
  아이콘 단추는 아이콘 크기로 그리고, 바탕은 손이 갈 때만 든다.
81
103
  */
104
+ /*
105
+ Beside the row picker (md-checkbox, a 20px box) an icon drawn at 20px showed a ~15px glyph - Material icons sit
106
+ on a 24px grid with a 2px margin - and looked smaller and fainter than the box. At 24px the glyph is the box's
107
+ size (2026-11-22, the user: 「그 아이콘들의 크기도 체크박스와 어울리게」). A catalog card sets its own, smaller.
108
+ */
82
109
  md-icon {
83
- --md-icon-size: var(--data-card-gutter-icon-size, 20px);
84
- font-size: var(--data-card-gutter-icon-size, 20px);
110
+ --md-icon-size: var(--data-card-gutter-icon-size, 24px);
111
+ font-size: var(--data-card-gutter-icon-size, 24px);
85
112
  line-height: 1;
86
113
  border: 0;
87
- padding: var(--spacing-tiny);
114
+ /* The icon's touch slot, as the picker's above it: 28 x 36 around the 24px glyph. */
115
+ padding: 6px 2px;
88
116
  color: var(--data-card-gutter-icon-color, var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface)));
89
117
  background-color: transparent;
90
118
  border-radius: var(--md-sys-shape-corner-small);
@@ -19,6 +19,8 @@ export declare class DataCard extends DataManipulator {
19
19
  private _dropTargetId;
20
20
  private _dropSide;
21
21
  firstUpdated(changes: PropertyValues<this>): void;
22
+ /** The room a scrollbar takes on the right - it counts toward the right side's gap (see :host). */
23
+ private keepSidesEven;
22
24
  private _wireReorder;
23
25
  private _onDrop;
24
26
  private _clearDropIndicator;
@@ -30,10 +30,23 @@ let DataCard = class DataCard extends DataManipulator {
30
30
  this._askNextPageIfEnd();
31
31
  this.isTop = this.scrollTop == 0;
32
32
  });
33
- this._resizeObserver = new ResizeObserver(() => this._askNextPageIfEnd());
33
+ /* The content box narrows when a scrollbar appears, so the observer sees it come and go. */
34
+ this._resizeObserver = new ResizeObserver(() => {
35
+ this.keepSidesEven();
36
+ this._askNextPageIfEnd();
37
+ });
34
38
  this._resizeObserver.observe(this);
39
+ this.keepSidesEven();
35
40
  this._wireReorder();
36
41
  }
42
+ /** The room a scrollbar takes on the right - it counts toward the right side's gap (see :host). */
43
+ keepSidesEven() {
44
+ const style = getComputedStyle(this);
45
+ const bar = this.offsetWidth - this.clientWidth - (parseFloat(style.borderLeftWidth) || 0) - (parseFloat(style.borderRightWidth) || 0);
46
+ const value = `${Math.max(0, bar)}px`;
47
+ if (this.style.getPropertyValue('--ox-card-scrollbar') !== value)
48
+ this.style.setProperty('--ox-card-scrollbar', value);
49
+ }
37
50
  /*
38
51
  * `config.rows.reorderable` is read inside each handler, not at listener-registration time - the
39
52
  * listeners are cheap to hold and this sidesteps any question of whether `config` has already been
@@ -291,7 +304,16 @@ DataCard.styles = [
291
304
  css `
292
305
  :host {
293
306
  overflow-y: auto;
294
- padding: var(--spacing-medium);
307
+ /*
308
+ The cards stand on the page's own line - 12px from either edge, as the title and the filters do (2026-11-22,
309
+ the user on a phone: the cards sat 8px from the left and 13px from the right). A scrollbar that takes room
310
+ (a desk, a phone view on one) counts toward the right side: keepSidesEven() measures it into
311
+ --ox-card-scrollbar, so the gap reads the same on both sides whatever the scrollbar is.
312
+ */
313
+ padding: var(--spacing-medium, 8px) var(--spacing-large, 12px);
314
+ /* Above the first card, one card gap - under the filters too (data-grist applyHeadOffset adds to it). */
315
+ padding-top: var(--spacing-large, 12px);
316
+ padding-right: max(0px, calc(var(--spacing-large, 12px) - var(--ox-card-scrollbar, 0px)));
295
317
 
296
318
  display: grid;
297
319
  /*
@@ -102,9 +102,20 @@ let RecordCard = class RecordCard extends LitElement {
102
102
  const record = this.record;
103
103
  const rowIndex = this.rowIndex;
104
104
  const { columns, list } = this.config;
105
- const { thumbnail, fields, details, emptyThumbnail } = list || {};
105
+ const { thumbnail, fields, details, emptyThumbnail, labeled } = list || {};
106
106
  const briefFields = fields.map(field => columns.find(column => column.name == field)).filter(column => column) || [];
107
- const detailFields = details.map(field => columns.find(column => column.name == field)).filter(column => column) || [];
107
+ /* A detail the list asks to name takes its column's head as its name (ListConfig.labeled); one with a label keeps it. */
108
+ const named = (column) => {
109
+ var _a;
110
+ if (column.label || !(labeled === true || (Array.isArray(labeled) && labeled.includes(column.name))))
111
+ return column;
112
+ const head = typeof column.header === 'string' ? column.header : (_a = column.header) === null || _a === void 0 ? void 0 : _a.text;
113
+ return head ? { ...column, label: { renderer: () => head } } : column;
114
+ };
115
+ const detailFields = details
116
+ .map(field => columns.find(column => column.name == field))
117
+ .filter(column => column)
118
+ .map(column => named(column)) || [];
108
119
  const thumbnailColumn = thumbnail ? columns.find(column => column.name == thumbnail) : undefined;
109
120
  /*
110
121
  * 값이 없으면 썸네일 자리를 만들지 않는다.
@@ -427,8 +438,9 @@ RecordCard.styles = [
427
438
  margin: 0;
428
439
  }
429
440
 
441
+ /* The picker's rail is as wide as its touch slots (28px, data-card-gutter) - the text keeps clear of it. */
430
442
  :host([selectable]) [content] {
431
- padding-right: var(--data-card-selector-room, 28px);
443
+ padding-right: var(--data-card-selector-room, 36px);
432
444
  }
433
445
 
434
446
  /*
@@ -46,6 +46,14 @@ export declare class DataGrid extends DataManipulator {
46
46
  }): void;
47
47
  onRecordChanged(recordData: GristRecord, row: number, column: ColumnConfig | null, newRecord?: GristRecord): void;
48
48
  updated(changes: PropertyValues<this>): void;
49
+ /**
50
+ * The selection place covers the column heads between their lines - the heads' top line and the cells' bottom line
51
+ * stay drawn, so the bar reads as the heads' own row (2026-11-22, 「헤더의 상부 경계라인이 사라지는」 · 「아래쪽
52
+ * 라인도 … 살짝 틀어져」). Where the heads are (what sits above them in this box - the filters - moves them down),
53
+ * from the right edge of the last gutter that leads the row (the select-all picker stays in sight). Fractions are
54
+ * kept: the heads are 36.98px high, and a rounded box sat off their line.
55
+ */
56
+ placeSelection(): Promise<void>;
49
57
  calculateWidths(columns: ColumnConfig[]): void;
50
58
  /**
51
59
  * The grid's name, set by the caller as `<ox-grid aria-label="Inbound queue">`.
@@ -48,6 +48,13 @@ let DataGrid = class DataGrid extends DataManipulator {
48
48
  this.body.toggleAttribute('raised', raised);
49
49
  }
50
50
  }, { passive: true });
51
+ /*
52
+ * The heads' box can change without a data change - a column resized, the window narrowed, or what sits above
53
+ * the heads in this box (the filters) grown or shrunk, which resizes the scroller below it.
54
+ */
55
+ const placing = new ResizeObserver(() => this.placeSelection());
56
+ placing.observe(this.header);
57
+ placing.observe(this.scroller);
51
58
  this.header.addEventListener('wheel', this.onWheelEvent.bind(this));
52
59
  this.footer && this.footer.addEventListener('wheel', this.onWheelEvent.bind(this));
53
60
  /* record selection processing */
@@ -165,6 +172,41 @@ let DataGrid = class DataGrid extends DataManipulator {
165
172
  }
166
173
  /* grid fetch 후에 grid로 focus를 주어야 하는 지 검토가 필요하다. */
167
174
  // this.focus()
175
+ if (changes.has('data') || changes.has('config'))
176
+ this.placeSelection();
177
+ }
178
+ /**
179
+ * The selection place covers the column heads between their lines - the heads' top line and the cells' bottom line
180
+ * stay drawn, so the bar reads as the heads' own row (2026-11-22, 「헤더의 상부 경계라인이 사라지는」 · 「아래쪽
181
+ * 라인도 … 살짝 틀어져」). Where the heads are (what sits above them in this box - the filters - moves them down),
182
+ * from the right edge of the last gutter that leads the row (the select-all picker stays in sight). Fractions are
183
+ * kept: the heads are 36.98px high, and a rounded box sat off their line.
184
+ */
185
+ async placeSelection() {
186
+ var _a, _b, _c;
187
+ await ((_a = this.header) === null || _a === void 0 ? void 0 : _a.updateComplete);
188
+ const place = this.renderRoot.querySelector('div[selection]');
189
+ const rows = Array.from((_c = (_b = this.header) === null || _b === void 0 ? void 0 : _b.renderRoot.querySelectorAll('div[grid-row]')) !== null && _c !== void 0 ? _c : []);
190
+ if (!place || !rows.length)
191
+ return;
192
+ const box = this.getBoundingClientRect();
193
+ let edge = box.left;
194
+ for (const cell of Array.from(rows[0].children)) {
195
+ if (!cell.hasAttribute('gutter'))
196
+ break;
197
+ edge = cell.getBoundingClientRect().right;
198
+ }
199
+ const heads = this.header.getBoundingClientRect();
200
+ const top = heads.top + (parseFloat(getComputedStyle(this.header).borderTopWidth) || 0);
201
+ let bottom = top;
202
+ for (const cell of rows.flatMap(row => Array.from(row.children))) {
203
+ const rect = cell.getBoundingClientRect();
204
+ if (rect.height)
205
+ bottom = Math.max(bottom, rect.bottom - (parseFloat(getComputedStyle(cell).borderBottomWidth) || 0));
206
+ }
207
+ place.style.setProperty('--grid-selection-top', `${Math.max(0, top - box.top)}px`);
208
+ place.style.setProperty('--grid-selection-left', `${Math.max(0, edge - box.left)}px`);
209
+ place.style.setProperty('--grid-selection-height', `${Math.max(0, bottom - top)}px`);
168
210
  }
169
211
  calculateWidths(columns) {
170
212
  /*
@@ -302,6 +344,11 @@ let DataGrid = class DataGrid extends DataManipulator {
302
344
  <slot name="setting"></slot>
303
345
  </div>
304
346
 
347
+ <!-- Keys typed in the picked-row actions (a request to the assistant) are not the grid's - not its undo. -->
348
+ <div selection @keydown=${(e) => e.stopPropagation()}>
349
+ <slot name="selection"></slot>
350
+ </div>
351
+
305
352
  <!--
306
353
  The empty note sits on the host, not in the body. The body is as wide as all its columns, so a note
307
354
  centred in it went off to the right whenever the columns were wider than the grid (lot list,
@@ -500,6 +547,33 @@ DataGrid.styles = [
500
547
  * 버튼 자체에 올렸을 때도 켜 둔다. 버튼이 헤더 위에 떠 있어서, 커서가 버튼으로 옮겨오면 헤더는
501
548
  * 더 이상 hover 가 아니다. 이 갈래가 없으면 커서 아래에서 사라진다.
502
549
  */
550
+ /*
551
+ * ── What is done to the picked rows sits over the column heads (2026-11-22) ──────
552
+ *
553
+ * A list's actions on its picked rows (the selection bar) show only while rows are picked. Above
554
+ * the grid, the bar appearing pushed every row down by its height under the pointer that had just
555
+ * picked one, so the next pick landed on another row. Over the column heads it moves nothing: the
556
+ * heads are not needed while rows are picked, and the leading gutters (the select-all picker)
557
+ * stay uncovered. The place is the heads' own box, measured (placeSelection); what is slotted
558
+ * here takes the pointer only where it draws.
559
+ */
560
+ div[selection] {
561
+ position: absolute;
562
+ top: var(--grid-selection-top, 0px);
563
+ right: 0;
564
+ left: var(--grid-selection-left, 0px);
565
+ height: var(--grid-selection-height, auto);
566
+ z-index: 6;
567
+ display: flex;
568
+ pointer-events: none;
569
+ }
570
+
571
+ div[selection] ::slotted(*) {
572
+ flex: 1;
573
+ min-width: 0;
574
+ pointer-events: auto;
575
+ }
576
+
503
577
  div[grid]:has(ox-grid-header:hover) + div[setting],
504
578
  div[setting]:hover,
505
579
  div[setting]:focus-within {
@@ -290,8 +290,13 @@ export declare class DataGrist extends LitElement implements DataConsumer {
290
290
  * Exports the selected records or all records in the component, depending on the specified options.
291
291
  * You can use this method to export data from the component in various formats or for different purposes.
292
292
  *
293
+ * One meaning per door (2026-11-22): a list's own export (the page's exportable) is the rows the list shows, whatever
294
+ * is picked; the picked rows go out by the selection bar's 「선택 내보내기」, which asks for them. Before, no options
295
+ * meant the picked rows if any, else all - so picking one row to act on made the list's export that one row.
296
+ *
293
297
  * @param {Object} options - Export options that control the behavior of the export.
294
- * @param {boolean} options.ifSelectedOnly - If true, exports only the selected records. If false, exports all records.
298
+ * @param {boolean} options.ifSelectedOnly - If true, exports the selected records only (none when none is selected).
299
+ * If false (the default), exports all records the component holds.
295
300
  * @param {boolean} options.includeHiddenField - If true, includes hidden fields in the exported data.
296
301
  * @returns {Object[]} - An array of objects representing the exported records.
297
302
  */
@@ -4,7 +4,7 @@ import './data-list/data-list.js';
4
4
  import './data-card/data-card.js';
5
5
  import '@operato/list-state/ox-list-state.js';
6
6
  import i18next from 'i18next';
7
- import { css, html, LitElement } from 'lit';
7
+ import { css, html, LitElement, nothing } from 'lit';
8
8
  import { customElement, property, query, queryAsync, state } from 'lit/decorators.js';
9
9
  import isEmpty from 'lodash-es/isEmpty.js';
10
10
  import isEqual from 'lodash-es/isEqual.js';
@@ -472,7 +472,19 @@ let DataGrist = class DataGrist extends LitElement {
472
472
  }
473
473
  /* 머리가 덮고 있는 위쪽 padding. 머리의 기준 상자가 host 의 padding 박스이므로 이 값이다. */
474
474
  const overlaid = parseFloat(getComputedStyle(this).paddingTop || '0') || 0;
475
- const offset = Math.max(0, this.head.clientHeight - overlaid) + 'px';
475
+ /*
476
+ The room adds to the list's own top padding; it does not take its place (2026-11-22, the user on a phone:
477
+ 「필터 섹션과 첫번째 카드 사이의 여백이 너무 없지 않은가 ?」 - the first card touched the filters, 0px, while the
478
+ cards stood 12px apart). The gap above the first row is the list's to keep, as it keeps the gaps between rows:
479
+ ox-card keeps one card gap, ox-list and ox-grid keep none. The inline value is cleared first so the list's own
480
+ padding is read, not the room set last time.
481
+
482
+ The head's height is read unrounded: clientHeight rounds a 220.5px head, and the half pixel shows as a line
483
+ that does not meet.
484
+ */
485
+ this.grist.style.removeProperty('padding-top');
486
+ const own = parseFloat(getComputedStyle(this.grist).paddingTop || '0') || 0;
487
+ const offset = Math.max(0, this.head.getBoundingClientRect().height - overlaid) + own + 'px';
476
488
  /*
477
489
  ── 자리는 목록 **안쪽**에 만든다(padding), 목록을 밀어내지 않는다(margin) ──────────
478
490
  전에는 맨 위에서 margin-top 으로 목록 상자 자체를 내려놓았다. 그러면 목록이 차지하는 상자가
@@ -542,6 +554,9 @@ let DataGrist = class DataGrist extends LitElement {
542
554
  const emptyNote = empty ? this.noteWhenEmpty() : undefined;
543
555
  return html `
544
556
  <slot name="headroom"> </slot>
557
+ ${
558
+ /* Without column heads (cards, list) the picked-row actions sit above the rows (data-grid div[selection]). */
559
+ this.shownMode == 'GRID' ? nothing : html `<slot name="selection"></slot>`}
545
560
  <div id="wrap" @keydown=${(e) => this.onKeydown(e)}>
546
561
  ${this.shownMode == 'GRID'
547
562
  ? html `
@@ -557,6 +572,7 @@ let DataGrist = class DataGrist extends LitElement {
557
572
  .emptyNote=${emptyNote}
558
573
  >
559
574
  <slot name="setting" slot="setting"> </slot>
575
+ <slot name="selection" slot="selection"></slot>
560
576
  </ox-grid>
561
577
  `
562
578
  : this.shownMode == 'CARD'
@@ -880,16 +896,18 @@ let DataGrist = class DataGrist extends LitElement {
880
896
  * Exports the selected records or all records in the component, depending on the specified options.
881
897
  * You can use this method to export data from the component in various formats or for different purposes.
882
898
  *
899
+ * One meaning per door (2026-11-22): a list's own export (the page's exportable) is the rows the list shows, whatever
900
+ * is picked; the picked rows go out by the selection bar's 「선택 내보내기」, which asks for them. Before, no options
901
+ * meant the picked rows if any, else all - so picking one row to act on made the list's export that one row.
902
+ *
883
903
  * @param {Object} options - Export options that control the behavior of the export.
884
- * @param {boolean} options.ifSelectedOnly - If true, exports only the selected records. If false, exports all records.
904
+ * @param {boolean} options.ifSelectedOnly - If true, exports the selected records only (none when none is selected).
905
+ * If false (the default), exports all records the component holds.
885
906
  * @param {boolean} options.includeHiddenField - If true, includes hidden fields in the exported data.
886
907
  * @returns {Object[]} - An array of objects representing the exported records.
887
908
  */
888
- exportRecords({ ifSelectedOnly = true, includeHiddenField = true } = {}) {
889
- let records = ifSelectedOnly ? this.selected : this.data.records;
890
- if (ifSelectedOnly && (!records || records.length == 0)) {
891
- records = this.data.records;
892
- }
909
+ exportRecords({ ifSelectedOnly = false, includeHiddenField = true } = {}) {
910
+ const records = (ifSelectedOnly ? this.selected : this.data.records) || [];
893
911
  let columns = this.compiledConfig.columns.filter(column => column.type !== 'gutter');
894
912
  if (!includeHiddenField) {
895
913
  columns = columns.filter(column => !column.hidden);
@@ -1689,6 +1707,31 @@ DataGrist.styles = [
1689
1707
 
1690
1708
  z-index: 8;
1691
1709
  }
1710
+
1711
+ /*
1712
+ Cards and list have no column heads to stand over (data-grid div[selection]): the picked-row actions float at
1713
+ the top of the list the way the headroom does, above it, so no card moves when one is picked.
1714
+
1715
+ Floating, the place is a section of its own, not one more row of filters (2026-11-22, the user: 「필터들과는
1716
+ 구분되도록 섹션 형상에서 좀 차별성이 있어야」): a light accent wash, a line and a shadow under it. It may take
1717
+ more than one line (「모바일에서는 두줄 이상으로 보여도 되잖아」) - it covers, it pushes nothing. What sits here
1718
+ reads these (the selection bar); the grid's place, as high as the heads, sets none and stays one line.
1719
+ */
1720
+ /* Only the cards'/list's own place - the grid's (slot="selection", inside ox-grid) passes the bar on as it is. */
1721
+ slot[name='selection']:not([slot]) {
1722
+ display: block;
1723
+ position: absolute;
1724
+ top: 0;
1725
+ left: 0;
1726
+ width: 100%;
1727
+ z-index: 9;
1728
+
1729
+ --grid-selection-wrap: wrap;
1730
+ --grid-selection-padding-block: var(--spacing-small, 4px);
1731
+ --grid-selection-background: color-mix(in srgb, var(--md-sys-color-primary) 8%, var(--md-sys-color-surface));
1732
+ --grid-selection-border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 28%, transparent);
1733
+ --grid-selection-shadow: 0 2px 6px rgb(0 0 0 / 0.14);
1734
+ }
1692
1735
  `
1693
1736
  ];
1694
1737
  __decorate([
@@ -44,6 +44,23 @@ let DataListGutter = class DataListGutter extends LitElement {
44
44
  };
45
45
  DataListGutter.styles = [
46
46
  css `
47
+
48
+ /*
49
+ The row picker on a card or a list row is Material's (gutter-row-selector), a box larger than the browser's with
50
+ its own states and a touch area. It is not a worded gutter: no outline, fill or padding of its own here.
51
+ */
52
+ md-checkbox,
53
+ md-radio {
54
+ border: 0;
55
+ padding: 0;
56
+ background-color: transparent;
57
+ --md-checkbox-container-size: 20px;
58
+ --md-checkbox-icon-size: 20px;
59
+ --md-checkbox-container-shape: 5px;
60
+ /* Its touch area cut to a slot of its own, so it never takes a neighbour's tap (as on a card). */
61
+ margin: 8px 4px;
62
+ clip-path: inset(-8px -4px);
63
+ }
47
64
  :host {
48
65
  display: flex;
49
66
  align-items: center;
@@ -93,6 +110,16 @@ DataListGutter.styles = [
93
110
  align-items: center;
94
111
  }
95
112
 
113
+ /* An icon beside the row picker (md-checkbox, 20px) draws its glyph at the box's size - as on a card. */
114
+ md-icon {
115
+ flex: none;
116
+ --md-icon-size: var(--data-list-gutter-icon-size, 24px);
117
+ font-size: var(--data-list-gutter-icon-size, 24px);
118
+ line-height: 1;
119
+ padding: var(--spacing-tiny, 2px);
120
+ color: var(--md-sys-color-on-surface-variant, var(--md-sys-color-on-surface));
121
+ }
122
+
96
123
  button md-icon {
97
124
  color: inherit;
98
125
  border: 0;
@@ -1,3 +1,5 @@
1
+ import '@material/web/checkbox/checkbox.js';
2
+ import '@material/web/radio/radio.js';
1
3
  import { ColumnConfig, FieldRenderer, HeaderRenderer } from '../types.js';
2
4
  export declare class GutterRowSelector {
3
5
  static instance(config?: Partial<ColumnConfig>): {
@@ -1,3 +1,5 @@
1
+ import '@material/web/checkbox/checkbox.js';
2
+ import '@material/web/radio/radio.js';
1
3
  import { html } from 'lit';
2
4
  import { i18next } from '@operato/i18n';
3
5
  /*
@@ -49,21 +51,14 @@ export class GutterRowSelector {
49
51
  record: {
50
52
  align: 'center',
51
53
  renderer: function (value, column, record, rowIndex, field) {
52
- return html `
53
- <input
54
- type=${column.multiple ? 'checkbox' : 'radio'}
55
- aria-label=${i18next.t('text.grid-select-record', {
56
- row: rowIndex + 1,
57
- defaultValue: `select row ${rowIndex + 1}`
58
- })}
59
- .checked=${!!value}
60
- @click=${(e) => {
61
- /* The change that follows carries no key state - the click keeps whether shift was held. */
54
+ const label = i18next.t('text.grid-select-record', { row: rowIndex + 1, defaultValue: `select row ${rowIndex + 1}` });
55
+ /* The change that follows carries no key state - the click keeps whether shift was held. */
56
+ const clicked = (e) => {
62
57
  ;
63
58
  e.target.__shiftClick = e.shiftKey;
64
59
  e.stopPropagation();
65
- }}
66
- @change=${(e) => {
60
+ };
61
+ const changed = (e) => {
67
62
  let selected = e.target.checked;
68
63
  let range = !!e.target.__shiftClick;
69
64
  let detail = column.multiple
@@ -81,8 +76,20 @@ export class GutterRowSelector {
81
76
  detail
82
77
  }));
83
78
  e.stopPropagation();
84
- }}
85
- />
79
+ };
80
+ /*
81
+ * Where rows are touched - cards and list - the picker is Material's (2026-11-22, the user: 「모바일에서는 기본
82
+ * 체크박스는 좀 작게 느껴지기도 하고」 · 「체크박스에 다른 컴포넌트가 사용되도 좋을 것 같다」): a larger box with its
83
+ * own picked and pressed states and a 48px touch area laid over it (taking no room). The grid keeps the browser's own box -
84
+ * a dense table worked with a mouse.
85
+ */
86
+ const touched = (field === null || field === void 0 ? void 0 : field.localName) === 'ox-card-gutter' || (field === null || field === void 0 ? void 0 : field.localName) === 'ox-list-gutter';
87
+ if (touched)
88
+ return column.multiple
89
+ ? html `<md-checkbox aria-label=${label} .checked=${!!value} @click=${clicked} @change=${changed}></md-checkbox>`
90
+ : html `<md-radio aria-label=${label} .checked=${!!value} @click=${clicked} @change=${changed}></md-radio>`;
91
+ return html `
92
+ <input type=${column.multiple ? 'checkbox' : 'radio'} aria-label=${label} .checked=${!!value} @click=${clicked} @change=${changed} />
86
93
  `;
87
94
  }
88
95
  },
@@ -560,6 +560,9 @@ export type GristEventHandlerSet = {
560
560
  * drawn empty.
561
561
  * @property {string[]} fields - An array of field names to display in the list mode.
562
562
  * @property {string[]} details - An array of field names to display as additional details in the list mode.
563
+ * @property {boolean|string[]} [labeled] - Details shown with their column's head as their name - all of them (true) or
564
+ * those named. A card has no column heads above its small values; a date, a state and an amount side by side read the
565
+ * same without one (2026-11-22 card audit). A column with its own `label` keeps it.
563
566
  */
564
567
  export type ListConfig = {
565
568
  thumbnail?: string;
@@ -571,6 +574,7 @@ export type ListConfig = {
571
574
  };
572
575
  fields: string[];
573
576
  details: string[];
577
+ labeled?: boolean | string[];
574
578
  };
575
579
  /**
576
580
  * Configuration options for managing tree-like structures in a Grist table.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/data-grist",
3
- "version": "10.29.90",
3
+ "version": "10.29.96",
4
4
  "description": "User interface for grid (desktop) and list (mobile)",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -97,11 +97,11 @@
97
97
  "@material/web": "^2.0.0",
98
98
  "@operato/headroom": "^10.29.83",
99
99
  "@operato/i18n": "^10.29.85",
100
- "@operato/input": "^10.29.90",
101
- "@operato/layout": "^10.29.90",
100
+ "@operato/input": "^10.29.96",
101
+ "@operato/layout": "^10.29.96",
102
102
  "@operato/list-state": "^10.29.85",
103
- "@operato/p13n": "^10.29.85",
104
- "@operato/popup": "^10.29.85",
103
+ "@operato/p13n": "^10.29.96",
104
+ "@operato/popup": "^10.29.96",
105
105
  "@operato/pull-to-refresh": "^10.29.83",
106
106
  "@operato/styles": "^10.29.83",
107
107
  "@operato/time-calculator": "^10.29.83",
@@ -144,5 +144,5 @@
144
144
  "prettier --write"
145
145
  ]
146
146
  },
147
- "gitHead": "354953417c0c6fefa2ed68da4fcfd276d95ba605"
147
+ "gitHead": "08ca236e8ae1eeffc862343e7ca8cd0600f4c7c5"
148
148
  }