@nordhealth/components 1.0.0-alpha.58 → 1.0.0-alpha.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/custom-elements.json +975 -975
  2. package/package.json +3 -3
@@ -1167,1146 +1167,1077 @@
1167
1167
  },
1168
1168
  {
1169
1169
  "kind": "javascript-module",
1170
- "path": "src/command-menu/CommandMenu.ts",
1170
+ "path": "src/card/Card.ts",
1171
1171
  "declarations": [
1172
1172
  {
1173
1173
  "kind": "class",
1174
- "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
1175
- "name": "CommandMenu",
1174
+ "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1175
+ "name": "Card",
1176
1176
  "slots": [
1177
1177
  {
1178
- "description": "Used to replace the default footer contents.",
1178
+ "description": "The card content.",
1179
+ "name": ""
1180
+ },
1181
+ {
1182
+ "description": "Optional slot that holds a header for the card.",
1183
+ "name": "header"
1184
+ },
1185
+ {
1186
+ "description": "Optional slot that holds footer content for the card.",
1179
1187
  "name": "footer"
1180
1188
  }
1181
1189
  ],
1182
1190
  "members": [
1183
1191
  {
1184
1192
  "kind": "field",
1185
- "name": "inputRef",
1186
- "privacy": "private"
1193
+ "name": "headerSlot",
1194
+ "privacy": "private",
1195
+ "default": "new SlotController(this, \"header\")"
1187
1196
  },
1188
1197
  {
1189
1198
  "kind": "field",
1190
- "name": "listRef",
1191
- "privacy": "private"
1199
+ "name": "footerSlot",
1200
+ "privacy": "private",
1201
+ "default": "new SlotController(this, \"footer\")"
1192
1202
  },
1193
1203
  {
1194
1204
  "kind": "field",
1195
- "name": "previousFocus",
1205
+ "name": "padding",
1196
1206
  "type": {
1197
- "text": "HTMLElement | undefined"
1207
+ "text": "\"m\" | \"l\" | \"none\""
1198
1208
  },
1199
- "privacy": "private"
1209
+ "default": "\"m\"",
1210
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1211
+ "attribute": "padding",
1212
+ "reflects": true
1200
1213
  },
1201
1214
  {
1202
1215
  "kind": "field",
1203
- "name": "dismissController",
1216
+ "name": "_warningLogged",
1217
+ "type": {
1218
+ "text": "boolean"
1219
+ },
1204
1220
  "privacy": "private",
1205
- "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.close(),\n })"
1221
+ "static": true,
1222
+ "default": "false",
1223
+ "inheritedFrom": {
1224
+ "name": "DraftComponentMixin",
1225
+ "module": "src/common/mixins/DraftComponentMixin.ts"
1226
+ }
1227
+ }
1228
+ ],
1229
+ "attributes": [
1230
+ {
1231
+ "name": "padding",
1232
+ "type": {
1233
+ "text": "\"m\" | \"l\" | \"none\""
1234
+ },
1235
+ "default": "\"m\"",
1236
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1237
+ "fieldName": "padding"
1238
+ }
1239
+ ],
1240
+ "mixins": [
1241
+ {
1242
+ "name": "DraftComponentMixin",
1243
+ "module": "/src/common/mixins/DraftComponentMixin.js"
1244
+ }
1245
+ ],
1246
+ "superclass": {
1247
+ "name": "LitElement",
1248
+ "package": "lit"
1249
+ },
1250
+ "status": "draft",
1251
+ "category": "structure",
1252
+ "tagName": "nord-card",
1253
+ "customElement": true
1254
+ }
1255
+ ],
1256
+ "exports": [
1257
+ {
1258
+ "kind": "js",
1259
+ "name": "default",
1260
+ "declaration": {
1261
+ "name": "Card",
1262
+ "module": "src/card/Card.ts"
1263
+ }
1264
+ },
1265
+ {
1266
+ "kind": "custom-element-definition",
1267
+ "name": "nord-card",
1268
+ "declaration": {
1269
+ "name": "Card",
1270
+ "module": "src/card/Card.ts"
1271
+ }
1272
+ }
1273
+ ],
1274
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
1275
+ },
1276
+ {
1277
+ "kind": "javascript-module",
1278
+ "path": "src/checkbox/Checkbox.ts",
1279
+ "declarations": [
1280
+ {
1281
+ "kind": "class",
1282
+ "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
1283
+ "name": "Checkbox",
1284
+ "slots": [
1285
+ {
1286
+ "description": "Use when a label requires more than plain text.",
1287
+ "name": "label"
1288
+ },
1289
+ {
1290
+ "description": "Optional slot that holds hint text for the input.",
1291
+ "name": "hint"
1206
1292
  },
1293
+ {
1294
+ "description": "Optional slot that holds error text for the input.",
1295
+ "name": "error"
1296
+ }
1297
+ ],
1298
+ "members": [
1207
1299
  {
1208
1300
  "kind": "field",
1209
- "name": "keyboardController",
1210
- "privacy": "private",
1211
- "default": "new KeyboardController(this, {\n trigger: () => this.select(),\n goBack: () => this.goBack(),\n end: () => this.end(),\n start: () => this.start(),\n next: () => this.next(),\n previous: () => this.previous(),\n toggleOpen: () => this.toggleOpen(),\n })"
1301
+ "name": "formValue",
1302
+ "privacy": "protected",
1303
+ "inheritedFrom": {
1304
+ "name": "FormAssociatedMixin",
1305
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1306
+ }
1212
1307
  },
1213
1308
  {
1214
1309
  "kind": "field",
1215
- "name": "open",
1310
+ "name": "checked",
1216
1311
  "type": {
1217
1312
  "text": "boolean"
1218
1313
  },
1219
1314
  "default": "false",
1220
- "description": "Show or hide the command menu.",
1221
- "attribute": "open"
1315
+ "description": "Controls whether the checkbox is checked or not.",
1316
+ "attribute": "checked"
1222
1317
  },
1223
1318
  {
1224
- "kind": "field",
1225
- "name": "placeholder",
1226
- "type": {
1227
- "text": "string"
1319
+ "kind": "method",
1320
+ "name": "handleChange",
1321
+ "privacy": "protected",
1322
+ "return": {
1323
+ "type": {
1324
+ "text": "void"
1325
+ }
1228
1326
  },
1229
- "default": "\"Type a command or search...\"",
1230
- "description": "Hint text to display in the Command Menu search field.",
1231
- "attribute": "placeholder"
1327
+ "parameters": [
1328
+ {
1329
+ "name": "e",
1330
+ "type": {
1331
+ "text": "Event"
1332
+ }
1333
+ }
1334
+ ],
1335
+ "inheritedFrom": {
1336
+ "name": "FormAssociatedMixin",
1337
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1338
+ }
1232
1339
  },
1233
1340
  {
1234
1341
  "kind": "field",
1235
- "name": "commands",
1236
- "type": {
1237
- "text": "Array<ICommandMenuAction>"
1238
- },
1239
- "default": "[]",
1240
- "description": "Array of commands to be included in the menu.\nPlease see “Commands data” section for more documentation."
1342
+ "name": "labelSlot",
1343
+ "privacy": "protected",
1344
+ "default": "new SlotController(this, \"label\")",
1345
+ "inheritedFrom": {
1346
+ "name": "FormAssociatedMixin",
1347
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1348
+ }
1241
1349
  },
1242
1350
  {
1243
1351
  "kind": "field",
1244
- "name": "parent",
1245
- "type": {
1246
- "text": "string | undefined"
1247
- },
1248
- "privacy": "private"
1352
+ "name": "errorSlot",
1353
+ "privacy": "protected",
1354
+ "default": "new SlotController(this, \"error\")",
1355
+ "inheritedFrom": {
1356
+ "name": "FormAssociatedMixin",
1357
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1358
+ }
1249
1359
  },
1250
1360
  {
1251
1361
  "kind": "field",
1252
- "name": "search",
1362
+ "name": "hintSlot",
1363
+ "privacy": "protected",
1364
+ "default": "new SlotController(this, \"hint\")",
1365
+ "inheritedFrom": {
1366
+ "name": "FormAssociatedMixin",
1367
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1368
+ }
1369
+ },
1370
+ {
1371
+ "kind": "field",
1372
+ "name": "formData",
1373
+ "privacy": "protected",
1374
+ "default": "new FormDataController(this, { value: () => this.formValue })",
1375
+ "inheritedFrom": {
1376
+ "name": "FormAssociatedMixin",
1377
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1378
+ }
1379
+ },
1380
+ {
1381
+ "kind": "field",
1382
+ "name": "inputId",
1253
1383
  "type": {
1254
1384
  "text": "string"
1255
1385
  },
1256
- "privacy": "private",
1257
- "default": "\"\""
1386
+ "privacy": "protected",
1387
+ "default": "\"input\"",
1388
+ "inheritedFrom": {
1389
+ "name": "FormAssociatedMixin",
1390
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1391
+ }
1258
1392
  },
1259
1393
  {
1260
1394
  "kind": "field",
1261
- "name": "bump",
1395
+ "name": "errorId",
1262
1396
  "type": {
1263
- "text": "boolean"
1397
+ "text": "string"
1264
1398
  },
1265
- "privacy": "private",
1266
- "default": "true"
1399
+ "privacy": "protected",
1400
+ "default": "\"error\"",
1401
+ "inheritedFrom": {
1402
+ "name": "FormAssociatedMixin",
1403
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1404
+ }
1267
1405
  },
1268
1406
  {
1269
1407
  "kind": "field",
1270
- "name": "selectedIndex",
1408
+ "name": "hintId",
1271
1409
  "type": {
1272
- "text": "number"
1410
+ "text": "string"
1273
1411
  },
1274
- "privacy": "private",
1275
- "default": "0"
1412
+ "privacy": "protected",
1413
+ "default": "\"hint\"",
1414
+ "inheritedFrom": {
1415
+ "name": "FormAssociatedMixin",
1416
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1417
+ }
1276
1418
  },
1277
1419
  {
1278
1420
  "kind": "field",
1279
- "name": "filteredCommands",
1421
+ "name": "label",
1280
1422
  "type": {
1281
- "text": "Array<ICommandMenuAction>"
1423
+ "text": "string"
1282
1424
  },
1283
- "privacy": "private",
1284
- "default": "[]"
1425
+ "default": "\"\"",
1426
+ "description": "Label for the input.",
1427
+ "attribute": "label",
1428
+ "inheritedFrom": {
1429
+ "name": "FormAssociatedMixin",
1430
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1431
+ }
1285
1432
  },
1286
1433
  {
1287
1434
  "kind": "field",
1288
- "name": "selected",
1435
+ "name": "hint",
1289
1436
  "type": {
1290
- "text": "ICommandMenuAction"
1437
+ "text": "string | undefined"
1291
1438
  },
1292
- "privacy": "private"
1293
- },
1294
- {
1295
- "kind": "method",
1296
- "name": "show",
1297
- "parameters": [
1298
- {
1299
- "name": "options",
1300
- "default": "{}",
1301
- "type": {
1302
- "text": "{ parent?: string }"
1303
- },
1304
- "description": "allows you to open the menu filtered to a specific parent command."
1305
- }
1306
- ],
1307
- "description": "Show the command menu programmatically."
1308
- },
1309
- {
1310
- "kind": "method",
1311
- "name": "close",
1312
- "description": "Close the command menu programmatically."
1313
- },
1314
- {
1315
- "kind": "method",
1316
- "name": "toggleOpen",
1317
- "description": "Toggle the open state programmatically."
1439
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1440
+ "attribute": "hint",
1441
+ "inheritedFrom": {
1442
+ "name": "FormAssociatedMixin",
1443
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1444
+ }
1318
1445
  },
1319
1446
  {
1320
- "kind": "method",
1321
- "name": "focus",
1322
- "description": "Focus the command menu's input."
1447
+ "kind": "field",
1448
+ "name": "hideLabel",
1449
+ "type": {
1450
+ "text": "boolean"
1451
+ },
1452
+ "default": "false",
1453
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1454
+ "attribute": "hide-label",
1455
+ "inheritedFrom": {
1456
+ "name": "FormAssociatedMixin",
1457
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1458
+ }
1323
1459
  },
1324
1460
  {
1325
- "kind": "method",
1326
- "name": "renderNoResults",
1327
- "privacy": "private"
1461
+ "kind": "field",
1462
+ "name": "placeholder",
1463
+ "type": {
1464
+ "text": "string | undefined"
1465
+ },
1466
+ "description": "Placeholder text to display within the input.",
1467
+ "attribute": "placeholder",
1468
+ "inheritedFrom": {
1469
+ "name": "FormAssociatedMixin",
1470
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1471
+ }
1328
1472
  },
1329
1473
  {
1330
- "kind": "method",
1331
- "name": "renderSection",
1332
- "privacy": "private",
1333
- "parameters": [
1334
- {
1335
- "name": "section",
1336
- "type": {
1337
- "text": "string | undefined"
1338
- }
1339
- },
1340
- {
1341
- "name": "commands",
1342
- "type": {
1343
- "text": "ICommandMenuAction[]"
1344
- }
1345
- }
1346
- ]
1474
+ "kind": "field",
1475
+ "name": "error",
1476
+ "type": {
1477
+ "text": "string | undefined"
1478
+ },
1479
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1480
+ "attribute": "error",
1481
+ "inheritedFrom": {
1482
+ "name": "FormAssociatedMixin",
1483
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1484
+ }
1347
1485
  },
1348
1486
  {
1349
- "kind": "method",
1350
- "name": "handleAnimationEnd",
1351
- "privacy": "private"
1487
+ "kind": "field",
1488
+ "name": "required",
1489
+ "type": {
1490
+ "text": "boolean"
1491
+ },
1492
+ "default": "false",
1493
+ "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
1494
+ "attribute": "required",
1495
+ "inheritedFrom": {
1496
+ "name": "FormAssociatedMixin",
1497
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1498
+ }
1352
1499
  },
1353
1500
  {
1354
- "kind": "method",
1355
- "name": "handleBlur",
1356
- "privacy": "private"
1501
+ "kind": "field",
1502
+ "name": "expand",
1503
+ "type": {
1504
+ "text": "boolean"
1505
+ },
1506
+ "default": "false",
1507
+ "description": "Controls whether the input expands to fill the width of its container.",
1508
+ "attribute": "expand",
1509
+ "reflects": true,
1510
+ "inheritedFrom": {
1511
+ "name": "FormAssociatedMixin",
1512
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1513
+ }
1357
1514
  },
1358
1515
  {
1359
1516
  "kind": "method",
1360
1517
  "name": "handleInput",
1361
- "privacy": "private",
1362
- "parameters": [
1363
- {
1364
- "name": "event",
1365
- "type": {
1366
- "text": "KeyboardEvent"
1367
- }
1368
- }
1369
- ]
1370
- },
1371
- {
1372
- "kind": "method",
1373
- "name": "select",
1374
- "privacy": "private",
1518
+ "privacy": "protected",
1375
1519
  "parameters": [
1376
1520
  {
1377
- "name": "command",
1378
- "default": "this.selected",
1521
+ "name": "e",
1379
1522
  "type": {
1380
- "text": "ICommandMenuAction"
1523
+ "text": "Event"
1381
1524
  }
1382
1525
  }
1383
- ]
1384
- },
1385
- {
1386
- "kind": "method",
1387
- "name": "start",
1388
- "privacy": "private"
1389
- },
1390
- {
1391
- "kind": "method",
1392
- "name": "end",
1393
- "privacy": "private"
1526
+ ],
1527
+ "inheritedFrom": {
1528
+ "name": "FormAssociatedMixin",
1529
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1530
+ }
1394
1531
  },
1395
1532
  {
1396
1533
  "kind": "method",
1397
- "name": "next",
1398
- "privacy": "private"
1534
+ "name": "renderLabel",
1535
+ "privacy": "protected",
1536
+ "inheritedFrom": {
1537
+ "name": "FormAssociatedMixin",
1538
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1539
+ }
1399
1540
  },
1400
1541
  {
1401
1542
  "kind": "method",
1402
- "name": "previous",
1403
- "privacy": "private"
1543
+ "name": "renderError",
1544
+ "privacy": "protected",
1545
+ "inheritedFrom": {
1546
+ "name": "FormAssociatedMixin",
1547
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1548
+ }
1404
1549
  },
1405
1550
  {
1406
1551
  "kind": "method",
1407
- "name": "goBack",
1408
- "privacy": "private"
1552
+ "name": "getDescribedBy",
1553
+ "privacy": "protected",
1554
+ "inheritedFrom": {
1555
+ "name": "FormAssociatedMixin",
1556
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1557
+ }
1409
1558
  },
1410
1559
  {
1411
1560
  "kind": "method",
1412
- "name": "setParent",
1413
- "privacy": "private",
1414
- "parameters": [
1415
- {
1416
- "name": "parent",
1417
- "optional": true,
1418
- "type": {
1419
- "text": "string"
1420
- }
1421
- }
1422
- ]
1561
+ "name": "getInvalid",
1562
+ "privacy": "protected",
1563
+ "inheritedFrom": {
1564
+ "name": "FormAssociatedMixin",
1565
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1566
+ }
1423
1567
  },
1424
1568
  {
1425
- "kind": "method",
1426
- "name": "setSearch",
1427
- "privacy": "private",
1428
- "parameters": [
1429
- {
1430
- "name": "str",
1431
- "type": {
1432
- "text": "string"
1433
- }
1434
- }
1435
- ]
1569
+ "kind": "field",
1570
+ "name": "hasHint",
1571
+ "privacy": "protected",
1572
+ "inheritedFrom": {
1573
+ "name": "FormAssociatedMixin",
1574
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1575
+ }
1436
1576
  },
1437
1577
  {
1438
- "kind": "method",
1439
- "name": "filterCommands",
1440
- "privacy": "private"
1578
+ "kind": "field",
1579
+ "name": "hasError",
1580
+ "privacy": "protected",
1581
+ "inheritedFrom": {
1582
+ "name": "FormAssociatedMixin",
1583
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1584
+ }
1441
1585
  },
1442
1586
  {
1443
1587
  "kind": "field",
1444
- "name": "_warningLogged",
1588
+ "name": "disabled",
1445
1589
  "type": {
1446
1590
  "text": "boolean"
1447
1591
  },
1448
- "privacy": "private",
1449
- "static": true,
1450
1592
  "default": "false",
1593
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1594
+ "attribute": "disabled",
1595
+ "reflects": true,
1451
1596
  "inheritedFrom": {
1452
- "name": "DraftComponentMixin",
1453
- "module": "src/common/mixins/DraftComponentMixin.ts"
1597
+ "name": "InputMixin",
1598
+ "module": "src/common/mixins/InputMixin.ts"
1454
1599
  }
1455
- }
1456
- ],
1457
- "events": [
1600
+ },
1458
1601
  {
1459
- "name": "open",
1602
+ "kind": "field",
1603
+ "name": "name",
1460
1604
  "type": {
1461
- "text": "NordEvent"
1605
+ "text": "string | undefined"
1462
1606
  },
1463
- "description": "The command menu was opened."
1607
+ "description": "The name of the form component.",
1608
+ "attribute": "name",
1609
+ "inheritedFrom": {
1610
+ "name": "InputMixin",
1611
+ "module": "src/common/mixins/InputMixin.ts"
1612
+ }
1464
1613
  },
1465
1614
  {
1466
- "name": "close",
1615
+ "kind": "field",
1616
+ "name": "value",
1467
1617
  "type": {
1468
- "text": "NordEvent"
1618
+ "text": "string"
1469
1619
  },
1470
- "description": "The command menu was closed."
1471
- },
1472
- {
1473
- "type": {
1474
- "text": "SelectEvent"
1475
- },
1476
- "description": "User selected a command from the menu.",
1477
- "name": "nord-select"
1478
- }
1479
- ],
1480
- "attributes": [
1481
- {
1482
- "name": "open",
1483
- "type": {
1484
- "text": "boolean"
1485
- },
1486
- "default": "false",
1487
- "description": "Show or hide the command menu.",
1488
- "fieldName": "open"
1489
- },
1490
- {
1491
- "name": "placeholder",
1492
- "type": {
1493
- "text": "string"
1494
- },
1495
- "default": "\"Type a command or search...\"",
1496
- "description": "Hint text to display in the Command Menu search field.",
1497
- "fieldName": "placeholder"
1498
- }
1499
- ],
1500
- "mixins": [
1501
- {
1502
- "name": "DraftComponentMixin",
1503
- "module": "/src/common/mixins/DraftComponentMixin.js"
1504
- }
1505
- ],
1506
- "superclass": {
1507
- "name": "LitElement",
1508
- "package": "lit"
1509
- },
1510
- "status": "draft",
1511
- "category": "action",
1512
- "tagName": "nord-command-menu",
1513
- "customElement": true
1514
- }
1515
- ],
1516
- "exports": [
1517
- {
1518
- "kind": "js",
1519
- "name": "default",
1520
- "declaration": {
1521
- "name": "CommandMenu",
1522
- "module": "src/command-menu/CommandMenu.ts"
1523
- }
1524
- },
1525
- {
1526
- "kind": "custom-element-definition",
1527
- "name": "nord-command-menu",
1528
- "declaration": {
1529
- "name": "CommandMenu",
1530
- "module": "src/command-menu/CommandMenu.ts"
1531
- }
1532
- }
1533
- ],
1534
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
1535
- },
1536
- {
1537
- "kind": "javascript-module",
1538
- "path": "src/command-menu/CommandMenuAction.ts",
1539
- "declarations": [
1540
- {
1541
- "kind": "class",
1542
- "description": "Command Menu Action displays a single action that can be executed by the user. For usage examples, please see Command Menu component.",
1543
- "name": "CommandMenuAction",
1544
- "members": [
1545
- {
1546
- "kind": "field",
1547
- "name": "command",
1548
- "type": {
1549
- "text": "ICommandMenuAction"
1550
- },
1551
- "attribute": "command"
1552
- },
1553
- {
1554
- "kind": "field",
1555
- "name": "selected",
1556
- "type": {
1557
- "text": "boolean"
1558
- },
1559
- "default": "false",
1560
- "attribute": "selected"
1561
- },
1562
- {
1563
- "kind": "method",
1564
- "name": "ensureInView",
1565
- "privacy": "private",
1566
- "description": "Scroll to show element"
1567
- },
1568
- {
1569
- "kind": "method",
1570
- "name": "renderShortcut",
1571
- "privacy": "private"
1572
- }
1573
- ],
1574
- "attributes": [
1575
- {
1576
- "name": "command",
1577
- "type": {
1578
- "text": "ICommandMenuAction"
1579
- },
1580
- "fieldName": "command"
1581
- },
1582
- {
1583
- "name": "selected",
1584
- "type": {
1585
- "text": "boolean"
1586
- },
1587
- "default": "false",
1588
- "fieldName": "selected"
1589
- }
1590
- ],
1591
- "superclass": {
1592
- "name": "LitElement",
1593
- "package": "lit"
1594
- },
1595
- "status": "internal",
1596
- "category": null,
1597
- "tagName": "nord-command-menu-action",
1598
- "customElement": true
1599
- }
1600
- ],
1601
- "exports": [
1602
- {
1603
- "kind": "js",
1604
- "name": "default",
1605
- "declaration": {
1606
- "name": "CommandMenuAction",
1607
- "module": "src/command-menu/CommandMenuAction.ts"
1608
- }
1609
- },
1610
- {
1611
- "kind": "custom-element-definition",
1612
- "name": "nord-command-menu-action",
1613
- "declaration": {
1614
- "name": "CommandMenuAction",
1615
- "module": "src/command-menu/CommandMenuAction.ts"
1616
- }
1617
- }
1618
- ],
1619
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
1620
- },
1621
- {
1622
- "kind": "javascript-module",
1623
- "path": "src/command-menu/ICommandMenuAction.ts",
1624
- "declarations": [],
1625
- "exports": [],
1626
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
1627
- },
1628
- {
1629
- "kind": "javascript-module",
1630
- "path": "src/command-menu/KeyboardController.ts",
1631
- "declarations": [
1632
- {
1633
- "kind": "class",
1634
- "description": "",
1635
- "name": "KeyboardController",
1636
- "members": [
1637
- {
1638
- "kind": "field",
1639
- "name": "host",
1640
- "type": {
1641
- "text": "CommandMenu"
1642
- },
1643
- "privacy": "private",
1644
- "default": "host"
1645
- },
1646
- {
1647
- "kind": "field",
1648
- "name": "globalShortcuts",
1649
- "type": {
1650
- "text": "ShortcutController"
1651
- },
1652
- "privacy": "private",
1653
- "default": "new ShortcutController(host, { \"$mod+k\": preventDefault(actions.toggleOpen) })"
1654
- },
1655
- {
1656
- "kind": "field",
1657
- "name": "navigationShortcuts",
1658
- "type": {
1659
- "text": "ShortcutController"
1660
- },
1661
- "privacy": "private",
1662
- "default": "new ShortcutController(\n host,\n {\n Enter: preventDefault(actions.trigger),\n Backspace: actions.goBack, // we don't want to prevent default, since that would stop backspace deleting chars\n End: preventDefault(actions.end),\n Home: preventDefault(actions.start),\n ArrowDown: preventDefault(actions.next),\n ArrowUp: preventDefault(actions.previous),\n },\n host\n )"
1663
- },
1664
- {
1665
- "kind": "field",
1666
- "name": "commandShortcuts",
1667
- "type": {
1668
- "text": "ShortcutController"
1669
- },
1670
- "privacy": "private",
1671
- "default": "new ShortcutController(host)"
1672
- },
1673
- {
1674
- "kind": "method",
1675
- "name": "registerCommandShortcuts"
1676
- }
1677
- ]
1678
- }
1679
- ],
1680
- "exports": [
1681
- {
1682
- "kind": "js",
1683
- "name": "KeyboardController",
1684
- "declaration": {
1685
- "name": "KeyboardController",
1686
- "module": "src/command-menu/KeyboardController.ts"
1687
- }
1688
- }
1689
- ],
1690
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
1691
- },
1692
- {
1693
- "kind": "javascript-module",
1694
- "path": "src/command-menu/SelectEvent.ts",
1695
- "declarations": [
1696
- {
1697
- "kind": "class",
1698
- "description": "",
1699
- "name": "SelectEvent",
1700
- "members": [
1701
- {
1702
- "kind": "field",
1703
- "name": "eventName",
1704
- "type": {
1705
- "text": "string"
1706
- },
1707
- "static": true,
1708
- "default": "\"nord-select\""
1709
- },
1710
- {
1711
- "kind": "field",
1712
- "name": "command",
1713
- "type": {
1714
- "text": "ICommandMenuAction"
1715
- },
1716
- "default": "command"
1717
- }
1718
- ],
1719
- "superclass": {
1720
- "name": "NordEvent",
1721
- "module": "/src/common/events.js"
1722
- }
1723
- }
1724
- ],
1725
- "exports": [
1726
- {
1727
- "kind": "js",
1728
- "name": "SelectEvent",
1729
- "declaration": {
1730
- "name": "SelectEvent",
1731
- "module": "src/command-menu/SelectEvent.ts"
1732
- }
1733
- }
1734
- ],
1735
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
1736
- },
1737
- {
1738
- "kind": "javascript-module",
1739
- "path": "src/checkbox/Checkbox.ts",
1740
- "declarations": [
1741
- {
1742
- "kind": "class",
1743
- "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
1744
- "name": "Checkbox",
1745
- "slots": [
1746
- {
1747
- "description": "Use when a label requires more than plain text.",
1748
- "name": "label"
1749
- },
1750
- {
1751
- "description": "Optional slot that holds hint text for the input.",
1752
- "name": "hint"
1620
+ "default": "\"\"",
1621
+ "description": "The value of the form component.",
1622
+ "attribute": "value",
1623
+ "inheritedFrom": {
1624
+ "name": "InputMixin",
1625
+ "module": "src/common/mixins/InputMixin.ts"
1626
+ }
1753
1627
  },
1754
- {
1755
- "description": "Optional slot that holds error text for the input.",
1756
- "name": "error"
1757
- }
1758
- ],
1759
- "members": [
1760
1628
  {
1761
1629
  "kind": "field",
1762
- "name": "formValue",
1630
+ "name": "form",
1763
1631
  "privacy": "protected",
1632
+ "description": "Gets the form, if any, associated with the form element.",
1764
1633
  "inheritedFrom": {
1765
- "name": "FormAssociatedMixin",
1766
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1634
+ "name": "InputMixin",
1635
+ "module": "src/common/mixins/InputMixin.ts"
1767
1636
  }
1768
1637
  },
1769
1638
  {
1770
1639
  "kind": "field",
1771
- "name": "checked",
1772
- "type": {
1773
- "text": "boolean"
1774
- },
1775
- "default": "false",
1776
- "description": "Controls whether the checkbox is checked or not.",
1777
- "attribute": "checked"
1640
+ "name": "focusableRef",
1641
+ "privacy": "protected",
1642
+ "inheritedFrom": {
1643
+ "name": "FocusableMixin",
1644
+ "module": "src/common/mixins/FocusableMixin.ts"
1645
+ }
1778
1646
  },
1779
1647
  {
1780
1648
  "kind": "method",
1781
- "name": "handleChange",
1782
- "privacy": "protected",
1783
- "return": {
1784
- "type": {
1785
- "text": "void"
1786
- }
1787
- },
1649
+ "name": "focus",
1788
1650
  "parameters": [
1789
1651
  {
1790
- "name": "e",
1652
+ "name": "options",
1653
+ "optional": true,
1791
1654
  "type": {
1792
- "text": "Event"
1793
- }
1655
+ "text": "FocusOptions"
1656
+ },
1657
+ "description": "An object which controls aspects of the focusing process."
1794
1658
  }
1795
1659
  ],
1660
+ "description": "Programmatically move focus to the component.",
1796
1661
  "inheritedFrom": {
1797
- "name": "FormAssociatedMixin",
1798
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1799
- }
1800
- },
1801
- {
1802
- "kind": "field",
1803
- "name": "labelSlot",
1804
- "privacy": "protected",
1805
- "default": "new SlotController(this, \"label\")",
1806
- "inheritedFrom": {
1807
- "name": "FormAssociatedMixin",
1808
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1809
- }
1810
- },
1811
- {
1812
- "kind": "field",
1813
- "name": "errorSlot",
1814
- "privacy": "protected",
1815
- "default": "new SlotController(this, \"error\")",
1816
- "inheritedFrom": {
1817
- "name": "FormAssociatedMixin",
1818
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1819
- }
1820
- },
1821
- {
1822
- "kind": "field",
1823
- "name": "hintSlot",
1824
- "privacy": "protected",
1825
- "default": "new SlotController(this, \"hint\")",
1826
- "inheritedFrom": {
1827
- "name": "FormAssociatedMixin",
1828
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1662
+ "name": "FocusableMixin",
1663
+ "module": "src/common/mixins/FocusableMixin.ts"
1829
1664
  }
1830
1665
  },
1831
1666
  {
1832
- "kind": "field",
1833
- "name": "formData",
1834
- "privacy": "protected",
1835
- "default": "new FormDataController(this, { value: () => this.formValue })",
1667
+ "kind": "method",
1668
+ "name": "blur",
1669
+ "description": "Programmatically remove focus from the component.",
1836
1670
  "inheritedFrom": {
1837
- "name": "FormAssociatedMixin",
1838
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1671
+ "name": "FocusableMixin",
1672
+ "module": "src/common/mixins/FocusableMixin.ts"
1839
1673
  }
1840
1674
  },
1841
1675
  {
1842
- "kind": "field",
1843
- "name": "inputId",
1844
- "type": {
1845
- "text": "string"
1846
- },
1847
- "privacy": "protected",
1848
- "default": "\"input\"",
1676
+ "kind": "method",
1677
+ "name": "click",
1678
+ "description": "Programmatically simulates a click on the component.",
1849
1679
  "inheritedFrom": {
1850
- "name": "FormAssociatedMixin",
1851
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1680
+ "name": "FocusableMixin",
1681
+ "module": "src/common/mixins/FocusableMixin.ts"
1852
1682
  }
1853
1683
  },
1854
1684
  {
1855
1685
  "kind": "field",
1856
- "name": "errorId",
1686
+ "name": "_warningLogged",
1857
1687
  "type": {
1858
- "text": "string"
1688
+ "text": "boolean"
1859
1689
  },
1860
- "privacy": "protected",
1861
- "default": "\"error\"",
1690
+ "privacy": "private",
1691
+ "static": true,
1692
+ "default": "false",
1862
1693
  "inheritedFrom": {
1863
- "name": "FormAssociatedMixin",
1864
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1694
+ "name": "DraftComponentMixin",
1695
+ "module": "src/common/mixins/DraftComponentMixin.ts"
1865
1696
  }
1866
- },
1697
+ }
1698
+ ],
1699
+ "attributes": [
1867
1700
  {
1868
- "kind": "field",
1869
- "name": "hintId",
1701
+ "name": "checked",
1870
1702
  "type": {
1871
- "text": "string"
1703
+ "text": "boolean"
1872
1704
  },
1873
- "privacy": "protected",
1874
- "default": "\"hint\"",
1875
- "inheritedFrom": {
1876
- "name": "FormAssociatedMixin",
1877
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1878
- }
1705
+ "default": "false",
1706
+ "description": "Controls whether the checkbox is checked or not.",
1707
+ "fieldName": "checked"
1879
1708
  },
1880
1709
  {
1881
- "kind": "field",
1882
1710
  "name": "label",
1883
1711
  "type": {
1884
1712
  "text": "string"
1885
1713
  },
1886
1714
  "default": "\"\"",
1887
1715
  "description": "Label for the input.",
1888
- "attribute": "label",
1716
+ "fieldName": "label",
1889
1717
  "inheritedFrom": {
1890
1718
  "name": "FormAssociatedMixin",
1891
1719
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1892
1720
  }
1893
1721
  },
1894
1722
  {
1895
- "kind": "field",
1896
1723
  "name": "hint",
1897
1724
  "type": {
1898
1725
  "text": "string | undefined"
1899
1726
  },
1900
1727
  "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1901
- "attribute": "hint",
1728
+ "fieldName": "hint",
1902
1729
  "inheritedFrom": {
1903
1730
  "name": "FormAssociatedMixin",
1904
1731
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1905
1732
  }
1906
1733
  },
1907
1734
  {
1908
- "kind": "field",
1909
- "name": "hideLabel",
1735
+ "name": "hide-label",
1910
1736
  "type": {
1911
1737
  "text": "boolean"
1912
1738
  },
1913
1739
  "default": "false",
1914
1740
  "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1915
- "attribute": "hide-label",
1741
+ "fieldName": "hideLabel",
1916
1742
  "inheritedFrom": {
1917
1743
  "name": "FormAssociatedMixin",
1918
1744
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1919
1745
  }
1920
1746
  },
1921
1747
  {
1922
- "kind": "field",
1923
1748
  "name": "placeholder",
1924
1749
  "type": {
1925
1750
  "text": "string | undefined"
1926
1751
  },
1927
1752
  "description": "Placeholder text to display within the input.",
1928
- "attribute": "placeholder",
1753
+ "fieldName": "placeholder",
1929
1754
  "inheritedFrom": {
1930
1755
  "name": "FormAssociatedMixin",
1931
1756
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1932
1757
  }
1933
1758
  },
1934
1759
  {
1935
- "kind": "field",
1936
1760
  "name": "error",
1937
1761
  "type": {
1938
1762
  "text": "string | undefined"
1939
1763
  },
1940
1764
  "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1941
- "attribute": "error",
1765
+ "fieldName": "error",
1942
1766
  "inheritedFrom": {
1943
1767
  "name": "FormAssociatedMixin",
1944
1768
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1945
1769
  }
1946
1770
  },
1947
1771
  {
1948
- "kind": "field",
1949
1772
  "name": "required",
1950
1773
  "type": {
1951
1774
  "text": "boolean"
1952
1775
  },
1953
1776
  "default": "false",
1954
1777
  "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
1955
- "attribute": "required",
1778
+ "fieldName": "required",
1956
1779
  "inheritedFrom": {
1957
1780
  "name": "FormAssociatedMixin",
1958
1781
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1959
1782
  }
1960
1783
  },
1961
1784
  {
1962
- "kind": "field",
1963
1785
  "name": "expand",
1964
1786
  "type": {
1965
1787
  "text": "boolean"
1966
1788
  },
1967
1789
  "default": "false",
1968
1790
  "description": "Controls whether the input expands to fill the width of its container.",
1969
- "attribute": "expand",
1970
- "reflects": true,
1791
+ "fieldName": "expand",
1971
1792
  "inheritedFrom": {
1972
1793
  "name": "FormAssociatedMixin",
1973
1794
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1974
1795
  }
1975
1796
  },
1976
1797
  {
1977
- "kind": "method",
1978
- "name": "handleInput",
1979
- "privacy": "protected",
1980
- "parameters": [
1981
- {
1982
- "name": "e",
1983
- "type": {
1984
- "text": "Event"
1985
- }
1986
- }
1987
- ],
1798
+ "name": "disabled",
1799
+ "type": {
1800
+ "text": "boolean"
1801
+ },
1802
+ "default": "false",
1803
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1804
+ "fieldName": "disabled",
1988
1805
  "inheritedFrom": {
1989
- "name": "FormAssociatedMixin",
1990
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1806
+ "name": "InputMixin",
1807
+ "module": "src/common/mixins/InputMixin.ts"
1991
1808
  }
1992
1809
  },
1993
1810
  {
1994
- "kind": "method",
1995
- "name": "renderLabel",
1996
- "privacy": "protected",
1811
+ "name": "name",
1812
+ "type": {
1813
+ "text": "string | undefined"
1814
+ },
1815
+ "description": "The name of the form component.",
1816
+ "fieldName": "name",
1997
1817
  "inheritedFrom": {
1998
- "name": "FormAssociatedMixin",
1999
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1818
+ "name": "InputMixin",
1819
+ "module": "src/common/mixins/InputMixin.ts"
2000
1820
  }
2001
1821
  },
2002
1822
  {
2003
- "kind": "method",
2004
- "name": "renderError",
2005
- "privacy": "protected",
1823
+ "name": "value",
1824
+ "type": {
1825
+ "text": "string"
1826
+ },
1827
+ "default": "\"\"",
1828
+ "description": "The value of the form component.",
1829
+ "fieldName": "value",
2006
1830
  "inheritedFrom": {
2007
- "name": "FormAssociatedMixin",
2008
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1831
+ "name": "InputMixin",
1832
+ "module": "src/common/mixins/InputMixin.ts"
2009
1833
  }
1834
+ }
1835
+ ],
1836
+ "mixins": [
1837
+ {
1838
+ "name": "FormAssociatedMixin",
1839
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
2010
1840
  },
2011
1841
  {
2012
- "kind": "method",
2013
- "name": "getDescribedBy",
2014
- "privacy": "protected",
1842
+ "name": "InputMixin",
1843
+ "module": "/src/common/mixins/InputMixin.js"
1844
+ },
1845
+ {
1846
+ "name": "FocusableMixin",
1847
+ "module": "/src/common/mixins/FocusableMixin.js"
1848
+ },
1849
+ {
1850
+ "name": "DraftComponentMixin",
1851
+ "module": "/src/common/mixins/DraftComponentMixin.js"
1852
+ }
1853
+ ],
1854
+ "superclass": {
1855
+ "name": "LitElement",
1856
+ "package": "lit"
1857
+ },
1858
+ "status": "draft",
1859
+ "category": "form",
1860
+ "tagName": "nord-checkbox",
1861
+ "customElement": true,
1862
+ "events": [
1863
+ {
1864
+ "name": "input",
1865
+ "type": {
1866
+ "text": "NordEvent"
1867
+ },
1868
+ "description": "Fired as the user types into the input.",
2015
1869
  "inheritedFrom": {
2016
1870
  "name": "FormAssociatedMixin",
2017
1871
  "module": "src/common/mixins/FormAssociatedMixin.ts"
2018
1872
  }
2019
1873
  },
2020
1874
  {
2021
- "kind": "method",
2022
- "name": "getInvalid",
2023
- "privacy": "protected",
1875
+ "name": "change",
1876
+ "type": {
1877
+ "text": "NordEvent"
1878
+ },
1879
+ "description": "Fired whenever the input's value is changed via user interaction.",
2024
1880
  "inheritedFrom": {
2025
1881
  "name": "FormAssociatedMixin",
2026
1882
  "module": "src/common/mixins/FormAssociatedMixin.ts"
2027
1883
  }
1884
+ }
1885
+ ]
1886
+ }
1887
+ ],
1888
+ "exports": [
1889
+ {
1890
+ "kind": "js",
1891
+ "name": "default",
1892
+ "declaration": {
1893
+ "name": "Checkbox",
1894
+ "module": "src/checkbox/Checkbox.ts"
1895
+ }
1896
+ },
1897
+ {
1898
+ "kind": "custom-element-definition",
1899
+ "name": "nord-checkbox",
1900
+ "declaration": {
1901
+ "name": "Checkbox",
1902
+ "module": "src/checkbox/Checkbox.ts"
1903
+ }
1904
+ }
1905
+ ],
1906
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
1907
+ },
1908
+ {
1909
+ "kind": "javascript-module",
1910
+ "path": "src/command-menu/CommandMenu.ts",
1911
+ "declarations": [
1912
+ {
1913
+ "kind": "class",
1914
+ "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
1915
+ "name": "CommandMenu",
1916
+ "slots": [
1917
+ {
1918
+ "description": "Used to replace the default footer contents.",
1919
+ "name": "footer"
1920
+ }
1921
+ ],
1922
+ "members": [
1923
+ {
1924
+ "kind": "field",
1925
+ "name": "inputRef",
1926
+ "privacy": "private"
2028
1927
  },
2029
1928
  {
2030
1929
  "kind": "field",
2031
- "name": "hasHint",
2032
- "privacy": "protected",
2033
- "inheritedFrom": {
2034
- "name": "FormAssociatedMixin",
2035
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2036
- }
1930
+ "name": "listRef",
1931
+ "privacy": "private"
2037
1932
  },
2038
1933
  {
2039
1934
  "kind": "field",
2040
- "name": "hasError",
2041
- "privacy": "protected",
2042
- "inheritedFrom": {
2043
- "name": "FormAssociatedMixin",
2044
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2045
- }
1935
+ "name": "previousFocus",
1936
+ "type": {
1937
+ "text": "HTMLElement | undefined"
1938
+ },
1939
+ "privacy": "private"
2046
1940
  },
2047
1941
  {
2048
1942
  "kind": "field",
2049
- "name": "disabled",
1943
+ "name": "dismissController",
1944
+ "privacy": "private",
1945
+ "default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.close(),\n })"
1946
+ },
1947
+ {
1948
+ "kind": "field",
1949
+ "name": "keyboardController",
1950
+ "privacy": "private",
1951
+ "default": "new KeyboardController(this, {\n trigger: () => this.select(),\n goBack: () => this.goBack(),\n end: () => this.end(),\n start: () => this.start(),\n next: () => this.next(),\n previous: () => this.previous(),\n toggleOpen: () => this.toggleOpen(),\n })"
1952
+ },
1953
+ {
1954
+ "kind": "field",
1955
+ "name": "open",
2050
1956
  "type": {
2051
1957
  "text": "boolean"
2052
1958
  },
2053
1959
  "default": "false",
2054
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2055
- "attribute": "disabled",
2056
- "reflects": true,
2057
- "inheritedFrom": {
2058
- "name": "InputMixin",
2059
- "module": "src/common/mixins/InputMixin.ts"
2060
- }
1960
+ "description": "Show or hide the command menu.",
1961
+ "attribute": "open"
2061
1962
  },
2062
1963
  {
2063
1964
  "kind": "field",
2064
- "name": "name",
1965
+ "name": "placeholder",
1966
+ "type": {
1967
+ "text": "string"
1968
+ },
1969
+ "default": "\"Type a command or search...\"",
1970
+ "description": "Hint text to display in the Command Menu search field.",
1971
+ "attribute": "placeholder"
1972
+ },
1973
+ {
1974
+ "kind": "field",
1975
+ "name": "commands",
1976
+ "type": {
1977
+ "text": "Array<ICommandMenuAction>"
1978
+ },
1979
+ "default": "[]",
1980
+ "description": "Array of commands to be included in the menu.\nPlease see “Commands data” section for more documentation."
1981
+ },
1982
+ {
1983
+ "kind": "field",
1984
+ "name": "parent",
2065
1985
  "type": {
2066
1986
  "text": "string | undefined"
2067
1987
  },
2068
- "description": "The name of the form component.",
2069
- "attribute": "name",
2070
- "inheritedFrom": {
2071
- "name": "InputMixin",
2072
- "module": "src/common/mixins/InputMixin.ts"
2073
- }
1988
+ "privacy": "private"
1989
+ },
1990
+ {
1991
+ "kind": "field",
1992
+ "name": "search",
1993
+ "type": {
1994
+ "text": "string"
1995
+ },
1996
+ "privacy": "private",
1997
+ "default": "\"\""
1998
+ },
1999
+ {
2000
+ "kind": "field",
2001
+ "name": "bump",
2002
+ "type": {
2003
+ "text": "boolean"
2004
+ },
2005
+ "privacy": "private",
2006
+ "default": "true"
2074
2007
  },
2075
2008
  {
2076
2009
  "kind": "field",
2077
- "name": "value",
2010
+ "name": "selectedIndex",
2078
2011
  "type": {
2079
- "text": "string"
2012
+ "text": "number"
2080
2013
  },
2081
- "default": "\"\"",
2082
- "description": "The value of the form component.",
2083
- "attribute": "value",
2084
- "inheritedFrom": {
2085
- "name": "InputMixin",
2086
- "module": "src/common/mixins/InputMixin.ts"
2087
- }
2014
+ "privacy": "private",
2015
+ "default": "0"
2088
2016
  },
2089
2017
  {
2090
2018
  "kind": "field",
2091
- "name": "form",
2092
- "privacy": "protected",
2093
- "description": "Gets the form, if any, associated with the form element.",
2094
- "inheritedFrom": {
2095
- "name": "InputMixin",
2096
- "module": "src/common/mixins/InputMixin.ts"
2097
- }
2019
+ "name": "filteredCommands",
2020
+ "type": {
2021
+ "text": "Array<ICommandMenuAction>"
2022
+ },
2023
+ "privacy": "private",
2024
+ "default": "[]"
2098
2025
  },
2099
2026
  {
2100
2027
  "kind": "field",
2101
- "name": "focusableRef",
2102
- "privacy": "protected",
2103
- "inheritedFrom": {
2104
- "name": "FocusableMixin",
2105
- "module": "src/common/mixins/FocusableMixin.ts"
2106
- }
2028
+ "name": "selected",
2029
+ "type": {
2030
+ "text": "ICommandMenuAction"
2031
+ },
2032
+ "privacy": "private"
2107
2033
  },
2108
2034
  {
2109
2035
  "kind": "method",
2110
- "name": "focus",
2036
+ "name": "show",
2111
2037
  "parameters": [
2112
2038
  {
2113
2039
  "name": "options",
2114
- "optional": true,
2040
+ "default": "{}",
2115
2041
  "type": {
2116
- "text": "FocusOptions"
2042
+ "text": "{ parent?: string }"
2117
2043
  },
2118
- "description": "An object which controls aspects of the focusing process."
2044
+ "description": "allows you to open the menu filtered to a specific parent command."
2119
2045
  }
2120
2046
  ],
2121
- "description": "Programmatically move focus to the component.",
2122
- "inheritedFrom": {
2123
- "name": "FocusableMixin",
2124
- "module": "src/common/mixins/FocusableMixin.ts"
2125
- }
2047
+ "description": "Show the command menu programmatically."
2126
2048
  },
2127
2049
  {
2128
2050
  "kind": "method",
2129
- "name": "blur",
2130
- "description": "Programmatically remove focus from the component.",
2131
- "inheritedFrom": {
2132
- "name": "FocusableMixin",
2133
- "module": "src/common/mixins/FocusableMixin.ts"
2134
- }
2051
+ "name": "close",
2052
+ "description": "Close the command menu programmatically."
2135
2053
  },
2136
2054
  {
2137
2055
  "kind": "method",
2138
- "name": "click",
2139
- "description": "Programmatically simulates a click on the component.",
2140
- "inheritedFrom": {
2141
- "name": "FocusableMixin",
2142
- "module": "src/common/mixins/FocusableMixin.ts"
2143
- }
2056
+ "name": "toggleOpen",
2057
+ "description": "Toggle the open state programmatically."
2144
2058
  },
2145
2059
  {
2146
- "kind": "field",
2147
- "name": "_warningLogged",
2148
- "type": {
2149
- "text": "boolean"
2150
- },
2060
+ "kind": "method",
2061
+ "name": "focus",
2062
+ "description": "Focus the command menu's input."
2063
+ },
2064
+ {
2065
+ "kind": "method",
2066
+ "name": "renderNoResults",
2067
+ "privacy": "private"
2068
+ },
2069
+ {
2070
+ "kind": "method",
2071
+ "name": "renderSection",
2151
2072
  "privacy": "private",
2152
- "static": true,
2153
- "default": "false",
2154
- "inheritedFrom": {
2155
- "name": "DraftComponentMixin",
2156
- "module": "src/common/mixins/DraftComponentMixin.ts"
2157
- }
2158
- }
2159
- ],
2160
- "attributes": [
2073
+ "parameters": [
2074
+ {
2075
+ "name": "section",
2076
+ "type": {
2077
+ "text": "string | undefined"
2078
+ }
2079
+ },
2080
+ {
2081
+ "name": "commands",
2082
+ "type": {
2083
+ "text": "ICommandMenuAction[]"
2084
+ }
2085
+ }
2086
+ ]
2087
+ },
2161
2088
  {
2162
- "name": "checked",
2163
- "type": {
2164
- "text": "boolean"
2165
- },
2166
- "default": "false",
2167
- "description": "Controls whether the checkbox is checked or not.",
2168
- "fieldName": "checked"
2089
+ "kind": "method",
2090
+ "name": "handleAnimationEnd",
2091
+ "privacy": "private"
2169
2092
  },
2170
2093
  {
2171
- "name": "label",
2172
- "type": {
2173
- "text": "string"
2174
- },
2175
- "default": "\"\"",
2176
- "description": "Label for the input.",
2177
- "fieldName": "label",
2178
- "inheritedFrom": {
2179
- "name": "FormAssociatedMixin",
2180
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2181
- }
2094
+ "kind": "method",
2095
+ "name": "handleBlur",
2096
+ "privacy": "private"
2182
2097
  },
2183
2098
  {
2184
- "name": "hint",
2185
- "type": {
2186
- "text": "string | undefined"
2187
- },
2188
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2189
- "fieldName": "hint",
2190
- "inheritedFrom": {
2191
- "name": "FormAssociatedMixin",
2192
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2193
- }
2099
+ "kind": "method",
2100
+ "name": "handleInput",
2101
+ "privacy": "private",
2102
+ "parameters": [
2103
+ {
2104
+ "name": "event",
2105
+ "type": {
2106
+ "text": "KeyboardEvent"
2107
+ }
2108
+ }
2109
+ ]
2194
2110
  },
2195
2111
  {
2196
- "name": "hide-label",
2197
- "type": {
2198
- "text": "boolean"
2199
- },
2200
- "default": "false",
2201
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2202
- "fieldName": "hideLabel",
2203
- "inheritedFrom": {
2204
- "name": "FormAssociatedMixin",
2205
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2206
- }
2112
+ "kind": "method",
2113
+ "name": "select",
2114
+ "privacy": "private",
2115
+ "parameters": [
2116
+ {
2117
+ "name": "command",
2118
+ "default": "this.selected",
2119
+ "type": {
2120
+ "text": "ICommandMenuAction"
2121
+ }
2122
+ }
2123
+ ]
2207
2124
  },
2208
2125
  {
2209
- "name": "placeholder",
2210
- "type": {
2211
- "text": "string | undefined"
2212
- },
2213
- "description": "Placeholder text to display within the input.",
2214
- "fieldName": "placeholder",
2215
- "inheritedFrom": {
2216
- "name": "FormAssociatedMixin",
2217
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2218
- }
2126
+ "kind": "method",
2127
+ "name": "start",
2128
+ "privacy": "private"
2219
2129
  },
2220
2130
  {
2221
- "name": "error",
2222
- "type": {
2223
- "text": "string | undefined"
2224
- },
2225
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2226
- "fieldName": "error",
2227
- "inheritedFrom": {
2228
- "name": "FormAssociatedMixin",
2229
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2230
- }
2131
+ "kind": "method",
2132
+ "name": "end",
2133
+ "privacy": "private"
2231
2134
  },
2232
2135
  {
2233
- "name": "required",
2234
- "type": {
2235
- "text": "boolean"
2236
- },
2237
- "default": "false",
2238
- "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
2239
- "fieldName": "required",
2240
- "inheritedFrom": {
2241
- "name": "FormAssociatedMixin",
2242
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2243
- }
2136
+ "kind": "method",
2137
+ "name": "next",
2138
+ "privacy": "private"
2139
+ },
2140
+ {
2141
+ "kind": "method",
2142
+ "name": "previous",
2143
+ "privacy": "private"
2144
+ },
2145
+ {
2146
+ "kind": "method",
2147
+ "name": "goBack",
2148
+ "privacy": "private"
2149
+ },
2150
+ {
2151
+ "kind": "method",
2152
+ "name": "setParent",
2153
+ "privacy": "private",
2154
+ "parameters": [
2155
+ {
2156
+ "name": "parent",
2157
+ "optional": true,
2158
+ "type": {
2159
+ "text": "string"
2160
+ }
2161
+ }
2162
+ ]
2163
+ },
2164
+ {
2165
+ "kind": "method",
2166
+ "name": "setSearch",
2167
+ "privacy": "private",
2168
+ "parameters": [
2169
+ {
2170
+ "name": "str",
2171
+ "type": {
2172
+ "text": "string"
2173
+ }
2174
+ }
2175
+ ]
2176
+ },
2177
+ {
2178
+ "kind": "method",
2179
+ "name": "filterCommands",
2180
+ "privacy": "private"
2244
2181
  },
2245
2182
  {
2246
- "name": "expand",
2183
+ "kind": "field",
2184
+ "name": "_warningLogged",
2247
2185
  "type": {
2248
2186
  "text": "boolean"
2249
2187
  },
2188
+ "privacy": "private",
2189
+ "static": true,
2250
2190
  "default": "false",
2251
- "description": "Controls whether the input expands to fill the width of its container.",
2252
- "fieldName": "expand",
2253
2191
  "inheritedFrom": {
2254
- "name": "FormAssociatedMixin",
2255
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2192
+ "name": "DraftComponentMixin",
2193
+ "module": "src/common/mixins/DraftComponentMixin.ts"
2256
2194
  }
2257
- },
2195
+ }
2196
+ ],
2197
+ "events": [
2258
2198
  {
2259
- "name": "disabled",
2199
+ "name": "open",
2260
2200
  "type": {
2261
- "text": "boolean"
2201
+ "text": "NordEvent"
2262
2202
  },
2263
- "default": "false",
2264
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2265
- "fieldName": "disabled",
2266
- "inheritedFrom": {
2267
- "name": "InputMixin",
2268
- "module": "src/common/mixins/InputMixin.ts"
2269
- }
2203
+ "description": "The command menu was opened."
2270
2204
  },
2271
2205
  {
2272
- "name": "name",
2206
+ "name": "close",
2273
2207
  "type": {
2274
- "text": "string | undefined"
2208
+ "text": "NordEvent"
2275
2209
  },
2276
- "description": "The name of the form component.",
2277
- "fieldName": "name",
2278
- "inheritedFrom": {
2279
- "name": "InputMixin",
2280
- "module": "src/common/mixins/InputMixin.ts"
2281
- }
2210
+ "description": "The command menu was closed."
2282
2211
  },
2283
2212
  {
2284
- "name": "value",
2285
2213
  "type": {
2286
- "text": "string"
2214
+ "text": "SelectEvent"
2287
2215
  },
2288
- "default": "\"\"",
2289
- "description": "The value of the form component.",
2290
- "fieldName": "value",
2291
- "inheritedFrom": {
2292
- "name": "InputMixin",
2293
- "module": "src/common/mixins/InputMixin.ts"
2294
- }
2216
+ "description": "User selected a command from the menu.",
2217
+ "name": "nord-select"
2295
2218
  }
2296
2219
  ],
2297
- "mixins": [
2298
- {
2299
- "name": "FormAssociatedMixin",
2300
- "module": "/src/common/mixins/FormAssociatedMixin.js"
2301
- },
2220
+ "attributes": [
2302
2221
  {
2303
- "name": "InputMixin",
2304
- "module": "/src/common/mixins/InputMixin.js"
2222
+ "name": "open",
2223
+ "type": {
2224
+ "text": "boolean"
2225
+ },
2226
+ "default": "false",
2227
+ "description": "Show or hide the command menu.",
2228
+ "fieldName": "open"
2305
2229
  },
2306
2230
  {
2307
- "name": "FocusableMixin",
2308
- "module": "/src/common/mixins/FocusableMixin.js"
2309
- },
2231
+ "name": "placeholder",
2232
+ "type": {
2233
+ "text": "string"
2234
+ },
2235
+ "default": "\"Type a command or search...\"",
2236
+ "description": "Hint text to display in the Command Menu search field.",
2237
+ "fieldName": "placeholder"
2238
+ }
2239
+ ],
2240
+ "mixins": [
2310
2241
  {
2311
2242
  "name": "DraftComponentMixin",
2312
2243
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -2317,33 +2248,94 @@
2317
2248
  "package": "lit"
2318
2249
  },
2319
2250
  "status": "draft",
2320
- "category": "form",
2321
- "tagName": "nord-checkbox",
2322
- "customElement": true,
2323
- "events": [
2251
+ "category": "action",
2252
+ "tagName": "nord-command-menu",
2253
+ "customElement": true
2254
+ }
2255
+ ],
2256
+ "exports": [
2257
+ {
2258
+ "kind": "js",
2259
+ "name": "default",
2260
+ "declaration": {
2261
+ "name": "CommandMenu",
2262
+ "module": "src/command-menu/CommandMenu.ts"
2263
+ }
2264
+ },
2265
+ {
2266
+ "kind": "custom-element-definition",
2267
+ "name": "nord-command-menu",
2268
+ "declaration": {
2269
+ "name": "CommandMenu",
2270
+ "module": "src/command-menu/CommandMenu.ts"
2271
+ }
2272
+ }
2273
+ ],
2274
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2275
+ },
2276
+ {
2277
+ "kind": "javascript-module",
2278
+ "path": "src/command-menu/CommandMenuAction.ts",
2279
+ "declarations": [
2280
+ {
2281
+ "kind": "class",
2282
+ "description": "Command Menu Action displays a single action that can be executed by the user. For usage examples, please see Command Menu component.",
2283
+ "name": "CommandMenuAction",
2284
+ "members": [
2324
2285
  {
2325
- "name": "input",
2286
+ "kind": "field",
2287
+ "name": "command",
2326
2288
  "type": {
2327
- "text": "NordEvent"
2289
+ "text": "ICommandMenuAction"
2328
2290
  },
2329
- "description": "Fired as the user types into the input.",
2330
- "inheritedFrom": {
2331
- "name": "FormAssociatedMixin",
2332
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2333
- }
2291
+ "attribute": "command"
2334
2292
  },
2335
2293
  {
2336
- "name": "change",
2294
+ "kind": "field",
2295
+ "name": "selected",
2337
2296
  "type": {
2338
- "text": "NordEvent"
2297
+ "text": "boolean"
2339
2298
  },
2340
- "description": "Fired whenever the input's value is changed via user interaction.",
2341
- "inheritedFrom": {
2342
- "name": "FormAssociatedMixin",
2343
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2344
- }
2299
+ "default": "false",
2300
+ "attribute": "selected"
2301
+ },
2302
+ {
2303
+ "kind": "method",
2304
+ "name": "ensureInView",
2305
+ "privacy": "private",
2306
+ "description": "Scroll to show element"
2307
+ },
2308
+ {
2309
+ "kind": "method",
2310
+ "name": "renderShortcut",
2311
+ "privacy": "private"
2345
2312
  }
2346
- ]
2313
+ ],
2314
+ "attributes": [
2315
+ {
2316
+ "name": "command",
2317
+ "type": {
2318
+ "text": "ICommandMenuAction"
2319
+ },
2320
+ "fieldName": "command"
2321
+ },
2322
+ {
2323
+ "name": "selected",
2324
+ "type": {
2325
+ "text": "boolean"
2326
+ },
2327
+ "default": "false",
2328
+ "fieldName": "selected"
2329
+ }
2330
+ ],
2331
+ "superclass": {
2332
+ "name": "LitElement",
2333
+ "package": "lit"
2334
+ },
2335
+ "status": "internal",
2336
+ "category": null,
2337
+ "tagName": "nord-command-menu-action",
2338
+ "customElement": true
2347
2339
  }
2348
2340
  ],
