@punica/components-mcp 0.1.0 → 0.2.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.
@@ -324,152 +324,6 @@
324
324
  }
325
325
  ]
326
326
  },
327
- {
328
- "kind": "javascript-module",
329
- "path": "src/components/alert/alert.js",
330
- "declarations": [
331
- {
332
- "kind": "class",
333
- "description": "A message about the content beside it: a result, a warning, a tip.\n\nAn error or a warning is `role=alert` and interrupts a screen reader; any\nother colour is `role=status` and waits its turn.",
334
- "name": "PunicaAlert",
335
- "cssProperties": [
336
- {
337
- "description": "Corner radius.",
338
- "name": "--punica-alert-radius"
339
- },
340
- {
341
- "description": "Padding.",
342
- "name": "--punica-alert-padding"
343
- },
344
- {
345
- "description": "Space between icon, message and actions.",
346
- "name": "--punica-alert-gap"
347
- }
348
- ],
349
- "cssParts": [
350
- {
351
- "description": "The default icon.",
352
- "name": "icon"
353
- },
354
- {
355
- "description": "The wrapper around the message.",
356
- "name": "content"
357
- },
358
- {
359
- "description": "The wrapper around the actions.",
360
- "name": "actions"
361
- },
362
- {
363
- "description": "The close button.",
364
- "name": "close"
365
- }
366
- ],
367
- "slots": [
368
- {
369
- "description": "The message.",
370
- "name": ""
371
- },
372
- {
373
- "description": "An icon in place of the one the colour gives.",
374
- "name": "icon"
375
- },
376
- {
377
- "description": "Buttons that answer the message.",
378
- "name": "actions"
379
- }
380
- ],
381
- "members": [
382
- {
383
- "kind": "field",
384
- "name": "properties",
385
- "type": {
386
- "text": "object"
387
- },
388
- "static": true,
389
- "default": "{ color: {}, variant: {}, dismissible: { type: Boolean }, labelClose: { default: 'Close' } }"
390
- },
391
- {
392
- "kind": "field",
393
- "name": "styles",
394
- "static": true,
395
- "default": "styles"
396
- },
397
- {
398
- "kind": "field",
399
- "name": "template",
400
- "static": true,
401
- "default": "` <span class=\"icon\"><slot name=\"icon\"><span class=\"default info\">${icons.info}</span><span class=\"default success\">${icons.success}</span><span class=\"default warning\">${icons.warning}</span><span class=\"default error\">${icons.error}</span></slot></span> <div part=\"content\" class=\"content\"><slot></slot></div> <div part=\"actions\" class=\"actions\"><slot name=\"actions\"></slot></div> <button part=\"close\" class=\"close\" type=\"button\" hidden>${icons.close}</button> `"
402
- },
403
- {
404
- "kind": "field",
405
- "name": "#close",
406
- "privacy": "private"
407
- },
408
- {
409
- "kind": "method",
410
- "name": "update"
411
- },
412
- {
413
- "kind": "method",
414
- "name": "dismiss",
415
- "description": "Does what the close button does: fires `punica-dismiss` and, unless a\nlistener prevents it, hides the alert."
416
- }
417
- ],
418
- "events": [
419
- {
420
- "description": "The user pressed the close button. Cancelable: unless prevented, the alert hides itself with `hidden`.",
421
- "name": "punica-dismiss"
422
- }
423
- ],
424
- "attributes": [
425
- {
426
- "type": {
427
- "text": "'info' | 'success' | 'warning' | 'error' | 'primary' | 'secondary' | 'neutral'"
428
- },
429
- "description": "What the message is, `info` by default.",
430
- "name": "color"
431
- },
432
- {
433
- "type": {
434
- "text": "'tinted' | 'outlined' | 'filled'"
435
- },
436
- "description": "Visual weight, `tinted` by default.",
437
- "name": "variant"
438
- },
439
- {
440
- "type": {
441
- "text": "boolean"
442
- },
443
- "description": "Shows a close button.",
444
- "name": "dismissible"
445
- },
446
- {
447
- "type": {
448
- "text": "string"
449
- },
450
- "description": "Accessible name of the close button, `Close` by default.",
451
- "name": "label-close"
452
- }
453
- ],
454
- "superclass": {
455
- "name": "PunicaElement",
456
- "module": "/src/core/element.js"
457
- },
458
- "tagName": "punica-alert",
459
- "customElement": true
460
- }
461
- ],
462
- "exports": [
463
- {
464
- "kind": "js",
465
- "name": "PunicaAlert",
466
- "declaration": {
467
- "name": "PunicaAlert",
468
- "module": "src/components/alert/alert.js"
469
- }
470
- }
471
- ]
472
- },
473
327
  {
474
328
  "kind": "javascript-module",
475
329
  "path": "src/components/agenda/agenda.js",
@@ -1319,72 +1173,56 @@
1319
1173
  },
