@commmerce/ui 1.5.2 → 1.6.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 (63) hide show
  1. package/dist/calendar.js +2 -0
  2. package/dist/cdn.js +1004 -645
  3. package/dist/components/action-menu.d.ts +28 -1
  4. package/dist/components/action-menu.js +86 -17
  5. package/dist/components/badge.d.ts +3 -2
  6. package/dist/components/badge.js +4 -3
  7. package/dist/components/bottom-sheet.js +1 -1
  8. package/dist/components/button.d.ts +5 -1
  9. package/dist/components/button.js +18 -6
  10. package/dist/components/card.d.ts +38 -0
  11. package/dist/components/card.js +77 -12
  12. package/dist/components/checkbox.js +7 -2
  13. package/dist/components/color-field.js +2 -0
  14. package/dist/components/combobox.d.ts +27 -2
  15. package/dist/components/combobox.js +109 -15
  16. package/dist/components/data-table.d.ts +127 -9
  17. package/dist/components/data-table.js +577 -67
  18. package/dist/components/date-picker.d.ts +1 -1
  19. package/dist/components/date-picker.js +1 -1
  20. package/dist/components/date-range-picker.d.ts +1 -1
  21. package/dist/components/date-range-picker.js +2 -2
  22. package/dist/components/empty-state.d.ts +8 -6
  23. package/dist/components/empty-state.js +26 -17
  24. package/dist/components/file-upload.d.ts +49 -4
  25. package/dist/components/file-upload.js +136 -29
  26. package/dist/components/layout.d.ts +2 -2
  27. package/dist/components/layout.js +5 -5
  28. package/dist/components/menu-item.d.ts +18 -0
  29. package/dist/components/menu-item.js +8 -0
  30. package/dist/components/page-header.d.ts +6 -0
  31. package/dist/components/page-header.js +22 -5
  32. package/dist/components/pagination.d.ts +3 -2
  33. package/dist/components/pagination.js +13 -10
  34. package/dist/components/radio.js +4 -2
  35. package/dist/components/resource-list.d.ts +28 -3
  36. package/dist/components/resource-list.js +47 -15
  37. package/dist/components/search.d.ts +2 -2
  38. package/dist/components/search.js +4 -2
  39. package/dist/components/segmented-control.js +1 -1
  40. package/dist/components/select.d.ts +11 -1
  41. package/dist/components/select.js +17 -4
  42. package/dist/components/side-navigation.d.ts +1 -1
  43. package/dist/components/side-navigation.js +5 -3
  44. package/dist/components/signature-field.js +2 -2
  45. package/dist/components/status-tabs.d.ts +24 -4
  46. package/dist/components/status-tabs.js +82 -9
  47. package/dist/components/table-header.d.ts +1 -1
  48. package/dist/components/table-header.js +3 -3
  49. package/dist/components/tag.d.ts +7 -0
  50. package/dist/components/tag.js +6 -3
  51. package/dist/components/text-field.d.ts +1 -1
  52. package/dist/components/text-field.js +3 -1
  53. package/dist/components/toggle.js +3 -1
  54. package/dist/components/tooltip.d.ts +5 -2
  55. package/dist/components/tooltip.js +14 -9
  56. package/dist/custom-elements.json +1594 -137
  57. package/dist/density.d.ts +21 -0
  58. package/dist/density.js +46 -0
  59. package/dist/field.d.ts +9 -5
  60. package/dist/field.js +16 -10
  61. package/dist/index.d.ts +1 -1
  62. package/dist/popover.js +1 -1
  63. package/package.json +3 -3
@@ -401,8 +401,30 @@
401
401
  "declarations": [
402
402
  {
403
403
  "kind": "class",
404
- "description": "A button that opens a short list of actions: row actions in a table (\"Cancel shipment\", \"Change tracking\ninfo\"), \"Add…\" menus, or the account menu with the merchant's name and email on top. The highlighted choice\nis black with white text.\n\nFollows the WAI-ARIA menu button pattern: the trigger has `aria-haspopup` and `aria-expanded`; ↓/↑ (or\nEnter/Space) open it, ↓/↑ Home/End and the first letter move between choices, Enter/Space choose, Esc closes\nand returns focus to the trigger, Tab closes and moves on. A click outside closes it.",
404
+ "description": "A button that opens a short list of actions: row actions in a table (\"Cancel shipment\", \"Change tracking\ninfo\"), \"Add…\" menus, or the account menu with the merchant's name and email on top. The highlighted choice\nis black with white text; a destructive (`critical`) choice turns red on red instead.\n\nRows (owner standard, 1.6): 36px (32px with `density=\"compact\"`, 44px on touch screens), 12px side padding,\n14px text, 16px icons, an optional shortcut hint at 12px in grey, and 12px section headings. The same rows as the\noptions of `cm-select` and `cm-combobox`.\n\nFollows the WAI-ARIA menu button pattern: the trigger has `aria-haspopup` and `aria-expanded`; ↓/↑ (or\nEnter/Space) open it, ↓/↑ Home/End and the first letter move between choices, Enter/Space choose, Esc closes\nand returns focus to the trigger, Tab closes and moves on. A click outside closes it.",
405
405
  "name": "CmActionMenu",
406
+ "cssParts": [
407
+ {
408
+ "description": "The built-in trigger button.",
409
+ "name": "trigger"
410
+ },
411
+ {
412
+ "description": "The floating panel.",
413
+ "name": "menu"
414
+ },
415
+ {
416
+ "description": "Each choice.",
417
+ "name": "item"
418
+ },
419
+ {
420
+ "description": "A choice's shortcut hint.",
421
+ "name": "shortcut"
422
+ },
423
+ {
424
+ "description": "A section heading.",
425
+ "name": "section"
426
+ }
427
+ ],
406
428
  "slots": [
407
429
  {
408
430
  "description": "`cm-menu-item`s, with `<hr>` between groups.",
@@ -514,6 +536,41 @@
514
536
  "description": "Smaller line under the heading, e.g. the email.",
515
537
  "attribute": "subheading"
516
538
  },
539
+ {
540
+ "kind": "field",
541
+ "name": "density",
542
+ "privacy": "public",
543
+ "type": {
544
+ "text": "'comfortable' | 'compact' | undefined"
545
+ },
546
+ "description": "Row height: `comfortable` 36px rows (the default) or `compact` 32px rows for dense tables and toolbars. Since 1.6.",
547
+ "attribute": "density",
548
+ "reflects": true
549
+ },
550
+ {
551
+ "kind": "field",
552
+ "name": "loading",
553
+ "privacy": "public",
554
+ "type": {
555
+ "text": "boolean"
556
+ },
557
+ "default": "false",
558
+ "description": "Shows a spinner row instead of the choices while you load them (the menu is `aria-busy`). Since 1.6.",
559
+ "attribute": "loading",
560
+ "reflects": true
561
+ },
562
+ {
563
+ "kind": "field",
564
+ "name": "disabled",
565
+ "privacy": "public",
566
+ "type": {
567
+ "text": "boolean"
568
+ },
569
+ "default": "false",
570
+ "description": "The built-in trigger can't be used (it is a disabled button); a slotted trigger is yours to disable. Since 1.6.",
571
+ "attribute": "disabled",
572
+ "reflects": true
573
+ },
517
574
  {
518
575
  "kind": "field",
519
576
  "name": "_slotted",
@@ -718,6 +775,20 @@
718
775
  }
719
776
  ]
720
777
  },
778
+ {
779
+ "kind": "method",
780
+ "name": "#rows",
781
+ "privacy": "private",
782
+ "parameters": [
783
+ {
784
+ "name": "items",
785
+ "type": {
786
+ "text": "MenuItem[]"
787
+ }
788
+ }
789
+ ],
790
+ "description": "Rows: choices and separators, with each heading and the choices after it (up to a divider or heading) in a group."
791
+ },
721
792
  {
722
793
  "kind": "method",
723
794
  "name": "finalize",
@@ -912,6 +983,32 @@
912
983
  "description": "Smaller line under the heading, e.g. the email.",
913
984
  "fieldName": "subheading"
914
985
  },
986
+ {
987
+ "name": "density",
988
+ "type": {
989
+ "text": "'comfortable' | 'compact' | undefined"
990
+ },
991
+ "description": "Row height: `comfortable` 36px rows (the default) or `compact` 32px rows for dense tables and toolbars. Since 1.6.",
992
+ "fieldName": "density"
993
+ },
994
+ {
995
+ "name": "loading",
996
+ "type": {
997
+ "text": "boolean"
998
+ },
999
+ "default": "false",
1000
+ "description": "Shows a spinner row instead of the choices while you load them (the menu is `aria-busy`). Since 1.6.",
1001
+ "fieldName": "loading"
1002
+ },
1003
+ {
1004
+ "name": "disabled",
1005
+ "type": {
1006
+ "text": "boolean"
1007
+ },
1008
+ "default": "false",
1009
+ "description": "The built-in trigger can't be used (it is a disabled button); a slotted trigger is yours to disable. Since 1.6.",
1010
+ "fieldName": "disabled"
1011
+ },
915
1012
  {
916
1013
  "name": "_slotted",
917
1014
  "type": {
@@ -1720,7 +1817,7 @@
1720
1817
  "declarations": [
1721
1818
  {
1722
1819
  "kind": "class",
1723
- "description": "Status pill in sentence case (\"Order placed\", \"5 open\"): 12px medium text on a tinted 20px pill. Write the text in\nsentence case; since 1.5 it is shown as written (it was upper-cased with wide letter-spacing before).",
1820
+ "description": "Status pill in sentence case (\"Order placed\", \"5 open\"): 12px medium text on a tinted 24px pill (owner standard, 1.6;\n20px in 1.5). Write the text in sentence case; since 1.5 it is shown as written (it was upper-cased with wide\nletter-spacing before).",
1724
1821
  "name": "CmBadge",
1725
1822
  "slots": [
1726
1823
  {
@@ -4583,7 +4680,7 @@
4583
4680
  "text": "'large' | 'medium' | 'slim'"
4584
4681
  },
4585
4682
  "default": "'medium'",
4586
- "description": "`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).",
4683
+ "description": "`large` 40px (save bars, page actions), `medium` 36px (default), `slim` 32px (toolbars, table rows). Text is 14px (13px on slim).\nOn touch screens (`pointer: coarse`) every size is drawn at least 40px tall (icon-only: 40 x 40) and its hit area reaches\n44px. Owner standard since 1.6 (1.5 drew 44px on touch screens; sizes before 1.5 were 46, 32 and 24px).",
4587
4684
  "attribute": "size",
4588
4685
  "reflects": true
4589
4686
  },
@@ -4836,7 +4933,7 @@
4836
4933
  "text": "'large' | 'medium' | 'slim'"
4837
4934
  },
4838
4935
  "default": "'medium'",
4839
- "description": "`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).",
4936
+ "description": "`large` 40px (save bars, page actions), `medium` 36px (default), `slim` 32px (toolbars, table rows). Text is 14px (13px on slim).\nOn touch screens (`pointer: coarse`) every size is drawn at least 40px tall (icon-only: 40 x 40) and its hit area reaches\n44px. Owner standard since 1.6 (1.5 drew 44px on touch screens; sizes before 1.5 were 46, 32 and 24px).",
4840
4937
  "fieldName": "size"
4841
4938
  },
4842
4939
  {
@@ -7187,8 +7284,22 @@
7187
7284
  "declarations": [
7188
7285
  {
7189
7286
  "kind": "class",
7190
- "description": "White section card with optional title, description and header actions.\n\nOn narrow cards the header wraps instead of squeezing the heading: the title adornment moves under the heading\nwhen both don't fit on one line, and the actions move under the title when the title would be narrower than\nabout 12 characters. Wide cards keep everything on one row.",
7287
+ "description": "White section card with optional title, description and header actions.\n\nThree variants (owner standard, 1.6): `standard` (the default: 24px padding, 16px between header and body, a subtle\nborder), `compact` (16px padding: dashboards, task summaries, metrics) and `interactive` (the whole card opens\nsomething: hover, pressed, focus and `selected` states; set `href` for a link, or listen for `cm-action`).\nCombine them with a space: `variant=\"interactive compact\"`. On phones (640px or less) every card has 16px padding.\n\nAn interactive card is one control: its heading (or `label`) is a link or button stretched over the whole card, so\nkeyboard users reach it with Tab and press it with Enter (and Space, for a button). Controls in the `actions` slot\nstay separately clickable above it; don't put other controls in the body of an interactive card.\n\nOn narrow cards the header wraps instead of squeezing the heading: the title adornment moves under the heading\nwhen both don't fit on one line, and the actions move under the title when the title would be narrower than\nabout 12 characters. Wide cards keep everything on one row.",
7191
7288
  "name": "CmCard",
7289
+ "cssParts": [
7290
+ {
7291
+ "description": "The card's box.",
7292
+ "name": "card"
7293
+ },
7294
+ {
7295
+ "description": "The heading.",
7296
+ "name": "title"
7297
+ },
7298
+ {
7299
+ "description": "The link or button an interactive card is pressed through (stretched over the card).",
7300
+ "name": "control"
7301
+ }
7302
+ ],
7192
7303
  "slots": [
7193
7304
  {
7194
7305
  "description": "Body.",
@@ -7249,6 +7360,63 @@
7249
7360
  "description": "Heading level for the title, so pages keep a correct outline. Default 2.",
7250
7361
  "attribute": "heading-level"
7251
7362
  },
7363
+ {
7364
+ "kind": "field",
7365
+ "name": "variant",
7366
+ "privacy": "public",
7367
+ "type": {
7368
+ "text": "'standard' | 'compact' | 'interactive' | 'interactive compact' | 'compact interactive'"
7369
+ },
7370
+ "default": "'standard'",
7371
+ "description": "`standard` (default: 24px padding), `compact` (16px padding, for dashboards, task summaries and metrics) or\n`interactive` (the whole card is a link or button, with hover, pressed, focus and selected states). Combine\nwith a space, e.g. `interactive compact`. Phones always get 16px padding. Since 1.6.",
7372
+ "attribute": "variant",
7373
+ "reflects": true
7374
+ },
7375
+ {
7376
+ "kind": "field",
7377
+ "name": "href",
7378
+ "privacy": "public",
7379
+ "type": {
7380
+ "text": "string"
7381
+ },
7382
+ "default": "''",
7383
+ "description": "Interactive cards: the address the card opens. Without it the card is a button that fires `cm-action`. Since 1.6.",
7384
+ "attribute": "href"
7385
+ },
7386
+ {
7387
+ "kind": "field",
7388
+ "name": "target",
7389
+ "privacy": "public",
7390
+ "type": {
7391
+ "text": "string"
7392
+ },
7393
+ "default": "''",
7394
+ "description": "Link target when `href` is set. `_blank` adds `rel=\"noopener noreferrer\"`. Since 1.6.",
7395
+ "attribute": "target"
7396
+ },
7397
+ {
7398
+ "kind": "field",
7399
+ "name": "selected",
7400
+ "privacy": "public",
7401
+ "type": {
7402
+ "text": "boolean"
7403
+ },
7404
+ "default": "false",
7405
+ "description": "Interactive cards: shows the card as chosen (a 2px dark outline). A button card reports it as pressed, a link card as the current one. Since 1.6.",
7406
+ "attribute": "selected",
7407
+ "reflects": true
7408
+ },
7409
+ {
7410
+ "kind": "field",
7411
+ "name": "label",
7412
+ "privacy": "public",
7413
+ "type": {
7414
+ "text": "string"
7415
+ },
7416
+ "default": "''",
7417
+ "description": "Interactive cards without a `heading`: the accessible name of the card's link or button. Since 1.6.",
7418
+ "attribute": "label"
7419
+ },
7252
7420
  {
7253
7421
  "kind": "field",
7254
7422
  "name": "#adorned",
@@ -7292,6 +7460,48 @@
7292
7460
  }
7293
7461
  }
7294
7462
  ]
7463
+ },
7464
+ {
7465
+ "kind": "field",
7466
+ "name": "#toggles",
7467
+ "privacy": "private",
7468
+ "type": {
7469
+ "text": "boolean"
7470
+ },
7471
+ "default": "false",
7472
+ "description": "Set once the card has been `selected`: from then on a button card reports pressed or not pressed (a toggle)."
7473
+ },
7474
+ {
7475
+ "kind": "field",
7476
+ "name": "#interactive",
7477
+ "privacy": "private",
7478
+ "description": "Whether `variant` includes `interactive`.",
7479
+ "readonly": true
7480
+ },
7481
+ {
7482
+ "kind": "field",
7483
+ "name": "#onControl",
7484
+ "privacy": "private"
7485
+ },
7486
+ {
7487
+ "kind": "method",
7488
+ "name": "#control",
7489
+ "privacy": "private",
7490
+ "parameters": [
7491
+ {
7492
+ "name": "text",
7493
+ "type": {
7494
+ "text": "unknown"
7495
+ }
7496
+ }
7497
+ ],
7498
+ "description": "The link or button an interactive card is pressed through; `text` is its content (the heading), or empty for a cover."
7499
+ }
7500
+ ],
7501
+ "events": [
7502
+ {
7503
+ "description": "An interactive card without `href` was pressed (click, Enter or Space). Not fired by the header actions. Since 1.6.",
7504
+ "name": "cm-action"
7295
7505
  }
7296
7506
  ],
7297
7507
  "attributes": [
@@ -7330,6 +7540,51 @@
7330
7540
  "default": "2",
7331
7541
  "description": "Heading level for the title, so pages keep a correct outline. Default 2.",
7332
7542
  "fieldName": "headingLevel"
7543
+ },
7544
+ {
7545
+ "name": "variant",
7546
+ "type": {
7547
+ "text": "'standard' | 'compact' | 'interactive' | 'interactive compact' | 'compact interactive'"
7548
+ },
7549
+ "default": "'standard'",
7550
+ "description": "`standard` (default: 24px padding), `compact` (16px padding, for dashboards, task summaries and metrics) or\n`interactive` (the whole card is a link or button, with hover, pressed, focus and selected states). Combine\nwith a space, e.g. `interactive compact`. Phones always get 16px padding. Since 1.6.",
7551
+ "fieldName": "variant"
7552
+ },
7553
+ {
7554
+ "name": "href",
7555
+ "type": {
7556
+ "text": "string"
7557
+ },
7558
+ "default": "''",
7559
+ "description": "Interactive cards: the address the card opens. Without it the card is a button that fires `cm-action`. Since 1.6.",
7560
+ "fieldName": "href"
7561
+ },
7562
+ {
7563
+ "name": "target",
7564
+ "type": {
7565
+ "text": "string"
7566
+ },
7567
+ "default": "''",
7568
+ "description": "Link target when `href` is set. `_blank` adds `rel=\"noopener noreferrer\"`. Since 1.6.",
7569
+ "fieldName": "target"
7570
+ },
7571
+ {
7572
+ "name": "selected",
7573
+ "type": {
7574
+ "text": "boolean"
7575
+ },
7576
+ "default": "false",
7577
+ "description": "Interactive cards: shows the card as chosen (a 2px dark outline). A button card reports it as pressed, a link card as the current one. Since 1.6.",
7578
+ "fieldName": "selected"
7579
+ },
7580
+ {
7581
+ "name": "label",
7582
+ "type": {
7583
+ "text": "string"
7584
+ },
7585
+ "default": "''",
7586
+ "description": "Interactive cards without a `heading`: the accessible name of the card's link or button. Since 1.6.",
7587
+ "fieldName": "label"
7333
7588
  }
7334
7589
  ],
7335
7590
  "superclass": {
@@ -8442,6 +8697,14 @@
8442
8697
  "description": "The bordered box around the tags and the text input.",
8443
8698
  "name": "box"
8444
8699
  },
8700
+ {
8701
+ "description": "Each chosen option's tag (`multiple`).",
8702
+ "name": "tag"
8703
+ },
8704
+ {
8705
+ "description": "The \"+N more\" tag (`multiple` with `max-tags`).",
8706
+ "name": "more"
8707
+ },
8445
8708
  {
8446
8709
  "description": "The text input.",
8447
8710
  "name": "input"
@@ -8574,7 +8837,7 @@
8574
8837
  "text": "boolean"
8575
8838
  },
8576
8839
  "default": "false",
8577
- "description": "Lets the merchant choose several options, shown as removable tags. Backspace in the empty box removes the last one.",
8840
+ "description": "Lets the merchant choose several options, shown as removable 24px tags (`cm-tag`) that wrap onto more rows as the box\ngrows from its 40px minimum. Keyboard: Backspace in the empty box removes the last tag; ← (→ in right-to-left text)\nat the start of the box moves to the tags, ←/→ move between them, Backspace or Delete removes the focused tag, and\n→ past the last tag (or Esc) goes back to the text box. The tags are not Tab stops.",
8578
8841
  "attribute": "multiple",
8579
8842
  "reflects": true
8580
8843
  },
@@ -8586,7 +8849,7 @@
8586
8849
  "text": "'default' | 'small'"
8587
8850
  },