2349
2341
  "exports": [
@@ -2351,128 +2343,136 @@
2351
2343
  "kind": "js",
2352
2344
  "name": "default",
2353
2345
  "declaration": {
2354
- "name": "Checkbox",
2355
- "module": "src/checkbox/Checkbox.ts"
2346
+ "name": "CommandMenuAction",
2347
+ "module": "src/command-menu/CommandMenuAction.ts"
2356
2348
  }
2357
2349
  },
2358
2350
  {
2359
2351
  "kind": "custom-element-definition",
2360
- "name": "nord-checkbox",
2352
+ "name": "nord-command-menu-action",
2353
+ "declaration": {
2354
+ "name": "CommandMenuAction",
2355
+ "module": "src/command-menu/CommandMenuAction.ts"
2356
+ }
2357
+ }
2358
+ ],
2359
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2360
+ },
2361
+ {
2362
+ "kind": "javascript-module",
2363
+ "path": "src/command-menu/ICommandMenuAction.ts",
2364
+ "declarations": [],
2365
+ "exports": [],
2366
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2367
+ },
2368
+ {
2369
+ "kind": "javascript-module",
2370
+ "path": "src/command-menu/KeyboardController.ts",
2371
+ "declarations": [
2372
+ {
2373
+ "kind": "class",
2374
+ "description": "",
2375
+ "name": "KeyboardController",
2376
+ "members": [
2377
+ {
2378
+ "kind": "field",
2379
+ "name": "host",
2380
+ "type": {
2381
+ "text": "CommandMenu"
2382
+ },
2383
+ "privacy": "private",
2384
+ "default": "host"
2385
+ },
2386
+ {
2387
+ "kind": "field",
2388
+ "name": "globalShortcuts",
2389
+ "type": {
2390
+ "text": "ShortcutController"
2391
+ },
2392
+ "privacy": "private",
2393
+ "default": "new ShortcutController(host, { \"$mod+k\": preventDefault(actions.toggleOpen) })"
2394
+ },
2395
+ {
2396
+ "kind": "field",
2397
+ "name": "navigationShortcuts",
2398
+ "type": {
2399
+ "text": "ShortcutController"
2400
+ },
2401
+ "privacy": "private",
2402
+ "default": "new ShortcutController(\n host,\n {\n Enter: preventDefault(actions.trigger),\n Backspace: actions.goBack, // we don't want to prevent default, since that would stop backspace deleting chars\n End: preventDefault(actions.end),\n Home: preventDefault(actions.start),\n ArrowDown: preventDefault(actions.next),\n ArrowUp: preventDefault(actions.previous),\n },\n host\n )"
2403
+ },
2404
+ {
2405
+ "kind": "field",
2406
+ "name": "commandShortcuts",
2407
+ "type": {
2408
+ "text": "ShortcutController"
2409
+ },
2410
+ "privacy": "private",
2411
+ "default": "new ShortcutController(host)"
2412
+ },
2413
+ {
2414
+ "kind": "method",
2415
+ "name": "registerCommandShortcuts"
2416
+ }
2417
+ ]
2418
+ }
2419
+ ],
2420
+ "exports": [
2421
+ {
2422
+ "kind": "js",
2423
+ "name": "KeyboardController",
2361
2424
  "declaration": {
2362
- "name": "Checkbox",
2363
- "module": "src/checkbox/Checkbox.ts"
2425
+ "name": "KeyboardController",
2426
+ "module": "src/command-menu/KeyboardController.ts"
2364
2427
  }
2365
2428
  }
2366
2429
  ],
2367
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
2430
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2368
2431
  },