1320
1174
  {
1321
1175
  "kind": "javascript-module",
1322
- "path": "src/components/alertDialog/alertDialog.js",
1176
+ "path": "src/components/alert/alert.js",
1323
1177
  "declarations": [
1324
1178
  {
1325
1179
  "kind": "class",
1326
- "description": "A confirmation dialog: asks the user to confirm an action before it\nhappens, deleting, revoking or discarding something.\n\nIt is a native `<dialog>` with `role=alertdialog`, opened with\n`showModal()` through the same modal surface as `punica-dialog`: the page\nbehind is inert, focus stays inside and goes back to the opener on close.\n`heading` names it and the default slot describes it. Opening puts focus on\nthe cancel button, the least destructive choice. Escape cancels; a click on\nthe backdrop does nothing.\n\n`ask()` opens it and resolves with whether the user confirmed; the module\nalso exports `confirm(options)`, which makes one, asks and removes it.",
1327
- "name": "PunicaAlertDialog",
1180
+ "description": "A message about the content beside it: a result, a warning, a tip.\n\nAn error or a warning is `role=alert` and interrupts a screen reader; any\nother colour is `role=status` and waits its turn.",
1181
+ "name": "PunicaAlert",
1328
1182
  "cssProperties": [
1329
1183
  {
1330
- "description": "Inline size, `400px` by default.",
1331
- "name": "--punica-alert-dialog-width"
1332
- },
1333
- {
1334
- "description": "Corner radius, as on `punica-dialog`.",
1335
- "name": "--punica-dialog-radius"
1336
- },
1337
- {
1338
- "description": "Padding of the panel.",
1339
- "name": "--punica-dialog-padding"
1340
- },
1341
- {
1342
- "description": "Background.",
1343
- "name": "--punica-dialog-background"
1184
+ "description": "Corner radius.",
1185
+ "name": "--punica-alert-radius"
1344
1186
  },
1345
1187
  {
1346
- "description": "Colour of the backdrop.",
1347
- "name": "--punica-dialog-backdrop"
1188
+ "description": "Padding.",
1189
+ "name": "--punica-alert-padding"
1348
1190
  },
1349
1191
  {
1350
- "description": "Shadow.",
1351
- "name": "--punica-dialog-shadow"
1192
+ "description": "Space between icon, message and actions.",
1193
+ "name": "--punica-alert-gap"
1352
1194
  }
1353
1195
  ],
1354
1196
  "cssParts": [
1355
1197
  {
1356
- "description": "The native dialog.",
1357
- "name": "dialog"
1358
- },
1359
- {
1360
- "description": "The column holding heading, description and actions.",
1361
- "name": "panel"
1362
- },
1363
- {
1364
- "description": "The heading.",
1365
- "name": "heading"
1198
+ "description": "The default icon.",
1199
+ "name": "icon"
1366
1200
  },
1367
1201
  {
1368
- "description": "The wrapper around the default slot.",
1369
- "name": "description"
1202
+ "description": "The wrapper around the message.",
1203
+ "name": "content"
1370
1204
  },
1371
1205
  {
1372
- "description": "The row of buttons.",
1206
+ "description": "The wrapper around the actions.",
1373
1207
  "name": "actions"
1374
1208
  },
1375
1209
  {
1376
- "description": "The cancel `punica-button`.",
1377
- "name": "cancel-button"
1378
- },
1379
- {
1380
- "description": "The confirm `punica-button`.",
1381
- "name": "confirm-button"
1210
+ "description": "The close button.",
1211
+ "name": "close"
1382
1212
  }
1383
1213
  ],
1384
1214
  "slots": [
1385
1215
  {
1386
- "description": "The description: what happens if the user confirms. It is the dialog's accessible description.",
1216
+ "description": "The message.",
1387
1217
  "name": ""
1218
+ },
1219
+ {
1220
+ "description": "An icon in place of the one the colour gives.",
1221
+ "name": "icon"
1222
+ },
1223
+ {
1224
+ "description": "Buttons that answer the message.",
1225
+ "name": "actions"
1388
1226
  }
1389
1227
  ],
1390
1228
  "members": [
@@ -1395,46 +1233,208 @@
1395
1233
  "text": "object"
1396
1234
  },
1397
1235
  "static": true,
1398
- "default": "{ heading: {}, confirmLabel: { default: 'Confirm' }, cancelLabel: { default: 'Cancel' }, color: {}, loading: { type: Boolean } }",
1399
- "inheritedFrom": {
1400
- "name": "ModalSurface",
1401
- "module": "src/components/dialog/modalSurface.js"
1402
- }
1236
+ "default": "{ color: {}, variant: {}, dismissible: { type: Boolean }, labelClose: { default: 'Close' } }"
1403
1237
  },
1404
1238
  {
1405
1239
  "kind": "field",
1406
1240
  "name": "styles",
1407
- "type": {
1408
- "text": "array"
1409
- },
1410
1241
  "static": true,
1411
- "default": "[dialogStyles, styles]"
1242
+ "default": "styles"
1412
1243
  },
1413
1244
  {
1414
1245
  "kind": "field",
1415
1246
  "name": "template",
1416
1247
  "static": true,
1417
- "default": "` <dialog part=\"dialog\" role=\"alertdialog\" aria-describedby=\"description\"> <div part=\"panel\" class=\"panel\"> <h2 part=\"heading\" class=\"heading\" id=\"heading\"></h2> <div part=\"description\" class=\"description\" id=\"description\"><slot></slot></div> <div part=\"actions\" class=\"actions\"> <punica-button part=\"cancel-button\" class=\"cancel\" variant=\"outlined\" color=\"neutral\"></punica-button> <punica-button part=\"confirm-button\" class=\"confirm\"></punica-button> </div> </div> </dialog> `"
1248
+ "default": "` <span class=\"icon\"><slot name=\"icon\"><span class=\"default info\">${icons.info}</span><span class=\"default success\">${icons.success}</span><span class=\"default warning\">${icons.warning}</span><span class=\"default error\">${icons.error}</span></slot></span> <div part=\"content\" class=\"content\"><slot></slot></div> <div part=\"actions\" class=\"actions\"><slot name=\"actions\"></slot></div> <button part=\"close\" class=\"close\" type=\"button\" hidden>${icons.close}</button> `"
1418
1249
  },
1419
1250
  {
1420
1251
  "kind": "field",
1421
- "name": "#heading",
1252
+ "name": "#close",
1422
1253
  "privacy": "private"
1423
1254
  },
1424
1255
  {
1425
- "kind": "field",
1426
- "name": "#cancel",
1427
- "privacy": "private"
1256
+ "kind": "method",
1257
+ "name": "update"
1428
1258
  },
1429
1259
  {
1430
- "kind": "field",
1431
- "name": "#confirm",
1432
- "privacy": "private"
1260
+ "kind": "method",
1261
+ "name": "dismiss",
1262
+ "description": "Does what the close button does: fires `punica-dismiss` and, unless a\nlistener prevents it, hides the alert."
1263
+ }
1264
+ ],
1265
+ "events": [
1266
+ {
1267
+ "description": "The user pressed the close button. Cancelable: unless prevented, the alert hides itself with `hidden`.",
1268
+ "name": "punica-dismiss"
1269
+ }
1270
+ ],
1271
+ "attributes": [
1272
+ {
1273
+ "type": {
1274
+ "text": "'info' | 'success' | 'warning' | 'error' | 'primary' | 'secondary' | 'neutral'"
1275
+ },
1276
+ "description": "What the message is, `info` by default.",
1277
+ "name": "color"
1433
1278
  },
1434
1279
  {
1435
- "kind": "field",
1436
- "name": "labelSources",
1437
- "description": "Elements that name the dialog when `label` is not set.",
1280
+ "type": {
1281
+ "text": "'tinted' | 'outlined' | 'filled'"
1282
+ },
1283
+ "description": "Visual weight, `tinted` by default.",
1284
+ "name": "variant"
1285
+ },
1286
+ {
1287
+ "type": {
1288
+ "text": "boolean"
1289
+ },
1290
+ "description": "Shows a close button.",
1291
+ "name": "dismissible"
1292
+ },
1293
+ {
1294
+ "type": {
1295
+ "text": "string"
1296
+ },
1297
+ "description": "Accessible name of the close button, `Close` by default.",
1298
+ "name": "label-close"
1299
+ }
1300
+ ],
1301
+ "superclass": {
1302
+ "name": "PunicaElement",
1303
+ "module": "/src/core/element.js"
1304
+ },
1305
+ "tagName": "punica-alert",
1306
+ "customElement": true
1307
+ }
1308
+ ],
1309
+ "exports": [
1310
+ {
1311
+ "kind": "js",
1312
+ "name": "PunicaAlert",
1313
+ "declaration": {
1314
+ "name": "PunicaAlert",
1315
+ "module": "src/components/alert/alert.js"
1316
+ }
1317
+ }
1318
+ ]
1319
+ },
1320
+ {
1321
+ "kind": "javascript-module",
1322
+ "path": "src/components/alertDialog/alertDialog.js",
1323
+ "declarations": [
1324
+ {
1325
+ "kind": "class",
1326
+ "description": "A confirmation dialog: asks the user to confirm an action before it\nhappens, deleting, revoking or discarding something.\n\nIt is a native `<dialog>` with `role=alertdialog`, opened with\n`showModal()` through the same modal surface as `punica-dialog`: the page\nbehind is inert, focus stays inside and goes back to the opener on close.\n`heading` names it and the default slot describes it. Opening puts focus on\nthe cancel button, the least destructive choice. Escape cancels; a click on\nthe backdrop does nothing.\n\n`ask()` opens it and resolves with whether the user confirmed; the module\nalso exports `confirm(options)`, which makes one, asks and removes it.",
1327
+ "name": "PunicaAlertDialog",
1328
+ "cssProperties": [
1329
+ {
1330
+ "description": "Inline size, `400px` by default.",
1331
+ "name": "--punica-alert-dialog-width"
1332
+ },
1333
+ {
1334
+ "description": "Corner radius, as on `punica-dialog`.",
1335
+ "name": "--punica-dialog-radius"
1336
+ },
1337
+ {
1338
+ "description": "Padding of the panel.",
1339
+ "name": "--punica-dialog-padding"
1340
+ },
1341
+ {
1342
+ "description": "Background.",
1343
+ "name": "--punica-dialog-background"
1344
+ },
1345
+ {
1346
+ "description": "Colour of the backdrop.",
1347
+ "name": "--punica-dialog-backdrop"
1348
+ },
1349
+ {
1350
+ "description": "Shadow.",
1351
+ "name": "--punica-dialog-shadow"
1352
+ }
1353
+ ],
1354
+ "cssParts": [
1355
+ {
1356
+ "description": "The native dialog.",
1357
+ "name": "dialog"
1358
+ },
1359
+ {
1360
+ "description": "The column holding heading, description and actions.",
1361
+ "name": "panel"
1362
+ },
1363
+ {
1364
+ "description": "The heading.",
1365
+ "name": "heading"
1366
+ },
1367
+ {
1368
+ "description": "The wrapper around the default slot.",
1369
+ "name": "description"
1370
+ },
1371
+ {
1372
+ "description": "The row of buttons.",
1373
+ "name": "actions"
1374
+ },
1375
+ {
1376
+ "description": "The cancel `punica-button`.",
1377
+ "name": "cancel-button"
1378
+ },
1379
+ {
1380
+ "description": "The confirm `punica-button`.",
1381
+ "name": "confirm-button"
1382
+ }
1383
+ ],
1384
+ "slots": [
1385
+ {
1386
+ "description": "The description: what happens if the user confirms. It is the dialog's accessible description.",
1387
+ "name": ""
1388
+ }
1389
+ ],
1390
+ "members": [
1391
+ {
1392
+ "kind": "field",
1393
+ "name": "properties",
1394
+ "type": {
1395
+ "text": "object"
1396
+ },
1397
+ "static": true,
1398
+ "default": "{ heading: {}, confirmLabel: { default: 'Confirm' }, cancelLabel: { default: 'Cancel' }, color: {}, loading: { type: Boolean } }",
1399
+ "inheritedFrom": {
1400
+ "name": "ModalSurface",
1401
+ "module": "src/components/dialog/modalSurface.js"
1402
+ }
1403
+ },
1404
+ {
1405
+ "kind": "field",
1406
+ "name": "styles",
1407
+ "type": {
1408
+ "text": "array"
1409
+ },
1410
+ "static": true,
1411
+ "default": "[dialogStyles, styles]"
1412
+ },
1413
+ {
1414
+ "kind": "field",
1415
+ "name": "template",
1416
+ "static": true,
1417
+ "default": "` <dialog part=\"dialog\" role=\"alertdialog\" aria-describedby=\"description\"> <div part=\"panel\" class=\"panel\"> <h2 part=\"heading\" class=\"heading\" id=\"heading\"></h2> <div part=\"description\" class=\"description\" id=\"description\"><slot></slot></div> <div part=\"actions\" class=\"actions\"> <punica-button part=\"cancel-button\" class=\"cancel\" variant=\"outlined\" color=\"neutral\"></punica-button> <punica-button part=\"confirm-button\" class=\"confirm\"></punica-button> </div> </div> </dialog> `"
1418
+ },
1419
+ {
1420
+ "kind": "field",
1421
+ "name": "#heading",
1422
+ "privacy": "private"
1423
+ },
1424
+ {
1425
+ "kind": "field",
1426
+ "name": "#cancel",
1427
+ "privacy": "private"
1428
+ },
1429
+ {
1430
+ "kind": "field",
1431
+ "name": "#confirm",
1432
+ "privacy": "private"
1433
+ },
1434
+ {
1435
+ "kind": "field",
1436
+ "name": "labelSources",
1437
+ "description": "Elements that name the dialog when `label` is not set.",
1438
1438
  "return": {
1439
1439
  "type": {
1440
1440
  "text": "Element[]"
@@ -1956,96 +1956,22 @@
1956
1956
  },
1957
1957
  {
1958
1958
  "kind": "javascript-module",
1959
- "path": "src/components/appShell/appShell.js",
1959
+ "path": "src/components/aspectRatio/aspectRatio.js",
1960
1960
  "declarations": [
1961
1961
  {
1962
1962
  "kind": "class",
1963
- "description": "The frame of an app's page: a header across the top, the navigation down\nthe side, the main content, a secondary panel and a footer.\n\nThe regions are a CSS grid. With `fixed` the shell is as tall as the\nviewport and each region scrolls on its own; without it the page scrolls\nand the header, the navigation and the panel stick. Narrower than\n`collapse-below`, the navigation leaves the side for a drawer opened by a\nmenu button at the start of the header, and the panel moves under the\nmain content. The width is the shell's own, not the window's, so a shell\nin a pane collapses with the pane.\n\nThe main content is in a native `<main>` landmark, unless `embedded` says\nthe shell is a part of a larger page that has its own; a \"skip to\ncontent\" button is the first thing in the tab order.",
1964
- "name": "PunicaAppShell",
1963
+ "description": "Keeps its content at a fixed ratio of inline to block size.",
1964
+ "name": "PunicaAspectRatio",
1965
1965
  "cssProperties": [
1966
1966
  {
1967
- "description": "Block size while `fixed`, `100dvh` by default.",
1968
- "name": "--punica-app-shell-height"
1969
- },
1970
- {
1971
- "description": "Inline size of the navigation region.",
1972
- "name": "--punica-app-shell-nav-width"
1973
- },
1974
- {
1975
- "description": "Inline size of the panel region.",
1976
- "name": "--punica-app-shell-aside-width"
1977
- },
1978
- {
1979
- "description": "Background of the main content.",
1980
- "name": "--punica-app-shell-background"
1981
- },
1982
- {
1983
- "description": "Padding of the main content.",
1984
- "name": "--punica-app-shell-padding"
1985
- }
1986
- ],
1987
- "cssParts": [
1988
- {
1989
- "description": "The grid.",
1990
- "name": "base"
1991
- },
1992
- {
1993
- "description": "The skip-to-content button.",
1994
- "name": "skip-link"
1995
- },
1996
- {
1997
- "description": "The header region.",
1998
- "name": "header"
1999
- },
2000
- {
2001
- "description": "The start of the header holding the menu button, shown while collapsed; it draws the header's bottom line under the button.",
2002
- "name": "menu-cell"
2003
- },
2004
- {
2005
- "description": "The button that opens the navigation drawer.",
2006
- "name": "menu-button"
2007
- },
2008
- {
2009
- "description": "The navigation region.",
2010
- "name": "nav"
2011
- },
2012
- {
2013
- "description": "The native `<main>` (a `<div>` while `embedded`).",
2014
- "name": "main"
2015
- },
2016
- {
2017
- "description": "The panel region.",
2018
- "name": "aside"
2019
- },
2020
- {
2021
- "description": "The footer region.",
2022
- "name": "footer"
2023
- },
2024
- {
2025
- "description": "The `punica-mobile-nav` the navigation moves into.",
2026
- "name": "drawer"
1967
+ "description": "`object-fit` of the content, `cover` by default.",
1968
+ "name": "--punica-aspect-ratio-fit"
2027
1969
  }
2028
1970
  ],
2029
1971
  "slots": [
2030
1972
  {
2031
- "description": "The main content, inside the `<main>` landmark.",
1973
+ "description": "The content, an image, video or frame; it fills the box.",
2032
1974
  "name": ""
2033
- },
2034
- {
2035
- "description": "Across the top: a `punica-top-nav`, a `punica-app-bar`.",
2036
- "name": "header"
2037
- },
2038
- {
2039
- "description": "Down the inline-start side, in a drawer while collapsed: a `punica-side-nav`.",
2040
- "name": "nav"
2041
- },
2042
- {
2043
- "description": "A secondary panel at the inline-end side, under the main content while collapsed.",
2044
- "name": "aside"
2045
- },
2046
- {
2047
- "description": "Under the main content and the panel.",
2048
- "name": "footer"
2049
1975
  }
2050
1976
  ],
2051
1977
  "members": [
@@ -2056,7 +1982,7 @@
2056
1982
  "text": "object"
2057
1983
  },
2058
1984
  "static": true,
2059
- "default": "{ fixed: { type: Boolean }, embedded: { type: Boolean }, collapseBelow: { default: 'medium' }, navOpen: { type: Boolean }, labelMenu: { default: 'Menu' }, labelNav: { default: 'Navigation' }, labelSkip: { default: 'Skip to content' }, labelClose: { default: 'Close' } }"
1985
+ "default": "{ ratio: {} }"
2060
1986
  },
2061
1987
  {
2062
1988
  "kind": "field",
@@ -2068,117 +1994,268 @@
2068
1994
  "kind": "field",
2069
1995
  "name": "template",
2070
1996
  "static": true,
2071
- "default": "` <div part=\"base\" class=\"base\"> <button part=\"skip-link\" class=\"skip\" type=\"button\"></button> <div part=\"header\" class=\"header\"> <div part=\"menu-cell\" class=\"menu-cell\"> <punica-mobile-nav part=\"drawer\" class=\"drawer\"> <button slot=\"trigger\" part=\"menu-button\" class=\"menu\" type=\"button\">${MENU_ICON}</button> </punica-mobile-nav> </div> <div class=\"header-content\"><slot name=\"header\"></slot></div> </div> <div part=\"nav\" class=\"nav\"><div class=\"nav-inner\"><slot name=\"nav\"></slot></div></div> <main part=\"main\" class=\"main\" tabindex=\"-1\"><slot></slot></main> <div part=\"aside\" class=\"aside\"><div class=\"aside-inner\"><slot name=\"aside\"></slot></div></div> <div part=\"footer\" class=\"footer\"><slot name=\"footer\"></slot></div> </div> `"
2072
- },
2073
- {
2074
- "kind": "field",
2075
- "name": "#base",
2076
- "privacy": "private"
1997
+ "default": "`<slot></slot>`"
2077
1998
  },
2078
1999
  {
2079
2000
  "kind": "field",
2080
- "name": "#skip",
2001
+ "name": "#style",
2081
2002
  "privacy": "private"
2082
2003
  },
2083
2004
  {
2084
- "kind": "field",
2085
- "name": "#header",
2086
- "privacy": "private"
2005
+ "kind": "method",
2006
+ "name": "update"
2007
+ }
2008
+ ],
2009
+ "attributes": [
2010
+ {
2011
+ "type": {
2012
+ "text": "string"
2013
+ },
2014
+ "description": "`inline/block` as two positive numbers (`16/9`), or one number; `1/1` by default and for anything else.",
2015
+ "name": "ratio"
2016
+ }
2017
+ ],
2018
+ "superclass": {
2019
+ "name": "PunicaElement",
2020
+ "module": "/src/core/element.js"
2021
+ },
2022
+ "tagName": "punica-aspect-ratio",
2023
+ "customElement": true
2024
+ }
2025
+ ],
2026
+ "exports": [
2027
+ {
2028
+ "kind": "js",
2029
+ "name": "PunicaAspectRatio",
2030
+ "declaration": {
2031
+ "name": "PunicaAspectRatio",
2032
+ "module": "src/components/aspectRatio/aspectRatio.js"
2033
+ }
2034
+ }
2035
+ ]
2036
+ },
2037
+ {
2038
+ "kind": "javascript-module",
2039
+ "path": "src/components/autocomplete/autocomplete.js",
2040
+ "declarations": [
2041
+ {
2042
+ "kind": "class",
2043
+ "description": "A text input that suggests values as the user types: an editable combobox\nwith list autocomplete.\n\nThe suggestions are `punica-option` children, or the `options` array for\ndata that arrives later: listen for `punica-input`, fetch, and assign\n`options`. The value is the picked option's `value`; with `free-text`, any\ntyped text is a value too.",
2044
+ "name": "PunicaAutocomplete",
2045
+ "cssProperties": [
2046
+ {
2047
+ "description": "Corner radius of the field.",
2048
+ "name": "--punica-autocomplete-radius"
2049
+ },
2050
+ {
2051
+ "description": "Minimum block size of the field.",
2052
+ "name": "--punica-autocomplete-height"
2053
+ },
2054
+ {
2055
+ "description": "Inline padding of the field.",
2056
+ "name": "--punica-autocomplete-padding"
2057
+ },
2058
+ {
2059
+ "description": "Border colour at rest.",
2060
+ "name": "--punica-autocomplete-border-color"
2061
+ },
2062
+ {
2063
+ "description": "Field background.",
2064
+ "name": "--punica-autocomplete-background"
2065
+ },
2066
+ {
2067
+ "description": "Smallest inline size.",
2068
+ "name": "--punica-autocomplete-min-width"
2069
+ },
2070
+ {
2071
+ "description": "Largest block size of the list.",
2072
+ "name": "--punica-autocomplete-listbox-max-height"
2073
+ }
2074
+ ],
2075
+ "cssParts": [
2076
+ {
2077
+ "description": "The bordered box.",
2078
+ "name": "field"
2079
+ },
2080
+ {
2081
+ "description": "The text input, a combobox.",
2082
+ "name": "input"
2083
+ },
2084
+ {
2085
+ "description": "The clear button.",
2086
+ "name": "clear"
2087
+ },
2088
+ {
2089
+ "description": "The floating list.",
2090
+ "name": "listbox"
2091
+ },
2092
+ {
2093
+ "description": "Each row made from `options`.",
2094
+ "name": "option"
2095
+ }
2096
+ ],
2097
+ "slots": [
2098
+ {
2099
+ "description": "The `punica-option` rows.",
2100
+ "name": ""
2101
+ },
2102
+ {
2103
+ "description": "Content before the input, an icon.",
2104
+ "name": "start"
2087
2105
  },
2106
+ {
2107
+ "description": "Content after the input.",
2108
+ "name": "end"
2109
+ }
2110
+ ],
2111
+ "members": [
2088
2112
  {
2089
2113
  "kind": "field",
2090
- "name": "#navRegion",
2091
- "privacy": "private"
2114
+ "name": "properties",
2115
+ "type": {
2116
+ "text": "object"
2117
+ },
2118
+ "static": true,
2119
+ "default": "{ value: { reflect: false }, placeholder: {}, label: {}, open: { type: Boolean }, freeText: { type: Boolean }, noFilter: { type: Boolean }, clearable: { type: Boolean }, readonly: { type: Boolean }, size: {}, fullWidth: { type: Boolean }, labelClear: { default: 'Clear' }, options: { type: Array, attribute: false } }"
2092
2120
  },
2093
2121
  {
2094
2122
  "kind": "field",
2095
- "name": "#navInner",
2123
+ "name": "styles",
2124
+ "type": {
2125
+ "text": "array"
2126
+ },
2127
+ "static": true,
2128
+ "default": "[overlayCss, fieldStyles, styles]"
2129
+ },
2130
+ {
2131
+ "kind": "field",
2132
+ "name": "shadowOptions",
2133
+ "type": {
2134
+ "text": "object"
2135
+ },
2136
+ "static": true,
2137
+ "default": "{ delegatesFocus: true }"
2138
+ },
2139
+ {
2140
+ "kind": "field",
2141
+ "name": "template",
2142
+ "static": true,
2143
+ "default": "` <div part=\"field\" class=\"field\"> <slot name=\"start\"></slot> <input part=\"input\" class=\"control\" type=\"text\" role=\"combobox\" aria-autocomplete=\"list\" aria-haspopup=\"listbox\" aria-controls=\"listbox\" aria-expanded=\"false\" autocomplete=\"off\" autocapitalize=\"off\" spellcheck=\"false\"> <button part=\"clear\" class=\"icon-button\" type=\"button\" hidden>${icons.close}</button> <slot name=\"end\"></slot> </div> <div part=\"listbox\" id=\"listbox\" class=\"panel listbox\" role=\"listbox\" popover=\"manual\"><slot></slot></div> `"
2144
+ },
2145
+ {
2146
+ "kind": "field",
2147
+ "name": "#field",
2096
2148
  "privacy": "private"
2097
2149
  },
2098
2150
  {
2099
2151
  "kind": "field",
2100
- "name": "#menuCell",
2152
+ "name": "#input",
2101
2153
  "privacy": "private"
2102
2154
  },
2103
2155
  {
2104
2156
  "kind": "field",
2105
- "name": "#main",
2157
+ "name": "#clear",
2106
2158
  "privacy": "private"
2107
2159
  },
2108
2160
  {
2109
2161
  "kind": "field",
2110
- "name": "#aside",
2162
+ "name": "#listbox",
2111
2163
  "privacy": "private"
2112
2164
  },
2113
2165
  {
2114
2166
  "kind": "field",
2115
- "name": "#asideInner",
2167
+ "name": "#slot",
2116
2168
  "privacy": "private"
2117
2169
  },
2118
2170
  {
2119
2171
  "kind": "field",
2120
- "name": "#drawer",
2172
+ "name": "#surface",
2121
2173
  "privacy": "private",
2122
- "default": "(this.$('punica-mobile-nav'))"
2174
+ "default": "new FieldSurface(this, this.#listbox)"
2123
2175
  },
2124
2176
  {
2125
2177
  "kind": "field",
2126
- "name": "#menu",
2127
- "privacy": "private"
2178
+ "name": "#nav",
2179
+ "privacy": "private",
2180
+ "default": "new OptionNavigator(this.#input, () => this.#rows())"
2128
2181
  },
2129
2182
  {
2130
2183
  "kind": "field",
2131
- "name": "#slots",
2184
+ "name": "#generated",
2132
2185
  "privacy": "private",
2133
2186
  "type": {
2134
- "text": "object"
2187
+ "text": "any[]"
2135
2188
  },
2136
- "default": "{ header: this.$('slot[name=\"header\"]'), nav: this.$('slot[name=\"nav\"]'), aside: this.$('slot[name=\"aside\"]'), footer: this.$('slot[name=\"footer\"]') }"
2189
+ "default": "[]",
2190
+ "description": "Rows made from the `options` property."
2137
2191
  },
2138
2192
  {
2139
2193
  "kind": "field",
2140
- "name": "#collapsed",
2194
+ "name": "#generatedFrom",
2141
2195
  "privacy": "private",
2142
2196
  "type": {
2143
- "text": "boolean"
2197
+ "text": "unknown"
2144
2198
  },
2145
- "default": "false"
2199
+ "default": "null",
2200
+ "description": "The array those rows were made from."
2146
2201
  },
2147
2202
  {
2148
2203
  "kind": "field",
2149
- "name": "#resize",
2204
+ "name": "#typed",
2150
2205
  "privacy": "private",
2151
2206
  "type": {
2152
- "text": "ResizeObserver | null"
2207
+ "text": "string | null"
2153
2208
  },
2154
- "default": "null"
2209
+ "default": "null",
2210
+ "description": "What the user typed since the last commit; null while the text is the value's own."
2155
2211
  },
2156
2212
  {
2157
2213
  "kind": "field",
2158
- "name": "#frame",
2214
+ "name": "#textKey",
2159
2215
  "privacy": "private",
2160
2216
  "type": {
2161
- "text": "number"
2217
+ "text": "string | null"
2162
2218
  },
2163
- "default": "0"
2219
+ "default": "null",
2220
+ "description": "What the input's text was last written from."
2164
2221
  },
2165
2222
  {
2166
2223
  "kind": "field",
2167
- "name": "#closeReason",
2224
+ "name": "#touched",
2168
2225
  "privacy": "private",
2169
2226
  "type": {
2170
- "text": "string"
2227
+ "text": "boolean"
2171
2228
  },
2172
- "default": "''"
2229
+ "default": "false"
2173
2230
  },
2174
2231
  {
2175
2232
  "kind": "field",
2176
- "name": "collapsed",
2177
- "readonly": true,
2233
+ "name": "#reason",
2234
+ "privacy": "private",
2178
2235
  "type": {
2179
- "text": "boolean"
2236
+ "text": "string"
2180
2237
  },
2181
- "description": "The shell is narrower than `collapse-below` (read-only)."
2238
+ "default": "'api'"
2239
+ },
2240
+ {
2241
+ "kind": "method",
2242
+ "name": "show",
2243
+ "description": "Opens the list."
2244
+ },
2245
+ {
2246
+ "kind": "method",
2247
+ "name": "hide",
2248
+ "description": "Closes the list."
2249
+ },
2250
+ {
2251
+ "kind": "method",
2252
+ "name": "focus",
2253
+ "parameters": [
2254
+ {
2255
+ "name": "options"
2256
+ }
2257
+ ],
2258
+ "description": "Moves focus to the text input."
2182
2259
  },
2183
2260
  {
2184
2261
  "kind": "method",
@@ -2190,316 +2267,377 @@
2190
2267
  },
2191
2268
  {
2192
2269
  "kind": "method",
2193
- "name": "update",
2270
+ "name": "formReset"
2271
+ },
2272
+ {
2273
+ "kind": "method",
2274
+ "name": "formRestore",
2194
2275
  "parameters": [
2195
2276
  {
2196
- "name": "changed"
2277
+ "name": "state"
2197
2278
  }
2198
2279
  ]
2199
2280
  },
2200
2281
  {
2201
2282
  "kind": "method",
2202
- "name": "refresh",
2203
- "description": "A region that scrolls on its own is a tab stop while it overflows, so a\nkeyboard can scroll it even when nothing inside takes focus. Call after\nchanging the content in a way that changes whether it overflows."
2283
+ "name": "#rows",
2284
+ "privacy": "private",
2285
+ "description": "Every row: the generated ones, then the `punica-option` children.",
2286
+ "return": {
2287
+ "type": {
2288
+ "text": "any[]"
2289
+ }
2290
+ }
2204
2291
  },
2205
2292
  {
2206
2293
  "kind": "method",
2207
- "name": "#tabScrollers",
2208
- "privacy": "private"
2294
+ "name": "#rowFrom",
2295
+ "privacy": "private",
2296
+ "parameters": [
2297
+ {
2298
+ "name": "event"
2299
+ }
2300
+ ]
2209
2301
  },
2210
2302
  {
2211
2303
  "kind": "method",
2212
- "name": "#setMain",
2304
+ "name": "#textFor",
2213
2305
  "privacy": "private",
2214
- "description": "A `<main>`, or a `<div>` while embedded, keeping its content."
2306
+ "parameters": [
2307
+ {
2308
+ "name": "value"
2309
+ }
2310
+ ],
2311
+ "description": "The text shown for a value: its option's label, else the value itself."
2215
2312
  },
2216
2313
  {
2217
2314
  "kind": "method",
2218
- "name": "#measure",
2219
- "privacy": "private"
2315
+ "name": "update"
2220
2316
  },
2221
2317
  {
2222
2318
  "kind": "method",
2223
- "name": "#isNarrow",
2319
+ "name": "#close",
2224
2320
  "privacy": "private",
2225
2321
  "parameters": [
2226
2322
  {
2227
- "name": "width",
2323
+ "name": "reason",
2228
2324
  "type": {
2229
- "text": "number"
2325
+ "text": "string"
2230
2326
  }
2231
2327
  }
2232
2328
  ]
2233
2329
  },
2234
2330
  {
2235
2331
  "kind": "method",
2236
- "name": "#setCollapsed",
2332
+ "name": "#commit",
2237
2333
  "privacy": "private",
2238
2334
  "parameters": [
2239
2335
  {
2240
- "name": "narrow",
2336
+ "name": "value",
2241
2337
  "type": {
2242
- "text": "boolean"
2338
+ "text": "string | null"
2243
2339
  }
2244
2340
  }
2245
2341
  ]
2246
2342
  },
2247
2343
  {
2248
2344
  "kind": "method",
2249
- "name": "#trackHeader",
2345
+ "name": "#pick",
2250
2346
  "privacy": "private",
2251
- "description": "Sticky regions and a skipped-to main stop under the header, not behind it."
2347
+ "parameters": [
2348
+ {
2349
+ "name": "option",
2350
+ "type": {
2351
+ "text": "any"
2352
+ }
2353
+ }
2354
+ ]
2355
+ },
2356
+ {
2357
+ "kind": "method",
2358
+ "name": "#commitText",
2359
+ "privacy": "private",
2360
+ "description": "Takes what was typed: an option with that label, free text, or nothing."
2361
+ },
2362
+ {
2363
+ "kind": "method",
2364
+ "name": "#onKeydown",
2365
+ "privacy": "private",
2366
+ "parameters": [
2367
+ {
2368
+ "name": "event",
2369
+ "type": {
2370
+ "text": "KeyboardEvent"
2371
+ }
2372
+ }
2373
+ ]
2374
+ },
2375
+ {
2376
+ "type": {
2377
+ "text": "string | null"
2378
+ },
2379
+ "description": "The current value.",
2380
+ "name": "value",
2381
+ "kind": "field"
2382
+ },
2383
+ {
2384
+ "type": {
2385
+ "text": "(string | { value: string, label?: string, disabled?: boolean })[] | null"
2386
+ },
2387
+ "description": "Suggestions given as data; shown before the `punica-option` children.",
2388
+ "name": "options",
2389
+ "kind": "field"
2252
2390
  }
2253
2391
  ],
2254
2392
  "events": [
2255
2393
  {
2256
- "description": "The navigation drawer opened.",
2394
+ "description": "The user typed. `detail.value` is the text in the input.",
2395
+ "name": "punica-input"
2396
+ },
2397
+ {
2398
+ "description": "The user picked an option, committed free text or cleared. `detail.value` is the new value.",
2399
+ "name": "punica-change"
2400
+ },
2401
+ {
2402
+ "description": "The list opened.",
2257
2403
  "name": "punica-open"
2258
2404
  },
2259
2405
  {
2260
- "description": "The navigation drawer closed. `detail` is `{ reason, returnValue }`; `reason` is `escape`, `backdrop`, `close-button`, `navigate`, `resize` (the shell grew past `collapse-below`) or `api`.",
2406
+ "description": "The list closed. `detail.reason` is `select`, `escape`, `outside`, `blur`, `empty` or `api`.",
2261
2407
  "name": "punica-close"
2262
2408
  }
2263
2409
  ],
2264
2410
  "attributes": [
2411
+ {
2412
+ "type": {
2413
+ "text": "string"
2414
+ },
2415
+ "description": "Default value.",
2416
+ "name": "value"
2417
+ },
2418
+ {
2419
+ "type": {
2420
+ "text": "string"
2421
+ },
2422
+ "description": "Text shown while the field is empty.",
2423
+ "name": "placeholder"
2424
+ },
2425
+ {
2426
+ "type": {
2427
+ "text": "string"
2428
+ },
2429
+ "description": "Accessible name.",
2430
+ "name": "label"
2431
+ },
2265
2432
  {
2266
2433
  "type": {
2267
2434
  "text": "boolean"
2268
2435
  },
2269
- "description": "The shell is as tall as `--punica-app-shell-height` and each region scrolls on its own.",
2270
- "name": "fixed"
2436
+ "description": "The list is showing, when it has rows to show.",
2437
+ "name": "open"
2271
2438
  },
2272
2439
  {
2273
2440
  "type": {
2274
- "text": "'small' | 'medium' | 'large' | 'none'"
2441
+ "text": "boolean"
2275
2442
  },
2276
- "description": "Width under which the navigation becomes a drawer: 600, 900 or 1200 px, `medium` (900 px) by default; `none` never collapses.",
2277
- "name": "collapse-below"
2443
+ "description": "Text that matches no option is taken as the value.",
2444
+ "name": "free-text"
2278
2445
  },
2279
2446
  {
2280
2447
  "type": {
2281
2448
  "text": "boolean"
2282
2449
  },
2283
- "description": "The shell is part of a page that has its own `<main>`: the content area is a plain element, not a second main landmark.",
2284
- "name": "embedded"
2450
+ "description": "The list is shown as given; for options already filtered by a server.",
2451
+ "name": "no-filter"
2285
2452
  },
2286
2453
  {
2287
2454
  "type": {
2288
2455
  "text": "boolean"
2289
2456
  },
2290
- "description": "The navigation drawer is showing; only while collapsed.",
2291
- "name": "nav-open"
2457
+ "description": "Shows a button that empties the value.",
2458
+ "name": "clearable"
2292
2459
  },
2293
2460
  {
2294
2461
  "type": {
2295
2462
  "text": "string"
2296
2463
  },
2297
- "description": "Accessible name of the menu button, `Menu` by default.",
2298
- "name": "label-menu"
2464
+ "description": "Name the value is submitted under.",
2465
+ "name": "name"
2299
2466
  },
2300
2467
  {
2301
2468
  "type": {
2302
- "text": "string"
2469
+ "text": "boolean"
2303
2470
  },
2304
- "description": "Accessible name of the navigation drawer, `Navigation` by default.",
2305
- "name": "label-nav"
2471
+ "description": "Takes no input and submits nothing.",
2472
+ "name": "disabled"
2306
2473
  },
2307
2474
  {
2308
2475
  "type": {
2309
- "text": "string"
2476
+ "text": "boolean"
2310
2477
  },
2311
- "description": "Text of the skip link, `Skip to content` by default.",
2312
- "name": "label-skip"
2478
+ "description": "Shows its value and takes no input.",
2479
+ "name": "readonly"
2480
+ },
2481
+ {
2482
+ "type": {
2483
+ "text": "boolean"
2484
+ },
2485
+ "description": "A value is needed before the form submits.",
2486
+ "name": "required"
2487
+ },
2488
+ {
2489
+ "type": {
2490
+ "text": "'small' | 'medium' | 'large'"
2491
+ },
2492
+ "description": "Control height, `medium` by default.",
2493
+ "name": "size"
2494
+ },
2495
+ {
2496
+ "type": {
2497
+ "text": "boolean"
2498
+ },
2499
+ "description": "Fills its container's inline size.",
2500
+ "name": "full-width"
2313
2501
  },
2314
2502
  {
2315
2503
  "type": {
2316
2504
  "text": "string"
2317
2505
  },
2318
- "description": "Accessible name of the drawer's close button, `Close` by default.",
2319
- "name": "label-close"
2506
+ "description": "Name of the clear button, `Clear` by default.",
2507
+ "name": "label-clear"
2320
2508
  }
2321
2509
  ],
2322
2510
  "cssStates": [
2323
2511
  {
2324
- "description": "The shell is narrower than `collapse-below`.",
2325
- "name": "collapsed"
2512
+ "description": "The list is showing.",
2513
+ "name": "open"
2326
2514
  },
2327
2515
  {
2328
- "description": "There is content in the `nav` slot.",
2329
- "name": "has-nav"
2516
+ "description": "Disabled by itself or by a fieldset.",
2517
+ "name": "disabled"
2518
+ },
2519
+ {
2520
+ "description": "Invalid after the user touched it.",
2521
+ "name": "user-invalid"
2522
+ }
2523
+ ],
2524
+ "mixins": [
2525
+ {
2526
+ "name": "FormControl",
2527
+ "module": "/src/core/form.js"
2330
2528
  }
2331
2529
  ],
2332
2530
  "superclass": {
2333
2531
  "name": "PunicaElement",
2334
2532
  "module": "/src/core/element.js"
2335
2533
  },
2336
- "tagName": "punica-app-shell",
2534
+ "tagName": "punica-autocomplete",
2337
2535
  "customElement": true
2338
2536
  }
2339
2537
  ],
2340
2538
  "exports": [
2341
2539
  {
2342
2540
  "kind": "js",
2343
- "name": "PunicaAppShell",
2541
+ "name": "PunicaAutocomplete",
2344
2542
  "declaration": {
2345
- "name": "PunicaAppShell",
2346
- "module": "src/components/appShell/appShell.js"
2543
+ "name": "PunicaAutocomplete",
2544
+ "module": "src/components/autocomplete/autocomplete.js"
2347
2545
  }
2348
2546
  }
2349
2547
  ]
2350
2548
  },
2351
2549
  {
2352
2550
  "kind": "javascript-module",
2353
- "path": "src/components/aspectRatio/aspectRatio.js",
2551
+ "path": "src/components/appShell/appShell.js",
2354
2552
  "declarations": [
2355
2553
  {
2356
2554
  "kind": "class",
2357
- "description": "Keeps its content at a fixed ratio of inline to block size.",
2358
- "name": "PunicaAspectRatio",
2555
+ "description": "The frame of an app's page: a header across the top, the navigation down\nthe side, the main content, a secondary panel and a footer.\n\nThe regions are a CSS grid. With `fixed` the shell is as tall as the\nviewport and each region scrolls on its own; without it the page scrolls\nand the header, the navigation and the panel stick. Narrower than\n`collapse-below`, the navigation leaves the side for a drawer opened by a\nmenu button at the start of the header, and the panel moves under the\nmain content. The width is the shell's own, not the window's, so a shell\nin a pane collapses with the pane.\n\nThe main content is in a native `<main>` landmark, unless `embedded` says\nthe shell is a part of a larger page that has its own; a \"skip to\ncontent\" button is the first thing in the tab order.",
2556
+ "name": "PunicaAppShell",
2359
2557
  "cssProperties": [
2360
2558
  {
2361
- "description": "`object-fit` of the content, `cover` by default.",
2362
- "name": "--punica-aspect-ratio-fit"
2363
- }
2364
- ],
2365
- "slots": [
2366
- {
2367
- "description": "The content, an image, video or frame; it fills the box.",
2368
- "name": ""
2369
- }
2370
- ],
2371
- "members": [
2372
- {
2373
- "kind": "field",
2374
- "name": "properties",
2375
- "type": {
2376
- "text": "object"
2377
- },
2378
- "static": true,
2379
- "default": "{ ratio: {} }"
2559
+ "description": "Block size while `fixed`, `100dvh` by default.",
2560
+ "name": "--punica-app-shell-height"
2380
2561
  },
2381
2562
  {
2382
- "kind": "field",
2383
- "name": "styles",
2384
- "static": true,
2385
- "default": "styles"
2563
+ "description": "Inline size of the navigation region.",
2564
+ "name": "--punica-app-shell-nav-width"
2386
2565
  },
2387
2566
  {
2388
- "kind": "field",
2389
- "name": "template",
2390
- "static": true,
2391
- "default": "`<slot></slot>`"
2567
+ "description": "Inline size of the panel region.",
2568
+ "name": "--punica-app-shell-aside-width"
2392
2569
  },
2393
2570
  {
2394
- "kind": "field",
2395
- "name": "#style",
2396
- "privacy": "private"
2571
+ "description": "Background of the main content.",
2572
+ "name": "--punica-app-shell-background"
2397
2573
  },
2398
2574
  {
2399
- "kind": "method",
2400
- "name": "update"
2401
- }
2402
- ],
2403
- "attributes": [
2404
- {
2405
- "type": {
2406
- "text": "string"
2407
- },
2408
- "description": "`inline/block` as two positive numbers (`16/9`), or one number; `1/1` by default and for anything else.",
2409
- "name": "ratio"
2575
+ "description": "Padding of the main content.",
2576
+ "name": "--punica-app-shell-padding"
2410
2577
  }
2411
2578
  ],
2412
- "superclass": {
2413
- "name": "PunicaElement",
2414
- "module": "/src/core/element.js"
2415
- },
2416
- "tagName": "punica-aspect-ratio",
2417
- "customElement": true
2418
- }
2419
- ],
2420
- "exports": [
2421
- {
2422
- "kind": "js",
2423
- "name": "PunicaAspectRatio",
2424
- "declaration": {
2425
- "name": "PunicaAspectRatio",
2426
- "module": "src/components/aspectRatio/aspectRatio.js"
2427
- }
2428
- }
2429
- ]
2430
- },
2431
- {
2432
- "kind": "javascript-module",
2433
- "path": "src/components/autocomplete/autocomplete.js",
2434
- "declarations": [
2435
- {
2436
- "kind": "class",
2437
- "description": "A text input that suggests values as the user types: an editable combobox\nwith list autocomplete.\n\nThe suggestions are `punica-option` children, or the `options` array for\ndata that arrives later: listen for `punica-input`, fetch, and assign\n`options`. The value is the picked option's `value`; with `free-text`, any\ntyped text is a value too.",
2438
- "name": "PunicaAutocomplete",
2439
- "cssProperties": [
2440
- {
2441
- "description": "Corner radius of the field.",
2442
- "name": "--punica-autocomplete-radius"
2443
- },
2579
+ "cssParts": [
2444
2580
  {
2445
- "description": "Minimum block size of the field.",
2446
- "name": "--punica-autocomplete-height"
2581
+ "description": "The grid.",
2582
+ "name": "base"
2447
2583
  },
2448
2584
  {
2449
- "description": "Inline padding of the field.",
2450
- "name": "--punica-autocomplete-padding"
2585
+ "description": "The skip-to-content button.",
2586
+ "name": "skip-link"
2451
2587
  },
2452
2588
  {
2453
- "description": "Border colour at rest.",
2454
- "name": "--punica-autocomplete-border-color"
2589
+ "description": "The header region.",
2590
+ "name": "header"
2455
2591
  },
2456
2592
  {
2457
- "description": "Field background.",
2458
- "name": "--punica-autocomplete-background"
2593
+ "description": "The start of the header holding the menu button, shown while collapsed; it draws the header's bottom line under the button.",
2594
+ "name": "menu-cell"
2459
2595
  },
2460
2596
  {
2461
- "description": "Smallest inline size.",
2462
- "name": "--punica-autocomplete-min-width"
2597
+ "description": "The button that opens the navigation drawer.",
2598
+ "name": "menu-button"
2463
2599
  },
2464
2600
  {
2465
- "description": "Largest block size of the list.",
2466
- "name": "--punica-autocomplete-listbox-max-height"
2467
- }
2468
- ],
2469
- "cssParts": [
2470
- {
2471
- "description": "The bordered box.",
2472
- "name": "field"
2601
+ "description": "The navigation region.",
2602
+ "name": "nav"
2473
2603
  },
2474
2604
  {
2475
- "description": "The text input, a combobox.",
2476
- "name": "input"
2605
+ "description": "The native `<main>` (a `<div>` while `embedded`).",
2606
+ "name": "main"
2477
2607
  },
2478
2608
  {
2479
- "description": "The clear button.",
2480
- "name": "clear"
2609
+ "description": "The panel region.",
2610
+ "name": "aside"
2481
2611
  },
2482
2612
  {
2483
- "description": "The floating list.",
2484
- "name": "listbox"
2613
+ "description": "The footer region.",
2614
+ "name": "footer"
2485
2615
  },
2486
2616
  {
2487
- "description": "Each row made from `options`.",
2488
- "name": "option"
2617
+ "description": "The `punica-mobile-nav` the navigation moves into.",
2618
+ "name": "drawer"
2489
2619
  }
2490
2620
  ],
2491
2621
  "slots": [
2492
2622
  {
2493
- "description": "The `punica-option` rows.",
2623
+ "description": "The main content, inside the `<main>` landmark.",
2494
2624
  "name": ""
2495
2625
  },
2496
2626
  {
2497
- "description": "Content before the input, an icon.",
2498
- "name": "start"
2627
+ "description": "Across the top: a `punica-top-nav`, a `punica-app-bar`.",
2628
+ "name": "header"
2499
2629
  },
2500
2630
  {
2501
- "description": "Content after the input.",
2502
- "name": "end"
2631
+ "description": "Down the inline-start side, in a drawer while collapsed: a `punica-side-nav`.",
2632
+ "name": "nav"
2633
+ },
2634
+ {
2635
+ "description": "A secondary panel at the inline-end side, under the main content while collapsed.",
2636
+ "name": "aside"
2637
+ },
2638
+ {
2639
+ "description": "Under the main content and the panel.",
2640
+ "name": "footer"
2503
2641
  }
2504
2642
  ],
2505
2643
  "members": [
@@ -2510,146 +2648,129 @@
2510
2648
  "text": "object"
2511
2649
  },
2512
2650
  "static": true,
2513
- "default": "{ value: { reflect: false }, placeholder: {}, label: {}, open: { type: Boolean }, freeText: { type: Boolean }, noFilter: { type: Boolean }, clearable: { type: Boolean }, readonly: { type: Boolean }, size: {}, fullWidth: { type: Boolean }, labelClear: { default: 'Clear' }, options: { type: Array, attribute: false } }"
2651
+ "default": "{ fixed: { type: Boolean }, embedded: { type: Boolean }, collapseBelow: { default: 'medium' }, navOpen: { type: Boolean }, labelMenu: { default: 'Menu' }, labelNav: { default: 'Navigation' }, labelSkip: { default: 'Skip to content' }, labelClose: { default: 'Close' } }"
2514
2652
  },
2515
2653
  {
2516
2654
  "kind": "field",
2517
2655
  "name": "styles",
2518
- "type": {
2519
- "text": "array"
2520
- },
2521
2656
  "static": true,
2522
- "default": "[overlayCss, fieldStyles, styles]"
2657
+ "default": "styles"
2523
2658
  },
2524
2659
  {
2525
2660
  "kind": "field",
2526
- "name": "shadowOptions",
2527
- "type": {
2528
- "text": "object"
2529
- },
2661
+ "name": "template",
2530
2662
  "static": true,
2531
- "default": "{ delegatesFocus: true }"
2663
+ "default": "` <div part=\"base\" class=\"base\"> <button part=\"skip-link\" class=\"skip\" type=\"button\"></button> <div part=\"header\" class=\"header\"> <div part=\"menu-cell\" class=\"menu-cell\"> <punica-mobile-nav part=\"drawer\" class=\"drawer\"> <button slot=\"trigger\" part=\"menu-button\" class=\"menu\" type=\"button\">${MENU_ICON}</button> </punica-mobile-nav> </div> <div class=\"header-content\"><slot name=\"header\"></slot></div> </div> <div part=\"nav\" class=\"nav\"><div class=\"nav-inner\"><slot name=\"nav\"></slot></div></div> <main part=\"main\" class=\"main\" tabindex=\"-1\"><slot></slot></main> <div part=\"aside\" class=\"aside\"><div class=\"aside-inner\"><slot name=\"aside\"></slot></div></div> <div part=\"footer\" class=\"footer\"><slot name=\"footer\"></slot></div> </div> `"
2532
2664
  },
2533
2665
  {
2534
2666
  "kind": "field",
2535
- "name": "template",
2536
- "static": true,
2537
- "default": "` <div part=\"field\" class=\"field\"> <slot name=\"start\"></slot> <input part=\"input\" class=\"control\" type=\"text\" role=\"combobox\" aria-autocomplete=\"list\" aria-haspopup=\"listbox\" aria-controls=\"listbox\" aria-expanded=\"false\" autocomplete=\"off\" autocapitalize=\"off\" spellcheck=\"false\"> <button part=\"clear\" class=\"icon-button\" type=\"button\" hidden>${icons.close}</button> <slot name=\"end\"></slot> </div> <div part=\"listbox\" id=\"listbox\" class=\"panel listbox\" role=\"listbox\" popover=\"manual\"><slot></slot></div> `"
2667
+ "name": "#base",
2668
+ "privacy": "private"
2538
2669
  },
2539
2670
  {
2540
2671
  "kind": "field",
2541
- "name": "#field",
2672
+ "name": "#skip",
2542
2673
  "privacy": "private"
2543
2674
  },
2544
2675
  {
2545
2676
  "kind": "field",
2546
- "name": "#input",
2677
+ "name": "#header",
2547
2678
  "privacy": "private"
2548
2679
  },
2549
2680
  {
2550
2681
  "kind": "field",
2551
- "name": "#clear",
2682
+ "name": "#navRegion",
2552
2683
  "privacy": "private"
2553
2684
  },
2554
2685
  {
2555
2686
  "kind": "field",
2556
- "name": "#listbox",
2687
+ "name": "#navInner",
2557
2688
  "privacy": "private"
2558
2689
  },
2559
2690
  {
2560
2691
  "kind": "field",
2561
- "name": "#slot",
2692
+ "name": "#menuCell",
2562
2693
  "privacy": "private"
2563
2694
  },
2564
2695
  {
2565
2696
  "kind": "field",
2566
- "name": "#surface",
2567
- "privacy": "private",
2568
- "default": "new FieldSurface(this, this.#listbox)"
2697
+ "name": "#main",
2698
+ "privacy": "private"
2569
2699
  },
2570
2700
  {
2571
2701
  "kind": "field",
2572
- "name": "#nav",
2573
- "privacy": "private",
2574
- "default": "new OptionNavigator(this.#input, () => this.#rows())"
2702
+ "name": "#aside",
2703
+ "privacy": "private"
2575
2704
  },
2576
2705
  {
2577
2706
  "kind": "field",
2578
- "name": "#generated",
2707
+ "name": "#asideInner",
2708
+ "privacy": "private"
2709
+ },
2710
+ {
2711
+ "kind": "field",
2712
+ "name": "#drawer",
2579
2713
  "privacy": "private",
2580
- "type": {
2581
- "text": "any[]"
2582
- },
2583
- "default": "[]",
2584
- "description": "Rows made from the `options` property."
2714
+ "default": "(this.$('punica-mobile-nav'))"
2585
2715
  },
2586
2716
  {
2587
2717
  "kind": "field",
2588
- "name": "#generatedFrom",
2718
+ "name": "#menu",
2719
+ "privacy": "private"
2720
+ },
2721
+ {
2722
+ "kind": "field",
2723
+ "name": "#slots",
2589
2724
  "privacy": "private",
2590
2725
  "type": {
2591
- "text": "unknown"
2726
+ "text": "object"
2592
2727
  },
2593
- "default": "null",
2594
- "description": "The array those rows were made from."
2728
+ "default": "{ header: this.$('slot[name=\"header\"]'), nav: this.$('slot[name=\"nav\"]'), aside: this.$('slot[name=\"aside\"]'), footer: this.$('slot[name=\"footer\"]') }"
2595
2729
  },
2596
2730
  {
2597
2731
  "kind": "field",
2598
- "name": "#typed",
2732
+ "name": "#collapsed",
2599
2733
  "privacy": "private",
2600
2734
  "type": {
2601
- "text": "string | null"
2735
+ "text": "boolean"
2602
2736
  },
2603
- "default": "null",
2604
- "description": "What the user typed since the last commit; null while the text is the value's own."
2737
+ "default": "false"
2605
2738
  },
2606
2739
  {
2607
2740
  "kind": "field",
2608
- "name": "#textKey",
2741
+ "name": "#resize",
2609
2742
  "privacy": "private",
2610
2743
  "type": {
2611
- "text": "string | null"
2744
+ "text": "ResizeObserver | null"
2612
2745
  },
2613
- "default": "null",
2614
- "description": "What the input's text was last written from."
2746
+ "default": "null"
2615
2747
  },
2616
2748
  {
2617
2749
  "kind": "field",
2618
- "name": "#touched",
2750
+ "name": "#frame",
2619
2751
  "privacy": "private",
2620
2752
  "type": {
2621
- "text": "boolean"
2753
+ "text": "number"
2622
2754
  },
2623
- "default": "false"
2755
+ "default": "0"
2624
2756
  },
2625
2757
  {
2626
2758
  "kind": "field",
2627
- "name": "#reason",
2759
+ "name": "#closeReason",
2628
2760
  "privacy": "private",
2629
2761
  "type": {
2630
2762
  "text": "string"
2631
2763
  },
2632
- "default": "'api'"
2633
- },
2634
- {
2635
- "kind": "method",
2636
- "name": "show",
2637
- "description": "Opens the list."
2638
- },
2639
- {
2640
- "kind": "method",
2641
- "name": "hide",
2642
- "description": "Closes the list."
2764
+ "default": "''"
2643
2765
  },
2644
2766
  {
2645
- "kind": "method",
2646
- "name": "focus",
2647
- "parameters": [
2648
- {
2649
- "name": "options"
2650
- }
2651
- ],
2652
- "description": "Moves focus to the text input."
2767
+ "kind": "field",
2768
+ "name": "collapsed",
2769
+ "readonly": true,
2770
+ "type": {
2771
+ "text": "boolean"
2772
+ },
2773
+ "description": "The shell is narrower than `collapse-below` (read-only)."
2653
2774
  },
2654
2775
  {
2655
2776
  "kind": "method",
@@ -2661,281 +2782,160 @@
2661
2782
  },
2662
2783
  {
2663
2784
  "kind": "method",
2664
- "name": "formReset"
2665
- },
2666
- {
2667
- "kind": "method",
2668
- "name": "formRestore",
2785
+ "name": "update",
2669
2786
  "parameters": [
2670
2787
  {
2671
- "name": "state"
2788
+ "name": "changed"
2672
2789
  }
2673
2790
  ]
2674
2791
  },
2675
2792
  {
2676
2793
  "kind": "method",
2677
- "name": "#rows",
2678
- "privacy": "private",
2679
- "description": "Every row: the generated ones, then the `punica-option` children.",
2680
- "return": {
2681
- "type": {
2682
- "text": "any[]"
2683
- }
2684
- }
2794
+ "name": "refresh",
2795
+ "description": "A region that scrolls on its own is a tab stop while it overflows, so a\nkeyboard can scroll it even when nothing inside takes focus. Call after\nchanging the content in a way that changes whether it overflows."
2685
2796
  },
2686
2797
  {
2687
2798
  "kind": "method",
2688
- "name": "#rowFrom",
2689
- "privacy": "private",
2690
- "parameters": [
2691
- {
2692
- "name": "event"
2693
- }
2694
- ]
2799
+ "name": "#tabScrollers",
2800
+ "privacy": "private"
2695
2801
  },
2696
2802
  {
2697
2803
  "kind": "method",
2698
- "name": "#textFor",
2804
+ "name": "#setMain",
2699
2805
  "privacy": "private",
2700
- "parameters": [
2701
- {
2702
- "name": "value"
2703
- }
2704
- ],
2705
- "description": "The text shown for a value: its option's label, else the value itself."
2706
- },
2707
- {
2708
- "kind": "method",
2709
- "name": "update"
2806
+ "description": "A `<main>`, or a `<div>` while embedded, keeping its content."
2710
2807
  },
2711
2808
  {
2712
2809
  "kind": "method",
2713
- "name": "#close",
2714
- "privacy": "private",
2715
- "parameters": [
2716
- {
2717
- "name": "reason",
2718
- "type": {
2719
- "text": "string"
2720
- }
2721
- }
2722
- ]
2810
+ "name": "#measure",
2811
+ "privacy": "private"
2723
2812
  },
2724
2813
  {
2725
2814
  "kind": "method",
2726
- "name": "#commit",
2815
+ "name": "#isNarrow",
2727
2816
  "privacy": "private",
2728
2817
  "parameters": [
2729
2818
  {
2730
- "name": "value",
2819
+ "name": "width",
2731
2820
  "type": {
2732
- "text": "string | null"
2821
+ "text": "number"
2733
2822
  }
2734
2823
  }
2735
2824
  ]
2736
2825
  },
2737
2826
  {
2738
2827
  "kind": "method",
2739
- "name": "#pick",
2828
+ "name": "#setCollapsed",
2740
2829
  "privacy": "private",
2741
2830
  "parameters": [
2742
2831
  {
2743
- "name": "option",
2832
+ "name": "narrow",
2744
2833
  "type": {
2745
- "text": "any"
2834
+ "text": "boolean"
2746
2835
  }
2747
2836
  }
2748
2837
  ]
2749
2838
  },
2750
2839
  {
2751
2840
  "kind": "method",
2752
- "name": "#commitText",
2753
- "privacy": "private",
2754
- "description": "Takes what was typed: an option with that label, free text, or nothing."
2755
- },
2756
- {
2757
- "kind": "method",
2758
- "name": "#onKeydown",
2841
+ "name": "#trackHeader",
2759
2842
  "privacy": "private",
2760
- "parameters": [
2761
- {
2762
- "name": "event",
2763
- "type": {
2764
- "text": "KeyboardEvent"
2765
- }
2766
- }
2767
- ]
2768
- },
2769
- {
2770
- "type": {
2771
- "text": "string | null"
2772
- },
2773
- "description": "The current value.",
2774
- "name": "value",
2775
- "kind": "field"
2776
- },
2777
- {
2778
- "type": {
2779
- "text": "(string | { value: string, label?: string, disabled?: boolean })[] | null"
2780
- },
2781
- "description": "Suggestions given as data; shown before the `punica-option` children.",
2782
- "name": "options",
2783
- "kind": "field"
2843
+ "description": "Sticky regions and a skipped-to main stop under the header, not behind it."
2784
2844
  }
2785
2845
  ],
2786
2846
  "events": [
2787
2847
  {
2788
- "description": "The user typed. `detail.value` is the text in the input.",
2789
- "name": "punica-input"
2790
- },
2791
- {
2792
- "description": "The user picked an option, committed free text or cleared. `detail.value` is the new value.",
2793
- "name": "punica-change"
2794
- },
2795
- {
2796
- "description": "The list opened.",
2848
+ "description": "The navigation drawer opened.",
2797
2849
  "name": "punica-open"
2798
2850
  },
2799
2851
  {
2800
- "description": "The list closed. `detail.reason` is `select`, `escape`, `outside`, `blur`, `empty` or `api`.",
2852
+ "description": "The navigation drawer closed. `detail` is `{ reason, returnValue }`; `reason` is `escape`, `backdrop`, `close-button`, `navigate`, `resize` (the shell grew past `collapse-below`) or `api`.",
2801
2853
  "name": "punica-close"
2802
2854
  }
2803
2855
  ],
2804
2856
  "attributes": [
2805
- {
2806
- "type": {
2807
- "text": "string"
2808
- },
2809
- "description": "Default value.",
2810
- "name": "value"
2811
- },
2812
- {
2813
- "type": {
2814
- "text": "string"
2815
- },
2816
- "description": "Text shown while the field is empty.",
2817
- "name": "placeholder"
2818
- },
2819
- {
2820
- "type": {
2821
- "text": "string"
2822
- },
2823
- "description": "Accessible name.",
2824
- "name": "label"
2825
- },
2826
2857
  {
2827
2858
  "type": {
2828
2859
  "text": "boolean"
2829
2860
  },
2830
- "description": "The list is showing, when it has rows to show.",
2831
- "name": "open"
2861
+ "description": "The shell is as tall as `--punica-app-shell-height` and each region scrolls on its own.",
2862
+ "name": "fixed"
2832
2863
  },
2833
2864
  {
2834
2865
  "type": {
2835
- "text": "boolean"
2866
+ "text": "'small' | 'medium' | 'large' | 'none'"
2836
2867
  },
2837
- "description": "Text that matches no option is taken as the value.",
2838
- "name": "free-text"
2868
+ "description": "Width under which the navigation becomes a drawer: 600, 900 or 1200 px, `medium` (900 px) by default; `none` never collapses.",
2869
+ "name": "collapse-below"
2839
2870
  },
2840
2871
  {
2841
2872
  "type": {
2842
2873
  "text": "boolean"
2843
2874
  },
2844
- "description": "The list is shown as given; for options already filtered by a server.",
2845
- "name": "no-filter"
2875
+ "description": "The shell is part of a page that has its own `<main>`: the content area is a plain element, not a second main landmark.",
2876
+ "name": "embedded"
2846
2877
  },
2847
2878
  {
2848
2879
  "type": {
2849
2880
  "text": "boolean"
2850
2881
  },
2851
- "description": "Shows a button that empties the value.",
2852
- "name": "clearable"
2882
+ "description": "The navigation drawer is showing; only while collapsed.",
2883
+ "name": "nav-open"
2853
2884
  },
2854
2885
  {
2855
2886
  "type": {
2856
2887
  "text": "string"
2857
2888
  },
2858
- "description": "Name the value is submitted under.",
2859
- "name": "name"
2860
- },
2861
- {
2862
- "type": {
2863
- "text": "boolean"
2864
- },
2865
- "description": "Takes no input and submits nothing.",
2866
- "name": "disabled"
2867
- },
2868
- {
2869
- "type": {
2870
- "text": "boolean"
2871
- },
2872
- "description": "Shows its value and takes no input.",
2873
- "name": "readonly"
2874
- },
2875
- {
2876
- "type": {
2877
- "text": "boolean"
2878
- },
2879
- "description": "A value is needed before the form submits.",
2880
- "name": "required"
2889
+ "description": "Accessible name of the menu button, `Menu` by default.",
2890
+ "name": "label-menu"
2881
2891
  },
2882
2892
  {
2883
2893
  "type": {
2884
- "text": "'small' | 'medium' | 'large'"
2894
+ "text": "string"
2885
2895
  },
2886
- "description": "Control height, `medium` by default.",
2887
- "name": "size"
2896
+ "description": "Accessible name of the navigation drawer, `Navigation` by default.",
2897
+ "name": "label-nav"
2888
2898
  },
2889
2899
  {
2890
2900
  "type": {
2891
- "text": "boolean"
2901
+ "text": "string"
2892
2902
  },
2893
- "description": "Fills its container's inline size.",
2894
- "name": "full-width"
2903
+ "description": "Text of the skip link, `Skip to content` by default.",
2904
+ "name": "label-skip"
2895
2905
  },
2896
2906
  {
2897
2907
  "type": {
2898
2908
  "text": "string"
2899
2909
  },
2900
- "description": "Name of the clear button, `Clear` by default.",
2901
- "name": "label-clear"
2910
+ "description": "Accessible name of the drawer's close button, `Close` by default.",
2911
+ "name": "label-close"
2902
2912
  }
2903
2913
  ],
2904
2914
  "cssStates": [
2905
2915
  {
2906
- "description": "The list is showing.",
2907
- "name": "open"
2908
- },
2909
- {
2910
- "description": "Disabled by itself or by a fieldset.",
2911
- "name": "disabled"
2916
+ "description": "The shell is narrower than `collapse-below`.",
2917
+ "name": "collapsed"
2912
2918
  },
2913
2919
  {
2914
- "description": "Invalid after the user touched it.",
2915
- "name": "user-invalid"
2916
- }
2917
- ],
2918
- "mixins": [
2919
- {
2920
- "name": "FormControl",
2921
- "module": "/src/core/form.js"
2920
+ "description": "There is content in the `nav` slot.",
2921
+ "name": "has-nav"
2922
2922
  }
2923
2923
  ],
2924
2924
  "superclass": {
2925
2925
  "name": "PunicaElement",
2926
2926
  "module": "/src/core/element.js"
2927
2927
  },
2928
- "tagName": "punica-autocomplete",
2928
+ "tagName": "punica-app-shell",
2929
2929
  "customElement": true
2930
2930
  }
2931
2931
  ],
2932
2932
  "exports": [
2933
2933
  {
2934
2934
  "kind": "js",
2935
- "name": "PunicaAutocomplete",
2935
+ "name": "PunicaAppShell",
2936
2936
  "declaration": {
2937
- "name": "PunicaAutocomplete",
2938
- "module": "src/components/autocomplete/autocomplete.js"
2937
+ "name": "PunicaAppShell",
2938
+ "module": "src/components/appShell/appShell.js"
2939
2939
  }
2940
2940
  }
2941
2941
  ]