8588
8851
  "default": "'default'",
8589
- "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch\nscreens both are 44px. Since 1.5.",
8852
+ "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 40px box (since 1.6, owner standard; was 36px). On touch\nscreens both are 44px. Since 1.5.",
8590
8853
  "attribute": "size",
8591
8854
  "reflects": true
8592
8855
  },
@@ -8691,6 +8954,17 @@
8691
8954
  "description": "Shows the chosen option's group before its label in the box, or in its tag with `multiple` (\"Lead: Company\"),\nfor grouped lists where labels repeat across groups. The list itself shows the bare label under its heading. Since 1.3.",
8692
8955
  "attribute": "show-group"
8693
8956
  },
8957
+ {
8958
+ "kind": "field",
8959
+ "name": "maxTags",
8960
+ "privacy": "public",
8961
+ "type": {
8962
+ "text": "number"
8963
+ },
8964
+ "default": "3",
8965
+ "description": "`multiple`: how many tags show while the box isn't focused; the rest become one \"+N more\" tag. Every tag shows\nwhile the merchant is in the box. `0` shows them all. Default 3 (since 1.6, owner standard).",
8966
+ "attribute": "max-tags"
8967
+ },
8694
8968
  {
8695
8969
  "kind": "field",
8696
8970
  "name": "_query",
@@ -8701,6 +8975,17 @@
8701
8975
  "default": "''",
8702
8976
  "attribute": "_query"
8703
8977
  },
8978
+ {
8979
+ "kind": "field",
8980
+ "name": "_focusIn",
8981
+ "privacy": "public",
8982
+ "type": {
8983
+ "text": "boolean"
8984
+ },
8985
+ "default": "false",
8986
+ "description": "True while focus is inside the element (all tags show).",
8987
+ "attribute": "_focusIn"
8988
+ },
8704
8989
  {
8705
8990
  "kind": "field",
8706
8991
  "name": "_active",
@@ -8981,36 +9266,98 @@
8981
9266
  },
8982
9267
  {
8983
9268
  "kind": "method",
8984
- "name": "#focusInput",
8985
- "privacy": "private"
9269
+ "name": "focus",
9270
+ "parameters": [
9271
+ {
9272
+ "name": "options",
9273
+ "optional": true,
9274
+ "type": {
9275
+ "text": "FocusOptions"
9276
+ }
9277
+ }
9278
+ ],
9279
+ "description": "Focuses the text box (not the first tag)."
8986
9280
  },
8987
9281
  {
8988
- "kind": "field",
8989
- "name": "#onInput",
9282
+ "kind": "method",
9283
+ "name": "#focusInput",
8990
9284
  "privacy": "private"
8991
9285
  },
8992
9286
  {
8993
9287
  "kind": "field",
8994
- "name": "#onKeyDown",
9288
+ "name": "#onFocusIn",
8995
9289
  "privacy": "private"
8996
9290
  },
8997
9291
  {
8998
9292
  "kind": "field",
8999
- "name": "#onBlur",
9293
+ "name": "#onFocusOut",
9000
9294
  "privacy": "private"
9001
9295
  },
9002
9296
  {
9003
9297
  "kind": "method",
9004
- "name": "#highlight",
9298
+ "name": "#focusTag",
9005
9299
  "privacy": "private",
9006
9300
  "parameters": [
9007
9301
  {
9008
- "name": "label",
9302
+ "name": "i",
9009
9303
  "type": {
9010
- "text": "string"
9304
+ "text": "number"
9011
9305
  }
9012
9306
  }
9013
- ]
9307
+ ],
9308
+ "description": "Focuses the tag at `i` (its remove button), or the text box when there is none."
9309
+ },
9310
+ {
9311
+ "kind": "method",
9312
+ "name": "#onTagKey",
9313
+ "privacy": "private",
9314
+ "parameters": [
9315
+ {
9316
+ "name": "e",
9317
+ "type": {
9318
+ "text": "KeyboardEvent"
9319
+ }
9320
+ },
9321
+ {
9322
+ "name": "i",
9323
+ "type": {
9324
+ "text": "number"
9325
+ }
9326
+ }
9327
+ ]
9328
+ },
9329
+ {
9330
+ "kind": "field",
9331
+ "name": "#onInput",
9332
+ "privacy": "private"
9333
+ },
9334
+ {
9335
+ "kind": "field",
9336
+ "name": "#onKeyDown",
9337
+ "privacy": "private"
9338
+ },
9339
+ {
9340
+ "kind": "field",
9341
+ "name": "#onBlur",
9342
+ "privacy": "private"
9343
+ },
9344
+ {
9345
+ "kind": "method",
9346
+ "name": "#highlight",
9347
+ "privacy": "private",
9348
+ "parameters": [
9349
+ {
9350
+ "name": "label",
9351
+ "type": {
9352
+ "text": "string"
9353
+ }
9354
+ }
9355
+ ]
9356
+ },
9357
+ {
9358
+ "kind": "method",
9359
+ "name": "#tags",
9360
+ "privacy": "private"
9014
9361
  },
9015
9362
  {
9016
9363
  "kind": "method",
@@ -9215,7 +9562,7 @@
9215
9562
  "text": "boolean"
9216
9563
  },
9217
9564
  "default": "false",
9218
- "description": "Lets the merchant choose several options, shown as removable tags. Backspace in the empty box removes the last one.",
9565
+ "description": "Lets the merchant choose several options, shown as removable 24px tags (`cm-tag`) that wrap onto more rows as the box\ngrows from its 40px minimum. Keyboard: Backspace in the empty box removes the last tag; ← (→ in right-to-left text)\nat the start of the box moves to the tags, ←/→ move between them, Backspace or Delete removes the focused tag, and\n→ past the last tag (or Esc) goes back to the text box. The tags are not Tab stops.",
9219
9566
  "fieldName": "multiple"
9220
9567
  },
9221
9568
  {
@@ -9224,7 +9571,7 @@
9224
9571
  "text": "'default' | 'small'"
9225
9572
  },
9226
9573
  "default": "'default'",
9227
- "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch\nscreens both are 44px. Since 1.5.",
9574
+ "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 40px box (since 1.6, owner standard; was 36px). On touch\nscreens both are 44px. Since 1.5.",
9228
9575
  "fieldName": "size"
9229
9576
  },
9230
9577
  {
@@ -9306,6 +9653,15 @@
9306
9653
  "description": "Shows the chosen option's group before its label in the box, or in its tag with `multiple` (\"Lead: Company\"),\nfor grouped lists where labels repeat across groups. The list itself shows the bare label under its heading. Since 1.3.",
9307
9654
  "fieldName": "showGroup"
9308
9655
  },