2369
2432
  {
2370
2433
  "kind": "javascript-module",
2371
- "path": "src/card/Card.ts",
2434
+ "path": "src/command-menu/SelectEvent.ts",
2372
2435
  "declarations": [
2373
2436
  {
2374
2437
  "kind": "class",
2375
- "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
2376
- "name": "Card",
2377
- "slots": [
2378
- {
2379
- "description": "The card content.",
2380
- "name": ""
2381
- },
2382
- {
2383
- "description": "Optional slot that holds a header for the card.",
2384
- "name": "header"
2385
- },
2386
- {
2387
- "description": "Optional slot that holds footer content for the card.",
2388
- "name": "footer"
2389
- }
2390
- ],
2438
+ "description": "",
2439
+ "name": "SelectEvent",
2391
2440
  "members": [
2392
2441
  {
2393
2442
  "kind": "field",
2394
- "name": "headerSlot",
2395
- "privacy": "private",
2396
- "default": "new SlotController(this, \"header\")"
2397
- },
2398
- {
2399
- "kind": "field",
2400
- "name": "footerSlot",
2401
- "privacy": "private",
2402
- "default": "new SlotController(this, \"footer\")"
2403
- },
2404
- {
2405
- "kind": "field",
2406
- "name": "padding",
2443
+ "name": "eventName",
2407
2444
  "type": {
2408
- "text": "\"m\" | \"l\" | \"none\""
2445
+ "text": "string"
2409
2446
  },
2410
- "default": "\"m\"",
2411
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
2412
- "attribute": "padding",
2413
- "reflects": true
2447
+ "static": true,
2448
+ "default": "\"nord-select\""
2414
2449
  },
2415
2450
  {
2416
2451
  "kind": "field",
2417
- "name": "_warningLogged",
2418
- "type": {
2419
- "text": "boolean"
2420
- },
2421
- "privacy": "private",
2422
- "static": true,
2423
- "default": "false",
2424
- "inheritedFrom": {
2425
- "name": "DraftComponentMixin",
2426
- "module": "src/common/mixins/DraftComponentMixin.ts"
2427
- }
2428
- }
2429
- ],
2430
- "attributes": [
2431
- {
2432
- "name": "padding",
2452
+ "name": "command",
2433
2453
  "type": {
2434
- "text": "\"m\" | \"l\" | \"none\""
2454
+ "text": "ICommandMenuAction"
2435
2455
  },
2436
- "default": "\"m\"",
2437
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
2438
- "fieldName": "padding"
2439
- }
2440
- ],
2441
- "mixins": [
2442
- {
2443
- "name": "DraftComponentMixin",
2444
- "module": "/src/common/mixins/DraftComponentMixin.js"
2456
+ "default": "command"
2445
2457
  }
2446
2458
  ],
2447
2459
  "superclass": {
2448
- "name": "LitElement",
2449
- "package": "lit"
2450
- },
2451
- "status": "draft",
2452
- "category": "structure",
2453
- "tagName": "nord-card",
2454
- "customElement": true
2460
+ "name": "NordEvent",
2461
+ "module": "/src/common/events.js"
2462
+ }
2455
2463
  }
2456
2464
  ],
