@commmerce/ui 1.0.0-rc.5 → 1.1.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.
@@ -1297,6 +1297,216 @@
1297
1297
  }
1298
1298
  ]
1299
1299
  },
1300
+ {
1301
+ "kind": "javascript-module",
1302
+ "path": "src/components/app-frame.ts",
1303
+ "declarations": [
1304
+ {
1305
+ "kind": "class",
1306
+ "description": "The admin's frame: puts the Header bar, the Side navigation, the page, the Bottom navigation and the Mobile\nmenu in their places, so every Commmerce product gets the same grid. For Commmerce products only, not for apps:\napps run inside the admin, which already has this frame.\n\nWhen the frame is 1024px wide or more, the side navigation sits on the start side under the header; narrower,\nit is hidden and the bottom navigation is fixed to the bottom of the window. The frame follows its own width\n(normally the window's). The header sticks to the top (below the device's notch or status bar), the side\nnavigation sticks under it and scrolls on its own when it is taller than the window, and the page scrolls with\nthe window. The page gets bottom padding as tall as the bottom navigation, so nothing hides behind it.\n\nThe mobile menu is a full-screen layer above the page and below the bottom navigation, shown while\n`menu-open` is set. Set `menu-item` to the value of the bottom navigation item that opens it (usually `more`)\nand the frame opens and closes it for you; otherwise listen for `cm-navigate` and set `menu-open` yourself.\n\nThe frame adds one landmark, `main`, around the page. The header bar (`banner`) and the navigations (`nav`)\nbring their own, so don't wrap them, and don't put another `main` in the page.",
1307
+ "name": "CmAppFrame",
1308
+ "cssProperties": [
1309
+ {
1310
+ "description": "Height the side navigation fits in (it scrolls when taller). Default `100dvh`, the window. Set it when the frame is inside a box of its own.",
1311
+ "name": "--cm-app-frame-height"
1312
+ }
1313
+ ],
1314
+ "slots": [
1315
+ {
1316
+ "description": "A `cm-header-bar`.",
1317
+ "name": "header"
1318
+ },
1319
+ {
1320
+ "description": "A `cm-side-navigation`. Shown when the frame is 1024px wide or more. Collapse it with its `collapsed` attribute; the frame follows its width.",
1321
+ "name": "navigation"
1322
+ },
1323
+ {
1324
+ "description": "The page, usually a `cm-page`. Wrapped in the frame's `main` landmark.",
1325
+ "name": ""
1326
+ },
1327
+ {
1328
+ "description": "A `cm-bottom-navigation`. Shown, fixed to the bottom of the window, when the frame is narrower than 1024px. No need to set its `fixed` attribute.",
1329
+ "name": "bottom-navigation"
1330
+ },
1331
+ {
1332
+ "description": "A `cm-mobile-menu`. Shown over the page while `menu-open` is set and the frame is narrower than 1024px.",
1333
+ "name": "mobile-menu"
1334
+ }
1335
+ ],
1336
+ "members": [
1337
+ {
1338
+ "kind": "field",
1339
+ "name": "menuOpen",
1340
+ "privacy": "public",
1341
+ "type": {
1342
+ "text": "boolean"
1343
+ },
1344
+ "default": "false",
1345
+ "description": "Shows the mobile menu (on narrow frames). Set it yourself, or let `menu-item` do it.",
1346
+ "attribute": "menu-open",
1347
+ "reflects": true
1348
+ },
1349
+ {
1350
+ "kind": "field",
1351
+ "name": "menuItem",
1352
+ "privacy": "public",
1353
+ "type": {
1354
+ "text": "string"
1355
+ },
1356
+ "default": "''",
1357
+ "description": "Value of the bottom navigation item that opens and closes the mobile menu, e.g. `more` for\n`<cm-nav-item label=\"More\" value=\"more\">`. When set, choosing it toggles `menu-open`, Escape closes the\nmenu, and choosing a row in the menu closes it. Empty: you wire the menu yourself.",
1358
+ "attribute": "menu-item"
1359
+ },
1360
+ {
1361
+ "kind": "field",
1362
+ "name": "_wide",
1363
+ "privacy": "public",
1364
+ "type": {
1365
+ "text": "boolean"
1366
+ },
1367
+ "default": "false",
1368
+ "attribute": "_wide"
1369
+ },
1370
+ {
1371
+ "kind": "field",
1372
+ "name": "#ro",
1373
+ "privacy": "private",
1374
+ "type": {
1375
+ "text": "ResizeObserver | undefined"
1376
+ }
1377
+ },
1378
+ {
1379
+ "kind": "field",
1380
+ "name": "#returnFocus",
1381
+ "privacy": "private",
1382
+ "type": {
1383
+ "text": "HTMLElement | null"
1384
+ },
1385
+ "default": "null"
1386
+ },
1387
+ {
1388
+ "kind": "field",
1389
+ "name": "wide",
1390
+ "description": "True while the frame is 1024px wide or more and shows the side navigation instead of the bottom navigation.",
1391
+ "readonly": true
1392
+ },
1393
+ {
1394
+ "kind": "method",
1395
+ "name": "#heights",
1396
+ "privacy": "private"
1397
+ },
1398
+ {
1399
+ "kind": "method",
1400
+ "name": "openMenu",
1401
+ "description": "Opens the mobile menu and moves focus into it."
1402
+ },
1403
+ {
1404
+ "kind": "method",
1405
+ "name": "closeMenu",
1406
+ "description": "Closes the mobile menu and returns focus to where it was before the menu opened."
1407
+ },
1408
+ {
1409
+ "kind": "method",
1410
+ "name": "toggleMenu",
1411
+ "description": "Opens the mobile menu if it is closed, closes it if it is open."
1412
+ },
1413
+ {
1414
+ "kind": "method",
1415
+ "name": "#set",
1416
+ "privacy": "private",
1417
+ "parameters": [
1418
+ {
1419
+ "name": "open",
1420
+ "type": {
1421
+ "text": "boolean"
1422
+ }
1423
+ },
1424
+ {
1425
+ "name": "restore",
1426
+ "default": "true"
1427
+ }
1428
+ ]
1429
+ },
1430
+ {
1431
+ "kind": "method",
1432
+ "name": "#slotOf",
1433
+ "privacy": "private",
1434
+ "parameters": [
1435
+ {
1436
+ "name": "e",
1437
+ "type": {
1438
+ "text": "Event"
1439
+ }
1440
+ }
1441
+ ]
1442
+ },
1443
+ {
1444
+ "kind": "field",
1445
+ "name": "#onNavigate",
1446
+ "privacy": "private"
1447
+ },
1448
+ {
1449
+ "kind": "field",
1450
+ "name": "#onKey",
1451
+ "privacy": "private"
1452
+ }
1453
+ ],
1454
+ "events": [
1455
+ {
1456
+ "name": "cm-menu-toggle",
1457
+ "type": {
1458
+ "text": "CustomEvent"
1459
+ },
1460
+ "description": "When the frame opens or closes the mobile menu itself: from the `menu-item` in the bottom navigation, Escape, or a choice in the menu. `detail: { open }`. Not fired when you set `menu-open` yourself."
1461
+ }
1462
+ ],
1463
+ "attributes": [
1464
+ {
1465
+ "name": "menu-open",
1466
+ "type": {
1467
+ "text": "boolean"
1468
+ },
1469
+ "default": "false",
1470
+ "description": "Shows the mobile menu (on narrow frames). Set it yourself, or let `menu-item` do it.",
1471
+ "fieldName": "menuOpen"
1472
+ },
1473
+ {
1474
+ "name": "menu-item",
1475
+ "type": {
1476
+ "text": "string"
1477
+ },
1478
+ "default": "''",
1479
+ "description": "Value of the bottom navigation item that opens and closes the mobile menu, e.g. `more` for\n`<cm-nav-item label=\"More\" value=\"more\">`. When set, choosing it toggles `menu-open`, Escape closes the\nmenu, and choosing a row in the menu closes it. Empty: you wire the menu yourself.",
1480
+ "fieldName": "menuItem"
1481
+ },
1482
+ {
1483
+ "name": "_wide",
1484
+ "type": {
1485
+ "text": "boolean"
1486
+ },
1487
+ "default": "false",
1488
+ "fieldName": "_wide"
1489
+ }
1490
+ ],
1491
+ "superclass": {
1492
+ "name": "LitElement",
1493
+ "package": "lit"
1494
+ },
1495
+ "tagName": "cm-app-frame",
1496
+ "customElement": true
1497
+ }
1498
+ ],
1499
+ "exports": [
1500
+ {
1501
+ "kind": "js",
1502
+ "name": "CmAppFrame",
1503
+ "declaration": {
1504
+ "name": "CmAppFrame",
1505
+ "module": "src/components/app-frame.ts"
1506
+ }
1507
+ }
1508
+ ]
1509
+ },
1300
1510
  {
1301
1511
  "kind": "javascript-module",
1302
1512
  "path": "src/components/avatar.ts",
@@ -2650,15 +2860,25 @@
2650
2860
  "declarations": [
2651
2861
  {
2652
2862
  "kind": "class",
2653
- "description": "Black primary or outlined secondary action.",
2863
+ "description": "Black primary or outlined secondary action. With `icon-only` it is a square button that shows just an icon\n(bell, refresh, search, row actions) and is named by `label`. `count` adds a small counter (\"3\", \"99+\").",
2654
2864
  "name": "CmButton",
2865
+ "cssParts": [
2866
+ {
2867
+ "description": "The native `<button>` or `<a>`.",
2868
+ "name": "control"
2869
+ },
2870
+ {
2871
+ "description": "The counter shown when `count` is above 0.",
2872
+ "name": "count"
2873
+ }
2874
+ ],
2655
2875
  "slots": [
2656
2876
  {
2657
- "description": "Label.",
2877
+ "description": "Label. Visually hidden when `icon-only` (it still names the button if `label` is empty).",
2658
2878
  "name": ""
2659
2879
  },
2660
2880
  {
2661
- "description": "Optional leading icon.",
2881
+ "description": "Optional leading icon. Overrides the `icon` attribute.",
2662
2882
  "name": "icon"
2663
2883
  }
2664
2884
  ],
@@ -2753,87 +2973,285 @@
2753
2973
  },
2754
2974
  {
2755
2975
  "kind": "field",
2756
- "name": "#internals",
2757
- "privacy": "private"
2976
+ "name": "iconOnly",
2977
+ "privacy": "public",
2978
+ "type": {
2979
+ "text": "boolean"
2980
+ },
2981
+ "default": "false",
2982
+ "description": "Square button that shows only its icon (from `icon` or the `icon` slot). Give it a `label`.",
2983
+ "attribute": "icon-only",
2984
+ "reflects": true
2758
2985
  },
2759
2986
  {
2760
2987
  "kind": "field",
2761
- "name": "#onClick",
2762
- "privacy": "private"
2763
- }
2764
- ],
2765
- "events": [
2766
- {
2767
- "description": "Native click; suppressed while disabled or loading.",
2768
- "name": "click"
2769
- }
2770
- ],
2771
- "attributes": [
2772
- {
2773
- "name": "variant",
2988
+ "name": "icon",
2989
+ "privacy": "public",
2774
2990
  "type": {
2775
- "text": "'primary' | 'secondary'"
2991
+ "text": "string"
2776
2992
  },
2777
- "default": "'secondary'",
2778
- "description": "`primary` = black fill (one per group); `secondary` = light fill, black outline.",
2779
- "fieldName": "variant"
2993
+ "default": "''",
2994
+ "description": "Name of a",
2995
+ "attribute": "icon"
2780
2996
  },
2781
2997
  {
2782
- "name": "size",
2998
+ "kind": "field",
2999
+ "name": "label",
3000
+ "privacy": "public",
2783
3001
  "type": {
2784
- "text": "'large' | 'medium' | 'slim'"
3002
+ "text": "string"
2785
3003
  },
2786
- "default": "'medium'",
2787
- "description": "`large` 46px (save bars), `medium` 32px, `slim` 24px.",
2788
- "fieldName": "size"
3004
+ "default": "''",
3005
+ "description": "Accessible name of an `icon-only` button (\"Notifications\", \"Refresh\"). Required with `icon-only`; ignored otherwise, so the visible text stays the name.",
3006
+ "attribute": "label"
2789
3007
  },
2790
3008
  {
2791
- "name": "type",
3009
+ "kind": "field",
3010
+ "name": "count",
3011
+ "privacy": "public",
2792
3012
  "type": {
2793
- "text": "'button' | 'submit' | 'reset'"
3013
+ "text": "number"
2794
3014
  },
2795
- "default": "'button'",
2796
- "description": "Form behaviour when inside a `<form>`: `submit` submits it, `reset` resets it.",
2797
- "fieldName": "type"
3015
+ "default": "0",
3016
+ "description": "Small counter on the button, e.g. unread notifications. Hidden at 0; over 99 shows \"99+\". Screen readers hear the exact number (\"Notifications, 3 unread\").",
3017
+ "attribute": "count"
2798
3018
  },
2799
3019
  {
2800
- "name": "disabled",
2801
- "type": {
2802
- "text": "boolean"
2803
- },
2804
- "default": "false",
2805
- "description": "Blocks clicks and dims the button. Prefer explaining why nearby.",
2806
- "fieldName": "disabled"
3020
+ "kind": "field",
3021
+ "name": "#internals",
3022
+ "privacy": "private"
2807
3023
  },
2808
3024
  {
2809
- "name": "loading",
3025
+ "kind": "field",
3026
+ "name": "#onClick",
3027
+ "privacy": "private"
3028
+ },
3029
+ {
3030
+ "kind": "field",
3031
+ "name": "#warned",
3032
+ "privacy": "private",
2810
3033
  "type": {
2811
3034
  "text": "boolean"
2812
3035
  },
2813
- "default": "false",
2814
- "description": "Shows a spinner and blocks clicks while an action runs.",
2815
- "fieldName": "loading"
3036
+ "default": "false"
2816
3037
  },
2817
3038
  {
2818
- "name": "href",
2819
- "type": {
2820
- "text": "string | undefined"
2821
- },
2822
- "description": "Renders a link styled as a button.",
2823
- "fieldName": "href"
3039
+ "kind": "method",
3040
+ "name": "finalize",
3041
+ "static": true,
3042
+ "description": "A property declared with `string: 'key'` (e.g. `saveLabel: { attribute: 'save-label', string: 'save' }`) reads\nas that built-in string until it is set, so `el.saveLabel` is \"Save\" in English and the translation elsewhere.\nSetting it overrides the string for this element; setting `undefined` goes back to the built-in one.",
3043
+ "inheritedFrom": {
3044
+ "name": "CmLocalizedElement",
3045
+ "module": "src/localize.ts"
3046
+ }
2824
3047
  },
2825
3048
  {
2826
- "name": "target",
3049
+ "kind": "field",
3050
+ "name": "strings",
3051
+ "privacy": "public",
3052
+ "type": {
3053
+ "text": "Record<string, Message> | null | undefined"
3054
+ },
3055
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
3056
+ "attribute": "strings",
3057
+ "inheritedFrom": {
3058
+ "name": "CmLocalizedElement",
3059
+ "module": "src/localize.ts"
3060
+ }
3061
+ },
3062
+ {
3063
+ "kind": "field",
3064
+ "name": "stringsNamespace",
3065
+ "privacy": "protected",
3066
+ "description": "The string namespace: the tag name without `cm-`, in camelCase.",
3067
+ "readonly": true,
3068
+ "inheritedFrom": {
3069
+ "name": "CmLocalizedElement",
3070
+ "module": "src/localize.ts"
3071
+ }
3072
+ },
3073
+ {
3074
+ "kind": "method",
3075
+ "name": "t",
3076
+ "privacy": "protected",
3077
+ "parameters": [
3078
+ {
3079
+ "name": "key",
3080
+ "type": {
3081
+ "text": "string"
3082
+ }
3083
+ },
3084
+ {
3085
+ "name": "vars",
3086
+ "optional": true,
3087
+ "type": {
3088
+ "text": "MessageVars"
3089
+ }
3090
+ }
3091
+ ],
3092
+ "description": "The component's text for `key`, in its language, with `{placeholders}` filled from `vars`.",
3093
+ "inheritedFrom": {
3094
+ "name": "CmLocalizedElement",
3095
+ "module": "src/localize.ts"
3096
+ }
3097
+ },
3098
+ {
3099
+ "kind": "field",
3100
+ "name": "locale",
3101
+ "privacy": "protected",
3102
+ "description": "The locale used for numbers, dates and plurals.",
3103
+ "readonly": true,
3104
+ "inheritedFrom": {
3105
+ "name": "CmLocalizedElement",
3106
+ "module": "src/localize.ts"
3107
+ }
3108
+ },
3109
+ {
3110
+ "kind": "method",
3111
+ "name": "formatNumber",
3112
+ "privacy": "protected",
3113
+ "parameters": [
3114
+ {
3115
+ "name": "n",
3116
+ "type": {
3117
+ "text": "number"
3118
+ }
3119
+ },
3120
+ {
3121
+ "name": "options",
3122
+ "optional": true,
3123
+ "type": {
3124
+ "text": "Intl.NumberFormatOptions"
3125
+ }
3126
+ }
3127
+ ],
3128
+ "description": "A number formatted for the component's locale.",
3129
+ "inheritedFrom": {
3130
+ "name": "CmLocalizedElement",
3131
+ "module": "src/localize.ts"
3132
+ }
3133
+ }
3134
+ ],
3135
+ "events": [
3136
+ {
3137
+ "description": "Native click; suppressed while disabled or loading.",
3138
+ "name": "click"
3139
+ }
3140
+ ],
3141
+ "attributes": [
3142
+ {
3143
+ "name": "variant",
3144
+ "type": {
3145
+ "text": "'primary' | 'secondary'"
3146
+ },
3147
+ "default": "'secondary'",
3148
+ "description": "`primary` = black fill (one per group); `secondary` = light fill, black outline.",
3149
+ "fieldName": "variant"
3150
+ },
3151
+ {
3152
+ "name": "size",
3153
+ "type": {
3154
+ "text": "'large' | 'medium' | 'slim'"
3155
+ },
3156
+ "default": "'medium'",
3157
+ "description": "`large` 46px (save bars), `medium` 32px, `slim` 24px.",
3158
+ "fieldName": "size"
3159
+ },
3160
+ {
3161
+ "name": "type",
3162
+ "type": {
3163
+ "text": "'button' | 'submit' | 'reset'"
3164
+ },
3165
+ "default": "'button'",
3166
+ "description": "Form behaviour when inside a `<form>`: `submit` submits it, `reset` resets it.",
3167
+ "fieldName": "type"
3168
+ },
3169
+ {
3170
+ "name": "disabled",
3171
+ "type": {
3172
+ "text": "boolean"
3173
+ },
3174
+ "default": "false",
3175
+ "description": "Blocks clicks and dims the button. Prefer explaining why nearby.",
3176
+ "fieldName": "disabled"
3177
+ },
3178
+ {
3179
+ "name": "loading",
3180
+ "type": {
3181
+ "text": "boolean"
3182
+ },
3183
+ "default": "false",
3184
+ "description": "Shows a spinner and blocks clicks while an action runs.",
3185
+ "fieldName": "loading"
3186
+ },
3187
+ {
3188
+ "name": "href",
3189
+ "type": {
3190
+ "text": "string | undefined"
3191
+ },
3192
+ "description": "Renders a link styled as a button.",
3193
+ "fieldName": "href"
3194
+ },
3195
+ {
3196
+ "name": "target",
2827
3197
  "type": {
2828
3198
  "text": "string | undefined"
2829
3199
  },
2830
3200
  "description": "Link target when `href` is set. `_blank` adds `rel=\"noopener noreferrer\"`.",
2831
3201
  "fieldName": "target"
3202
+ },
3203
+ {
3204
+ "name": "icon-only",
3205
+ "type": {
3206
+ "text": "boolean"
3207
+ },
3208
+ "default": "false",
3209
+ "description": "Square button that shows only its icon (from `icon` or the `icon` slot). Give it a `label`.",
3210
+ "fieldName": "iconOnly"
3211
+ },
3212
+ {
3213
+ "name": "icon",
3214
+ "type": {
3215
+ "text": "string"
3216
+ },
3217
+ "default": "''",
3218
+ "description": "Name of a",
3219
+ "fieldName": "icon"
3220
+ },
3221
+ {
3222
+ "name": "label",
3223
+ "type": {
3224
+ "text": "string"
3225
+ },
3226
+ "default": "''",
3227
+ "description": "Accessible name of an `icon-only` button (\"Notifications\", \"Refresh\"). Required with `icon-only`; ignored otherwise, so the visible text stays the name.",
3228
+ "fieldName": "label"
3229
+ },
3230
+ {
3231
+ "name": "count",
3232
+ "type": {
3233
+ "text": "number"
3234
+ },
3235
+ "default": "0",
3236
+ "description": "Small counter on the button, e.g. unread notifications. Hidden at 0; over 99 shows \"99+\". Screen readers hear the exact number (\"Notifications, 3 unread\").",
3237
+ "fieldName": "count"
3238
+ },
3239
+ {
3240
+ "name": "strings",
3241
+ "type": {
3242
+ "text": "Record<string, Message> | null | undefined"
3243
+ },
3244
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
3245
+ "fieldName": "strings",
3246
+ "inheritedFrom": {
3247
+ "name": "CmLocalizedElement",
3248
+ "module": "src/localize.ts"
3249
+ }
2832
3250
  }
2833
3251
  ],
2834
3252
  "superclass": {
2835
- "name": "LitElement",
2836
- "package": "lit"
3253
+ "name": "CmLocalizedElement",
3254
+ "module": "/src/localize.js"
2837
3255
  },
2838
3256
  "tagName": "cm-button",
2839
3257
  "customElement": true
@@ -3680,6 +4098,14 @@
3680
4098
  "privacy": "private",
3681
4099
  "default": "new MutationObserver(() => this.#readChildren())"
3682
4100
  },