9656
+ {
9657
+ "name": "max-tags",
9658
+ "type": {
9659
+ "text": "number"
9660
+ },
9661
+ "default": "3",
9662
+ "description": "`multiple`: how many tags show while the box isn't focused; the rest become one \"+N more\" tag. Every tag shows\nwhile the merchant is in the box. `0` shows them all. Default 3 (since 1.6, owner standard).",
9663
+ "fieldName": "maxTags"
9664
+ },
9309
9665
  {
9310
9666
  "name": "_query",
9311
9667
  "type": {
@@ -9314,6 +9670,15 @@
9314
9670
  "default": "''",
9315
9671
  "fieldName": "_query"
9316
9672
  },
9673
+ {
9674
+ "name": "_focusIn",
9675
+ "type": {
9676
+ "text": "boolean"
9677
+ },
9678
+ "default": "false",
9679
+ "description": "True while focus is inside the element (all tags show).",
9680
+ "fieldName": "_focusIn"
9681
+ },
9317
9682
  {
9318
9683
  "name": "_active",
9319
9684
  "type": {
@@ -9888,12 +10253,24 @@
9888
10253
  "declarations": [
9889
10254
  {
9890
10255
  "kind": "class",
9891
- "description": "A data table for reports and read-only lists: sales by day, stock by location, order lines.\nA real `<table>` with column headings, sortable columns, a totals row, a sticky header and first column,\nloading rows and an empty state. For lists merchants select and act on, use Resource list.\n\nGive it `columns` and `rows`, or write a native `<table>` inside it (for server-rendered pages): that\ntable is styled to match. Mark a heading `<th data-sort=\"text|numeric|money|date\">` to make its column sortable\nin the browser too (a cell's `data-value` is compared instead of its text when present; `data-key` names the\ncolumn in `cm-sort`). Every sort is announced to screen readers (\"Sorted by Net sales, descending\").",
10256
+ "description": "A data table for reports and lists of records: sales by day, stock by location, accounts, tasks.\nA real `<table>` with column headings, sortable columns, a totals row, a sticky header and first column,\nloading rows and an empty state. For lists merchants select and act on in bulk, use Resource list.\n\nThe table standard (since 1.6): a 40px heading row in 12px semibold; 48px body rows (`density=\"compact\"`: 40px;\nat least 44px on touch screens) with cells padded 12px across and 10px down in 13px text; numbers, money and\nactions right-aligned; numbers and dates never wrap; text ends in \"…\" with the full value on hover.\nSet `data-cm-density=\"compact\"` on any ancestor to make every table and list in it compact.\n\nOn phones each table picks a strategy with `mobile` (judged by the table's own width, 640px or less):\n`scroll` (default) keeps the columns and shows that it scrolls sideways; `cards` turns each row into a card;\n`priority` hides `priority: 'low'` columns and adds \"View all fields\" to each row.\n\nGive it `columns` and `rows`, or write a native `<table>` inside it (for server-rendered pages): that\ntable is styled to match. Mark a heading `<th data-sort=\"text|numeric|money|date\">` to make its column sortable\nin the browser too (a cell's `data-value` is compared instead of its text when present; `data-key` names the\ncolumn in `cm-sort`). Every sort is announced to screen readers (\"Sorted by Net sales, descending\").",
9892
10257
  "name": "CmDataTable",
9893
10258
  "cssProperties": [
9894
10259
  {
9895
- "description": "With `sticky-header`, the table scrolls inside this height. Default `none`.",
10260
+ "description": "With `sticky-header`, the table scrolls inside this height. Default `none`: the heading row sticks to the page or to the nearest scrolling box instead.",
9896
10261
  "name": "--cm-data-table-max-height"
10262
+ },
10263
+ {
10264
+ "description": "With `sticky-header`, how far from the top the heading row sticks, e.g. under a sticky app header. Default `0px`.",
10265
+ "name": "--cm-data-table-sticky-top"
10266
+ },
10267
+ {
10268
+ "description": "Widest a text column grows before its text ends in \"…\". Default `320px` (and never more than 45% of the table's width).",
10269
+ "name": "--cm-data-table-cell-max-width"
10270
+ },
10271
+ {
10272
+ "description": "Height of body rows. Set by `density`/`data-cm-density`: 48px, compact 40px.",
10273
+ "name": "--cm-table-row-height"
9897
10274
  }
9898
10275
  ],
9899
10276
  "slots": [
@@ -10007,7 +10384,7 @@
10007
10384
  "text": "boolean"
10008
10385
  },
10009
10386
  "default": "false",
10010
- "description": "Keeps the heading row visible while the table scrolls inside `--cm-data-table-max-height`.",
10387
+ "description": "Keeps the heading row in view while the rows scroll: inside `--cm-data-table-max-height` when you set one,\notherwise under the top of the page or of the nearest scrolling box (plus `--cm-data-table-sticky-top`).",
10011
10388
  "attribute": "sticky-header",
10012
10389
  "reflects": true
10013
10390
  },
@@ -10046,6 +10423,65 @@
10046
10423
  "description": "How many placeholder rows `loading` shows.",
10047
10424
  "attribute": "loading-rows"
10048
10425
  },
10426
+ {
10427
+ "kind": "field",
10428
+ "name": "density",
10429
+ "privacy": "public",
10430
+ "type": {
10431
+ "text": "'comfortable' | 'compact' | undefined"
10432
+ },
10433
+ "description": "Row height (since 1.6): `comfortable` 48px rows or `compact` 40px rows. Unset: the nearest `data-cm-density` on an\nancestor, else comfortable. On touch screens rows are at least 44px tall either way.",
10434
+ "attribute": "density",
10435
+ "reflects": true
10436
+ },
10437
+ {
10438
+ "kind": "field",
10439
+ "name": "mobile",
10440
+ "privacy": "public",
10441
+ "type": {
10442
+ "text": "'scroll' | 'cards' | 'priority'"
10443
+ },
10444
+ "default": "'scroll'",
10445
+ "description": "What the table does when it is 640px wide or less (since 1.6): `scroll` keeps every column, scrolls sideways and\nsays so (\"Scroll for more\", faded edges); `cards` shows each row as a card of label and value pairs with the primary\ncolumn as its title and the actions at the bottom; `priority` hides `priority: 'low'` columns and gives each row a\n\"View all fields\" button that shows them. Pick one per table: see the \"Tables on phones\" pattern.",
10446
+ "attribute": "mobile",
10447
+ "reflects": true
10448
+ },
10449
+ {
10450
+ "kind": "field",
10451
+ "name": "rowActions",
10452
+ "privacy": "public",
10453
+ "type": {
10454
+ "text": "'hover' | 'always'"
10455
+ },
10456
+ "default": "'hover'",
10457
+ "description": "`hover` (default): an `actions` column's buttons appear when the row is hovered or has focus (always on touch screens). `always`: always shown.",
10458
+ "attribute": "row-actions",
10459
+ "reflects": true
10460
+ },
10461
+ {
10462
+ "kind": "field",
10463
+ "name": "resizable",
10464
+ "privacy": "public",
10465
+ "type": {
10466
+ "text": "boolean"
10467
+ },
10468
+ "default": "false",
10469
+ "description": "Adds a resize handle to each heading: drag it, or focus it and press the left and right arrow keys (16px a press).",
10470
+ "attribute": "resizable",
10471
+ "reflects": true
10472
+ },
10473
+ {
10474
+ "kind": "field",
10475
+ "name": "columnPicker",
10476
+ "privacy": "public",
10477
+ "type": {
10478
+ "text": "boolean"
10479
+ },
10480
+ "default": "false",
10481
+ "description": "Adds a \"Columns\" button above the table that shows and hides columns.",
10482
+ "attribute": "column-picker",
10483
+ "reflects": true
10484
+ },
10049
10485
  {
10050
10486
  "kind": "field",
10051
10487
  "name": "_light",
@@ -10057,88 +10493,634 @@
10057
10493
  "attribute": "_light"
10058
10494
  },
10059
10495
  {
10060
- "kind": "field",
10061
- "name": "_announce",
10062
- "privacy": "public",
10063
- "type": {
10064
- "text": "string"
10065
- },
10066
- "default": "''",
10067
- "attribute": "_announce"
10496
+ "kind": "field",
10497
+ "name": "_announce",
10498
+ "privacy": "public",
10499
+ "type": {
10500
+ "text": "string"
10501
+ },
10502
+ "default": "''",
10503
+ "attribute": "_announce"
10504
+ },
10505
+ {
10506
+ "kind": "field",
10507
+ "name": "_widths",
10508
+ "privacy": "public",
10509
+ "type": {
10510
+ "text": "Record<string, number>"
10511
+ },
10512
+ "default": "{}",
10513
+ "attribute": "_widths"
10514
+ },
10515
+ {
10516
+ "kind": "field",
10517
+ "name": "_expanded",
10518
+ "privacy": "public",
10519
+ "default": "new Set<DataTableRow>()",
10520
+ "attribute": "_expanded"
10521
+ },
10522
+ {
10523
+ "kind": "field",
10524
+ "name": "_picker",
10525
+ "privacy": "public",
10526
+ "type": {
10527
+ "text": "boolean"
10528
+ },
10529
+ "default": "false",
10530
+ "attribute": "_picker"
10531
+ },
10532
+ {
10533
+ "kind": "field",
10534
+ "name": "_overflows",
10535
+ "privacy": "public",
10536
+ "type": {
10537
+ "text": "boolean"
10538
+ },
10539
+ "default": "false",
10540
+ "attribute": "_overflows"
10541
+ },
10542
+ {
10543
+ "kind": "field",
10544
+ "name": "#userSorted",
10545
+ "privacy": "private",
10546
+ "type": {
10547
+ "text": "boolean"
10548
+ },
10549
+ "default": "false"
10550
+ },
10551
+ {
10552
+ "kind": "field",
10553
+ "name": "#id",
10554
+ "privacy": "private"
10555
+ },
10556
+ {
10557
+ "kind": "field",
10558
+ "name": "#observer",
10559
+ "privacy": "private",
10560
+ "default": "new MutationObserver(() => this.#readLight())"
10561
+ },
10562
+ {
10563
+ "kind": "field",
10564
+ "name": "#resize",
10565
+ "privacy": "private"
10566
+ },
10567
+ {
10568
+ "kind": "field",
10569
+ "name": "#observed",
10570
+ "privacy": "private",
10571
+ "type": {
10572
+ "text": "Element[]"
10573
+ },
10574
+ "default": "[]"
10575
+ },
10576
+ {
10577
+ "kind": "field",
10578
+ "name": "#raf",
10579
+ "privacy": "private",
10580
+ "type": {
10581
+ "text": "number"
10582
+ },
10583
+ "default": "0"
10584
+ },
10585
+ {
10586
+ "kind": "field",
10587
+ "name": "#shift",
10588
+ "privacy": "private",
10589
+ "type": {
10590
+ "text": "number"
10591
+ },
10592
+ "default": "-1"
10593
+ },
10594
+ {
10595
+ "kind": "method",
10596
+ "name": "#readLight",
10597
+ "privacy": "private"
10598
+ },
10599
+ {
10600
+ "kind": "method",
10601
+ "name": "#say",
10602
+ "privacy": "private",
10603
+ "parameters": [
10604
+ {
10605
+ "name": "text",
10606
+ "type": {
10607
+ "text": "string"
10608
+ }
10609
+ }
10610
+ ]
10611
+ },
10612
+ {
10613
+ "kind": "method",
10614
+ "name": "#saySort",
10615
+ "privacy": "private",
10616
+ "parameters": [
10617
+ {
10618
+ "name": "label",
10619
+ "type": {
10620
+ "text": "string"
10621
+ }
10622
+ },
10623
+ {
10624
+ "name": "direction",
10625
+ "type": {
10626
+ "text": "SortDirection"
10627
+ }
10628
+ }
10629
+ ]
10630
+ },
10631
+ {
10632
+ "kind": "method",
10633
+ "name": "#enhanceLight",
10634
+ "privacy": "private",
10635
+ "description": "Server-rendered table: turns `<th data-sort>` headings into sort buttons and labels cells for the phone layouts."
10636
+ },
10637
+ {
10638
+ "kind": "method",
10639
+ "name": "#lightIcon",
10640
+ "privacy": "private",
10641
+ "parameters": [
10642
+ {
10643
+ "name": "th",
10644
+ "type": {
10645
+ "text": "HTMLTableCellElement"
10646
+ }
10647
+ }
10648
+ ]
10649
+ },
10650
+ {
10651
+ "kind": "method",
10652
+ "name": "#onLightSort",
10653
+ "privacy": "private",
10654
+ "parameters": [
10655
+ {
10656
+ "name": "table",
10657
+ "type": {
10658
+ "text": "HTMLTableElement"
10659
+ }
10660
+ },
10661
+ {
10662
+ "name": "th",
10663
+ "type": {
10664
+ "text": "HTMLTableCellElement"
10665
+ }
10666
+ },
10667
+ {
10668
+ "name": "index",
10669
+ "type": {
10670
+ "text": "number"
10671
+ }
10672
+ }
10673
+ ]
10674
+ },
10675
+ {
10676
+ "kind": "field",
10677
+ "name": "sortedRows",
10678
+ "type": {
10679
+ "text": "DataTableRow[]"
10680
+ },
10681
+ "description": "The rows in display order: sorted when `sort` is set and `sort-mode` is `auto`.",
10682
+ "readonly": true
10683
+ },
10684
+ {
10685
+ "kind": "field",
10686
+ "name": "visibleColumns",
10687
+ "type": {
10688
+ "text": "DataTableColumn[]"
10689
+ },
10690
+ "description": "The columns shown: every column whose `visible` isn't `false`.",
10691
+ "readonly": true
10692
+ },
10693
+ {
10694
+ "kind": "method",
10695
+ "name": "#onSort",
10696
+ "privacy": "private",
10697
+ "parameters": [
10698
+ {
10699
+ "name": "c",
10700
+ "type": {
10701
+ "text": "DataTableColumn"
10702
+ }
10703
+ }
10704
+ ]
10705
+ },
10706
+ {
10707
+ "kind": "method",
10708
+ "name": "#observe",
10709
+ "privacy": "private",
10710
+ "description": "Watches the scroll box and table for size changes (overflow, sticky heading)."
10711
+ },
10712
+ {
10713
+ "kind": "field",
10714
+ "name": "#onAnyScroll",
10715
+ "privacy": "private",
10716
+ "description": "Scrolling elsewhere on the page only matters to a sticky heading; the table's own scroll and size are watched directly."
10717
+ },
10718
+ {
10719
+ "kind": "method",
10720
+ "name": "#measure",
10721
+ "privacy": "private",
10722
+ "description": "Keeps the overflow state, the scroll hint and the sticky heading in step with the layout. Runs after every render,\non resize and on any scroll. Writes attributes and one custom property directly, so scrolling never re-renders."
10723
+ },
10724
+ {
10725
+ "kind": "method",
10726
+ "name": "#text",
10727
+ "privacy": "private",
10728
+ "parameters": [
10729
+ {
10730
+ "name": "v",
10731
+ "type": {
10732
+ "text": "unknown"
10733
+ }
10734
+ }
10735
+ ]
10736
+ },
10737
+ {
10738
+ "kind": "method",
10739
+ "name": "#width",
10740
+ "privacy": "private",
10741
+ "return": {
10742
+ "type": {
10743
+ "text": "number | undefined"
10744
+ }
10745
+ },
10746
+ "parameters": [
10747
+ {
10748
+ "name": "c",
10749
+ "type": {
10750
+ "text": "DataTableColumn"
10751
+ }
10752
+ }
10753
+ ]
10754
+ },
10755
+ {
10756
+ "kind": "method",
10757
+ "name": "#cls",
10758
+ "privacy": "private",
10759
+ "parameters": [
10760
+ {
10761
+ "name": "c",
10762
+ "type": {
10763
+ "text": "DataTableColumn"
10764
+ }
10765
+ },
10766
+ {
10767
+ "name": "primary",
10768
+ "optional": true,
10769
+ "type": {
10770
+ "text": "DataTableColumn"
10771
+ }
10772
+ }
10773
+ ]
10774
+ },
10775
+ {
10776
+ "kind": "method",
10777
+ "name": "#style",
10778
+ "privacy": "private",
10779
+ "parameters": [
10780
+ {
10781
+ "name": "c",
10782
+ "type": {
10783
+ "text": "DataTableColumn"
10784
+ }
10785
+ }
10786
+ ]
10787
+ },
10788
+ {
10789
+ "kind": "method",
10790
+ "name": "#onOver",
10791
+ "privacy": "private",
10792
+ "parameters": [
10793
+ {
10794
+ "name": "e",
10795
+ "type": {
10796
+ "text": "Event"
10797
+ }
10798
+ }
10799
+ ],
10800
+ "description": "Shows the full value of a cut-off cell on hover. Screen readers always read the whole text."
10801
+ },
10802
+ {
10803
+ "kind": "method",
10804
+ "name": "#onFocus",
10805
+ "privacy": "private",
10806
+ "parameters": [
10807
+ {
10808
+ "name": "e",
10809
+ "type": {
10810
+ "text": "FocusEvent"
10811
+ }
10812
+ }
10813
+ ],
10814
+ "description": "Marks the row that has focus (for its actions), and shows a cut-off value's full text."
10815
+ },
10816
+ {
10817
+ "kind": "method",
10818
+ "name": "#primary",
10819
+ "privacy": "private",
10820
+ "parameters": [
10821
+ {
10822
+ "name": "cols",
10823
+ "type": {
10824
+ "text": "DataTableColumn[]"
10825
+ }
10826
+ }
10827
+ ]
10828
+ },
10829
+ {
10830
+ "kind": "method",
10831
+ "name": "#rowName",
10832
+ "privacy": "private",
10833
+ "parameters": [
10834
+ {
10835
+ "name": "r",
10836
+ "type": {
10837
+ "text": "DataTableRow"
10838
+ }
10839
+ },
10840
+ {
10841
+ "name": "primary",
10842
+ "optional": true,
10843
+ "type": {
10844
+ "text": "DataTableColumn"
10845
+ }
10846
+ }
10847
+ ]
10848
+ },
10849
+ {
10850
+ "kind": "method",
10851
+ "name": "#actionsOf",
10852
+ "privacy": "private",
10853
+ "return": {
10854
+ "type": {
10855
+ "text": "DataTableAction[]"
10856
+ }
10857
+ },
10858
+ "parameters": [
10859
+ {
10860
+ "name": "c",
10861
+ "type": {
10862
+ "text": "DataTableColumn"
10863
+ }
10864
+ },
10865
+ {
10866
+ "name": "r",
10867
+ "type": {
10868
+ "text": "DataTableRow"
10869
+ }
10870
+ }
10871
+ ]
10872
+ },
10873
+ {
10874
+ "kind": "method",
10875
+ "name": "#onAction",
10876
+ "privacy": "private",
10877
+ "parameters": [
10878
+ {
10879
+ "name": "a",
10880
+ "type": {
10881
+ "text": "DataTableAction"
10882
+ }
10883
+ },
10884
+ {
10885
+ "name": "r",
10886
+ "type": {
10887
+ "text": "DataTableRow"
10888
+ }
10889
+ }
10890
+ ]
10891
+ },
10892
+ {
10893
+ "kind": "method",
10894
+ "name": "#actions",
10895
+ "privacy": "private",
10896
+ "parameters": [
10897
+ {
10898
+ "name": "c",
10899
+ "type": {
10900
+ "text": "DataTableColumn"
10901
+ }
10902
+ },
10903
+ {
10904
+ "name": "r",
10905
+ "type": {
10906
+ "text": "DataTableRow"
10907
+ }
10908
+ },
10909
+ {
10910
+ "name": "name",
10911
+ "type": {
10912
+ "text": "string"
10913
+ }
10914
+ }
10915
+ ]
10916
+ },
10917
+ {
10918
+ "kind": "method",
10919
+ "name": "#content",
10920
+ "privacy": "private",
10921
+ "parameters": [
10922
+ {
10923
+ "name": "c",
10924
+ "type": {
10925
+ "text": "DataTableColumn"
10926
+ }
10927
+ },
10928
+ {
10929
+ "name": "r",
10930
+ "type": {
10931
+ "text": "DataTableRow"
10932
+ }
10933
+ },
10934
+ {
10935
+ "name": "name",
10936
+ "type": {
10937
+ "text": "string"
10938
+ }
10939
+ }
10940
+ ]
10941
+ },
10942
+ {
10943
+ "kind": "method",
10944
+ "name": "#setWidth",
10945
+ "privacy": "private",
10946
+ "parameters": [
10947
+ {
10948
+ "name": "c",
10949
+ "type": {
10950
+ "text": "DataTableColumn"
10951
+ }
10952
+ },
10953
+ {
10954
+ "name": "width",
10955
+ "type": {
10956
+ "text": "number"
10957
+ }
10958
+ },
10959
+ {
10960
+ "name": "done",
10961
+ "type": {
10962
+ "text": "boolean"
10963
+ }
10964
+ }
10965
+ ]
10966
+ },
10967
+ {
10968
+ "kind": "method",
10969
+ "name": "#currentWidth",
10970
+ "privacy": "private",
10971
+ "parameters": [
10972
+ {
10973
+ "name": "c",
10974
+ "type": {
10975
+ "text": "DataTableColumn"
10976
+ }
10977
+ },
10978
+ {
10979
+ "name": "handle",
10980
+ "type": {
10981
+ "text": "Element"
10982
+ }
10983
+ }
10984
+ ]
10985
+ },
10986
+ {
10987
+ "kind": "method",
10988
+ "name": "#onResizeKey",
10989
+ "privacy": "private",
10990
+ "parameters": [
10991
+ {
10992
+ "name": "e",
10993
+ "type": {
10994
+ "text": "KeyboardEvent"
10995
+ }
10996
+ },
10997
+ {
10998
+ "name": "c",
10999
+ "type": {
11000
+ "text": "DataTableColumn"
11001
+ }
11002
+ }
11003
+ ]
11004
+ },
11005
+ {
11006
+ "kind": "method",
11007
+ "name": "#onResizeDown",
11008
+ "privacy": "private",
11009
+ "parameters": [
11010
+ {
11011
+ "name": "e",
11012
+ "type": {
11013
+ "text": "PointerEvent"
11014
+ }
11015
+ },
11016
+ {
11017
+ "name": "c",
11018
+ "type": {
11019
+ "text": "DataTableColumn"
11020
+ }
11021
+ }
11022
+ ]
10068
11023
  },
10069
11024
  {
10070
- "kind": "field",
10071
- "name": "#userSorted",
11025
+ "kind": "method",
11026
+ "name": "#togglePicker",
10072
11027
  "privacy": "private",
10073
- "type": {
10074
- "text": "boolean"
10075
- },
10076
- "default": "false"
11028
+ "parameters": [
11029
+ {
11030
+ "name": "open",
11031
+ "default": "!this._picker"
11032
+ }
11033
+ ]
10077
11034
  },
10078
11035
  {
10079
11036
  "kind": "field",
10080
- "name": "#observer",
10081
- "privacy": "private",
10082
- "default": "new MutationObserver(() => this.#readLight())"
11037
+ "name": "#onOutside",
11038
+ "privacy": "private"
10083
11039
  },
10084
11040
  {
10085
11041
  "kind": "method",
10086
- "name": "#readLight",
10087
- "privacy": "private"
11042
+ "name": "#onPickerKey",
11043
+ "privacy": "private",
11044
+ "parameters": [
11045
+ {
11046
+ "name": "e",
11047
+ "type": {
11048
+ "text": "KeyboardEvent"
11049
+ }
11050
+ }
11051
+ ]
10088
11052
  },
10089
11053
  {
10090
11054
  "kind": "method",
10091
- "name": "#say",
11055
+ "name": "#setVisible",
10092
11056
  "privacy": "private",
10093
11057
  "parameters": [
10094
11058
  {
10095
- "name": "label",
11059
+ "name": "key",
10096
11060
  "type": {
10097
11061
  "text": "string"
10098
11062
  }
10099
11063
  },
10100
11064
  {
10101
- "name": "direction",
11065
+ "name": "visible",
10102
11066
  "type": {
10103
- "text": "SortDirection"
11067
+ "text": "boolean"
10104
11068
  }
10105
11069
  }
10106
11070
  ]
10107
11071
  },
10108
11072
  {
10109
11073
  "kind": "method",
10110
- "name": "#enhanceLight",
10111
- "privacy": "private",
10112
- "description": "Server-rendered table: turns `<th data-sort>` headings into sort buttons."
11074
+ "name": "#renderPicker",
11075
+ "privacy": "private"
10113
11076
  },
10114
11077
  {
10115
11078
  "kind": "method",
10116
- "name": "#lightIcon",
11079
+ "name": "#renderHead",
10117
11080
  "privacy": "private",
10118
11081
  "parameters": [
10119
11082
  {
10120
- "name": "th",
11083
+ "name": "c",
10121
11084
  "type": {
10122
- "text": "HTMLTableCellElement"
11085
+ "text": "DataTableColumn"
11086
+ }
11087
+ },
11088
+ {
11089
+ "name": "primary",
11090
+ "optional": true,
11091
+ "type": {
11092
+ "text": "DataTableColumn"
10123
11093
  }
10124
11094
  }
10125
11095
  ]
10126
11096
  },
10127
11097
  {
10128
11098
  "kind": "method",
10129
- "name": "#onLightSort",
11099
+ "name": "#renderRow",
10130
11100
  "privacy": "private",
10131
11101
  "parameters": [
10132
11102
  {
10133
- "name": "table",
11103
+ "name": "r",
10134
11104
  "type": {
10135
- "text": "HTMLTableElement"
11105
+ "text": "DataTableRow"
10136
11106
  }
10137
11107
  },
10138
11108
  {
10139
- "name": "th",
11109
+ "name": "cols",
10140
11110
  "type": {
10141
- "text": "HTMLTableCellElement"
11111
+ "text": "DataTableColumn[]"
11112
+ }
11113
+ },
11114
+ {
11115
+ "name": "primary",
11116
+ "type": {
11117
+ "text": "DataTableColumn | undefined"
11118
+ }
11119
+ },
11120
+ {
11121
+ "name": "low",
11122
+ "type": {
11123
+ "text": "DataTableColumn[]"
10142
11124
  }
10143
11125
  },
10144
11126
  {
@@ -10149,48 +11131,39 @@
10149
11131
  }
10150
11132
  ]
10151
11133
  },
10152
- {
10153
- "kind": "field",
10154
- "name": "sortedRows",
10155
- "type": {
10156
- "text": "DataTableRow[]"
10157
- },
10158
- "description": "The rows in display order: sorted when `sort` is set and `sort-mode` is `auto`.",
10159
- "readonly": true
10160
- },
10161
11134
  {
10162
11135
  "kind": "method",
10163
- "name": "#onSort",
11136
+ "name": "#toggleRow",
10164
11137
  "privacy": "private",
10165
11138
  "parameters": [
10166
11139
  {
10167
- "name": "c",
11140
+ "name": "r",
10168
11141
  "type": {
10169
- "text": "DataTableColumn"
11142
+ "text": "DataTableRow"
10170
11143
  }
10171
11144
  }
10172
11145
  ]
10173
11146
  },
10174
11147
  {
10175
11148
  "kind": "method",
10176
- "name": "#text",
11149
+ "name": "#renderCards",
10177
11150
  "privacy": "private",
10178
11151
  "parameters": [
10179
11152
  {
10180
- "name": "v",
11153
+ "name": "rows",
10181
11154
  "type": {
10182
- "text": "unknown"
11155
+ "text": "DataTableRow[]"
10183
11156
  }
10184
- }
10185
- ]
10186
- },
10187
- {
10188
- "kind": "method",
10189
- "name": "#cls",
10190
- "privacy": "private",
10191
- "parameters": [
11157
+ },
10192
11158
  {
10193
- "name": "c",
11159
+ "name": "cols",
11160
+ "type": {
11161
+ "text": "DataTableColumn[]"
11162
+ }
11163
+ },
11164
+ {
11165
+ "name": "primary",
11166
+ "optional": true,
10194
11167
  "type": {
10195
11168
  "text": "DataTableColumn"
10196
11169
  }
@@ -10295,6 +11268,27 @@
10295
11268
  }
10296
11269
  ],
10297
11270
  "events": [
11271
+ {
11272
+ "name": "cm-row-action",
11273
+ "type": {
11274
+ "text": "CustomEvent"
11275
+ },
11276
+ "description": "`detail: { action, row, index }` when a button in an `actions` column is pressed: the action's `value`, the row object and its index in `rows`."
11277
+ },
11278
+ {
11279
+ "name": "cm-column-resize",
11280
+ "type": {
11281
+ "text": "CustomEvent"
11282
+ },
11283
+ "description": "`detail: { key, width }` when the merchant resizes a column (`resizable`), in pixels. Store it and pass it back as the column's `width`."
11284
+ },
11285
+ {
11286
+ "name": "cm-columns-change",
11287
+ "type": {
11288
+ "text": "CustomEvent"
11289
+ },
11290
+ "description": "`detail: { key, visible, columns }` when the merchant shows or hides a column with the column picker. `columns` is the new array (the table has already switched to it); store it to keep the choice."
11291
+ },
10298
11292
  {
10299
11293
  "description": "`detail: { key, direction }` when a sortable heading is clicked. Cancelable: call `preventDefault()` to stop the table sorting itself. With `sort-mode=\"manual\"` it never sorts itself.",
10300
11294
  "name": "cm-sort"
@@ -10379,7 +11373,7 @@
10379
11373
  "text": "boolean"
10380
11374
  },
10381
11375
  "default": "false",
10382
- "description": "Keeps the heading row visible while the table scrolls inside `--cm-data-table-max-height`.",
11376
+ "description": "Keeps the heading row in view while the rows scroll: inside `--cm-data-table-max-height` when you set one,\notherwise under the top of the page or of the nearest scrolling box (plus `--cm-data-table-sticky-top`).",
10383
11377
  "fieldName": "stickyHeader"
10384
11378
  },
10385
11379
  {
@@ -10409,6 +11403,50 @@
10409
11403
  "description": "How many placeholder rows `loading` shows.",
10410
11404
  "fieldName": "loadingRows"
10411
11405
  },
11406
+ {
11407
+ "name": "density",
11408
+ "type": {
11409
+ "text": "'comfortable' | 'compact' | undefined"
11410
+ },
11411
+ "description": "Row height (since 1.6): `comfortable` 48px rows or `compact` 40px rows. Unset: the nearest `data-cm-density` on an\nancestor, else comfortable. On touch screens rows are at least 44px tall either way.",
11412
+ "fieldName": "density"
11413
+ },
11414
+ {
11415
+ "name": "mobile",
11416
+ "type": {
11417
+ "text": "'scroll' | 'cards' | 'priority'"
11418
+ },
11419
+ "default": "'scroll'",
11420
+ "description": "What the table does when it is 640px wide or less (since 1.6): `scroll` keeps every column, scrolls sideways and\nsays so (\"Scroll for more\", faded edges); `cards` shows each row as a card of label and value pairs with the primary\ncolumn as its title and the actions at the bottom; `priority` hides `priority: 'low'` columns and gives each row a\n\"View all fields\" button that shows them. Pick one per table: see the \"Tables on phones\" pattern.",
11421
+ "fieldName": "mobile"
11422
+ },
11423
+ {
11424
+ "name": "row-actions",
11425
+ "type": {
11426
+ "text": "'hover' | 'always'"
11427
+ },
11428
+ "default": "'hover'",
11429
+ "description": "`hover` (default): an `actions` column's buttons appear when the row is hovered or has focus (always on touch screens). `always`: always shown.",
11430
+ "fieldName": "rowActions"
11431
+ },
11432
+ {
11433
+ "name": "resizable",
11434
+ "type": {
11435
+ "text": "boolean"
11436
+ },
11437
+ "default": "false",
11438
+ "description": "Adds a resize handle to each heading: drag it, or focus it and press the left and right arrow keys (16px a press).",
11439
+ "fieldName": "resizable"
11440
+ },
11441
+ {
11442
+ "name": "column-picker",
11443
+ "type": {
11444
+ "text": "boolean"
11445
+ },
11446
+ "default": "false",
11447
+ "description": "Adds a \"Columns\" button above the table that shows and hides columns.",
11448
+ "fieldName": "columnPicker"
11449
+ },
10412
11450
  {
10413
11451
  "name": "_light",
10414
11452
  "type": {
@@ -10425,6 +11463,35 @@
10425
11463
  "default": "''",
10426
11464
  "fieldName": "_announce"
10427
11465
  },
11466
+ {
11467
+ "name": "_widths",
11468
+ "type": {
11469
+ "text": "Record<string, number>"
11470
+ },
11471
+ "default": "{}",
11472
+ "fieldName": "_widths"
11473
+ },
11474
+ {
11475
+ "name": "_expanded",
11476
+ "default": "new Set<DataTableRow>()",
11477
+ "fieldName": "_expanded"
11478
+ },
11479
+ {
11480
+ "name": "_picker",
11481
+ "type": {
11482
+ "text": "boolean"
11483
+ },
11484
+ "default": "false",
11485
+ "fieldName": "_picker"
11486
+ },
11487
+ {
11488
+ "name": "_overflows",
11489
+ "type": {
11490
+ "text": "boolean"
11491
+ },
11492
+ "default": "false",
11493
+ "fieldName": "_overflows"
11494
+ },
10428
11495
  {
10429
11496
  "name": "strings",
10430
11497
  "type": {
@@ -10694,7 +11761,7 @@
10694
11761
  "text": "'default' | 'small'"
10695
11762
  },
10696
11763
  "default": "'default'",
10697
- "description": "`small`: 12px label, 14px value (filter panels).",
11764
+ "description": "`small`: a 32px box with a 13px label (filter rows and panels). Default: a 40px box (since 1.6; was 36px). On touch screens both are 44px.",
10698
11765
  "attribute": "size",
10699
11766
  "reflects": true
10700
11767
  },
@@ -11436,7 +12503,7 @@
11436
12503
  "text": "'default' | 'small'"
11437
12504
  },
11438
12505
  "default": "'default'",
11439
- "description": "`small`: 12px label, 14px value (filter panels).",
12506
+ "description": "`small`: a 32px box with a 13px label (filter rows and panels). Default: a 40px box (since 1.6; was 36px). On touch screens both are 44px.",
11440
12507
  "fieldName": "size"
11441
12508
  },
11442
12509
  {
@@ -11825,7 +12892,7 @@
11825
12892
  "text": "'default' | 'small'"
11826
12893
  },
11827
12894
  "default": "'default'",
11828
- "description": "`small`: 12px label, 14px values (filter panels).",
12895
+ "description": "`small`: a 32px box with a 13px label (filter rows and panels). Default: a 40px box (since 1.6; was 36px). On touch screens both are 44px.",
11829
12896
  "attribute": "size",
11830
12897
  "reflects": true
11831
12898
  },
@@ -12431,7 +13498,7 @@
12431
13498
  "text": "'default' | 'small'"
12432
13499
  },
