@nordhealth/components 1.0.0-alpha.58 → 1.0.0-alpha.60
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.
- package/custom-elements.json +1184 -1184
- package/lib/Checkbox.js +1 -1
- package/lib/Checkbox.js.map +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/Fieldset.js +1 -1
- package/lib/FormField-b1c18e6e.js +2 -0
- package/lib/FormField-b1c18e6e.js.map +1 -0
- package/lib/Icon.js +1 -1
- package/lib/Input.js +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/Radio.js +1 -1
- package/lib/Radio.js.map +1 -1
- package/lib/Select.js +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/bundle.js +2 -2
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -3
- package/lib/FormField-926a0dda.js +0 -2
- package/lib/FormField-926a0dda.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -1167,980 +1167,1017 @@
|
|
|
1167
1167
|
},
|
|
1168
1168
|
{
|
|
1169
1169
|
"kind": "javascript-module",
|
|
1170
|
-
"path": "src/
|
|
1170
|
+
"path": "src/card/Card.ts",
|
|
1171
1171
|
"declarations": [
|
|
1172
1172
|
{
|
|
1173
1173
|
"kind": "class",
|
|
1174
|
-
"description": "
|
|
1175
|
-
"name": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
1205
|
+
"name": "padding",
|
|
1196
1206
|
"type": {
|
|
1197
|
-
"text": "
|
|
1207
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1198
1208
|
},
|
|
1199
|
-
"
|
|
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": "
|
|
1216
|
+
"name": "_warningLogged",
|
|
1217
|
+
"type": {
|
|
1218
|
+
"text": "boolean"
|
|
1219
|
+
},
|
|
1204
1220
|
"privacy": "private",
|
|
1205
|
-
"
|
|
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": "
|
|
1210
|
-
"privacy": "
|
|
1211
|
-
"
|
|
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": "
|
|
1310
|
+
"name": "checked",
|
|
1216
1311
|
"type": {
|
|
1217
1312
|
"text": "boolean"
|
|
1218
1313
|
},
|
|
1219
1314
|
"default": "false",
|
|
1220
|
-
"description": "
|
|
1221
|
-
"attribute": "
|
|
1315
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
1316
|
+
"attribute": "checked"
|
|
1222
1317
|
},
|
|
1223
1318
|
{
|
|
1224
|
-
"kind": "
|
|
1225
|
-
"name": "
|
|
1226
|
-
"
|
|
1227
|
-
|
|
1319
|
+
"kind": "method",
|
|
1320
|
+
"name": "handleChange",
|
|
1321
|
+
"privacy": "protected",
|
|
1322
|
+
"return": {
|
|
1323
|
+
"type": {
|
|
1324
|
+
"text": "void"
|
|
1325
|
+
}
|
|
1228
1326
|
},
|
|
1229
|
-
"
|
|
1230
|
-
|
|
1231
|
-
|
|
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": "
|
|
1236
|
-
"
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
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": "
|
|
1245
|
-
"
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
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": "
|
|
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": "
|
|
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": "
|
|
1395
|
+
"name": "errorId",
|
|
1262
1396
|
"type": {
|
|
1263
|
-
"text": "
|
|
1397
|
+
"text": "string"
|
|
1264
1398
|
},
|
|
1265
|
-
"privacy": "
|
|
1266
|
-
"default": "
|
|
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": "
|
|
1408
|
+
"name": "hintId",
|
|
1271
1409
|
"type": {
|
|
1272
|
-
"text": "
|
|
1410
|
+
"text": "string"
|
|
1273
1411
|
},
|
|
1274
|
-
"privacy": "
|
|
1275
|
-
"default": "
|
|
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": "
|
|
1421
|
+
"name": "label",
|
|
1280
1422
|
"type": {
|
|
1281
|
-
"text": "
|
|
1423
|
+
"text": "string"
|
|
1282
1424
|
},
|
|
1283
|
-
"
|
|
1284
|
-
"
|
|
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": "
|
|
1435
|
+
"name": "hint",
|
|
1289
1436
|
"type": {
|
|
1290
|
-
"text": "
|
|
1437
|
+
"text": "string | undefined"
|
|
1291
1438
|
},
|
|
1292
|
-
"
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
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": "
|
|
1321
|
-
"name": "
|
|
1322
|
-
"
|
|
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": "
|
|
1326
|
-
"name": "
|
|
1327
|
-
"
|
|
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": "
|
|
1331
|
-
"name": "
|
|
1332
|
-
"
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
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": "
|
|
1350
|
-
"name": "
|
|
1351
|
-
"
|
|
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": "
|
|
1355
|
-
"name": "
|
|
1356
|
-
"
|
|
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": "
|
|
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": "
|
|
1378
|
-
"default": "this.selected",
|
|
1521
|
+
"name": "e",
|
|
1379
1522
|
"type": {
|
|
1380
|
-
"text": "
|
|
1523
|
+
"text": "Event"
|
|
1381
1524
|
}
|
|
1382
1525
|
}
|
|
1383
|
-
]
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
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": "
|
|
1398
|
-
"privacy": "
|
|
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": "
|
|
1403
|
-
"privacy": "
|
|
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": "
|
|
1408
|
-
"privacy": "
|
|
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": "
|
|
1413
|
-
"privacy": "
|
|
1414
|
-
"
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
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": "
|
|
1426
|
-
"name": "
|
|
1427
|
-
"privacy": "
|
|
1428
|
-
"
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
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": "
|
|
1439
|
-
"name": "
|
|
1440
|
-
"privacy": "
|
|
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": "
|
|
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": "
|
|
1453
|
-
"module": "src/common/mixins/
|
|
1597
|
+
"name": "InputMixin",
|
|
1598
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1454
1599
|
}
|
|
1455
|
-
}
|
|
1456
|
-
],
|
|
1457
|
-
"events": [
|
|
1600
|
+
},
|
|
1458
1601
|
{
|
|
1459
|
-
"
|
|
1602
|
+
"kind": "field",
|
|
1603
|
+
"name": "name",
|
|
1460
1604
|
"type": {
|
|
1461
|
-
"text": "
|
|
1605
|
+
"text": "string | undefined"
|
|
1462
1606
|
},
|
|
1463
|
-
"description": "The
|
|
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
|
-
"
|
|
1615
|
+
"kind": "field",
|
|
1616
|
+
"name": "value",
|
|
1467
1617
|
"type": {
|
|
1468
|
-
"text": "
|
|
1618
|
+
"text": "string"
|
|
1469
1619
|
},
|
|
1470
|
-
"
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
"
|
|
1474
|
-
"
|
|
1475
|
-
|
|
1476
|
-
|
|
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"
|
|
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
|
+
}
|
|
1489
1627
|
},
|
|
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 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
1628
|
{
|
|
1546
1629
|
"kind": "field",
|
|
1547
|
-
"name": "
|
|
1548
|
-
"
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1630
|
+
"name": "form",
|
|
1631
|
+
"privacy": "protected",
|
|
1632
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
1633
|
+
"inheritedFrom": {
|
|
1634
|
+
"name": "InputMixin",
|
|
1635
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1636
|
+
}
|
|
1552
1637
|
},
|
|
1553
1638
|
{
|
|
1554
1639
|
"kind": "field",
|
|
1555
|
-
"name": "
|
|
1556
|
-
"
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1640
|
+
"name": "focusableRef",
|
|
1641
|
+
"privacy": "protected",
|
|
1642
|
+
"inheritedFrom": {
|
|
1643
|
+
"name": "FocusableMixin",
|
|
1644
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1645
|
+
}
|
|
1561
1646
|
},
|
|
1562
1647
|
{
|
|
1563
1648
|
"kind": "method",
|
|
1564
|
-
"name": "
|
|
1565
|
-
"
|
|
1566
|
-
|
|
1649
|
+
"name": "focus",
|
|
1650
|
+
"parameters": [
|
|
1651
|
+
{
|
|
1652
|
+
"name": "options",
|
|
1653
|
+
"optional": true,
|
|
1654
|
+
"type": {
|
|
1655
|
+
"text": "FocusOptions"
|
|
1656
|
+
},
|
|
1657
|
+
"description": "An object which controls aspects of the focusing process."
|
|
1658
|
+
}
|
|
1659
|
+
],
|
|
1660
|
+
"description": "Programmatically move focus to the component.",
|
|
1661
|
+
"inheritedFrom": {
|
|
1662
|
+
"name": "FocusableMixin",
|
|
1663
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1664
|
+
}
|
|
1567
1665
|
},
|
|
1568
1666
|
{
|
|
1569
1667
|
"kind": "method",
|
|
1570
|
-
"name": "
|
|
1571
|
-
"
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1668
|
+
"name": "blur",
|
|
1669
|
+
"description": "Programmatically remove focus from the component.",
|
|
1670
|
+
"inheritedFrom": {
|
|
1671
|
+
"name": "FocusableMixin",
|
|
1672
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1673
|
+
}
|
|
1674
|
+
},
|
|
1575
1675
|
{
|
|
1576
|
-
"
|
|
1577
|
-
"
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1676
|
+
"kind": "method",
|
|
1677
|
+
"name": "click",
|
|
1678
|
+
"description": "Programmatically simulates a click on the component.",
|
|
1679
|
+
"inheritedFrom": {
|
|
1680
|
+
"name": "FocusableMixin",
|
|
1681
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1682
|
+
}
|
|
1581
1683
|
},
|
|
1582
1684
|
{
|
|
1583
|
-
"
|
|
1685
|
+
"kind": "field",
|
|
1686
|
+
"name": "_warningLogged",
|
|
1584
1687
|
"type": {
|
|
1585
1688
|
"text": "boolean"
|
|
1586
1689
|
},
|
|
1690
|
+
"privacy": "private",
|
|
1691
|
+
"static": true,
|
|
1587
1692
|
"default": "false",
|
|
1588
|
-
"
|
|
1693
|
+
"inheritedFrom": {
|
|
1694
|
+
"name": "DraftComponentMixin",
|
|
1695
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
1696
|
+
}
|
|
1589
1697
|
}
|
|
1590
1698
|
],
|
|
1591
|
-
"
|
|
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 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 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
|
-
},
|
|
1699
|
+
"attributes": [
|
|
1664
1700
|
{
|
|
1665
|
-
"
|
|
1666
|
-
"name": "commandShortcuts",
|
|
1701
|
+
"name": "checked",
|
|
1667
1702
|
"type": {
|
|
1668
|
-
"text": "
|
|
1703
|
+
"text": "boolean"
|
|
1669
1704
|
},
|
|
1670
|
-
"
|
|
1671
|
-
"
|
|
1705
|
+
"default": "false",
|
|
1706
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
1707
|
+
"fieldName": "checked"
|
|
1672
1708
|
},
|
|
1673
1709
|
{
|
|
1674
|
-
"
|
|
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 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",
|
|
1710
|
+
"name": "label",
|
|
1704
1711
|
"type": {
|
|
1705
1712
|
"text": "string"
|
|
1706
1713
|
},
|
|
1707
|
-
"
|
|
1708
|
-
"
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
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 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"
|
|
1714
|
+
"default": "\"\"",
|
|
1715
|
+
"description": "Label for the input.",
|
|
1716
|
+
"fieldName": "label",
|
|
1717
|
+
"inheritedFrom": {
|
|
1718
|
+
"name": "FormAssociatedMixin",
|
|
1719
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1720
|
+
}
|
|
1753
1721
|
},
|
|
1754
1722
|
{
|
|
1755
|
-
"
|
|
1756
|
-
"
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
"kind": "field",
|
|
1762
|
-
"name": "formValue",
|
|
1763
|
-
"privacy": "protected",
|
|
1723
|
+
"name": "hint",
|
|
1724
|
+
"type": {
|
|
1725
|
+
"text": "string | undefined"
|
|
1726
|
+
},
|
|
1727
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
1728
|
+
"fieldName": "hint",
|
|
1764
1729
|
"inheritedFrom": {
|
|
1765
1730
|
"name": "FormAssociatedMixin",
|
|
1766
1731
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1767
1732
|
}
|
|
1768
1733
|
},
|
|
1769
1734
|
{
|
|
1770
|
-
"
|
|
1771
|
-
"name": "checked",
|
|
1735
|
+
"name": "hide-label",
|
|
1772
1736
|
"type": {
|
|
1773
1737
|
"text": "boolean"
|
|
1774
1738
|
},
|
|
1775
1739
|
"default": "false",
|
|
1776
|
-
"description": "
|
|
1777
|
-
"
|
|
1740
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
1741
|
+
"fieldName": "hideLabel",
|
|
1742
|
+
"inheritedFrom": {
|
|
1743
|
+
"name": "FormAssociatedMixin",
|
|
1744
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1745
|
+
}
|
|
1778
1746
|
},
|
|
1779
1747
|
{
|
|
1780
|
-
"
|
|
1781
|
-
"
|
|
1782
|
-
|
|
1783
|
-
"return": {
|
|
1784
|
-
"type": {
|
|
1785
|
-
"text": "void"
|
|
1786
|
-
}
|
|
1748
|
+
"name": "placeholder",
|
|
1749
|
+
"type": {
|
|
1750
|
+
"text": "string | undefined"
|
|
1787
1751
|
},
|
|
1788
|
-
"
|
|
1789
|
-
|
|
1790
|
-
"name": "e",
|
|
1791
|
-
"type": {
|
|
1792
|
-
"text": "Event"
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
],
|
|
1752
|
+
"description": "Placeholder text to display within the input.",
|
|
1753
|
+
"fieldName": "placeholder",
|
|
1796
1754
|
"inheritedFrom": {
|
|
1797
1755
|
"name": "FormAssociatedMixin",
|
|
1798
1756
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1799
1757
|
}
|
|
1800
1758
|
},
|
|
1801
1759
|
{
|
|
1802
|
-
"
|
|
1803
|
-
"
|
|
1804
|
-
|
|
1805
|
-
|
|
1760
|
+
"name": "error",
|
|
1761
|
+
"type": {
|
|
1762
|
+
"text": "string | undefined"
|
|
1763
|
+
},
|
|
1764
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
1765
|
+
"fieldName": "error",
|
|
1806
1766
|
"inheritedFrom": {
|
|
1807
1767
|
"name": "FormAssociatedMixin",
|
|
1808
1768
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1809
1769
|
}
|
|
1810
1770
|
},
|
|
1811
1771
|
{
|
|
1812
|
-
"
|
|
1813
|
-
"
|
|
1814
|
-
|
|
1815
|
-
|
|
1772
|
+
"name": "required",
|
|
1773
|
+
"type": {
|
|
1774
|
+
"text": "boolean"
|
|
1775
|
+
},
|
|
1776
|
+
"default": "false",
|
|
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.",
|
|
1778
|
+
"fieldName": "required",
|
|
1816
1779
|
"inheritedFrom": {
|
|
1817
1780
|
"name": "FormAssociatedMixin",
|
|
1818
1781
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1819
1782
|
}
|
|
1820
1783
|
},
|
|
1821
1784
|
{
|
|
1822
|
-
"
|
|
1823
|
-
"
|
|
1824
|
-
|
|
1825
|
-
|
|
1785
|
+
"name": "expand",
|
|
1786
|
+
"type": {
|
|
1787
|
+
"text": "boolean"
|
|
1788
|
+
},
|
|
1789
|
+
"default": "false",
|
|
1790
|
+
"description": "Controls whether the input expands to fill the width of its container.",
|
|
1791
|
+
"fieldName": "expand",
|
|
1826
1792
|
"inheritedFrom": {
|
|
1827
1793
|
"name": "FormAssociatedMixin",
|
|
1828
1794
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1829
1795
|
}
|
|
1830
1796
|
},
|
|
1831
1797
|
{
|
|
1832
|
-
"
|
|
1833
|
-
"
|
|
1834
|
-
|
|
1835
|
-
|
|
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",
|
|
1836
1805
|
"inheritedFrom": {
|
|
1837
|
-
"name": "
|
|
1838
|
-
"module": "src/common/mixins/
|
|
1806
|
+
"name": "InputMixin",
|
|
1807
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1839
1808
|
}
|
|
1840
1809
|
},
|
|
1841
1810
|
{
|
|
1842
|
-
"
|
|
1843
|
-
"name": "inputId",
|
|
1811
|
+
"name": "name",
|
|
1844
1812
|
"type": {
|
|
1845
|
-
"text": "string"
|
|
1813
|
+
"text": "string | undefined"
|
|
1846
1814
|
},
|
|
1847
|
-
"
|
|
1848
|
-
"
|
|
1815
|
+
"description": "The name of the form component.",
|
|
1816
|
+
"fieldName": "name",
|
|
1849
1817
|
"inheritedFrom": {
|
|
1850
|
-
"name": "
|
|
1851
|
-
"module": "src/common/mixins/
|
|
1818
|
+
"name": "InputMixin",
|
|
1819
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1852
1820
|
}
|
|
1853
1821
|
},
|
|
1854
1822
|
{
|
|
1855
|
-
"
|
|
1856
|
-
"name": "errorId",
|
|
1823
|
+
"name": "value",
|
|
1857
1824
|
"type": {
|
|
1858
1825
|
"text": "string"
|
|
1859
1826
|
},
|
|
1860
|
-
"
|
|
1861
|
-
"
|
|
1827
|
+
"default": "\"\"",
|
|
1828
|
+
"description": "The value of the form component.",
|
|
1829
|
+
"fieldName": "value",
|
|
1830
|
+
"inheritedFrom": {
|
|
1831
|
+
"name": "InputMixin",
|
|
1832
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
],
|
|
1836
|
+
"mixins": [
|
|
1837
|
+
{
|
|
1838
|
+
"name": "FormAssociatedMixin",
|
|
1839
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
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.",
|
|
1862
1869
|
"inheritedFrom": {
|
|
1863
1870
|
"name": "FormAssociatedMixin",
|
|
1864
1871
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1865
1872
|
}
|
|
1866
1873
|
},
|
|
1867
1874
|
{
|
|
1868
|
-
"
|
|
1869
|
-
"name": "hintId",
|
|
1875
|
+
"name": "change",
|
|
1870
1876
|
"type": {
|
|
1871
|
-
"text": "
|
|
1877
|
+
"text": "NordEvent"
|
|
1872
1878
|
},
|
|
1873
|
-
"
|
|
1874
|
-
"default": "\"hint\"",
|
|
1879
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
1875
1880
|
"inheritedFrom": {
|
|
1876
1881
|
"name": "FormAssociatedMixin",
|
|
1877
1882
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1878
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"
|
|
1879
1927
|
},
|
|
1880
1928
|
{
|
|
1881
1929
|
"kind": "field",
|
|
1882
|
-
"name": "
|
|
1930
|
+
"name": "listRef",
|
|
1931
|
+
"privacy": "private"
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"kind": "field",
|
|
1935
|
+
"name": "previousFocus",
|
|
1936
|
+
"type": {
|
|
1937
|
+
"text": "HTMLElement | undefined"
|
|
1938
|
+
},
|
|
1939
|
+
"privacy": "private"
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
"kind": "field",
|
|
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",
|
|
1956
|
+
"type": {
|
|
1957
|
+
"text": "boolean"
|
|
1958
|
+
},
|
|
1959
|
+
"default": "false",
|
|
1960
|
+
"description": "Show or hide the command menu.",
|
|
1961
|
+
"attribute": "open"
|
|
1962
|
+
},
|
|
1963
|
+
{
|
|
1964
|
+
"kind": "field",
|
|
1965
|
+
"name": "placeholder",
|
|
1883
1966
|
"type": {
|
|
1884
1967
|
"text": "string"
|
|
1885
1968
|
},
|
|
1886
|
-
"default": "\"
|
|
1887
|
-
"description": "
|
|
1888
|
-
"attribute": "
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
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."
|
|
1893
1981
|
},
|
|
1894
1982
|
{
|
|
1895
1983
|
"kind": "field",
|
|
1896
|
-
"name": "
|
|
1984
|
+
"name": "parent",
|
|
1897
1985
|
"type": {
|
|
1898
1986
|
"text": "string | undefined"
|
|
1899
1987
|
},
|
|
1900
|
-
"
|
|
1901
|
-
"attribute": "hint",
|
|
1902
|
-
"inheritedFrom": {
|
|
1903
|
-
"name": "FormAssociatedMixin",
|
|
1904
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1905
|
-
}
|
|
1988
|
+
"privacy": "private"
|
|
1906
1989
|
},
|
|
1907
1990
|
{
|
|
1908
1991
|
"kind": "field",
|
|
1909
|
-
"name": "
|
|
1992
|
+
"name": "search",
|
|
1910
1993
|
"type": {
|
|
1911
|
-
"text": "
|
|
1994
|
+
"text": "string"
|
|
1912
1995
|
},
|
|
1913
|
-
"
|
|
1914
|
-
"
|
|
1915
|
-
"attribute": "hide-label",
|
|
1916
|
-
"inheritedFrom": {
|
|
1917
|
-
"name": "FormAssociatedMixin",
|
|
1918
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1919
|
-
}
|
|
1996
|
+
"privacy": "private",
|
|
1997
|
+
"default": "\"\""
|
|
1920
1998
|
},
|
|
1921
1999
|
{
|
|
1922
2000
|
"kind": "field",
|
|
1923
|
-
"name": "
|
|
2001
|
+
"name": "bump",
|
|
1924
2002
|
"type": {
|
|
1925
|
-
"text": "
|
|
2003
|
+
"text": "boolean"
|
|
1926
2004
|
},
|
|
1927
|
-
"
|
|
1928
|
-
"
|
|
1929
|
-
"inheritedFrom": {
|
|
1930
|
-
"name": "FormAssociatedMixin",
|
|
1931
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1932
|
-
}
|
|
2005
|
+
"privacy": "private",
|
|
2006
|
+
"default": "true"
|
|
1933
2007
|
},
|
|
1934
2008
|
{
|
|
1935
2009
|
"kind": "field",
|
|
1936
|
-
"name": "
|
|
2010
|
+
"name": "selectedIndex",
|
|
1937
2011
|
"type": {
|
|
1938
|
-
"text": "
|
|
2012
|
+
"text": "number"
|
|
1939
2013
|
},
|
|
1940
|
-
"
|
|
1941
|
-
"
|
|
1942
|
-
"inheritedFrom": {
|
|
1943
|
-
"name": "FormAssociatedMixin",
|
|
1944
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1945
|
-
}
|
|
2014
|
+
"privacy": "private",
|
|
2015
|
+
"default": "0"
|
|
1946
2016
|
},
|
|
1947
2017
|
{
|
|
1948
2018
|
"kind": "field",
|
|
1949
|
-
"name": "
|
|
2019
|
+
"name": "filteredCommands",
|
|
1950
2020
|
"type": {
|
|
1951
|
-
"text": "
|
|
2021
|
+
"text": "Array<ICommandMenuAction>"
|
|
1952
2022
|
},
|
|
1953
|
-
"
|
|
1954
|
-
"
|
|
1955
|
-
"attribute": "required",
|
|
1956
|
-
"inheritedFrom": {
|
|
1957
|
-
"name": "FormAssociatedMixin",
|
|
1958
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1959
|
-
}
|
|
2023
|
+
"privacy": "private",
|
|
2024
|
+
"default": "[]"
|
|
1960
2025
|
},
|
|
1961
2026
|
{
|
|
1962
2027
|
"kind": "field",
|
|
1963
|
-
"name": "
|
|
2028
|
+
"name": "selected",
|
|
1964
2029
|
"type": {
|
|
1965
|
-
"text": "
|
|
2030
|
+
"text": "ICommandMenuAction"
|
|
1966
2031
|
},
|
|
1967
|
-
"
|
|
1968
|
-
"description": "Controls whether the input expands to fill the width of its container.",
|
|
1969
|
-
"attribute": "expand",
|
|
1970
|
-
"reflects": true,
|
|
1971
|
-
"inheritedFrom": {
|
|
1972
|
-
"name": "FormAssociatedMixin",
|
|
1973
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1974
|
-
}
|
|
2032
|
+
"privacy": "private"
|
|
1975
2033
|
},
|
|
1976
2034
|
{
|
|
1977
2035
|
"kind": "method",
|
|
1978
|
-
"name": "
|
|
1979
|
-
"privacy": "protected",
|
|
2036
|
+
"name": "show",
|
|
1980
2037
|
"parameters": [
|
|
1981
2038
|
{
|
|
1982
|
-
"name": "
|
|
2039
|
+
"name": "options",
|
|
2040
|
+
"default": "{}",
|
|
1983
2041
|
"type": {
|
|
1984
|
-
"text": "
|
|
1985
|
-
}
|
|
2042
|
+
"text": "{ parent?: string }"
|
|
2043
|
+
},
|
|
2044
|
+
"description": "allows you to open the menu filtered to a specific parent command."
|
|
1986
2045
|
}
|
|
1987
2046
|
],
|
|
1988
|
-
"
|
|
1989
|
-
"name": "FormAssociatedMixin",
|
|
1990
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1991
|
-
}
|
|
2047
|
+
"description": "Show the command menu programmatically."
|
|
1992
2048
|
},
|
|
1993
2049
|
{
|
|
1994
2050
|
"kind": "method",
|
|
1995
|
-
"name": "
|
|
1996
|
-
"
|
|
1997
|
-
"inheritedFrom": {
|
|
1998
|
-
"name": "FormAssociatedMixin",
|
|
1999
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2000
|
-
}
|
|
2051
|
+
"name": "close",
|
|
2052
|
+
"description": "Close the command menu programmatically."
|
|
2001
2053
|
},
|
|
2002
2054
|
{
|
|
2003
2055
|
"kind": "method",
|
|
2004
|
-
"name": "
|
|
2005
|
-
"
|
|
2006
|
-
"inheritedFrom": {
|
|
2007
|
-
"name": "FormAssociatedMixin",
|
|
2008
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2009
|
-
}
|
|
2056
|
+
"name": "toggleOpen",
|
|
2057
|
+
"description": "Toggle the open state programmatically."
|
|
2010
2058
|
},
|
|
2011
2059
|
{
|
|
2012
2060
|
"kind": "method",
|
|
2013
|
-
"name": "
|
|
2014
|
-
"
|
|
2015
|
-
"inheritedFrom": {
|
|
2016
|
-
"name": "FormAssociatedMixin",
|
|
2017
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2018
|
-
}
|
|
2061
|
+
"name": "focus",
|
|
2062
|
+
"description": "Focus the command menu's input."
|
|
2019
2063
|
},
|
|
2020
2064
|
{
|
|
2021
2065
|
"kind": "method",
|
|
2022
|
-
"name": "
|
|
2023
|
-
"privacy": "
|
|
2024
|
-
"inheritedFrom": {
|
|
2025
|
-
"name": "FormAssociatedMixin",
|
|
2026
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2027
|
-
}
|
|
2066
|
+
"name": "renderNoResults",
|
|
2067
|
+
"privacy": "private"
|
|
2028
2068
|
},
|
|
2029
2069
|
{
|
|
2030
|
-
"kind": "
|
|
2031
|
-
"name": "
|
|
2032
|
-
"privacy": "
|
|
2033
|
-
"
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2070
|
+
"kind": "method",
|
|
2071
|
+
"name": "renderSection",
|
|
2072
|
+
"privacy": "private",
|
|
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
|
+
]
|
|
2037
2087
|
},
|
|
2038
2088
|
{
|
|
2039
|
-
"kind": "
|
|
2040
|
-
"name": "
|
|
2041
|
-
"privacy": "
|
|
2042
|
-
"inheritedFrom": {
|
|
2043
|
-
"name": "FormAssociatedMixin",
|
|
2044
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2045
|
-
}
|
|
2089
|
+
"kind": "method",
|
|
2090
|
+
"name": "handleAnimationEnd",
|
|
2091
|
+
"privacy": "private"
|
|
2046
2092
|
},
|
|
2047
2093
|
{
|
|
2048
|
-
"kind": "
|
|
2049
|
-
"name": "
|
|
2050
|
-
"
|
|
2051
|
-
"text": "boolean"
|
|
2052
|
-
},
|
|
2053
|
-
"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
|
-
}
|
|
2094
|
+
"kind": "method",
|
|
2095
|
+
"name": "handleBlur",
|
|
2096
|
+
"privacy": "private"
|
|
2061
2097
|
},
|
|
2062
2098
|
{
|
|
2063
|
-
"kind": "
|
|
2064
|
-
"name": "
|
|
2065
|
-
"
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2099
|
+
"kind": "method",
|
|
2100
|
+
"name": "handleInput",
|
|
2101
|
+
"privacy": "private",
|
|
2102
|
+
"parameters": [
|
|
2103
|
+
{
|
|
2104
|
+
"name": "event",
|
|
2105
|
+
"type": {
|
|
2106
|
+
"text": "KeyboardEvent"
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
]
|
|
2074
2110
|
},
|
|
2075
2111
|
{
|
|
2076
|
-
"kind": "
|
|
2077
|
-
"name": "
|
|
2078
|
-
"
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
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
|
+
]
|
|
2088
2124
|
},
|
|
2089
2125
|
{
|
|
2090
|
-
"kind": "
|
|
2091
|
-
"name": "
|
|
2092
|
-
"privacy": "
|
|
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
|
-
}
|
|
2126
|
+
"kind": "method",
|
|
2127
|
+
"name": "start",
|
|
2128
|
+
"privacy": "private"
|
|
2098
2129
|
},
|
|
2099
2130
|
{
|
|
2100
|
-
"kind": "
|
|
2101
|
-
"name": "
|
|
2102
|
-
"privacy": "
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2131
|
+
"kind": "method",
|
|
2132
|
+
"name": "end",
|
|
2133
|
+
"privacy": "private"
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
"kind": "method",
|
|
2137
|
+
"name": "next",
|
|
2138
|
+
"privacy": "private"
|
|
2139
|
+
},
|
|
2140
|
+
{
|
|
2141
|
+
"kind": "method",
|
|
2142
|
+
"name": "previous",
|
|
2143
|
+
"privacy": "private"
|
|
2107
2144
|
},
|
|
2108
2145
|
{
|
|
2109
2146
|
"kind": "method",
|
|
2110
|
-
"name": "
|
|
2147
|
+
"name": "goBack",
|
|
2148
|
+
"privacy": "private"
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
"kind": "method",
|
|
2152
|
+
"name": "setParent",
|
|
2153
|
+
"privacy": "private",
|
|
2111
2154
|
"parameters": [
|
|
2112
2155
|
{
|
|
2113
|
-
"name": "
|
|
2156
|
+
"name": "parent",
|
|
2114
2157
|
"optional": true,
|
|
2115
2158
|
"type": {
|
|
2116
|
-
"text": "
|
|
2117
|
-
}
|
|
2118
|
-
"description": "An object which controls aspects of the focusing process."
|
|
2159
|
+
"text": "string"
|
|
2160
|
+
}
|
|
2119
2161
|
}
|
|
2120
|
-
]
|
|
2121
|
-
"description": "Programmatically move focus to the component.",
|
|
2122
|
-
"inheritedFrom": {
|
|
2123
|
-
"name": "FocusableMixin",
|
|
2124
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2125
|
-
}
|
|
2162
|
+
]
|
|
2126
2163
|
},
|
|
2127
2164
|
{
|
|
2128
2165
|
"kind": "method",
|
|
2129
|
-
"name": "
|
|
2130
|
-
"
|
|
2131
|
-
"
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2166
|
+
"name": "setSearch",
|
|
2167
|
+
"privacy": "private",
|
|
2168
|
+
"parameters": [
|
|
2169
|
+
{
|
|
2170
|
+
"name": "str",
|
|
2171
|
+
"type": {
|
|
2172
|
+
"text": "string"
|
|
2173
|
+
}
|
|
2174
|
+
}
|
|
2175
|
+
]
|
|
2135
2176
|
},
|
|
2136
2177
|
{
|
|
2137
2178
|
"kind": "method",
|
|
2138
|
-
"name": "
|
|
2139
|
-
"
|
|
2140
|
-
"inheritedFrom": {
|
|
2141
|
-
"name": "FocusableMixin",
|
|
2142
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2143
|
-
}
|
|
2179
|
+
"name": "filterCommands",
|
|
2180
|
+
"privacy": "private"
|
|
2144
2181
|
},
|
|
2145
2182
|
{
|
|
2146
2183
|
"kind": "field",
|
|
@@ -2157,193 +2194,148 @@
|
|
|
2157
2194
|
}
|
|
2158
2195
|
}
|
|
2159
2196
|
],
|
|
2160
|
-
"
|
|
2197
|
+
"events": [
|
|
2161
2198
|
{
|
|
2162
|
-
"name": "
|
|
2199
|
+
"name": "open",
|
|
2163
2200
|
"type": {
|
|
2164
|
-
"text": "
|
|
2201
|
+
"text": "NordEvent"
|
|
2165
2202
|
},
|
|
2166
|
-
"
|
|
2167
|
-
"description": "Controls whether the checkbox is checked or not.",
|
|
2168
|
-
"fieldName": "checked"
|
|
2203
|
+
"description": "The command menu was opened."
|
|
2169
2204
|
},
|
|
2170
2205
|
{
|
|
2171
|
-
"name": "
|
|
2206
|
+
"name": "close",
|
|
2172
2207
|
"type": {
|
|
2173
|
-
"text": "
|
|
2208
|
+
"text": "NordEvent"
|
|
2174
2209
|
},
|
|
2175
|
-
"
|
|
2176
|
-
"description": "Label for the input.",
|
|
2177
|
-
"fieldName": "label",
|
|
2178
|
-
"inheritedFrom": {
|
|
2179
|
-
"name": "FormAssociatedMixin",
|
|
2180
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2181
|
-
}
|
|
2210
|
+
"description": "The command menu was closed."
|
|
2182
2211
|
},
|
|
2183
2212
|
{
|
|
2184
|
-
"name": "hint",
|
|
2185
2213
|
"type": {
|
|
2186
|
-
"text": "
|
|
2214
|
+
"text": "SelectEvent"
|
|
2187
2215
|
},
|
|
2188
|
-
"description": "
|
|
2189
|
-
"
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
}
|
|
2194
|
-
},
|
|
2216
|
+
"description": "User selected a command from the menu.",
|
|
2217
|
+
"name": "nord-select"
|
|
2218
|
+
}
|
|
2219
|
+
],
|
|
2220
|
+
"attributes": [
|
|
2195
2221
|
{
|
|
2196
|
-
"name": "
|
|
2222
|
+
"name": "open",
|
|
2197
2223
|
"type": {
|
|
2198
2224
|
"text": "boolean"
|
|
2199
2225
|
},
|
|
2200
2226
|
"default": "false",
|
|
2201
|
-
"description": "
|
|
2202
|
-
"fieldName": "
|
|
2203
|
-
"inheritedFrom": {
|
|
2204
|
-
"name": "FormAssociatedMixin",
|
|
2205
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2206
|
-
}
|
|
2227
|
+
"description": "Show or hide the command menu.",
|
|
2228
|
+
"fieldName": "open"
|
|
2207
2229
|
},
|
|
2208
2230
|
{
|
|
2209
2231
|
"name": "placeholder",
|
|
2210
2232
|
"type": {
|
|
2211
|
-
"text": "string
|
|
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
|
-
}
|
|
2219
|
-
},
|
|
2220
|
-
{
|
|
2221
|
-
"name": "error",
|
|
2222
|
-
"type": {
|
|
2223
|
-
"text": "string | undefined"
|
|
2233
|
+
"text": "string"
|
|
2224
2234
|
},
|
|
2225
|
-
"
|
|
2226
|
-
"
|
|
2227
|
-
"
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
},
|
|
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": [
|
|
2232
2241
|
{
|
|
2233
|
-
"name": "
|
|
2234
|
-
"
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2242
|
+
"name": "DraftComponentMixin",
|
|
2243
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
2244
|
+
}
|
|
2245
|
+
],
|
|
2246
|
+
"superclass": {
|
|
2247
|
+
"name": "LitElement",
|
|
2248
|
+
"package": "lit"
|
|
2249
|
+
},
|
|
2250
|
+
"status": "draft",
|
|
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 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": [
|
|
2245
2285
|
{
|
|
2246
|
-
"
|
|
2286
|
+
"kind": "field",
|
|
2287
|
+
"name": "command",
|
|
2247
2288
|
"type": {
|
|
2248
|
-
"text": "
|
|
2289
|
+
"text": "ICommandMenuAction"
|
|
2249
2290
|
},
|
|
2250
|
-
"
|
|
2251
|
-
"description": "Controls whether the input expands to fill the width of its container.",
|
|
2252
|
-
"fieldName": "expand",
|
|
2253
|
-
"inheritedFrom": {
|
|
2254
|
-
"name": "FormAssociatedMixin",
|
|
2255
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2256
|
-
}
|
|
2291
|
+
"attribute": "command"
|
|
2257
2292
|
},
|
|
2258
2293
|
{
|
|
2259
|
-
"
|
|
2294
|
+
"kind": "field",
|
|
2295
|
+
"name": "selected",
|
|
2260
2296
|
"type": {
|
|
2261
2297
|
"text": "boolean"
|
|
2262
2298
|
},
|
|
2263
2299
|
"default": "false",
|
|
2264
|
-
"
|
|
2265
|
-
"fieldName": "disabled",
|
|
2266
|
-
"inheritedFrom": {
|
|
2267
|
-
"name": "InputMixin",
|
|
2268
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2269
|
-
}
|
|
2270
|
-
},
|
|
2271
|
-
{
|
|
2272
|
-
"name": "name",
|
|
2273
|
-
"type": {
|
|
2274
|
-
"text": "string | undefined"
|
|
2275
|
-
},
|
|
2276
|
-
"description": "The name of the form component.",
|
|
2277
|
-
"fieldName": "name",
|
|
2278
|
-
"inheritedFrom": {
|
|
2279
|
-
"name": "InputMixin",
|
|
2280
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2281
|
-
}
|
|
2282
|
-
},
|
|
2283
|
-
{
|
|
2284
|
-
"name": "value",
|
|
2285
|
-
"type": {
|
|
2286
|
-
"text": "string"
|
|
2287
|
-
},
|
|
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
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
],
|
|
2297
|
-
"mixins": [
|
|
2298
|
-
{
|
|
2299
|
-
"name": "FormAssociatedMixin",
|
|
2300
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
2301
|
-
},
|
|
2302
|
-
{
|
|
2303
|
-
"name": "InputMixin",
|
|
2304
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
2300
|
+
"attribute": "selected"
|
|
2305
2301
|
},
|
|
2306
2302
|
{
|
|
2307
|
-
"
|
|
2308
|
-
"
|
|
2303
|
+
"kind": "method",
|
|
2304
|
+
"name": "ensureInView",
|
|
2305
|
+
"privacy": "private",
|
|
2306
|
+
"description": "Scroll to show element"
|
|
2309
2307
|
},
|
|
2310
2308
|
{
|
|
2311
|
-
"
|
|
2312
|
-
"
|
|
2309
|
+
"kind": "method",
|
|
2310
|
+
"name": "renderShortcut",
|
|
2311
|
+
"privacy": "private"
|
|
2313
2312
|
}
|
|
2314
2313
|
],
|
|
2315
|
-
"
|
|
2316
|
-
"name": "LitElement",
|
|
2317
|
-
"package": "lit"
|
|
2318
|
-
},
|
|
2319
|
-
"status": "draft",
|
|
2320
|
-
"category": "form",
|
|
2321
|
-
"tagName": "nord-checkbox",
|
|
2322
|
-
"customElement": true,
|
|
2323
|
-
"events": [
|
|
2314
|
+
"attributes": [
|
|
2324
2315
|
{
|
|
2325
|
-
"name": "
|
|
2316
|
+
"name": "command",
|
|
2326
2317
|
"type": {
|
|
2327
|
-
"text": "
|
|
2318
|
+
"text": "ICommandMenuAction"
|
|
2328
2319
|
},
|
|
2329
|
-
"
|
|
2330
|
-
"inheritedFrom": {
|
|
2331
|
-
"name": "FormAssociatedMixin",
|
|
2332
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2333
|
-
}
|
|
2320
|
+
"fieldName": "command"
|
|
2334
2321
|
},
|
|
2335
2322
|
{
|
|
2336
|
-
"name": "
|
|
2323
|
+
"name": "selected",
|
|
2337
2324
|
"type": {
|
|
2338
|
-
"text": "
|
|
2325
|
+
"text": "boolean"
|
|
2339
2326
|
},
|
|
2340
|
-
"
|
|
2341
|
-
"
|
|
2342
|
-
"name": "FormAssociatedMixin",
|
|
2343
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2344
|
-
}
|
|
2327
|
+
"default": "false",
|
|
2328
|
+
"fieldName": "selected"
|
|
2345
2329
|
}
|
|
2346
|
-
]
|
|
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": "
|
|
2355
|
-
"module": "src/
|
|
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-
|
|
2352
|
+
"name": "nord-command-menu-action",
|
|
2361
2353
|
"declaration": {
|
|
2362
|
-
"name": "
|
|
2363
|
-
"module": "src/
|
|
2354
|
+
"name": "CommandMenuAction",
|
|
2355
|
+
"module": "src/command-menu/CommandMenuAction.ts"
|
|
2364
2356
|
}
|
|
2365
2357
|
}
|
|
2366
2358
|
],
|
|
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"
|
|
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 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
2360
|
},
|
|
2369
2361
|
{
|
|
2370
2362
|
"kind": "javascript-module",
|
|
2371
|
-
"path": "src/
|
|
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 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",
|
|
2372
2371
|
"declarations": [
|
|
2373
2372
|
{
|
|
2374
2373
|
"kind": "class",
|
|
2375
|
-
"description": "
|
|
2376
|
-
"name": "
|
|
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
|
-
],
|
|
2374
|
+
"description": "",
|
|
2375
|
+
"name": "KeyboardController",
|
|
2391
2376
|
"members": [
|
|
2392
2377
|
{
|
|
2393
2378
|
"kind": "field",
|
|
2394
|
-
"name": "
|
|
2379
|
+
"name": "host",
|
|
2380
|
+
"type": {
|
|
2381
|
+
"text": "CommandMenu"
|
|
2382
|
+
},
|
|
2395
2383
|
"privacy": "private",
|
|
2396
|
-
"default": "
|
|
2384
|
+
"default": "host"
|
|
2397
2385
|
},
|
|
2398
2386
|
{
|
|
2399
2387
|
"kind": "field",
|
|
2400
|
-
"name": "
|
|
2388
|
+
"name": "globalShortcuts",
|
|
2389
|
+
"type": {
|
|
2390
|
+
"text": "ShortcutController"
|
|
2391
|
+
},
|
|
2401
2392
|
"privacy": "private",
|
|
2402
|
-
"default": "new
|
|
2393
|
+
"default": "new ShortcutController(host, { \"$mod+k\": preventDefault(actions.toggleOpen) })"
|
|
2403
2394
|
},
|
|
2404
2395
|
{
|
|
2405
2396
|
"kind": "field",
|
|
2406
|
-
"name": "
|
|
2397
|
+
"name": "navigationShortcuts",
|
|
2407
2398
|
"type": {
|
|
2408
|
-
"text": "
|
|
2399
|
+
"text": "ShortcutController"
|
|
2409
2400
|
},
|
|
2410
|
-
"
|
|
2411
|
-
"
|
|
2412
|
-
"attribute": "padding",
|
|
2413
|
-
"reflects": true
|
|
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 )"
|
|
2414
2403
|
},
|
|
2415
2404
|
{
|
|
2416
2405
|
"kind": "field",
|
|
2417
|
-
"name": "
|
|
2406
|
+
"name": "commandShortcuts",
|
|
2418
2407
|
"type": {
|
|
2419
|
-
"text": "
|
|
2408
|
+
"text": "ShortcutController"
|
|
2420
2409
|
},
|
|
2421
2410
|
"privacy": "private",
|
|
2422
|
-
"
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
}
|
|
2411
|
+
"default": "new ShortcutController(host)"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
"kind": "method",
|
|
2415
|
+
"name": "registerCommandShortcuts"
|
|
2428
2416
|
}
|
|
2429
|
-
]
|
|
2430
|
-
|
|
2417
|
+
]
|
|
2418
|
+
}
|
|
2419
|
+
],
|
|
2420
|
+
"exports": [
|
|
2421
|
+
{
|
|
2422
|
+
"kind": "js",
|
|
2423
|
+
"name": "KeyboardController",
|
|
2424
|
+
"declaration": {
|
|
2425
|
+
"name": "KeyboardController",
|
|
2426
|
+
"module": "src/command-menu/KeyboardController.ts"
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
],
|
|
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 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"
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"kind": "javascript-module",
|
|
2434
|
+
"path": "src/command-menu/SelectEvent.ts",
|
|
2435
|
+
"declarations": [
|
|
2436
|
+
{
|
|
2437
|
+
"kind": "class",
|
|
2438
|
+
"description": "",
|
|
2439
|
+
"name": "SelectEvent",
|
|
2440
|
+
"members": [
|
|
2431
2441
|
{
|
|
2432
|
-
"
|
|
2442
|
+
"kind": "field",
|
|
2443
|
+
"name": "eventName",
|
|
2433
2444
|
"type": {
|
|
2434
|
-
"text": "
|
|
2445
|
+
"text": "string"
|
|
2435
2446
|
},
|
|
2436
|
-
"
|
|
2437
|
-
"
|
|
2438
|
-
|
|
2439
|
-
}
|
|
2440
|
-
],
|
|
2441
|
-
"mixins": [
|
|
2447
|
+
"static": true,
|
|
2448
|
+
"default": "\"nord-select\""
|
|
2449
|
+
},
|
|
2442
2450
|
{
|
|
2443
|
-
"
|
|
2444
|
-
"
|
|
2451
|
+
"kind": "field",
|
|
2452
|
+
"name": "command",
|
|
2453
|
+
"type": {
|
|
2454
|
+
"text": "ICommandMenuAction"
|
|
2455
|
+
},
|
|
2456
|
+
"default": "command"
|
|
2445
2457
|
}
|
|
2446
2458
|
],
|
|
2447
2459
|
"superclass": {
|
|
2448
|
-
"name": "
|
|
2449
|
-
"
|
|
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": "
|
|
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": "
|
|
2471
|
-
"module": "src/
|
|
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 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",
|
|
@@ -4484,14 +4484,90 @@
|
|
|
4484
4484
|
},
|
|
4485
4485
|
{
|
|
4486
4486
|
"kind": "custom-element-definition",
|
|
4487
|
-
"name": "nord-fieldset",
|
|
4487
|
+
"name": "nord-fieldset",
|
|
4488
|
+
"declaration": {
|
|
4489
|
+
"name": "Fieldset",
|
|
4490
|
+
"module": "src/fieldset/Fieldset.ts"
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
],
|
|
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
|
+
},
|
|
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",
|
|
4488
4564
|
"declaration": {
|
|
4489
|
-
"name": "
|
|
4490
|
-
"module": "src/
|
|
4565
|
+
"name": "Header",
|
|
4566
|
+
"module": "src/header/Header.ts"
|
|
4491
4567
|
}
|
|
4492
4568
|
}
|
|
4493
4569
|
],
|
|
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
|
|
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"
|
|
4495
4571
|
},
|
|
4496
4572
|
{
|
|
4497
4573
|
"kind": "javascript-module",
|
|
@@ -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",
|
|
@@ -8408,61 +8408,237 @@
|
|
|
8408
8408
|
"name": "VisuallyHidden",
|
|
8409
8409
|
"slots": [
|
|
8410
8410
|
{
|
|
8411
|
-
"description": "The visually hidden content.",
|
|
8412
|
-
"name": ""
|
|
8413
|
-
}
|
|
8414
|
-
],
|
|
8415
|
-
"members": [
|
|
8411
|
+
"description": "The visually hidden content.",
|
|
8412
|
+
"name": ""
|
|
8413
|
+
}
|
|
8414
|
+
],
|
|
8415
|
+
"members": [
|
|
8416
|
+
{
|
|
8417
|
+
"kind": "field",
|
|
8418
|
+
"name": "_warningLogged",
|
|
8419
|
+
"type": {
|
|
8420
|
+
"text": "boolean"
|
|
8421
|
+
},
|
|
8422
|
+
"privacy": "private",
|
|
8423
|
+
"static": true,
|
|
8424
|
+
"default": "false",
|
|
8425
|
+
"inheritedFrom": {
|
|
8426
|
+
"name": "DraftComponentMixin",
|
|
8427
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
8428
|
+
}
|
|
8429
|
+
}
|
|
8430
|
+
],
|
|
8431
|
+
"mixins": [
|
|
8432
|
+
{
|
|
8433
|
+
"name": "DraftComponentMixin",
|
|
8434
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
8435
|
+
}
|
|
8436
|
+
],
|
|
8437
|
+
"superclass": {
|
|
8438
|
+
"name": "LitElement",
|
|
8439
|
+
"package": "lit"
|
|
8440
|
+
},
|
|
8441
|
+
"status": "draft",
|
|
8442
|
+
"category": "text",
|
|
8443
|
+
"tagName": "nord-visually-hidden",
|
|
8444
|
+
"customElement": true
|
|
8445
|
+
}
|
|
8446
|
+
],
|
|
8447
|
+
"exports": [
|
|
8448
|
+
{
|
|
8449
|
+
"kind": "js",
|
|
8450
|
+
"name": "default",
|
|
8451
|
+
"declaration": {
|
|
8452
|
+
"name": "VisuallyHidden",
|
|
8453
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
8454
|
+
}
|
|
8455
|
+
},
|
|
8456
|
+
{
|
|
8457
|
+
"kind": "custom-element-definition",
|
|
8458
|
+
"name": "nord-visually-hidden",
|
|
8459
|
+
"declaration": {
|
|
8460
|
+
"name": "VisuallyHidden",
|
|
8461
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
8462
|
+
}
|
|
8463
|
+
}
|
|
8464
|
+
],
|
|
8465
|
+
"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 hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
|
|
8466
|
+
},
|
|
8467
|
+
{
|
|
8468
|
+
"kind": "javascript-module",
|
|
8469
|
+
"path": "src/common/directives/cond.ts",
|
|
8470
|
+
"declarations": [
|
|
8471
|
+
{
|
|
8472
|
+
"kind": "variable",
|
|
8473
|
+
"name": "cond"
|
|
8474
|
+
}
|
|
8475
|
+
],
|
|
8476
|
+
"exports": [
|
|
8477
|
+
{
|
|
8478
|
+
"kind": "js",
|
|
8479
|
+
"name": "cond",
|
|
8480
|
+
"declaration": {
|
|
8481
|
+
"name": "cond",
|
|
8482
|
+
"module": "src/common/directives/cond.ts"
|
|
8483
|
+
}
|
|
8484
|
+
}
|
|
8485
|
+
]
|
|
8486
|
+
},
|
|
8487
|
+
{
|
|
8488
|
+
"kind": "javascript-module",
|
|
8489
|
+
"path": "src/common/directives/wrapIf.ts",
|
|
8490
|
+
"declarations": [
|
|
8491
|
+
{
|
|
8492
|
+
"kind": "function",
|
|
8493
|
+
"name": "wrapIf",
|
|
8494
|
+
"return": {
|
|
8495
|
+
"type": {
|
|
8496
|
+
"text": "TInner"
|
|
8497
|
+
}
|
|
8498
|
+
},
|
|
8499
|
+
"parameters": [
|
|
8500
|
+
{
|
|
8501
|
+
"name": "condition",
|
|
8502
|
+
"type": {
|
|
8503
|
+
"text": "false"
|
|
8504
|
+
}
|
|
8505
|
+
},
|
|
8506
|
+
{
|
|
8507
|
+
"name": "inner",
|
|
8508
|
+
"type": {
|
|
8509
|
+
"text": "() => TInner"
|
|
8510
|
+
}
|
|
8511
|
+
},
|
|
8512
|
+
{
|
|
8513
|
+
"name": "wrapper",
|
|
8514
|
+
"type": {
|
|
8515
|
+
"text": "(inner: TInner) => TWrapper"
|
|
8516
|
+
}
|
|
8517
|
+
}
|
|
8518
|
+
]
|
|
8519
|
+
},
|
|
8520
|
+
{
|
|
8521
|
+
"kind": "function",
|
|
8522
|
+
"name": "wrapIf",
|
|
8523
|
+
"return": {
|
|
8524
|
+
"type": {
|
|
8525
|
+
"text": "TWrapper"
|
|
8526
|
+
}
|
|
8527
|
+
},
|
|
8528
|
+
"parameters": [
|
|
8529
|
+
{
|
|
8530
|
+
"name": "condition",
|
|
8531
|
+
"type": {
|
|
8532
|
+
"text": "true"
|
|
8533
|
+
}
|
|
8534
|
+
},
|
|
8535
|
+
{
|
|
8536
|
+
"name": "inner",
|
|
8537
|
+
"type": {
|
|
8538
|
+
"text": "() => TInner"
|
|
8539
|
+
}
|
|
8540
|
+
},
|
|
8541
|
+
{
|
|
8542
|
+
"name": "wrapper",
|
|
8543
|
+
"type": {
|
|
8544
|
+
"text": "(inner: TInner) => TWrapper"
|
|
8545
|
+
}
|
|
8546
|
+
}
|
|
8547
|
+
]
|
|
8548
|
+
},
|
|
8549
|
+
{
|
|
8550
|
+
"kind": "function",
|
|
8551
|
+
"name": "wrapIf",
|
|
8552
|
+
"return": {
|
|
8553
|
+
"type": {
|
|
8554
|
+
"text": "TInner | TWrapper"
|
|
8555
|
+
}
|
|
8556
|
+
},
|
|
8557
|
+
"parameters": [
|
|
8558
|
+
{
|
|
8559
|
+
"name": "condition",
|
|
8560
|
+
"type": {
|
|
8561
|
+
"text": "unknown"
|
|
8562
|
+
}
|
|
8563
|
+
},
|
|
8564
|
+
{
|
|
8565
|
+
"name": "inner",
|
|
8566
|
+
"type": {
|
|
8567
|
+
"text": "() => TInner"
|
|
8568
|
+
}
|
|
8569
|
+
},
|
|
8570
|
+
{
|
|
8571
|
+
"name": "wrapper",
|
|
8572
|
+
"type": {
|
|
8573
|
+
"text": "(inner: TInner) => TWrapper"
|
|
8574
|
+
}
|
|
8575
|
+
}
|
|
8576
|
+
]
|
|
8577
|
+
},
|
|
8578
|
+
{
|
|
8579
|
+
"kind": "function",
|
|
8580
|
+
"name": "wrapIf",
|
|
8581
|
+
"parameters": [
|
|
8582
|
+
{
|
|
8583
|
+
"name": "condition",
|
|
8584
|
+
"type": {
|
|
8585
|
+
"text": "any"
|
|
8586
|
+
}
|
|
8587
|
+
},
|
|
8416
8588
|
{
|
|
8417
|
-
"
|
|
8418
|
-
"name": "_warningLogged",
|
|
8589
|
+
"name": "inner",
|
|
8419
8590
|
"type": {
|
|
8420
|
-
"text": "
|
|
8421
|
-
},
|
|
8422
|
-
"privacy": "private",
|
|
8423
|
-
"static": true,
|
|
8424
|
-
"default": "false",
|
|
8425
|
-
"inheritedFrom": {
|
|
8426
|
-
"name": "DraftComponentMixin",
|
|
8427
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
8591
|
+
"text": "() => TInner"
|
|
8428
8592
|
}
|
|
8429
|
-
}
|
|
8430
|
-
],
|
|
8431
|
-
"mixins": [
|
|
8593
|
+
},
|
|
8432
8594
|
{
|
|
8433
|
-
"name": "
|
|
8434
|
-
"
|
|
8595
|
+
"name": "wrapper",
|
|
8596
|
+
"type": {
|
|
8597
|
+
"text": "(innards: TInner) => TWrapper"
|
|
8598
|
+
}
|
|
8435
8599
|
}
|
|
8436
8600
|
],
|
|
8437
|
-
"
|
|
8438
|
-
"
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
"category": "text",
|
|
8443
|
-
"tagName": "nord-visually-hidden",
|
|
8444
|
-
"customElement": true
|
|
8601
|
+
"return": {
|
|
8602
|
+
"type": {
|
|
8603
|
+
"text": ""
|
|
8604
|
+
}
|
|
8605
|
+
}
|
|
8445
8606
|
}
|
|
8446
8607
|
],
|
|
8447
8608
|
"exports": [
|
|
8448
8609
|
{
|
|
8449
8610
|
"kind": "js",
|
|
8450
|
-
"name": "
|
|
8611
|
+
"name": "wrapIf",
|
|
8451
8612
|
"declaration": {
|
|
8452
|
-
"name": "
|
|
8453
|
-
"module": "src/
|
|
8613
|
+
"name": "wrapIf",
|
|
8614
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8454
8615
|
}
|
|
8455
8616
|
},
|
|
8456
8617
|
{
|
|
8457
|
-
"kind": "
|
|
8458
|
-
"name": "
|
|
8618
|
+
"kind": "js",
|
|
8619
|
+
"name": "wrapIf",
|
|
8459
8620
|
"declaration": {
|
|
8460
|
-
"name": "
|
|
8461
|
-
"module": "src/
|
|
8621
|
+
"name": "wrapIf",
|
|
8622
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8623
|
+
}
|
|
8624
|
+
},
|
|
8625
|
+
{
|
|
8626
|
+
"kind": "js",
|
|
8627
|
+
"name": "wrapIf",
|
|
8628
|
+
"declaration": {
|
|
8629
|
+
"name": "wrapIf",
|
|
8630
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8631
|
+
}
|
|
8632
|
+
},
|
|
8633
|
+
{
|
|
8634
|
+
"kind": "js",
|
|
8635
|
+
"name": "wrapIf",
|
|
8636
|
+
"declaration": {
|
|
8637
|
+
"name": "wrapIf",
|
|
8638
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
8462
8639
|
}
|
|
8463
8640
|
}
|
|
8464
|
-
]
|
|
8465
|
-
"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 hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
|
|
8641
|
+
]
|
|
8466
8642
|
},
|
|
8467
8643
|
{
|
|
8468
8644
|
"kind": "javascript-module",
|
|
@@ -9178,182 +9354,6 @@
|
|
|
9178
9354
|
}
|
|
9179
9355
|
]
|
|
9180
9356
|
},
|
|
9181
|
-
{
|
|
9182
|
-
"kind": "javascript-module",
|
|
9183
|
-
"path": "src/common/directives/cond.ts",
|
|
9184
|
-
"declarations": [
|
|
9185
|
-
{
|
|
9186
|
-
"kind": "variable",
|
|
9187
|
-
"name": "cond"
|
|
9188
|
-
}
|
|
9189
|
-
],
|
|
9190
|
-
"exports": [
|
|
9191
|
-
{
|
|
9192
|
-
"kind": "js",
|
|
9193
|
-
"name": "cond",
|
|
9194
|
-
"declaration": {
|
|
9195
|
-
"name": "cond",
|
|
9196
|
-
"module": "src/common/directives/cond.ts"
|
|
9197
|
-
}
|
|
9198
|
-
}
|
|
9199
|
-
]
|
|
9200
|
-
},
|
|
9201
|
-
{
|
|
9202
|
-
"kind": "javascript-module",
|
|
9203
|
-
"path": "src/common/directives/wrapIf.ts",
|
|
9204
|
-
"declarations": [
|
|
9205
|
-
{
|
|
9206
|
-
"kind": "function",
|
|
9207
|
-
"name": "wrapIf",
|
|
9208
|
-
"return": {
|
|
9209
|
-
"type": {
|
|
9210
|
-
"text": "TInner"
|
|
9211
|
-
}
|
|
9212
|
-
},
|
|
9213
|
-
"parameters": [
|
|
9214
|
-
{
|
|
9215
|
-
"name": "condition",
|
|
9216
|
-
"type": {
|
|
9217
|
-
"text": "false"
|
|
9218
|
-
}
|
|
9219
|
-
},
|
|
9220
|
-
{
|
|
9221
|
-
"name": "inner",
|
|
9222
|
-
"type": {
|
|
9223
|
-
"text": "() => TInner"
|
|
9224
|
-
}
|
|
9225
|
-
},
|
|
9226
|
-
{
|
|
9227
|
-
"name": "wrapper",
|
|
9228
|
-
"type": {
|
|
9229
|
-
"text": "(inner: TInner) => TWrapper"
|
|
9230
|
-
}
|
|
9231
|
-
}
|
|
9232
|
-
]
|
|
9233
|
-
},
|
|
9234
|
-
{
|
|
9235
|
-
"kind": "function",
|
|
9236
|
-
"name": "wrapIf",
|
|
9237
|
-
"return": {
|
|
9238
|
-
"type": {
|
|
9239
|
-
"text": "TWrapper"
|
|
9240
|
-
}
|
|
9241
|
-
},
|
|
9242
|
-
"parameters": [
|
|
9243
|
-
{
|
|
9244
|
-
"name": "condition",
|
|
9245
|
-
"type": {
|
|
9246
|
-
"text": "true"
|
|
9247
|
-
}
|
|
9248
|
-
},
|
|
9249
|
-
{
|
|
9250
|
-
"name": "inner",
|
|
9251
|
-
"type": {
|
|
9252
|
-
"text": "() => TInner"
|
|
9253
|
-
}
|
|
9254
|
-
},
|
|
9255
|
-
{
|
|
9256
|
-
"name": "wrapper",
|
|
9257
|
-
"type": {
|
|
9258
|
-
"text": "(inner: TInner) => TWrapper"
|
|
9259
|
-
}
|
|
9260
|
-
}
|
|
9261
|
-
]
|
|
9262
|
-
},
|
|
9263
|
-
{
|
|
9264
|
-
"kind": "function",
|
|
9265
|
-
"name": "wrapIf",
|
|
9266
|
-
"return": {
|
|
9267
|
-
"type": {
|
|
9268
|
-
"text": "TInner | TWrapper"
|
|
9269
|
-
}
|
|
9270
|
-
},
|
|
9271
|
-
"parameters": [
|
|
9272
|
-
{
|
|
9273
|
-
"name": "condition",
|
|
9274
|
-
"type": {
|
|
9275
|
-
"text": "unknown"
|
|
9276
|
-
}
|
|
9277
|
-
},
|
|
9278
|
-
{
|
|
9279
|
-
"name": "inner",
|
|
9280
|
-
"type": {
|
|
9281
|
-
"text": "() => TInner"
|
|
9282
|
-
}
|
|
9283
|
-
},
|
|
9284
|
-
{
|
|
9285
|
-
"name": "wrapper",
|
|
9286
|
-
"type": {
|
|
9287
|
-
"text": "(inner: TInner) => TWrapper"
|
|
9288
|
-
}
|
|
9289
|
-
}
|
|
9290
|
-
]
|
|
9291
|
-
},
|
|
9292
|
-
{
|
|
9293
|
-
"kind": "function",
|
|
9294
|
-
"name": "wrapIf",
|
|
9295
|
-
"parameters": [
|
|
9296
|
-
{
|
|
9297
|
-
"name": "condition",
|
|
9298
|
-
"type": {
|
|
9299
|
-
"text": "any"
|
|
9300
|
-
}
|
|
9301
|
-
},
|
|
9302
|
-
{
|
|
9303
|
-
"name": "inner",
|
|
9304
|
-
"type": {
|
|
9305
|
-
"text": "() => TInner"
|
|
9306
|
-
}
|
|
9307
|
-
},
|
|
9308
|
-
{
|
|
9309
|
-
"name": "wrapper",
|
|
9310
|
-
"type": {
|
|
9311
|
-
"text": "(innards: TInner) => TWrapper"
|
|
9312
|
-
}
|
|
9313
|
-
}
|
|
9314
|
-
],
|
|
9315
|
-
"return": {
|
|
9316
|
-
"type": {
|
|
9317
|
-
"text": ""
|
|
9318
|
-
}
|
|
9319
|
-
}
|
|
9320
|
-
}
|
|
9321
|
-
],
|
|
9322
|
-
"exports": [
|
|
9323
|
-
{
|
|
9324
|
-
"kind": "js",
|
|
9325
|
-
"name": "wrapIf",
|
|
9326
|
-
"declaration": {
|
|
9327
|
-
"name": "wrapIf",
|
|
9328
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9329
|
-
}
|
|
9330
|
-
},
|
|
9331
|
-
{
|
|
9332
|
-
"kind": "js",
|
|
9333
|
-
"name": "wrapIf",
|
|
9334
|
-
"declaration": {
|
|
9335
|
-
"name": "wrapIf",
|
|
9336
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9337
|
-
}
|
|
9338
|
-
},
|
|
9339
|
-
{
|
|
9340
|
-
"kind": "js",
|
|
9341
|
-
"name": "wrapIf",
|
|
9342
|
-
"declaration": {
|
|
9343
|
-
"name": "wrapIf",
|
|
9344
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9345
|
-
}
|
|
9346
|
-
},
|
|
9347
|
-
{
|
|
9348
|
-
"kind": "js",
|
|
9349
|
-
"name": "wrapIf",
|
|
9350
|
-
"declaration": {
|
|
9351
|
-
"name": "wrapIf",
|
|
9352
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
9353
|
-
}
|
|
9354
|
-
}
|
|
9355
|
-
]
|
|
9356
|
-
},
|
|
9357
9357
|
{
|
|
9358
9358
|
"kind": "javascript-module",
|
|
9359
9359
|
"path": "src/common/mixins/DraftComponentMixin.ts",
|