2457
2465
  "exports": [
2458
2466
  {
2459
2467
  "kind": "js",
2460
- "name": "default",
2461
- "declaration": {
2462
- "name": "Card",
2463
- "module": "src/card/Card.ts"
2464
- }
2465
- },
2466
- {
2467
- "kind": "custom-element-definition",
2468
- "name": "nord-card",
2468
+ "name": "SelectEvent",
2469
2469
  "declaration": {
2470
- "name": "Card",
2471
- "module": "src/card/Card.ts"
2470
+ "name": "SelectEvent",
2471
+ "module": "src/command-menu/SelectEvent.ts"
2472
2472
  }
2473
2473
  }
2474
2474
  ],
2475
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
2475
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A&nbsp;command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
2476
2476
  },
2477
2477
  {
2478
2478
  "kind": "javascript-module",
@@ -4493,6 +4493,82 @@
4493
4493
  ],
4494
4494
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n"
4495
4495
  },
4496
+ {
4497
+ "kind": "javascript-module",
4498
+ "path": "src/header/Header.ts",
4499
+ "declarations": [
4500
+ {
4501
+ "kind": "class",
4502
+ "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
4503
+ "name": "Header",
4504
+ "slots": [
4505
+ {
4506
+ "description": "The header content.",
4507
+ "name": ""
4508
+ },
4509
+ {
4510
+ "description": "Optional slot for buttons, toggles, etc.",
4511
+ "name": "action"
4512
+ }
4513
+ ],
4514
+ "members": [
4515
+ {
4516
+ "kind": "field",
4517
+ "name": "actionSlot",
4518
+ "privacy": "private",
4519
+ "default": "new SlotController(this, \"action\")"
4520
+ },
4521
+ {
4522
+ "kind": "field",
4523
+ "name": "_warningLogged",
4524
+ "type": {
4525
+ "text": "boolean"
4526
+ },
4527
+ "privacy": "private",
4528
+ "static": true,
4529
+ "default": "false",
4530
+ "inheritedFrom": {
4531
+ "name": "DraftComponentMixin",
4532
+ "module": "src/common/mixins/DraftComponentMixin.ts"
4533
+ }
4534
+ }
4535
+ ],
4536
+ "mixins": [
4537
+ {
4538
+ "name": "DraftComponentMixin",
4539
+ "module": "/src/common/mixins/DraftComponentMixin.js"
4540
+ }
4541
+ ],
4542
+ "superclass": {
4543
+ "name": "LitElement",
4544
+ "package": "lit"
4545
+ },
4546
+ "status": "draft",
4547
+ "category": "structure",
4548
+ "tagName": "nord-header",
4549
+ "customElement": true
4550
+ }
4551
+ ],
4552
+ "exports": [
4553
+ {
4554
+ "kind": "js",
4555
+ "name": "default",
4556
+ "declaration": {
4557
+ "name": "Header",
4558
+ "module": "src/header/Header.ts"
4559
+ }
4560
+ },
4561
+ {
4562
+ "kind": "custom-element-definition",
4563
+ "name": "nord-header",
4564
+ "declaration": {
4565
+ "name": "Header",
4566
+ "module": "src/header/Header.ts"
4567
+ }
4568
+ }
4569
+ ],
4570
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
4571
+ },
4496
4572
  {
4497
4573
  "kind": "javascript-module",
4498
4574
  "path": "src/icon/Icon.ts",
@@ -4748,82 +4824,6 @@
4748
4824
  ],