12433
13500
  "default": "'default'",
12434
- "description": "`small`: 12px label, 14px values (filter panels).",
13501
+ "description": "`small`: a 32px box with a 13px label (filter rows and panels). Default: a 40px box (since 1.6; was 36px). On touch screens both are 44px.",
12435
13502
  "fieldName": "size"
12436
13503
  },
12437
13504
  {
@@ -12528,7 +13595,7 @@
12528
13595
  "declarations": [
12529
13596
  {
12530
13597
  "kind": "class",
12531
- "description": "Shown in place of a list or page when there is nothing to show yet, with the next step to take.\nA soft circle holds an illustration (an image, your own markup or one of the system icons).\n`size=\"inline\"` is the compact form for an empty list inside a card or table: one or two left-aligned lines,\nan optional small icon and an optional text action, with no circle.",
13598
+ "description": "Shown in place of a list or page when there is nothing to show yet, with the next step to take.\nOwner standard (1.6): by default a 48px icon tile (a 24px system icon or a small image), a 16px heading, 13px text\nand a 36px action, 8-12px apart. `size=\"large\"` keeps the big 160px illustration circle of earlier versions.\n`size=\"inline\"` is the compact form for an empty list inside a card or table: one or two left-aligned lines,\nan optional small icon and an optional text action, with no circle.",
12532
13599
  "name": "CmEmptyState",
12533
13600
  "slots": [
12534
13601
  {
@@ -12536,7 +13603,7 @@
12536
13603
  "name": ""
12537
13604
  },
12538
13605
  {
12539
- "description": "Your own illustration, drawn inside the circle. Decorative: give it `alt=\"\"`. Inline: 20px.",
13606
+ "description": "Your own illustration or icon, drawn inside the tile (or the circle with `size=\"large\"`/`\"small\"`). Decorative: give it `alt=\"\"`. Inline: 20px.",
12540
13607
  "name": "image"
12541
13608
  },
12542
13609
  {
@@ -12594,10 +13661,10 @@
12594
13661
  "name": "size",
12595
13662
  "privacy": "public",
12596
13663
  "type": {
12597
- "text": "'large' | 'small' | 'inline'"
13664
+ "text": "'default' | 'large' | 'small' | 'inline'"
12598
13665
  },
12599
- "default": "'large'",
12600
- "description": "`large` (160px circle, page-level), `small` (120px circle, inside a card or on mobile) or `inline`\n(since 1.2: no circle, a 20px icon, heading and text on one or two left-aligned lines; for an empty list\ninside a card, panel or table). Inline shows the `icon` (default `box`); set `icon=\"\"` for text only.",
13666
+ "default": "'default'",
13667
+ "description": "`default` (since 1.6, owner standard: a 48px icon tile, 16px heading, 13px text; for pages, cards and lists),\n`large` (the 160px illustration circle, 120px on phones: a first-run page with a real illustration; the default\nbefore 1.6), `small` (a 120px circle) or `inline` (since 1.2: no tile, a 20px icon, heading and text on one or two\nleft-aligned lines; for an empty list inside a card, panel or table). Inline shows the `icon` (default `box`); set `icon=\"\"` for text only.",
12601
13668
  "attribute": "size",
12602
13669
  "reflects": true
12603
13670
  },
@@ -12710,10 +13777,10 @@
12710
13777
  {
12711
13778
  "name": "size",
12712
13779
  "type": {
12713
- "text": "'large' | 'small' | 'inline'"
13780
+ "text": "'default' | 'large' | 'small' | 'inline'"
12714
13781
  },
12715
- "default": "'large'",
12716
- "description": "`large` (160px circle, page-level), `small` (120px circle, inside a card or on mobile) or `inline`\n(since 1.2: no circle, a 20px icon, heading and text on one or two left-aligned lines; for an empty list\ninside a card, panel or table). Inline shows the `icon` (default `box`); set `icon=\"\"` for text only.",
13782
+ "default": "'default'",
13783
+ "description": "`default` (since 1.6, owner standard: a 48px icon tile, 16px heading, 13px text; for pages, cards and lists),\n`large` (the 160px illustration circle, 120px on phones: a first-run page with a real illustration; the default\nbefore 1.6), `small` (a 120px circle) or `inline` (since 1.2: no tile, a 20px icon, heading and text on one or two\nleft-aligned lines; for an empty list inside a card, panel or table). Inline shows the `icon` (default `box`); set `icon=\"\"` for text only.",
12717
13784
  "fieldName": "size"
12718
13785
  },
12719
13786
  {
@@ -12760,8 +13827,22 @@
12760
13827
  "declarations": [
12761
13828
  {
12762
13829
  "kind": "class",
12763
- "description": "Drop zone for choosing files, with thumbnails of chosen images and a remove button on each.\nWraps a native file input, so it works with the keyboard, screen readers and drag and drop.\nParticipates in native forms (submit with `enctype=\"multipart/form-data\"`).\n\n`variant=\"photo\"` (since 1.3) is the phone capture pattern: one tile with a camera icon and the label; once a photo\nis taken or chosen, the tile shows it with Retake and Remove buttons. Add `capture=\"environment\"` to open the\nback camera directly on phones.",
13830
+ "description": "Drop zone for choosing files, with thumbnails of chosen images and a remove button on each.\nWraps a native file input, so it works with the keyboard, screen readers and drag and drop.\nParticipates in native forms (submit with `enctype=\"multipart/form-data\"`).\n\nEmpty, it is one compact row (72px: an icon, \"Drag files here or Browse\" and the `hint` in 12px), with hover,\ndrag-over, focus, pressed and disabled states (owner standard, 1.6; it was a 160px box). Upload the chosen files\nyourself: report progress with `setProgress(file, percent)` (a bar and a Cancel button on that file's tile; Cancel\nfires `cm-cancel`) and a failed file with `setFileError(file, message)`.\n\n`variant=\"photo\"` (since 1.3) is the phone capture pattern: one tile with a camera icon and the label; once a photo\nis taken or chosen, the tile shows it with Retake and Remove buttons. Add `capture=\"environment\"` to open the\nback camera directly on phones.",
12764
13831
  "name": "CmFileUpload",
13832
+ "cssParts": [
13833
+ {
13834
+ "description": "The drop zone (the compact row, the \"Add more\" tile, or the empty photo tile).",
13835
+ "name": "zone"
13836
+ },
13837
+ {
13838
+ "description": "The list of chosen files.",
13839
+ "name": "files"
13840
+ },
13841
+ {
13842
+ "description": "A file's progress bar while it uploads.",
13843
+ "name": "progress"
13844
+ }
13845
+ ],
12765
13846
  "members": [
12766
13847
  {
12767
13848
  "kind": "field",
@@ -12800,7 +13881,7 @@
12800
13881
  "text": "string"
12801
13882
  },
12802
13883
  "default": "''",
12803
- "description": "Rule shown next to the label in text-tertiary, e.g. \"max. file size 300 KB\".",
13884
+ "description": "Accepted types and size in 12px grey, e.g. \"PNG or JPG, up to 2 MB\". Shown in the empty zone's row (since 1.6),\nnext to the label once files are chosen, and under the label in the photo tile.",
12804
13885
  "attribute": "hint"
12805
13886
  },
12806
13887
  {
@@ -12810,7 +13891,7 @@
12810
13891
  "type": {
12811
13892
  "text": "string"
12812
13893
  },
12813
- "description": "Text inside the zone. Default: the built-in string `prompt` (\"Click here to upload\").",
13894
+ "description": "Text inside the zone; `{browse}` in it becomes the link-like \"Browse\". Default: the built-in string `prompt`\n(\"Drag files here or {browse}\"; \"Click here to upload\" before 1.6).",
12814
13895
  "attribute": "prompt"
12815
13896
  },
12816
13897
  {
@@ -12922,7 +14003,7 @@
12922
14003
  "type": {
12923
14004
  "text": "'photo' | undefined"
12924
14005
  },
12925
- "description": "`photo` (since 1.3): a single-photo tile for phones. It shows a camera icon and the `label` (or the prompt\n\"Take a photo\" without one); after a photo is taken it fills the tile, with Retake and Remove buttons under it.\nOne file only (`multiple` is ignored); `accept` defaults to `image/*`. Size the tile with CSS on the element;\nit is 4:3 (change it with `::part(photo)`, e.g. `aspect-ratio: 16 / 10` for a visiting card).",
14006
+ "description": "`photo` (since 1.3): a single-photo tile for phones. It shows a camera icon and the `label` (or the prompt\n\"Take a photo\" without one); after a photo is taken it fills the tile, with Retake and Remove buttons under it.\nOne file only (`multiple` is ignored); `accept` defaults to `image/*`. Size the tile with CSS on the element;\nit is 4:3 (change it with `::part(photo)`, e.g. `aspect-ratio: 16 / 10` for a visiting card). Empty, the tile is\nat most 120px tall (since 1.6; 4:3 when it is narrower than 160px).",
12926
14007
  "attribute": "variant",
12927
14008
  "reflects": true
12928
14009
  },
@@ -12947,6 +14028,30 @@
12947
14028
  "default": "''",
12948
14029
  "attribute": "_rejected"
12949
14030
  },
14031
+ {
14032
+ "kind": "field",
14033
+ "name": "_progress",
14034
+ "privacy": "public",
14035
+ "default": "new Map<File, number>()",
14036
+ "attribute": "_progress"
14037
+ },
14038
+ {
14039
+ "kind": "field",
14040
+ "name": "_fileErrors",
14041
+ "privacy": "public",
14042
+ "default": "new Map<File, string>()",
14043
+ "attribute": "_fileErrors"
14044
+ },
14045
+ {
14046
+ "kind": "field",
14047
+ "name": "_over",
14048
+ "privacy": "public",
14049
+ "type": {
14050
+ "text": "boolean"
14051
+ },
14052
+ "default": "false",
14053
+ "attribute": "_over"
14054
+ },
12950
14055
  {
12951
14056
  "kind": "field",
12952
14057
  "name": "#internals",
@@ -13024,19 +14129,83 @@
13024
14129
  },
13025
14130
  {
13026
14131
  "kind": "method",
13027
- "name": "formDisabledCallback",
14132
+ "name": "formDisabledCallback",
14133
+ "parameters": [
14134
+ {
14135
+ "name": "d",
14136
+ "type": {
14137
+ "text": "boolean"
14138
+ }
14139
+ }
14140
+ ]
14141
+ },
14142
+ {
14143
+ "kind": "method",
14144
+ "name": "#url",
14145
+ "privacy": "private",
14146
+ "parameters": [
14147
+ {
14148
+ "name": "f",
14149
+ "type": {
14150
+ "text": "File"
14151
+ }
14152
+ }
14153
+ ]
14154
+ },
14155
+ {
14156
+ "kind": "method",
14157
+ "name": "addFiles",
14158
+ "parameters": [
14159
+ {
14160
+ "name": "list",
14161
+ "type": {
14162
+ "text": "Iterable<File>"
14163
+ }
14164
+ }
14165
+ ],
14166
+ "description": "Adds files as if the merchant had chosen them: filters by type, size and count, then fires events."
14167
+ },
14168
+ {
14169
+ "kind": "method",
14170
+ "name": "setProgress",
14171
+ "parameters": [
14172
+ {
14173
+ "name": "file",
14174
+ "type": {
14175
+ "text": "File"
14176
+ }
14177
+ },
14178
+ {
14179
+ "name": "percent",
14180
+ "type": {
14181
+ "text": "number | null"
14182
+ }
14183
+ }
14184
+ ],
14185
+ "description": "Shows a chosen file uploading (since 1.6): a progress bar from 0 to 100 on its tile, with a Cancel button in place\nof Remove. `null` ends it (the upload finished, or failed: then call `setFileError`)."
14186
+ },
14187
+ {
14188
+ "kind": "method",
14189
+ "name": "setFileError",
13028
14190
  "parameters": [
13029
14191
  {
13030
- "name": "d",
14192
+ "name": "file",
13031
14193
  "type": {
13032
- "text": "boolean"
14194
+ "text": "File"
14195
+ }
14196
+ },
14197
+ {
14198
+ "name": "message",
14199
+ "type": {
14200
+ "text": "string"
13033
14201
  }
13034
14202
  }
13035
- ]
14203
+ ],
14204
+ "description": "Marks one chosen file as failed (since 1.6): its tile turns red with `message` under it. `''` clears it."
13036
14205
  },
13037
14206
  {
13038
14207
  "kind": "method",
13039
- "name": "#url",
14208
+ "name": "#busy",
13040
14209
  "privacy": "private",
13041
14210
  "parameters": [
13042
14211
  {
@@ -13045,20 +14214,21 @@
13045
14214
  "text": "File"
13046
14215
  }
13047
14216
  }
13048
- ]
14217
+ ],
14218
+ "description": "Whether a file is uploading (`setProgress`)."
13049
14219
  },
13050
14220
  {
13051
14221
  "kind": "method",
13052
- "name": "addFiles",
14222
+ "name": "#cancel",
14223
+ "privacy": "private",
13053
14224
  "parameters": [
13054
14225
  {
13055
- "name": "list",
14226
+ "name": "f",
13056
14227
  "type": {
13057
- "text": "Iterable<File>"
14228
+ "text": "File"
13058
14229
  }
13059
14230
  }
13060
- ],
13061
- "description": "Adds files as if the merchant had chosen them: filters by type, size and count, then fires events."
14231
+ ]
13062
14232
  },
13063
14233
  {
13064
14234
  "kind": "method",
@@ -13099,6 +14269,26 @@
13099
14269
  }
13100
14270
  ]
13101
14271
  },
