@nordhealth/components 2.5.0 → 2.6.1
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 +593 -398
- package/lib/AutocompleteMixin-370de2be.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/{Calendar-7ae2dda7.js → Calendar-49dc5248.js} +1 -1
- package/lib/{Calendar-7ae2dda7.js.map → Calendar-49dc5248.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/DatePicker.js +1 -1
- package/lib/Drawer.js +2 -0
- package/lib/Drawer.js.map +1 -0
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/InputMixin-158f63fb.js.map +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/Popout.js +1 -1
- package/lib/Popout.js.map +1 -1
- package/lib/ScrollbarController-680392c9.js +2 -0
- package/lib/ScrollbarController-680392c9.js.map +1 -0
- package/lib/TextField-94b0839b.js.map +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/common/mixins/InputMixin.d.ts +1 -1
- package/lib/src/drawer/Drawer.d.ts +29 -0
- package/lib/src/drawer/Drawer.test.d.ts +7 -0
- package/lib/src/dropdown/Dropdown.d.ts +5 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/layout/Layout.d.ts +4 -0
- package/lib/src/layout/Layout.test.d.ts +1 -0
- package/lib/src/popout/Popout.d.ts +7 -1
- package/package.json +3 -3
package/custom-elements.json
CHANGED
|
@@ -366,6 +366,14 @@
|
|
|
366
366
|
"name": "default",
|
|
367
367
|
"module": "\"./qrcode/Qrcode.js\""
|
|
368
368
|
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"kind": "js",
|
|
372
|
+
"name": "Drawer",
|
|
373
|
+
"declaration": {
|
|
374
|
+
"name": "default",
|
|
375
|
+
"module": "\"./drawer/Drawer.js\""
|
|
376
|
+
}
|
|
369
377
|
}
|
|
370
378
|
]
|
|
371
379
|
},
|
|
@@ -511,93 +519,6 @@
|
|
|
511
519
|
],
|
|
512
520
|
"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"
|
|
513
521
|
},
|
|
514
|
-
{
|
|
515
|
-
"kind": "javascript-module",
|
|
516
|
-
"path": "src/badge/Badge.ts",
|
|
517
|
-
"declarations": [
|
|
518
|
-
{
|
|
519
|
-
"kind": "class",
|
|
520
|
-
"description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
|
|
521
|
-
"name": "Badge",
|
|
522
|
-
"slots": [
|
|
523
|
-
{
|
|
524
|
-
"description": "The badge content.",
|
|
525
|
-
"name": ""
|
|
526
|
-
}
|
|
527
|
-
],
|
|
528
|
-
"members": [
|
|
529
|
-
{
|
|
530
|
-
"kind": "field",
|
|
531
|
-
"name": "type",
|
|
532
|
-
"type": {
|
|
533
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
534
|
-
},
|
|
535
|
-
"default": "\"neutral\"",
|
|
536
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
537
|
-
"attribute": "type",
|
|
538
|
-
"reflects": true
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
"kind": "field",
|
|
542
|
-
"name": "progress",
|
|
543
|
-
"type": {
|
|
544
|
-
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
545
|
-
},
|
|
546
|
-
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
547
|
-
"attribute": "progress"
|
|
548
|
-
}
|
|
549
|
-
],
|
|
550
|
-
"attributes": [
|
|
551
|
-
{
|
|
552
|
-
"name": "type",
|
|
553
|
-
"type": {
|
|
554
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
555
|
-
},
|
|
556
|
-
"default": "\"neutral\"",
|
|
557
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
558
|
-
"fieldName": "type"
|
|
559
|
-
},
|
|
560
|
-
{
|
|
561
|
-
"name": "progress",
|
|
562
|
-
"type": {
|
|
563
|
-
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
564
|
-
},
|
|
565
|
-
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
566
|
-
"fieldName": "progress"
|
|
567
|
-
}
|
|
568
|
-
],
|
|
569
|
-
"superclass": {
|
|
570
|
-
"name": "LitElement",
|
|
571
|
-
"package": "lit"
|
|
572
|
-
},
|
|
573
|
-
"status": "ready",
|
|
574
|
-
"category": "text",
|
|
575
|
-
"displayName": null,
|
|
576
|
-
"examples": [],
|
|
577
|
-
"tagName": "nord-badge",
|
|
578
|
-
"customElement": true
|
|
579
|
-
}
|
|
580
|
-
],
|
|
581
|
-
"exports": [
|
|
582
|
-
{
|
|
583
|
-
"kind": "js",
|
|
584
|
-
"name": "default",
|
|
585
|
-
"declaration": {
|
|
586
|
-
"name": "Badge",
|
|
587
|
-
"module": "src/badge/Badge.ts"
|
|
588
|
-
}
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
"kind": "custom-element-definition",
|
|
592
|
-
"name": "nord-badge",
|
|
593
|
-
"declaration": {
|
|
594
|
-
"name": "Badge",
|
|
595
|
-
"module": "src/badge/Badge.ts"
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
],
|
|
599
|
-
"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 established variants and color patterns so that users can clearly identify the importance level.\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- 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| `neutral` | The default style variant. |\n| `info` | 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| `progress` | Used to convey something that’s in progress. |\n"
|
|
600
|
-
},
|
|
601
522
|
{
|
|
602
523
|
"kind": "javascript-module",
|
|
603
524
|
"path": "src/button/Button.ts",
|
|
@@ -1105,307 +1026,103 @@
|
|
|
1105
1026
|
},
|
|
1106
1027
|
{
|
|
1107
1028
|
"kind": "javascript-module",
|
|
1108
|
-
"path": "src/
|
|
1029
|
+
"path": "src/calendar/Calendar.ts",
|
|
1109
1030
|
"declarations": [
|
|
1110
1031
|
{
|
|
1111
1032
|
"kind": "class",
|
|
1112
|
-
"description": "
|
|
1113
|
-
"name": "
|
|
1033
|
+
"description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
|
|
1034
|
+
"name": "Calendar",
|
|
1114
1035
|
"cssProperties": [
|
|
1115
1036
|
{
|
|
1116
1037
|
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1117
|
-
"name": "--n-
|
|
1038
|
+
"name": "--n-calendar-border-radius",
|
|
1118
1039
|
"default": "var(--n-border-radius)"
|
|
1119
1040
|
},
|
|
1120
1041
|
{
|
|
1121
1042
|
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1122
|
-
"name": "--n-
|
|
1043
|
+
"name": "--n-calendar-box-shadow",
|
|
1123
1044
|
"default": "var(--n-box-shadow-popout)"
|
|
1124
|
-
},
|
|
1125
|
-
{
|
|
1126
|
-
"description": "Controls the padding on all sides of the card.",
|
|
1127
|
-
"name": "--n-card-padding",
|
|
1128
|
-
"default": "var(--n-space-m)"
|
|
1129
|
-
},
|
|
1130
|
-
{
|
|
1131
|
-
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1132
|
-
"name": "--n-card-slot-padding",
|
|
1133
|
-
"default": "var(--n-space-m)"
|
|
1134
1045
|
}
|
|
1135
1046
|
],
|
|
1136
|
-
"
|
|
1047
|
+
"members": [
|
|
1137
1048
|
{
|
|
1138
|
-
"
|
|
1139
|
-
"name": ""
|
|
1049
|
+
"kind": "field",
|
|
1050
|
+
"name": "dialogLabelId",
|
|
1051
|
+
"type": {
|
|
1052
|
+
"text": "string"
|
|
1053
|
+
},
|
|
1054
|
+
"privacy": "private",
|
|
1055
|
+
"default": "\"dialog-header\""
|
|
1140
1056
|
},
|
|
1141
1057
|
{
|
|
1142
|
-
"
|
|
1143
|
-
"name": "
|
|
1058
|
+
"kind": "field",
|
|
1059
|
+
"name": "monthSelectNode",
|
|
1060
|
+
"type": {
|
|
1061
|
+
"text": "HTMLElement"
|
|
1062
|
+
},
|
|
1063
|
+
"privacy": "private"
|
|
1144
1064
|
},
|
|
1145
1065
|
{
|
|
1146
|
-
"
|
|
1147
|
-
"name": "
|
|
1066
|
+
"kind": "field",
|
|
1067
|
+
"name": "focusedDayNode",
|
|
1068
|
+
"type": {
|
|
1069
|
+
"text": "HTMLButtonElement"
|
|
1070
|
+
},
|
|
1071
|
+
"privacy": "private"
|
|
1148
1072
|
},
|
|
1149
|
-
{
|
|
1150
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
1151
|
-
"name": "footer"
|
|
1152
|
-
}
|
|
1153
|
-
],
|
|
1154
|
-
"members": [
|
|
1155
1073
|
{
|
|
1156
1074
|
"kind": "field",
|
|
1157
|
-
"name": "
|
|
1075
|
+
"name": "direction",
|
|
1158
1076
|
"privacy": "private",
|
|
1159
|
-
"default": "new
|
|
1077
|
+
"default": "new DirectionController(this)"
|
|
1160
1078
|
},
|
|
1161
1079
|
{
|
|
1162
1080
|
"kind": "field",
|
|
1163
|
-
"name": "
|
|
1081
|
+
"name": "swipe",
|
|
1164
1082
|
"privacy": "private",
|
|
1165
|
-
"default": "new
|
|
1083
|
+
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
1166
1084
|
},
|
|
1167
1085
|
{
|
|
1168
1086
|
"kind": "field",
|
|
1169
|
-
"name": "
|
|
1087
|
+
"name": "shortcuts",
|
|
1088
|
+
"privacy": "private"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"kind": "field",
|
|
1092
|
+
"name": "localize",
|
|
1170
1093
|
"privacy": "private",
|
|
1171
|
-
"default": "new
|
|
1094
|
+
"default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
|
|
1172
1095
|
},
|
|
1173
1096
|
{
|
|
1174
1097
|
"kind": "field",
|
|
1175
|
-
"name": "
|
|
1098
|
+
"name": "dateFormatShort",
|
|
1176
1099
|
"type": {
|
|
1177
|
-
"text": "
|
|
1100
|
+
"text": "Intl.DateTimeFormat"
|
|
1178
1101
|
},
|
|
1179
|
-
"
|
|
1180
|
-
"description": "
|
|
1181
|
-
|
|
1182
|
-
"reflects": true
|
|
1183
|
-
}
|
|
1184
|
-
],
|
|
1185
|
-
"attributes": [
|
|
1102
|
+
"privacy": "private",
|
|
1103
|
+
"description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
|
|
1104
|
+
},
|
|
1186
1105
|
{
|
|
1187
|
-
"
|
|
1106
|
+
"kind": "field",
|
|
1107
|
+
"name": "monthNames",
|
|
1188
1108
|
"type": {
|
|
1189
|
-
"text": "
|
|
1109
|
+
"text": "string[]"
|
|
1190
1110
|
},
|
|
1191
|
-
"
|
|
1192
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1193
|
-
"fieldName": "padding"
|
|
1194
|
-
}
|
|
1195
|
-
],
|
|
1196
|
-
"superclass": {
|
|
1197
|
-
"name": "LitElement",
|
|
1198
|
-
"package": "lit"
|
|
1199
|
-
},
|
|
1200
|
-
"status": "ready",
|
|
1201
|
-
"category": "structure",
|
|
1202
|
-
"displayName": null,
|
|
1203
|
-
"examples": [],
|
|
1204
|
-
"tagName": "nord-card",
|
|
1205
|
-
"customElement": true
|
|
1206
|
-
}
|
|
1207
|
-
],
|
|
1208
|
-
"exports": [
|
|
1209
|
-
{
|
|
1210
|
-
"kind": "js",
|
|
1211
|
-
"name": "default",
|
|
1212
|
-
"declaration": {
|
|
1213
|
-
"name": "Card",
|
|
1214
|
-
"module": "src/card/Card.ts"
|
|
1215
|
-
}
|
|
1216
|
-
},
|
|
1217
|
-
{
|
|
1218
|
-
"kind": "custom-element-definition",
|
|
1219
|
-
"name": "nord-card",
|
|
1220
|
-
"declaration": {
|
|
1221
|
-
"name": "Card",
|
|
1222
|
-
"module": "src/card/Card.ts"
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
],
|
|
1226
|
-
"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- Include a header when placing a [Table](/components/table) component inside the card.\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"
|
|
1227
|
-
},
|
|
1228
|
-
{
|
|
1229
|
-
"kind": "javascript-module",
|
|
1230
|
-
"path": "src/banner/Banner.ts",
|
|
1231
|
-
"declarations": [
|
|
1232
|
-
{
|
|
1233
|
-
"kind": "class",
|
|
1234
|
-
"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.",
|
|
1235
|
-
"name": "Banner",
|
|
1236
|
-
"cssProperties": [
|
|
1237
|
-
{
|
|
1238
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1239
|
-
"name": "--n-banner-border-radius",
|
|
1240
|
-
"default": "var(--n-border-radius)"
|
|
1111
|
+
"privacy": "private"
|
|
1241
1112
|
},
|
|
1242
1113
|
{
|
|
1243
|
-
"
|
|
1244
|
-
"name": "
|
|
1245
|
-
"
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
"description": "default slot",
|
|
1251
|
-
"name": ""
|
|
1252
|
-
}
|
|
1253
|
-
],
|
|
1254
|
-
"members": [
|
|
1114
|
+
"kind": "field",
|
|
1115
|
+
"name": "monthNamesShort",
|
|
1116
|
+
"type": {
|
|
1117
|
+
"text": "string[]"
|
|
1118
|
+
},
|
|
1119
|
+
"privacy": "private"
|
|
1120
|
+
},
|
|
1255
1121
|
{
|
|
1256
1122
|
"kind": "field",
|
|
1257
|
-
"name": "
|
|
1123
|
+
"name": "dayNames",
|
|
1258
1124
|
"type": {
|
|
1259
|
-
"text": "
|
|
1260
|
-
},
|
|
1261
|
-
"default": "\"info\"",
|
|
1262
|
-
"description": "The style variant of the banner.",
|
|
1263
|
-
"attribute": "variant",
|
|
1264
|
-
"reflects": true
|
|
1265
|
-
}
|
|
1266
|
-
],
|
|
1267
|
-
"attributes": [
|
|
1268
|
-
{
|
|
1269
|
-
"name": "variant",
|
|
1270
|
-
"type": {
|
|
1271
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1272
|
-
},
|
|
1273
|
-
"default": "\"info\"",
|
|
1274
|
-
"description": "The style variant of the banner.",
|
|
1275
|
-
"fieldName": "variant"
|
|
1276
|
-
}
|
|
1277
|
-
],
|
|
1278
|
-
"superclass": {
|
|
1279
|
-
"name": "LitElement",
|
|
1280
|
-
"package": "lit"
|
|
1281
|
-
},
|
|
1282
|
-
"status": "ready",
|
|
1283
|
-
"category": "feedback",
|
|
1284
|
-
"displayName": null,
|
|
1285
|
-
"examples": [],
|
|
1286
|
-
"tagName": "nord-banner",
|
|
1287
|
-
"customElement": true
|
|
1288
|
-
}
|
|
1289
|
-
],
|
|
1290
|
-
"exports": [
|
|
1291
|
-
{
|
|
1292
|
-
"kind": "js",
|
|
1293
|
-
"name": "default",
|
|
1294
|
-
"declaration": {
|
|
1295
|
-
"name": "Banner",
|
|
1296
|
-
"module": "src/banner/Banner.ts"
|
|
1297
|
-
}
|
|
1298
|
-
},
|
|
1299
|
-
{
|
|
1300
|
-
"kind": "custom-element-definition",
|
|
1301
|
-
"name": "nord-banner",
|
|
1302
|
-
"declaration": {
|
|
1303
|
-
"name": "Banner",
|
|
1304
|
-
"module": "src/banner/Banner.ts"
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
],
|
|
1308
|
-
"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"
|
|
1309
|
-
},
|
|
1310
|
-
{
|
|
1311
|
-
"kind": "javascript-module",
|
|
1312
|
-
"path": "src/calendar/Calendar.ts",
|
|
1313
|
-
"declarations": [
|
|
1314
|
-
{
|
|
1315
|
-
"kind": "class",
|
|
1316
|
-
"description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
|
|
1317
|
-
"name": "Calendar",
|
|
1318
|
-
"cssProperties": [
|
|
1319
|
-
{
|
|
1320
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1321
|
-
"name": "--n-calendar-border-radius",
|
|
1322
|
-
"default": "var(--n-border-radius)"
|
|
1323
|
-
},
|
|
1324
|
-
{
|
|
1325
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1326
|
-
"name": "--n-calendar-box-shadow",
|
|
1327
|
-
"default": "var(--n-box-shadow-popout)"
|
|
1328
|
-
}
|
|
1329
|
-
],
|
|
1330
|
-
"members": [
|
|
1331
|
-
{
|
|
1332
|
-
"kind": "field",
|
|
1333
|
-
"name": "dialogLabelId",
|
|
1334
|
-
"type": {
|
|
1335
|
-
"text": "string"
|
|
1336
|
-
},
|
|
1337
|
-
"privacy": "private",
|
|
1338
|
-
"default": "\"dialog-header\""
|
|
1339
|
-
},
|
|
1340
|
-
{
|
|
1341
|
-
"kind": "field",
|
|
1342
|
-
"name": "monthSelectNode",
|
|
1343
|
-
"type": {
|
|
1344
|
-
"text": "HTMLElement"
|
|
1345
|
-
},
|
|
1346
|
-
"privacy": "private"
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
"kind": "field",
|
|
1350
|
-
"name": "focusedDayNode",
|
|
1351
|
-
"type": {
|
|
1352
|
-
"text": "HTMLButtonElement"
|
|
1353
|
-
},
|
|
1354
|
-
"privacy": "private"
|
|
1355
|
-
},
|
|
1356
|
-
{
|
|
1357
|
-
"kind": "field",
|
|
1358
|
-
"name": "direction",
|
|
1359
|
-
"privacy": "private",
|
|
1360
|
-
"default": "new DirectionController(this)"
|
|
1361
|
-
},
|
|
1362
|
-
{
|
|
1363
|
-
"kind": "field",
|
|
1364
|
-
"name": "swipe",
|
|
1365
|
-
"privacy": "private",
|
|
1366
|
-
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
1367
|
-
},
|
|
1368
|
-
{
|
|
1369
|
-
"kind": "field",
|
|
1370
|
-
"name": "shortcuts",
|
|
1371
|
-
"privacy": "private"
|
|
1372
|
-
},
|
|
1373
|
-
{
|
|
1374
|
-
"kind": "field",
|
|
1375
|
-
"name": "localize",
|
|
1376
|
-
"privacy": "private",
|
|
1377
|
-
"default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
"kind": "field",
|
|
1381
|
-
"name": "dateFormatShort",
|
|
1382
|
-
"type": {
|
|
1383
|
-
"text": "Intl.DateTimeFormat"
|
|
1384
|
-
},
|
|
1385
|
-
"privacy": "private",
|
|
1386
|
-
"description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
|
|
1387
|
-
},
|
|
1388
|
-
{
|
|
1389
|
-
"kind": "field",
|
|
1390
|
-
"name": "monthNames",
|
|
1391
|
-
"type": {
|
|
1392
|
-
"text": "string[]"
|
|
1393
|
-
},
|
|
1394
|
-
"privacy": "private"
|
|
1395
|
-
},
|
|
1396
|
-
{
|
|
1397
|
-
"kind": "field",
|
|
1398
|
-
"name": "monthNamesShort",
|
|
1399
|
-
"type": {
|
|
1400
|
-
"text": "string[]"
|
|
1401
|
-
},
|
|
1402
|
-
"privacy": "private"
|
|
1403
|
-
},
|
|
1404
|
-
{
|
|
1405
|
-
"kind": "field",
|
|
1406
|
-
"name": "dayNames",
|
|
1407
|
-
"type": {
|
|
1408
|
-
"text": "string[]"
|
|
1125
|
+
"text": "string[]"
|
|
1409
1126
|
},
|
|
1410
1127
|
"privacy": "private"
|
|
1411
1128
|
},
|
|
@@ -1823,22 +1540,313 @@
|
|
|
1823
1540
|
"exports": [
|
|
1824
1541
|
{
|
|
1825
1542
|
"kind": "js",
|
|
1826
|
-
"name": "dayView",
|
|
1543
|
+
"name": "dayView",
|
|
1544
|
+
"declaration": {
|
|
1545
|
+
"name": "dayView",
|
|
1546
|
+
"module": "src/calendar/month-view.ts"
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
"kind": "js",
|
|
1551
|
+
"name": "monthView",
|
|
1552
|
+
"declaration": {
|
|
1553
|
+
"name": "monthView",
|
|
1554
|
+
"module": "src/calendar/month-view.ts"
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
],
|
|
1558
|
+
"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 the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"kind": "javascript-module",
|
|
1562
|
+
"path": "src/banner/Banner.ts",
|
|
1563
|
+
"declarations": [
|
|
1564
|
+
{
|
|
1565
|
+
"kind": "class",
|
|
1566
|
+
"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.",
|
|
1567
|
+
"name": "Banner",
|
|
1568
|
+
"cssProperties": [
|
|
1569
|
+
{
|
|
1570
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1571
|
+
"name": "--n-banner-border-radius",
|
|
1572
|
+
"default": "var(--n-border-radius)"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1576
|
+
"name": "--n-banner-box-shadow",
|
|
1577
|
+
"default": "var(--n-box-shadow-card)"
|
|
1578
|
+
}
|
|
1579
|
+
],
|
|
1580
|
+
"slots": [
|
|
1581
|
+
{
|
|
1582
|
+
"description": "default slot",
|
|
1583
|
+
"name": ""
|
|
1584
|
+
}
|
|
1585
|
+
],
|
|
1586
|
+
"members": [
|
|
1587
|
+
{
|
|
1588
|
+
"kind": "field",
|
|
1589
|
+
"name": "variant",
|
|
1590
|
+
"type": {
|
|
1591
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1592
|
+
},
|
|
1593
|
+
"default": "\"info\"",
|
|
1594
|
+
"description": "The style variant of the banner.",
|
|
1595
|
+
"attribute": "variant",
|
|
1596
|
+
"reflects": true
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"attributes": [
|
|
1600
|
+
{
|
|
1601
|
+
"name": "variant",
|
|
1602
|
+
"type": {
|
|
1603
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1604
|
+
},
|
|
1605
|
+
"default": "\"info\"",
|
|
1606
|
+
"description": "The style variant of the banner.",
|
|
1607
|
+
"fieldName": "variant"
|
|
1608
|
+
}
|
|
1609
|
+
],
|
|
1610
|
+
"superclass": {
|
|
1611
|
+
"name": "LitElement",
|
|
1612
|
+
"package": "lit"
|
|
1613
|
+
},
|
|
1614
|
+
"status": "ready",
|
|
1615
|
+
"category": "feedback",
|
|
1616
|
+
"displayName": null,
|
|
1617
|
+
"examples": [],
|
|
1618
|
+
"tagName": "nord-banner",
|
|
1619
|
+
"customElement": true
|
|
1620
|
+
}
|
|
1621
|
+
],
|
|
1622
|
+
"exports": [
|
|
1623
|
+
{
|
|
1624
|
+
"kind": "js",
|
|
1625
|
+
"name": "default",
|
|
1626
|
+
"declaration": {
|
|
1627
|
+
"name": "Banner",
|
|
1628
|
+
"module": "src/banner/Banner.ts"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"kind": "custom-element-definition",
|
|
1633
|
+
"name": "nord-banner",
|
|
1634
|
+
"declaration": {
|
|
1635
|
+
"name": "Banner",
|
|
1636
|
+
"module": "src/banner/Banner.ts"
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
],
|
|
1640
|
+
"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"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"kind": "javascript-module",
|
|
1644
|
+
"path": "src/card/Card.ts",
|
|
1645
|
+
"declarations": [
|
|
1646
|
+
{
|
|
1647
|
+
"kind": "class",
|
|
1648
|
+
"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.",
|
|
1649
|
+
"name": "Card",
|
|
1650
|
+
"cssProperties": [
|
|
1651
|
+
{
|
|
1652
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1653
|
+
"name": "--n-card-border-radius",
|
|
1654
|
+
"default": "var(--n-border-radius)"
|
|
1655
|
+
},
|
|
1656
|
+
{
|
|
1657
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1658
|
+
"name": "--n-card-box-shadow",
|
|
1659
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"description": "Controls the padding on all sides of the card.",
|
|
1663
|
+
"name": "--n-card-padding",
|
|
1664
|
+
"default": "var(--n-space-m)"
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1668
|
+
"name": "--n-card-slot-padding",
|
|
1669
|
+
"default": "var(--n-space-m)"
|
|
1670
|
+
}
|
|
1671
|
+
],
|
|
1672
|
+
"slots": [
|
|
1673
|
+
{
|
|
1674
|
+
"description": "The card content.",
|
|
1675
|
+
"name": ""
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1679
|
+
"name": "header"
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1683
|
+
"name": "header-end"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1687
|
+
"name": "footer"
|
|
1688
|
+
}
|
|
1689
|
+
],
|
|
1690
|
+
"members": [
|
|
1691
|
+
{
|
|
1692
|
+
"kind": "field",
|
|
1693
|
+
"name": "headerSlot",
|
|
1694
|
+
"privacy": "private",
|
|
1695
|
+
"default": "new SlotController(this, \"header\")"
|
|
1696
|
+
},
|
|
1697
|
+
{
|
|
1698
|
+
"kind": "field",
|
|
1699
|
+
"name": "headerEndSlot",
|
|
1700
|
+
"privacy": "private",
|
|
1701
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
1702
|
+
},
|
|
1703
|
+
{
|
|
1704
|
+
"kind": "field",
|
|
1705
|
+
"name": "footerSlot",
|
|
1706
|
+
"privacy": "private",
|
|
1707
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
"kind": "field",
|
|
1711
|
+
"name": "padding",
|
|
1712
|
+
"type": {
|
|
1713
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1714
|
+
},
|
|
1715
|
+
"default": "\"m\"",
|
|
1716
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1717
|
+
"attribute": "padding",
|
|
1718
|
+
"reflects": true
|
|
1719
|
+
}
|
|
1720
|
+
],
|
|
1721
|
+
"attributes": [
|
|
1722
|
+
{
|
|
1723
|
+
"name": "padding",
|
|
1724
|
+
"type": {
|
|
1725
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1726
|
+
},
|
|
1727
|
+
"default": "\"m\"",
|
|
1728
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1729
|
+
"fieldName": "padding"
|
|
1730
|
+
}
|
|
1731
|
+
],
|
|
1732
|
+
"superclass": {
|
|
1733
|
+
"name": "LitElement",
|
|
1734
|
+
"package": "lit"
|
|
1735
|
+
},
|
|
1736
|
+
"status": "ready",
|
|
1737
|
+
"category": "structure",
|
|
1738
|
+
"displayName": null,
|
|
1739
|
+
"examples": [],
|
|
1740
|
+
"tagName": "nord-card",
|
|
1741
|
+
"customElement": true
|
|
1742
|
+
}
|
|
1743
|
+
],
|
|
1744
|
+
"exports": [
|
|
1745
|
+
{
|
|
1746
|
+
"kind": "js",
|
|
1747
|
+
"name": "default",
|
|
1748
|
+
"declaration": {
|
|
1749
|
+
"name": "Card",
|
|
1750
|
+
"module": "src/card/Card.ts"
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"kind": "custom-element-definition",
|
|
1755
|
+
"name": "nord-card",
|
|
1756
|
+
"declaration": {
|
|
1757
|
+
"name": "Card",
|
|
1758
|
+
"module": "src/card/Card.ts"
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
],
|
|
1762
|
+
"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- Include a header when placing a [Table](/components/table) component inside the card.\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"
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"kind": "javascript-module",
|
|
1766
|
+
"path": "src/badge/Badge.ts",
|
|
1767
|
+
"declarations": [
|
|
1768
|
+
{
|
|
1769
|
+
"kind": "class",
|
|
1770
|
+
"description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
|
|
1771
|
+
"name": "Badge",
|
|
1772
|
+
"slots": [
|
|
1773
|
+
{
|
|
1774
|
+
"description": "The badge content.",
|
|
1775
|
+
"name": ""
|
|
1776
|
+
}
|
|
1777
|
+
],
|
|
1778
|
+
"members": [
|
|
1779
|
+
{
|
|
1780
|
+
"kind": "field",
|
|
1781
|
+
"name": "type",
|
|
1782
|
+
"type": {
|
|
1783
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1784
|
+
},
|
|
1785
|
+
"default": "\"neutral\"",
|
|
1786
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1787
|
+
"attribute": "type",
|
|
1788
|
+
"reflects": true
|
|
1789
|
+
},
|
|
1790
|
+
{
|
|
1791
|
+
"kind": "field",
|
|
1792
|
+
"name": "progress",
|
|
1793
|
+
"type": {
|
|
1794
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
1795
|
+
},
|
|
1796
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
1797
|
+
"attribute": "progress"
|
|
1798
|
+
}
|
|
1799
|
+
],
|
|
1800
|
+
"attributes": [
|
|
1801
|
+
{
|
|
1802
|
+
"name": "type",
|
|
1803
|
+
"type": {
|
|
1804
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1805
|
+
},
|
|
1806
|
+
"default": "\"neutral\"",
|
|
1807
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1808
|
+
"fieldName": "type"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"name": "progress",
|
|
1812
|
+
"type": {
|
|
1813
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
1814
|
+
},
|
|
1815
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
1816
|
+
"fieldName": "progress"
|
|
1817
|
+
}
|
|
1818
|
+
],
|
|
1819
|
+
"superclass": {
|
|
1820
|
+
"name": "LitElement",
|
|
1821
|
+
"package": "lit"
|
|
1822
|
+
},
|
|
1823
|
+
"status": "ready",
|
|
1824
|
+
"category": "text",
|
|
1825
|
+
"displayName": null,
|
|
1826
|
+
"examples": [],
|
|
1827
|
+
"tagName": "nord-badge",
|
|
1828
|
+
"customElement": true
|
|
1829
|
+
}
|
|
1830
|
+
],
|
|
1831
|
+
"exports": [
|
|
1832
|
+
{
|
|
1833
|
+
"kind": "js",
|
|
1834
|
+
"name": "default",
|
|
1827
1835
|
"declaration": {
|
|
1828
|
-
"name": "
|
|
1829
|
-
"module": "src/
|
|
1836
|
+
"name": "Badge",
|
|
1837
|
+
"module": "src/badge/Badge.ts"
|
|
1830
1838
|
}
|
|
1831
1839
|
},
|
|
1832
1840
|
{
|
|
1833
|
-
"kind": "
|
|
1834
|
-
"name": "
|
|
1841
|
+
"kind": "custom-element-definition",
|
|
1842
|
+
"name": "nord-badge",
|
|
1835
1843
|
"declaration": {
|
|
1836
|
-
"name": "
|
|
1837
|
-
"module": "src/
|
|
1844
|
+
"name": "Badge",
|
|
1845
|
+
"module": "src/badge/Badge.ts"
|
|
1838
1846
|
}
|
|
1839
1847
|
}
|
|
1840
1848
|
],
|
|
1841
|
-
"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
|
|
1849
|
+
"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 established variants and color patterns so that users can clearly identify the importance level.\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- 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| `neutral` | The default style variant. |\n| `info` | 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| `progress` | Used to convey something that’s in progress. |\n"
|
|
1842
1850
|
},
|
|
1843
1851
|
{
|
|
1844
1852
|
"kind": "javascript-module",
|
|
@@ -5370,6 +5378,117 @@
|
|
|
5370
5378
|
],
|
|
5371
5379
|
"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 represent thematic breaks between elements.\n- Use when you need to divide sections of content from each other.\n- Use to separate content into clear groups.\n- Use dividers sparingly, to create groupings or to separate items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using for presentational purposes only.\n- Don’t use strong colors in dividers.\n- Don’t use dividers for replacing card components.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Divider uses a role called `separator` which indicates that the element is a divider that separates and distinguishes sections of content or groups of menu items. The implicit ARIA role of the native thematic break (`<hr>` element) is a separator.\n- Dividers have an implicit aria-orientation value of `horizontal` which can be changed using the `direction` property.\n- For more details, please see [ARIA: separator role on MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role).\n"
|
|
5372
5380
|
},
|
|
5381
|
+
{
|
|
5382
|
+
"kind": "javascript-module",
|
|
5383
|
+
"path": "src/drawer/Drawer.ts",
|
|
5384
|
+
"declarations": [
|
|
5385
|
+
{
|
|
5386
|
+
"kind": "class",
|
|
5387
|
+
"description": "Drawer is used to display context-sensitive actions and information.\nDrawer doesn’t block users from completing their task, like a modal would.",
|
|
5388
|
+
"name": "Drawer",
|
|
5389
|
+
"cssProperties": [
|
|
5390
|
+
{
|
|
5391
|
+
"description": "Controls the padding around the main area (the default slot), using our [spacing tokens](/tokens/#space).",
|
|
5392
|
+
"name": "--n-drawer-padding",
|
|
5393
|
+
"default": "var(--n-space-l)"
|
|
5394
|
+
}
|
|
5395
|
+
],
|
|
5396
|
+
"slots": [
|
|
5397
|
+
{
|
|
5398
|
+
"description": "Optional slot that holds a header for the drawer.",
|
|
5399
|
+
"name": "header"
|
|
5400
|
+
},
|
|
5401
|
+
{
|
|
5402
|
+
"description": "Default slot.",
|
|
5403
|
+
"name": ""
|
|
5404
|
+
},
|
|
5405
|
+
{
|
|
5406
|
+
"description": "Optional slot that holds footer content for the drawer.",
|
|
5407
|
+
"name": "footer"
|
|
5408
|
+
}
|
|
5409
|
+
],
|
|
5410
|
+
"members": [
|
|
5411
|
+
{
|
|
5412
|
+
"kind": "field",
|
|
5413
|
+
"name": "footerSlot",
|
|
5414
|
+
"privacy": "private",
|
|
5415
|
+
"default": "new SlotController(this, \"footer\")"
|
|
5416
|
+
},
|
|
5417
|
+
{
|
|
5418
|
+
"kind": "field",
|
|
5419
|
+
"name": "padding",
|
|
5420
|
+
"type": {
|
|
5421
|
+
"text": "\"m\" | \"none\""
|
|
5422
|
+
},
|
|
5423
|
+
"default": "\"m\"",
|
|
5424
|
+
"description": "Controls the padding of the drawer component.",
|
|
5425
|
+
"attribute": "padding",
|
|
5426
|
+
"reflects": true
|
|
5427
|
+
},
|
|
5428
|
+
{
|
|
5429
|
+
"kind": "field",
|
|
5430
|
+
"name": "_warningLogged",
|
|
5431
|
+
"type": {
|
|
5432
|
+
"text": "boolean"
|
|
5433
|
+
},
|
|
5434
|
+
"privacy": "private",
|
|
5435
|
+
"static": true,
|
|
5436
|
+
"default": "false",
|
|
5437
|
+
"inheritedFrom": {
|
|
5438
|
+
"name": "DraftComponentMixin",
|
|
5439
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
],
|
|
5443
|
+
"attributes": [
|
|
5444
|
+
{
|
|
5445
|
+
"name": "padding",
|
|
5446
|
+
"type": {
|
|
5447
|
+
"text": "\"m\" | \"none\""
|
|
5448
|
+
},
|
|
5449
|
+
"default": "\"m\"",
|
|
5450
|
+
"description": "Controls the padding of the drawer component.",
|
|
5451
|
+
"fieldName": "padding"
|
|
5452
|
+
}
|
|
5453
|
+
],
|
|
5454
|
+
"mixins": [
|
|
5455
|
+
{
|
|
5456
|
+
"name": "DraftComponentMixin",
|
|
5457
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
5458
|
+
}
|
|
5459
|
+
],
|
|
5460
|
+
"superclass": {
|
|
5461
|
+
"name": "LitElement",
|
|
5462
|
+
"package": "lit"
|
|
5463
|
+
},
|
|
5464
|
+
"status": "draft",
|
|
5465
|
+
"category": "structure",
|
|
5466
|
+
"displayName": null,
|
|
5467
|
+
"examples": [],
|
|
5468
|
+
"tagName": "nord-drawer",
|
|
5469
|
+
"customElement": true
|
|
5470
|
+
}
|
|
5471
|
+
],
|
|
5472
|
+
"exports": [
|
|
5473
|
+
{
|
|
5474
|
+
"kind": "js",
|
|
5475
|
+
"name": "default",
|
|
5476
|
+
"declaration": {
|
|
5477
|
+
"name": "Drawer",
|
|
5478
|
+
"module": "src/drawer/Drawer.ts"
|
|
5479
|
+
}
|
|
5480
|
+
},
|
|
5481
|
+
{
|
|
5482
|
+
"kind": "custom-element-definition",
|
|
5483
|
+
"name": "nord-drawer",
|
|
5484
|
+
"declaration": {
|
|
5485
|
+
"name": "Drawer",
|
|
5486
|
+
"module": "src/drawer/Drawer.ts"
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
],
|
|
5490
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n"
|
|
5491
|
+
},
|
|
5373
5492
|
{
|
|
5374
5493
|
"kind": "javascript-module",
|
|
5375
5494
|
"path": "src/dropdown/Dropdown.ts",
|
|
@@ -5404,6 +5523,17 @@
|
|
|
5404
5523
|
},
|
|
5405
5524
|
"privacy": "private"
|
|
5406
5525
|
},
|
|
5526
|
+
{
|
|
5527
|
+
"kind": "field",
|
|
5528
|
+
"name": "open",
|
|
5529
|
+
"type": {
|
|
5530
|
+
"text": "boolean"
|
|
5531
|
+
},
|
|
5532
|
+
"default": "false",
|
|
5533
|
+
"description": "Controls whether the dropdown is open or not.",
|
|
5534
|
+
"attribute": "open",
|
|
5535
|
+
"reflects": true
|
|
5536
|
+
},
|
|
5407
5537
|
{
|
|
5408
5538
|
"kind": "field",
|
|
5409
5539
|
"name": "align",
|
|
@@ -5480,9 +5610,23 @@
|
|
|
5480
5610
|
"kind": "method",
|
|
5481
5611
|
"name": "handleOpen",
|
|
5482
5612
|
"privacy": "private"
|
|
5613
|
+
},
|
|
5614
|
+
{
|
|
5615
|
+
"kind": "method",
|
|
5616
|
+
"name": "handleClose",
|
|
5617
|
+
"privacy": "private"
|
|
5483
5618
|
}
|
|
5484
5619
|
],
|
|
5485
5620
|
"attributes": [
|
|
5621
|
+
{
|
|
5622
|
+
"name": "open",
|
|
5623
|
+
"type": {
|
|
5624
|
+
"text": "boolean"
|
|
5625
|
+
},
|
|
5626
|
+
"default": "false",
|
|
5627
|
+
"description": "Controls whether the dropdown is open or not.",
|
|
5628
|
+
"fieldName": "open"
|
|
5629
|
+
},
|
|
5486
5630
|
{
|
|
5487
5631
|
"name": "align",
|
|
5488
5632
|
"type": {
|
|
@@ -6994,6 +7138,11 @@
|
|
|
6994
7138
|
"description": "Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).",
|
|
6995
7139
|
"name": "--n-layout-padding",
|
|
6996
7140
|
"default": "var(--n-space-l)"
|
|
7141
|
+
},
|
|
7142
|
+
{
|
|
7143
|
+
"description": "Controls the width of the drawer area, when used.",
|
|
7144
|
+
"name": "--n-layout-drawer-inline-size",
|
|
7145
|
+
"default": "320px"
|
|
6997
7146
|
}
|
|
6998
7147
|
],
|
|
6999
7148
|
"slots": [
|
|
@@ -7008,6 +7157,10 @@
|
|
|
7008
7157
|
{
|
|
7009
7158
|
"description": "Used to place content inside the header section.",
|
|
7010
7159
|
"name": "header"
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
"description": "Used to place additional content/details relating to a selected item.",
|
|
7163
|
+
"name": "drawer"
|
|
7011
7164
|
}
|
|
7012
7165
|
],
|
|
7013
7166
|
"members": [
|
|
@@ -7019,6 +7172,18 @@
|
|
|
7019
7172
|
},
|
|
7020
7173
|
"privacy": "private"
|
|
7021
7174
|
},
|
|
7175
|
+
{
|
|
7176
|
+
"kind": "field",
|
|
7177
|
+
"name": "navSlot",
|
|
7178
|
+
"privacy": "private",
|
|
7179
|
+
"default": "new SlotController(this, \"nav\")"
|
|
7180
|
+
},
|
|
7181
|
+
{
|
|
7182
|
+
"kind": "field",
|
|
7183
|
+
"name": "drawerSlot",
|
|
7184
|
+
"privacy": "private",
|
|
7185
|
+
"default": "new SlotController(this, \"drawer\")"
|
|
7186
|
+
},
|
|
7022
7187
|
{
|
|
7023
7188
|
"kind": "field",
|
|
7024
7189
|
"name": "direction",
|
|
@@ -8325,11 +8490,25 @@
|
|
|
8325
8490
|
},
|
|
8326
8491
|
"privacy": "private"
|
|
8327
8492
|
},
|
|
8493
|
+
{
|
|
8494
|
+
"kind": "field",
|
|
8495
|
+
"name": "popout",
|
|
8496
|
+
"type": {
|
|
8497
|
+
"text": "HTMLDivElement"
|
|
8498
|
+
},
|
|
8499
|
+
"privacy": "private"
|
|
8500
|
+
},
|
|
8501
|
+
{
|
|
8502
|
+
"kind": "field",
|
|
8503
|
+
"name": "scrollBar",
|
|
8504
|
+
"privacy": "private",
|
|
8505
|
+
"default": "new ScrollbarController(this)"
|
|
8506
|
+
},
|
|
8328
8507
|
{
|
|
8329
8508
|
"kind": "field",
|
|
8330
8509
|
"name": "dismiss",
|
|
8331
8510
|
"privacy": "private",
|
|
8332
|
-
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this && node !== this.targetElement,\n })",
|
|
8511
|
+
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this.popout && node !== this.targetElement,\n })",
|
|
8333
8512
|
"description": "Handle dismissal of the popout, clicking outside the target button and popout."
|
|
8334
8513
|
},
|
|
8335
8514
|
{
|
|
@@ -8344,15 +8523,6 @@
|
|
|
8344
8523
|
"privacy": "private",
|
|
8345
8524
|
"default": "new DirectionController(this)"
|
|
8346
8525
|
},
|
|
8347
|
-
{
|
|
8348
|
-
"kind": "field",
|
|
8349
|
-
"name": "open",
|
|
8350
|
-
"type": {
|
|
8351
|
-
"text": "boolean"
|
|
8352
|
-
},
|
|
8353
|
-
"privacy": "private",
|
|
8354
|
-
"default": "false"
|
|
8355
|
-
},
|
|
8356
8526
|
{
|
|
8357
8527
|
"kind": "field",
|
|
8358
8528
|
"name": "computedPosition",
|
|
@@ -8366,6 +8536,17 @@
|
|
|
8366
8536
|
"name": "smallViewport",
|
|
8367
8537
|
"privacy": "private"
|
|
8368
8538
|
},
|
|
8539
|
+
{
|
|
8540
|
+
"kind": "field",
|
|
8541
|
+
"name": "open",
|
|
8542
|
+
"type": {
|
|
8543
|
+
"text": "boolean"
|
|
8544
|
+
},
|
|
8545
|
+
"default": "false",
|
|
8546
|
+
"description": "Controls whether the popout is open or not.",
|
|
8547
|
+
"attribute": "open",
|
|
8548
|
+
"reflects": true
|
|
8549
|
+
},
|
|
8369
8550
|
{
|
|
8370
8551
|
"kind": "field",
|
|
8371
8552
|
"name": "align",
|
|
@@ -8429,6 +8610,11 @@
|
|
|
8429
8610
|
"name": "handleOpenChange",
|
|
8430
8611
|
"privacy": "protected"
|
|
8431
8612
|
},
|
|
8613
|
+
{
|
|
8614
|
+
"kind": "field",
|
|
8615
|
+
"name": "enableScroll",
|
|
8616
|
+
"privacy": "private"
|
|
8617
|
+
},
|
|
8432
8618
|
{
|
|
8433
8619
|
"kind": "field",
|
|
8434
8620
|
"name": "updatePosition",
|
|
@@ -8470,6 +8656,15 @@
|
|
|
8470
8656
|
}
|
|
8471
8657
|
],
|
|
8472
8658
|
"attributes": [
|
|
8659
|
+
{
|
|
8660
|
+
"name": "open",
|
|
8661
|
+
"type": {
|
|
8662
|
+
"text": "boolean"
|
|
8663
|
+
},
|
|
8664
|
+
"default": "false",
|
|
8665
|
+
"description": "Controls whether the popout is open or not.",
|
|
8666
|
+
"fieldName": "open"
|
|
8667
|
+
},
|
|
8473
8668
|
{
|
|
8474
8669
|
"name": "align",
|
|
8475
8670
|
"type": {
|
|
@@ -12969,41 +13164,6 @@
|
|
|
12969
13164
|
],
|
|
12970
13165
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
|
|
12971
13166
|
},
|
|
12972
|
-
{
|
|
12973
|
-
"kind": "javascript-module",
|
|
12974
|
-
"path": "src/common/decorators/observe.ts",
|
|
12975
|
-
"declarations": [
|
|
12976
|
-
{
|
|
12977
|
-
"kind": "function",
|
|
12978
|
-
"name": "observe",
|
|
12979
|
-
"parameters": [
|
|
12980
|
-
{
|
|
12981
|
-
"name": "propertyName",
|
|
12982
|
-
"type": {
|
|
12983
|
-
"text": "string"
|
|
12984
|
-
}
|
|
12985
|
-
},
|
|
12986
|
-
{
|
|
12987
|
-
"name": "lifecycle",
|
|
12988
|
-
"default": "\"update\"",
|
|
12989
|
-
"type": {
|
|
12990
|
-
"text": "ObserveLifecycle"
|
|
12991
|
-
}
|
|
12992
|
-
}
|
|
12993
|
-
]
|
|
12994
|
-
}
|
|
12995
|
-
],
|
|
12996
|
-
"exports": [
|
|
12997
|
-
{
|
|
12998
|
-
"kind": "js",
|
|
12999
|
-
"name": "observe",
|
|
13000
|
-
"declaration": {
|
|
13001
|
-
"name": "observe",
|
|
13002
|
-
"module": "src/common/decorators/observe.ts"
|
|
13003
|
-
}
|
|
13004
|
-
}
|
|
13005
|
-
]
|
|
13006
|
-
},
|
|
13007
13167
|
{
|
|
13008
13168
|
"kind": "javascript-module",
|
|
13009
13169
|
"path": "src/common/controllers/DirectionController.ts",
|
|
@@ -14036,6 +14196,41 @@
|
|
|
14036
14196
|
}
|
|
14037
14197
|
]
|
|
14038
14198
|
},
|
|
14199
|
+
{
|
|
14200
|
+
"kind": "javascript-module",
|
|
14201
|
+
"path": "src/common/decorators/observe.ts",
|
|
14202
|
+
"declarations": [
|
|
14203
|
+
{
|
|
14204
|
+
"kind": "function",
|
|
14205
|
+
"name": "observe",
|
|
14206
|
+
"parameters": [
|
|
14207
|
+
{
|
|
14208
|
+
"name": "propertyName",
|
|
14209
|
+
"type": {
|
|
14210
|
+
"text": "string"
|
|
14211
|
+
}
|
|
14212
|
+
},
|
|
14213
|
+
{
|
|
14214
|
+
"name": "lifecycle",
|
|
14215
|
+
"default": "\"update\"",
|
|
14216
|
+
"type": {
|
|
14217
|
+
"text": "ObserveLifecycle"
|
|
14218
|
+
}
|
|
14219
|
+
}
|
|
14220
|
+
]
|
|
14221
|
+
}
|
|
14222
|
+
],
|
|
14223
|
+
"exports": [
|
|
14224
|
+
{
|
|
14225
|
+
"kind": "js",
|
|
14226
|
+
"name": "observe",
|
|
14227
|
+
"declaration": {
|
|
14228
|
+
"name": "observe",
|
|
14229
|
+
"module": "src/common/decorators/observe.ts"
|
|
14230
|
+
}
|
|
14231
|
+
}
|
|
14232
|
+
]
|
|
14233
|
+
},
|
|
14039
14234
|
{
|
|
14040
14235
|
"kind": "javascript-module",
|
|
14041
14236
|
"path": "src/common/directives/cond.ts",
|