4101
+ {
4102
+ "kind": "field",
4103
+ "name": "#stopOutside",
4104
+ "privacy": "private",
4105
+ "type": {
4106
+ "text": "() => void | undefined"
4107
+ }
4108
+ },
3683
4109
  {
3684
4110
  "kind": "field",
3685
4111
  "name": "form",
@@ -3886,11 +4312,6 @@
3886
4312
  "name": "#onBlur",
3887
4313
  "privacy": "private"
3888
4314
  },
3889
- {
3890
- "kind": "field",
3891
- "name": "#onOutside",
3892
- "privacy": "private"
3893
- },
3894
4315
  {
3895
4316
  "kind": "method",
3896
4317
  "name": "#highlight",
@@ -8852,55 +9273,559 @@
8852
9273
  },
8853
9274
  {
8854
9275
  "kind": "javascript-module",
8855
- "path": "src/components/grid.ts",
9276
+ "path": "src/components/global-search.ts",
8856
9277
  "declarations": [
8857
9278
  {
8858
9279
  "kind": "class",
8859
- "description": "Equal-width columns, for tiles, cards and short fields side by side. Collapses to one column when the grid\nitself is 640px wide or less (a container query), so it also works inside a narrow side column.",
8860
- "name": "CmGrid",
8861
- "slots": [
9280
+ "description": "One box that searches everything (customers, orders, products…) and lists the matches grouped by kind, each a\nlink to its page. Your app does the searching: listen for `cm-search`, fetch, then set `results` (and `loading`\nwhile it runs). Put it in the header bar's `search` slot: on narrow screens the bar shows a search button that\nopens it full screen.\n\nUnlike `cm-combobox`, which picks a value for a form, choosing a result navigates.\nFollows the WAI-ARIA combobox pattern with a grouped listbox: focus stays in the text box and the highlighted\nresult is announced with `aria-activedescendant`.",
9281
+ "name": "CmGlobalSearch",
9282
+ "cssProperties": [
8862
9283
  {
8863
- "description": "The grid items, in reading order.",
8864
- "name": ""
9284
+ "description": "`position` of the results panel. Default `absolute` (over the page); the header bar's full-screen layer sets `static`.",
9285
+ "name": "--cm-global-search-results-position"
9286
+ },
9287
+ {
9288
+ "description": "Tallest the results panel gets before it scrolls. Default `min(480px, 100dvh - 140px)`.",
9289
+ "name": "--cm-global-search-results-max-height"
9290
+ },
9291
+ {
9292
+ "description": "Shadow of the results panel. Default `var(--cm-shadow-100)`.",
9293
+ "name": "--cm-global-search-results-shadow"
9294
+ }
9295
+ ],
9296
+ "cssParts": [
9297
+ {
9298
+ "description": "The bordered box around the icon and the text input.",
9299
+ "name": "box"
9300
+ },
9301
+ {
9302
+ "description": "The text input.",
9303
+ "name": "input"
9304
+ },
9305
+ {
9306
+ "description": "The panel under the box that holds the results.",
9307
+ "name": "popover"
9308
+ },
9309
+ {
9310
+ "description": "The grouped list of results.",
9311
+ "name": "listbox"
8865
9312
  }
8866
9313
  ],
8867
9314
  "members": [
8868
9315
  {
8869
9316
  "kind": "field",
8870
- "name": "columns",
8871
- "privacy": "public",
9317
+ "name": "shadowRootOptions",
8872
9318
  "type": {
8873
- "text": "number"
9319
+ "text": "object"
8874
9320
  },
8875
- "default": "2",
8876
- "description": "Number of columns. Default 2. Ignored when `min-column-width` is set.",
8877
- "attribute": "columns",
8878
- "reflects": true
9321
+ "static": true,
9322
+ "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true }"
8879
9323
  },
8880
9324
  {
8881
9325
  "kind": "field",
8882
- "name": "minColumnWidth",
9326
+ "name": "label",
8883
9327
  "privacy": "public",
8884
9328
  "type": {
8885
- "text": "string | undefined"
9329
+ "text": "string"
8886
9330
  },
8887
- "description": "Fit as many columns as there is room for, each at least this wide (a CSS length such as `240px` or `15rem`).\nNever wider than the grid, so it reaches one column on its own on narrow screens.",
8888
- "attribute": "min-column-width",
8889
- "reflects": true
9331
+ "description": "Accessible name of the box, read by screen readers but not shown. Default: the built-in string `label` (\"Search\").",
9332
+ "attribute": "label"
8890
9333
  },
8891
9334
  {
8892
9335
  "kind": "field",
8893
- "name": "gap",
9336
+ "name": "placeholder",
8894
9337
  "privacy": "public",
8895
9338
  "type": {
8896
- "text": "SpaceStep"
9339
+ "text": "string"
8897
9340
  },
8898
- "default": "'20'",
8899
- "description": "Space between items: a spacing step (`0`, `10`, `12`, `15`, `20`, `22`, `30`). Default `20`.",
8900
- "attribute": "gap",
8901
- "reflects": true
8902
- }
8903
- ],
9341
+ "description": "Example query in the empty box: \"Search leads, deals, contacts\". Default: the built-in string `placeholder` (\"Search\").",
9342
+ "attribute": "placeholder"
9343
+ },
9344
+ {
9345
+ "kind": "field",
9346
+ "name": "value",
9347
+ "privacy": "public",
9348
+ "type": {
9349
+ "text": "string"
9350
+ },
9351
+ "default": "''",
9352
+ "description": "The query. Updated as the merchant types.",
9353
+ "attribute": "value"
9354
+ },
9355
+ {
9356
+ "kind": "field",
9357
+ "name": "results",
9358
+ "privacy": "public",
9359
+ "type": {
9360
+ "text": "GlobalSearchGroup[]"
9361
+ },
9362
+ "default": "[]",
9363
+ "description": "Results for the current query, grouped by kind. Set it when your search returns. Groups with no items are skipped.",
9364
+ "attribute": "results"
9365
+ },
9366
+ {
9367
+ "kind": "field",
9368
+ "name": "loading",
9369
+ "privacy": "public",
9370
+ "type": {
9371
+ "text": "boolean"
9372
+ },
9373
+ "default": "false",
9374
+ "description": "Shows \"Loading\" with a spinner in place of the results while you fetch them.",
9375
+ "attribute": "loading",
9376
+ "reflects": true
9377
+ },
9378
+ {
9379
+ "kind": "field",
9380
+ "name": "open",
9381
+ "privacy": "public",
9382
+ "type": {
9383
+ "text": "boolean"
9384
+ },
9385
+ "default": "false",
9386
+ "description": "Whether the results panel is showing. It shows only while there is a query.",
9387
+ "attribute": "open",
9388
+ "reflects": true
9389
+ },
9390
+ {
9391
+ "kind": "field",
9392
+ "name": "emptyText",
9393
+ "privacy": "public",
9394
+ "type": {
9395
+ "text": "string"
9396
+ },
9397
+ "description": "Shown when a query has no results. Default: the built-in string `noResults` (\"No results\").",
9398
+ "attribute": "empty-text"
9399
+ },
9400
+ {
9401
+ "kind": "field",
9402
+ "name": "loadingText",
9403
+ "privacy": "public",
9404
+ "type": {
9405
+ "text": "string"
9406
+ },
9407
+ "description": "Shown and announced while `loading`. Default: the built-in string `loading` (\"Loading\", shared with other components).",
9408
+ "attribute": "loading-text"
9409
+ },
9410
+ {
9411
+ "kind": "field",
9412
+ "name": "seeAllLabel",
9413
+ "privacy": "public",
9414
+ "type": {
9415
+ "text": "string"
9416
+ },
9417
+ "description": "Text of each group's \"See all\" row. Default: the built-in string `seeAll` (\"See all\").",
9418
+ "attribute": "see-all-label"
9419
+ },
9420
+ {
9421
+ "kind": "field",
9422
+ "name": "shortcut",
9423
+ "privacy": "public",
9424
+ "type": {
9425
+ "text": "string"
9426
+ },
9427
+ "default": "''",
9428
+ "description": "A key that moves focus to the box from anywhere on the page, e.g. `/`. Off by default: turn it on only for\none search per page. It is ignored while the merchant is typing in a field or holding Ctrl, Alt or Cmd.",
9429
+ "attribute": "shortcut"
9430
+ },
9431
+ {
9432
+ "kind": "field",
9433
+ "name": "_active",
9434
+ "privacy": "public",
9435
+ "type": {
9436
+ "text": "number"
9437
+ },
9438
+ "default": "-1",
9439
+ "attribute": "_active"
9440
+ },
9441
+ {
9442
+ "kind": "field",
9443
+ "name": "#id",
9444
+ "privacy": "private"
9445
+ },
9446
+ {
9447
+ "kind": "field",
9448
+ "name": "#stopOutside",
9449
+ "privacy": "private",
9450
+ "type": {
9451
+ "text": "() => void | undefined"
9452
+ }
9453
+ },
9454
+ {
9455
+ "kind": "method",
9456
+ "name": "#rows",
9457
+ "privacy": "private",
9458
+ "return": {
9459
+ "type": {
9460
+ "text": "Row[]"
9461
+ }
9462
+ },
9463
+ "description": "Results flattened in reading order: each group's items, then its \"See all\" row."
9464
+ },
9465
+ {
9466
+ "kind": "field",
9467
+ "name": "#showing",
9468
+ "privacy": "private",
9469
+ "readonly": true
9470
+ },
9471
+ {
9472
+ "kind": "method",
9473
+ "name": "#hide",
9474
+ "privacy": "private"
9475
+ },
9476
+ {
9477
+ "kind": "method",
9478
+ "name": "#search",
9479
+ "privacy": "private"
9480
+ },
9481
+ {
9482
+ "kind": "field",
9483
+ "name": "#onInput",
9484
+ "privacy": "private"
9485
+ },
9486
+ {
9487
+ "kind": "method",
9488
+ "name": "#move",
9489
+ "privacy": "private",
9490
+ "parameters": [
9491
+ {
9492
+ "name": "step",
9493
+ "type": {
9494
+ "text": "number"
9495
+ }
9496
+ }
9497
+ ]
9498
+ },
9499
+ {
9500
+ "kind": "field",
9501
+ "name": "#onKeyDown",
9502
+ "privacy": "private"
9503
+ },
9504
+ {
9505
+ "kind": "field",
9506
+ "name": "#onShortcut",
9507
+ "privacy": "private"
9508
+ },
9509
+ {
9510
+ "kind": "method",
9511
+ "name": "#clear",
9512
+ "privacy": "private",
9513
+ "parameters": [
9514
+ {
9515
+ "name": "focus",
9516
+ "default": "true"
9517
+ }
9518
+ ]
9519
+ },
9520
+ {
9521
+ "kind": "method",
9522
+ "name": "#choose",
9523
+ "privacy": "private",
9524
+ "parameters": [
9525
+ {
9526
+ "name": "e",
9527
+ "type": {
9528
+ "text": "MouseEvent"
9529
+ }
9530
+ },
9531
+ {
9532
+ "name": "row",
9533
+ "type": {
9534
+ "text": "Row"
9535
+ }
9536
+ }
9537
+ ]
9538
+ },
9539
+ {
9540
+ "kind": "method",
9541
+ "name": "finalize",
9542
+ "static": true,
9543
+ "description": "A property declared with `string: 'key'` (e.g. `saveLabel: { attribute: 'save-label', string: 'save' }`) reads\nas that built-in string until it is set, so `el.saveLabel` is \"Save\" in English and the translation elsewhere.\nSetting it overrides the string for this element; setting `undefined` goes back to the built-in one.",
9544
+ "inheritedFrom": {
9545
+ "name": "CmLocalizedElement",
9546
+ "module": "src/localize.ts"
9547
+ }
9548
+ },
9549
+ {
9550
+ "kind": "field",
9551
+ "name": "strings",
9552
+ "privacy": "public",
9553
+ "type": {
9554
+ "text": "Record<string, Message> | null | undefined"
9555
+ },
9556
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
9557
+ "attribute": "strings",
9558
+ "inheritedFrom": {
9559
+ "name": "CmLocalizedElement",
9560
+ "module": "src/localize.ts"
9561
+ }
9562
+ },
9563
+ {
9564
+ "kind": "field",
9565
+ "name": "stringsNamespace",
9566
+ "privacy": "protected",
9567
+ "description": "The string namespace: the tag name without `cm-`, in camelCase.",
9568
+ "readonly": true,
9569
+ "inheritedFrom": {
9570
+ "name": "CmLocalizedElement",
9571
+ "module": "src/localize.ts"
9572
+ }
9573
+ },
9574
+ {
9575
+ "kind": "method",
9576
+ "name": "t",
9577
+ "privacy": "protected",
9578
+ "parameters": [
9579
+ {
9580
+ "name": "key",
9581
+ "type": {
9582
+ "text": "string"
9583
+ }
9584
+ },
9585
+ {
9586
+ "name": "vars",
9587
+ "optional": true,
9588
+ "type": {
9589
+ "text": "MessageVars"
9590
+ }
9591
+ }
9592
+ ],
9593
+ "description": "The component's text for `key`, in its language, with `{placeholders}` filled from `vars`.",
9594
+ "inheritedFrom": {
9595
+ "name": "CmLocalizedElement",
9596
+ "module": "src/localize.ts"
9597
+ }
9598
+ },
9599
+ {
9600
+ "kind": "field",
9601
+ "name": "locale",
9602
+ "privacy": "protected",
9603
+ "description": "The locale used for numbers, dates and plurals.",
9604
+ "readonly": true,
9605
+ "inheritedFrom": {
9606
+ "name": "CmLocalizedElement",
9607
+ "module": "src/localize.ts"
9608
+ }
9609
+ },
9610
+ {
9611
+ "kind": "method",
9612
+ "name": "formatNumber",
9613
+ "privacy": "protected",
9614
+ "parameters": [
9615
+ {
9616
+ "name": "n",
9617
+ "type": {
9618
+ "text": "number"
9619
+ }
9620
+ },
9621
+ {
9622
+ "name": "options",
9623
+ "optional": true,
9624
+ "type": {
9625
+ "text": "Intl.NumberFormatOptions"
9626
+ }
9627
+ }
9628
+ ],
9629
+ "description": "A number formatted for the component's locale.",
9630
+ "inheritedFrom": {
9631
+ "name": "CmLocalizedElement",
9632
+ "module": "src/localize.ts"
9633
+ }
9634
+ }
9635
+ ],
9636
+ "events": [
9637
+ {
9638
+ "name": "cm-search",
9639
+ "type": {
9640
+ "text": "CustomEvent"
9641
+ },
9642
+ "description": "As the merchant types (and when the box is cleared), with `detail: { query }`. Fetch results and set `results`."
9643
+ },
9644
+ {
9645
+ "name": "cm-select",
9646
+ "type": {
9647
+ "text": "CustomEvent"
9648
+ },
9649
+ "description": "When a result or a \"See all\" row is chosen, with `detail: { href, item, group }` (`item` is undefined for \"See all\"). Cancelable: `preventDefault()` stops the link, to route in your app."
9650
+ }
9651
+ ],
9652
+ "attributes": [
9653
+ {
9654
+ "name": "label",
9655
+ "type": {
9656
+ "text": "string"
9657
+ },
9658
+ "description": "Accessible name of the box, read by screen readers but not shown. Default: the built-in string `label` (\"Search\").",
9659
+ "fieldName": "label"
9660
+ },
9661
+ {
9662
+ "name": "placeholder",
9663
+ "type": {
9664
+ "text": "string"
9665
+ },
9666
+ "description": "Example query in the empty box: \"Search leads, deals, contacts\". Default: the built-in string `placeholder` (\"Search\").",
9667
+ "fieldName": "placeholder"
9668
+ },
9669
+ {
9670
+ "name": "value",
9671
+ "type": {
9672
+ "text": "string"
9673
+ },
9674
+ "default": "''",
9675
+ "description": "The query. Updated as the merchant types.",
9676
+ "fieldName": "value"
9677
+ },
9678
+ {
9679
+ "name": "results",
9680
+ "type": {
9681
+ "text": "GlobalSearchGroup[]"
9682
+ },
9683
+ "default": "[]",
9684
+ "description": "Results for the current query, grouped by kind. Set it when your search returns. Groups with no items are skipped.",
9685
+ "fieldName": "results"
9686
+ },
9687
+ {
9688
+ "name": "loading",
9689
+ "type": {
9690
+ "text": "boolean"
9691
+ },
9692
+ "default": "false",
9693
+ "description": "Shows \"Loading\" with a spinner in place of the results while you fetch them.",
9694
+ "fieldName": "loading"
9695
+ },
9696
+ {
9697
+ "name": "open",
9698
+ "type": {
9699
+ "text": "boolean"
9700
+ },
9701
+ "default": "false",
9702
+ "description": "Whether the results panel is showing. It shows only while there is a query.",
9703
+ "fieldName": "open"
9704
+ },
9705
+ {
9706
+ "name": "empty-text",
9707
+ "type": {
9708
+ "text": "string"
9709
+ },
9710
+ "description": "Shown when a query has no results. Default: the built-in string `noResults` (\"No results\").",
9711
+ "fieldName": "emptyText"
9712
+ },
9713
+ {
9714
+ "name": "loading-text",
9715
+ "type": {
9716
+ "text": "string"
9717
+ },
9718
+ "description": "Shown and announced while `loading`. Default: the built-in string `loading` (\"Loading\", shared with other components).",
9719
+ "fieldName": "loadingText"
9720
+ },
9721
+ {
9722
+ "name": "see-all-label",
9723
+ "type": {
9724
+ "text": "string"
9725
+ },
9726
+ "description": "Text of each group's \"See all\" row. Default: the built-in string `seeAll` (\"See all\").",
9727
+ "fieldName": "seeAllLabel"
9728
+ },
9729
+ {
9730
+ "name": "shortcut",
9731
+ "type": {
9732
+ "text": "string"
9733
+ },
9734
+ "default": "''",
9735
+ "description": "A key that moves focus to the box from anywhere on the page, e.g. `/`. Off by default: turn it on only for\none search per page. It is ignored while the merchant is typing in a field or holding Ctrl, Alt or Cmd.",
9736
+ "fieldName": "shortcut"
9737
+ },
9738
+ {
9739
+ "name": "_active",
9740
+ "type": {
9741
+ "text": "number"
9742
+ },
9743
+ "default": "-1",
9744
+ "fieldName": "_active"
9745
+ },
9746
+ {
9747
+ "name": "strings",
9748
+ "type": {
9749
+ "text": "Record<string, Message> | null | undefined"
9750
+ },
9751
+ "description": "Replaces this component's built-in text (labels, accessible names, messages), key by key. In HTML pass JSON:\n`strings='{\"close\":\"Fermer\"}'`. Keys and English defaults are listed under \"Built-in text\" on the component's\npage; set text for every component at once with `configure()` or `setStrings()` (see Localisation).",
9752
+ "fieldName": "strings",
9753
+ "inheritedFrom": {
9754
+ "name": "CmLocalizedElement",
9755
+ "module": "src/localize.ts"
9756
+ }
9757
+ }
9758
+ ],
9759
+ "superclass": {
9760
+ "name": "CmLocalizedElement",
9761
+ "module": "/src/localize.js"
9762
+ },
9763
+ "tagName": "cm-global-search",
9764
+ "customElement": true
9765
+ }
9766
+ ],
9767
+ "exports": [
9768
+ {
9769
+ "kind": "js",
9770
+ "name": "CmGlobalSearch",
9771
+ "declaration": {
9772
+ "name": "CmGlobalSearch",
9773
+ "module": "src/components/global-search.ts"
9774
+ }
9775
+ }
9776
+ ]
9777
+ },
9778
+ {
9779
+ "kind": "javascript-module",
9780
+ "path": "src/components/grid.ts",
9781
+ "declarations": [
9782
+ {
9783
+ "kind": "class",
9784
+ "description": "Equal-width columns, for tiles, cards and short fields side by side. Collapses to one column when the grid\nitself is 640px wide or less (a container query), so it also works inside a narrow side column.",
9785
+ "name": "CmGrid",
9786
+ "slots": [
9787
+ {
9788
+ "description": "The grid items, in reading order.",
9789
+ "name": ""
9790
+ }
9791
+ ],
9792
+ "members": [
9793
+ {
9794
+ "kind": "field",
9795
+ "name": "columns",
9796
+ "privacy": "public",
9797
+ "type": {
9798
+ "text": "number"
9799
+ },
9800
+ "default": "2",
9801
+ "description": "Number of columns. Default 2. Ignored when `min-column-width` is set.",
9802
+ "attribute": "columns",
9803
+ "reflects": true
9804
+ },
9805
+ {
9806
+ "kind": "field",
9807
+ "name": "minColumnWidth",
9808
+ "privacy": "public",
9809
+ "type": {
9810
+ "text": "string | undefined"
9811
+ },
9812
+ "description": "Fit as many columns as there is room for, each at least this wide (a CSS length such as `240px` or `15rem`).\nNever wider than the grid, so it reaches one column on its own on narrow screens.",
9813
+ "attribute": "min-column-width",
9814
+ "reflects": true
9815
+ },
9816
+ {
9817
+ "kind": "field",
9818
+ "name": "gap",
9819
+ "privacy": "public",
9820
+ "type": {
9821
+ "text": "SpaceStep"
9822
+ },
9823
+ "default": "'20'",
9824
+ "description": "Space between items: a spacing step (`0`, `10`, `12`, `15`, `20`, `22`, `30`). Default `20`.",
9825
+ "attribute": "gap",
9826
+ "reflects": true
9827
+ }
9828
+ ],
8904
9829
  "attributes": [
8905
9830
  {
8906
9831
  "name": "columns",
@@ -8954,8 +9879,18 @@
8954
9879
  "declarations": [
8955
9880
  {
8956
9881
  "kind": "class",
8957
- "description": "The white bar across the top of the admin: logo, store switcher, then account actions, the wallet\nbalance and the signed-in user on the right. For Commmerce products only, not for apps.\n\nThe bar adapts to its own width: under 900px the actions hide; under 640px the balance hides too and the user pill shrinks to the avatar; put those\ndestinations in the Mobile menu instead.",
9882
+ "description": "The white bar across the top of the admin: logo, store switcher, then account actions, the wallet\nbalance and the signed-in user on the right. For Commmerce products only, not for apps.\n\nThe bar adapts to its own width: under 900px the actions hide; under 640px the balance hides too and the user pill shrinks to the avatar; put those\ndestinations in the Mobile menu instead.\n\nGlobal search goes in the `search` slot (usually a `cm-global-search`): inline after the store switcher while the bar is wider\nthan 900px; at 900px or narrower the bar shows a search button instead, which opens the search full screen.",
8958
9883
  "name": "CmHeaderBar",
9884
+ "cssParts": [
9885
+ {
9886
+ "description": "The search button shown on narrow bars.",
9887
+ "name": "search-button"
9888
+ },
9889
+ {
9890
+ "description": "The full-screen search layer (a modal `<dialog>`).",
9891
+ "name": "search-layer"
9892
+ }
9893
+ ],
8959
9894
  "slots": [
8960
9895
  {
8961
9896
  "description": "The product logo (an `<img>` or `<svg>`), linked to the dashboard if you wrap it in `<a>`.",
@@ -8968,6 +9903,10 @@
8968
9903
  {
8969
9904
  "description": "Anything after the user pill, e.g. a notifications button.",
8970
9905
  "name": "end"
9906
+ },
9907
+ {
9908
+ "description": "One search box for the whole product, usually `cm-global-search`. Inline on wide bars; behind a search button that opens a full-screen layer at 900px or narrower.",
9909
+ "name": "search"
8971
9910
  }
8972
9911
  ],
8973
9912
  "members": [
@@ -9025,6 +9964,101 @@
9025
9964
  "description": "Accessible name of the header's toolbar region. Default: the built-in string `label` (\"Admin\").",
9026
9965
  "attribute": "label"
9027
9966
  },
9967
+ {
9968
+ "kind": "field",
9969
+ "name": "searchLabel",
9970
+ "privacy": "public",
9971
+ "type": {
9972
+ "text": "string"
9973
+ },
9974
+ "description": "Accessible name of the search button on narrow bars and of the search layer. Default: the built-in string `search` (\"Search\").",
9975
+ "attribute": "search-label"
9976
+ },
9977
+ {
9978
+ "kind": "field",
9979
+ "name": "_narrow",
9980
+ "privacy": "public",
9981
+ "type": {
9982
+ "text": "boolean"
9983
+ },
9984
+ "default": "false",
9985
+ "attribute": "_narrow"
9986
+ },
9987
+ {
9988
+ "kind": "field",
9989
+ "name": "_hasSearch",
9990
+ "privacy": "public",
9991
+ "type": {
9992
+ "text": "boolean"
9993
+ },
9994
+ "default": "false",
9995
+ "attribute": "_hasSearch"
9996
+ },
9997
+ {
9998
+ "kind": "field",
9999
+ "name": "_searchOpen",
10000
+ "privacy": "public",
10001
+ "type": {
10002
+ "text": "boolean"
10003
+ },
10004
+ "default": "false",
10005
+ "attribute": "_searchOpen"
10006
+ },
10007
+ {
10008
+ "kind": "field",
10009
+ "name": "#resize",
10010
+ "privacy": "private",
10011
+ "type": {
10012
+ "text": "ResizeObserver | undefined"
10013
+ }
10014
+ },
10015
+ {
10016
+ "kind": "field",
10017
+ "name": "#locked",
10018
+ "privacy": "private",
10019
+ "type": {
10020
+ "text": "boolean"
10021
+ },
10022
+ "default": "false"
10023
+ },
10024
+ {
10025
+ "kind": "field",
10026
+ "name": "#opener",
10027
+ "privacy": "private",
10028
+ "type": {
10029
+ "text": "HTMLElement | null"
10030
+ },
10031
+ "default": "null"
10032
+ },
10033
+ {
10034
+ "kind": "field",
10035
+ "name": "searchOpen",
10036
+ "type": {
10037
+ "text": "boolean"
10038
+ },
10039
+ "description": "True while the full-screen search layer is open.",
10040
+ "readonly": true
10041
+ },
10042
+ {
10043
+ "kind": "method",
10044
+ "name": "openSearch",
10045
+ "description": "Brings up the search: focuses it on wide bars, or opens the full-screen layer on narrow ones."
10046
+ },
10047
+ {
10048
+ "kind": "method",
10049
+ "name": "closeSearch",
10050
+ "description": "Closes the full-screen search layer, and returns focus to the search button."
10051
+ },
10052
+ {
10053
+ "kind": "method",
10054
+ "name": "#searchEl",
10055
+ "privacy": "private"
10056
+ },
10057
+ {
10058
+ "kind": "method",
10059
+ "name": "#onSearchSlot",
10060
+ "privacy": "private"
10061
+ },
9028
10062
  {
9029
10063
  "kind": "method",
9030
10064
  "name": "#fire",
@@ -9035,6 +10069,13 @@
9035
10069
  "type": {
9036
10070
  "text": "string"
9037
10071
  }
10072
+ },
10073
+ {
10074
+ "name": "detail",
10075
+ "optional": true,
10076
+ "type": {
10077
+ "text": "unknown"
10078
+ }
9038
10079
  }
9039
10080
  ]
9040
10081
  },
@@ -9153,6 +10194,10 @@
9153
10194
  {
9154
10195
  "description": "When the user pill is pressed. Open the account menu in response.",
9155
10196
  "name": "cm-account"
10197
+ },
10198
+ {
10199
+ "description": "When the full-screen search layer opens or closes (narrow bars), with `detail: { open }`.",
10200
+ "name": "cm-search-toggle"
9156
10201
  }
9157
10202
  ],
9158
10203
  "attributes": [
@@ -9200,6 +10245,38 @@
9200
10245
  "description": "Accessible name of the header's toolbar region. Default: the built-in string `label` (\"Admin\").",
9201
10246
  "fieldName": "label"
9202
10247
  },
10248
+ {
10249
+ "name": "search-label",
10250
+ "type": {
10251
+ "text": "string"
10252
+ },
10253
+ "description": "Accessible name of the search button on narrow bars and of the search layer. Default: the built-in string `search` (\"Search\").",
10254
+ "fieldName": "searchLabel"
10255
+ },
10256
+ {
10257
+ "name": "_narrow",
10258
+ "type": {
10259
+ "text": "boolean"
10260
+ },
10261
+ "default": "false",
10262
+ "fieldName": "_narrow"
10263
+ },
10264
+ {
10265
+ "name": "_hasSearch",
10266
+ "type": {
10267
+ "text": "boolean"
10268
+ },
10269
+ "default": "false",
10270
+ "fieldName": "_hasSearch"
10271
+ },
10272
+ {
10273
+ "name": "_searchOpen",
10274
+ "type": {
10275
+ "text": "boolean"
10276
+ },
10277
+ "default": "false",
10278
+ "fieldName": "_searchOpen"
10279
+ },
9203
10280
  {
9204
10281
  "name": "strings",
9205
10282
  "type": {
@@ -9242,7 +10319,7 @@
9242
10319
  "type": {
9243
10320
  "text": "readonly string[]"
9244
10321
  },
9245
- "default": "['chevron-left', 'chevron-right', 'arrow-left', 'arrow-up-right', 'send']",
10322
+ "default": "['chevron-left', 'chevron-right', 'arrow-left', 'arrow-up-right', 'send', 'log-out']",
9246
10323
  "description": "Icons that point along the reading direction (back, forward, go). In right-to-left text they are mirrored."
9247
10324
  },
9248
10325
  {
@@ -12156,6 +13233,30 @@
12156
13233
  "description": "Identifies it in `cm-select`.",
12157
13234
  "attribute": "value",
12158
13235
  "reflects": true
13236
+ },
13237
+ {
13238
+ "kind": "field",
13239
+ "name": "description",
13240
+ "privacy": "public",
13241
+ "type": {
13242
+ "text": "string"
13243
+ },
13244
+ "default": "''",
13245
+ "description": "A second line under the label, in smaller grey text: \"Follow-up due at 4 pm\".",
13246
+ "attribute": "description",
13247
+ "reflects": true
13248
+ },
13249
+ {
13250
+ "kind": "field",
13251
+ "name": "icon",
13252
+ "privacy": "public",
13253
+ "type": {
13254
+ "text": "string"
13255
+ },
13256
+ "default": "''",
13257
+ "description": "Icon name from `@commmerce/icons` for the kind (\"user\", \"clock\"), shown in the tone's colours instead of the tone's icon.",
13258
+ "attribute": "icon",
13259
+ "reflects": true
12159
13260
  }
12160
13261
  ],
12161
13262
  "attributes": [
@@ -12203,6 +13304,24 @@
12203
13304
  "default": "''",
12204
13305
  "description": "Identifies it in `cm-select`.",
12205
13306
  "fieldName": "value"
13307
+ },
13308
+ {
13309
+ "name": "description",
13310
+ "type": {
13311
+ "text": "string"
13312
+ },
13313
+ "default": "''",
13314
+ "description": "A second line under the label, in smaller grey text: \"Follow-up due at 4 pm\".",
13315
+ "fieldName": "description"
13316
+ },
13317
+ {
13318
+ "name": "icon",
13319
+ "type": {
13320
+ "text": "string"
13321
+ },
13322
+ "default": "''",
13323
+ "description": "Icon name from `@commmerce/icons` for the kind (\"user\", \"clock\"), shown in the tone's colours instead of the tone's icon.",
13324
+ "fieldName": "icon"
12206
13325
  }
12207
13326
  ],
12208
13327
  "superclass": {
@@ -12220,6 +13339,10 @@
12220
13339
  {
12221
13340
  "description": "`cm-notification-item`s.",
12222
13341
  "name": ""
13342
+ },
13343
+ {
13344
+ "description": "A control under the list, such as a toggle for push notifications on this device.",
13345
+ "name": "footer"
12223
13346
  }
12224
13347
  ],
12225
13348
  "members": [
@@ -12279,6 +13402,39 @@
12279
13402
  "description": "Shown when there are no notifications. Default: the built-in string `empty` (\"No notifications yet.\").",
12280
13403
  "attribute": "empty-text"
12281
13404
  },
13405
+ {
13406
+ "kind": "field",
13407
+ "name": "markAllRead",
13408
+ "privacy": "public",
13409
+ "type": {
13410
+ "text": "boolean"
13411
+ },
13412
+ "default": "false",
13413
+ "description": "Shows a \"Mark all read\" button in the header while at least one notification is unread. Pressing it fires `cm-mark-all-read`.",
13414
+ "attribute": "mark-all-read"
13415
+ },
13416
+ {
13417
+ "kind": "field",
13418
+ "name": "markAllLabel",
13419
+ "privacy": "public",
13420
+ "type": {
13421
+ "text": "string"
13422
+ },
13423
+ "description": "Text of that button. Default: the built-in string `markAllRead` (\"Mark all read\").",
13424
+ "attribute": "mark-all-label"
13425
+ },
13426
+ {
13427
+ "kind": "field",
13428
+ "name": "loading",
13429
+ "privacy": "public",
13430
+ "type": {
13431
+ "text": "boolean"
13432
+ },
13433
+ "default": "false",
13434
+ "description": "Shows placeholder rows while you fetch the notifications, and announces \"Loading\" politely.",
13435
+ "attribute": "loading",
13436
+ "reflects": true
13437
+ },
12282
13438
  {
12283
13439
  "kind": "field",
12284
13440
  "name": "_slotted",
@@ -12289,6 +13445,16 @@
12289
13445
  "default": "[]",
12290
13446
  "attribute": "_slotted"
12291
13447
  },
13448
+ {
13449
+ "kind": "field",
13450
+ "name": "_footer",
13451
+ "privacy": "public",
13452
+ "type": {
13453
+ "text": "boolean"
13454
+ },
13455
+ "default": "false",
13456
+ "attribute": "_footer"
13457
+ },
12292
13458
  {
12293
13459
  "kind": "field",
12294
13460
  "name": "#observer",
@@ -12343,6 +13509,32 @@
12343
13509
  }
12344
13510
  ]
12345
13511
  },
13512
+ {
13513
+ "kind": "method",
13514
+ "name": "#markAll",
13515
+ "privacy": "private",
13516
+ "parameters": [
13517
+ {
13518
+ "name": "e",
13519
+ "type": {
13520
+ "text": "Event"
13521
+ }
13522
+ }
13523
+ ]
13524
+ },
13525
+ {
13526
+ "kind": "method",
13527
+ "name": "#onFooter",
13528
+ "privacy": "private",
13529
+ "parameters": [
13530
+ {
13531
+ "name": "e",
13532
+ "type": {
13533
+ "text": "Event"
13534
+ }
13535
+ }
13536
+ ]
13537
+ },
12346
13538
  {
12347
13539
  "kind": "field",
12348
13540
  "name": "open",
@@ -12723,6 +13915,13 @@
12723
13915
  },
12724
13916
  "description": "When a notification is chosen. `detail: { value, item }`. Cancelable: `preventDefault()` stops a link, to route in your app."
12725
13917
  },
13918
+ {
13919
+ "name": "cm-mark-all-read",
13920
+ "type": {
13921
+ "text": "CustomEvent"
13922
+ },
13923
+ "description": "When \"Mark all read\" is pressed (`mark-all-read`). Clear `unread` on your notifications in response; the button hides when none are unread."
13924
+ },
12726
13925
  {
12727
13926
  "name": "cm-open",
12728
13927
  "type": {
@@ -12804,6 +14003,32 @@
12804
14003
  "description": "Shown when there are no notifications. Default: the built-in string `empty` (\"No notifications yet.\").",
12805
14004
  "fieldName": "emptyText"
12806
14005
  },
14006
+ {
14007
+ "name": "mark-all-read",
14008
+ "type": {
14009
+ "text": "boolean"
14010
+ },
14011
+ "default": "false",
14012
+ "description": "Shows a \"Mark all read\" button in the header while at least one notification is unread. Pressing it fires `cm-mark-all-read`.",
14013
+ "fieldName": "markAllRead"
14014
+ },
14015
+ {
14016
+ "name": "mark-all-label",
14017
+ "type": {
14018
+ "text": "string"
14019
+ },
14020
+ "description": "Text of that button. Default: the built-in string `markAllRead` (\"Mark all read\").",
14021
+ "fieldName": "markAllLabel"
14022
+ },
14023
+ {
14024
+ "name": "loading",
14025
+ "type": {
14026
+ "text": "boolean"
14027
+ },
14028
+ "default": "false",
14029
+ "description": "Shows placeholder rows while you fetch the notifications, and announces \"Loading\" politely.",
14030
+ "fieldName": "loading"
14031
+ },
12807
14032
  {
12808
14033
  "name": "_slotted",
12809
14034
  "type": {
@@ -12812,6 +14037,14 @@
12812
14037
  "default": "[]",
12813
14038
  "fieldName": "_slotted"
12814
14039
  },
14040
+ {
14041
+ "name": "_footer",
14042
+ "type": {
14043
+ "text": "boolean"
14044
+ },
14045
+ "default": "false",
14046
+ "fieldName": "_footer"
14047
+ },
12815
14048
  {
12816
14049
  "name": "open",
12817
14050
  "type": {
@@ -17471,8 +18704,18 @@
17471
18704
  "declarations": [
17472
18705
  {
17473
18706
  "kind": "class",
17474
- "description": "The admin's main menu: a black rounded panel down the left of the page, with an icon and a label per\ndestination and sections that open to show their sub-items. For Commmerce products only, not for apps:\napps are shown inside the admin, which already has this menu.\n\nItems come from `cm-nav-item` children or the `items` property, so every Commmerce product can use it.",
18707
+ "description": "The admin's main menu: a black rounded panel down the left of the page, with an icon and a label per\ndestination and sections that open to show their sub-items. For Commmerce products only, not for apps:\napps are shown inside the admin, which already has this menu.\n\nItems come from `cm-nav-item` children or the `items` property, so every Commmerce product can use it.\n\n`collapsed` turns it into a narrow rail of icons, to give wide pages (tables, reports) more room. Each item's\nlabel is still its accessible name and shows as a tooltip on hover and focus; badges become a dot (or a small\ncount when the badge is a number). Add `collapsible` for a built-in button that switches between the two: it\nfires `cm-collapse` so the app can remember the choice.",
17475
18708
  "name": "CmSideNavigation",
18709
+ "cssProperties": [
18710
+ {
18711
+ "description": "Width of the full menu. Default `250px`.",
18712
+ "name": "--cm-side-navigation-width"
18713
+ },
18714
+ {
18715
+ "description": "Width of the icon rail (`collapsed`). Default `72px`.",
18716
+ "name": "--cm-side-navigation-collapsed-width"
18717
+ }
18718
+ ],
17476
18719
  "slots": [
17477
18720
  {
17478
18721
  "description": "`cm-nav-item` elements (nest them for sub-items).",
@@ -17509,6 +18752,30 @@
17509
18752
  "description": "Accessible name of the navigation landmark. Default: the built-in string `label` (\"Main\").",
17510
18753
  "attribute": "label"
17511
18754
  },
18755
+ {
18756
+ "kind": "field",
18757
+ "name": "collapsed",
18758
+ "privacy": "public",
18759
+ "type": {
18760
+ "text": "boolean"
18761
+ },
18762
+ "default": "false",
18763
+ "description": "Shows only the icons, in a narrow rail. Labels become tooltips and stay the items' accessible names; sub-items are hidden.",
18764
+ "attribute": "collapsed",
18765
+ "reflects": true
18766
+ },
18767
+ {
18768
+ "kind": "field",
18769
+ "name": "collapsible",
18770
+ "privacy": "public",
18771
+ "type": {
18772
+ "text": "boolean"
18773
+ },
18774
+ "default": "false",
18775
+ "description": "Adds a button at the bottom that collapses the menu to icons and expands it again, firing `cm-collapse`.",
18776
+ "attribute": "collapsible",
18777
+ "reflects": true
18778
+ },
17512
18779
  {
17513
18780
  "kind": "field",
17514
18781
  "name": "_slotted",
@@ -17657,6 +18924,81 @@
17657
18924
  }
17658
18925
  ]
17659
18926
  },
18927
+ {
18928
+ "kind": "method",
18929
+ "name": "#setCollapsed",
18930
+ "privacy": "private",
18931
+ "parameters": [
18932
+ {
18933
+ "name": "next",
18934
+ "type": {
18935
+ "text": "boolean"
18936
+ }
18937
+ }
18938
+ ],
18939
+ "description": "Collapses or expands the menu as the merchant asked, unless a `cm-collapse` handler cancels it."
18940
+ },
18941
+ {
18942
+ "kind": "method",
18943
+ "name": "#openFromRail",
18944
+ "privacy": "private",
18945
+ "parameters": [
18946
+ {
18947
+ "name": "i",
18948
+ "type": {
18949
+ "text": "number"
18950
+ }
18951
+ }
18952
+ ],
18953
+ "description": "A section chosen in the rail: expand the menu and open it."
18954
+ },
18955
+ {
18956
+ "kind": "method",
18957
+ "name": "#icon",
18958
+ "privacy": "private",
18959
+ "parameters": [
18960
+ {
18961
+ "name": "it",
18962
+ "type": {
18963
+ "text": "NavItem"
18964
+ }
18965
+ }
18966
+ ]
18967
+ },
18968
+ {
18969
+ "kind": "method",
18970
+ "name": "#text",
18971
+ "privacy": "private",
18972
+ "parameters": [
18973
+ {
18974
+ "name": "it",
18975
+ "type": {
18976
+ "text": "NavItem"
18977
+ }
18978
+ }
18979
+ ],
18980
+ "description": "Label and badge. In the rail the label is hidden visually (it stays the accessible name) and the badge is a dot or a short count."
18981
+ },
18982
+ {
18983
+ "kind": "method",
18984
+ "name": "#tip",
18985
+ "privacy": "private",
18986
+ "parameters": [
18987
+ {
18988
+ "name": "it",
18989
+ "type": {
18990
+ "text": "NavItem"
18991
+ }
18992
+ },
18993
+ {
18994
+ "name": "inner",
18995
+ "type": {
18996
+ "text": "unknown"
18997
+ }
18998
+ }
18999
+ ],
19000
+ "description": "In the rail, every item is wrapped in a tooltip that shows its label."
19001
+ },
17660
19002
  {
17661
19003
  "kind": "method",
17662
19004
  "name": "#link",
@@ -17683,6 +19025,11 @@
17683
19025
  }
17684
19026
  ]
17685
19027
  },
19028
+ {
19029
+ "kind": "method",
19030
+ "name": "#toggleButton",
19031
+ "privacy": "private"
19032
+ },
17686
19033
  {
17687
19034
  "kind": "method",
17688
19035
  "name": "finalize",
@@ -17788,6 +19135,13 @@
17788
19135
  },
17789
19136
  "description": "When a section opens or closes. `detail: { item, expanded }`."
17790
19137
  },
19138
+ {
19139
+ "name": "cm-collapse",
19140
+ "type": {
19141
+ "text": "CustomEvent"
19142
+ },
19143
+ "description": "When the merchant collapses the menu to icons or expands it again: from the built-in button (`collapsible`), or by choosing a section while collapsed (that expands the menu and opens the section). `detail: { collapsed }`. Cancelable: call `preventDefault()` to keep the current state. Not fired when you set `collapsed` yourself."
19144
+ },
17791
19145
  {
17792
19146
  "description": "When an item is chosen. `detail: { item, value, href }`. Cancelable: call `preventDefault()` to route in your app instead of following the link.",
17793
19147
  "name": "cm-navigate"
@@ -17811,6 +19165,24 @@
17811
19165
  "description": "Accessible name of the navigation landmark. Default: the built-in string `label` (\"Main\").",
17812
19166
  "fieldName": "label"
17813
19167
  },
19168
+ {
19169
+ "name": "collapsed",
19170
+ "type": {
19171
+ "text": "boolean"
19172
+ },
19173
+ "default": "false",
19174
+ "description": "Shows only the icons, in a narrow rail. Labels become tooltips and stay the items' accessible names; sub-items are hidden.",
19175
+ "fieldName": "collapsed"
19176
+ },
19177
+ {
19178
+ "name": "collapsible",
19179
+ "type": {
19180
+ "text": "boolean"
19181
+ },
19182
+ "default": "false",
19183
+ "description": "Adds a button at the bottom that collapses the menu to icons and expands it again, firing `cm-collapse`.",
19184
+ "fieldName": "collapsible"
19185
+ },
17814
19186
  {
17815
19187
  "name": "_slotted",
17816
19188
  "type": {
@@ -22150,6 +23522,17 @@
22150
23522
  "attribute": "open",
22151
23523
  "reflects": true
22152
23524
  },
23525
+ {
23526
+ "kind": "field",
23527
+ "name": "visualOnly",
23528
+ "privacy": "public",
23529
+ "type": {
23530
+ "text": "boolean"
23531
+ },
23532
+ "default": "false",
23533
+ "description": "Shows the bubble without adding its text to the control's accessible description. Use it only when the text\nrepeats the control's accessible name, such as the label of an icon-only navigation item, so screen readers\ndon't hear it twice.",
23534
+ "attribute": "visual-only"
23535
+ },
22153
23536
  {
22154
23537
  "kind": "field",
22155
23538
  "name": "_side",
@@ -22361,6 +23744,15 @@
22361
23744
  "description": "True while the tooltip is shown. Read it; use `show()` / `hide()` to change it.",
22362
23745
  "fieldName": "open"
22363
23746
  },
23747
+ {
23748
+ "name": "visual-only",
23749
+ "type": {
23750
+ "text": "boolean"
23751
+ },
23752
+ "default": "false",
23753
+ "description": "Shows the bubble without adding its text to the control's accessible description. Use it only when the text\nrepeats the control's accessible name, such as the label of an icon-only navigation item, so screen readers\ndon't hear it twice.",
23754
+ "fieldName": "visualOnly"
23755
+ },
22364
23756
  {
22365
23757
  "name": "_side",
22366
23758
  "type": {