14272
+ {
14273
+ "kind": "method",
14274
+ "name": "#prompt",
14275
+ "privacy": "private",
14276
+ "description": "The prompt, with `{browse}` drawn as a link-like word."
14277
+ },
14278
+ {
14279
+ "kind": "method",
14280
+ "name": "#file",
14281
+ "privacy": "private",
14282
+ "parameters": [
14283
+ {
14284
+ "name": "f",
14285
+ "type": {
14286
+ "text": "File"
14287
+ }
14288
+ }
14289
+ ],
14290
+ "description": "A file's tile: thumbnail or name and size, progress while uploading, and Remove or Cancel."
14291
+ },
13102
14292
  {
13103
14293
  "kind": "method",
13104
14294
  "name": "#zone",
@@ -13234,6 +14424,13 @@
13234
14424
  "text": "Event"
13235
14425
  },
13236
14426
  "description": "When files are added or removed. Read `files`."
14427
+ },
14428
+ {
14429
+ "name": "cm-cancel",
14430
+ "type": {
14431
+ "text": "CustomEvent"
14432
+ },
14433
+ "description": "When the merchant cancels a file's upload, with `detail: { file }`: stop the upload. The file is then removed; `preventDefault()` keeps it. Since 1.6."
13237
14434
  }
13238
14435
  ],