4749
4825
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
4750
4826
  },
4751
- {
4752
- "kind": "javascript-module",
4753
- "path": "src/header/Header.ts",
4754
- "declarations": [
4755
- {
4756
- "kind": "class",
4757
- "description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
4758
- "name": "Header",
4759
- "slots": [
4760
- {
4761
- "description": "The header content.",
4762
- "name": ""
4763
- },
4764
- {
4765
- "description": "Optional slot for buttons, toggles, etc.",
4766
- "name": "action"
4767
- }
4768
- ],
4769
- "members": [
4770
- {
4771
- "kind": "field",
4772
- "name": "actionSlot",
4773
- "privacy": "private",
4774
- "default": "new SlotController(this, \"action\")"
4775
- },
4776
- {
4777
- "kind": "field",
4778
- "name": "_warningLogged",
4779
- "type": {
4780
- "text": "boolean"
4781
- },
4782
- "privacy": "private",
4783
- "static": true,
4784
- "default": "false",
4785
- "inheritedFrom": {
4786
- "name": "DraftComponentMixin",
4787
- "module": "src/common/mixins/DraftComponentMixin.ts"
4788
- }
4789
- }
4790
- ],
4791
- "mixins": [
4792
- {
4793
- "name": "DraftComponentMixin",
4794
- "module": "/src/common/mixins/DraftComponentMixin.js"
4795
- }
4796
- ],
4797
- "superclass": {
4798
- "name": "LitElement",
4799
- "package": "lit"
4800
- },
4801
- "status": "draft",
4802
- "category": "structure",
4803
- "tagName": "nord-header",
4804
- "customElement": true
4805
- }
4806
- ],
4807
- "exports": [
4808
- {
4809
- "kind": "js",
4810
- "name": "default",
4811
- "declaration": {
4812
- "name": "Header",
4813
- "module": "src/header/Header.ts"
4814
- }
4815
- },
4816
- {
4817
- "kind": "custom-element-definition",
4818
- "name": "nord-header",
4819
- "declaration": {
4820
- "name": "Header",
4821
- "module": "src/header/Header.ts"
4822
- }
4823
- }
4824
- ],
4825
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
4826
- },
4827
4827
  {
4828
4828
  "kind": "javascript-module",
4829
4829
  "path": "src/input/Input.ts",