@nordhealth/components 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1778 -1709
- package/lib/Avatar.js +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Button.js +1 -1
- package/lib/Calendar-3efcf67b.js +2 -0
- package/lib/{Calendar-2797d956.js.map → Calendar-3efcf67b.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Card.js.map +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/Checkbox.js.map +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/{Component-a61df53a.js → Component-5a0a26a0.js} +2 -2
- package/lib/Component-5a0a26a0.js.map +1 -0
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/Divider.js +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/DropdownItem.js +1 -1
- package/lib/EmptyState.js +1 -1
- package/lib/Fieldset.js +1 -1
- package/lib/Header.js +1 -1
- package/lib/Icon.js +1 -1
- package/lib/Input.js +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/Popout.js +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/Qrcode.js +2 -2
- package/lib/Radio.js +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/Skeleton.js +1 -1
- package/lib/Spinner.js +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Tab.js +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabGroup.js.map +1 -1
- package/lib/TabPanel.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/Table.js.map +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/Toast.js +1 -1
- package/lib/ToastGroup.js +1 -1
- package/lib/Toggle.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/bundle.js +9 -9
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/card/Card.d.ts +2 -0
- package/lib/src/checkbox/Checkbox.d.ts +4 -0
- package/lib/src/table/Table.d.ts +9 -2
- package/lib/src/table/Table.test.d.ts +1 -0
- package/package.json +6 -6
- package/lib/Calendar-2797d956.js +0 -2
- package/lib/Component-a61df53a.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -503,6 +503,144 @@
|
|
|
503
503
|
],
|
|
504
504
|
"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- Always add the name of the person using the `name` property.\n- For the best results, use square images or images cropped into a square.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Try to avoid using landscape or portrait images as avatars. Let users crop their images before or after uploading if possible.\n\n</div>\n"
|
|
505
505
|
},
|
|
506
|
+
{
|
|
507
|
+
"kind": "javascript-module",
|
|
508
|
+
"path": "src/badge/Badge.ts",
|
|
509
|
+
"declarations": [
|
|
510
|
+
{
|
|
511
|
+
"kind": "class",
|
|
512
|
+
"description": "Badges are used to inform users of the status of an object or of an action that’s been taken. Commonly used in tabular data to indicate status.",
|
|
513
|
+
"name": "Badge",
|
|
514
|
+
"slots": [
|
|
515
|
+
{
|
|
516
|
+
"description": "The badge content.",
|
|
517
|
+
"name": ""
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"members": [
|
|
521
|
+
{
|
|
522
|
+
"kind": "field",
|
|
523
|
+
"name": "type",
|
|
524
|
+
"type": {
|
|
525
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
|
|
526
|
+
},
|
|
527
|
+
"default": "\"info\"",
|
|
528
|
+
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
529
|
+
"attribute": "type",
|
|
530
|
+
"reflects": true
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
"attributes": [
|
|
534
|
+
{
|
|
535
|
+
"name": "type",
|
|
536
|
+
"type": {
|
|
537
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
|
|
538
|
+
},
|
|
539
|
+
"default": "\"info\"",
|
|
540
|
+
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
541
|
+
"fieldName": "type"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"superclass": {
|
|
545
|
+
"name": "LitElement",
|
|
546
|
+
"package": "lit"
|
|
547
|
+
},
|
|
548
|
+
"status": "ready",
|
|
549
|
+
"category": "text",
|
|
550
|
+
"displayName": null,
|
|
551
|
+
"tagName": "nord-badge",
|
|
552
|
+
"customElement": true
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
"exports": [
|
|
556
|
+
{
|
|
557
|
+
"kind": "js",
|
|
558
|
+
"name": "default",
|
|
559
|
+
"declaration": {
|
|
560
|
+
"name": "Badge",
|
|
561
|
+
"module": "src/badge/Badge.ts"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"kind": "custom-element-definition",
|
|
566
|
+
"name": "nord-badge",
|
|
567
|
+
"declaration": {
|
|
568
|
+
"name": "Badge",
|
|
569
|
+
"module": "src/badge/Badge.ts"
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
"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 show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Use established color patterns so that users can clearly identify the importance level.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `info` | The default variant. Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n"
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"kind": "javascript-module",
|
|
577
|
+
"path": "src/banner/Banner.ts",
|
|
578
|
+
"declarations": [
|
|
579
|
+
{
|
|
580
|
+
"kind": "class",
|
|
581
|
+
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
582
|
+
"name": "Banner",
|
|
583
|
+
"slots": [
|
|
584
|
+
{
|
|
585
|
+
"description": "default slot",
|
|
586
|
+
"name": ""
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"members": [
|
|
590
|
+
{
|
|
591
|
+
"kind": "field",
|
|
592
|
+
"name": "variant",
|
|
593
|
+
"type": {
|
|
594
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
595
|
+
},
|
|
596
|
+
"default": "\"info\"",
|
|
597
|
+
"description": "The style variant of the banner.",
|
|
598
|
+
"attribute": "variant",
|
|
599
|
+
"reflects": true
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
"attributes": [
|
|
603
|
+
{
|
|
604
|
+
"name": "variant",
|
|
605
|
+
"type": {
|
|
606
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
607
|
+
},
|
|
608
|
+
"default": "\"info\"",
|
|
609
|
+
"description": "The style variant of the banner.",
|
|
610
|
+
"fieldName": "variant"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"superclass": {
|
|
614
|
+
"name": "LitElement",
|
|
615
|
+
"package": "lit"
|
|
616
|
+
},
|
|
617
|
+
"status": "ready",
|
|
618
|
+
"category": "feedback",
|
|
619
|
+
"displayName": null,
|
|
620
|
+
"tagName": "nord-banner",
|
|
621
|
+
"customElement": true
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"exports": [
|
|
625
|
+
{
|
|
626
|
+
"kind": "js",
|
|
627
|
+
"name": "default",
|
|
628
|
+
"declaration": {
|
|
629
|
+
"name": "Banner",
|
|
630
|
+
"module": "src/banner/Banner.ts"
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"kind": "custom-element-definition",
|
|
635
|
+
"name": "nord-banner",
|
|
636
|
+
"declaration": {
|
|
637
|
+
"name": "Banner",
|
|
638
|
+
"module": "src/banner/Banner.ts"
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
"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 this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it 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\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
|
|
643
|
+
},
|
|
506
644
|
{
|
|
507
645
|
"kind": "javascript-module",
|
|
508
646
|
"path": "src/calendar/Calendar.ts",
|
|
@@ -1024,40 +1162,70 @@
|
|
|
1024
1162
|
},
|
|
1025
1163
|
{
|
|
1026
1164
|
"kind": "javascript-module",
|
|
1027
|
-
"path": "src/
|
|
1165
|
+
"path": "src/card/Card.ts",
|
|
1028
1166
|
"declarations": [
|
|
1029
1167
|
{
|
|
1030
1168
|
"kind": "class",
|
|
1031
|
-
"description": "
|
|
1032
|
-
"name": "
|
|
1169
|
+
"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.",
|
|
1170
|
+
"name": "Card",
|
|
1033
1171
|
"slots": [
|
|
1034
1172
|
{
|
|
1035
|
-
"description": "
|
|
1173
|
+
"description": "The card content.",
|
|
1036
1174
|
"name": ""
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1178
|
+
"name": "header"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1182
|
+
"name": "header-end"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1186
|
+
"name": "footer"
|
|
1037
1187
|
}
|
|
1038
1188
|
],
|
|
1039
1189
|
"members": [
|
|
1040
1190
|
{
|
|
1041
1191
|
"kind": "field",
|
|
1042
|
-
"name": "
|
|
1192
|
+
"name": "headerSlot",
|
|
1193
|
+
"privacy": "private",
|
|
1194
|
+
"default": "new SlotController(this, \"header\")"
|
|
1195
|
+
},
|
|
1196
|
+
{
|
|
1197
|
+
"kind": "field",
|
|
1198
|
+
"name": "headerEndSlot",
|
|
1199
|
+
"privacy": "private",
|
|
1200
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"kind": "field",
|
|
1204
|
+
"name": "footerSlot",
|
|
1205
|
+
"privacy": "private",
|
|
1206
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"kind": "field",
|
|
1210
|
+
"name": "padding",
|
|
1043
1211
|
"type": {
|
|
1044
|
-
"text": "\"
|
|
1212
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1045
1213
|
},
|
|
1046
|
-
"default": "\"
|
|
1047
|
-
"description": "
|
|
1048
|
-
"attribute": "
|
|
1214
|
+
"default": "\"m\"",
|
|
1215
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1216
|
+
"attribute": "padding",
|
|
1049
1217
|
"reflects": true
|
|
1050
1218
|
}
|
|
1051
1219
|
],
|
|
1052
1220
|
"attributes": [
|
|
1053
1221
|
{
|
|
1054
|
-
"name": "
|
|
1222
|
+
"name": "padding",
|
|
1055
1223
|
"type": {
|
|
1056
|
-
"text": "\"
|
|
1224
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1057
1225
|
},
|
|
1058
|
-
"default": "\"
|
|
1059
|
-
"description": "
|
|
1060
|
-
"fieldName": "
|
|
1226
|
+
"default": "\"m\"",
|
|
1227
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1228
|
+
"fieldName": "padding"
|
|
1061
1229
|
}
|
|
1062
1230
|
],
|
|
1063
1231
|
"superclass": {
|
|
@@ -1065,9 +1233,9 @@
|
|
|
1065
1233
|
"package": "lit"
|
|
1066
1234
|
},
|
|
1067
1235
|
"status": "ready",
|
|
1068
|
-
"category": "
|
|
1236
|
+
"category": "structure",
|
|
1069
1237
|
"displayName": null,
|
|
1070
|
-
"tagName": "nord-
|
|
1238
|
+
"tagName": "nord-card",
|
|
1071
1239
|
"customElement": true
|
|
1072
1240
|
}
|
|
1073
1241
|
],
|
|
@@ -1076,600 +1244,465 @@
|
|
|
1076
1244
|
"kind": "js",
|
|
1077
1245
|
"name": "default",
|
|
1078
1246
|
"declaration": {
|
|
1079
|
-
"name": "
|
|
1080
|
-
"module": "src/
|
|
1247
|
+
"name": "Card",
|
|
1248
|
+
"module": "src/card/Card.ts"
|
|
1081
1249
|
}
|
|
1082
1250
|
},
|
|
1083
1251
|
{
|
|
1084
1252
|
"kind": "custom-element-definition",
|
|
1085
|
-
"name": "nord-
|
|
1253
|
+
"name": "nord-card",
|
|
1086
1254
|
"declaration": {
|
|
1087
|
-
"name": "
|
|
1088
|
-
"module": "src/
|
|
1255
|
+
"name": "Card",
|
|
1256
|
+
"module": "src/card/Card.ts"
|
|
1089
1257
|
}
|
|
1090
1258
|
}
|
|
1091
1259
|
],
|
|
1092
|
-
"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
|
|
1260
|
+
"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"
|
|
1093
1261
|
},
|
|
1094
1262
|
{
|
|
1095
1263
|
"kind": "javascript-module",
|
|
1096
|
-
"path": "src/
|
|
1264
|
+
"path": "src/command-menu/CommandMenu.ts",
|
|
1097
1265
|
"declarations": [
|
|
1098
1266
|
{
|
|
1099
1267
|
"kind": "class",
|
|
1100
|
-
"description": "
|
|
1101
|
-
"name": "
|
|
1268
|
+
"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.",
|
|
1269
|
+
"name": "CommandMenu",
|
|
1102
1270
|
"slots": [
|
|
1103
1271
|
{
|
|
1104
|
-
"description": "
|
|
1105
|
-
"name": ""
|
|
1272
|
+
"description": "Used to replace the default footer contents.",
|
|
1273
|
+
"name": "footer"
|
|
1106
1274
|
}
|
|
1107
1275
|
],
|
|
1108
1276
|
"members": [
|
|
1109
1277
|
{
|
|
1110
1278
|
"kind": "field",
|
|
1111
|
-
"name": "
|
|
1112
|
-
"
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1115
|
-
"default": "\"info\"",
|
|
1116
|
-
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
1117
|
-
"attribute": "type",
|
|
1118
|
-
"reflects": true
|
|
1119
|
-
}
|
|
1120
|
-
],
|
|
1121
|
-
"attributes": [
|
|
1279
|
+
"name": "inputRef",
|
|
1280
|
+
"privacy": "private"
|
|
1281
|
+
},
|
|
1122
1282
|
{
|
|
1123
|
-
"
|
|
1283
|
+
"kind": "field",
|
|
1284
|
+
"name": "listRef",
|
|
1285
|
+
"privacy": "private"
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"kind": "field",
|
|
1289
|
+
"name": "previousFocus",
|
|
1124
1290
|
"type": {
|
|
1125
|
-
"text": "
|
|
1291
|
+
"text": "HTMLElement | undefined"
|
|
1126
1292
|
},
|
|
1127
|
-
"
|
|
1128
|
-
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
1129
|
-
"fieldName": "type"
|
|
1130
|
-
}
|
|
1131
|
-
],
|
|
1132
|
-
"superclass": {
|
|
1133
|
-
"name": "LitElement",
|
|
1134
|
-
"package": "lit"
|
|
1135
|
-
},
|
|
1136
|
-
"status": "ready",
|
|
1137
|
-
"category": "text",
|
|
1138
|
-
"displayName": null,
|
|
1139
|
-
"tagName": "nord-badge",
|
|
1140
|
-
"customElement": true
|
|
1141
|
-
}
|
|
1142
|
-
],
|
|
1143
|
-
"exports": [
|
|
1144
|
-
{
|
|
1145
|
-
"kind": "js",
|
|
1146
|
-
"name": "default",
|
|
1147
|
-
"declaration": {
|
|
1148
|
-
"name": "Badge",
|
|
1149
|
-
"module": "src/badge/Badge.ts"
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
"kind": "custom-element-definition",
|
|
1154
|
-
"name": "nord-badge",
|
|
1155
|
-
"declaration": {
|
|
1156
|
-
"name": "Badge",
|
|
1157
|
-
"module": "src/badge/Badge.ts"
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
],
|
|
1161
|
-
"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 show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Use established color patterns so that users can clearly identify the importance level.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `info` | The default variant. Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n"
|
|
1162
|
-
},
|
|
1163
|
-
{
|
|
1164
|
-
"kind": "javascript-module",
|
|
1165
|
-
"path": "src/card/Card.ts",
|
|
1166
|
-
"declarations": [
|
|
1167
|
-
{
|
|
1168
|
-
"kind": "class",
|
|
1169
|
-
"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.",
|
|
1170
|
-
"name": "Card",
|
|
1171
|
-
"slots": [
|
|
1172
|
-
{
|
|
1173
|
-
"description": "The card content.",
|
|
1174
|
-
"name": ""
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
"description": "Optional slot that holds a header for the card.",
|
|
1178
|
-
"name": "header"
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
1182
|
-
"name": "footer"
|
|
1183
|
-
}
|
|
1184
|
-
],
|
|
1185
|
-
"members": [
|
|
1186
|
-
{
|
|
1187
|
-
"kind": "field",
|
|
1188
|
-
"name": "headerSlot",
|
|
1189
|
-
"privacy": "private",
|
|
1190
|
-
"default": "new SlotController(this, \"header\")"
|
|
1293
|
+
"privacy": "private"
|
|
1191
1294
|
},
|
|
1192
1295
|
{
|
|
1193
1296
|
"kind": "field",
|
|
1194
|
-
"name": "
|
|
1297
|
+
"name": "localize",
|
|
1195
1298
|
"privacy": "private",
|
|
1196
|
-
"default": "new
|
|
1197
|
-
},
|
|
1198
|
-
{
|
|
1199
|
-
"kind": "field",
|
|
1200
|
-
"name": "padding",
|
|
1201
|
-
"type": {
|
|
1202
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
1203
|
-
},
|
|
1204
|
-
"default": "\"m\"",
|
|
1205
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1206
|
-
"attribute": "padding",
|
|
1207
|
-
"reflects": true
|
|
1208
|
-
}
|
|
1209
|
-
],
|
|
1210
|
-
"attributes": [
|
|
1211
|
-
{
|
|
1212
|
-
"name": "padding",
|
|
1213
|
-
"type": {
|
|
1214
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
1215
|
-
},
|
|
1216
|
-
"default": "\"m\"",
|
|
1217
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1218
|
-
"fieldName": "padding"
|
|
1219
|
-
}
|
|
1220
|
-
],
|
|
1221
|
-
"superclass": {
|
|
1222
|
-
"name": "LitElement",
|
|
1223
|
-
"package": "lit"
|
|
1224
|
-
},
|
|
1225
|
-
"status": "ready",
|
|
1226
|
-
"category": "structure",
|
|
1227
|
-
"displayName": null,
|
|
1228
|
-
"tagName": "nord-card",
|
|
1229
|
-
"customElement": true
|
|
1230
|
-
}
|
|
1231
|
-
],
|
|
1232
|
-
"exports": [
|
|
1233
|
-
{
|
|
1234
|
-
"kind": "js",
|
|
1235
|
-
"name": "default",
|
|
1236
|
-
"declaration": {
|
|
1237
|
-
"name": "Card",
|
|
1238
|
-
"module": "src/card/Card.ts"
|
|
1239
|
-
}
|
|
1240
|
-
},
|
|
1241
|
-
{
|
|
1242
|
-
"kind": "custom-element-definition",
|
|
1243
|
-
"name": "nord-card",
|
|
1244
|
-
"declaration": {
|
|
1245
|
-
"name": "Card",
|
|
1246
|
-
"module": "src/card/Card.ts"
|
|
1247
|
-
}
|
|
1248
|
-
}
|
|
1249
|
-
],
|
|
1250
|
-
"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"
|
|
1251
|
-
},
|
|
1252
|
-
{
|
|
1253
|
-
"kind": "javascript-module",
|
|
1254
|
-
"path": "src/button/Button.ts",
|
|
1255
|
-
"declarations": [
|
|
1256
|
-
{
|
|
1257
|
-
"kind": "class",
|
|
1258
|
-
"description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
|
|
1259
|
-
"name": "Button",
|
|
1260
|
-
"slots": [
|
|
1261
|
-
{
|
|
1262
|
-
"description": "The button content",
|
|
1263
|
-
"name": ""
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
1267
|
-
"name": "start"
|
|
1268
|
-
},
|
|
1269
|
-
{
|
|
1270
|
-
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
1271
|
-
"name": "end"
|
|
1272
|
-
}
|
|
1273
|
-
],
|
|
1274
|
-
"members": [
|
|
1275
|
-
{
|
|
1276
|
-
"kind": "field",
|
|
1277
|
-
"name": "buttonRef",
|
|
1278
|
-
"privacy": "private"
|
|
1299
|
+
"default": "new LocalizeController<\"nord-command-menu\">(this)"
|
|
1279
1300
|
},
|
|
1280
1301
|
{
|
|
1281
1302
|
"kind": "field",
|
|
1282
|
-
"name": "
|
|
1303
|
+
"name": "dismissController",
|
|
1283
1304
|
"privacy": "private",
|
|
1284
|
-
"default": "new
|
|
1305
|
+
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.close(),\n })"
|
|
1285
1306
|
},
|
|
1286
1307
|
{
|
|
1287
1308
|
"kind": "field",
|
|
1288
|
-
"name": "
|
|
1309
|
+
"name": "keyboardController",
|
|
1289
1310
|
"privacy": "private",
|
|
1290
|
-
"default": "new
|
|
1311
|
+
"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 })"
|
|
1291
1312
|
},
|
|
1292
1313
|
{
|
|
1293
1314
|
"kind": "field",
|
|
1294
|
-
"name": "
|
|
1315
|
+
"name": "open",
|
|
1295
1316
|
"type": {
|
|
1296
|
-
"text": "
|
|
1317
|
+
"text": "boolean"
|
|
1297
1318
|
},
|
|
1298
|
-
"default": "
|
|
1299
|
-
"description": "
|
|
1300
|
-
"attribute": "
|
|
1301
|
-
"reflects": true
|
|
1319
|
+
"default": "false",
|
|
1320
|
+
"description": "Show or hide the command menu.",
|
|
1321
|
+
"attribute": "open"
|
|
1302
1322
|
},
|
|
1303
1323
|
{
|
|
1304
1324
|
"kind": "field",
|
|
1305
|
-
"name": "
|
|
1325
|
+
"name": "placeholder",
|
|
1306
1326
|
"type": {
|
|
1307
|
-
"text": "
|
|
1327
|
+
"text": "string"
|
|
1308
1328
|
},
|
|
1309
|
-
"default": "\"
|
|
1310
|
-
"description": "
|
|
1311
|
-
"attribute": "
|
|
1312
|
-
"reflects": true
|
|
1329
|
+
"default": "\"Type a command or search...\"",
|
|
1330
|
+
"description": "Hint text to display in the Command Menu search field.",
|
|
1331
|
+
"attribute": "placeholder"
|
|
1313
1332
|
},
|
|
1314
1333
|
{
|
|
1315
1334
|
"kind": "field",
|
|
1316
|
-
"name": "
|
|
1335
|
+
"name": "commands",
|
|
1317
1336
|
"type": {
|
|
1318
|
-
"text": "
|
|
1337
|
+
"text": "Array<ICommandMenuAction>"
|
|
1319
1338
|
},
|
|
1320
|
-
"default": "
|
|
1321
|
-
"description": "
|
|
1322
|
-
"attribute": "size",
|
|
1323
|
-
"reflects": true
|
|
1339
|
+
"default": "[]",
|
|
1340
|
+
"description": "Array of commands to be included in the menu.\nPlease see “Commands data” section for more documentation."
|
|
1324
1341
|
},
|
|
1325
1342
|
{
|
|
1326
1343
|
"kind": "field",
|
|
1327
|
-
"name": "
|
|
1344
|
+
"name": "parent",
|
|
1328
1345
|
"type": {
|
|
1329
|
-
"text": "
|
|
1346
|
+
"text": "string | undefined"
|
|
1330
1347
|
},
|
|
1331
|
-
"privacy": "private"
|
|
1332
|
-
"attribute": "aria-expanded"
|
|
1348
|
+
"privacy": "private"
|
|
1333
1349
|
},
|
|
1334
1350
|
{
|
|
1335
1351
|
"kind": "field",
|
|
1336
|
-
"name": "
|
|
1352
|
+
"name": "search",
|
|
1337
1353
|
"type": {
|
|
1338
|
-
"text": "
|
|
1354
|
+
"text": "string"
|
|
1339
1355
|
},
|
|
1340
1356
|
"privacy": "private",
|
|
1341
|
-
"
|
|
1357
|
+
"default": "\"\""
|
|
1342
1358
|
},
|
|
1343
1359
|
{
|
|
1344
1360
|
"kind": "field",
|
|
1345
|
-
"name": "
|
|
1361
|
+
"name": "bump",
|
|
1346
1362
|
"type": {
|
|
1347
|
-
"text": "
|
|
1363
|
+
"text": "boolean"
|
|
1348
1364
|
},
|
|
1349
|
-
"
|
|
1350
|
-
"
|
|
1351
|
-
"reflects": true
|
|
1365
|
+
"privacy": "private",
|
|
1366
|
+
"default": "true"
|
|
1352
1367
|
},
|
|
1353
1368
|
{
|
|
1354
1369
|
"kind": "field",
|
|
1355
|
-
"name": "
|
|
1370
|
+
"name": "selectedIndex",
|
|
1356
1371
|
"type": {
|
|
1357
|
-
"text": "
|
|
1372
|
+
"text": "number"
|
|
1358
1373
|
},
|
|
1359
|
-
"
|
|
1360
|
-
"
|
|
1361
|
-
"attribute": "download"
|
|
1374
|
+
"privacy": "private",
|
|
1375
|
+
"default": "0"
|
|
1362
1376
|
},
|
|
1363
1377
|
{
|
|
1364
1378
|
"kind": "field",
|
|
1365
|
-
"name": "
|
|
1379
|
+
"name": "filteredCommands",
|
|
1366
1380
|
"type": {
|
|
1367
|
-
"text": "
|
|
1381
|
+
"text": "Array<ICommandMenuAction>"
|
|
1368
1382
|
},
|
|
1369
|
-
"
|
|
1370
|
-
"
|
|
1371
|
-
"attribute": "target",
|
|
1372
|
-
"reflects": true
|
|
1383
|
+
"privacy": "private",
|
|
1384
|
+
"default": "[]"
|
|
1373
1385
|
},
|
|
1374
1386
|
{
|
|
1375
1387
|
"kind": "field",
|
|
1376
|
-
"name": "
|
|
1388
|
+
"name": "selected",
|
|
1377
1389
|
"type": {
|
|
1378
|
-
"text": "
|
|
1390
|
+
"text": "ICommandMenuAction"
|
|
1379
1391
|
},
|
|
1380
|
-
"
|
|
1381
|
-
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1382
|
-
"attribute": "expand",
|
|
1383
|
-
"reflects": true
|
|
1392
|
+
"privacy": "private"
|
|
1384
1393
|
},
|
|
1385
1394
|
{
|
|
1386
1395
|
"kind": "method",
|
|
1387
|
-
"name": "
|
|
1388
|
-
"privacy": "private",
|
|
1396
|
+
"name": "show",
|
|
1389
1397
|
"parameters": [
|
|
1390
1398
|
{
|
|
1391
|
-
"name": "
|
|
1399
|
+
"name": "options",
|
|
1400
|
+
"default": "{}",
|
|
1392
1401
|
"type": {
|
|
1393
|
-
"text": "
|
|
1394
|
-
}
|
|
1402
|
+
"text": "{ parent?: string }"
|
|
1403
|
+
},
|
|
1404
|
+
"description": "allows you to open the menu filtered to a specific parent command."
|
|
1395
1405
|
}
|
|
1396
1406
|
],
|
|
1397
|
-
"description": "
|
|
1407
|
+
"description": "Show the command menu programmatically."
|
|
1398
1408
|
},
|
|
1399
1409
|
{
|
|
1400
1410
|
"kind": "method",
|
|
1401
|
-
"name": "
|
|
1402
|
-
"
|
|
1403
|
-
"parameters": [
|
|
1404
|
-
{
|
|
1405
|
-
"name": "innards",
|
|
1406
|
-
"type": {
|
|
1407
|
-
"text": "TemplateResult"
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
]
|
|
1411
|
+
"name": "close",
|
|
1412
|
+
"description": "Close the command menu programmatically."
|
|
1411
1413
|
},
|
|
1412
1414
|
{
|
|
1413
1415
|
"kind": "method",
|
|
1414
|
-
"name": "
|
|
1415
|
-
"
|
|
1416
|
+
"name": "toggleOpen",
|
|
1417
|
+
"description": "Toggle the open state programmatically."
|
|
1416
1418
|
},
|
|
1417
1419
|
{
|
|
1418
|
-
"kind": "
|
|
1419
|
-
"name": "
|
|
1420
|
+
"kind": "method",
|
|
1421
|
+
"name": "focus",
|
|
1422
|
+
"description": "Focus the command menu's input."
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"kind": "method",
|
|
1426
|
+
"name": "renderNoResults",
|
|
1420
1427
|
"privacy": "private"
|
|
1421
1428
|
},
|
|
1422
1429
|
{
|
|
1423
1430
|
"kind": "method",
|
|
1424
|
-
"name": "
|
|
1431
|
+
"name": "renderSection",
|
|
1425
1432
|
"privacy": "private",
|
|
1426
1433
|
"parameters": [
|
|
1427
1434
|
{
|
|
1428
|
-
"name": "
|
|
1435
|
+
"name": "section",
|
|
1429
1436
|
"type": {
|
|
1430
|
-
"text": "
|
|
1437
|
+
"text": "string | undefined"
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"name": "commands",
|
|
1442
|
+
"type": {
|
|
1443
|
+
"text": "ICommandMenuAction[]"
|
|
1431
1444
|
}
|
|
1432
1445
|
}
|
|
1433
1446
|
]
|
|
1434
1447
|
},
|
|
1435
1448
|
{
|
|
1436
1449
|
"kind": "method",
|
|
1437
|
-
"name": "
|
|
1438
|
-
"privacy": "
|
|
1439
|
-
"description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
|
|
1450
|
+
"name": "handleCommandsChange",
|
|
1451
|
+
"privacy": "protected"
|
|
1440
1452
|
},
|
|
1441
1453
|
{
|
|
1442
|
-
"kind": "
|
|
1443
|
-
"name": "
|
|
1444
|
-
"
|
|
1445
|
-
"text": "boolean"
|
|
1446
|
-
},
|
|
1447
|
-
"default": "false",
|
|
1448
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1449
|
-
"attribute": "disabled",
|
|
1450
|
-
"reflects": true,
|
|
1451
|
-
"inheritedFrom": {
|
|
1452
|
-
"name": "InputMixin",
|
|
1453
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1454
|
-
}
|
|
1454
|
+
"kind": "method",
|
|
1455
|
+
"name": "handleBump",
|
|
1456
|
+
"privacy": "protected"
|
|
1455
1457
|
},
|
|
1456
1458
|
{
|
|
1457
|
-
"kind": "
|
|
1458
|
-
"name": "
|
|
1459
|
-
"
|
|
1460
|
-
"text": "string | undefined"
|
|
1461
|
-
},
|
|
1462
|
-
"description": "The name of the form component.",
|
|
1463
|
-
"attribute": "name",
|
|
1464
|
-
"inheritedFrom": {
|
|
1465
|
-
"name": "InputMixin",
|
|
1466
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1467
|
-
}
|
|
1459
|
+
"kind": "method",
|
|
1460
|
+
"name": "focusOnOpen",
|
|
1461
|
+
"privacy": "protected"
|
|
1468
1462
|
},
|
|
1469
1463
|
{
|
|
1470
|
-
"kind": "
|
|
1471
|
-
"name": "
|
|
1472
|
-
"
|
|
1473
|
-
"text": "string"
|
|
1474
|
-
},
|
|
1475
|
-
"default": "\"\"",
|
|
1476
|
-
"description": "The value of the form component.",
|
|
1477
|
-
"attribute": "value",
|
|
1478
|
-
"inheritedFrom": {
|
|
1479
|
-
"name": "InputMixin",
|
|
1480
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1481
|
-
}
|
|
1464
|
+
"kind": "method",
|
|
1465
|
+
"name": "handleAnimationEnd",
|
|
1466
|
+
"privacy": "private"
|
|
1482
1467
|
},
|
|
1483
1468
|
{
|
|
1484
|
-
"kind": "
|
|
1485
|
-
"name": "
|
|
1486
|
-
"
|
|
1487
|
-
"inheritedFrom": {
|
|
1488
|
-
"name": "InputMixin",
|
|
1489
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1490
|
-
}
|
|
1469
|
+
"kind": "method",
|
|
1470
|
+
"name": "handleBlur",
|
|
1471
|
+
"privacy": "private"
|
|
1491
1472
|
},
|
|
1492
1473
|
{
|
|
1493
|
-
"kind": "
|
|
1494
|
-
"name": "
|
|
1495
|
-
"privacy": "
|
|
1496
|
-
"
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1474
|
+
"kind": "method",
|
|
1475
|
+
"name": "handleInput",
|
|
1476
|
+
"privacy": "private",
|
|
1477
|
+
"parameters": [
|
|
1478
|
+
{
|
|
1479
|
+
"name": "event",
|
|
1480
|
+
"type": {
|
|
1481
|
+
"text": "KeyboardEvent"
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
]
|
|
1500
1485
|
},
|
|
1501
1486
|
{
|
|
1502
1487
|
"kind": "method",
|
|
1503
|
-
"name": "
|
|
1488
|
+
"name": "select",
|
|
1489
|
+
"privacy": "private",
|
|
1504
1490
|
"parameters": [
|
|
1505
1491
|
{
|
|
1506
|
-
"name": "
|
|
1507
|
-
"
|
|
1492
|
+
"name": "command",
|
|
1493
|
+
"default": "this.selected",
|
|
1508
1494
|
"type": {
|
|
1509
|
-
"text": "
|
|
1510
|
-
}
|
|
1511
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1495
|
+
"text": "ICommandMenuAction"
|
|
1496
|
+
}
|
|
1512
1497
|
}
|
|
1513
|
-
]
|
|
1514
|
-
"description": "Programmatically move focus to the component.",
|
|
1515
|
-
"inheritedFrom": {
|
|
1516
|
-
"name": "FocusableMixin",
|
|
1517
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1518
|
-
}
|
|
1498
|
+
]
|
|
1519
1499
|
},
|
|
1520
1500
|
{
|
|
1521
1501
|
"kind": "method",
|
|
1522
|
-
"name": "
|
|
1523
|
-
"
|
|
1524
|
-
"inheritedFrom": {
|
|
1525
|
-
"name": "FocusableMixin",
|
|
1526
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1527
|
-
}
|
|
1502
|
+
"name": "start",
|
|
1503
|
+
"privacy": "private"
|
|
1528
1504
|
},
|
|
1529
1505
|
{
|
|
1530
1506
|
"kind": "method",
|
|
1531
|
-
"name": "
|
|
1532
|
-
"
|
|
1533
|
-
"inheritedFrom": {
|
|
1534
|
-
"name": "FocusableMixin",
|
|
1535
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
],
|
|
1539
|
-
"attributes": [
|
|
1540
|
-
{
|
|
1541
|
-
"name": "variant",
|
|
1542
|
-
"type": {
|
|
1543
|
-
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
|
|
1544
|
-
},
|
|
1545
|
-
"default": "\"default\"",
|
|
1546
|
-
"description": "The style variant of the button.",
|
|
1547
|
-
"fieldName": "variant"
|
|
1507
|
+
"name": "end",
|
|
1508
|
+
"privacy": "private"
|
|
1548
1509
|
},
|
|
1549
1510
|
{
|
|
1550
|
-
"
|
|
1551
|
-
"
|
|
1552
|
-
|
|
1553
|
-
},
|
|
1554
|
-
"default": "\"submit\"",
|
|
1555
|
-
"description": "The type of the button.",
|
|
1556
|
-
"fieldName": "type"
|
|
1511
|
+
"kind": "method",
|
|
1512
|
+
"name": "next",
|
|
1513
|
+
"privacy": "private"
|
|
1557
1514
|
},
|
|
1558
1515
|
{
|
|
1559
|
-
"
|
|
1560
|
-
"
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1563
|
-
"default": "\"m\"",
|
|
1564
|
-
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1565
|
-
"fieldName": "size"
|
|
1516
|
+
"kind": "method",
|
|
1517
|
+
"name": "previous",
|
|
1518
|
+
"privacy": "private"
|
|
1566
1519
|
},
|
|
1567
1520
|
{
|
|
1568
|
-
"
|
|
1569
|
-
"
|
|
1570
|
-
|
|
1571
|
-
},
|
|
1572
|
-
"fieldName": "accessibleExpanded"
|
|
1521
|
+
"kind": "method",
|
|
1522
|
+
"name": "goBack",
|
|
1523
|
+
"privacy": "private"
|
|
1573
1524
|
},
|
|
1574
1525
|
{
|
|
1575
|
-
"
|
|
1576
|
-
"
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1526
|
+
"kind": "method",
|
|
1527
|
+
"name": "setParent",
|
|
1528
|
+
"privacy": "private",
|
|
1529
|
+
"parameters": [
|
|
1530
|
+
{
|
|
1531
|
+
"name": "parent",
|
|
1532
|
+
"optional": true,
|
|
1533
|
+
"type": {
|
|
1534
|
+
"text": "string"
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
]
|
|
1580
1538
|
},
|
|
1581
1539
|
{
|
|
1582
|
-
"
|
|
1583
|
-
"
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1540
|
+
"kind": "method",
|
|
1541
|
+
"name": "setSearch",
|
|
1542
|
+
"privacy": "private",
|
|
1543
|
+
"parameters": [
|
|
1544
|
+
{
|
|
1545
|
+
"name": "str",
|
|
1546
|
+
"type": {
|
|
1547
|
+
"text": "string"
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
]
|
|
1588
1551
|
},
|
|
1589
1552
|
{
|
|
1590
|
-
"
|
|
1553
|
+
"kind": "method",
|
|
1554
|
+
"name": "filterCommands",
|
|
1555
|
+
"privacy": "private"
|
|
1556
|
+
}
|
|
1557
|
+
],
|
|
1558
|
+
"events": [
|
|
1559
|
+
{
|
|
1560
|
+
"name": "open",
|
|
1591
1561
|
"type": {
|
|
1592
|
-
"text": "
|
|
1562
|
+
"text": "NordEvent"
|
|
1593
1563
|
},
|
|
1594
|
-
"
|
|
1595
|
-
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1596
|
-
"fieldName": "download"
|
|
1564
|
+
"description": "The command menu was opened."
|
|
1597
1565
|
},
|
|
1598
1566
|
{
|
|
1599
|
-
"name": "
|
|
1567
|
+
"name": "close",
|
|
1600
1568
|
"type": {
|
|
1601
|
-
"text": "
|
|
1569
|
+
"text": "NordEvent"
|
|
1602
1570
|
},
|
|
1603
|
-
"
|
|
1604
|
-
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
1605
|
-
"fieldName": "target"
|
|
1571
|
+
"description": "The command menu was closed."
|
|
1606
1572
|
},
|
|
1607
1573
|
{
|
|
1608
|
-
"name": "expand",
|
|
1609
1574
|
"type": {
|
|
1610
|
-
"text": "
|
|
1575
|
+
"text": "SelectEvent"
|
|
1611
1576
|
},
|
|
1612
|
-
"
|
|
1613
|
-
"
|
|
1614
|
-
|
|
1615
|
-
|
|
1577
|
+
"description": "User selected a command from the menu.",
|
|
1578
|
+
"name": "nord-select"
|
|
1579
|
+
}
|
|
1580
|
+
],
|
|
1581
|
+
"attributes": [
|
|
1616
1582
|
{
|
|
1617
|
-
"name": "
|
|
1583
|
+
"name": "open",
|
|
1618
1584
|
"type": {
|
|
1619
1585
|
"text": "boolean"
|
|
1620
1586
|
},
|
|
1621
1587
|
"default": "false",
|
|
1622
|
-
"description": "
|
|
1623
|
-
"fieldName": "
|
|
1624
|
-
"inheritedFrom": {
|
|
1625
|
-
"name": "InputMixin",
|
|
1626
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1627
|
-
}
|
|
1588
|
+
"description": "Show or hide the command menu.",
|
|
1589
|
+
"fieldName": "open"
|
|
1628
1590
|
},
|
|
1629
1591
|
{
|
|
1630
|
-
"name": "
|
|
1592
|
+
"name": "placeholder",
|
|
1631
1593
|
"type": {
|
|
1632
|
-
"text": "string
|
|
1594
|
+
"text": "string"
|
|
1633
1595
|
},
|
|
1634
|
-
"
|
|
1635
|
-
"
|
|
1636
|
-
"
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1596
|
+
"default": "\"Type a command or search...\"",
|
|
1597
|
+
"description": "Hint text to display in the Command Menu search field.",
|
|
1598
|
+
"fieldName": "placeholder"
|
|
1599
|
+
}
|
|
1600
|
+
],
|
|
1601
|
+
"superclass": {
|
|
1602
|
+
"name": "LitElement",
|
|
1603
|
+
"package": "lit"
|
|
1604
|
+
},
|
|
1605
|
+
"status": "ready",
|
|
1606
|
+
"category": "action",
|
|
1607
|
+
"displayName": null,
|
|
1608
|
+
"tagName": "nord-command-menu",
|
|
1609
|
+
"customElement": true
|
|
1610
|
+
}
|
|
1611
|
+
],
|
|
1612
|
+
"exports": [
|
|
1613
|
+
{
|
|
1614
|
+
"kind": "js",
|
|
1615
|
+
"name": "default",
|
|
1616
|
+
"declaration": {
|
|
1617
|
+
"name": "CommandMenu",
|
|
1618
|
+
"module": "src/command-menu/CommandMenu.ts"
|
|
1619
|
+
}
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
"kind": "custom-element-definition",
|
|
1623
|
+
"name": "nord-command-menu",
|
|
1624
|
+
"declaration": {
|
|
1625
|
+
"name": "CommandMenu",
|
|
1626
|
+
"module": "src/command-menu/CommandMenu.ts"
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
],
|
|
1630
|
+
"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"
|
|
1631
|
+
},
|
|
1632
|
+
{
|
|
1633
|
+
"kind": "javascript-module",
|
|
1634
|
+
"path": "src/command-menu/CommandMenuAction.ts",
|
|
1635
|
+
"declarations": [
|
|
1636
|
+
{
|
|
1637
|
+
"kind": "class",
|
|
1638
|
+
"description": "Command Menu Action displays a single action that can be executed by the user. For usage examples, please see Command Menu component.",
|
|
1639
|
+
"name": "CommandMenuAction",
|
|
1640
|
+
"members": [
|
|
1641
|
+
{
|
|
1642
|
+
"kind": "field",
|
|
1643
|
+
"name": "direction",
|
|
1644
|
+
"privacy": "private",
|
|
1645
|
+
"default": "new DirectionController(this)"
|
|
1640
1646
|
},
|
|
1641
1647
|
{
|
|
1642
|
-
"
|
|
1648
|
+
"kind": "field",
|
|
1649
|
+
"name": "command",
|
|
1643
1650
|
"type": {
|
|
1644
|
-
"text": "
|
|
1651
|
+
"text": "ICommandMenuAction"
|
|
1645
1652
|
},
|
|
1646
|
-
"
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
"
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
+
"attribute": "command"
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
"kind": "field",
|
|
1657
|
+
"name": "selected",
|
|
1658
|
+
"type": {
|
|
1659
|
+
"text": "boolean"
|
|
1660
|
+
},
|
|
1661
|
+
"default": "false",
|
|
1662
|
+
"attribute": "selected"
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"kind": "method",
|
|
1666
|
+
"name": "ensureInView",
|
|
1667
|
+
"privacy": "protected",
|
|
1668
|
+
"description": "Scroll to show element"
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"kind": "method",
|
|
1672
|
+
"name": "getIconName",
|
|
1673
|
+
"privacy": "private"
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
"kind": "method",
|
|
1677
|
+
"name": "renderShortcut",
|
|
1678
|
+
"privacy": "private"
|
|
1653
1679
|
}
|
|
1654
1680
|
],
|
|
1655
|
-
"
|
|
1681
|
+
"attributes": [
|
|
1656
1682
|
{
|
|
1657
|
-
"name": "
|
|
1658
|
-
"
|
|
1683
|
+
"name": "command",
|
|
1684
|
+
"type": {
|
|
1685
|
+
"text": "ICommandMenuAction"
|
|
1686
|
+
},
|
|
1687
|
+
"fieldName": "command"
|
|
1659
1688
|
},
|
|
1660
1689
|
{
|
|
1661
|
-
"name": "
|
|
1662
|
-
"
|
|
1690
|
+
"name": "selected",
|
|
1691
|
+
"type": {
|
|
1692
|
+
"text": "boolean"
|
|
1693
|
+
},
|
|
1694
|
+
"default": "false",
|
|
1695
|
+
"fieldName": "selected"
|
|
1663
1696
|
}
|
|
1664
1697
|
],
|
|
1665
1698
|
"superclass": {
|
|
1666
1699
|
"name": "LitElement",
|
|
1667
1700
|
"package": "lit"
|
|
1668
1701
|
},
|
|
1669
|
-
"status": "
|
|
1670
|
-
"category":
|
|
1702
|
+
"status": "internal",
|
|
1703
|
+
"category": null,
|
|
1671
1704
|
"displayName": null,
|
|
1672
|
-
"tagName": "nord-
|
|
1705
|
+
"tagName": "nord-command-menu-action",
|
|
1673
1706
|
"customElement": true
|
|
1674
1707
|
}
|
|
1675
1708
|
],
|
|
@@ -1678,20 +1711,144 @@
|
|
|
1678
1711
|
"kind": "js",
|
|
1679
1712
|
"name": "default",
|
|
1680
1713
|
"declaration": {
|
|
1681
|
-
"name": "
|
|
1682
|
-
"module": "src/
|
|
1714
|
+
"name": "CommandMenuAction",
|
|
1715
|
+
"module": "src/command-menu/CommandMenuAction.ts"
|
|
1683
1716
|
}
|
|
1684
1717
|
},
|
|
1685
1718
|
{
|
|
1686
1719
|
"kind": "custom-element-definition",
|
|
1687
|
-
"name": "nord-
|
|
1720
|
+
"name": "nord-command-menu-action",
|
|
1688
1721
|
"declaration": {
|
|
1689
|
-
"name": "
|
|
1690
|
-
"module": "src/
|
|
1722
|
+
"name": "CommandMenuAction",
|
|
1723
|
+
"module": "src/command-menu/CommandMenuAction.ts"
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
],
|
|
1727
|
+
"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"
|
|
1728
|
+
},
|
|
1729
|
+
{
|
|
1730
|
+
"kind": "javascript-module",
|
|
1731
|
+
"path": "src/command-menu/ICommandMenuAction.ts",
|
|
1732
|
+
"declarations": [],
|
|
1733
|
+
"exports": [],
|
|
1734
|
+
"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"
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
"kind": "javascript-module",
|
|
1738
|
+
"path": "src/command-menu/KeyboardController.ts",
|
|
1739
|
+
"declarations": [
|
|
1740
|
+
{
|
|
1741
|
+
"kind": "class",
|
|
1742
|
+
"description": "",
|
|
1743
|
+
"name": "KeyboardController",
|
|
1744
|
+
"members": [
|
|
1745
|
+
{
|
|
1746
|
+
"kind": "field",
|
|
1747
|
+
"name": "globalShortcuts",
|
|
1748
|
+
"type": {
|
|
1749
|
+
"text": "ShortcutController"
|
|
1750
|
+
},
|
|
1751
|
+
"privacy": "private",
|
|
1752
|
+
"default": "new ShortcutController(host, { \"$mod+k\": preventDefault(actions.toggleOpen) })"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"kind": "field",
|
|
1756
|
+
"name": "navigationShortcuts",
|
|
1757
|
+
"type": {
|
|
1758
|
+
"text": "ShortcutController"
|
|
1759
|
+
},
|
|
1760
|
+
"privacy": "private",
|
|
1761
|
+
"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 )"
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
"kind": "field",
|
|
1765
|
+
"name": "commandShortcuts",
|
|
1766
|
+
"type": {
|
|
1767
|
+
"text": "ShortcutController"
|
|
1768
|
+
},
|
|
1769
|
+
"privacy": "private",
|
|
1770
|
+
"default": "new ShortcutController(host)"
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"kind": "method",
|
|
1774
|
+
"name": "registerCommandShortcuts"
|
|
1775
|
+
}
|
|
1776
|
+
]
|
|
1777
|
+
}
|
|
1778
|
+
],
|
|
1779
|
+
"exports": [
|
|
1780
|
+
{
|
|
1781
|
+
"kind": "js",
|
|
1782
|
+
"name": "KeyboardController",
|
|
1783
|
+
"declaration": {
|
|
1784
|
+
"name": "KeyboardController",
|
|
1785
|
+
"module": "src/command-menu/KeyboardController.ts"
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
],
|
|
1789
|
+
"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"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"kind": "javascript-module",
|
|
1793
|
+
"path": "src/command-menu/SelectEvent.ts",
|
|
1794
|
+
"declarations": [
|
|
1795
|
+
{
|
|
1796
|
+
"kind": "class",
|
|
1797
|
+
"description": "",
|
|
1798
|
+
"name": "SelectEvent",
|
|
1799
|
+
"members": [
|
|
1800
|
+
{
|
|
1801
|
+
"kind": "field",
|
|
1802
|
+
"name": "eventName",
|
|
1803
|
+
"type": {
|
|
1804
|
+
"text": "string"
|
|
1805
|
+
},
|
|
1806
|
+
"static": true,
|
|
1807
|
+
"default": "\"nord-select\""
|
|
1808
|
+
}
|
|
1809
|
+
],
|
|
1810
|
+
"superclass": {
|
|
1811
|
+
"name": "NordEvent",
|
|
1812
|
+
"module": "/src/common/events.js"
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
],
|
|
1816
|
+
"exports": [
|
|
1817
|
+
{
|
|
1818
|
+
"kind": "js",
|
|
1819
|
+
"name": "SelectEvent",
|
|
1820
|
+
"declaration": {
|
|
1821
|
+
"name": "SelectEvent",
|
|
1822
|
+
"module": "src/command-menu/SelectEvent.ts"
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
],
|
|
1826
|
+
"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"
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
"kind": "javascript-module",
|
|
1830
|
+
"path": "src/command-menu/localization.ts",
|
|
1831
|
+
"declarations": [
|
|
1832
|
+
{
|
|
1833
|
+
"kind": "variable",
|
|
1834
|
+
"name": "commandMenuLocalization",
|
|
1835
|
+
"type": {
|
|
1836
|
+
"text": "object"
|
|
1837
|
+
},
|
|
1838
|
+
"default": "{\n instructions: \"Press 'Enter' to confirm your input or 'Escape' to cancel\",\n inputLabel: \"Type the name of a command to run.\",\n footerArrowKeys: \"Navigate\",\n footerEnterKey: \"Select\",\n footerEscapeKey: \"Esc to dismiss\",\n footerBackspaceKey: \"Move to parent\",\n noResults: (searchTerm: string) => `No results for “${searchTerm}”`,\n tip: \"Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.\",\n}"
|
|
1839
|
+
}
|
|
1840
|
+
],
|
|
1841
|
+
"exports": [
|
|
1842
|
+
{
|
|
1843
|
+
"kind": "js",
|
|
1844
|
+
"name": "default",
|
|
1845
|
+
"declaration": {
|
|
1846
|
+
"name": "commandMenuLocalization",
|
|
1847
|
+
"module": "src/command-menu/localization.ts"
|
|
1691
1848
|
}
|
|
1692
1849
|
}
|
|
1693
1850
|
],
|
|
1694
|
-
"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 clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button 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\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
|
|
1851
|
+
"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"
|
|
1695
1852
|
},
|
|
1696
1853
|
{
|
|
1697
1854
|
"kind": "javascript-module",
|
|
@@ -1727,16 +1884,26 @@
|
|
|
1727
1884
|
},
|
|
1728
1885
|
{
|
|
1729
1886
|
"kind": "field",
|
|
1730
|
-
"name": "
|
|
1887
|
+
"name": "indeterminate",
|
|
1731
1888
|
"type": {
|
|
1732
1889
|
"text": "boolean"
|
|
1733
1890
|
},
|
|
1734
1891
|
"default": "false",
|
|
1735
|
-
"description": "Controls whether the checkbox is
|
|
1736
|
-
"attribute": "
|
|
1892
|
+
"description": "Controls whether the checkbox is in an indeterminate state.",
|
|
1893
|
+
"attribute": "indeterminate"
|
|
1737
1894
|
},
|
|
1738
1895
|
{
|
|
1739
|
-
"kind": "
|
|
1896
|
+
"kind": "field",
|
|
1897
|
+
"name": "checked",
|
|
1898
|
+
"type": {
|
|
1899
|
+
"text": "boolean"
|
|
1900
|
+
},
|
|
1901
|
+
"default": "false",
|
|
1902
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
1903
|
+
"attribute": "checked"
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
"kind": "method",
|
|
1740
1907
|
"name": "handleChange",
|
|
1741
1908
|
"privacy": "protected",
|
|
1742
1909
|
"parameters": [
|
|
@@ -2087,6 +2254,15 @@
|
|
|
2087
2254
|
}
|
|
2088
2255
|
],
|
|
2089
2256
|
"attributes": [
|
|
2257
|
+
{
|
|
2258
|
+
"name": "indeterminate",
|
|
2259
|
+
"type": {
|
|
2260
|
+
"text": "boolean"
|
|
2261
|
+
},
|
|
2262
|
+
"default": "false",
|
|
2263
|
+
"description": "Controls whether the checkbox is in an indeterminate state.",
|
|
2264
|
+
"fieldName": "indeterminate"
|
|
2265
|
+
},
|
|
2090
2266
|
{
|
|
2091
2267
|
"name": "checked",
|
|
2092
2268
|
"type": {
|
|
@@ -2281,341 +2457,415 @@
|
|
|
2281
2457
|
},
|
|
2282
2458
|
{
|
|
2283
2459
|
"kind": "javascript-module",
|
|
2284
|
-
"path": "src/
|
|
2460
|
+
"path": "src/button/Button.ts",
|
|
2285
2461
|
"declarations": [
|
|
2286
2462
|
{
|
|
2287
2463
|
"kind": "class",
|
|
2288
|
-
"description": "
|
|
2289
|
-
"name": "
|
|
2464
|
+
"description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
|
|
2465
|
+
"name": "Button",
|
|
2290
2466
|
"slots": [
|
|
2291
2467
|
{
|
|
2292
|
-
"description": "
|
|
2293
|
-
"name": "
|
|
2294
|
-
}
|
|
2295
|
-
],
|
|
2296
|
-
"members": [
|
|
2297
|
-
{
|
|
2298
|
-
"kind": "field",
|
|
2299
|
-
"name": "inputRef",
|
|
2300
|
-
"privacy": "private"
|
|
2468
|
+
"description": "The button content",
|
|
2469
|
+
"name": ""
|
|
2301
2470
|
},
|
|
2302
2471
|
{
|
|
2303
|
-
"
|
|
2304
|
-
"name": "
|
|
2305
|
-
"privacy": "private"
|
|
2472
|
+
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
2473
|
+
"name": "start"
|
|
2306
2474
|
},
|
|
2307
2475
|
{
|
|
2308
|
-
"
|
|
2309
|
-
"name": "
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
"privacy": "private"
|
|
2314
|
-
},
|
|
2476
|
+
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
2477
|
+
"name": "end"
|
|
2478
|
+
}
|
|
2479
|
+
],
|
|
2480
|
+
"members": [
|
|
2315
2481
|
{
|
|
2316
2482
|
"kind": "field",
|
|
2317
|
-
"name": "
|
|
2318
|
-
"privacy": "private"
|
|
2319
|
-
"default": "new LocalizeController<\"nord-command-menu\">(this)"
|
|
2483
|
+
"name": "buttonRef",
|
|
2484
|
+
"privacy": "private"
|
|
2320
2485
|
},
|
|
2321
2486
|
{
|
|
2322
2487
|
"kind": "field",
|
|
2323
|
-
"name": "
|
|
2488
|
+
"name": "events",
|
|
2324
2489
|
"privacy": "private",
|
|
2325
|
-
"default": "new
|
|
2490
|
+
"default": "new EventController(this)"
|
|
2326
2491
|
},
|
|
2327
2492
|
{
|
|
2328
2493
|
"kind": "field",
|
|
2329
|
-
"name": "
|
|
2494
|
+
"name": "lightDom",
|
|
2330
2495
|
"privacy": "private",
|
|
2331
|
-
"default": "new
|
|
2496
|
+
"default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
|
|
2332
2497
|
},
|
|
2333
2498
|
{
|
|
2334
2499
|
"kind": "field",
|
|
2335
|
-
"name": "
|
|
2500
|
+
"name": "variant",
|
|
2336
2501
|
"type": {
|
|
2337
|
-
"text": "
|
|
2502
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
|
|
2338
2503
|
},
|
|
2339
|
-
"default": "
|
|
2340
|
-
"description": "
|
|
2341
|
-
"attribute": "
|
|
2504
|
+
"default": "\"default\"",
|
|
2505
|
+
"description": "The style variant of the button.",
|
|
2506
|
+
"attribute": "variant",
|
|
2507
|
+
"reflects": true
|
|
2342
2508
|
},
|
|
2343
2509
|
{
|
|
2344
2510
|
"kind": "field",
|
|
2345
|
-
"name": "
|
|
2511
|
+
"name": "type",
|
|
2346
2512
|
"type": {
|
|
2347
|
-
"text": "
|
|
2513
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
2348
2514
|
},
|
|
2349
|
-
"default": "\"
|
|
2350
|
-
"description": "
|
|
2351
|
-
"attribute": "
|
|
2515
|
+
"default": "\"submit\"",
|
|
2516
|
+
"description": "The type of the button.",
|
|
2517
|
+
"attribute": "type",
|
|
2518
|
+
"reflects": true
|
|
2352
2519
|
},
|
|
2353
2520
|
{
|
|
2354
2521
|
"kind": "field",
|
|
2355
|
-
"name": "
|
|
2522
|
+
"name": "size",
|
|
2356
2523
|
"type": {
|
|
2357
|
-
"text": "
|
|
2524
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
2358
2525
|
},
|
|
2359
|
-
"default": "
|
|
2360
|
-
"description": "
|
|
2526
|
+
"default": "\"m\"",
|
|
2527
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
2528
|
+
"attribute": "size",
|
|
2529
|
+
"reflects": true
|
|
2361
2530
|
},
|
|
2362
2531
|
{
|
|
2363
2532
|
"kind": "field",
|
|
2364
|
-
"name": "
|
|
2533
|
+
"name": "accessibleExpanded",
|
|
2365
2534
|
"type": {
|
|
2366
|
-
"text": "
|
|
2535
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
2367
2536
|
},
|
|
2368
|
-
"privacy": "private"
|
|
2537
|
+
"privacy": "private",
|
|
2538
|
+
"attribute": "aria-expanded"
|
|
2369
2539
|
},
|
|
2370
2540
|
{
|
|
2371
2541
|
"kind": "field",
|
|
2372
|
-
"name": "
|
|
2542
|
+
"name": "accessibleHasPopup",
|
|
2373
2543
|
"type": {
|
|
2374
|
-
"text": "
|
|
2544
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
2375
2545
|
},
|
|
2376
2546
|
"privacy": "private",
|
|
2377
|
-
"
|
|
2547
|
+
"attribute": "aria-haspopup"
|
|
2378
2548
|
},
|
|
2379
2549
|
{
|
|
2380
2550
|
"kind": "field",
|
|
2381
|
-
"name": "
|
|
2551
|
+
"name": "href",
|
|
2382
2552
|
"type": {
|
|
2383
|
-
"text": "
|
|
2553
|
+
"text": "string | undefined"
|
|
2384
2554
|
},
|
|
2385
|
-
"
|
|
2386
|
-
"
|
|
2555
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
2556
|
+
"attribute": "href",
|
|
2557
|
+
"reflects": true
|
|
2387
2558
|
},
|
|
2388
2559
|
{
|
|
2389
2560
|
"kind": "field",
|
|
2390
|
-
"name": "
|
|
2561
|
+
"name": "download",
|
|
2391
2562
|
"type": {
|
|
2392
|
-
"text": "
|
|
2563
|
+
"text": "boolean"
|
|
2393
2564
|
},
|
|
2394
|
-
"
|
|
2395
|
-
"
|
|
2565
|
+
"default": "false",
|
|
2566
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
2567
|
+
"attribute": "download"
|
|
2396
2568
|
},
|
|
2397
2569
|
{
|
|
2398
2570
|
"kind": "field",
|
|
2399
|
-
"name": "
|
|
2571
|
+
"name": "target",
|
|
2400
2572
|
"type": {
|
|
2401
|
-
"text": "
|
|
2573
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
2402
2574
|
},
|
|
2403
|
-
"
|
|
2404
|
-
"
|
|
2575
|
+
"default": "\"_self\"",
|
|
2576
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
2577
|
+
"attribute": "target",
|
|
2578
|
+
"reflects": true
|
|
2405
2579
|
},
|
|
2406
2580
|
{
|
|
2407
2581
|
"kind": "field",
|
|
2408
|
-
"name": "
|
|
2582
|
+
"name": "expand",
|
|
2409
2583
|
"type": {
|
|
2410
|
-
"text": "
|
|
2584
|
+
"text": "boolean"
|
|
2411
2585
|
},
|
|
2412
|
-
"
|
|
2586
|
+
"default": "false",
|
|
2587
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
2588
|
+
"attribute": "expand",
|
|
2589
|
+
"reflects": true
|
|
2413
2590
|
},
|
|
2414
2591
|
{
|
|
2415
2592
|
"kind": "method",
|
|
2416
|
-
"name": "
|
|
2593
|
+
"name": "renderLink",
|
|
2594
|
+
"privacy": "private",
|
|
2417
2595
|
"parameters": [
|
|
2418
2596
|
{
|
|
2419
|
-
"name": "
|
|
2420
|
-
"default": "{}",
|
|
2597
|
+
"name": "innards",
|
|
2421
2598
|
"type": {
|
|
2422
|
-
"text": "
|
|
2423
|
-
}
|
|
2424
|
-
"description": "allows you to open the menu filtered to a specific parent command."
|
|
2599
|
+
"text": "TemplateResult"
|
|
2600
|
+
}
|
|
2425
2601
|
}
|
|
2426
2602
|
],
|
|
2427
|
-
"description": "
|
|
2428
|
-
},
|
|
2429
|
-
{
|
|
2430
|
-
"kind": "method",
|
|
2431
|
-
"name": "close",
|
|
2432
|
-
"description": "Close the command menu programmatically."
|
|
2433
|
-
},
|
|
2434
|
-
{
|
|
2435
|
-
"kind": "method",
|
|
2436
|
-
"name": "toggleOpen",
|
|
2437
|
-
"description": "Toggle the open state programmatically."
|
|
2438
|
-
},
|
|
2439
|
-
{
|
|
2440
|
-
"kind": "method",
|
|
2441
|
-
"name": "focus",
|
|
2442
|
-
"description": "Focus the command menu's input."
|
|
2443
|
-
},
|
|
2444
|
-
{
|
|
2445
|
-
"kind": "method",
|
|
2446
|
-
"name": "renderNoResults",
|
|
2447
|
-
"privacy": "private"
|
|
2603
|
+
"description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
|
|
2448
2604
|
},
|
|
2449
2605
|
{
|
|
2450
2606
|
"kind": "method",
|
|
2451
|
-
"name": "
|
|
2607
|
+
"name": "renderButton",
|
|
2452
2608
|
"privacy": "private",
|
|
2453
2609
|
"parameters": [
|
|
2454
2610
|
{
|
|
2455
|
-
"name": "
|
|
2456
|
-
"type": {
|
|
2457
|
-
"text": "string | undefined"
|
|
2458
|
-
}
|
|
2459
|
-
},
|
|
2460
|
-
{
|
|
2461
|
-
"name": "commands",
|
|
2611
|
+
"name": "innards",
|
|
2462
2612
|
"type": {
|
|
2463
|
-
"text": "
|
|
2613
|
+
"text": "TemplateResult"
|
|
2464
2614
|
}
|
|
2465
2615
|
}
|
|
2466
2616
|
]
|
|
2467
2617
|
},
|
|
2468
2618
|
{
|
|
2469
2619
|
"kind": "method",
|
|
2470
|
-
"name": "
|
|
2471
|
-
"privacy": "protected"
|
|
2472
|
-
},
|
|
2473
|
-
{
|
|
2474
|
-
"kind": "method",
|
|
2475
|
-
"name": "handleBump",
|
|
2476
|
-
"privacy": "protected"
|
|
2477
|
-
},
|
|
2478
|
-
{
|
|
2479
|
-
"kind": "method",
|
|
2480
|
-
"name": "focusOnOpen",
|
|
2481
|
-
"privacy": "protected"
|
|
2482
|
-
},
|
|
2483
|
-
{
|
|
2484
|
-
"kind": "method",
|
|
2485
|
-
"name": "handleAnimationEnd",
|
|
2620
|
+
"name": "renderLightDom",
|
|
2486
2621
|
"privacy": "private"
|
|
2487
2622
|
},
|
|
2488
2623
|
{
|
|
2489
|
-
"kind": "
|
|
2490
|
-
"name": "
|
|
2624
|
+
"kind": "field",
|
|
2625
|
+
"name": "handleOuterClick",
|
|
2491
2626
|
"privacy": "private"
|
|
2492
2627
|
},
|
|
2493
2628
|
{
|
|
2494
2629
|
"kind": "method",
|
|
2495
|
-
"name": "
|
|
2630
|
+
"name": "handleClick",
|
|
2496
2631
|
"privacy": "private",
|
|
2497
2632
|
"parameters": [
|
|
2498
2633
|
{
|
|
2499
|
-
"name": "
|
|
2634
|
+
"name": "e",
|
|
2500
2635
|
"type": {
|
|
2501
|
-
"text": "
|
|
2636
|
+
"text": "Event"
|
|
2502
2637
|
}
|
|
2503
2638
|
}
|
|
2504
2639
|
]
|
|
2505
2640
|
},
|
|
2506
2641
|
{
|
|
2507
2642
|
"kind": "method",
|
|
2508
|
-
"name": "
|
|
2643
|
+
"name": "handleProxyChange",
|
|
2509
2644
|
"privacy": "private",
|
|
2510
|
-
"
|
|
2511
|
-
{
|
|
2512
|
-
"name": "command",
|
|
2513
|
-
"default": "this.selected",
|
|
2514
|
-
"type": {
|
|
2515
|
-
"text": "ICommandMenuAction"
|
|
2516
|
-
}
|
|
2517
|
-
}
|
|
2518
|
-
]
|
|
2519
|
-
},
|
|
2520
|
-
{
|
|
2521
|
-
"kind": "method",
|
|
2522
|
-
"name": "start",
|
|
2523
|
-
"privacy": "private"
|
|
2524
|
-
},
|
|
2525
|
-
{
|
|
2526
|
-
"kind": "method",
|
|
2527
|
-
"name": "end",
|
|
2528
|
-
"privacy": "private"
|
|
2645
|
+
"description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
|
|
2529
2646
|
},
|
|
2530
2647
|
{
|
|
2531
|
-
"kind": "
|
|
2532
|
-
"name": "
|
|
2533
|
-
"
|
|
2648
|
+
"kind": "field",
|
|
2649
|
+
"name": "disabled",
|
|
2650
|
+
"type": {
|
|
2651
|
+
"text": "boolean"
|
|
2652
|
+
},
|
|
2653
|
+
"default": "false",
|
|
2654
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
2655
|
+
"attribute": "disabled",
|
|
2656
|
+
"reflects": true,
|
|
2657
|
+
"inheritedFrom": {
|
|
2658
|
+
"name": "InputMixin",
|
|
2659
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2660
|
+
}
|
|
2534
2661
|
},
|
|
2535
2662
|
{
|
|
2536
|
-
"kind": "
|
|
2537
|
-
"name": "
|
|
2538
|
-
"
|
|
2663
|
+
"kind": "field",
|
|
2664
|
+
"name": "name",
|
|
2665
|
+
"type": {
|
|
2666
|
+
"text": "string | undefined"
|
|
2667
|
+
},
|
|
2668
|
+
"description": "The name of the form component.",
|
|
2669
|
+
"attribute": "name",
|
|
2670
|
+
"inheritedFrom": {
|
|
2671
|
+
"name": "InputMixin",
|
|
2672
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2673
|
+
}
|
|
2539
2674
|
},
|
|
2540
2675
|
{
|
|
2541
|
-
"kind": "
|
|
2542
|
-
"name": "
|
|
2543
|
-
"
|
|
2676
|
+
"kind": "field",
|
|
2677
|
+
"name": "value",
|
|
2678
|
+
"type": {
|
|
2679
|
+
"text": "string"
|
|
2680
|
+
},
|
|
2681
|
+
"default": "\"\"",
|
|
2682
|
+
"description": "The value of the form component.",
|
|
2683
|
+
"attribute": "value",
|
|
2684
|
+
"inheritedFrom": {
|
|
2685
|
+
"name": "InputMixin",
|
|
2686
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2687
|
+
}
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
"kind": "field",
|
|
2691
|
+
"name": "form",
|
|
2692
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
2693
|
+
"inheritedFrom": {
|
|
2694
|
+
"name": "InputMixin",
|
|
2695
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2696
|
+
}
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"kind": "field",
|
|
2700
|
+
"name": "focusableRef",
|
|
2701
|
+
"privacy": "protected",
|
|
2702
|
+
"inheritedFrom": {
|
|
2703
|
+
"name": "FocusableMixin",
|
|
2704
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2705
|
+
}
|
|
2544
2706
|
},
|
|
2545
2707
|
{
|
|
2546
2708
|
"kind": "method",
|
|
2547
|
-
"name": "
|
|
2548
|
-
"privacy": "private",
|
|
2709
|
+
"name": "focus",
|
|
2549
2710
|
"parameters": [
|
|
2550
2711
|
{
|
|
2551
|
-
"name": "
|
|
2712
|
+
"name": "options",
|
|
2552
2713
|
"optional": true,
|
|
2553
2714
|
"type": {
|
|
2554
|
-
"text": "
|
|
2555
|
-
}
|
|
2715
|
+
"text": "FocusOptions"
|
|
2716
|
+
},
|
|
2717
|
+
"description": "An object which controls aspects of the focusing process."
|
|
2556
2718
|
}
|
|
2557
|
-
]
|
|
2719
|
+
],
|
|
2720
|
+
"description": "Programmatically move focus to the component.",
|
|
2721
|
+
"inheritedFrom": {
|
|
2722
|
+
"name": "FocusableMixin",
|
|
2723
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2724
|
+
}
|
|
2558
2725
|
},
|
|
2559
2726
|
{
|
|
2560
2727
|
"kind": "method",
|
|
2561
|
-
"name": "
|
|
2562
|
-
"
|
|
2563
|
-
"
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
"text": "string"
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
]
|
|
2728
|
+
"name": "blur",
|
|
2729
|
+
"description": "Programmatically remove focus from the component.",
|
|
2730
|
+
"inheritedFrom": {
|
|
2731
|
+
"name": "FocusableMixin",
|
|
2732
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2733
|
+
}
|
|
2571
2734
|
},
|
|
2572
2735
|
{
|
|
2573
2736
|
"kind": "method",
|
|
2574
|
-
"name": "
|
|
2575
|
-
"
|
|
2737
|
+
"name": "click",
|
|
2738
|
+
"description": "Programmatically simulates a click on the component.",
|
|
2739
|
+
"inheritedFrom": {
|
|
2740
|
+
"name": "FocusableMixin",
|
|
2741
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2742
|
+
}
|
|
2576
2743
|
}
|
|
2577
2744
|
],
|
|
2578
|
-
"
|
|
2745
|
+
"attributes": [
|
|
2579
2746
|
{
|
|
2580
|
-
"name": "
|
|
2747
|
+
"name": "variant",
|
|
2581
2748
|
"type": {
|
|
2582
|
-
"text": "
|
|
2749
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
|
|
2583
2750
|
},
|
|
2584
|
-
"
|
|
2751
|
+
"default": "\"default\"",
|
|
2752
|
+
"description": "The style variant of the button.",
|
|
2753
|
+
"fieldName": "variant"
|
|
2585
2754
|
},
|
|
2586
2755
|
{
|
|
2587
|
-
"name": "
|
|
2756
|
+
"name": "type",
|
|
2588
2757
|
"type": {
|
|
2589
|
-
"text": "
|
|
2758
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
2590
2759
|
},
|
|
2591
|
-
"
|
|
2760
|
+
"default": "\"submit\"",
|
|
2761
|
+
"description": "The type of the button.",
|
|
2762
|
+
"fieldName": "type"
|
|
2592
2763
|
},
|
|
2593
2764
|
{
|
|
2765
|
+
"name": "size",
|
|
2594
2766
|
"type": {
|
|
2595
|
-
"text": "
|
|
2767
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
2596
2768
|
},
|
|
2597
|
-
"
|
|
2598
|
-
"
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
"attributes": [
|
|
2769
|
+
"default": "\"m\"",
|
|
2770
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
2771
|
+
"fieldName": "size"
|
|
2772
|
+
},
|
|
2602
2773
|
{
|
|
2603
|
-
"name": "
|
|
2774
|
+
"name": "aria-expanded",
|
|
2775
|
+
"type": {
|
|
2776
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
2777
|
+
},
|
|
2778
|
+
"fieldName": "accessibleExpanded"
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
"name": "aria-haspopup",
|
|
2782
|
+
"type": {
|
|
2783
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
2784
|
+
},
|
|
2785
|
+
"fieldName": "accessibleHasPopup"
|
|
2786
|
+
},
|
|
2787
|
+
{
|
|
2788
|
+
"name": "href",
|
|
2789
|
+
"type": {
|
|
2790
|
+
"text": "string | undefined"
|
|
2791
|
+
},
|
|
2792
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
2793
|
+
"fieldName": "href"
|
|
2794
|
+
},
|
|
2795
|
+
{
|
|
2796
|
+
"name": "download",
|
|
2604
2797
|
"type": {
|
|
2605
2798
|
"text": "boolean"
|
|
2606
2799
|
},
|
|
2607
2800
|
"default": "false",
|
|
2608
|
-
"description": "
|
|
2609
|
-
"fieldName": "
|
|
2801
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
2802
|
+
"fieldName": "download"
|
|
2610
2803
|
},
|
|
2611
2804
|
{
|
|
2612
|
-
"name": "
|
|
2805
|
+
"name": "target",
|
|
2806
|
+
"type": {
|
|
2807
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
2808
|
+
},
|
|
2809
|
+
"default": "\"_self\"",
|
|
2810
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
2811
|
+
"fieldName": "target"
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"name": "expand",
|
|
2815
|
+
"type": {
|
|
2816
|
+
"text": "boolean"
|
|
2817
|
+
},
|
|
2818
|
+
"default": "false",
|
|
2819
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
2820
|
+
"fieldName": "expand"
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
"name": "disabled",
|
|
2824
|
+
"type": {
|
|
2825
|
+
"text": "boolean"
|
|
2826
|
+
},
|
|
2827
|
+
"default": "false",
|
|
2828
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
2829
|
+
"fieldName": "disabled",
|
|
2830
|
+
"inheritedFrom": {
|
|
2831
|
+
"name": "InputMixin",
|
|
2832
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2833
|
+
}
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
"name": "name",
|
|
2837
|
+
"type": {
|
|
2838
|
+
"text": "string | undefined"
|
|
2839
|
+
},
|
|
2840
|
+
"description": "The name of the form component.",
|
|
2841
|
+
"fieldName": "name",
|
|
2842
|
+
"inheritedFrom": {
|
|
2843
|
+
"name": "InputMixin",
|
|
2844
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2845
|
+
}
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
"name": "value",
|
|
2613
2849
|
"type": {
|
|
2614
2850
|
"text": "string"
|
|
2615
2851
|
},
|
|
2616
|
-
"default": "\"
|
|
2617
|
-
"description": "
|
|
2618
|
-
"fieldName": "
|
|
2852
|
+
"default": "\"\"",
|
|
2853
|
+
"description": "The value of the form component.",
|
|
2854
|
+
"fieldName": "value",
|
|
2855
|
+
"inheritedFrom": {
|
|
2856
|
+
"name": "InputMixin",
|
|
2857
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
],
|
|
2861
|
+
"mixins": [
|
|
2862
|
+
{
|
|
2863
|
+
"name": "InputMixin",
|
|
2864
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
"name": "FocusableMixin",
|
|
2868
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
2619
2869
|
}
|
|
2620
2870
|
],
|
|
2621
2871
|
"superclass": {
|
|
@@ -2625,7 +2875,7 @@
|
|
|
2625
2875
|
"status": "ready",
|
|
2626
2876
|
"category": "action",
|
|
2627
2877
|
"displayName": null,
|
|
2628
|
-
"tagName": "nord-
|
|
2878
|
+
"tagName": "nord-button",
|
|
2629
2879
|
"customElement": true
|
|
2630
2880
|
}
|
|
2631
2881
|
],
|
|
@@ -2634,261 +2884,40 @@
|
|
|
2634
2884
|
"kind": "js",
|
|
2635
2885
|
"name": "default",
|
|
2636
2886
|
"declaration": {
|
|
2637
|
-
"name": "
|
|
2638
|
-
"module": "src/
|
|
2887
|
+
"name": "Button",
|
|
2888
|
+
"module": "src/button/Button.ts"
|
|
2639
2889
|
}
|
|
2640
2890
|
},
|
|
2641
2891
|
{
|
|
2642
2892
|
"kind": "custom-element-definition",
|
|
2643
|
-
"name": "nord-
|
|
2893
|
+
"name": "nord-button",
|
|
2644
2894
|
"declaration": {
|
|
2645
|
-
"name": "
|
|
2646
|
-
"module": "src/
|
|
2895
|
+
"name": "Button",
|
|
2896
|
+
"module": "src/button/Button.ts"
|
|
2647
2897
|
}
|
|
2648
2898
|
}
|
|
2649
2899
|
],
|
|
2650
|
-
"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"
|
|
2900
|
+
"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- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button 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\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
|
|
2651
2901
|
},
|
|
2652
2902
|
{
|
|
2653
2903
|
"kind": "javascript-module",
|
|
2654
|
-
"path": "src/
|
|
2904
|
+
"path": "src/common/attribute.ts",
|
|
2655
2905
|
"declarations": [
|
|
2656
2906
|
{
|
|
2657
|
-
"kind": "
|
|
2658
|
-
"
|
|
2659
|
-
"
|
|
2660
|
-
"members": [
|
|
2661
|
-
{
|
|
2662
|
-
"kind": "field",
|
|
2663
|
-
"name": "direction",
|
|
2664
|
-
"privacy": "private",
|
|
2665
|
-
"default": "new DirectionController(this)"
|
|
2666
|
-
},
|
|
2907
|
+
"kind": "function",
|
|
2908
|
+
"name": "add",
|
|
2909
|
+
"parameters": [
|
|
2667
2910
|
{
|
|
2668
|
-
"
|
|
2669
|
-
"name": "command",
|
|
2911
|
+
"name": "element",
|
|
2670
2912
|
"type": {
|
|
2671
|
-
"text": "
|
|
2672
|
-
}
|
|
2673
|
-
"attribute": "command"
|
|
2913
|
+
"text": "Element"
|
|
2914
|
+
}
|
|
2674
2915
|
},
|
|
2675
2916
|
{
|
|
2676
|
-
"
|
|
2677
|
-
"name": "selected",
|
|
2917
|
+
"name": "attr",
|
|
2678
2918
|
"type": {
|
|
2679
|
-
"text": "
|
|
2680
|
-
}
|
|
2681
|
-
"default": "false",
|
|
2682
|
-
"attribute": "selected"
|
|
2683
|
-
},
|
|
2684
|
-
{
|
|
2685
|
-
"kind": "method",
|
|
2686
|
-
"name": "ensureInView",
|
|
2687
|
-
"privacy": "protected",
|
|
2688
|
-
"description": "Scroll to show element"
|
|
2689
|
-
},
|
|
2690
|
-
{
|
|
2691
|
-
"kind": "method",
|
|
2692
|
-
"name": "getIconName",
|
|
2693
|
-
"privacy": "private"
|
|
2694
|
-
},
|
|
2695
|
-
{
|
|
2696
|
-
"kind": "method",
|
|
2697
|
-
"name": "renderShortcut",
|
|
2698
|
-
"privacy": "private"
|
|
2699
|
-
}
|
|
2700
|
-
],
|
|
2701
|
-
"attributes": [
|
|
2702
|
-
{
|
|
2703
|
-
"name": "command",
|
|
2704
|
-
"type": {
|
|
2705
|
-
"text": "ICommandMenuAction"
|
|
2706
|
-
},
|
|
2707
|
-
"fieldName": "command"
|
|
2708
|
-
},
|
|
2709
|
-
{
|
|
2710
|
-
"name": "selected",
|
|
2711
|
-
"type": {
|
|
2712
|
-
"text": "boolean"
|
|
2713
|
-
},
|
|
2714
|
-
"default": "false",
|
|
2715
|
-
"fieldName": "selected"
|
|
2716
|
-
}
|
|
2717
|
-
],
|
|
2718
|
-
"superclass": {
|
|
2719
|
-
"name": "LitElement",
|
|
2720
|
-
"package": "lit"
|
|
2721
|
-
},
|
|
2722
|
-
"status": "internal",
|
|
2723
|
-
"category": null,
|
|
2724
|
-
"displayName": null,
|
|
2725
|
-
"tagName": "nord-command-menu-action",
|
|
2726
|
-
"customElement": true
|
|
2727
|
-
}
|
|
2728
|
-
],
|
|
2729
|
-
"exports": [
|
|
2730
|
-
{
|
|
2731
|
-
"kind": "js",
|
|
2732
|
-
"name": "default",
|
|
2733
|
-
"declaration": {
|
|
2734
|
-
"name": "CommandMenuAction",
|
|
2735
|
-
"module": "src/command-menu/CommandMenuAction.ts"
|
|
2736
|
-
}
|
|
2737
|
-
},
|
|
2738
|
-
{
|
|
2739
|
-
"kind": "custom-element-definition",
|
|
2740
|
-
"name": "nord-command-menu-action",
|
|
2741
|
-
"declaration": {
|
|
2742
|
-
"name": "CommandMenuAction",
|
|
2743
|
-
"module": "src/command-menu/CommandMenuAction.ts"
|
|
2744
|
-
}
|
|
2745
|
-
}
|
|
2746
|
-
],
|
|
2747
|
-
"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"
|
|
2748
|
-
},
|
|
2749
|
-
{
|
|
2750
|
-
"kind": "javascript-module",
|
|
2751
|
-
"path": "src/command-menu/ICommandMenuAction.ts",
|
|
2752
|
-
"declarations": [],
|
|
2753
|
-
"exports": [],
|
|
2754
|
-
"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"
|
|
2755
|
-
},
|
|
2756
|
-
{
|
|
2757
|
-
"kind": "javascript-module",
|
|
2758
|
-
"path": "src/command-menu/KeyboardController.ts",
|
|
2759
|
-
"declarations": [
|
|
2760
|
-
{
|
|
2761
|
-
"kind": "class",
|
|
2762
|
-
"description": "",
|
|
2763
|
-
"name": "KeyboardController",
|
|
2764
|
-
"members": [
|
|
2765
|
-
{
|
|
2766
|
-
"kind": "field",
|
|
2767
|
-
"name": "globalShortcuts",
|
|
2768
|
-
"type": {
|
|
2769
|
-
"text": "ShortcutController"
|
|
2770
|
-
},
|
|
2771
|
-
"privacy": "private",
|
|
2772
|
-
"default": "new ShortcutController(host, { \"$mod+k\": preventDefault(actions.toggleOpen) })"
|
|
2773
|
-
},
|
|
2774
|
-
{
|
|
2775
|
-
"kind": "field",
|
|
2776
|
-
"name": "navigationShortcuts",
|
|
2777
|
-
"type": {
|
|
2778
|
-
"text": "ShortcutController"
|
|
2779
|
-
},
|
|
2780
|
-
"privacy": "private",
|
|
2781
|
-
"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 )"
|
|
2782
|
-
},
|
|
2783
|
-
{
|
|
2784
|
-
"kind": "field",
|
|
2785
|
-
"name": "commandShortcuts",
|
|
2786
|
-
"type": {
|
|
2787
|
-
"text": "ShortcutController"
|
|
2788
|
-
},
|
|
2789
|
-
"privacy": "private",
|
|
2790
|
-
"default": "new ShortcutController(host)"
|
|
2791
|
-
},
|
|
2792
|
-
{
|
|
2793
|
-
"kind": "method",
|
|
2794
|
-
"name": "registerCommandShortcuts"
|
|
2795
|
-
}
|
|
2796
|
-
]
|
|
2797
|
-
}
|
|
2798
|
-
],
|
|
2799
|
-
"exports": [
|
|
2800
|
-
{
|
|
2801
|
-
"kind": "js",
|
|
2802
|
-
"name": "KeyboardController",
|
|
2803
|
-
"declaration": {
|
|
2804
|
-
"name": "KeyboardController",
|
|
2805
|
-
"module": "src/command-menu/KeyboardController.ts"
|
|
2806
|
-
}
|
|
2807
|
-
}
|
|
2808
|
-
],
|
|
2809
|
-
"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"
|
|
2810
|
-
},
|
|
2811
|
-
{
|
|
2812
|
-
"kind": "javascript-module",
|
|
2813
|
-
"path": "src/command-menu/SelectEvent.ts",
|
|
2814
|
-
"declarations": [
|
|
2815
|
-
{
|
|
2816
|
-
"kind": "class",
|
|
2817
|
-
"description": "",
|
|
2818
|
-
"name": "SelectEvent",
|
|
2819
|
-
"members": [
|
|
2820
|
-
{
|
|
2821
|
-
"kind": "field",
|
|
2822
|
-
"name": "eventName",
|
|
2823
|
-
"type": {
|
|
2824
|
-
"text": "string"
|
|
2825
|
-
},
|
|
2826
|
-
"static": true,
|
|
2827
|
-
"default": "\"nord-select\""
|
|
2828
|
-
}
|
|
2829
|
-
],
|
|
2830
|
-
"superclass": {
|
|
2831
|
-
"name": "NordEvent",
|
|
2832
|
-
"module": "/src/common/events.js"
|
|
2833
|
-
}
|
|
2834
|
-
}
|
|
2835
|
-
],
|
|
2836
|
-
"exports": [
|
|
2837
|
-
{
|
|
2838
|
-
"kind": "js",
|
|
2839
|
-
"name": "SelectEvent",
|
|
2840
|
-
"declaration": {
|
|
2841
|
-
"name": "SelectEvent",
|
|
2842
|
-
"module": "src/command-menu/SelectEvent.ts"
|
|
2843
|
-
}
|
|
2844
|
-
}
|
|
2845
|
-
],
|
|
2846
|
-
"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"
|
|
2847
|
-
},
|
|
2848
|
-
{
|
|
2849
|
-
"kind": "javascript-module",
|
|
2850
|
-
"path": "src/command-menu/localization.ts",
|
|
2851
|
-
"declarations": [
|
|
2852
|
-
{
|
|
2853
|
-
"kind": "variable",
|
|
2854
|
-
"name": "commandMenuLocalization",
|
|
2855
|
-
"type": {
|
|
2856
|
-
"text": "object"
|
|
2857
|
-
},
|
|
2858
|
-
"default": "{\n instructions: \"Press 'Enter' to confirm your input or 'Escape' to cancel\",\n inputLabel: \"Type the name of a command to run.\",\n footerArrowKeys: \"Navigate\",\n footerEnterKey: \"Select\",\n footerEscapeKey: \"Esc to dismiss\",\n footerBackspaceKey: \"Move to parent\",\n noResults: (searchTerm: string) => `No results for “${searchTerm}”`,\n tip: \"Search tips: some search terms require exact match. Try typing the entire command name, or use a different word or phrase.\",\n}"
|
|
2859
|
-
}
|
|
2860
|
-
],
|
|
2861
|
-
"exports": [
|
|
2862
|
-
{
|
|
2863
|
-
"kind": "js",
|
|
2864
|
-
"name": "default",
|
|
2865
|
-
"declaration": {
|
|
2866
|
-
"name": "commandMenuLocalization",
|
|
2867
|
-
"module": "src/command-menu/localization.ts"
|
|
2868
|
-
}
|
|
2869
|
-
}
|
|
2870
|
-
],
|
|
2871
|
-
"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"
|
|
2872
|
-
},
|
|
2873
|
-
{
|
|
2874
|
-
"kind": "javascript-module",
|
|
2875
|
-
"path": "src/common/attribute.ts",
|
|
2876
|
-
"declarations": [
|
|
2877
|
-
{
|
|
2878
|
-
"kind": "function",
|
|
2879
|
-
"name": "add",
|
|
2880
|
-
"parameters": [
|
|
2881
|
-
{
|
|
2882
|
-
"name": "element",
|
|
2883
|
-
"type": {
|
|
2884
|
-
"text": "Element"
|
|
2885
|
-
}
|
|
2886
|
-
},
|
|
2887
|
-
{
|
|
2888
|
-
"name": "attr",
|
|
2889
|
-
"type": {
|
|
2890
|
-
"text": "string"
|
|
2891
|
-
}
|
|
2919
|
+
"text": "string"
|
|
2920
|
+
}
|
|
2892
2921
|
},
|
|
2893
2922
|
{
|
|
2894
2923
|
"name": "token",
|
|
@@ -10596,7 +10625,7 @@
|
|
|
10596
10625
|
"name": "Table",
|
|
10597
10626
|
"slots": [
|
|
10598
10627
|
{
|
|
10599
|
-
"description": "
|
|
10628
|
+
"description": "Default slot which holds the HTML `<table>` element.",
|
|
10600
10629
|
"name": ""
|
|
10601
10630
|
}
|
|
10602
10631
|
],
|
|
@@ -10612,6 +10641,28 @@
|
|
|
10612
10641
|
"attribute": "density",
|
|
10613
10642
|
"reflects": true
|
|
10614
10643
|
},
|
|
10644
|
+
{
|
|
10645
|
+
"kind": "field",
|
|
10646
|
+
"name": "scrollSnap",
|
|
10647
|
+
"type": {
|
|
10648
|
+
"text": "boolean"
|
|
10649
|
+
},
|
|
10650
|
+
"default": "false",
|
|
10651
|
+
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
10652
|
+
"attribute": "scroll-snap",
|
|
10653
|
+
"reflects": true
|
|
10654
|
+
},
|
|
10655
|
+
{
|
|
10656
|
+
"kind": "field",
|
|
10657
|
+
"name": "striped",
|
|
10658
|
+
"type": {
|
|
10659
|
+
"text": "boolean"
|
|
10660
|
+
},
|
|
10661
|
+
"default": "false",
|
|
10662
|
+
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
10663
|
+
"attribute": "striped",
|
|
10664
|
+
"reflects": true
|
|
10665
|
+
},
|
|
10615
10666
|
{
|
|
10616
10667
|
"kind": "method",
|
|
10617
10668
|
"name": "renderStyles",
|
|
@@ -10634,6 +10685,24 @@
|
|
|
10634
10685
|
"default": "\"default\"",
|
|
10635
10686
|
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
10636
10687
|
"fieldName": "density"
|
|
10688
|
+
},
|
|
10689
|
+
{
|
|
10690
|
+
"name": "scroll-snap",
|
|
10691
|
+
"type": {
|
|
10692
|
+
"text": "boolean"
|
|
10693
|
+
},
|
|
10694
|
+
"default": "false",
|
|
10695
|
+
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
10696
|
+
"fieldName": "scrollSnap"
|
|
10697
|
+
},
|
|
10698
|
+
{
|
|
10699
|
+
"name": "striped",
|
|
10700
|
+
"type": {
|
|
10701
|
+
"text": "boolean"
|
|
10702
|
+
},
|
|
10703
|
+
"default": "false",
|
|
10704
|
+
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
10705
|
+
"fieldName": "striped"
|
|
10637
10706
|
}
|
|
10638
10707
|
],
|
|
10639
10708
|
"superclass": {
|
|
@@ -10665,7 +10734,7 @@
|
|
|
10665
10734
|
}
|
|
10666
10735
|
}
|
|
10667
10736
|
],
|
|
10668
|
-
"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 when you need to display tabular data in a view.\n- Use a `<table>` element directly within the component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n"
|
|
10737
|
+
"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 when you need to display tabular data in a view.\n- Use a `<table>` element directly within the component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n- Don't use a primary button in every row of a table.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n"
|
|
10669
10738
|
},
|
|
10670
10739
|
{
|
|
10671
10740
|
"kind": "javascript-module",
|
|
@@ -13582,452 +13651,18 @@
|
|
|
13582
13651
|
},
|
|
13583
13652
|
{
|
|
13584
13653
|
"kind": "javascript-module",
|
|
13585
|
-
"path": "src/common/
|
|
13654
|
+
"path": "src/common/mixins/AutocompleteMixin.ts",
|
|
13586
13655
|
"declarations": [
|
|
13587
13656
|
{
|
|
13588
|
-
"kind": "
|
|
13589
|
-
"
|
|
13590
|
-
"
|
|
13591
|
-
|
|
13592
|
-
"text": "typeof value | typeof nothing"
|
|
13593
|
-
}
|
|
13594
|
-
},
|
|
13595
|
-
"parameters": [
|
|
13657
|
+
"kind": "class",
|
|
13658
|
+
"description": "",
|
|
13659
|
+
"name": "AutocompleteMixinInterface",
|
|
13660
|
+
"members": [
|
|
13596
13661
|
{
|
|
13597
|
-
"
|
|
13662
|
+
"kind": "field",
|
|
13663
|
+
"name": "autocomplete",
|
|
13598
13664
|
"type": {
|
|
13599
|
-
"text": "
|
|
13600
|
-
}
|
|
13601
|
-
}
|
|
13602
|
-
],
|
|
13603
|
-
"description": "if value is truthy, return it, otherwise return nothing"
|
|
13604
|
-
},
|
|
13605
|
-
{
|
|
13606
|
-
"kind": "function",
|
|
13607
|
-
"name": "cond",
|
|
13608
|
-
"return": {
|
|
13609
|
-
"type": {
|
|
13610
|
-
"text": "typeof trueCase | typeof nothing"
|
|
13611
|
-
}
|
|
13612
|
-
},
|
|
13613
|
-
"parameters": [
|
|
13614
|
-
{
|
|
13615
|
-
"name": "condition",
|
|
13616
|
-
"type": {
|
|
13617
|
-
"text": "unknown"
|
|
13618
|
-
}
|
|
13619
|
-
},
|
|
13620
|
-
{
|
|
13621
|
-
"name": "trueCase",
|
|
13622
|
-
"type": {
|
|
13623
|
-
"text": "any"
|
|
13624
|
-
}
|
|
13625
|
-
}
|
|
13626
|
-
],
|
|
13627
|
-
"description": "if condition is truthy, return trueCase, otherwise return nothing"
|
|
13628
|
-
},
|
|
13629
|
-
{
|
|
13630
|
-
"kind": "function",
|
|
13631
|
-
"name": "cond",
|
|
13632
|
-
"return": {
|
|
13633
|
-
"type": {
|
|
13634
|
-
"text": "typeof trueCase"
|
|
13635
|
-
}
|
|
13636
|
-
},
|
|
13637
|
-
"parameters": [
|
|
13638
|
-
{
|
|
13639
|
-
"name": "condition",
|
|
13640
|
-
"type": {
|
|
13641
|
-
"text": "true"
|
|
13642
|
-
}
|
|
13643
|
-
},
|
|
13644
|
-
{
|
|
13645
|
-
"name": "trueCase",
|
|
13646
|
-
"type": {
|
|
13647
|
-
"text": "any"
|
|
13648
|
-
}
|
|
13649
|
-
}
|
|
13650
|
-
],
|
|
13651
|
-
"description": "condition is true, so always return trueCase"
|
|
13652
|
-
},
|
|
13653
|
-
{
|
|
13654
|
-
"kind": "function",
|
|
13655
|
-
"name": "cond",
|
|
13656
|
-
"return": {
|
|
13657
|
-
"type": {
|
|
13658
|
-
"text": "typeof nothing"
|
|
13659
|
-
}
|
|
13660
|
-
},
|
|
13661
|
-
"parameters": [
|
|
13662
|
-
{
|
|
13663
|
-
"name": "condition",
|
|
13664
|
-
"type": {
|
|
13665
|
-
"text": "false"
|
|
13666
|
-
}
|
|
13667
|
-
},
|
|
13668
|
-
{
|
|
13669
|
-
"name": "trueCase",
|
|
13670
|
-
"type": {
|
|
13671
|
-
"text": "any"
|
|
13672
|
-
}
|
|
13673
|
-
}
|
|
13674
|
-
],
|
|
13675
|
-
"description": "condition is false, to will always return nothing"
|
|
13676
|
-
},
|
|
13677
|
-
{
|
|
13678
|
-
"kind": "function",
|
|
13679
|
-
"name": "cond",
|
|
13680
|
-
"return": {
|
|
13681
|
-
"type": {
|
|
13682
|
-
"text": "typeof trueCase | typeof falseCase"
|
|
13683
|
-
}
|
|
13684
|
-
},
|
|
13685
|
-
"parameters": [
|
|
13686
|
-
{
|
|
13687
|
-
"name": "condition",
|
|
13688
|
-
"type": {
|
|
13689
|
-
"text": "unknown"
|
|
13690
|
-
}
|
|
13691
|
-
},
|
|
13692
|
-
{
|
|
13693
|
-
"name": "trueCase",
|
|
13694
|
-
"type": {
|
|
13695
|
-
"text": "any"
|
|
13696
|
-
}
|
|
13697
|
-
},
|
|
13698
|
-
{
|
|
13699
|
-
"name": "falseCase",
|
|
13700
|
-
"type": {
|
|
13701
|
-
"text": "any"
|
|
13702
|
-
}
|
|
13703
|
-
}
|
|
13704
|
-
],
|
|
13705
|
-
"description": "if condition is truthy, return trueCase, otherwise return falseCase"
|
|
13706
|
-
},
|
|
13707
|
-
{
|
|
13708
|
-
"kind": "function",
|
|
13709
|
-
"name": "cond",
|
|
13710
|
-
"return": {
|
|
13711
|
-
"type": {
|
|
13712
|
-
"text": "typeof trueCase"
|
|
13713
|
-
}
|
|
13714
|
-
},
|
|
13715
|
-
"parameters": [
|
|
13716
|
-
{
|
|
13717
|
-
"name": "condition",
|
|
13718
|
-
"type": {
|
|
13719
|
-
"text": "true"
|
|
13720
|
-
}
|
|
13721
|
-
},
|
|
13722
|
-
{
|
|
13723
|
-
"name": "trueCase",
|
|
13724
|
-
"type": {
|
|
13725
|
-
"text": "any"
|
|
13726
|
-
}
|
|
13727
|
-
},
|
|
13728
|
-
{
|
|
13729
|
-
"name": "falseCase",
|
|
13730
|
-
"type": {
|
|
13731
|
-
"text": "any"
|
|
13732
|
-
}
|
|
13733
|
-
}
|
|
13734
|
-
],
|
|
13735
|
-
"description": "condition is true, so always return trueCase"
|
|
13736
|
-
},
|
|
13737
|
-
{
|
|
13738
|
-
"kind": "function",
|
|
13739
|
-
"name": "cond",
|
|
13740
|
-
"return": {
|
|
13741
|
-
"type": {
|
|
13742
|
-
"text": "typeof falseCase"
|
|
13743
|
-
}
|
|
13744
|
-
},
|
|
13745
|
-
"parameters": [
|
|
13746
|
-
{
|
|
13747
|
-
"name": "condition",
|
|
13748
|
-
"type": {
|
|
13749
|
-
"text": "false"
|
|
13750
|
-
}
|
|
13751
|
-
},
|
|
13752
|
-
{
|
|
13753
|
-
"name": "trueCase",
|
|
13754
|
-
"type": {
|
|
13755
|
-
"text": "any"
|
|
13756
|
-
}
|
|
13757
|
-
},
|
|
13758
|
-
{
|
|
13759
|
-
"name": "falseCase",
|
|
13760
|
-
"type": {
|
|
13761
|
-
"text": "any"
|
|
13762
|
-
}
|
|
13763
|
-
}
|
|
13764
|
-
],
|
|
13765
|
-
"description": "condition is false, so always return falseCase"
|
|
13766
|
-
},
|
|
13767
|
-
{
|
|
13768
|
-
"kind": "function",
|
|
13769
|
-
"name": "cond",
|
|
13770
|
-
"parameters": [
|
|
13771
|
-
{
|
|
13772
|
-
"name": "condition",
|
|
13773
|
-
"type": {
|
|
13774
|
-
"text": "unknown"
|
|
13775
|
-
}
|
|
13776
|
-
},
|
|
13777
|
-
{
|
|
13778
|
-
"name": "trueCase",
|
|
13779
|
-
"default": "condition",
|
|
13780
|
-
"type": {
|
|
13781
|
-
"text": "any"
|
|
13782
|
-
}
|
|
13783
|
-
},
|
|
13784
|
-
{
|
|
13785
|
-
"name": "falseCase",
|
|
13786
|
-
"default": "nothing",
|
|
13787
|
-
"type": {
|
|
13788
|
-
"text": "any"
|
|
13789
|
-
}
|
|
13790
|
-
}
|
|
13791
|
-
]
|
|
13792
|
-
}
|
|
13793
|
-
],
|
|
13794
|
-
"exports": [
|
|
13795
|
-
{
|
|
13796
|
-
"kind": "js",
|
|
13797
|
-
"name": "cond",
|
|
13798
|
-
"declaration": {
|
|
13799
|
-
"name": "cond",
|
|
13800
|
-
"module": "src/common/directives/cond.ts"
|
|
13801
|
-
}
|
|
13802
|
-
},
|
|
13803
|
-
{
|
|
13804
|
-
"kind": "js",
|
|
13805
|
-
"name": "cond",
|
|
13806
|
-
"declaration": {
|
|
13807
|
-
"name": "cond",
|
|
13808
|
-
"module": "src/common/directives/cond.ts"
|
|
13809
|
-
}
|
|
13810
|
-
},
|
|
13811
|
-
{
|
|
13812
|
-
"kind": "js",
|
|
13813
|
-
"name": "cond",
|
|
13814
|
-
"declaration": {
|
|
13815
|
-
"name": "cond",
|
|
13816
|
-
"module": "src/common/directives/cond.ts"
|
|
13817
|
-
}
|
|
13818
|
-
},
|
|
13819
|
-
{
|
|
13820
|
-
"kind": "js",
|
|
13821
|
-
"name": "cond",
|
|
13822
|
-
"declaration": {
|
|
13823
|
-
"name": "cond",
|
|
13824
|
-
"module": "src/common/directives/cond.ts"
|
|
13825
|
-
}
|
|
13826
|
-
},
|
|
13827
|
-
{
|
|
13828
|
-
"kind": "js",
|
|
13829
|
-
"name": "cond",
|
|
13830
|
-
"declaration": {
|
|
13831
|
-
"name": "cond",
|
|
13832
|
-
"module": "src/common/directives/cond.ts"
|
|
13833
|
-
}
|
|
13834
|
-
},
|
|
13835
|
-
{
|
|
13836
|
-
"kind": "js",
|
|
13837
|
-
"name": "cond",
|
|
13838
|
-
"declaration": {
|
|
13839
|
-
"name": "cond",
|
|
13840
|
-
"module": "src/common/directives/cond.ts"
|
|
13841
|
-
}
|
|
13842
|
-
},
|
|
13843
|
-
{
|
|
13844
|
-
"kind": "js",
|
|
13845
|
-
"name": "cond",
|
|
13846
|
-
"declaration": {
|
|
13847
|
-
"name": "cond",
|
|
13848
|
-
"module": "src/common/directives/cond.ts"
|
|
13849
|
-
}
|
|
13850
|
-
},
|
|
13851
|
-
{
|
|
13852
|
-
"kind": "js",
|
|
13853
|
-
"name": "cond",
|
|
13854
|
-
"declaration": {
|
|
13855
|
-
"name": "cond",
|
|
13856
|
-
"module": "src/common/directives/cond.ts"
|
|
13857
|
-
}
|
|
13858
|
-
}
|
|
13859
|
-
]
|
|
13860
|
-
},
|
|
13861
|
-
{
|
|
13862
|
-
"kind": "javascript-module",
|
|
13863
|
-
"path": "src/common/directives/wrapIf.ts",
|
|
13864
|
-
"declarations": [
|
|
13865
|
-
{
|
|
13866
|
-
"kind": "function",
|
|
13867
|
-
"name": "wrapIf",
|
|
13868
|
-
"return": {
|
|
13869
|
-
"type": {
|
|
13870
|
-
"text": "TInner"
|
|
13871
|
-
}
|
|
13872
|
-
},
|
|
13873
|
-
"parameters": [
|
|
13874
|
-
{
|
|
13875
|
-
"name": "condition",
|
|
13876
|
-
"type": {
|
|
13877
|
-
"text": "false"
|
|
13878
|
-
}
|
|
13879
|
-
},
|
|
13880
|
-
{
|
|
13881
|
-
"name": "inner",
|
|
13882
|
-
"type": {
|
|
13883
|
-
"text": "() => TInner"
|
|
13884
|
-
}
|
|
13885
|
-
},
|
|
13886
|
-
{
|
|
13887
|
-
"name": "wrapper",
|
|
13888
|
-
"type": {
|
|
13889
|
-
"text": "(inner: TInner) => TWrapper"
|
|
13890
|
-
}
|
|
13891
|
-
}
|
|
13892
|
-
]
|
|
13893
|
-
},
|
|
13894
|
-
{
|
|
13895
|
-
"kind": "function",
|
|
13896
|
-
"name": "wrapIf",
|
|
13897
|
-
"return": {
|
|
13898
|
-
"type": {
|
|
13899
|
-
"text": "TWrapper"
|
|
13900
|
-
}
|
|
13901
|
-
},
|
|
13902
|
-
"parameters": [
|
|
13903
|
-
{
|
|
13904
|
-
"name": "condition",
|
|
13905
|
-
"type": {
|
|
13906
|
-
"text": "true"
|
|
13907
|
-
}
|
|
13908
|
-
},
|
|
13909
|
-
{
|
|
13910
|
-
"name": "inner",
|
|
13911
|
-
"type": {
|
|
13912
|
-
"text": "() => TInner"
|
|
13913
|
-
}
|
|
13914
|
-
},
|
|
13915
|
-
{
|
|
13916
|
-
"name": "wrapper",
|
|
13917
|
-
"type": {
|
|
13918
|
-
"text": "(inner: TInner) => TWrapper"
|
|
13919
|
-
}
|
|
13920
|
-
}
|
|
13921
|
-
]
|
|
13922
|
-
},
|
|
13923
|
-
{
|
|
13924
|
-
"kind": "function",
|
|
13925
|
-
"name": "wrapIf",
|
|
13926
|
-
"return": {
|
|
13927
|
-
"type": {
|
|
13928
|
-
"text": "TInner | TWrapper"
|
|
13929
|
-
}
|
|
13930
|
-
},
|
|
13931
|
-
"parameters": [
|
|
13932
|
-
{
|
|
13933
|
-
"name": "condition",
|
|
13934
|
-
"type": {
|
|
13935
|
-
"text": "unknown"
|
|
13936
|
-
}
|
|
13937
|
-
},
|
|
13938
|
-
{
|
|
13939
|
-
"name": "inner",
|
|
13940
|
-
"type": {
|
|
13941
|
-
"text": "() => TInner"
|
|
13942
|
-
}
|
|
13943
|
-
},
|
|
13944
|
-
{
|
|
13945
|
-
"name": "wrapper",
|
|
13946
|
-
"type": {
|
|
13947
|
-
"text": "(inner: TInner) => TWrapper"
|
|
13948
|
-
}
|
|
13949
|
-
}
|
|
13950
|
-
]
|
|
13951
|
-
},
|
|
13952
|
-
{
|
|
13953
|
-
"kind": "function",
|
|
13954
|
-
"name": "wrapIf",
|
|
13955
|
-
"parameters": [
|
|
13956
|
-
{
|
|
13957
|
-
"name": "condition",
|
|
13958
|
-
"type": {
|
|
13959
|
-
"text": "any"
|
|
13960
|
-
}
|
|
13961
|
-
},
|
|
13962
|
-
{
|
|
13963
|
-
"name": "inner",
|
|
13964
|
-
"type": {
|
|
13965
|
-
"text": "() => TInner"
|
|
13966
|
-
}
|
|
13967
|
-
},
|
|
13968
|
-
{
|
|
13969
|
-
"name": "wrapper",
|
|
13970
|
-
"type": {
|
|
13971
|
-
"text": "(innards: TInner) => TWrapper"
|
|
13972
|
-
}
|
|
13973
|
-
}
|
|
13974
|
-
],
|
|
13975
|
-
"return": {
|
|
13976
|
-
"type": {
|
|
13977
|
-
"text": ""
|
|
13978
|
-
}
|
|
13979
|
-
}
|
|
13980
|
-
}
|
|
13981
|
-
],
|
|
13982
|
-
"exports": [
|
|
13983
|
-
{
|
|
13984
|
-
"kind": "js",
|
|
13985
|
-
"name": "wrapIf",
|
|
13986
|
-
"declaration": {
|
|
13987
|
-
"name": "wrapIf",
|
|
13988
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
13989
|
-
}
|
|
13990
|
-
},
|
|
13991
|
-
{
|
|
13992
|
-
"kind": "js",
|
|
13993
|
-
"name": "wrapIf",
|
|
13994
|
-
"declaration": {
|
|
13995
|
-
"name": "wrapIf",
|
|
13996
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
13997
|
-
}
|
|
13998
|
-
},
|
|
13999
|
-
{
|
|
14000
|
-
"kind": "js",
|
|
14001
|
-
"name": "wrapIf",
|
|
14002
|
-
"declaration": {
|
|
14003
|
-
"name": "wrapIf",
|
|
14004
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
14005
|
-
}
|
|
14006
|
-
},
|
|
14007
|
-
{
|
|
14008
|
-
"kind": "js",
|
|
14009
|
-
"name": "wrapIf",
|
|
14010
|
-
"declaration": {
|
|
14011
|
-
"name": "wrapIf",
|
|
14012
|
-
"module": "src/common/directives/wrapIf.ts"
|
|
14013
|
-
}
|
|
14014
|
-
}
|
|
14015
|
-
]
|
|
14016
|
-
},
|
|
14017
|
-
{
|
|
14018
|
-
"kind": "javascript-module",
|
|
14019
|
-
"path": "src/common/mixins/AutocompleteMixin.ts",
|
|
14020
|
-
"declarations": [
|
|
14021
|
-
{
|
|
14022
|
-
"kind": "class",
|
|
14023
|
-
"description": "",
|
|
14024
|
-
"name": "AutocompleteMixinInterface",
|
|
14025
|
-
"members": [
|
|
14026
|
-
{
|
|
14027
|
-
"kind": "field",
|
|
14028
|
-
"name": "autocomplete",
|
|
14029
|
-
"type": {
|
|
14030
|
-
"text": "AutocompleteAttribute"
|
|
13665
|
+
"text": "AutocompleteAttribute"
|
|
14031
13666
|
}
|
|
14032
13667
|
}
|
|
14033
13668
|
]
|
|
@@ -14256,56 +13891,248 @@
|
|
|
14256
13891
|
{
|
|
14257
13892
|
"kind": "class",
|
|
14258
13893
|
"description": "",
|
|
14259
|
-
"name": "FormAssociatedMixinInterface",
|
|
13894
|
+
"name": "FormAssociatedMixinInterface",
|
|
13895
|
+
"members": [
|
|
13896
|
+
{
|
|
13897
|
+
"kind": "field",
|
|
13898
|
+
"name": "label",
|
|
13899
|
+
"type": {
|
|
13900
|
+
"text": "string"
|
|
13901
|
+
}
|
|
13902
|
+
},
|
|
13903
|
+
{
|
|
13904
|
+
"kind": "field",
|
|
13905
|
+
"name": "required",
|
|
13906
|
+
"type": {
|
|
13907
|
+
"text": "boolean"
|
|
13908
|
+
}
|
|
13909
|
+
},
|
|
13910
|
+
{
|
|
13911
|
+
"kind": "field",
|
|
13912
|
+
"name": "hint",
|
|
13913
|
+
"type": {
|
|
13914
|
+
"text": "string | undefined"
|
|
13915
|
+
}
|
|
13916
|
+
},
|
|
13917
|
+
{
|
|
13918
|
+
"kind": "field",
|
|
13919
|
+
"name": "hideLabel",
|
|
13920
|
+
"type": {
|
|
13921
|
+
"text": "boolean"
|
|
13922
|
+
}
|
|
13923
|
+
},
|
|
13924
|
+
{
|
|
13925
|
+
"kind": "field",
|
|
13926
|
+
"name": "placeholder",
|
|
13927
|
+
"type": {
|
|
13928
|
+
"text": "string | undefined"
|
|
13929
|
+
}
|
|
13930
|
+
},
|
|
13931
|
+
{
|
|
13932
|
+
"kind": "field",
|
|
13933
|
+
"name": "error",
|
|
13934
|
+
"type": {
|
|
13935
|
+
"text": "string | undefined"
|
|
13936
|
+
}
|
|
13937
|
+
},
|
|
13938
|
+
{
|
|
13939
|
+
"kind": "field",
|
|
13940
|
+
"name": "expand",
|
|
13941
|
+
"type": {
|
|
13942
|
+
"text": "boolean"
|
|
13943
|
+
}
|
|
13944
|
+
},
|
|
13945
|
+
{
|
|
13946
|
+
"kind": "field",
|
|
13947
|
+
"name": "inputId",
|
|
13948
|
+
"type": {
|
|
13949
|
+
"text": "string"
|
|
13950
|
+
},
|
|
13951
|
+
"privacy": "protected"
|
|
13952
|
+
},
|
|
13953
|
+
{
|
|
13954
|
+
"kind": "field",
|
|
13955
|
+
"name": "errorId",
|
|
13956
|
+
"type": {
|
|
13957
|
+
"text": "string"
|
|
13958
|
+
},
|
|
13959
|
+
"privacy": "protected"
|
|
13960
|
+
},
|
|
13961
|
+
{
|
|
13962
|
+
"kind": "field",
|
|
13963
|
+
"name": "hintId",
|
|
13964
|
+
"type": {
|
|
13965
|
+
"text": "string"
|
|
13966
|
+
},
|
|
13967
|
+
"privacy": "protected"
|
|
13968
|
+
},
|
|
13969
|
+
{
|
|
13970
|
+
"kind": "field",
|
|
13971
|
+
"name": "labelSlot",
|
|
13972
|
+
"type": {
|
|
13973
|
+
"text": "SlotController"
|
|
13974
|
+
},
|
|
13975
|
+
"privacy": "protected"
|
|
13976
|
+
},
|
|
13977
|
+
{
|
|
13978
|
+
"kind": "field",
|
|
13979
|
+
"name": "hintSlot",
|
|
13980
|
+
"type": {
|
|
13981
|
+
"text": "SlotController"
|
|
13982
|
+
},
|
|
13983
|
+
"privacy": "protected"
|
|
13984
|
+
},
|
|
13985
|
+
{
|
|
13986
|
+
"kind": "field",
|
|
13987
|
+
"name": "errorSlot",
|
|
13988
|
+
"type": {
|
|
13989
|
+
"text": "SlotController"
|
|
13990
|
+
},
|
|
13991
|
+
"privacy": "protected"
|
|
13992
|
+
},
|
|
13993
|
+
{
|
|
13994
|
+
"kind": "field",
|
|
13995
|
+
"name": "formData",
|
|
13996
|
+
"type": {
|
|
13997
|
+
"text": "FormDataController"
|
|
13998
|
+
},
|
|
13999
|
+
"privacy": "protected"
|
|
14000
|
+
},
|
|
14001
|
+
{
|
|
14002
|
+
"kind": "field",
|
|
14003
|
+
"name": "formValue",
|
|
14004
|
+
"type": {
|
|
14005
|
+
"text": "string | undefined"
|
|
14006
|
+
},
|
|
14007
|
+
"privacy": "protected"
|
|
14008
|
+
},
|
|
14009
|
+
{
|
|
14010
|
+
"kind": "field",
|
|
14011
|
+
"name": "hasError",
|
|
14012
|
+
"type": {
|
|
14013
|
+
"text": "boolean"
|
|
14014
|
+
},
|
|
14015
|
+
"privacy": "protected"
|
|
14016
|
+
},
|
|
14017
|
+
{
|
|
14018
|
+
"kind": "field",
|
|
14019
|
+
"name": "hasHint",
|
|
14020
|
+
"type": {
|
|
14021
|
+
"text": "boolean"
|
|
14022
|
+
},
|
|
14023
|
+
"privacy": "protected"
|
|
14024
|
+
},
|
|
14025
|
+
{
|
|
14026
|
+
"kind": "method",
|
|
14027
|
+
"name": "handleChange",
|
|
14028
|
+
"privacy": "protected",
|
|
14029
|
+
"return": {
|
|
14030
|
+
"type": {
|
|
14031
|
+
"text": "void"
|
|
14032
|
+
}
|
|
14033
|
+
},
|
|
14034
|
+
"parameters": [
|
|
14035
|
+
{
|
|
14036
|
+
"name": "e",
|
|
14037
|
+
"type": {
|
|
14038
|
+
"text": "Event"
|
|
14039
|
+
}
|
|
14040
|
+
}
|
|
14041
|
+
]
|
|
14042
|
+
},
|
|
14043
|
+
{
|
|
14044
|
+
"kind": "method",
|
|
14045
|
+
"name": "handleInput",
|
|
14046
|
+
"privacy": "protected",
|
|
14047
|
+
"return": {
|
|
14048
|
+
"type": {
|
|
14049
|
+
"text": "void"
|
|
14050
|
+
}
|
|
14051
|
+
},
|
|
14052
|
+
"parameters": [
|
|
14053
|
+
{
|
|
14054
|
+
"name": "e",
|
|
14055
|
+
"type": {
|
|
14056
|
+
"text": "Event"
|
|
14057
|
+
}
|
|
14058
|
+
}
|
|
14059
|
+
]
|
|
14060
|
+
},
|
|
14061
|
+
{
|
|
14062
|
+
"kind": "method",
|
|
14063
|
+
"name": "renderLabel",
|
|
14064
|
+
"privacy": "protected",
|
|
14065
|
+
"return": {
|
|
14066
|
+
"type": {
|
|
14067
|
+
"text": "TemplateResult"
|
|
14068
|
+
}
|
|
14069
|
+
}
|
|
14070
|
+
},
|
|
14071
|
+
{
|
|
14072
|
+
"kind": "method",
|
|
14073
|
+
"name": "renderError",
|
|
14074
|
+
"privacy": "protected",
|
|
14075
|
+
"return": {
|
|
14076
|
+
"type": {
|
|
14077
|
+
"text": "TemplateResult"
|
|
14078
|
+
}
|
|
14079
|
+
}
|
|
14080
|
+
},
|
|
14081
|
+
{
|
|
14082
|
+
"kind": "method",
|
|
14083
|
+
"name": "getDescribedBy",
|
|
14084
|
+
"privacy": "protected",
|
|
14085
|
+
"return": {
|
|
14086
|
+
"type": {
|
|
14087
|
+
"text": "string | undefined"
|
|
14088
|
+
}
|
|
14089
|
+
}
|
|
14090
|
+
},
|
|
14091
|
+
{
|
|
14092
|
+
"kind": "method",
|
|
14093
|
+
"name": "getInvalid",
|
|
14094
|
+
"privacy": "protected",
|
|
14095
|
+
"return": {
|
|
14096
|
+
"type": {
|
|
14097
|
+
"text": "\"true\" | undefined"
|
|
14098
|
+
}
|
|
14099
|
+
}
|
|
14100
|
+
}
|
|
14101
|
+
]
|
|
14102
|
+
},
|
|
14103
|
+
{
|
|
14104
|
+
"kind": "mixin",
|
|
14105
|
+
"description": "",
|
|
14106
|
+
"name": "FormAssociatedMixin",
|
|
14260
14107
|
"members": [
|
|
14261
14108
|
{
|
|
14262
14109
|
"kind": "field",
|
|
14263
|
-
"name": "
|
|
14264
|
-
"
|
|
14265
|
-
|
|
14266
|
-
}
|
|
14267
|
-
},
|
|
14268
|
-
{
|
|
14269
|
-
"kind": "field",
|
|
14270
|
-
"name": "required",
|
|
14271
|
-
"type": {
|
|
14272
|
-
"text": "boolean"
|
|
14273
|
-
}
|
|
14274
|
-
},
|
|
14275
|
-
{
|
|
14276
|
-
"kind": "field",
|
|
14277
|
-
"name": "hint",
|
|
14278
|
-
"type": {
|
|
14279
|
-
"text": "string | undefined"
|
|
14280
|
-
}
|
|
14110
|
+
"name": "labelSlot",
|
|
14111
|
+
"privacy": "protected",
|
|
14112
|
+
"default": "new SlotController(this, \"label\")"
|
|
14281
14113
|
},
|
|
14282
14114
|
{
|
|
14283
14115
|
"kind": "field",
|
|
14284
|
-
"name": "
|
|
14285
|
-
"
|
|
14286
|
-
|
|
14287
|
-
}
|
|
14116
|
+
"name": "errorSlot",
|
|
14117
|
+
"privacy": "protected",
|
|
14118
|
+
"default": "new SlotController(this, \"error\")"
|
|
14288
14119
|
},
|
|
14289
14120
|
{
|
|
14290
14121
|
"kind": "field",
|
|
14291
|
-
"name": "
|
|
14292
|
-
"
|
|
14293
|
-
|
|
14294
|
-
}
|
|
14122
|
+
"name": "hintSlot",
|
|
14123
|
+
"privacy": "protected",
|
|
14124
|
+
"default": "new SlotController(this, \"hint\")"
|
|
14295
14125
|
},
|
|
14296
14126
|
{
|
|
14297
14127
|
"kind": "field",
|
|
14298
|
-
"name": "
|
|
14299
|
-
"
|
|
14300
|
-
|
|
14301
|
-
}
|
|
14128
|
+
"name": "formData",
|
|
14129
|
+
"privacy": "protected",
|
|
14130
|
+
"default": "new FormDataController(this, { value: () => this.formValue })"
|
|
14302
14131
|
},
|
|
14303
14132
|
{
|
|
14304
14133
|
"kind": "field",
|
|
14305
|
-
"name": "
|
|
14306
|
-
"
|
|
14307
|
-
"text": "boolean"
|
|
14308
|
-
}
|
|
14134
|
+
"name": "formValue",
|
|
14135
|
+
"privacy": "protected"
|
|
14309
14136
|
},
|
|
14310
14137
|
{
|
|
14311
14138
|
"kind": "field",
|
|
@@ -14313,7 +14140,8 @@
|
|
|
14313
14140
|
"type": {
|
|
14314
14141
|
"text": "string"
|
|
14315
14142
|
},
|
|
14316
|
-
"privacy": "protected"
|
|
14143
|
+
"privacy": "protected",
|
|
14144
|
+
"default": "\"input\""
|
|
14317
14145
|
},
|
|
14318
14146
|
{
|
|
14319
14147
|
"kind": "field",
|
|
@@ -14321,7 +14149,8 @@
|
|
|
14321
14149
|
"type": {
|
|
14322
14150
|
"text": "string"
|
|
14323
14151
|
},
|
|
14324
|
-
"privacy": "protected"
|
|
14152
|
+
"privacy": "protected",
|
|
14153
|
+
"default": "\"error\""
|
|
14325
14154
|
},
|
|
14326
14155
|
{
|
|
14327
14156
|
"kind": "field",
|
|
@@ -14329,73 +14158,70 @@
|
|
|
14329
14158
|
"type": {
|
|
14330
14159
|
"text": "string"
|
|
14331
14160
|
},
|
|
14332
|
-
"privacy": "protected"
|
|
14333
|
-
|
|
14334
|
-
{
|
|
14335
|
-
"kind": "field",
|
|
14336
|
-
"name": "labelSlot",
|
|
14337
|
-
"type": {
|
|
14338
|
-
"text": "SlotController"
|
|
14339
|
-
},
|
|
14340
|
-
"privacy": "protected"
|
|
14161
|
+
"privacy": "protected",
|
|
14162
|
+
"default": "\"hint\""
|
|
14341
14163
|
},
|
|
14342
14164
|
{
|
|
14343
14165
|
"kind": "field",
|
|
14344
|
-
"name": "
|
|
14166
|
+
"name": "label",
|
|
14345
14167
|
"type": {
|
|
14346
|
-
"text": "
|
|
14168
|
+
"text": "string"
|
|
14347
14169
|
},
|
|
14348
|
-
"
|
|
14170
|
+
"default": "\"\"",
|
|
14171
|
+
"description": "Label for the input.",
|
|
14172
|
+
"attribute": "label"
|
|
14349
14173
|
},
|
|
14350
14174
|
{
|
|
14351
14175
|
"kind": "field",
|
|
14352
|
-
"name": "
|
|
14176
|
+
"name": "hint",
|
|
14353
14177
|
"type": {
|
|
14354
|
-
"text": "
|
|
14178
|
+
"text": "string | undefined"
|
|
14355
14179
|
},
|
|
14356
|
-
"
|
|
14180
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
14181
|
+
"attribute": "hint"
|
|
14357
14182
|
},
|
|
14358
14183
|
{
|
|
14359
14184
|
"kind": "field",
|
|
14360
|
-
"name": "
|
|
14185
|
+
"name": "hideLabel",
|
|
14361
14186
|
"type": {
|
|
14362
|
-
"text": "
|
|
14187
|
+
"text": "boolean"
|
|
14363
14188
|
},
|
|
14364
|
-
"
|
|
14189
|
+
"default": "false",
|
|
14190
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
14191
|
+
"attribute": "hide-label"
|
|
14365
14192
|
},
|
|
14366
14193
|
{
|
|
14367
14194
|
"kind": "field",
|
|
14368
|
-
"name": "
|
|
14195
|
+
"name": "placeholder",
|
|
14369
14196
|
"type": {
|
|
14370
14197
|
"text": "string | undefined"
|
|
14371
14198
|
},
|
|
14372
|
-
"
|
|
14199
|
+
"description": "Placeholder text to display within the input.",
|
|
14200
|
+
"attribute": "placeholder"
|
|
14373
14201
|
},
|
|
14374
14202
|
{
|
|
14375
14203
|
"kind": "field",
|
|
14376
|
-
"name": "
|
|
14204
|
+
"name": "error",
|
|
14377
14205
|
"type": {
|
|
14378
|
-
"text": "
|
|
14206
|
+
"text": "string | undefined"
|
|
14379
14207
|
},
|
|
14380
|
-
"
|
|
14208
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
14209
|
+
"attribute": "error"
|
|
14381
14210
|
},
|
|
14382
14211
|
{
|
|
14383
14212
|
"kind": "field",
|
|
14384
|
-
"name": "
|
|
14213
|
+
"name": "required",
|
|
14385
14214
|
"type": {
|
|
14386
14215
|
"text": "boolean"
|
|
14387
14216
|
},
|
|
14388
|
-
"
|
|
14217
|
+
"default": "false",
|
|
14218
|
+
"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.",
|
|
14219
|
+
"attribute": "required"
|
|
14389
14220
|
},
|
|
14390
14221
|
{
|
|
14391
14222
|
"kind": "method",
|
|
14392
|
-
"name": "
|
|
14223
|
+
"name": "handleInput",
|
|
14393
14224
|
"privacy": "protected",
|
|
14394
|
-
"return": {
|
|
14395
|
-
"type": {
|
|
14396
|
-
"text": "void"
|
|
14397
|
-
}
|
|
14398
|
-
},
|
|
14399
14225
|
"parameters": [
|
|
14400
14226
|
{
|
|
14401
14227
|
"name": "e",
|
|
@@ -14407,13 +14233,8 @@
|
|
|
14407
14233
|
},
|
|
14408
14234
|
{
|
|
14409
14235
|
"kind": "method",
|
|
14410
|
-
"name": "
|
|
14236
|
+
"name": "handleChange",
|
|
14411
14237
|
"privacy": "protected",
|
|
14412
|
-
"return": {
|
|
14413
|
-
"type": {
|
|
14414
|
-
"text": "void"
|
|
14415
|
-
}
|
|
14416
|
-
},
|
|
14417
14238
|
"parameters": [
|
|
14418
14239
|
{
|
|
14419
14240
|
"name": "e",
|
|
@@ -14426,294 +14247,550 @@
|
|
|
14426
14247
|
{
|
|
14427
14248
|
"kind": "method",
|
|
14428
14249
|
"name": "renderLabel",
|
|
14429
|
-
"privacy": "protected"
|
|
14430
|
-
"return": {
|
|
14431
|
-
"type": {
|
|
14432
|
-
"text": "TemplateResult"
|
|
14433
|
-
}
|
|
14434
|
-
}
|
|
14250
|
+
"privacy": "protected"
|
|
14435
14251
|
},
|
|
14436
14252
|
{
|
|
14437
14253
|
"kind": "method",
|
|
14438
14254
|
"name": "renderError",
|
|
14439
|
-
"privacy": "protected"
|
|
14440
|
-
"return": {
|
|
14441
|
-
"type": {
|
|
14442
|
-
"text": "TemplateResult"
|
|
14443
|
-
}
|
|
14444
|
-
}
|
|
14255
|
+
"privacy": "protected"
|
|
14445
14256
|
},
|
|
14446
14257
|
{
|
|
14447
14258
|
"kind": "method",
|
|
14448
14259
|
"name": "getDescribedBy",
|
|
14449
|
-
"privacy": "protected"
|
|
14450
|
-
"return": {
|
|
14451
|
-
"type": {
|
|
14452
|
-
"text": "string | undefined"
|
|
14453
|
-
}
|
|
14454
|
-
}
|
|
14260
|
+
"privacy": "protected"
|
|
14455
14261
|
},
|
|
14456
14262
|
{
|
|
14457
14263
|
"kind": "method",
|
|
14458
14264
|
"name": "getInvalid",
|
|
14459
|
-
"privacy": "protected"
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14265
|
+
"privacy": "protected"
|
|
14266
|
+
},
|
|
14267
|
+
{
|
|
14268
|
+
"kind": "field",
|
|
14269
|
+
"name": "hasHint",
|
|
14270
|
+
"privacy": "protected"
|
|
14271
|
+
},
|
|
14272
|
+
{
|
|
14273
|
+
"kind": "field",
|
|
14274
|
+
"name": "hasError",
|
|
14275
|
+
"privacy": "protected"
|
|
14276
|
+
}
|
|
14277
|
+
],
|
|
14278
|
+
"events": [
|
|
14279
|
+
{
|
|
14280
|
+
"name": "input",
|
|
14281
|
+
"type": {
|
|
14282
|
+
"text": "NordEvent"
|
|
14283
|
+
},
|
|
14284
|
+
"description": "Fired as the user types into the input."
|
|
14285
|
+
},
|
|
14286
|
+
{
|
|
14287
|
+
"name": "change",
|
|
14288
|
+
"type": {
|
|
14289
|
+
"text": "NordEvent"
|
|
14290
|
+
},
|
|
14291
|
+
"description": "Fired whenever the input's value is changed via user interaction."
|
|
14292
|
+
}
|
|
14293
|
+
],
|
|
14294
|
+
"attributes": [
|
|
14295
|
+
{
|
|
14296
|
+
"name": "label",
|
|
14297
|
+
"type": {
|
|
14298
|
+
"text": "string"
|
|
14299
|
+
},
|
|
14300
|
+
"default": "\"\"",
|
|
14301
|
+
"description": "Label for the input.",
|
|
14302
|
+
"fieldName": "label"
|
|
14303
|
+
},
|
|
14304
|
+
{
|
|
14305
|
+
"name": "hint",
|
|
14306
|
+
"type": {
|
|
14307
|
+
"text": "string | undefined"
|
|
14308
|
+
},
|
|
14309
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
14310
|
+
"fieldName": "hint"
|
|
14311
|
+
},
|
|
14312
|
+
{
|
|
14313
|
+
"name": "hide-label",
|
|
14314
|
+
"type": {
|
|
14315
|
+
"text": "boolean"
|
|
14316
|
+
},
|
|
14317
|
+
"default": "false",
|
|
14318
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
14319
|
+
"fieldName": "hideLabel"
|
|
14320
|
+
},
|
|
14321
|
+
{
|
|
14322
|
+
"name": "placeholder",
|
|
14323
|
+
"type": {
|
|
14324
|
+
"text": "string | undefined"
|
|
14325
|
+
},
|
|
14326
|
+
"description": "Placeholder text to display within the input.",
|
|
14327
|
+
"fieldName": "placeholder"
|
|
14328
|
+
},
|
|
14329
|
+
{
|
|
14330
|
+
"name": "error",
|
|
14331
|
+
"type": {
|
|
14332
|
+
"text": "string | undefined"
|
|
14333
|
+
},
|
|
14334
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
14335
|
+
"fieldName": "error"
|
|
14336
|
+
},
|
|
14337
|
+
{
|
|
14338
|
+
"name": "required",
|
|
14339
|
+
"type": {
|
|
14340
|
+
"text": "boolean"
|
|
14341
|
+
},
|
|
14342
|
+
"default": "false",
|
|
14343
|
+
"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.",
|
|
14344
|
+
"fieldName": "required"
|
|
14345
|
+
}
|
|
14346
|
+
],
|
|
14347
|
+
"parameters": [
|
|
14348
|
+
{
|
|
14349
|
+
"name": "superClass",
|
|
14350
|
+
"type": {
|
|
14351
|
+
"text": "T"
|
|
14464
14352
|
}
|
|
14465
14353
|
}
|
|
14466
14354
|
]
|
|
14355
|
+
}
|
|
14356
|
+
],
|
|
14357
|
+
"exports": [
|
|
14358
|
+
{
|
|
14359
|
+
"kind": "js",
|
|
14360
|
+
"name": "FormAssociatedMixinInterface",
|
|
14361
|
+
"declaration": {
|
|
14362
|
+
"name": "FormAssociatedMixinInterface",
|
|
14363
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
14364
|
+
}
|
|
14467
14365
|
},
|
|
14468
14366
|
{
|
|
14469
|
-
"kind": "
|
|
14367
|
+
"kind": "js",
|
|
14368
|
+
"name": "FormAssociatedMixin",
|
|
14369
|
+
"declaration": {
|
|
14370
|
+
"name": "FormAssociatedMixin",
|
|
14371
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
14372
|
+
}
|
|
14373
|
+
}
|
|
14374
|
+
]
|
|
14375
|
+
},
|
|
14376
|
+
{
|
|
14377
|
+
"kind": "javascript-module",
|
|
14378
|
+
"path": "src/common/mixins/InputMixin.ts",
|
|
14379
|
+
"declarations": [
|
|
14380
|
+
{
|
|
14381
|
+
"kind": "class",
|
|
14470
14382
|
"description": "",
|
|
14471
|
-
"name": "
|
|
14383
|
+
"name": "InputMixinInterface",
|
|
14472
14384
|
"members": [
|
|
14473
14385
|
{
|
|
14474
14386
|
"kind": "field",
|
|
14475
|
-
"name": "
|
|
14476
|
-
"
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
{
|
|
14480
|
-
"kind": "field",
|
|
14481
|
-
"name": "errorSlot",
|
|
14482
|
-
"privacy": "protected",
|
|
14483
|
-
"default": "new SlotController(this, \"error\")"
|
|
14484
|
-
},
|
|
14485
|
-
{
|
|
14486
|
-
"kind": "field",
|
|
14487
|
-
"name": "hintSlot",
|
|
14488
|
-
"privacy": "protected",
|
|
14489
|
-
"default": "new SlotController(this, \"hint\")"
|
|
14387
|
+
"name": "name",
|
|
14388
|
+
"type": {
|
|
14389
|
+
"text": "string | undefined"
|
|
14390
|
+
}
|
|
14490
14391
|
},
|
|
14491
14392
|
{
|
|
14492
14393
|
"kind": "field",
|
|
14493
|
-
"name": "
|
|
14494
|
-
"
|
|
14495
|
-
|
|
14394
|
+
"name": "value",
|
|
14395
|
+
"type": {
|
|
14396
|
+
"text": "string"
|
|
14397
|
+
}
|
|
14496
14398
|
},
|
|
14497
14399
|
{
|
|
14498
14400
|
"kind": "field",
|
|
14499
|
-
"name": "
|
|
14500
|
-
"
|
|
14401
|
+
"name": "disabled",
|
|
14402
|
+
"type": {
|
|
14403
|
+
"text": "boolean"
|
|
14404
|
+
}
|
|
14501
14405
|
},
|
|
14502
14406
|
{
|
|
14503
14407
|
"kind": "field",
|
|
14504
|
-
"name": "
|
|
14408
|
+
"name": "form",
|
|
14505
14409
|
"type": {
|
|
14506
|
-
"text": "
|
|
14507
|
-
}
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14410
|
+
"text": "HTMLFormElement | null"
|
|
14411
|
+
}
|
|
14412
|
+
}
|
|
14413
|
+
]
|
|
14414
|
+
},
|
|
14415
|
+
{
|
|
14416
|
+
"kind": "mixin",
|
|
14417
|
+
"description": "",
|
|
14418
|
+
"name": "InputMixin",
|
|
14419
|
+
"members": [
|
|
14511
14420
|
{
|
|
14512
14421
|
"kind": "field",
|
|
14513
|
-
"name": "
|
|
14422
|
+
"name": "disabled",
|
|
14514
14423
|
"type": {
|
|
14515
|
-
"text": "
|
|
14424
|
+
"text": "boolean"
|
|
14516
14425
|
},
|
|
14517
|
-
"
|
|
14518
|
-
"
|
|
14426
|
+
"default": "false",
|
|
14427
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
14428
|
+
"attribute": "disabled",
|
|
14429
|
+
"reflects": true
|
|
14519
14430
|
},
|
|
14520
14431
|
{
|
|
14521
14432
|
"kind": "field",
|
|
14522
|
-
"name": "
|
|
14433
|
+
"name": "name",
|
|
14523
14434
|
"type": {
|
|
14524
|
-
"text": "string"
|
|
14435
|
+
"text": "string | undefined"
|
|
14525
14436
|
},
|
|
14526
|
-
"
|
|
14527
|
-
"
|
|
14437
|
+
"description": "The name of the form component.",
|
|
14438
|
+
"attribute": "name"
|
|
14528
14439
|
},
|
|
14529
14440
|
{
|
|
14530
14441
|
"kind": "field",
|
|
14531
|
-
"name": "
|
|
14442
|
+
"name": "value",
|
|
14532
14443
|
"type": {
|
|
14533
14444
|
"text": "string"
|
|
14534
14445
|
},
|
|
14535
14446
|
"default": "\"\"",
|
|
14536
|
-
"description": "
|
|
14537
|
-
"attribute": "
|
|
14447
|
+
"description": "The value of the form component.",
|
|
14448
|
+
"attribute": "value"
|
|
14538
14449
|
},
|
|
14539
14450
|
{
|
|
14540
14451
|
"kind": "field",
|
|
14541
|
-
"name": "
|
|
14542
|
-
"
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
"attribute": "hint"
|
|
14547
|
-
},
|
|
14452
|
+
"name": "form",
|
|
14453
|
+
"description": "Gets the form, if any, associated with the form element."
|
|
14454
|
+
}
|
|
14455
|
+
],
|
|
14456
|
+
"attributes": [
|
|
14548
14457
|
{
|
|
14549
|
-
"
|
|
14550
|
-
"name": "hideLabel",
|
|
14458
|
+
"name": "disabled",
|
|
14551
14459
|
"type": {
|
|
14552
14460
|
"text": "boolean"
|
|
14553
14461
|
},
|
|
14554
14462
|
"default": "false",
|
|
14555
|
-
"description": "
|
|
14556
|
-
"
|
|
14463
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
14464
|
+
"fieldName": "disabled"
|
|
14557
14465
|
},
|
|
14558
14466
|
{
|
|
14559
|
-
"
|
|
14560
|
-
"name": "placeholder",
|
|
14467
|
+
"name": "name",
|
|
14561
14468
|
"type": {
|
|
14562
14469
|
"text": "string | undefined"
|
|
14563
14470
|
},
|
|
14564
|
-
"description": "
|
|
14565
|
-
"
|
|
14471
|
+
"description": "The name of the form component.",
|
|
14472
|
+
"fieldName": "name"
|
|
14566
14473
|
},
|
|
14567
14474
|
{
|
|
14568
|
-
"
|
|
14569
|
-
"name": "error",
|
|
14475
|
+
"name": "value",
|
|
14570
14476
|
"type": {
|
|
14571
|
-
"text": "string
|
|
14477
|
+
"text": "string"
|
|
14572
14478
|
},
|
|
14573
|
-
"
|
|
14574
|
-
"
|
|
14575
|
-
|
|
14479
|
+
"default": "\"\"",
|
|
14480
|
+
"description": "The value of the form component.",
|
|
14481
|
+
"fieldName": "value"
|
|
14482
|
+
}
|
|
14483
|
+
],
|
|
14484
|
+
"parameters": [
|
|
14485
|
+
{
|
|
14486
|
+
"name": "superClass",
|
|
14487
|
+
"type": {
|
|
14488
|
+
"text": "T"
|
|
14489
|
+
}
|
|
14490
|
+
}
|
|
14491
|
+
]
|
|
14492
|
+
}
|
|
14493
|
+
],
|
|
14494
|
+
"exports": [
|
|
14495
|
+
{
|
|
14496
|
+
"kind": "js",
|
|
14497
|
+
"name": "InputMixinInterface",
|
|
14498
|
+
"declaration": {
|
|
14499
|
+
"name": "InputMixinInterface",
|
|
14500
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
14501
|
+
}
|
|
14502
|
+
},
|
|
14503
|
+
{
|
|
14504
|
+
"kind": "js",
|
|
14505
|
+
"name": "InputMixin",
|
|
14506
|
+
"declaration": {
|
|
14507
|
+
"name": "InputMixin",
|
|
14508
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
14509
|
+
}
|
|
14510
|
+
}
|
|
14511
|
+
]
|
|
14512
|
+
},
|
|
14513
|
+
{
|
|
14514
|
+
"kind": "javascript-module",
|
|
14515
|
+
"path": "src/common/mixins/ReadonlyMixin.ts",
|
|
14516
|
+
"declarations": [
|
|
14517
|
+
{
|
|
14518
|
+
"kind": "class",
|
|
14519
|
+
"description": "",
|
|
14520
|
+
"name": "ReadonlyMixinInterface",
|
|
14521
|
+
"members": [
|
|
14576
14522
|
{
|
|
14577
14523
|
"kind": "field",
|
|
14578
|
-
"name": "
|
|
14524
|
+
"name": "readonly",
|
|
14525
|
+
"type": {
|
|
14526
|
+
"text": "boolean"
|
|
14527
|
+
}
|
|
14528
|
+
}
|
|
14529
|
+
]
|
|
14530
|
+
},
|
|
14531
|
+
{
|
|
14532
|
+
"kind": "mixin",
|
|
14533
|
+
"description": "",
|
|
14534
|
+
"name": "ReadonlyMixin",
|
|
14535
|
+
"members": [
|
|
14536
|
+
{
|
|
14537
|
+
"kind": "field",
|
|
14538
|
+
"name": "readonly",
|
|
14579
14539
|
"type": {
|
|
14580
14540
|
"text": "boolean"
|
|
14581
14541
|
},
|
|
14582
14542
|
"default": "false",
|
|
14583
|
-
"description": "
|
|
14584
|
-
"attribute": "
|
|
14585
|
-
|
|
14543
|
+
"description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
|
|
14544
|
+
"attribute": "readonly",
|
|
14545
|
+
"reflects": true
|
|
14546
|
+
}
|
|
14547
|
+
],
|
|
14548
|
+
"attributes": [
|
|
14586
14549
|
{
|
|
14587
|
-
"
|
|
14588
|
-
"
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14595
|
-
|
|
14596
|
-
|
|
14597
|
-
]
|
|
14598
|
-
},
|
|
14550
|
+
"name": "readonly",
|
|
14551
|
+
"type": {
|
|
14552
|
+
"text": "boolean"
|
|
14553
|
+
},
|
|
14554
|
+
"default": "false",
|
|
14555
|
+
"description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
|
|
14556
|
+
"fieldName": "readonly"
|
|
14557
|
+
}
|
|
14558
|
+
],
|
|
14559
|
+
"parameters": [
|
|
14599
14560
|
{
|
|
14600
|
-
"
|
|
14601
|
-
"
|
|
14602
|
-
|
|
14603
|
-
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14561
|
+
"name": "superClass",
|
|
14562
|
+
"type": {
|
|
14563
|
+
"text": "T"
|
|
14564
|
+
}
|
|
14565
|
+
}
|
|
14566
|
+
]
|
|
14567
|
+
}
|
|
14568
|
+
],
|
|
14569
|
+
"exports": [
|
|
14570
|
+
{
|
|
14571
|
+
"kind": "js",
|
|
14572
|
+
"name": "ReadonlyMixinInterface",
|
|
14573
|
+
"declaration": {
|
|
14574
|
+
"name": "ReadonlyMixinInterface",
|
|
14575
|
+
"module": "src/common/mixins/ReadonlyMixin.ts"
|
|
14576
|
+
}
|
|
14577
|
+
},
|
|
14578
|
+
{
|
|
14579
|
+
"kind": "js",
|
|
14580
|
+
"name": "ReadonlyMixin",
|
|
14581
|
+
"declaration": {
|
|
14582
|
+
"name": "ReadonlyMixin",
|
|
14583
|
+
"module": "src/common/mixins/ReadonlyMixin.ts"
|
|
14584
|
+
}
|
|
14585
|
+
}
|
|
14586
|
+
]
|
|
14587
|
+
},
|
|
14588
|
+
{
|
|
14589
|
+
"kind": "javascript-module",
|
|
14590
|
+
"path": "src/common/directives/cond.ts",
|
|
14591
|
+
"declarations": [
|
|
14592
|
+
{
|
|
14593
|
+
"kind": "function",
|
|
14594
|
+
"name": "cond",
|
|
14595
|
+
"return": {
|
|
14596
|
+
"type": {
|
|
14597
|
+
"text": "typeof value | typeof nothing"
|
|
14598
|
+
}
|
|
14599
|
+
},
|
|
14600
|
+
"parameters": [
|
|
14612
14601
|
{
|
|
14613
|
-
"
|
|
14614
|
-
"
|
|
14615
|
-
|
|
14616
|
-
|
|
14602
|
+
"name": "value",
|
|
14603
|
+
"type": {
|
|
14604
|
+
"text": "any"
|
|
14605
|
+
}
|
|
14606
|
+
}
|
|
14607
|
+
],
|
|
14608
|
+
"description": "if value is truthy, return it, otherwise return nothing"
|
|
14609
|
+
},
|
|
14610
|
+
{
|
|
14611
|
+
"kind": "function",
|
|
14612
|
+
"name": "cond",
|
|
14613
|
+
"return": {
|
|
14614
|
+
"type": {
|
|
14615
|
+
"text": "typeof trueCase | typeof nothing"
|
|
14616
|
+
}
|
|
14617
|
+
},
|
|
14618
|
+
"parameters": [
|
|
14617
14619
|
{
|
|
14618
|
-
"
|
|
14619
|
-
"
|
|
14620
|
-
|
|
14620
|
+
"name": "condition",
|
|
14621
|
+
"type": {
|
|
14622
|
+
"text": "unknown"
|
|
14623
|
+
}
|
|
14621
14624
|
},
|
|
14622
14625
|
{
|
|
14623
|
-
"
|
|
14624
|
-
"
|
|
14625
|
-
|
|
14626
|
-
|
|
14626
|
+
"name": "trueCase",
|
|
14627
|
+
"type": {
|
|
14628
|
+
"text": "any"
|
|
14629
|
+
}
|
|
14630
|
+
}
|
|
14631
|
+
],
|
|
14632
|
+
"description": "if condition is truthy, return trueCase, otherwise return nothing"
|
|
14633
|
+
},
|
|
14634
|
+
{
|
|
14635
|
+
"kind": "function",
|
|
14636
|
+
"name": "cond",
|
|
14637
|
+
"return": {
|
|
14638
|
+
"type": {
|
|
14639
|
+
"text": "typeof trueCase"
|
|
14640
|
+
}
|
|
14641
|
+
},
|
|
14642
|
+
"parameters": [
|
|
14627
14643
|
{
|
|
14628
|
-
"
|
|
14629
|
-
"
|
|
14630
|
-
|
|
14644
|
+
"name": "condition",
|
|
14645
|
+
"type": {
|
|
14646
|
+
"text": "true"
|
|
14647
|
+
}
|
|
14631
14648
|
},
|
|
14632
14649
|
{
|
|
14633
|
-
"
|
|
14634
|
-
"
|
|
14635
|
-
|
|
14650
|
+
"name": "trueCase",
|
|
14651
|
+
"type": {
|
|
14652
|
+
"text": "any"
|
|
14653
|
+
}
|
|
14654
|
+
}
|
|
14655
|
+
],
|
|
14656
|
+
"description": "condition is true, so always return trueCase"
|
|
14657
|
+
},
|
|
14658
|
+
{
|
|
14659
|
+
"kind": "function",
|
|
14660
|
+
"name": "cond",
|
|
14661
|
+
"return": {
|
|
14662
|
+
"type": {
|
|
14663
|
+
"text": "typeof nothing"
|
|
14664
|
+
}
|
|
14665
|
+
},
|
|
14666
|
+
"parameters": [
|
|
14667
|
+
{
|
|
14668
|
+
"name": "condition",
|
|
14669
|
+
"type": {
|
|
14670
|
+
"text": "false"
|
|
14671
|
+
}
|
|
14636
14672
|
},
|
|
14637
14673
|
{
|
|
14638
|
-
"
|
|
14639
|
-
"
|
|
14640
|
-
|
|
14674
|
+
"name": "trueCase",
|
|
14675
|
+
"type": {
|
|
14676
|
+
"text": "any"
|
|
14677
|
+
}
|
|
14641
14678
|
}
|
|
14642
14679
|
],
|
|
14643
|
-
"
|
|
14680
|
+
"description": "condition is false, to will always return nothing"
|
|
14681
|
+
},
|
|
14682
|
+
{
|
|
14683
|
+
"kind": "function",
|
|
14684
|
+
"name": "cond",
|
|
14685
|
+
"return": {
|
|
14686
|
+
"type": {
|
|
14687
|
+
"text": "typeof trueCase | typeof falseCase"
|
|
14688
|
+
}
|
|
14689
|
+
},
|
|
14690
|
+
"parameters": [
|
|
14644
14691
|
{
|
|
14645
|
-
"name": "
|
|
14692
|
+
"name": "condition",
|
|
14646
14693
|
"type": {
|
|
14647
|
-
"text": "
|
|
14648
|
-
}
|
|
14649
|
-
"description": "Fired as the user types into the input."
|
|
14694
|
+
"text": "unknown"
|
|
14695
|
+
}
|
|
14650
14696
|
},
|
|
14651
14697
|
{
|
|
14652
|
-
"name": "
|
|
14698
|
+
"name": "trueCase",
|
|
14653
14699
|
"type": {
|
|
14654
|
-
"text": "
|
|
14655
|
-
}
|
|
14656
|
-
|
|
14700
|
+
"text": "any"
|
|
14701
|
+
}
|
|
14702
|
+
},
|
|
14703
|
+
{
|
|
14704
|
+
"name": "falseCase",
|
|
14705
|
+
"type": {
|
|
14706
|
+
"text": "any"
|
|
14707
|
+
}
|
|
14657
14708
|
}
|
|
14658
14709
|
],
|
|
14659
|
-
"
|
|
14710
|
+
"description": "if condition is truthy, return trueCase, otherwise return falseCase"
|
|
14711
|
+
},
|
|
14712
|
+
{
|
|
14713
|
+
"kind": "function",
|
|
14714
|
+
"name": "cond",
|
|
14715
|
+
"return": {
|
|
14716
|
+
"type": {
|
|
14717
|
+
"text": "typeof trueCase"
|
|
14718
|
+
}
|
|
14719
|
+
},
|
|
14720
|
+
"parameters": [
|
|
14660
14721
|
{
|
|
14661
|
-
"name": "
|
|
14722
|
+
"name": "condition",
|
|
14662
14723
|
"type": {
|
|
14663
|
-
"text": "
|
|
14664
|
-
}
|
|
14665
|
-
"default": "\"\"",
|
|
14666
|
-
"description": "Label for the input.",
|
|
14667
|
-
"fieldName": "label"
|
|
14724
|
+
"text": "true"
|
|
14725
|
+
}
|
|
14668
14726
|
},
|
|
14669
14727
|
{
|
|
14670
|
-
"name": "
|
|
14728
|
+
"name": "trueCase",
|
|
14671
14729
|
"type": {
|
|
14672
|
-
"text": "
|
|
14673
|
-
}
|
|
14674
|
-
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
14675
|
-
"fieldName": "hint"
|
|
14730
|
+
"text": "any"
|
|
14731
|
+
}
|
|
14676
14732
|
},
|
|
14677
14733
|
{
|
|
14678
|
-
"name": "
|
|
14734
|
+
"name": "falseCase",
|
|
14679
14735
|
"type": {
|
|
14680
|
-
"text": "
|
|
14681
|
-
}
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14736
|
+
"text": "any"
|
|
14737
|
+
}
|
|
14738
|
+
}
|
|
14739
|
+
],
|
|
14740
|
+
"description": "condition is true, so always return trueCase"
|
|
14741
|
+
},
|
|
14742
|
+
{
|
|
14743
|
+
"kind": "function",
|
|
14744
|
+
"name": "cond",
|
|
14745
|
+
"return": {
|
|
14746
|
+
"type": {
|
|
14747
|
+
"text": "typeof falseCase"
|
|
14748
|
+
}
|
|
14749
|
+
},
|
|
14750
|
+
"parameters": [
|
|
14686
14751
|
{
|
|
14687
|
-
"name": "
|
|
14752
|
+
"name": "condition",
|
|
14688
14753
|
"type": {
|
|
14689
|
-
"text": "
|
|
14690
|
-
}
|
|
14691
|
-
"description": "Placeholder text to display within the input.",
|
|
14692
|
-
"fieldName": "placeholder"
|
|
14754
|
+
"text": "false"
|
|
14755
|
+
}
|
|
14693
14756
|
},
|
|
14694
14757
|
{
|
|
14695
|
-
"name": "
|
|
14758
|
+
"name": "trueCase",
|
|
14696
14759
|
"type": {
|
|
14697
|
-
"text": "
|
|
14698
|
-
}
|
|
14699
|
-
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
14700
|
-
"fieldName": "error"
|
|
14760
|
+
"text": "any"
|
|
14761
|
+
}
|
|
14701
14762
|
},
|
|
14702
14763
|
{
|
|
14703
|
-
"name": "
|
|
14764
|
+
"name": "falseCase",
|
|
14704
14765
|
"type": {
|
|
14705
|
-
"text": "
|
|
14706
|
-
}
|
|
14707
|
-
"default": "false",
|
|
14708
|
-
"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.",
|
|
14709
|
-
"fieldName": "required"
|
|
14766
|
+
"text": "any"
|
|
14767
|
+
}
|
|
14710
14768
|
}
|
|
14711
14769
|
],
|
|
14770
|
+
"description": "condition is false, so always return falseCase"
|
|
14771
|
+
},
|
|
14772
|
+
{
|
|
14773
|
+
"kind": "function",
|
|
14774
|
+
"name": "cond",
|
|
14712
14775
|
"parameters": [
|
|
14713
14776
|
{
|
|
14714
|
-
"name": "
|
|
14777
|
+
"name": "condition",
|
|
14715
14778
|
"type": {
|
|
14716
|
-
"text": "
|
|
14779
|
+
"text": "unknown"
|
|
14780
|
+
}
|
|
14781
|
+
},
|
|
14782
|
+
{
|
|
14783
|
+
"name": "trueCase",
|
|
14784
|
+
"default": "condition",
|
|
14785
|
+
"type": {
|
|
14786
|
+
"text": "any"
|
|
14787
|
+
}
|
|
14788
|
+
},
|
|
14789
|
+
{
|
|
14790
|
+
"name": "falseCase",
|
|
14791
|
+
"default": "nothing",
|
|
14792
|
+
"type": {
|
|
14793
|
+
"text": "any"
|
|
14717
14794
|
}
|
|
14718
14795
|
}
|
|
14719
14796
|
]
|
|
@@ -14722,230 +14799,222 @@
|
|
|
14722
14799
|
"exports": [
|
|
14723
14800
|
{
|
|
14724
14801
|
"kind": "js",
|
|
14725
|
-
"name": "
|
|
14802
|
+
"name": "cond",
|
|
14803
|
+
"declaration": {
|
|
14804
|
+
"name": "cond",
|
|
14805
|
+
"module": "src/common/directives/cond.ts"
|
|
14806
|
+
}
|
|
14807
|
+
},
|
|
14808
|
+
{
|
|
14809
|
+
"kind": "js",
|
|
14810
|
+
"name": "cond",
|
|
14811
|
+
"declaration": {
|
|
14812
|
+
"name": "cond",
|
|
14813
|
+
"module": "src/common/directives/cond.ts"
|
|
14814
|
+
}
|
|
14815
|
+
},
|
|
14816
|
+
{
|
|
14817
|
+
"kind": "js",
|
|
14818
|
+
"name": "cond",
|
|
14819
|
+
"declaration": {
|
|
14820
|
+
"name": "cond",
|
|
14821
|
+
"module": "src/common/directives/cond.ts"
|
|
14822
|
+
}
|
|
14823
|
+
},
|
|
14824
|
+
{
|
|
14825
|
+
"kind": "js",
|
|
14826
|
+
"name": "cond",
|
|
14827
|
+
"declaration": {
|
|
14828
|
+
"name": "cond",
|
|
14829
|
+
"module": "src/common/directives/cond.ts"
|
|
14830
|
+
}
|
|
14831
|
+
},
|
|
14832
|
+
{
|
|
14833
|
+
"kind": "js",
|
|
14834
|
+
"name": "cond",
|
|
14835
|
+
"declaration": {
|
|
14836
|
+
"name": "cond",
|
|
14837
|
+
"module": "src/common/directives/cond.ts"
|
|
14838
|
+
}
|
|
14839
|
+
},
|
|
14840
|
+
{
|
|
14841
|
+
"kind": "js",
|
|
14842
|
+
"name": "cond",
|
|
14726
14843
|
"declaration": {
|
|
14727
|
-
"name": "
|
|
14728
|
-
"module": "src/common/
|
|
14844
|
+
"name": "cond",
|
|
14845
|
+
"module": "src/common/directives/cond.ts"
|
|
14729
14846
|
}
|
|
14730
14847
|
},
|
|
14731
14848
|
{
|
|
14732
14849
|
"kind": "js",
|
|
14733
|
-
"name": "
|
|
14850
|
+
"name": "cond",
|
|
14734
14851
|
"declaration": {
|
|
14735
|
-
"name": "
|
|
14736
|
-
"module": "src/common/
|
|
14852
|
+
"name": "cond",
|
|
14853
|
+
"module": "src/common/directives/cond.ts"
|
|
14854
|
+
}
|
|
14855
|
+
},
|
|
14856
|
+
{
|
|
14857
|
+
"kind": "js",
|
|
14858
|
+
"name": "cond",
|
|
14859
|
+
"declaration": {
|
|
14860
|
+
"name": "cond",
|
|
14861
|
+
"module": "src/common/directives/cond.ts"
|
|
14737
14862
|
}
|
|
14738
14863
|
}
|
|
14739
14864
|
]
|
|
14740
14865
|
},
|
|
14741
14866
|
{
|
|
14742
14867
|
"kind": "javascript-module",
|
|
14743
|
-
"path": "src/common/
|
|
14868
|
+
"path": "src/common/directives/wrapIf.ts",
|
|
14744
14869
|
"declarations": [
|
|
14745
14870
|
{
|
|
14746
|
-
"kind": "
|
|
14747
|
-
"
|
|
14748
|
-
"
|
|
14749
|
-
|
|
14871
|
+
"kind": "function",
|
|
14872
|
+
"name": "wrapIf",
|
|
14873
|
+
"return": {
|
|
14874
|
+
"type": {
|
|
14875
|
+
"text": "TInner"
|
|
14876
|
+
}
|
|
14877
|
+
},
|
|
14878
|
+
"parameters": [
|
|
14750
14879
|
{
|
|
14751
|
-
"
|
|
14752
|
-
"name": "name",
|
|
14880
|
+
"name": "condition",
|
|
14753
14881
|
"type": {
|
|
14754
|
-
"text": "
|
|
14882
|
+
"text": "false"
|
|
14755
14883
|
}
|
|
14756
14884
|
},
|
|
14757
14885
|
{
|
|
14758
|
-
"
|
|
14759
|
-
"name": "value",
|
|
14886
|
+
"name": "inner",
|
|
14760
14887
|
"type": {
|
|
14761
|
-
"text": "
|
|
14888
|
+
"text": "() => TInner"
|
|
14762
14889
|
}
|
|
14763
14890
|
},
|
|
14764
14891
|
{
|
|
14765
|
-
"
|
|
14766
|
-
"name": "disabled",
|
|
14892
|
+
"name": "wrapper",
|
|
14767
14893
|
"type": {
|
|
14768
|
-
"text": "
|
|
14894
|
+
"text": "(inner: TInner) => TWrapper"
|
|
14895
|
+
}
|
|
14896
|
+
}
|
|
14897
|
+
]
|
|
14898
|
+
},
|
|
14899
|
+
{
|
|
14900
|
+
"kind": "function",
|
|
14901
|
+
"name": "wrapIf",
|
|
14902
|
+
"return": {
|
|
14903
|
+
"type": {
|
|
14904
|
+
"text": "TWrapper"
|
|
14905
|
+
}
|
|
14906
|
+
},
|
|
14907
|
+
"parameters": [
|
|
14908
|
+
{
|
|
14909
|
+
"name": "condition",
|
|
14910
|
+
"type": {
|
|
14911
|
+
"text": "true"
|
|
14769
14912
|
}
|
|
14770
14913
|
},
|
|
14771
14914
|
{
|
|
14772
|
-
"
|
|
14773
|
-
"name": "form",
|
|
14915
|
+
"name": "inner",
|
|
14774
14916
|
"type": {
|
|
14775
|
-
"text": "
|
|
14917
|
+
"text": "() => TInner"
|
|
14918
|
+
}
|
|
14919
|
+
},
|
|
14920
|
+
{
|
|
14921
|
+
"name": "wrapper",
|
|
14922
|
+
"type": {
|
|
14923
|
+
"text": "(inner: TInner) => TWrapper"
|
|
14776
14924
|
}
|
|
14777
14925
|
}
|
|
14778
14926
|
]
|
|
14779
14927
|
},
|
|
14780
14928
|
{
|
|
14781
|
-
"kind": "
|
|
14782
|
-
"
|
|
14783
|
-
"
|
|
14784
|
-
|
|
14929
|
+
"kind": "function",
|
|
14930
|
+
"name": "wrapIf",
|
|
14931
|
+
"return": {
|
|
14932
|
+
"type": {
|
|
14933
|
+
"text": "TInner | TWrapper"
|
|
14934
|
+
}
|
|
14935
|
+
},
|
|
14936
|
+
"parameters": [
|
|
14785
14937
|
{
|
|
14786
|
-
"
|
|
14787
|
-
"name": "disabled",
|
|
14938
|
+
"name": "condition",
|
|
14788
14939
|
"type": {
|
|
14789
|
-
"text": "
|
|
14790
|
-
}
|
|
14791
|
-
"default": "false",
|
|
14792
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
14793
|
-
"attribute": "disabled",
|
|
14794
|
-
"reflects": true
|
|
14940
|
+
"text": "unknown"
|
|
14941
|
+
}
|
|
14795
14942
|
},
|
|
14796
14943
|
{
|
|
14797
|
-
"
|
|
14798
|
-
"name": "name",
|
|
14944
|
+
"name": "inner",
|
|
14799
14945
|
"type": {
|
|
14800
|
-
"text": "
|
|
14801
|
-
}
|
|
14802
|
-
"description": "The name of the form component.",
|
|
14803
|
-
"attribute": "name"
|
|
14946
|
+
"text": "() => TInner"
|
|
14947
|
+
}
|
|
14804
14948
|
},
|
|
14805
14949
|
{
|
|
14806
|
-
"
|
|
14807
|
-
"name": "value",
|
|
14950
|
+
"name": "wrapper",
|
|
14808
14951
|
"type": {
|
|
14809
|
-
"text": "
|
|
14810
|
-
}
|
|
14811
|
-
"default": "\"\"",
|
|
14812
|
-
"description": "The value of the form component.",
|
|
14813
|
-
"attribute": "value"
|
|
14814
|
-
},
|
|
14815
|
-
{
|
|
14816
|
-
"kind": "field",
|
|
14817
|
-
"name": "form",
|
|
14818
|
-
"description": "Gets the form, if any, associated with the form element."
|
|
14952
|
+
"text": "(inner: TInner) => TWrapper"
|
|
14953
|
+
}
|
|
14819
14954
|
}
|
|
14820
|
-
]
|
|
14821
|
-
|
|
14955
|
+
]
|
|
14956
|
+
},
|
|
14957
|
+
{
|
|
14958
|
+
"kind": "function",
|
|
14959
|
+
"name": "wrapIf",
|
|
14960
|
+
"parameters": [
|
|
14822
14961
|
{
|
|
14823
|
-
"name": "
|
|
14962
|
+
"name": "condition",
|
|
14824
14963
|
"type": {
|
|
14825
|
-
"text": "
|
|
14826
|
-
}
|
|
14827
|
-
"default": "false",
|
|
14828
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
14829
|
-
"fieldName": "disabled"
|
|
14964
|
+
"text": "any"
|
|
14965
|
+
}
|
|
14830
14966
|
},
|
|
14831
14967
|
{
|
|
14832
|
-
"name": "
|
|
14968
|
+
"name": "inner",
|
|
14833
14969
|
"type": {
|
|
14834
|
-
"text": "
|
|
14835
|
-
}
|
|
14836
|
-
"description": "The name of the form component.",
|
|
14837
|
-
"fieldName": "name"
|
|
14970
|
+
"text": "() => TInner"
|
|
14971
|
+
}
|
|
14838
14972
|
},
|
|
14839
14973
|
{
|
|
14840
|
-
"name": "
|
|
14974
|
+
"name": "wrapper",
|
|
14841
14975
|
"type": {
|
|
14842
|
-
"text": "
|
|
14843
|
-
}
|
|
14844
|
-
"default": "\"\"",
|
|
14845
|
-
"description": "The value of the form component.",
|
|
14846
|
-
"fieldName": "value"
|
|
14976
|
+
"text": "(innards: TInner) => TWrapper"
|
|
14977
|
+
}
|
|
14847
14978
|
}
|
|
14848
14979
|
],
|
|
14849
|
-
"
|
|
14850
|
-
{
|
|
14851
|
-
"
|
|
14852
|
-
"type": {
|
|
14853
|
-
"text": "T"
|
|
14854
|
-
}
|
|
14980
|
+
"return": {
|
|
14981
|
+
"type": {
|
|
14982
|
+
"text": ""
|
|
14855
14983
|
}
|
|
14856
|
-
|
|
14984
|
+
}
|
|
14857
14985
|
}
|
|
14858
14986
|
],
|
|
14859
14987
|
"exports": [
|
|
14860
14988
|
{
|
|
14861
14989
|
"kind": "js",
|
|
14862
|
-
"name": "
|
|
14990
|
+
"name": "wrapIf",
|
|
14863
14991
|
"declaration": {
|
|
14864
|
-
"name": "
|
|
14865
|
-
"module": "src/common/
|
|
14992
|
+
"name": "wrapIf",
|
|
14993
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
14866
14994
|
}
|
|
14867
14995
|
},
|
|
14868
14996
|
{
|
|
14869
14997
|
"kind": "js",
|
|
14870
|
-
"name": "
|
|
14998
|
+
"name": "wrapIf",
|
|
14871
14999
|
"declaration": {
|
|
14872
|
-
"name": "
|
|
14873
|
-
"module": "src/common/
|
|
15000
|
+
"name": "wrapIf",
|
|
15001
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
14874
15002
|
}
|
|
14875
|
-
}
|
|
14876
|
-
]
|
|
14877
|
-
},
|
|
14878
|
-
{
|
|
14879
|
-
"kind": "javascript-module",
|
|
14880
|
-
"path": "src/common/mixins/ReadonlyMixin.ts",
|
|
14881
|
-
"declarations": [
|
|
14882
|
-
{
|
|
14883
|
-
"kind": "class",
|
|
14884
|
-
"description": "",
|
|
14885
|
-
"name": "ReadonlyMixinInterface",
|
|
14886
|
-
"members": [
|
|
14887
|
-
{
|
|
14888
|
-
"kind": "field",
|
|
14889
|
-
"name": "readonly",
|
|
14890
|
-
"type": {
|
|
14891
|
-
"text": "boolean"
|
|
14892
|
-
}
|
|
14893
|
-
}
|
|
14894
|
-
]
|
|
14895
15003
|
},
|
|
14896
|
-
{
|
|
14897
|
-
"kind": "mixin",
|
|
14898
|
-
"description": "",
|
|
14899
|
-
"name": "ReadonlyMixin",
|
|
14900
|
-
"members": [
|
|
14901
|
-
{
|
|
14902
|
-
"kind": "field",
|
|
14903
|
-
"name": "readonly",
|
|
14904
|
-
"type": {
|
|
14905
|
-
"text": "boolean"
|
|
14906
|
-
},
|
|
14907
|
-
"default": "false",
|
|
14908
|
-
"description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
|
|
14909
|
-
"attribute": "readonly",
|
|
14910
|
-
"reflects": true
|
|
14911
|
-
}
|
|
14912
|
-
],
|
|
14913
|
-
"attributes": [
|
|
14914
|
-
{
|
|
14915
|
-
"name": "readonly",
|
|
14916
|
-
"type": {
|
|
14917
|
-
"text": "boolean"
|
|
14918
|
-
},
|
|
14919
|
-
"default": "false",
|
|
14920
|
-
"description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
|
|
14921
|
-
"fieldName": "readonly"
|
|
14922
|
-
}
|
|
14923
|
-
],
|
|
14924
|
-
"parameters": [
|
|
14925
|
-
{
|
|
14926
|
-
"name": "superClass",
|
|
14927
|
-
"type": {
|
|
14928
|
-
"text": "T"
|
|
14929
|
-
}
|
|
14930
|
-
}
|
|
14931
|
-
]
|
|
14932
|
-
}
|
|
14933
|
-
],
|
|
14934
|
-
"exports": [
|
|
14935
15004
|
{
|
|
14936
15005
|
"kind": "js",
|
|
14937
|
-
"name": "
|
|
15006
|
+
"name": "wrapIf",
|
|
14938
15007
|
"declaration": {
|
|
14939
|
-
"name": "
|
|
14940
|
-
"module": "src/common/
|
|
15008
|
+
"name": "wrapIf",
|
|
15009
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
14941
15010
|
}
|
|
14942
15011
|
},
|
|
14943
15012
|
{
|
|
14944
15013
|
"kind": "js",
|
|
14945
|
-
"name": "
|
|
15014
|
+
"name": "wrapIf",
|
|
14946
15015
|
"declaration": {
|
|
14947
|
-
"name": "
|
|
14948
|
-
"module": "src/common/
|
|
15016
|
+
"name": "wrapIf",
|
|
15017
|
+
"module": "src/common/directives/wrapIf.ts"
|
|
14949
15018
|
}
|
|
14950
15019
|
}
|
|
14951
15020
|
]
|