13239
14436
  "attributes": [
@@ -13252,7 +14449,7 @@
13252
14449
  "text": "string"
13253
14450
  },
13254
14451
  "default": "''",
13255
- "description": "Rule shown next to the label in text-tertiary, e.g. \"max. file size 300 KB\".",
14452
+ "description": "Accepted types and size in 12px grey, e.g. \"PNG or JPG, up to 2 MB\". Shown in the empty zone's row (since 1.6),\nnext to the label once files are chosen, and under the label in the photo tile.",
13256
14453
  "fieldName": "hint"
13257
14454
  },
13258
14455
  {
@@ -13260,7 +14457,7 @@
13260
14457
  "type": {
13261
14458
  "text": "string"
13262
14459
  },
13263
- "description": "Text inside the zone. Default: the built-in string `prompt` (\"Click here to upload\").",
14460
+ "description": "Text inside the zone; `{browse}` in it becomes the link-like \"Browse\". Default: the built-in string `prompt`\n(\"Drag files here or {browse}\"; \"Click here to upload\" before 1.6).",
13264
14461
  "fieldName": "prompt"
13265
14462
  },
13266
14463
  {
@@ -13340,7 +14537,7 @@
13340
14537
  "type": {
13341
14538
  "text": "'photo' | undefined"
13342
14539
  },
13343
- "description": "`photo` (since 1.3): a single-photo tile for phones. It shows a camera icon and the `label` (or the prompt\n\"Take a photo\" without one); after a photo is taken it fills the tile, with Retake and Remove buttons under it.\nOne file only (`multiple` is ignored); `accept` defaults to `image/*`. Size the tile with CSS on the element;\nit is 4:3 (change it with `::part(photo)`, e.g. `aspect-ratio: 16 / 10` for a visiting card).",
14540
+ "description": "`photo` (since 1.3): a single-photo tile for phones. It shows a camera icon and the `label` (or the prompt\n\"Take a photo\" without one); after a photo is taken it fills the tile, with Retake and Remove buttons under it.\nOne file only (`multiple` is ignored); `accept` defaults to `image/*`. Size the tile with CSS on the element;\nit is 4:3 (change it with `::part(photo)`, e.g. `aspect-ratio: 16 / 10` for a visiting card). Empty, the tile is\nat most 120px tall (since 1.6; 4:3 when it is narrower than 160px).",
13344
14541
  "fieldName": "variant"
13345
14542
  },
13346
14543
  {
@@ -13359,6 +14556,24 @@
13359
14556
  "default": "''",
13360
14557
  "fieldName": "_rejected"
13361
14558
  },
14559
+ {
14560
+ "name": "_progress",
14561
+ "default": "new Map<File, number>()",
14562
+ "fieldName": "_progress"
14563
+ },
14564
+ {
14565
+ "name": "_fileErrors",
14566
+ "default": "new Map<File, string>()",
14567
+ "fieldName": "_fileErrors"
14568
+ },
14569
+ {
14570
+ "name": "_over",
14571
+ "type": {
14572
+ "text": "boolean"
14573
+ },
14574
+ "default": "false",
14575
+ "fieldName": "_over"
14576
+ },
13362
14577
  {
13363
14578
  "name": "strings",
13364
14579
  "type": {
@@ -15803,8 +17018,8 @@
15803
17018
  "type": {
15804
17019
  "text": "SpaceStep"
15805
17020
  },
15806
- "default": "'20'",
15807
- "description": "Space between sections, across and down: a spacing step on the 4px grid (`0`, `4`, `8`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `64`; the pre-1.5 steps `10`, `15`, `22` and `30` still work and draw as 8, 16, 24 and 32). Default `20`.",
17021
+ "default": "'24'",
17022
+ "description": "Space between sections, across and down: a spacing step on the 4px grid (`0`, `4`, `8`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `64`; the pre-1.5 steps `10`, `15`, `22` and `30` still work and draw as 8, 16, 24 and 32). Default `24` (owner standard, 1.6: 24px between page sections; was 20).",
15808
17023
  "attribute": "gap",
15809
17024
  "reflects": true
15810
17025
  }
@@ -15815,8 +17030,8 @@
15815
17030
  "type": {
15816
17031
  "text": "SpaceStep"
15817
17032
  },
15818
- "default": "'20'",
15819
- "description": "Space between sections, across and down: a spacing step on the 4px grid (`0`, `4`, `8`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `64`; the pre-1.5 steps `10`, `15`, `22` and `30` still work and draw as 8, 16, 24 and 32). Default `20`.",
17033
+ "default": "'24'",
17034
+ "description": "Space between sections, across and down: a spacing step on the 4px grid (`0`, `4`, `8`, `12`, `16`, `20`, `24`, `32`, `40`, `48`, `64`; the pre-1.5 steps `10`, `15`, `22` and `30` still work and draw as 8, 16, 24 and 32). Default `24` (owner standard, 1.6: 24px between page sections; was 20).",
15820
17035
  "fieldName": "gap"
15821
17036
  }
15822
17037
  ],
@@ -15829,7 +17044,7 @@
15829
17044
  },
15830
17045
  {
15831
17046
  "kind": "class",
15832
- "description": "One column of a `cm-layout`. Its children are stacked `space-20` apart (cards on the page).",
17047
+ "description": "One column of a `cm-layout`. Its children are stacked `space-24` apart (cards on the page; since 1.6, was `space-20`).",
15833
17048
  "name": "CmLayoutSection",
15834
17049
  "slots": [
15835
17050
  {
@@ -16187,6 +17402,30 @@
16187
17402
  "attribute": "critical",
16188
17403
  "reflects": true
16189
17404
  },
17405
+ {
17406
+ "kind": "field",
17407
+ "name": "heading",
17408
+ "privacy": "public",
17409
+ "type": {
17410
+ "text": "boolean"
17411
+ },
17412
+ "default": "false",
17413
+ "description": "Makes this a section heading (its text, 12px) instead of a choice. Since 1.6.",
17414
+ "attribute": "heading",
17415
+ "reflects": true
17416
+ },
17417
+ {
17418
+ "kind": "field",
17419
+ "name": "shortcut",
17420
+ "privacy": "public",
17421
+ "type": {
17422
+ "text": "string"
17423
+ },
17424
+ "default": "''",
17425
+ "description": "Keyboard shortcut shown at the end of the row (\"Ctrl+E\"). Since 1.6.",
17426
+ "attribute": "shortcut",
17427
+ "reflects": true
17428
+ },
16190
17429
  {
16191
17430
  "kind": "method",
16192
17431
  "name": "toItem",
@@ -16243,6 +17482,24 @@
16243
17482
  "default": "false",
16244
17483
  "description": "A destructive choice, shown in the critical colour.",
16245
17484
  "fieldName": "critical"
17485
+ },
17486
+ {
17487
+ "name": "heading",
17488
+ "type": {
17489
+ "text": "boolean"
17490
+ },
17491
+ "default": "false",
17492
+ "description": "Makes this a section heading (its text, 12px) instead of a choice. Since 1.6.",
17493
+ "fieldName": "heading"
17494
+ },
17495
+ {
17496
+ "name": "shortcut",
17497
+ "type": {
17498
+ "text": "string"
17499
+ },
17500
+ "default": "''",
17501
+ "description": "Keyboard shortcut shown at the end of the row (\"Ctrl+E\"). Since 1.6.",
17502
+ "fieldName": "shortcut"
16246
17503
  }
16247
17504
  ],
16248
17505
  "superclass": {
@@ -20259,8 +21516,14 @@
20259
21516
  "declarations": [
20260
21517
  {
20261
21518
  "kind": "class",
20262
- "description": "Top of an admin page: breadcrumbs, the page title and the page's main actions.\nThe Figma file calls this the \"Save Bar\" (80px desktop, 50px mobile).\nOn narrow screens the breadcrumbs collapse to a back link to the parent page.",
21519
+ "description": "Top of an admin page: breadcrumbs, the page title and the page's main actions.\nThe Figma file calls this the \"Save Bar\" (80px desktop, 50px mobile).\nOn narrow screens the breadcrumbs collapse to a back link to the parent page.\nType (owner standard, 1.6): title 24/32 semibold (20/28 on phones), description 13/18, breadcrumbs 13/18.\nA badge in `title-adornment` sits beside the title and wraps under it only when the title runs out of room.",
20263
21520
  "name": "CmPageHeader",
21521
+ "cssParts": [
21522
+ {
21523
+ "description": "The `description` line under the title.",
21524
+ "name": "description"
21525
+ }
21526
+ ],
20264
21527
  "slots": [
20265
21528
  {
20266
21529
  "description": "Buttons, right-aligned, secondary first and the primary action last (large size).",
@@ -20283,6 +21546,17 @@
20283
21546
  "description": "Page title, rendered as the page's `<h1>` and as the last (current) breadcrumb.",
20284
21547
  "attribute": "heading"
20285
21548
  },
21549
+ {
21550
+ "kind": "field",
21551
+ "name": "description",
21552
+ "privacy": "public",
21553
+ "type": {
21554
+ "text": "string"
21555
+ },
21556
+ "default": "''",
21557
+ "description": "One line under the title saying what the page is for, 13px in text-tertiary (owner standard: page description 13). Since 1.6.",
21558
+ "attribute": "description"
21559
+ },
20286
21560
  {
20287
21561
  "kind": "field",
20288
21562
  "name": "breadcrumbs",
@@ -20464,6 +21738,15 @@
20464
21738
  "description": "Page title, rendered as the page's `<h1>` and as the last (current) breadcrumb.",
20465
21739
  "fieldName": "heading"
20466
21740
  },
21741
+ {
21742
+ "name": "description",
21743
+ "type": {
21744
+ "text": "string"
21745
+ },
21746
+ "default": "''",
21747
+ "description": "One line under the title saying what the page is for, 13px in text-tertiary (owner standard: page description 13). Since 1.6.",
21748
+ "fieldName": "description"
21749
+ },
20467
21750
  {
20468
21751
  "name": "breadcrumbs",
20469
21752
  "type": {
@@ -20652,7 +21935,7 @@
20652
21935
  "declarations": [
20653
21936
  {
20654
21937
  "kind": "class",
20655
- "description": "Moves through a long list one page at a time. A 52px bar under a list or table: rows per page on\nthe left, \"Showing 21–40 of 290\" in the middle, and \"Page [n] of N\" with previous/next arrows on\nthe right. On phones only the page field and arrows remain.\n\nThe component does not load data: listen for `cm-page-change` and `cm-page-size-change`, fetch,\nthen set `page` (and `total`) yourself.",
21938
+ "description": "Moves through a long list one page at a time. A 48px bar under a list or table: rows per page on\nthe left, \"Showing 21–40 of 290\" in the middle, and \"Page [n] of N\" with previous/next arrows on\nthe right. 13px text in tabular figures and compact 32px controls (36px when the window is 640px wide or less,\n44px on touch screens; since 1.6, before: 14px text in a 52px bar). On phones only the page field and arrows remain.\n\nThe component does not load data: listen for `cm-page-change` and `cm-page-size-change`, fetch,\nthen set `page` (and `total`) yourself.",
20656
21939
  "name": "CmPagination",
20657
21940
  "members": [
20658
21941
  {
@@ -22254,11 +23537,11 @@
22254
23537
  "name": ""
22255
23538
  },
22256
23539
  {
22257
- "description": "A 40px thumbnail (32px on phones): a `cm-thumbnail` (recommended; `alt=\"\"` when the row names the product) or an `<img>`.",
23540
+ "description": "A 40px thumbnail (32px on phones and in compact rows): a `cm-thumbnail` (recommended; `alt=\"\"` when the row names the product) or an `<img>`.",
22258
23541
  "name": "media"
22259
23542
  },
22260
23543
  {
22261
- "description": "Buttons at the end of the row. They do not toggle selection.",
23544
+ "description": "Buttons at the end of the row. They do not toggle selection. When the row is too narrow for the content and the buttons (the content would get narrower than 12rem), they wrap onto a line of their own under the content, at the start: on phones (640px or less) by default, at any width with `actions=\"wrap\"` (issue #31).",
22262
23545
  "name": "actions"
22263
23546
  }
22264
23547
  ],
@@ -22345,11 +23628,46 @@
22345
23628
  "attribute": "columns",
22346
23629
  "reflects": true
22347
23630
  },
23631
+ {
23632
+ "kind": "field",
23633
+ "name": "actions",
23634
+ "privacy": "public",
23635
+ "type": {
23636
+ "text": "'auto' | 'wrap' | 'inline'"
23637
+ },
23638
+ "default": "'auto'",
23639
+ "description": "How the `actions` slot behaves when the row gets narrow (issue #31, since 1.6). `auto` (default): on phones (640px or\nless) the buttons wrap onto their own line under the content once the content would get narrower than 12rem.\n`wrap`: the same at any width. `inline`: the buttons always stay on the content's line (the 1.5 behaviour).\nRows with `columns` keep their actions inline unless `actions=\"wrap\"`.",
23640
+ "attribute": "actions",
23641
+ "reflects": true
23642
+ },
23643
+ {
23644
+ "kind": "field",
23645
+ "name": "_hasActions",
23646
+ "privacy": "public",
23647
+ "type": {
23648
+ "text": "boolean"
23649
+ },
23650
+ "default": "false",
23651
+ "attribute": "_hasActions"
23652
+ },
22348
23653
  {
22349
23654
  "kind": "field",
22350
23655
  "name": "#internals",
22351
23656
  "privacy": "private"
22352
23657
  },
23658
+ {
23659
+ "kind": "method",
23660
+ "name": "#onActions",
23661
+ "privacy": "private",
23662
+ "parameters": [
23663
+ {
23664
+ "name": "e",
23665
+ "type": {
23666
+ "text": "Event"
23667
+ }
23668
+ }
23669
+ ]
23670
+ },
22353
23671
  {
22354
23672
  "kind": "field",
22355
23673
  "name": "name",
@@ -22561,6 +23879,23 @@
22561
23879
  "description": "Lays the row's content out on the `--cm-table-columns` grid (set it on the list), one child element per column,\n`space-20` apart: the same grid as a `cm-table-header` in the list's `header` slot, so cells sit under their headings.",
22562
23880
  "fieldName": "columns"
22563
23881
  },
23882
+ {
23883
+ "name": "actions",
23884
+ "type": {
23885
+ "text": "'auto' | 'wrap' | 'inline'"
23886
+ },
23887
+ "default": "'auto'",
23888
+ "description": "How the `actions` slot behaves when the row gets narrow (issue #31, since 1.6). `auto` (default): on phones (640px or\nless) the buttons wrap onto their own line under the content once the content would get narrower than 12rem.\n`wrap`: the same at any width. `inline`: the buttons always stay on the content's line (the 1.5 behaviour).\nRows with `columns` keep their actions inline unless `actions=\"wrap\"`.",
23889
+ "fieldName": "actions"
23890
+ },
23891
+ {
23892
+ "name": "_hasActions",
23893
+ "type": {
23894
+ "text": "boolean"
23895
+ },
23896
+ "default": "false",
23897
+ "fieldName": "_hasActions"
23898
+ },
22564
23899
  {
22565
23900
  "name": "strings",
22566
23901
  "type": {
@@ -22595,7 +23930,7 @@
22595
23930
  "name": "header"
22596
23931
  },
22597
23932
  {
22598
- "description": "Buttons that act on the selection, e.g. \"Bulk orders\". Shown once a row is selected, in the header row: use `size=\"slim\"` buttons (32px, the row's height).",
23933
+ "description": "Buttons that act on the selection, e.g. \"Bulk orders\". Shown once a row is selected, in the header row: use `size=\"slim\"` buttons (32px, in the 40px row).",
22599
23934
  "name": "bulk-actions"
22600
23935
  },
22601
23936
  {
@@ -22698,6 +24033,17 @@
22698
24033
  "description": "Accessible name of the list, e.g. \"Products\". Defaults to the plural noun.",
22699
24034
  "attribute": "label"
22700
24035
  },
24036
+ {
24037
+ "kind": "field",
24038
+ "name": "density",
24039
+ "privacy": "public",
24040
+ "type": {
24041
+ "text": "'comfortable' | 'compact' | undefined"
24042
+ },
24043
+ "description": "Row height (since 1.6): `comfortable` 56px rows with 40px thumbnails, or `compact` 40px rows with 32px thumbnails.\nUnset: the nearest `data-cm-density` on an ancestor, else comfortable. On touch screens rows are at least 44px tall.",
24044
+ "attribute": "density",
24045
+ "reflects": true
24046
+ },
22701
24047
  {
22702
24048
  "kind": "field",
22703
24049
  "name": "_count",
@@ -23018,6 +24364,14 @@
23018
24364
  "description": "Accessible name of the list, e.g. \"Products\". Defaults to the plural noun.",
23019
24365
  "fieldName": "label"
23020
24366
  },
24367
+ {
24368
+ "name": "density",
24369
+ "type": {
24370
+ "text": "'comfortable' | 'compact' | undefined"
24371
+ },
24372
+ "description": "Row height (since 1.6): `comfortable` 56px rows with 40px thumbnails, or `compact` 40px rows with 32px thumbnails.\nUnset: the nearest `data-cm-density` on an ancestor, else comfortable. On touch screens rows are at least 44px tall.",
24373
+ "fieldName": "density"
24374
+ },
23021
24375
  {
23022
24376
  "name": "_count",
23023
24377
  "type": {
@@ -23551,7 +24905,7 @@
23551
24905
  "text": "'default' | 'small' | 'large'"
23552
24906
  },
23553
24907
  "default": "'default'",
23554
- "description": "`default` 36px (lists, table headers); `small` 32px (toolbars and filter rows, since 1.5); `large` 40px (page-level\nsearch). On touch screens every size is 44px.",
24908
+ "description": "`default` 40px (since 1.6, owner standard; was 36px); `small` 32px (toolbars, filter rows and table headers, since 1.5);\n`large` 40px (page-level search; the same as the default since 1.6, kept for compatibility). On touch screens every size is 44px.",
23555
24909
  "attribute": "size",
23556
24910
  "reflects": true
23557
24911
  },
@@ -23856,7 +25210,7 @@
23856
25210
  "text": "'default' | 'small' | 'large'"
23857
25211
  },
23858
25212
  "default": "'default'",
23859
- "description": "`default` 36px (lists, table headers); `small` 32px (toolbars and filter rows, since 1.5); `large` 40px (page-level\nsearch). On touch screens every size is 44px.",
25213
+ "description": "`default` 40px (since 1.6, owner standard; was 36px); `small` 32px (toolbars, filter rows and table headers, since 1.5);\n`large` 40px (page-level search; the same as the default since 1.6, kept for compatibility). On touch screens every size is 44px.",
23860
25214
  "fieldName": "size"
23861
25215
  },
23862
25216
  {
@@ -24689,10 +26043,22 @@
24689
26043
  "text": "'default' | 'small'"
24690
26044
  },
24691
26045
  "default": "'default'",
24692
- "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch\nscreens both are 44px. Since 1.5.",
26046
+ "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 40px box (since 1.6, owner standard; was 36px). On touch\nscreens both are 44px. Since 1.5.",
24693
26047
  "attribute": "size",
24694
26048
  "reflects": true
24695
26049
  },
26050
+ {
26051
+ "kind": "field",
26052
+ "name": "loading",
26053
+ "privacy": "public",
26054
+ "type": {
26055
+ "text": "boolean"
26056
+ },
26057
+ "default": "false",
26058
+ "description": "Shows a spinner in place of the chevron while you load the options (the box is `aria-busy`); the list doesn't\nopen until it is cleared. For options fetched as the merchant types, use `cm-combobox`. Since 1.6.",
26059
+ "attribute": "loading",
26060
+ "reflects": true
26061
+ },
24696
26062
  {
24697
26063
  "kind": "field",
24698
26064
  "name": "_active",
@@ -25136,9 +26502,18 @@
25136
26502
  "text": "'default' | 'small'"
25137
26503
  },
25138
26504
  "default": "'default'",
25139
- "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch\nscreens both are 44px. Since 1.5.",
26505
+ "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 40px box (since 1.6, owner standard; was 36px). On touch\nscreens both are 44px. Since 1.5.",
25140
26506
  "fieldName": "size"
25141
26507
  },
26508
+ {
26509
+ "name": "loading",
26510
+ "type": {
26511
+ "text": "boolean"
26512
+ },
26513
+ "default": "false",
26514
+ "description": "Shows a spinner in place of the chevron while you load the options (the box is `aria-busy`); the list doesn't\nopen until it is cleared. For options fetched as the merchant types, use `cm-combobox`. Since 1.6.",
26515
+ "fieldName": "loading"
26516
+ },
25142
26517
  {
25143
26518
  "name": "_active",
25144
26519
  "type": {
@@ -25197,7 +26572,7 @@
25197
26572
  "name": "CmSideNavigation",
25198
26573
  "cssProperties": [
25199
26574
  {
25200
- "description": "Width of the full menu. Default `250px`.",
26575
+ "description": "Width of the full menu. Default `220px` (owner standard, 1.6; was 250px).",
25201
26576
  "name": "--cm-side-navigation-width"
25202
26577
  },
25203
26578
  {
@@ -28252,8 +29627,14 @@
28252
29627
  "declarations": [
28253
29628
  {
28254
29629
  "kind": "class",
28255
- "description": "A row of statuses that filters the list under it, such as All, Unprocessed, Processing, Fulfilled.\nThe chosen status is black, semibold and underlined; the others are grey. Each label can carry a count, shown as a\nsmall neutral pill after it (read as \"My tasks, 4\").\nWorks as ARIA tabs: one tab stop, arrow keys move and select, Home/End jump to the ends.\nToo many tabs for the width scroll sideways.\n\nTabs come from `<option>` children (`count` attribute for the number) or the `tabs` property.",
29630
+ "description": "A row of statuses that filters the list under it, such as All, Unprocessed, Processing, Fulfilled.\nThe chosen status is black, semibold and underlined; the others are grey. Each label can carry a count, shown as a\nsmall neutral pill after it (read as \"My tasks, 4\").\nWorks as ARIA tabs: one tab stop, arrow keys move and select, Home/End jump to the ends.\nToo many tabs for the width scroll sideways: the row fades at the edge that has more tabs past it and snaps to a tab\n(since 1.6, owner standard). On phones `mobile=\"select\"` shows the tabs as a dropdown instead (640px wide or less).\n\nTabs come from `<option>` children (`count` attribute for the number) or the `tabs` property.",
28256
29631
  "name": "CmStatusTabs",
29632
+ "cssParts": [
29633
+ {
29634
+ "description": "The dropdown shown instead of the tabs with `mobile=\"select\"` on narrow screens.",
29635
+ "name": "select"
29636
+ }
29637
+ ],
28257
29638
  "slots": [
28258
29639
  {
28259
29640
  "description": "`<option value=\"…\" count=\"23\">Label</option>` elements. `disabled` and `selected` are honoured.",
@@ -28307,6 +29688,35 @@
28307
29688
  "attribute": "size",
28308
29689
  "reflects": true
28309
29690
  },
29691
+ {
29692
+ "kind": "field",
29693
+ "name": "mobile",
29694
+ "privacy": "public",
29695
+ "type": {
29696
+ "text": "'scroll' | 'select'"
29697
+ },
29698
+ "default": "'scroll'",
29699
+ "description": "What the tabs become on screens 640px wide or less: `scroll` (default: the row scrolls sideways, with a fade at the\nedge that has more tabs) or `select` (a dropdown of the same choices, with the counts; one control instead of a long\nrow). Since 1.6.",
29700
+ "attribute": "mobile",
29701
+ "reflects": true
29702
+ },
29703
+ {
29704
+ "kind": "field",
29705
+ "name": "_more",
29706
+ "privacy": "public",
29707
+ "type": {
29708
+ "text": "string"
29709
+ },
29710
+ "default": "''",
29711
+ "description": "Which edges have more tabs past them: '' | 'start' | 'end' | 'both'.",
29712
+ "attribute": "_more"
29713
+ },
29714
+ {
29715
+ "kind": "field",
29716
+ "name": "#resize",
29717
+ "privacy": "private",
29718
+ "default": "new ResizeObserver(() => this.#measure())"
29719
+ },
28310
29720
  {
28311
29721
  "kind": "field",
28312
29722
  "name": "_slotted",
@@ -28323,6 +29733,12 @@
28323
29733
  "privacy": "private",
28324
29734
  "default": "new MutationObserver(() => this.#readChildren())"
28325
29735
  },
29736
+ {
29737
+ "kind": "method",
29738
+ "name": "#measure",
29739
+ "privacy": "private",
29740
+ "description": "Works out which edges of the row have tabs past them (for the fade)."
29741
+ },
28326
29742
  {
28327
29743
  "kind": "field",
28328
29744
  "name": "items",
@@ -28344,7 +29760,20 @@
28344
29760
  }
28345
29761
  }
28346
29762
  ],
28347
- "description": "Focuses the selected tab."
29763
+ "description": "Focuses the selected tab (or the dropdown, when `mobile=\"select\"` shows it)."
29764
+ },
29765
+ {
29766
+ "kind": "method",
29767
+ "name": "#onPick",
29768
+ "privacy": "private",
29769
+ "parameters": [
29770
+ {
29771
+ "name": "e",
29772
+ "type": {
29773
+ "text": "Event"
29774
+ }
29775
+ }
29776
+ ]
28348
29777
  },
28349
29778
  {
28350
29779
  "kind": "method",
@@ -28499,7 +29928,7 @@
28499
29928
  "type": {
28500
29929
  "text": "Event"
28501
29930
  },
28502
- "description": "When the merchant picks another status. Read `value`."
29931
+ "description": "When the merchant picks another status (a tab, or the dropdown). Read `value`."
28503
29932
  }
28504
29933
  ],
28505
29934
  "attributes": [
@@ -28539,6 +29968,15 @@
28539
29968
  "description": "`large` (the default: 14px labels, page-level statuses) or `small` (13px, tighter, inside a card, e.g. review sorting).",
28540
29969
  "fieldName": "size"
28541
29970
  },
29971
+ {
29972
+ "name": "mobile",
29973
+ "type": {
29974
+ "text": "'scroll' | 'select'"
29975
+ },
29976
+ "default": "'scroll'",
29977
+ "description": "What the tabs become on screens 640px wide or less: `scroll` (default: the row scrolls sideways, with a fade at the\nedge that has more tabs) or `select` (a dropdown of the same choices, with the counts; one control instead of a long\nrow). Since 1.6.",
29978
+ "fieldName": "mobile"
29979
+ },
28542
29980
  {
28543
29981
  "name": "_slotted",
28544
29982
  "type": {
@@ -28547,6 +29985,15 @@
28547
29985
  "default": "[]",
28548
29986
  "fieldName": "_slotted"
28549
29987
  },
29988
+ {
29989
+ "name": "_more",
29990
+ "type": {
29991
+ "text": "string"
29992
+ },
29993
+ "default": "''",
29994
+ "description": "Which edges have more tabs past them: '' | 'start' | 'end' | 'both'.",
29995
+ "fieldName": "_more"
29996
+ },
28550
29997
  {
28551
29998
  "name": "strings",
28552
29999
  "type": {
@@ -28585,7 +30032,7 @@
28585
30032
  "declarations": [
28586
30033
  {
28587
30034
  "kind": "class",
28588
- "description": "The grey 32px label bar at the top of a table or resource list: column names in 12px medium type,\noptional sort buttons and an optional \"select all\" checkbox.\n\nColumns come from `<option>` children or the `columns` property. Lay out the rows with the same\ngrid: set `--cm-table-columns` (a `grid-template-columns` value) on a shared parent.\nInside an element with `role=\"table\"` or `role=\"grid\"` it renders a real header row\n(`row` and `columnheader` roles); elsewhere it is a plain bar whose sort buttons say their state.\n\nIn the `header` slot of a `cm-resource-list`, the list sets `resource-rows` so the column names line up with the\ncells of its `cm-resource-item` rows (including the rows' checkbox column when the list is `selectable`). The\nlist puts its select-all box in the header's checkbox column (and its selection status over the names while rows are\nselected): don't also set `selectable` on the header.",
30035
+ "description": "The grey 40px label bar at the top of a table or resource list (32px before 1.6): column names in 12px semibold type,\noptional sort buttons and an optional \"select all\" checkbox.\n\nColumns come from `<option>` children or the `columns` property. Lay out the rows with the same\ngrid: set `--cm-table-columns` (a `grid-template-columns` value) on a shared parent.\nInside an element with `role=\"table\"` or `role=\"grid\"` it renders a real header row\n(`row` and `columnheader` roles); elsewhere it is a plain bar whose sort buttons say their state.\n\nIn the `header` slot of a `cm-resource-list`, the list sets `resource-rows` so the column names line up with the\ncells of its `cm-resource-item` rows (including the rows' checkbox column when the list is `selectable`). The\nlist puts its select-all box in the header's checkbox column (and its selection status over the names while rows are\nselected): don't also set `selectable` on the header.",
28589
30036
  "name": "CmTableHeader",
28590
30037
  "cssProperties": [
28591
30038
  {
@@ -28992,6 +30439,16 @@
28992
30439
  }
28993
30440
  ],
28994
30441
  "members": [
30442
+ {
30443
+ "kind": "field",
30444
+ "name": "shadowRootOptions",
30445
+ "type": {
30446
+ "text": "object"
30447
+ },
30448
+ "static": true,
30449
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true }",
30450
+ "description": "`focus()` on the tag focuses its remove button."
30451
+ },
28995
30452
  {
28996
30453
  "kind": "field",
28997
30454
  "name": "removable",
@@ -29391,7 +30848,7 @@
29391
30848
  "text": "'default' | 'small'"
29392
30849
  },
29393
30850
  "default": "'default'",
29394
- "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch screens both are 44px.",
30851
+ "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 40px box (since 1.6, owner standard; was 36px). On touch screens both are 44px.",
29395
30852
  "attribute": "size",
29396
30853
  "reflects": true
29397
30854
  },
@@ -29781,7 +31238,7 @@
29781
31238
  "text": "'default' | 'small'"
29782
31239
  },
29783
31240
  "default": "'default'",
29784
- "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 36px box. On touch screens both are 44px.",
31241
+ "description": "`small`: a 32px box with a 13px label, for toolbars, filter rows and filter panels. Default: a 40px box (since 1.6, owner standard; was 36px). On touch screens both are 44px.",
29785
31242
  "fieldName": "size"
29786
31243
  },
29787
31244
  {
@@ -31779,7 +33236,7 @@
31779
33236
  "declarations": [
31780
33237
  {
31781
33238
  "kind": "class",
31782
- "description": "Short text that names or explains a control, shown on hover and keyboard focus.\nWrap exactly one focusable element. The text becomes that element's accessible description, so screen readers\nhear it too. It stays open while the pointer is over the control or the tooltip, and Esc closes it\n(WCAG 1.4.13). Text only: never put links or buttons in a tooltip.\n\nAn icon-only button still needs its own accessible name (visually hidden text or `aria-label`): the tooltip\ndescribes, it does not name.",
33239
+ "description": "Short text that names or explains a control, shown on hover (after 400ms) and at once on keyboard focus; it hides\nas soon as the pointer leaves or focus moves on. 12px text on a dark surface, 8 x 12px padding, 6px corners, at\nmost 240px wide (owner standard, 1.6). A tooltip is never the only way to get information: whatever it says must\nalso be in the page, the control's label or its help text, because touch screens never show it.\nWrap exactly one focusable element. The text becomes that element's accessible description, so screen readers\nhear it too. It stays open while the pointer is over the control or the tooltip, and Esc closes it\n(WCAG 1.4.13). Text only: never put links or buttons in a tooltip.\n\nAn icon-only button still needs its own accessible name (visually hidden text or `aria-label`): the tooltip\ndescribes, it does not name.",
31783
33240
  "name": "CmTooltip",
31784
33241
  "slots": [
31785
33242
  {
@@ -31818,8 +33275,8 @@
31818
33275
  "type": {
31819
33276
  "text": "number"
31820
33277
  },
31821
- "default": "300",
31822
- "description": "Wait before showing on hover, in ms. Keyboard focus shows it at once.",
33278
+ "default": "400",
33279
+ "description": "Wait before showing on hover, in ms. Keyboard focus shows it at once. Default 400 (since 1.6; was 300).",
31823
33280
  "attribute": "delay"
31824
33281
  },
31825
33282
  {
@@ -32043,8 +33500,8 @@
32043
33500
  "type": {
32044
33501
  "text": "number"
32045
33502
  },
32046
- "default": "300",
32047
- "description": "Wait before showing on hover, in ms. Keyboard focus shows it at once.",
33503
+ "default": "400",
33504
+ "description": "Wait before showing on hover, in ms. Keyboard focus shows it at once. Default 400 (since 1.6; was 300).",
32048
33505
  "fieldName": "delay"
32049
33506
  },
32050
33507
  {