@nordhealth/components 2.14.0 → 2.15.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.
Files changed (133) hide show
  1. package/custom-elements.json +1607 -1533
  2. package/lib/{AutocompleteMixin-5163f8db.js → AutocompleteMixin-c8018288.js} +2 -2
  3. package/lib/{AutocompleteMixin-5163f8db.js.map → AutocompleteMixin-c8018288.js.map} +1 -1
  4. package/lib/Avatar.js +1 -1
  5. package/lib/Badge.js +1 -1
  6. package/lib/Badge.js.map +1 -1
  7. package/lib/Banner.js +1 -1
  8. package/lib/Banner.js.map +1 -1
  9. package/lib/Button.js +1 -1
  10. package/lib/ButtonGroup.js +1 -1
  11. package/lib/Calendar-55de6612.js +2 -0
  12. package/lib/Calendar-55de6612.js.map +1 -0
  13. package/lib/Calendar.js +1 -1
  14. package/lib/Card.js +1 -1
  15. package/lib/Checkbox.js +1 -1
  16. package/lib/Checkbox.js.map +1 -1
  17. package/lib/CommandMenu.js +1 -1
  18. package/lib/CommandMenu.js.map +1 -1
  19. package/lib/CommandMenuAction.js +1 -1
  20. package/lib/CommandMenuAction.js.map +1 -1
  21. package/lib/{Component-449e40fb.js → Component-d4d6fa77.js} +2 -2
  22. package/lib/Component-d4d6fa77.js.map +1 -0
  23. package/lib/DatePicker.js +1 -1
  24. package/lib/DatePicker.js.map +1 -1
  25. package/lib/DateSelectEvent.js +1 -1
  26. package/lib/Divider.js +1 -1
  27. package/lib/Divider.js.map +1 -1
  28. package/lib/Drawer.js +1 -1
  29. package/lib/Dropdown.js +1 -1
  30. package/lib/Dropdown.js.map +1 -1
  31. package/lib/DropdownGroup.js +1 -1
  32. package/lib/DropdownItem.js +1 -1
  33. package/lib/EmptyState.js +1 -1
  34. package/lib/Fieldset.js +1 -1
  35. package/lib/FocusableMixin-fc1e2a13.js +2 -0
  36. package/lib/{FocusableMixin-32631bff.js.map → FocusableMixin-fc1e2a13.js.map} +1 -1
  37. package/lib/{FormAssociatedMixin-f4da77a8.js → FormAssociatedMixin-ad4d6c08.js} +2 -2
  38. package/lib/{FormAssociatedMixin-f4da77a8.js.map → FormAssociatedMixin-ad4d6c08.js.map} +1 -1
  39. package/lib/{FormField-413f22f5.js → FormField-c733b196.js} +2 -2
  40. package/lib/FormField-c733b196.js.map +1 -0
  41. package/lib/Header.js +1 -1
  42. package/lib/Header.js.map +1 -1
  43. package/lib/Icon.js +1 -1
  44. package/lib/Input.js +1 -1
  45. package/lib/Input.js.map +1 -1
  46. package/lib/{InputMixin-7fa755e1.js → InputMixin-1564ca2a.js} +2 -2
  47. package/lib/{InputMixin-7fa755e1.js.map → InputMixin-1564ca2a.js.map} +1 -1
  48. package/lib/Layout.js +1 -1
  49. package/lib/Layout.js.map +1 -1
  50. package/lib/{LightDomController-052f446a.js → LightDomController-3b7b1f44.js} +2 -2
  51. package/lib/{LightDomController-052f446a.js.map → LightDomController-3b7b1f44.js.map} +1 -1
  52. package/lib/Modal.js +1 -1
  53. package/lib/NavGroup.js +1 -1
  54. package/lib/NavItem.js +1 -1
  55. package/lib/NavToggle.js +1 -1
  56. package/lib/NavToggle.js.map +1 -1
  57. package/lib/Navigation.js +1 -1
  58. package/lib/Popout-66e0a6a6.js +2 -0
  59. package/lib/Popout-66e0a6a6.js.map +1 -0
  60. package/lib/Popout.js +1 -1
  61. package/lib/ProgressBar.js +1 -1
  62. package/lib/Qrcode.js +1 -1
  63. package/lib/Radio.js +1 -1
  64. package/lib/Range.js +1 -1
  65. package/lib/Select.js +1 -1
  66. package/lib/Select.js.map +1 -1
  67. package/lib/SelectEvent.js +1 -1
  68. package/lib/{SizeMixin-4d04817d.js → SizeMixin-9da6dc81.js} +2 -2
  69. package/lib/{SizeMixin-4d04817d.js.map → SizeMixin-9da6dc81.js.map} +1 -1
  70. package/lib/Skeleton.js +1 -1
  71. package/lib/Spinner.js +1 -1
  72. package/lib/Stack.js +1 -1
  73. package/lib/{Sticky-c4cf185e.js → Sticky-64b0b58a.js} +2 -2
  74. package/lib/Sticky-64b0b58a.js.map +1 -0
  75. package/lib/Tab.js +1 -1
  76. package/lib/TabGroup.js +1 -1
  77. package/lib/TabPanel.js +1 -1
  78. package/lib/Table.js +1 -1
  79. package/lib/{TextField-ca819c35.js → TextField-6a272cd7.js} +2 -2
  80. package/lib/{TextField-ca819c35.js.map → TextField-6a272cd7.js.map} +1 -1
  81. package/lib/Textarea.js +1 -1
  82. package/lib/Toast.js +1 -1
  83. package/lib/Toast.js.map +1 -1
  84. package/lib/ToastGroup.js +1 -1
  85. package/lib/Toggle.js +1 -1
  86. package/lib/Tooltip.js +1 -1
  87. package/lib/VisuallyHidden.js +1 -1
  88. package/lib/bundle.js +11 -12
  89. package/lib/bundle.js.map +1 -1
  90. package/lib/class-map-1bc3148f.js +7 -0
  91. package/lib/{class-map-21152cee.js.map → class-map-1bc3148f.js.map} +1 -1
  92. package/lib/{collection-7eee4e72.js → collection-a0cd49b2.js} +2 -2
  93. package/lib/{collection-7eee4e72.js.map → collection-a0cd49b2.js.map} +1 -1
  94. package/lib/cond-8e7df9cf.js +2 -0
  95. package/lib/{cond-2da54107.js.map → cond-8e7df9cf.js.map} +1 -1
  96. package/lib/events-5337a6d7.js +2 -0
  97. package/lib/events-5337a6d7.js.map +1 -0
  98. package/lib/{if-defined-720964c0.js → if-defined-718a58b2.js} +2 -2
  99. package/lib/{if-defined-720964c0.js.map → if-defined-718a58b2.js.map} +1 -1
  100. package/lib/index.js +1 -1
  101. package/lib/interface-close-small-f26b0299.js +2 -0
  102. package/lib/interface-close-small-f26b0299.js.map +1 -0
  103. package/lib/positioning-acf73137.js +2 -0
  104. package/lib/positioning-acf73137.js.map +1 -0
  105. package/lib/query-assigned-elements-89f41e17.js +34 -0
  106. package/lib/query-assigned-elements-89f41e17.js.map +1 -0
  107. package/lib/{ref-c44e9f3c.js → ref-4265fcf9.js} +4 -4
  108. package/lib/{ref-c44e9f3c.js.map → ref-4265fcf9.js.map} +1 -1
  109. package/lib/src/common/events.d.ts +2 -0
  110. package/lib/src/dropdown/Dropdown.d.ts +6 -2
  111. package/lib/src/layout/Layout.d.ts +5 -0
  112. package/lib/src/popout/Popout.d.ts +8 -5
  113. package/lib/{style-map-2e8fcab6.js → style-map-c63c0180.js} +2 -2
  114. package/lib/{style-map-2e8fcab6.js.map → style-map-c63c0180.js.map} +1 -1
  115. package/package.json +3 -3
  116. package/lib/Calendar-e8cd9558.js +0 -2
  117. package/lib/Calendar-e8cd9558.js.map +0 -1
  118. package/lib/Component-449e40fb.js.map +0 -1
  119. package/lib/FocusableMixin-32631bff.js +0 -2
  120. package/lib/FormField-413f22f5.js.map +0 -1
  121. package/lib/Popout-dae54e30.js +0 -2
  122. package/lib/Popout-dae54e30.js.map +0 -1
  123. package/lib/Sticky-c4cf185e.js.map +0 -1
  124. package/lib/class-map-21152cee.js +0 -7
  125. package/lib/cond-2da54107.js +0 -2
  126. package/lib/events-731d0007.js +0 -2
  127. package/lib/events-731d0007.js.map +0 -1
  128. package/lib/interface-close-small-44ababc3.js +0 -2
  129. package/lib/interface-close-small-44ababc3.js.map +0 -1
  130. package/lib/positioning-3bbd3548.js +0 -2
  131. package/lib/positioning-3bbd3548.js.map +0 -1
  132. package/lib/query-assigned-elements-cf502539.js +0 -35
  133. package/lib/query-assigned-elements-cf502539.js.map +0 -1
@@ -1190,93 +1190,6 @@
1190
1190
  }
1191
1191
  ]
1192
1192
  },
1193
- {
1194
- "kind": "javascript-module",
1195
- "path": "src/badge/Badge.ts",
1196
- "declarations": [
1197
- {
1198
- "kind": "class",
1199
- "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.",
1200
- "name": "Badge",
1201
- "slots": [
1202
- {
1203
- "description": "The badge content.",
1204
- "name": ""
1205
- }
1206
- ],
1207
- "members": [
1208
- {
1209
- "kind": "field",
1210
- "name": "type",
1211
- "type": {
1212
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1213
- },
1214
- "default": "\"neutral\"",
1215
- "description": "The type of badge.\nDetermines the background color of the badge.",
1216
- "attribute": "type",
1217
- "reflects": true
1218
- },
1219
- {
1220
- "kind": "field",
1221
- "name": "progress",
1222
- "type": {
1223
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1224
- },
1225
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1226
- "attribute": "progress"
1227
- }
1228
- ],
1229
- "attributes": [
1230
- {
1231
- "name": "type",
1232
- "type": {
1233
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1234
- },
1235
- "default": "\"neutral\"",
1236
- "description": "The type of badge.\nDetermines the background color of the badge.",
1237
- "fieldName": "type"
1238
- },
1239
- {
1240
- "name": "progress",
1241
- "type": {
1242
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1243
- },
1244
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1245
- "fieldName": "progress"
1246
- }
1247
- ],
1248
- "superclass": {
1249
- "name": "LitElement",
1250
- "package": "lit"
1251
- },
1252
- "localization": [],
1253
- "status": "ready",
1254
- "category": "text",
1255
- "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",
1256
- "examples": [],
1257
- "tagName": "nord-badge",
1258
- "customElement": true
1259
- }
1260
- ],
1261
- "exports": [
1262
- {
1263
- "kind": "js",
1264
- "name": "default",
1265
- "declaration": {
1266
- "name": "Badge",
1267
- "module": "src/badge/Badge.ts"
1268
- }
1269
- },
1270
- {
1271
- "kind": "custom-element-definition",
1272
- "name": "nord-badge",
1273
- "declaration": {
1274
- "name": "Badge",
1275
- "module": "src/badge/Badge.ts"
1276
- }
1277
- }
1278
- ]
1279
- },
1280
1193
  {
1281
1194
  "kind": "javascript-module",
1282
1195
  "path": "src/button-group/ButtonGroup.ts",
@@ -1401,432 +1314,744 @@
1401
1314
  },
1402
1315
  {
1403
1316
  "kind": "javascript-module",
1404
- "path": "src/calendar/Calendar.ts",
1317
+ "path": "src/badge/Badge.ts",
1405
1318
  "declarations": [
1406
1319
  {
1407
1320
  "kind": "class",
1408
- "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.",
1409
- "name": "Calendar",
1410
- "cssProperties": [
1411
- {
1412
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1413
- "name": "--n-calendar-border-radius",
1414
- "default": "var(--n-border-radius)"
1415
- },
1321
+ "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.",
1322
+ "name": "Badge",
1323
+ "slots": [
1416
1324
  {
1417
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1418
- "name": "--n-calendar-box-shadow",
1419
- "default": "var(--n-box-shadow-popout)"
1325
+ "description": "The badge content.",
1326
+ "name": ""
1420
1327
  }
1421
1328
  ],
1422
1329
  "members": [
1423
1330
  {
1424
1331
  "kind": "field",
1425
- "name": "monthSelectNode",
1332
+ "name": "type",
1426
1333
  "type": {
1427
- "text": "HTMLElement"
1334
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1428
1335
  },
1429
- "privacy": "private"
1336
+ "default": "\"neutral\"",
1337
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1338
+ "attribute": "type",
1339
+ "reflects": true
1430
1340
  },
1431
1341
  {
1432
1342
  "kind": "field",
1433
- "name": "focusedDayNode",
1343
+ "name": "progress",
1434
1344
  "type": {
1435
- "text": "HTMLButtonElement"
1345
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1436
1346
  },
1437
- "privacy": "private"
1438
- },
1347
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1348
+ "attribute": "progress"
1349
+ }
1350
+ ],
1351
+ "attributes": [
1439
1352
  {
1440
- "kind": "field",
1441
- "name": "direction",
1442
- "privacy": "private",
1443
- "default": "new DirectionController(this)"
1353
+ "name": "type",
1354
+ "type": {
1355
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1356
+ },
1357
+ "default": "\"neutral\"",
1358
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1359
+ "fieldName": "type"
1444
1360
  },
1445
1361
  {
1446
- "kind": "field",
1447
- "name": "swipe",
1448
- "privacy": "private",
1449
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1362
+ "name": "progress",
1363
+ "type": {
1364
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1365
+ },
1366
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1367
+ "fieldName": "progress"
1368
+ }
1369
+ ],
1370
+ "superclass": {
1371
+ "name": "LitElement",
1372
+ "package": "lit"
1373
+ },
1374
+ "localization": [],
1375
+ "status": "ready",
1376
+ "category": "text",
1377
+ "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",
1378
+ "examples": [],
1379
+ "tagName": "nord-badge",
1380
+ "customElement": true
1381
+ }
1382
+ ],
1383
+ "exports": [
1384
+ {
1385
+ "kind": "js",
1386
+ "name": "default",
1387
+ "declaration": {
1388
+ "name": "Badge",
1389
+ "module": "src/badge/Badge.ts"
1390
+ }
1391
+ },
1392
+ {
1393
+ "kind": "custom-element-definition",
1394
+ "name": "nord-badge",
1395
+ "declaration": {
1396
+ "name": "Badge",
1397
+ "module": "src/badge/Badge.ts"
1398
+ }
1399
+ }
1400
+ ]
1401
+ },
1402
+ {
1403
+ "kind": "javascript-module",
1404
+ "path": "src/checkbox/Checkbox.ts",
1405
+ "declarations": [
1406
+ {
1407
+ "kind": "class",
1408
+ "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
1409
+ "name": "Checkbox",
1410
+ "slots": [
1411
+ {
1412
+ "description": "Use when a label requires more than plain text.",
1413
+ "name": "label"
1450
1414
  },
1451
1415
  {
1452
- "kind": "field",
1453
- "name": "shortcuts",
1454
- "privacy": "private"
1416
+ "description": "Optional slot that holds hint text for the input.",
1417
+ "name": "hint"
1455
1418
  },
1419
+ {
1420
+ "description": "Optional slot that holds error text for the input.",
1421
+ "name": "error"
1422
+ }
1423
+ ],
1424
+ "members": [
1456
1425
  {
1457
1426
  "kind": "field",
1458
- "name": "localize",
1459
- "privacy": "private",
1460
- "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1427
+ "name": "formValue",
1428
+ "privacy": "protected",
1429
+ "inheritedFrom": {
1430
+ "name": "FormAssociatedMixin",
1431
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1432
+ }
1461
1433
  },
1462
1434
  {
1463
1435
  "kind": "field",
1464
- "name": "dateFormatShort",
1436
+ "name": "indeterminate",
1465
1437
  "type": {
1466
- "text": "Intl.DateTimeFormat"
1438
+ "text": "boolean"
1467
1439
  },
1468
- "privacy": "private",
1469
- "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"
1440
+ "default": "false",
1441
+ "description": "Controls whether the checkbox is in an indeterminate state.",
1442
+ "attribute": "indeterminate"
1470
1443
  },
1471
1444
  {
1472
1445
  "kind": "field",
1473
- "name": "monthNames",
1446
+ "name": "checked",
1474
1447
  "type": {
1475
- "text": "string[]"
1448
+ "text": "boolean"
1476
1449
  },
1477
- "privacy": "private"
1450
+ "default": "false",
1451
+ "description": "Controls whether the checkbox is checked or not.",
1452
+ "attribute": "checked"
1478
1453
  },
1479
1454
  {
1480
- "kind": "field",
1481
- "name": "monthNamesShort",
1482
- "type": {
1483
- "text": "string[]"
1455
+ "kind": "method",
1456
+ "name": "handleChange",
1457
+ "privacy": "protected",
1458
+ "parameters": [
1459
+ {
1460
+ "name": "e",
1461
+ "type": {
1462
+ "text": "Event"
1463
+ }
1464
+ }
1465
+ ],
1466
+ "return": {
1467
+ "type": {
1468
+ "text": "void"
1469
+ }
1484
1470
  },
1485
- "privacy": "private"
1471
+ "inheritedFrom": {
1472
+ "name": "FormAssociatedMixin",
1473
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1474
+ }
1486
1475
  },
1487
1476
  {
1488
1477
  "kind": "field",
1489
- "name": "dayNames",
1478
+ "name": "size",
1490
1479
  "type": {
1491
- "text": "string[]"
1480
+ "text": "\"s\" | \"m\" | \"l\""
1492
1481
  },
1493
- "privacy": "private"
1482
+ "default": "\"m\"",
1483
+ "description": "The size of the component.",
1484
+ "attribute": "size",
1485
+ "reflects": true,
1486
+ "inheritedFrom": {
1487
+ "name": "SizeMixin",
1488
+ "module": "src/common/mixins/SizeMixin.ts"
1489
+ }
1494
1490
  },
1495
1491
  {
1496
1492
  "kind": "field",
1497
- "name": "dayNamesShort",
1493
+ "name": "labelSlot",
1494
+ "privacy": "protected",
1495
+ "default": "new SlotController(this, \"label\")",
1496
+ "inheritedFrom": {
1497
+ "name": "FormAssociatedMixin",
1498
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1499
+ }
1500
+ },
1501
+ {
1502
+ "kind": "field",
1503
+ "name": "errorSlot",
1504
+ "privacy": "protected",
1505
+ "default": "new SlotController(this, \"error\")",
1506
+ "inheritedFrom": {
1507
+ "name": "FormAssociatedMixin",
1508
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1509
+ }
1510
+ },
1511
+ {
1512
+ "kind": "field",
1513
+ "name": "hintSlot",
1514
+ "privacy": "protected",
1515
+ "default": "new SlotController(this, \"hint\")",
1516
+ "inheritedFrom": {
1517
+ "name": "FormAssociatedMixin",
1518
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1519
+ }
1520
+ },
1521
+ {
1522
+ "kind": "field",
1523
+ "name": "formData",
1524
+ "privacy": "protected",
1525
+ "default": "new FormDataController(this, { value: () => this.formValue })",
1526
+ "inheritedFrom": {
1527
+ "name": "FormAssociatedMixin",
1528
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1529
+ }
1530
+ },
1531
+ {
1532
+ "kind": "field",
1533
+ "name": "inputId",
1498
1534
  "type": {
1499
- "text": "string[]"
1535
+ "text": "string"
1500
1536
  },
1501
- "privacy": "private"
1537
+ "privacy": "protected",
1538
+ "default": "\"input\"",
1539
+ "inheritedFrom": {
1540
+ "name": "FormAssociatedMixin",
1541
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1542
+ }
1502
1543
  },
1503
1544
  {
1504
1545
  "kind": "field",
1505
- "name": "value",
1546
+ "name": "errorId",
1506
1547
  "type": {
1507
1548
  "text": "string"
1508
1549
  },
1509
- "default": "\"\"",
1510
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1511
- "attribute": "value"
1550
+ "privacy": "protected",
1551
+ "default": "\"error\"",
1552
+ "inheritedFrom": {
1553
+ "name": "FormAssociatedMixin",
1554
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1555
+ }
1512
1556
  },
1513
1557
  {
1514
1558
  "kind": "field",
1515
- "name": "firstDayOfWeek",
1559
+ "name": "hintId",
1516
1560
  "type": {
1517
- "text": "DaysOfWeek"
1561
+ "text": "string"
1518
1562
  },
1519
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1520
- "attribute": "firstDayOfWeek"
1563
+ "privacy": "protected",
1564
+ "default": "\"hint\"",
1565
+ "inheritedFrom": {
1566
+ "name": "FormAssociatedMixin",
1567
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1568
+ }
1521
1569
  },
1522
1570
  {
1523
1571
  "kind": "field",
1524
- "name": "min",
1572
+ "name": "label",
1525
1573
  "type": {
1526
1574
  "text": "string"
1527
1575
  },
1528
1576
  "default": "\"\"",
1529
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
1530
- "attribute": "min"
1577
+ "description": "Label for the input.",
1578
+ "attribute": "label",
1579
+ "inheritedFrom": {
1580
+ "name": "FormAssociatedMixin",
1581
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1582
+ }
1531
1583
  },
1532
1584
  {
1533
1585
  "kind": "field",
1534
- "name": "max",
1586
+ "name": "hint",
1535
1587
  "type": {
1536
- "text": "string"
1588
+ "text": "string | undefined"
1537
1589
  },
1538
- "default": "\"\"",
1539
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
1540
- "attribute": "max"
1590
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1591
+ "attribute": "hint",
1592
+ "inheritedFrom": {
1593
+ "name": "FormAssociatedMixin",
1594
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1595
+ }
1541
1596
  },
1542
1597
  {
1543
1598
  "kind": "field",
1544
- "name": "expand",
1599
+ "name": "hideLabel",
1545
1600
  "type": {
1546
1601
  "text": "boolean"
1547
1602
  },
1548
1603
  "default": "false",
1549
- "description": "Controls whether the calendar expands to fill the width of its container.",
1550
- "attribute": "expand",
1551
- "reflects": true
1604
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1605
+ "attribute": "hide-label",
1606
+ "inheritedFrom": {
1607
+ "name": "FormAssociatedMixin",
1608
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1609
+ }
1552
1610
  },
1553
1611
  {
1554
1612
  "kind": "field",
1555
- "name": "isDateDisabled",
1613
+ "name": "placeholder",
1556
1614
  "type": {
1557
- "text": "DatePredicate"
1615
+ "text": "string | undefined"
1558
1616
  },
1559
- "default": "isDateDisabled",
1560
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1617
+ "description": "Placeholder text to display within the input.",
1618
+ "attribute": "placeholder",
1619
+ "inheritedFrom": {
1620
+ "name": "FormAssociatedMixin",
1621
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1622
+ }
1561
1623
  },
1562
1624
  {
1563
1625
  "kind": "field",
1564
- "name": "isDateHighlighted",
1626
+ "name": "error",
1565
1627
  "type": {
1566
- "text": "(date: Date) => string | boolean"
1628
+ "text": "string | undefined"
1567
1629
  },
1568
- "default": "isDateHighlighted",
1569
- "description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
1630
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1631
+ "attribute": "error",
1632
+ "inheritedFrom": {
1633
+ "name": "FormAssociatedMixin",
1634
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1635
+ }
1570
1636
  },
1571
1637
  {
1572
1638
  "kind": "field",
1573
- "name": "activeFocus",
1639
+ "name": "required",
1574
1640
  "type": {
1575
1641
  "text": "boolean"
1576
1642
  },
1577
- "privacy": "private",
1578
- "default": "false"
1579
- },
1580
- {
1581
- "kind": "field",
1582
- "name": "focusedDay",
1583
- "privacy": "private",
1584
- "default": "new Date()"
1585
- },
1586
- {
1587
- "kind": "method",
1588
- "name": "focus",
1589
- "parameters": [
1590
- {
1591
- "name": "options",
1592
- "optional": true,
1593
- "type": {
1594
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1595
- },
1596
- "description": "An object which controls aspects of the focusing process."
1597
- }
1598
- ],
1599
- "description": "Programmatically move focus to the calendar."
1600
- },
1601
- {
1602
- "kind": "method",
1603
- "name": "handleValueChange",
1604
- "privacy": "protected"
1605
- },
1606
- {
1607
- "kind": "method",
1608
- "name": "handleFocusedDayChange",
1609
- "privacy": "protected"
1610
- },
1611
- {
1612
- "kind": "method",
1613
- "name": "handleLangChange",
1614
- "privacy": "private"
1643
+ "default": "false",
1644
+ "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.",
1645
+ "attribute": "required",
1646
+ "inheritedFrom": {
1647
+ "name": "FormAssociatedMixin",
1648
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1649
+ }
1615
1650
  },
1616
1651
  {
1617
1652
  "kind": "field",
1618
- "name": "handleDaySelect",
1619
- "privacy": "private"
1653
+ "name": "hideRequired",
1654
+ "type": {
1655
+ "text": "boolean"
1656
+ },
1657
+ "default": "false",
1658
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
1659
+ "attribute": "hide-required",
1660
+ "inheritedFrom": {
1661
+ "name": "FormAssociatedMixin",
1662
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1663
+ }
1620
1664
  },
1621
1665
  {
1622
1666
  "kind": "method",
1623
- "name": "addDays",
1624
- "privacy": "private",
1667
+ "name": "handleInput",
1668
+ "privacy": "protected",
1625
1669
  "parameters": [
1626
1670
  {
1627
- "name": "days",
1671
+ "name": "e",
1628
1672
  "type": {
1629
- "text": "number"
1673
+ "text": "Event"
1630
1674
  }
1631
1675
  }
1632
- ]
1676
+ ],
1677
+ "inheritedFrom": {
1678
+ "name": "FormAssociatedMixin",
1679
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1680
+ }
1633
1681
  },
1634
1682
  {
1635
1683
  "kind": "method",
1636
- "name": "addMonths",
1637
- "privacy": "private",
1684
+ "name": "renderLabel",
1685
+ "privacy": "protected",
1638
1686
  "parameters": [
1639
1687
  {
1640
- "name": "months",
1688
+ "name": "additionalContent",
1689
+ "optional": true,
1641
1690
  "type": {
1642
- "text": "number"
1691
+ "text": "TemplateResult"
1643
1692
  }
1644
1693
  }
1645
- ]
1694
+ ],
1695
+ "inheritedFrom": {
1696
+ "name": "FormAssociatedMixin",
1697
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1698
+ }
1646
1699
  },
1647
1700
  {
1648
1701
  "kind": "method",
1649
- "name": "addYears",
1650
- "privacy": "private",
1651
- "parameters": [
1652
- {
1653
- "name": "years",
1654
- "type": {
1655
- "text": "number"
1656
- }
1657
- }
1658
- ]
1702
+ "name": "renderError",
1703
+ "privacy": "protected",
1704
+ "inheritedFrom": {
1705
+ "name": "FormAssociatedMixin",
1706
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1707
+ }
1659
1708
  },
1660
1709
  {
1661
1710
  "kind": "method",
1662
- "name": "startOfWeek",
1663
- "privacy": "private"
1711
+ "name": "getDescribedBy",
1712
+ "privacy": "protected",
1713
+ "inheritedFrom": {
1714
+ "name": "FormAssociatedMixin",
1715
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1716
+ }
1664
1717
  },
1665
1718
  {
1666
1719
  "kind": "method",
1667
- "name": "endOfWeek",
1668
- "privacy": "private"
1720
+ "name": "getInvalid",
1721
+ "privacy": "protected",
1722
+ "inheritedFrom": {
1723
+ "name": "FormAssociatedMixin",
1724
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1725
+ }
1669
1726
  },
1670
1727
  {
1671
- "kind": "method",
1672
- "name": "setMonth",
1673
- "privacy": "private",
1674
- "parameters": [
1675
- {
1676
- "name": "month",
1677
- "type": {
1678
- "text": "number"
1679
- }
1680
- }
1681
- ]
1728
+ "kind": "field",
1729
+ "name": "hasHint",
1730
+ "privacy": "protected",
1731
+ "inheritedFrom": {
1732
+ "name": "FormAssociatedMixin",
1733
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1734
+ }
1682
1735
  },
1683
1736
  {
1684
- "kind": "method",
1685
- "name": "setYear",
1686
- "privacy": "private",
1687
- "parameters": [
1688
- {
1689
- "name": "year",
1690
- "type": {
1691
- "text": "number"
1692
- }
1693
- }
1694
- ]
1737
+ "kind": "field",
1738
+ "name": "hasError",
1739
+ "privacy": "protected",
1740
+ "inheritedFrom": {
1741
+ "name": "FormAssociatedMixin",
1742
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1743
+ }
1695
1744
  },
1696
1745
  {
1697
- "kind": "method",
1698
- "name": "setFocusedDay",
1699
- "privacy": "private",
1700
- "parameters": [
1701
- {
1702
- "name": "day",
1703
- "type": {
1704
- "text": "Date"
1705
- }
1706
- }
1707
- ]
1746
+ "kind": "field",
1747
+ "name": "disabled",
1748
+ "type": {
1749
+ "text": "boolean"
1750
+ },
1751
+ "default": "false",
1752
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1753
+ "attribute": "disabled",
1754
+ "reflects": true,
1755
+ "inheritedFrom": {
1756
+ "name": "InputMixin",
1757
+ "module": "src/common/mixins/InputMixin.ts"
1758
+ }
1708
1759
  },
1709
1760
  {
1710
1761
  "kind": "field",
1711
- "name": "handleMonthSelect",
1712
- "privacy": "private"
1762
+ "name": "name",
1763
+ "type": {
1764
+ "text": "string | undefined"
1765
+ },
1766
+ "description": "The name of the form component.",
1767
+ "attribute": "name",
1768
+ "inheritedFrom": {
1769
+ "name": "InputMixin",
1770
+ "module": "src/common/mixins/InputMixin.ts"
1771
+ }
1713
1772
  },
1714
1773
  {
1715
1774
  "kind": "field",
1716
- "name": "handleYearSelect",
1717
- "privacy": "private"
1775
+ "name": "value",
1776
+ "type": {
1777
+ "text": "string"
1778
+ },
1779
+ "default": "\"\"",
1780
+ "description": "The value of the form component.",
1781
+ "attribute": "value",
1782
+ "inheritedFrom": {
1783
+ "name": "InputMixin",
1784
+ "module": "src/common/mixins/InputMixin.ts"
1785
+ }
1718
1786
  },
1719
1787
  {
1720
1788
  "kind": "field",
1721
- "name": "handleNextMonthClick",
1722
- "privacy": "private"
1789
+ "name": "form",
1790
+ "description": "Gets the form, if any, associated with the form element.",
1791
+ "inheritedFrom": {
1792
+ "name": "InputMixin",
1793
+ "module": "src/common/mixins/InputMixin.ts"
1794
+ }
1723
1795
  },
1724
1796
  {
1725
1797
  "kind": "field",
1726
- "name": "handlePreviousMonthClick",
1727
- "privacy": "private"
1798
+ "name": "focusableRef",
1799
+ "privacy": "protected",
1800
+ "inheritedFrom": {
1801
+ "name": "FocusableMixin",
1802
+ "module": "src/common/mixins/FocusableMixin.ts"
1803
+ }
1728
1804
  },
1729
1805
  {
1730
- "kind": "field",
1731
- "name": "enableActiveFocus",
1732
- "privacy": "private"
1806
+ "kind": "method",
1807
+ "name": "focus",
1808
+ "parameters": [
1809
+ {
1810
+ "name": "options",
1811
+ "optional": true,
1812
+ "type": {
1813
+ "text": "FocusOptions"
1814
+ },
1815
+ "description": "An object which controls aspects of the focusing process."
1816
+ }
1817
+ ],
1818
+ "description": "Programmatically move focus to the component.",
1819
+ "inheritedFrom": {
1820
+ "name": "FocusableMixin",
1821
+ "module": "src/common/mixins/FocusableMixin.ts"
1822
+ }
1733
1823
  },
1734
1824
  {
1735
- "kind": "field",
1736
- "name": "disableActiveFocus",
1737
- "privacy": "private"
1825
+ "kind": "method",
1826
+ "name": "blur",
1827
+ "description": "Programmatically remove focus from the component.",
1828
+ "inheritedFrom": {
1829
+ "name": "FocusableMixin",
1830
+ "module": "src/common/mixins/FocusableMixin.ts"
1831
+ }
1832
+ },
1833
+ {
1834
+ "kind": "method",
1835
+ "name": "click",
1836
+ "description": "Programmatically simulates a click on the component.",
1837
+ "inheritedFrom": {
1838
+ "name": "FocusableMixin",
1839
+ "module": "src/common/mixins/FocusableMixin.ts"
1840
+ }
1738
1841
  }
1739
1842
  ],
1740
- "events": [
1843
+ "attributes": [
1741
1844
  {
1742
- "name": "nord-focus-date",
1845
+ "name": "indeterminate",
1743
1846
  "type": {
1744
- "text": "DateSelectEvent"
1847
+ "text": "boolean"
1745
1848
  },
1746
- "description": "Dispatched when the calendar's focused date changes."
1849
+ "default": "false",
1850
+ "description": "Controls whether the checkbox is in an indeterminate state.",
1851
+ "fieldName": "indeterminate"
1747
1852
  },
1748
1853
  {
1854
+ "name": "checked",
1749
1855
  "type": {
1750
- "text": "DateSelectEvent"
1751
- },
1752
- "description": "Dispatched when a date is selected and the value changes.",
1753
- "name": "change"
1754
- }
1755
- ],
1756
- "attributes": [
1757
- {
1758
- "name": "value",
1759
- "type": {
1760
- "text": "string"
1856
+ "text": "boolean"
1761
1857
  },
1762
- "default": "\"\"",
1763
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1764
- "fieldName": "value"
1858
+ "default": "false",
1859
+ "description": "Controls whether the checkbox is checked or not.",
1860
+ "fieldName": "checked"
1765
1861
  },
1766
1862
  {
1767
- "name": "firstDayOfWeek",
1863
+ "name": "size",
1768
1864
  "type": {
1769
- "text": "DaysOfWeek"
1865
+ "text": "\"s\" | \"m\" | \"l\""
1770
1866
  },
1771
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1772
- "fieldName": "firstDayOfWeek"
1867
+ "default": "\"m\"",
1868
+ "description": "The size of the component.",
1869
+ "fieldName": "size",
1870
+ "inheritedFrom": {
1871
+ "name": "SizeMixin",
1872
+ "module": "src/common/mixins/SizeMixin.ts"
1873
+ }
1773
1874
  },
1774
1875
  {
1775
- "name": "min",
1876
+ "name": "label",
1776
1877
  "type": {
1777
1878
  "text": "string"
1778
1879
  },
1779
1880
  "default": "\"\"",
1780
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
1781
- "fieldName": "min"
1881
+ "description": "Label for the input.",
1882
+ "fieldName": "label",
1883
+ "inheritedFrom": {
1884
+ "name": "FormAssociatedMixin",
1885
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1886
+ }
1782
1887
  },
1783
1888
  {
1784
- "name": "max",
1889
+ "name": "hint",
1785
1890
  "type": {
1786
- "text": "string"
1891
+ "text": "string | undefined"
1787
1892
  },
1788
- "default": "\"\"",
1789
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
1790
- "fieldName": "max"
1893
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1894
+ "fieldName": "hint",
1895
+ "inheritedFrom": {
1896
+ "name": "FormAssociatedMixin",
1897
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1898
+ }
1791
1899
  },
1792
1900
  {
1793
- "name": "expand",
1901
+ "name": "hide-label",
1794
1902
  "type": {
1795
1903
  "text": "boolean"
1796
1904
  },
1797
1905
  "default": "false",
1798
- "description": "Controls whether the calendar expands to fill the width of its container.",
1799
- "fieldName": "expand"
1800
- }
1801
- ],
1802
- "superclass": {
1803
- "name": "LitElement",
1804
- "package": "lit"
1805
- },
1806
- "localization": [
1807
- {
1808
- "name": "prevMonthLabel",
1809
- "description": "Accessible label for the previous month button."
1906
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1907
+ "fieldName": "hideLabel",
1908
+ "inheritedFrom": {
1909
+ "name": "FormAssociatedMixin",
1910
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1911
+ }
1810
1912
  },
1811
1913
  {
1812
- "name": "nextMonthLabel",
1813
- "description": "Accessible label for the next month button."
1914
+ "name": "placeholder",
1915
+ "type": {
1916
+ "text": "string | undefined"
1917
+ },
1918
+ "description": "Placeholder text to display within the input.",
1919
+ "fieldName": "placeholder",
1920
+ "inheritedFrom": {
1921
+ "name": "FormAssociatedMixin",
1922
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1923
+ }
1814
1924
  },
1815
1925
  {
1816
- "name": "monthSelectLabel",
1817
- "description": "Accessible label for the month select."
1926
+ "name": "error",
1927
+ "type": {
1928
+ "text": "string | undefined"
1929
+ },
1930
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1931
+ "fieldName": "error",
1932
+ "inheritedFrom": {
1933
+ "name": "FormAssociatedMixin",
1934
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1935
+ }
1818
1936
  },
1819
1937
  {
1820
- "name": "yearSelectLabel",
1821
- "description": "Accessible label for the year select."
1938
+ "name": "required",
1939
+ "type": {
1940
+ "text": "boolean"
1941
+ },
1942
+ "default": "false",
1943
+ "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.",
1944
+ "fieldName": "required",
1945
+ "inheritedFrom": {
1946
+ "name": "FormAssociatedMixin",
1947
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1948
+ }
1949
+ },
1950
+ {
1951
+ "name": "hide-required",
1952
+ "type": {
1953
+ "text": "boolean"
1954
+ },
1955
+ "default": "false",
1956
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
1957
+ "fieldName": "hideRequired",
1958
+ "inheritedFrom": {
1959
+ "name": "FormAssociatedMixin",
1960
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1961
+ }
1962
+ },
1963
+ {
1964
+ "name": "disabled",
1965
+ "type": {
1966
+ "text": "boolean"
1967
+ },
1968
+ "default": "false",
1969
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1970
+ "fieldName": "disabled",
1971
+ "inheritedFrom": {
1972
+ "name": "InputMixin",
1973
+ "module": "src/common/mixins/InputMixin.ts"
1974
+ }
1975
+ },
1976
+ {
1977
+ "name": "name",
1978
+ "type": {
1979
+ "text": "string | undefined"
1980
+ },
1981
+ "description": "The name of the form component.",
1982
+ "fieldName": "name",
1983
+ "inheritedFrom": {
1984
+ "name": "InputMixin",
1985
+ "module": "src/common/mixins/InputMixin.ts"
1986
+ }
1987
+ },
1988
+ {
1989
+ "name": "value",
1990
+ "type": {
1991
+ "text": "string"
1992
+ },
1993
+ "default": "\"\"",
1994
+ "description": "The value of the form component.",
1995
+ "fieldName": "value",
1996
+ "inheritedFrom": {
1997
+ "name": "InputMixin",
1998
+ "module": "src/common/mixins/InputMixin.ts"
1999
+ }
1822
2000
  }
1823
2001
  ],
2002
+ "mixins": [
2003
+ {
2004
+ "name": "SizeMixin",
2005
+ "module": "/src/common/mixins/SizeMixin.js"
2006
+ },
2007
+ {
2008
+ "name": "FormAssociatedMixin",
2009
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
2010
+ },
2011
+ {
2012
+ "name": "InputMixin",
2013
+ "module": "/src/common/mixins/InputMixin.js"
2014
+ },
2015
+ {
2016
+ "name": "FocusableMixin",
2017
+ "module": "/src/common/mixins/FocusableMixin.js"
2018
+ }
2019
+ ],
2020
+ "superclass": {
2021
+ "name": "LitElement",
2022
+ "package": "lit"
2023
+ },
2024
+ "localization": [],
1824
2025
  "status": "ready",
1825
- "category": "list",
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 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",
2026
+ "category": "form",
2027
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
1827
2028
  "examples": [],
1828
- "tagName": "nord-calendar",
1829
- "customElement": true
2029
+ "tagName": "nord-checkbox",
2030
+ "customElement": true,
2031
+ "events": [
2032
+ {
2033
+ "name": "input",
2034
+ "type": {
2035
+ "text": "NordEvent"
2036
+ },
2037
+ "description": "Fired as the user types into the input.",
2038
+ "inheritedFrom": {
2039
+ "name": "FormAssociatedMixin",
2040
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2041
+ }
2042
+ },
2043
+ {
2044
+ "name": "change",
2045
+ "type": {
2046
+ "text": "NordEvent"
2047
+ },
2048
+ "description": "Fired whenever the input's value is changed via user interaction.",
2049
+ "inheritedFrom": {
2050
+ "name": "FormAssociatedMixin",
2051
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2052
+ }
2053
+ }
2054
+ ]
1830
2055
  }
1831
2056
  ],
1832
2057
  "exports": [
@@ -1834,65 +2059,16 @@
1834
2059
  "kind": "js",
1835
2060
  "name": "default",
1836
2061
  "declaration": {
1837
- "name": "Calendar",
1838
- "module": "src/calendar/Calendar.ts"
2062
+ "name": "Checkbox",
2063
+ "module": "src/checkbox/Checkbox.ts"
1839
2064
  }
1840
2065
  },
1841
2066
  {
1842
2067
  "kind": "custom-element-definition",
1843
- "name": "nord-calendar",
1844
- "declaration": {
1845
- "name": "Calendar",
1846
- "module": "src/calendar/Calendar.ts"
1847
- }
1848
- }
1849
- ]
1850
- },
1851
- {
1852
- "kind": "javascript-module",
1853
- "path": "src/calendar/DateSelectEvent.ts",
1854
- "declarations": [
1855
- {
1856
- "kind": "class",
1857
- "description": "",
1858
- "name": "DateSelectEvent",
1859
- "superclass": {
1860
- "name": "NordEvent",
1861
- "module": "/src/common/events.js"
1862
- }
1863
- }
1864
- ],
1865
- "exports": [
1866
- {
1867
- "kind": "js",
1868
- "name": "DateSelectEvent",
1869
- "declaration": {
1870
- "name": "DateSelectEvent",
1871
- "module": "src/calendar/DateSelectEvent.ts"
1872
- }
1873
- }
1874
- ]
1875
- },
1876
- {
1877
- "kind": "javascript-module",
1878
- "path": "src/calendar/localization.ts",
1879
- "declarations": [
1880
- {
1881
- "kind": "variable",
1882
- "name": "calendarLocalization",
1883
- "type": {
1884
- "text": "object"
1885
- },
1886
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1887
- }
1888
- ],
1889
- "exports": [
1890
- {
1891
- "kind": "js",
1892
- "name": "default",
2068
+ "name": "nord-checkbox",
1893
2069
  "declaration": {
1894
- "name": "calendarLocalization",
1895
- "module": "src/calendar/localization.ts"
2070
+ "name": "Checkbox",
2071
+ "module": "src/checkbox/Checkbox.ts"
1896
2072
  }
1897
2073
  }
1898
2074
  ]
@@ -2021,657 +2197,432 @@
2021
2197
  },
2022
2198
  {
2023
2199
  "kind": "javascript-module",
2024
- "path": "src/checkbox/Checkbox.ts",
2200
+ "path": "src/calendar/Calendar.ts",
2025
2201
  "declarations": [
2026
2202
  {
2027
2203
  "kind": "class",
2028
- "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
2029
- "name": "Checkbox",
2030
- "slots": [
2031
- {
2032
- "description": "Use when a label requires more than plain text.",
2033
- "name": "label"
2034
- },
2204
+ "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.",
2205
+ "name": "Calendar",
2206
+ "cssProperties": [
2035
2207
  {
2036
- "description": "Optional slot that holds hint text for the input.",
2037
- "name": "hint"
2208
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2209
+ "name": "--n-calendar-border-radius",
2210
+ "default": "var(--n-border-radius)"
2038
2211
  },
2039
2212
  {
2040
- "description": "Optional slot that holds error text for the input.",
2041
- "name": "error"
2213
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2214
+ "name": "--n-calendar-box-shadow",
2215
+ "default": "var(--n-box-shadow-popout)"
2042
2216
  }
2043
2217
  ],
2044
2218
  "members": [
2045
2219
  {
2046
2220
  "kind": "field",
2047
- "name": "formValue",
2048
- "privacy": "protected",
2049
- "inheritedFrom": {
2050
- "name": "FormAssociatedMixin",
2051
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2052
- }
2221
+ "name": "monthSelectNode",
2222
+ "type": {
2223
+ "text": "HTMLElement"
2224
+ },
2225
+ "privacy": "private"
2053
2226
  },
2054
2227
  {
2055
2228
  "kind": "field",
2056
- "name": "indeterminate",
2229
+ "name": "focusedDayNode",
2057
2230
  "type": {
2058
- "text": "boolean"
2231
+ "text": "HTMLButtonElement"
2059
2232
  },
2060
- "default": "false",
2061
- "description": "Controls whether the checkbox is in an indeterminate state.",
2062
- "attribute": "indeterminate"
2233
+ "privacy": "private"
2063
2234
  },
2064
2235
  {
2065
2236
  "kind": "field",
2066
- "name": "checked",
2067
- "type": {
2068
- "text": "boolean"
2069
- },
2070
- "default": "false",
2071
- "description": "Controls whether the checkbox is checked or not.",
2072
- "attribute": "checked"
2237
+ "name": "direction",
2238
+ "privacy": "private",
2239
+ "default": "new DirectionController(this)"
2073
2240
  },
2074
2241
  {
2075
- "kind": "method",
2076
- "name": "handleChange",
2077
- "privacy": "protected",
2078
- "parameters": [
2079
- {
2080
- "name": "e",
2081
- "type": {
2082
- "text": "Event"
2083
- }
2084
- }
2085
- ],
2086
- "return": {
2087
- "type": {
2088
- "text": "void"
2089
- }
2090
- },
2091
- "inheritedFrom": {
2092
- "name": "FormAssociatedMixin",
2093
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2094
- }
2242
+ "kind": "field",
2243
+ "name": "swipe",
2244
+ "privacy": "private",
2245
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
2095
2246
  },
2096
2247
  {
2097
2248
  "kind": "field",
2098
- "name": "size",
2099
- "type": {
2100
- "text": "\"s\" | \"m\" | \"l\""
2101
- },
2102
- "default": "\"m\"",
2103
- "description": "The size of the component.",
2104
- "attribute": "size",
2105
- "reflects": true,
2106
- "inheritedFrom": {
2107
- "name": "SizeMixin",
2108
- "module": "src/common/mixins/SizeMixin.ts"
2109
- }
2249
+ "name": "shortcuts",
2250
+ "privacy": "private"
2110
2251
  },
2111
2252
  {
2112
2253
  "kind": "field",
2113
- "name": "labelSlot",
2114
- "privacy": "protected",
2115
- "default": "new SlotController(this, \"label\")",
2116
- "inheritedFrom": {
2117
- "name": "FormAssociatedMixin",
2118
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2119
- }
2254
+ "name": "localize",
2255
+ "privacy": "private",
2256
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
2120
2257
  },
2121
2258
  {
2122
2259
  "kind": "field",
2123
- "name": "errorSlot",
2124
- "privacy": "protected",
2125
- "default": "new SlotController(this, \"error\")",
2126
- "inheritedFrom": {
2127
- "name": "FormAssociatedMixin",
2128
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2129
- }
2260
+ "name": "dateFormatShort",
2261
+ "type": {
2262
+ "text": "Intl.DateTimeFormat"
2263
+ },
2264
+ "privacy": "private",
2265
+ "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"
2130
2266
  },
2131
2267
  {
2132
2268
  "kind": "field",
2133
- "name": "hintSlot",
2134
- "privacy": "protected",
2135
- "default": "new SlotController(this, \"hint\")",
2136
- "inheritedFrom": {
2137
- "name": "FormAssociatedMixin",
2138
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2139
- }
2269
+ "name": "monthNames",
2270
+ "type": {
2271
+ "text": "string[]"
2272
+ },
2273
+ "privacy": "private"
2140
2274
  },
2141
2275
  {
2142
2276
  "kind": "field",
2143
- "name": "formData",
2144
- "privacy": "protected",
2145
- "default": "new FormDataController(this, { value: () => this.formValue })",
2146
- "inheritedFrom": {
2147
- "name": "FormAssociatedMixin",
2148
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2149
- }
2277
+ "name": "monthNamesShort",
2278
+ "type": {
2279
+ "text": "string[]"
2280
+ },
2281
+ "privacy": "private"
2150
2282
  },
2151
2283
  {
2152
2284
  "kind": "field",
2153
- "name": "inputId",
2285
+ "name": "dayNames",
2154
2286
  "type": {
2155
- "text": "string"
2287
+ "text": "string[]"
2156
2288
  },
2157
- "privacy": "protected",
2158
- "default": "\"input\"",
2159
- "inheritedFrom": {
2160
- "name": "FormAssociatedMixin",
2161
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2162
- }
2289
+ "privacy": "private"
2163
2290
  },
2164
2291
  {
2165
2292
  "kind": "field",
2166
- "name": "errorId",
2293
+ "name": "dayNamesShort",
2167
2294
  "type": {
2168
- "text": "string"
2295
+ "text": "string[]"
2169
2296
  },
2170
- "privacy": "protected",
2171
- "default": "\"error\"",
2172
- "inheritedFrom": {
2173
- "name": "FormAssociatedMixin",
2174
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2175
- }
2297
+ "privacy": "private"
2176
2298
  },
2177
2299
  {
2178
2300
  "kind": "field",
2179
- "name": "hintId",
2301
+ "name": "value",
2180
2302
  "type": {
2181
2303
  "text": "string"
2182
2304
  },
2183
- "privacy": "protected",
2184
- "default": "\"hint\"",
2185
- "inheritedFrom": {
2186
- "name": "FormAssociatedMixin",
2187
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2188
- }
2305
+ "default": "\"\"",
2306
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2307
+ "attribute": "value"
2189
2308
  },
2190
2309
  {
2191
2310
  "kind": "field",
2192
- "name": "label",
2311
+ "name": "firstDayOfWeek",
2193
2312
  "type": {
2194
- "text": "string"
2313
+ "text": "DaysOfWeek"
2195
2314
  },
2196
- "default": "\"\"",
2197
- "description": "Label for the input.",
2198
- "attribute": "label",
2199
- "inheritedFrom": {
2200
- "name": "FormAssociatedMixin",
2201
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2202
- }
2315
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2316
+ "attribute": "firstDayOfWeek"
2203
2317
  },
2204
2318
  {
2205
2319
  "kind": "field",
2206
- "name": "hint",
2320
+ "name": "min",
2207
2321
  "type": {
2208
- "text": "string | undefined"
2322
+ "text": "string"
2209
2323
  },
2210
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2211
- "attribute": "hint",
2212
- "inheritedFrom": {
2213
- "name": "FormAssociatedMixin",
2214
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2215
- }
2324
+ "default": "\"\"",
2325
+ "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
2326
+ "attribute": "min"
2216
2327
  },
2217
2328
  {
2218
2329
  "kind": "field",
2219
- "name": "hideLabel",
2330
+ "name": "max",
2220
2331
  "type": {
2221
- "text": "boolean"
2332
+ "text": "string"
2222
2333
  },
2223
- "default": "false",
2224
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2225
- "attribute": "hide-label",
2226
- "inheritedFrom": {
2227
- "name": "FormAssociatedMixin",
2228
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2229
- }
2334
+ "default": "\"\"",
2335
+ "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
2336
+ "attribute": "max"
2230
2337
  },
2231
2338
  {
2232
2339
  "kind": "field",
2233
- "name": "placeholder",
2340
+ "name": "expand",
2234
2341
  "type": {
2235
- "text": "string | undefined"
2342
+ "text": "boolean"
2236
2343
  },
2237
- "description": "Placeholder text to display within the input.",
2238
- "attribute": "placeholder",
2239
- "inheritedFrom": {
2240
- "name": "FormAssociatedMixin",
2241
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2242
- }
2344
+ "default": "false",
2345
+ "description": "Controls whether the calendar expands to fill the width of its container.",
2346
+ "attribute": "expand",
2347
+ "reflects": true
2243
2348
  },
2244
2349
  {
2245
2350
  "kind": "field",
2246
- "name": "error",
2351
+ "name": "isDateDisabled",
2247
2352
  "type": {
2248
- "text": "string | undefined"
2353
+ "text": "DatePredicate"
2249
2354
  },
2250
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2251
- "attribute": "error",
2252
- "inheritedFrom": {
2253
- "name": "FormAssociatedMixin",
2254
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2255
- }
2355
+ "default": "isDateDisabled",
2356
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
2256
2357
  },
2257
2358
  {
2258
2359
  "kind": "field",
2259
- "name": "required",
2360
+ "name": "isDateHighlighted",
2260
2361
  "type": {
2261
- "text": "boolean"
2362
+ "text": "(date: Date) => string | boolean"
2262
2363
  },
2263
- "default": "false",
2264
- "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.",
2265
- "attribute": "required",
2266
- "inheritedFrom": {
2267
- "name": "FormAssociatedMixin",
2268
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2269
- }
2364
+ "default": "isDateHighlighted",
2365
+ "description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
2270
2366
  },
2271
2367
  {
2272
2368
  "kind": "field",
2273
- "name": "hideRequired",
2369
+ "name": "activeFocus",
2274
2370
  "type": {
2275
2371
  "text": "boolean"
2276
2372
  },
2277
- "default": "false",
2278
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
2279
- "attribute": "hide-required",
2280
- "inheritedFrom": {
2281
- "name": "FormAssociatedMixin",
2282
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2283
- }
2373
+ "privacy": "private",
2374
+ "default": "false"
2284
2375
  },
2285
2376
  {
2286
- "kind": "method",
2287
- "name": "handleInput",
2288
- "privacy": "protected",
2289
- "parameters": [
2290
- {
2291
- "name": "e",
2292
- "type": {
2293
- "text": "Event"
2294
- }
2295
- }
2296
- ],
2297
- "inheritedFrom": {
2298
- "name": "FormAssociatedMixin",
2299
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2300
- }
2377
+ "kind": "field",
2378
+ "name": "focusedDay",
2379
+ "privacy": "private",
2380
+ "default": "new Date()"
2301
2381
  },
2302
2382
  {
2303
2383
  "kind": "method",
2304
- "name": "renderLabel",
2305
- "privacy": "protected",
2384
+ "name": "focus",
2306
2385
  "parameters": [
2307
2386
  {
2308
- "name": "additionalContent",
2387
+ "name": "options",
2309
2388
  "optional": true,
2310
2389
  "type": {
2311
- "text": "TemplateResult"
2312
- }
2390
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
2391
+ },
2392
+ "description": "An object which controls aspects of the focusing process."
2313
2393
  }
2314
2394
  ],
2315
- "inheritedFrom": {
2316
- "name": "FormAssociatedMixin",
2317
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2318
- }
2395
+ "description": "Programmatically move focus to the calendar."
2319
2396
  },
2320
2397
  {
2321
2398
  "kind": "method",
2322
- "name": "renderError",
2323
- "privacy": "protected",
2324
- "inheritedFrom": {
2325
- "name": "FormAssociatedMixin",
2326
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2327
- }
2399
+ "name": "handleValueChange",
2400
+ "privacy": "protected"
2328
2401
  },
2329
2402
  {
2330
2403
  "kind": "method",
2331
- "name": "getDescribedBy",
2332
- "privacy": "protected",
2333
- "inheritedFrom": {
2334
- "name": "FormAssociatedMixin",
2335
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2336
- }
2404
+ "name": "handleFocusedDayChange",
2405
+ "privacy": "protected"
2337
2406
  },
2338
2407
  {
2339
2408
  "kind": "method",
2340
- "name": "getInvalid",
2341
- "privacy": "protected",
2342
- "inheritedFrom": {
2343
- "name": "FormAssociatedMixin",
2344
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2345
- }
2346
- },
2347
- {
2348
- "kind": "field",
2349
- "name": "hasHint",
2350
- "privacy": "protected",
2351
- "inheritedFrom": {
2352
- "name": "FormAssociatedMixin",
2353
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2354
- }
2409
+ "name": "handleLangChange",
2410
+ "privacy": "private"
2355
2411
  },
2356
2412
  {
2357
2413
  "kind": "field",
2358
- "name": "hasError",
2359
- "privacy": "protected",
2360
- "inheritedFrom": {
2361
- "name": "FormAssociatedMixin",
2362
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2363
- }
2414
+ "name": "handleDaySelect",
2415
+ "privacy": "private"
2364
2416
  },
2365
2417
  {
2366
- "kind": "field",
2367
- "name": "disabled",
2368
- "type": {
2369
- "text": "boolean"
2370
- },
2371
- "default": "false",
2372
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2373
- "attribute": "disabled",
2374
- "reflects": true,
2375
- "inheritedFrom": {
2376
- "name": "InputMixin",
2377
- "module": "src/common/mixins/InputMixin.ts"
2378
- }
2418
+ "kind": "method",
2419
+ "name": "addDays",
2420
+ "privacy": "private",
2421
+ "parameters": [
2422
+ {
2423
+ "name": "days",
2424
+ "type": {
2425
+ "text": "number"
2426
+ }
2427
+ }
2428
+ ]
2379
2429
  },
2380
2430
  {
2381
- "kind": "field",
2382
- "name": "name",
2383
- "type": {
2384
- "text": "string | undefined"
2385
- },
2386
- "description": "The name of the form component.",
2387
- "attribute": "name",
2388
- "inheritedFrom": {
2389
- "name": "InputMixin",
2390
- "module": "src/common/mixins/InputMixin.ts"
2391
- }
2431
+ "kind": "method",
2432
+ "name": "addMonths",
2433
+ "privacy": "private",
2434
+ "parameters": [
2435
+ {
2436
+ "name": "months",
2437
+ "type": {
2438
+ "text": "number"
2439
+ }
2440
+ }
2441
+ ]
2392
2442
  },
2393
2443
  {
2394
- "kind": "field",
2395
- "name": "value",
2396
- "type": {
2397
- "text": "string"
2398
- },
2399
- "default": "\"\"",
2400
- "description": "The value of the form component.",
2401
- "attribute": "value",
2402
- "inheritedFrom": {
2403
- "name": "InputMixin",
2404
- "module": "src/common/mixins/InputMixin.ts"
2405
- }
2444
+ "kind": "method",
2445
+ "name": "addYears",
2446
+ "privacy": "private",
2447
+ "parameters": [
2448
+ {
2449
+ "name": "years",
2450
+ "type": {
2451
+ "text": "number"
2452
+ }
2453
+ }
2454
+ ]
2406
2455
  },
2407
2456
  {
2408
- "kind": "field",
2409
- "name": "form",
2410
- "description": "Gets the form, if any, associated with the form element.",
2411
- "inheritedFrom": {
2412
- "name": "InputMixin",
2413
- "module": "src/common/mixins/InputMixin.ts"
2414
- }
2457
+ "kind": "method",
2458
+ "name": "startOfWeek",
2459
+ "privacy": "private"
2415
2460
  },
2416
2461
  {
2417
- "kind": "field",
2418
- "name": "focusableRef",
2419
- "privacy": "protected",
2420
- "inheritedFrom": {
2421
- "name": "FocusableMixin",
2422
- "module": "src/common/mixins/FocusableMixin.ts"
2423
- }
2462
+ "kind": "method",
2463
+ "name": "endOfWeek",
2464
+ "privacy": "private"
2424
2465
  },
2425
2466
  {
2426
2467
  "kind": "method",
2427
- "name": "focus",
2468
+ "name": "setMonth",
2469
+ "privacy": "private",
2428
2470
  "parameters": [
2429
2471
  {
2430
- "name": "options",
2431
- "optional": true,
2472
+ "name": "month",
2432
2473
  "type": {
2433
- "text": "FocusOptions"
2434
- },
2435
- "description": "An object which controls aspects of the focusing process."
2474
+ "text": "number"
2475
+ }
2436
2476
  }
2437
- ],
2438
- "description": "Programmatically move focus to the component.",
2439
- "inheritedFrom": {
2440
- "name": "FocusableMixin",
2441
- "module": "src/common/mixins/FocusableMixin.ts"
2442
- }
2477
+ ]
2443
2478
  },
2444
2479
  {
2445
2480
  "kind": "method",
2446
- "name": "blur",
2447
- "description": "Programmatically remove focus from the component.",
2448
- "inheritedFrom": {
2449
- "name": "FocusableMixin",
2450
- "module": "src/common/mixins/FocusableMixin.ts"
2451
- }
2481
+ "name": "setYear",
2482
+ "privacy": "private",
2483
+ "parameters": [
2484
+ {
2485
+ "name": "year",
2486
+ "type": {
2487
+ "text": "number"
2488
+ }
2489
+ }
2490
+ ]
2452
2491
  },
2453
2492
  {
2454
2493
  "kind": "method",
2455
- "name": "click",
2456
- "description": "Programmatically simulates a click on the component.",
2457
- "inheritedFrom": {
2458
- "name": "FocusableMixin",
2459
- "module": "src/common/mixins/FocusableMixin.ts"
2460
- }
2461
- }
2462
- ],
2463
- "attributes": [
2464
- {
2465
- "name": "indeterminate",
2466
- "type": {
2467
- "text": "boolean"
2468
- },
2469
- "default": "false",
2470
- "description": "Controls whether the checkbox is in an indeterminate state.",
2471
- "fieldName": "indeterminate"
2494
+ "name": "setFocusedDay",
2495
+ "privacy": "private",
2496
+ "parameters": [
2497
+ {
2498
+ "name": "day",
2499
+ "type": {
2500
+ "text": "Date"
2501
+ }
2502
+ }
2503
+ ]
2472
2504
  },
2473
2505
  {
2474
- "name": "checked",
2475
- "type": {
2476
- "text": "boolean"
2477
- },
2478
- "default": "false",
2479
- "description": "Controls whether the checkbox is checked or not.",
2480
- "fieldName": "checked"
2506
+ "kind": "field",
2507
+ "name": "handleMonthSelect",
2508
+ "privacy": "private"
2481
2509
  },
2482
2510
  {
2483
- "name": "size",
2484
- "type": {
2485
- "text": "\"s\" | \"m\" | \"l\""
2486
- },
2487
- "default": "\"m\"",
2488
- "description": "The size of the component.",
2489
- "fieldName": "size",
2490
- "inheritedFrom": {
2491
- "name": "SizeMixin",
2492
- "module": "src/common/mixins/SizeMixin.ts"
2493
- }
2511
+ "kind": "field",
2512
+ "name": "handleYearSelect",
2513
+ "privacy": "private"
2494
2514
  },
2495
2515
  {
2496
- "name": "label",
2497
- "type": {
2498
- "text": "string"
2499
- },
2500
- "default": "\"\"",
2501
- "description": "Label for the input.",
2502
- "fieldName": "label",
2503
- "inheritedFrom": {
2504
- "name": "FormAssociatedMixin",
2505
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2506
- }
2516
+ "kind": "field",
2517
+ "name": "handleNextMonthClick",
2518
+ "privacy": "private"
2507
2519
  },
2508
2520
  {
2509
- "name": "hint",
2510
- "type": {
2511
- "text": "string | undefined"
2512
- },
2513
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2514
- "fieldName": "hint",
2515
- "inheritedFrom": {
2516
- "name": "FormAssociatedMixin",
2517
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2518
- }
2521
+ "kind": "field",
2522
+ "name": "handlePreviousMonthClick",
2523
+ "privacy": "private"
2519
2524
  },
2520
2525
  {
2521
- "name": "hide-label",
2522
- "type": {
2523
- "text": "boolean"
2524
- },
2525
- "default": "false",
2526
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2527
- "fieldName": "hideLabel",
2528
- "inheritedFrom": {
2529
- "name": "FormAssociatedMixin",
2530
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2531
- }
2526
+ "kind": "field",
2527
+ "name": "enableActiveFocus",
2528
+ "privacy": "private"
2532
2529
  },
2533
2530
  {
2534
- "name": "placeholder",
2535
- "type": {
2536
- "text": "string | undefined"
2537
- },
2538
- "description": "Placeholder text to display within the input.",
2539
- "fieldName": "placeholder",
2540
- "inheritedFrom": {
2541
- "name": "FormAssociatedMixin",
2542
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2543
- }
2544
- },
2531
+ "kind": "field",
2532
+ "name": "disableActiveFocus",
2533
+ "privacy": "private"
2534
+ }
2535
+ ],
2536
+ "events": [
2545
2537
  {
2546
- "name": "error",
2538
+ "name": "nord-focus-date",
2547
2539
  "type": {
2548
- "text": "string | undefined"
2540
+ "text": "DateSelectEvent"
2549
2541
  },
2550
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2551
- "fieldName": "error",
2552
- "inheritedFrom": {
2553
- "name": "FormAssociatedMixin",
2554
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2555
- }
2542
+ "description": "Dispatched when the calendar's focused date changes."
2556
2543
  },
2557
2544
  {
2558
- "name": "required",
2559
2545
  "type": {
2560
- "text": "boolean"
2546
+ "text": "DateSelectEvent"
2561
2547
  },
2562
- "default": "false",
2563
- "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.",
2564
- "fieldName": "required",
2565
- "inheritedFrom": {
2566
- "name": "FormAssociatedMixin",
2567
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2568
- }
2569
- },
2548
+ "description": "Dispatched when a date is selected and the value changes.",
2549
+ "name": "change"
2550
+ }
2551
+ ],
2552
+ "attributes": [
2570
2553
  {
2571
- "name": "hide-required",
2554
+ "name": "value",
2572
2555
  "type": {
2573
- "text": "boolean"
2556
+ "text": "string"
2574
2557
  },
2575
- "default": "false",
2576
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
2577
- "fieldName": "hideRequired",
2578
- "inheritedFrom": {
2579
- "name": "FormAssociatedMixin",
2580
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2581
- }
2558
+ "default": "\"\"",
2559
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2560
+ "fieldName": "value"
2582
2561
  },
2583
2562
  {
2584
- "name": "disabled",
2563
+ "name": "firstDayOfWeek",
2585
2564
  "type": {
2586
- "text": "boolean"
2565
+ "text": "DaysOfWeek"
2587
2566
  },
2588
- "default": "false",
2589
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2590
- "fieldName": "disabled",
2591
- "inheritedFrom": {
2592
- "name": "InputMixin",
2593
- "module": "src/common/mixins/InputMixin.ts"
2594
- }
2567
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2568
+ "fieldName": "firstDayOfWeek"
2595
2569
  },
2596
2570
  {
2597
- "name": "name",
2571
+ "name": "min",
2598
2572
  "type": {
2599
- "text": "string | undefined"
2573
+ "text": "string"
2600
2574
  },
2601
- "description": "The name of the form component.",
2602
- "fieldName": "name",
2603
- "inheritedFrom": {
2604
- "name": "InputMixin",
2605
- "module": "src/common/mixins/InputMixin.ts"
2606
- }
2575
+ "default": "\"\"",
2576
+ "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
2577
+ "fieldName": "min"
2607
2578
  },
2608
2579
  {
2609
- "name": "value",
2580
+ "name": "max",
2610
2581
  "type": {
2611
2582
  "text": "string"
2612
2583
  },
2613
2584
  "default": "\"\"",
2614
- "description": "The value of the form component.",
2615
- "fieldName": "value",
2616
- "inheritedFrom": {
2617
- "name": "InputMixin",
2618
- "module": "src/common/mixins/InputMixin.ts"
2619
- }
2585
+ "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
2586
+ "fieldName": "max"
2587
+ },
2588
+ {
2589
+ "name": "expand",
2590
+ "type": {
2591
+ "text": "boolean"
2592
+ },
2593
+ "default": "false",
2594
+ "description": "Controls whether the calendar expands to fill the width of its container.",
2595
+ "fieldName": "expand"
2620
2596
  }
2621
2597
  ],
2622
- "mixins": [
2598
+ "superclass": {
2599
+ "name": "LitElement",
2600
+ "package": "lit"
2601
+ },
2602
+ "localization": [
2623
2603
  {
2624
- "name": "SizeMixin",
2625
- "module": "/src/common/mixins/SizeMixin.js"
2604
+ "name": "prevMonthLabel",
2605
+ "description": "Accessible label for the previous month button."
2626
2606
  },
2627
2607
  {
2628
- "name": "FormAssociatedMixin",
2629
- "module": "/src/common/mixins/FormAssociatedMixin.js"
2608
+ "name": "nextMonthLabel",
2609
+ "description": "Accessible label for the next month button."
2630
2610
  },
2631
2611
  {
2632
- "name": "InputMixin",
2633
- "module": "/src/common/mixins/InputMixin.js"
2612
+ "name": "monthSelectLabel",
2613
+ "description": "Accessible label for the month select."
2634
2614
  },
2635
2615
  {
2636
- "name": "FocusableMixin",
2637
- "module": "/src/common/mixins/FocusableMixin.js"
2616
+ "name": "yearSelectLabel",
2617
+ "description": "Accessible label for the year select."
2638
2618
  }
2639
2619
  ],
2640
- "superclass": {
2641
- "name": "LitElement",
2642
- "package": "lit"
2643
- },
2644
- "localization": [],
2645
2620
  "status": "ready",
2646
- "category": "form",
2647
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
2621
+ "category": "list",
2622
+ "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",
2648
2623
  "examples": [],
2649
- "tagName": "nord-checkbox",
2650
- "customElement": true,
2651
- "events": [
2652
- {
2653
- "name": "input",
2654
- "type": {
2655
- "text": "NordEvent"
2656
- },
2657
- "description": "Fired as the user types into the input.",
2658
- "inheritedFrom": {
2659
- "name": "FormAssociatedMixin",
2660
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2661
- }
2662
- },
2663
- {
2664
- "name": "change",
2665
- "type": {
2666
- "text": "NordEvent"
2667
- },
2668
- "description": "Fired whenever the input's value is changed via user interaction.",
2669
- "inheritedFrom": {
2670
- "name": "FormAssociatedMixin",
2671
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2672
- }
2673
- }
2674
- ]
2624
+ "tagName": "nord-calendar",
2625
+ "customElement": true
2675
2626
  }
2676
2627
  ],
2677
2628
  "exports": [
@@ -2679,16 +2630,65 @@
2679
2630
  "kind": "js",
2680
2631
  "name": "default",
2681
2632
  "declaration": {
2682
- "name": "Checkbox",
2683
- "module": "src/checkbox/Checkbox.ts"
2633
+ "name": "Calendar",
2634
+ "module": "src/calendar/Calendar.ts"
2684
2635
  }
2685
2636
  },
2686
2637
  {
2687
2638
  "kind": "custom-element-definition",
2688
- "name": "nord-checkbox",
2639
+ "name": "nord-calendar",
2689
2640
  "declaration": {
2690
- "name": "Checkbox",
2691
- "module": "src/checkbox/Checkbox.ts"
2641
+ "name": "Calendar",
2642
+ "module": "src/calendar/Calendar.ts"
2643
+ }
2644
+ }
2645
+ ]
2646
+ },
2647
+ {
2648
+ "kind": "javascript-module",
2649
+ "path": "src/calendar/DateSelectEvent.ts",
2650
+ "declarations": [
2651
+ {
2652
+ "kind": "class",
2653
+ "description": "",
2654
+ "name": "DateSelectEvent",
2655
+ "superclass": {
2656
+ "name": "NordEvent",
2657
+ "module": "/src/common/events.js"
2658
+ }
2659
+ }
2660
+ ],
2661
+ "exports": [
2662
+ {
2663
+ "kind": "js",
2664
+ "name": "DateSelectEvent",
2665
+ "declaration": {
2666
+ "name": "DateSelectEvent",
2667
+ "module": "src/calendar/DateSelectEvent.ts"
2668
+ }
2669
+ }
2670
+ ]
2671
+ },
2672
+ {
2673
+ "kind": "javascript-module",
2674
+ "path": "src/calendar/localization.ts",
2675
+ "declarations": [
2676
+ {
2677
+ "kind": "variable",
2678
+ "name": "calendarLocalization",
2679
+ "type": {
2680
+ "text": "object"
2681
+ },
2682
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
2683
+ }
2684
+ ],
2685
+ "exports": [
2686
+ {
2687
+ "kind": "js",
2688
+ "name": "default",
2689
+ "declaration": {
2690
+ "name": "calendarLocalization",
2691
+ "module": "src/calendar/localization.ts"
2692
2692
  }
2693
2693
  }
2694
2694
  ]
@@ -4128,6 +4128,36 @@
4128
4128
  "name": "Event",
4129
4129
  "module": "src/common/events.ts"
4130
4130
  }
4131
+ },
4132
+ {
4133
+ "kind": "function",
4134
+ "name": "oneEvent",
4135
+ "parameters": [
4136
+ {
4137
+ "name": "element",
4138
+ "type": {
4139
+ "text": "HTMLElement"
4140
+ }
4141
+ },
4142
+ {
4143
+ "name": "type",
4144
+ "type": {
4145
+ "text": "K"
4146
+ }
4147
+ }
4148
+ ]
4149
+ },
4150
+ {
4151
+ "kind": "function",
4152
+ "name": "transition",
4153
+ "parameters": [
4154
+ {
4155
+ "name": "element",
4156
+ "type": {
4157
+ "text": "HTMLElement"
4158
+ }
4159
+ }
4160
+ ]
4131
4161
  }
4132
4162
  ],
4133
4163
  "exports": [
@@ -4138,6 +4168,22 @@
4138
4168
  "name": "NordEvent",
4139
4169
  "module": "src/common/events.ts"
4140
4170
  }
4171
+ },
4172
+ {
4173
+ "kind": "js",
4174
+ "name": "oneEvent",
4175
+ "declaration": {
4176
+ "name": "oneEvent",
4177
+ "module": "src/common/events.ts"
4178
+ }
4179
+ },
4180
+ {
4181
+ "kind": "js",
4182
+ "name": "transition",
4183
+ "declaration": {
4184
+ "name": "transition",
4185
+ "module": "src/common/events.ts"
4186
+ }
4141
4187
  }
4142
4188
  ]
4143
4189
  },
@@ -5729,106 +5775,39 @@
5729
5775
  },
5730
5776
  "default": "\"m\"",
5731
5777
  "description": "Controls the padding of the drawer component.",
5732
- "attribute": "padding",
5733
- "reflects": true
5734
- },
5735
- {
5736
- "kind": "field",
5737
- "name": "_warningLogged",
5738
- "type": {
5739
- "text": "boolean"
5740
- },
5741
- "privacy": "private",
5742
- "static": true,
5743
- "default": "false",
5744
- "inheritedFrom": {
5745
- "name": "DraftComponentMixin",
5746
- "module": "src/common/mixins/DraftComponentMixin.ts"
5747
- }
5748
- }
5749
- ],
5750
- "attributes": [
5751
- {
5752
- "name": "padding",
5753
- "type": {
5754
- "text": "\"m\" | \"none\""
5755
- },
5756
- "default": "\"m\"",
5757
- "description": "Controls the padding of the drawer component.",
5758
- "fieldName": "padding"
5759
- }
5760
- ],
5761
- "mixins": [
5762
- {
5763
- "name": "DraftComponentMixin",
5764
- "module": "/src/common/mixins/DraftComponentMixin.js"
5765
- }
5766
- ],
5767
- "superclass": {
5768
- "name": "LitElement",
5769
- "package": "lit"
5770
- },
5771
- "localization": [],
5772
- "status": "draft",
5773
- "category": "structure",
5774
- "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 put cards inside the drawer. Consider using the [divider](/components/divider/) component to break up sections instead.\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\n---\n\n## Additional considerations\n\n- You can customize the width of the component using `--n-layout-drawer-inline-size` CSS Custom Property that is offered on [Layout component](/components/layout/).\n",
5775
- "examples": [],
5776
- "tagName": "nord-drawer",
5777
- "customElement": true
5778
- }
5779
- ],
5780
- "exports": [
5781
- {
5782
- "kind": "js",
5783
- "name": "default",
5784
- "declaration": {
5785
- "name": "Drawer",
5786
- "module": "src/drawer/Drawer.ts"
5787
- }
5788
- },
5789
- {
5790
- "kind": "custom-element-definition",
5791
- "name": "nord-drawer",
5792
- "declaration": {
5793
- "name": "Drawer",
5794
- "module": "src/drawer/Drawer.ts"
5795
- }
5796
- }
5797
- ]
5798
- },
5799
- {
5800
- "kind": "javascript-module",
5801
- "path": "src/dropdown-group/DropdownGroup.ts",
5802
- "declarations": [
5803
- {
5804
- "kind": "class",
5805
- "description": "Dropdown group includes all the actions or items in a single dropdown\ngroup and is used for grouping items into related categories.",
5806
- "name": "DropdownGroup",
5807
- "slots": [
5808
- {
5809
- "description": "The dropdown group content.",
5810
- "name": ""
5811
- }
5812
- ],
5813
- "members": [
5778
+ "attribute": "padding",
5779
+ "reflects": true
5780
+ },
5814
5781
  {
5815
5782
  "kind": "field",
5816
- "name": "heading",
5783
+ "name": "_warningLogged",
5817
5784
  "type": {
5818
- "text": "string | undefined"
5785
+ "text": "boolean"
5819
5786
  },
5820
- "description": "Heading and accessible label for the dropdown group.",
5821
- "attribute": "heading"
5787
+ "privacy": "private",
5788
+ "static": true,
5789
+ "default": "false",
5790
+ "inheritedFrom": {
5791
+ "name": "DraftComponentMixin",
5792
+ "module": "src/common/mixins/DraftComponentMixin.ts"
5793
+ }
5822
5794
  }
5823
5795
  ],
5824
5796
  "attributes": [
5825
5797
  {
5826
- "name": "heading",
5798
+ "name": "padding",
5827
5799
  "type": {
5828
- "text": "string | undefined"
5800
+ "text": "\"m\" | \"none\""
5829
5801
  },
5830
- "description": "Heading and accessible label for the dropdown group.",
5831
- "fieldName": "heading"
5802
+ "default": "\"m\"",
5803
+ "description": "Controls the padding of the drawer component.",
5804
+ "fieldName": "padding"
5805
+ }
5806
+ ],
5807
+ "mixins": [
5808
+ {
5809
+ "name": "DraftComponentMixin",
5810
+ "module": "/src/common/mixins/DraftComponentMixin.js"
5832
5811
  }
5833
5812
  ],
5834
5813
  "superclass": {
@@ -5836,11 +5815,11 @@
5836
5815
  "package": "lit"
5837
5816
  },
5838
5817
  "localization": [],
5839
- "status": "ready",
5840
- "category": "action",
5841
- "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- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, 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 dropdown items 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\nAvoid all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n",
5818
+ "status": "draft",
5819
+ "category": "structure",
5820
+ "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 put cards inside the drawer. Consider using the [divider](/components/divider/) component to break up sections instead.\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\n---\n\n## Additional considerations\n\n- You can customize the width of the component using `--n-layout-drawer-inline-size` CSS Custom Property that is offered on [Layout component](/components/layout/).\n",
5842
5821
  "examples": [],
5843
- "tagName": "nord-dropdown-group",
5822
+ "tagName": "nord-drawer",
5844
5823
  "customElement": true
5845
5824
  }
5846
5825
  ],
@@ -5849,16 +5828,16 @@
5849
5828
  "kind": "js",
5850
5829
  "name": "default",
5851
5830
  "declaration": {
5852
- "name": "DropdownGroup",
5853
- "module": "src/dropdown-group/DropdownGroup.ts"
5831
+ "name": "Drawer",
5832
+ "module": "src/drawer/Drawer.ts"
5854
5833
  }
5855
5834
  },
5856
5835
  {
5857
5836
  "kind": "custom-element-definition",
5858
- "name": "nord-dropdown-group",
5837
+ "name": "nord-drawer",
5859
5838
  "declaration": {
5860
- "name": "DropdownGroup",
5861
- "module": "src/dropdown-group/DropdownGroup.ts"
5839
+ "name": "Drawer",
5840
+ "module": "src/drawer/Drawer.ts"
5862
5841
  }
5863
5842
  }
5864
5843
  ]
@@ -5945,6 +5924,11 @@
5945
5924
  {
5946
5925
  "kind": "method",
5947
5926
  "name": "hide",
5927
+ "return": {
5928
+ "type": {
5929
+ "text": "Promise<TransitionEvent | void>"
5930
+ }
5931
+ },
5948
5932
  "parameters": [
5949
5933
  {
5950
5934
  "name": "moveFocusToButton",
@@ -5955,12 +5939,17 @@
5955
5939
  "description": "A boolean option to move the focus to the original button that opens the dropdown."
5956
5940
  }
5957
5941
  ],
5958
- "description": "Hide the dropdown programmatically."
5942
+ "description": "Hide the dropdown programmatically.\nThis method delegates to the Dropdown's internal Popout component.\nSee [Popout's hide() method](/components/popout#methods-hide) for more details."
5959
5943
  },
5960
5944
  {
5961
5945
  "kind": "method",
5962
5946
  "name": "show",
5963
- "description": "Show the dropdown programmatically."
5947
+ "return": {
5948
+ "type": {
5949
+ "text": "Promise<TransitionEvent | void>"
5950
+ }
5951
+ },
5952
+ "description": "Show the dropdown programmatically.\nThis method delegates to the Dropdown's internal Popout component.\nSee [Popout's show() method](/components/popout#methods-hide) for more details."
5964
5953
  },
5965
5954
  {
5966
5955
  "kind": "field",
@@ -6105,6 +6094,73 @@
6105
6094
  }
6106
6095
  ]
6107
6096
  },
6097
+ {
6098
+ "kind": "javascript-module",
6099
+ "path": "src/dropdown-group/DropdownGroup.ts",
6100
+ "declarations": [
6101
+ {
6102
+ "kind": "class",
6103
+ "description": "Dropdown group includes all the actions or items in a single dropdown\ngroup and is used for grouping items into related categories.",
6104
+ "name": "DropdownGroup",
6105
+ "slots": [
6106
+ {
6107
+ "description": "The dropdown group content.",
6108
+ "name": ""
6109
+ }
6110
+ ],
6111
+ "members": [
6112
+ {
6113
+ "kind": "field",
6114
+ "name": "heading",
6115
+ "type": {
6116
+ "text": "string | undefined"
6117
+ },
6118
+ "description": "Heading and accessible label for the dropdown group.",
6119
+ "attribute": "heading"
6120
+ }
6121
+ ],
6122
+ "attributes": [
6123
+ {
6124
+ "name": "heading",
6125
+ "type": {
6126
+ "text": "string | undefined"
6127
+ },
6128
+ "description": "Heading and accessible label for the dropdown group.",
6129
+ "fieldName": "heading"
6130
+ }
6131
+ ],
6132
+ "superclass": {
6133
+ "name": "LitElement",
6134
+ "package": "lit"
6135
+ },
6136
+ "localization": [],
6137
+ "status": "ready",
6138
+ "category": "action",
6139
+ "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- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, 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 dropdown items 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\nAvoid all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n",
6140
+ "examples": [],
6141
+ "tagName": "nord-dropdown-group",
6142
+ "customElement": true
6143
+ }
6144
+ ],
6145
+ "exports": [
6146
+ {
6147
+ "kind": "js",
6148
+ "name": "default",
6149
+ "declaration": {
6150
+ "name": "DropdownGroup",
6151
+ "module": "src/dropdown-group/DropdownGroup.ts"
6152
+ }
6153
+ },
6154
+ {
6155
+ "kind": "custom-element-definition",
6156
+ "name": "nord-dropdown-group",
6157
+ "declaration": {
6158
+ "name": "DropdownGroup",
6159
+ "module": "src/dropdown-group/DropdownGroup.ts"
6160
+ }
6161
+ }
6162
+ ]
6163
+ },
6108
6164
  {
6109
6165
  "kind": "javascript-module",
6110
6166
  "path": "src/dropdown-item/DropdownItem.ts",
@@ -7830,6 +7886,14 @@
7830
7886
  "attribute": "sticky",
7831
7887
  "reflects": true
7832
7888
  },
7889
+ {
7890
+ "kind": "field",
7891
+ "name": "isNarrow",
7892
+ "type": {
7893
+ "text": "boolean"
7894
+ },
7895
+ "description": "A getter whose values reflects whether the layout component considers the viewport to be narrow or not.\nA narrow viewport is considered to be less than 768px wide."
7896
+ },
7833
7897
  {
7834
7898
  "kind": "method",
7835
7899
  "name": "renderNavToggle",
@@ -8782,73 +8846,6 @@
8782
8846
  }
8783
8847
  ]
8784
8848
  },
8785
- {
8786
- "kind": "javascript-module",
8787
- "path": "src/nav-group/NavGroup.ts",
8788
- "declarations": [
8789
- {
8790
- "kind": "class",
8791
- "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
8792
- "name": "NavGroup",
8793
- "slots": [
8794
- {
8795
- "description": "The default slot used for the nav items.",
8796
- "name": ""
8797
- }
8798
- ],
8799
- "members": [
8800
- {
8801
- "kind": "field",
8802
- "name": "heading",
8803
- "type": {
8804
- "text": "string | undefined"
8805
- },
8806
- "description": "Heading and accessible label for the nav group",
8807
- "attribute": "heading"
8808
- }
8809
- ],
8810
- "attributes": [
8811
- {
8812
- "name": "heading",
8813
- "type": {
8814
- "text": "string | undefined"
8815
- },
8816
- "description": "Heading and accessible label for the nav group",
8817
- "fieldName": "heading"
8818
- }
8819
- ],
8820
- "superclass": {
8821
- "name": "LitElement",
8822
- "package": "lit"
8823
- },
8824
- "localization": [],
8825
- "status": "ready",
8826
- "category": "navigation",
8827
- "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
8828
- "examples": [],
8829
- "tagName": "nord-nav-group",
8830
- "customElement": true
8831
- }
8832
- ],
8833
- "exports": [
8834
- {
8835
- "kind": "js",
8836
- "name": "default",
8837
- "declaration": {
8838
- "name": "NavGroup",
8839
- "module": "src/nav-group/NavGroup.ts"
8840
- }
8841
- },
8842
- {
8843
- "kind": "custom-element-definition",
8844
- "name": "nord-nav-group",
8845
- "declaration": {
8846
- "name": "NavGroup",
8847
- "module": "src/nav-group/NavGroup.ts"
8848
- }
8849
- }
8850
- ]
8851
- },
8852
8849
  {
8853
8850
  "kind": "javascript-module",
8854
8851
  "path": "src/nav-item/NavItem.ts",
@@ -9063,19 +9060,86 @@
9063
9060
  "fieldName": "badge"
9064
9061
  },
9065
9062
  {
9066
- "name": "open",
9063
+ "name": "open",
9064
+ "type": {
9065
+ "text": "boolean"
9066
+ },
9067
+ "default": "false",
9068
+ "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
9069
+ "fieldName": "open"
9070
+ }
9071
+ ],
9072
+ "mixins": [
9073
+ {
9074
+ "name": "FocusableMixin",
9075
+ "module": "/src/common/mixins/FocusableMixin.js"
9076
+ }
9077
+ ],
9078
+ "superclass": {
9079
+ "name": "LitElement",
9080
+ "package": "lit"
9081
+ },
9082
+ "localization": [],
9083
+ "status": "ready",
9084
+ "category": "navigation",
9085
+ "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use navigation item outside of navigation group and navigation components.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
9086
+ "examples": [],
9087
+ "tagName": "nord-nav-item",
9088
+ "customElement": true
9089
+ }
9090
+ ],
9091
+ "exports": [
9092
+ {
9093
+ "kind": "js",
9094
+ "name": "default",
9095
+ "declaration": {
9096
+ "name": "NavItem",
9097
+ "module": "src/nav-item/NavItem.ts"
9098
+ }
9099
+ },
9100
+ {
9101
+ "kind": "custom-element-definition",
9102
+ "name": "nord-nav-item",
9103
+ "declaration": {
9104
+ "name": "NavItem",
9105
+ "module": "src/nav-item/NavItem.ts"
9106
+ }
9107
+ }
9108
+ ]
9109
+ },
9110
+ {
9111
+ "kind": "javascript-module",
9112
+ "path": "src/nav-group/NavGroup.ts",
9113
+ "declarations": [
9114
+ {
9115
+ "kind": "class",
9116
+ "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
9117
+ "name": "NavGroup",
9118
+ "slots": [
9119
+ {
9120
+ "description": "The default slot used for the nav items.",
9121
+ "name": ""
9122
+ }
9123
+ ],
9124
+ "members": [
9125
+ {
9126
+ "kind": "field",
9127
+ "name": "heading",
9067
9128
  "type": {
9068
- "text": "boolean"
9129
+ "text": "string | undefined"
9069
9130
  },
9070
- "default": "false",
9071
- "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
9072
- "fieldName": "open"
9131
+ "description": "Heading and accessible label for the nav group",
9132
+ "attribute": "heading"
9073
9133
  }
9074
9134
  ],
9075
- "mixins": [
9135
+ "attributes": [
9076
9136
  {
9077
- "name": "FocusableMixin",
9078
- "module": "/src/common/mixins/FocusableMixin.js"
9137
+ "name": "heading",
9138
+ "type": {
9139
+ "text": "string | undefined"
9140
+ },
9141
+ "description": "Heading and accessible label for the nav group",
9142
+ "fieldName": "heading"
9079
9143
  }
9080
9144
  ],
9081
9145
  "superclass": {
@@ -9085,9 +9149,9 @@
9085
9149
  "localization": [],
9086
9150
  "status": "ready",
9087
9151
  "category": "navigation",
9088
- "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use navigation item outside of navigation group and navigation components.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
9152
+ "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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item 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 item labels, 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 item labels 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 as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
9089
9153
  "examples": [],
9090
- "tagName": "nord-nav-item",
9154
+ "tagName": "nord-nav-group",
9091
9155
  "customElement": true
9092
9156
  }
9093
9157
  ],
@@ -9096,16 +9160,16 @@
9096
9160
  "kind": "js",
9097
9161
  "name": "default",
9098
9162
  "declaration": {
9099
- "name": "NavItem",
9100
- "module": "src/nav-item/NavItem.ts"
9163
+ "name": "NavGroup",
9164
+ "module": "src/nav-group/NavGroup.ts"
9101
9165
  }
9102
9166
  },
9103
9167
  {
9104
9168
  "kind": "custom-element-definition",
9105
- "name": "nord-nav-item",
9169
+ "name": "nord-nav-group",
9106
9170
  "declaration": {
9107
- "name": "NavItem",
9108
- "module": "src/nav-item/NavItem.ts"
9171
+ "name": "NavGroup",
9172
+ "module": "src/nav-group/NavGroup.ts"
9109
9173
  }
9110
9174
  }
9111
9175
  ]
@@ -9409,22 +9473,32 @@
9409
9473
  {
9410
9474
  "kind": "method",
9411
9475
  "name": "show",
9412
- "description": "Show the popout, moving focus to the calendar inside."
9476
+ "return": {
9477
+ "type": {
9478
+ "text": "Promise<TransitionEvent | void>"
9479
+ }
9480
+ },
9481
+ "description": "Show the popout.\nA promise that resolves to a `TransitionEvent` when the popout's show animation ends or is cancelled.\nIf the popout is already open, the promise resolves immediately with `undefined`."
9413
9482
  },
9414
9483
  {
9415
9484
  "kind": "method",
9416
9485
  "name": "hide",
9486
+ "return": {
9487
+ "type": {
9488
+ "text": "Promise<TransitionEvent | void>"
9489
+ }
9490
+ },
9417
9491
  "parameters": [
9418
9492
  {
9419
9493
  "name": "moveFocusToButton",
9420
9494
  "default": "true",
9421
- "description": "prevent focus returning to the target\nbutton. Default is true.",
9422
9495
  "type": {
9423
9496
  "text": "boolean"
9424
- }
9497
+ },
9498
+ "description": "prevent focus returning to the target button. Default is true."
9425
9499
  }
9426
9500
  ],
9427
- "description": "Hide the popout."
9501
+ "description": "Hide the popout.\nReturns a promise that resolves to a `TransitionEvent` when the popout's hide animation ends or is cancelled.\nIf the popout is already closed, the promise resolves immediately with `undefined`."
9428
9502
  },
9429
9503
  {
9430
9504
  "kind": "method",
@@ -9522,248 +9596,77 @@
9522
9596
  "text": "NordEvent"
9523
9597
  },
9524
9598
  "description": "Dispatched when the popout is opened."
9525
- },
9526
- {
9527
- "name": "close",
9528
- "type": {
9529
- "text": "NordEvent"
9530
- },
9531
- "description": "Dispatched when the popout is closed."
9532
- }
9533
- ],
9534
- "attributes": [
9535
- {
9536
- "name": "id",
9537
- "type": {
9538
- "text": "string"
9539
- },
9540
- "default": "\"\"",
9541
- "description": "The id for the active element to reference via aria-controls.",
9542
- "fieldName": "id"
9543
- },
9544
- {
9545
- "name": "anchor",
9546
- "type": {
9547
- "text": "string | undefined"
9548
- },
9549
- "description": "Set an optional anchor element to align against, replacing the triggering element.",
9550
- "fieldName": "anchor"
9551
- },
9552
- {
9553
- "name": "open",
9554
- "type": {
9555
- "text": "boolean"
9556
- },
9557
- "default": "false",
9558
- "description": "Controls whether the component is open or not.",
9559
- "fieldName": "open",
9560
- "inheritedFrom": {
9561
- "name": "FloatingMixin",
9562
- "module": "src/common/mixins/FloatingComponentMixin.ts"
9563
- }
9564
- },
9565
- {
9566
- "name": "align",
9567
- "type": {
9568
- "text": "\"start\" | \"end\""
9569
- },
9570
- "default": "\"start\"",
9571
- "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
9572
- "fieldName": "align",
9573
- "inheritedFrom": {
9574
- "name": "FloatingMixin",
9575
- "module": "src/common/mixins/FloatingComponentMixin.ts"
9576
- }
9577
- },
9578
- {
9579
- "name": "position",
9580
- "type": {
9581
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
9582
- },
9583
- "default": "\"block-end\"",
9584
- "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
9585
- "fieldName": "position",
9586
- "inheritedFrom": {
9587
- "name": "FloatingMixin",
9588
- "module": "src/common/mixins/FloatingComponentMixin.ts"
9589
- }
9590
- }
9591
- ],
9592
- "mixins": [
9593
- {
9594
- "name": "FloatingMixin",
9595
- "module": "/src/common/mixins/FloatingComponentMixin.js"
9596
- }
9597
- ],
9598
- "superclass": {
9599
- "name": "LitElement",
9600
- "package": "lit"
9601
- },
9602
- "localization": [],
9603
- "status": "ready",
9604
- "category": "overlay",
9605
- "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 position popout next to the button or other interface element that toggles it.\n- Use a popout to contain controls or information that doesn’t need to be shown immediately.\n- Use a popout to contain items that will most likely not fit into the current view.\n- Use a clearly labelled button to reveal the popout.\n- Use the appropriate `aria-haspopup` and `role` attributes for both the toggle button and containing items. Please refer to the [MDN documentation on both role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values) and [child role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#associated_roles).\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide information inside a popout that is imperative to using the current view.\n- Don’t obscure other controls that are important with the popout.\n- Don’t allow the popout to be obscured by other controls or the outer bounds of the current view.\n</div>\n\n---\n\n## Content guidelines\n\nIf a popout contains actions, they should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nPopout actions should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in popout actions, 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 popout actions 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\nAvoid all caps for popout actions:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\n---\n\n## Additional considerations\n\n- The popout component is a containing component, only providing a way to reveal and hide controls by using a single button.\n",
9606
- "examples": [],
9607
- "tagName": "nord-popout",
9608
- "customElement": true
9609
- }
9610
- ],
9611
- "exports": [
9612
- {
9613
- "kind": "js",
9614
- "name": "default",
9615
- "declaration": {
9616
- "name": "Popout",
9617
- "module": "src/popout/Popout.ts"
9618
- }
9619
- },
9620
- {
9621
- "kind": "custom-element-definition",
9622
- "name": "nord-popout",
9623
- "declaration": {
9624
- "name": "Popout",
9625
- "module": "src/popout/Popout.ts"
9626
- }
9627
- }
9628
- ]
9629
- },
9630
- {
9631
- "kind": "javascript-module",
9632
- "path": "src/progress-bar/ProgressBar.ts",
9633
- "declarations": [
9634
- {
9635
- "kind": "class",
9636
- "description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
9637
- "name": "ProgressBar",
9638
- "cssProperties": [
9639
- {
9640
- "description": "Controls the thickness of the progress bar, using our [spacing tokens](/tokens/#space).",
9641
- "name": "--n-progress-size",
9642
- "default": "var(--n-space-s)"
9643
- },
9644
- {
9645
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
9646
- "name": "--n-progress-border-radius",
9647
- "default": "var(--n-border-radius-s)"
9648
- },
9649
- {
9650
- "description": "Controls the color of the progress bar, using [color tokens](/tokens/#color).",
9651
- "name": "--n-progress-color",
9652
- "default": "var(--n-color-accent)"
9653
- }
9654
- ],
9655
- "members": [
9656
- {
9657
- "kind": "field",
9658
- "name": "value",
9659
- "type": {
9660
- "text": "number | undefined"
9661
- },
9662
- "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
9663
- "attribute": "value",
9664
- "reflects": true
9665
- },
9666
- {
9667
- "kind": "field",
9668
- "name": "max",
9669
- "type": {
9670
- "text": "number"
9671
- },
9672
- "default": "100",
9673
- "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
9674
- "attribute": "max",
9675
- "reflects": true
9676
- },
9677
- {
9678
- "kind": "field",
9679
- "name": "label",
9680
- "type": {
9681
- "text": "string"
9682
- },
9683
- "default": "\"Current progress\"",
9684
- "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
9685
- "attribute": "label",
9686
- "reflects": true
9687
- },
9688
- {
9689
- "kind": "field",
9690
- "name": "focusableRef",
9691
- "privacy": "protected",
9692
- "inheritedFrom": {
9693
- "name": "FocusableMixin",
9694
- "module": "src/common/mixins/FocusableMixin.ts"
9695
- }
9696
- },
9697
- {
9698
- "kind": "method",
9699
- "name": "focus",
9700
- "parameters": [
9701
- {
9702
- "name": "options",
9703
- "optional": true,
9704
- "type": {
9705
- "text": "FocusOptions"
9706
- },
9707
- "description": "An object which controls aspects of the focusing process."
9708
- }
9709
- ],
9710
- "description": "Programmatically move focus to the component.",
9711
- "inheritedFrom": {
9712
- "name": "FocusableMixin",
9713
- "module": "src/common/mixins/FocusableMixin.ts"
9714
- }
9715
- },
9716
- {
9717
- "kind": "method",
9718
- "name": "blur",
9719
- "description": "Programmatically remove focus from the component.",
9720
- "inheritedFrom": {
9721
- "name": "FocusableMixin",
9722
- "module": "src/common/mixins/FocusableMixin.ts"
9723
- }
9724
- },
9725
- {
9726
- "kind": "method",
9727
- "name": "click",
9728
- "description": "Programmatically simulates a click on the component.",
9729
- "inheritedFrom": {
9730
- "name": "FocusableMixin",
9731
- "module": "src/common/mixins/FocusableMixin.ts"
9732
- }
9599
+ },
9600
+ {
9601
+ "name": "close",
9602
+ "type": {
9603
+ "text": "NordEvent"
9604
+ },
9605
+ "description": "Dispatched when the popout is closed."
9733
9606
  }
9734
9607
  ],
9735
9608
  "attributes": [
9736
9609
  {
9737
- "name": "value",
9610
+ "name": "id",
9738
9611
  "type": {
9739
- "text": "number | undefined"
9612
+ "text": "string"
9740
9613
  },
9741
- "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
9742
- "fieldName": "value"
9614
+ "default": "\"\"",
9615
+ "description": "The id for the active element to reference via aria-controls.",
9616
+ "fieldName": "id"
9743
9617
  },
9744
9618
  {
9745
- "name": "max",
9619
+ "name": "anchor",
9746
9620
  "type": {
9747
- "text": "number"
9621
+ "text": "string | undefined"
9748
9622
  },
9749
- "default": "100",
9750
- "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
9751
- "fieldName": "max"
9623
+ "description": "Set an optional anchor element to align against, replacing the triggering element.",
9624
+ "fieldName": "anchor"
9752
9625
  },
9753
9626
  {
9754
- "name": "label",
9627
+ "name": "open",
9755
9628
  "type": {
9756
- "text": "string"
9629
+ "text": "boolean"
9757
9630
  },
9758
- "default": "\"Current progress\"",
9759
- "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
9760
- "fieldName": "label"
9631
+ "default": "false",
9632
+ "description": "Controls whether the component is open or not.",
9633
+ "fieldName": "open",
9634
+ "inheritedFrom": {
9635
+ "name": "FloatingMixin",
9636
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
9637
+ }
9638
+ },
9639
+ {
9640
+ "name": "align",
9641
+ "type": {
9642
+ "text": "\"start\" | \"end\""
9643
+ },
9644
+ "default": "\"start\"",
9645
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
9646
+ "fieldName": "align",
9647
+ "inheritedFrom": {
9648
+ "name": "FloatingMixin",
9649
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
9650
+ }
9651
+ },
9652
+ {
9653
+ "name": "position",
9654
+ "type": {
9655
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
9656
+ },
9657
+ "default": "\"block-end\"",
9658
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
9659
+ "fieldName": "position",
9660
+ "inheritedFrom": {
9661
+ "name": "FloatingMixin",
9662
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
9663
+ }
9761
9664
  }
9762
9665
  ],
9763
9666
  "mixins": [
9764
9667
  {
9765
- "name": "FocusableMixin",
9766
- "module": "/src/common/mixins/FocusableMixin.js"
9668
+ "name": "FloatingMixin",
9669
+ "module": "/src/common/mixins/FloatingComponentMixin.js"
9767
9670
  }
9768
9671
  ],
9769
9672
  "superclass": {
@@ -9772,10 +9675,10 @@
9772
9675
  },
9773
9676
  "localization": [],
9774
9677
  "status": "ready",
9775
- "category": "feedback",
9776
- "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 the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n",
9678
+ "category": "overlay",
9679
+ "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 position popout next to the button or other interface element that toggles it.\n- Use a popout to contain controls or information that doesn’t need to be shown immediately.\n- Use a popout to contain items that will most likely not fit into the current view.\n- Use a clearly labelled button to reveal the popout.\n- Use the appropriate `aria-haspopup` and `role` attributes for both the toggle button and containing items. Please refer to the [MDN documentation on both role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values) and [child role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#associated_roles).\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide information inside a popout that is imperative to using the current view.\n- Don’t obscure other controls that are important with the popout.\n- Don’t allow the popout to be obscured by other controls or the outer bounds of the current view.\n</div>\n\n---\n\n## Content guidelines\n\nIf a popout contains actions, they should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nPopout actions should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in popout actions, 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 popout actions 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\nAvoid all caps for popout actions:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\n---\n\n## Additional considerations\n\n- The popout component is a containing component, only providing a way to reveal and hide controls by using a single button.\n",
9777
9680
  "examples": [],
9778
- "tagName": "nord-progress-bar",
9681
+ "tagName": "nord-popout",
9779
9682
  "customElement": true
9780
9683
  }
9781
9684
  ],
@@ -9784,16 +9687,16 @@
9784
9687
  "kind": "js",
9785
9688
  "name": "default",
9786
9689
  "declaration": {
9787
- "name": "ProgressBar",
9788
- "module": "src/progress-bar/ProgressBar.ts"
9690
+ "name": "Popout",
9691
+ "module": "src/popout/Popout.ts"
9789
9692
  }
9790
9693
  },
9791
9694
  {
9792
9695
  "kind": "custom-element-definition",
9793
- "name": "nord-progress-bar",
9696
+ "name": "nord-popout",
9794
9697
  "declaration": {
9795
- "name": "ProgressBar",
9796
- "module": "src/progress-bar/ProgressBar.ts"
9698
+ "name": "Popout",
9699
+ "module": "src/popout/Popout.ts"
9797
9700
  }
9798
9701
  }
9799
9702
  ]
@@ -9957,11 +9860,182 @@
9957
9860
  },
9958
9861
  "localization": [],
9959
9862
  "status": "ready",
9960
- "category": "image",
9961
- "displayName": "QR Code",
9962
- "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 allow people to access information on their smartphone without the need to type.\n- Always provide an alternative way to access the same information.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide important information behind a QR Code only.\n\n</div>\n",
9863
+ "category": "image",
9864
+ "displayName": "QR Code",
9865
+ "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 allow people to access information on their smartphone without the need to type.\n- Always provide an alternative way to access the same information.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide important information behind a QR Code only.\n\n</div>\n",
9866
+ "examples": [],
9867
+ "tagName": "nord-qrcode",
9868
+ "customElement": true
9869
+ }
9870
+ ],
9871
+ "exports": [
9872
+ {
9873
+ "kind": "js",
9874
+ "name": "default",
9875
+ "declaration": {
9876
+ "name": "Qrcode",
9877
+ "module": "src/qrcode/Qrcode.ts"
9878
+ }
9879
+ },
9880
+ {
9881
+ "kind": "custom-element-definition",
9882
+ "name": "nord-qrcode",
9883
+ "declaration": {
9884
+ "name": "Qrcode",
9885
+ "module": "src/qrcode/Qrcode.ts"
9886
+ }
9887
+ }
9888
+ ]
9889
+ },
9890
+ {
9891
+ "kind": "javascript-module",
9892
+ "path": "src/progress-bar/ProgressBar.ts",
9893
+ "declarations": [
9894
+ {
9895
+ "kind": "class",
9896
+ "description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
9897
+ "name": "ProgressBar",
9898
+ "cssProperties": [
9899
+ {
9900
+ "description": "Controls the thickness of the progress bar, using our [spacing tokens](/tokens/#space).",
9901
+ "name": "--n-progress-size",
9902
+ "default": "var(--n-space-s)"
9903
+ },
9904
+ {
9905
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
9906
+ "name": "--n-progress-border-radius",
9907
+ "default": "var(--n-border-radius-s)"
9908
+ },
9909
+ {
9910
+ "description": "Controls the color of the progress bar, using [color tokens](/tokens/#color).",
9911
+ "name": "--n-progress-color",
9912
+ "default": "var(--n-color-accent)"
9913
+ }
9914
+ ],
9915
+ "members": [
9916
+ {
9917
+ "kind": "field",
9918
+ "name": "value",
9919
+ "type": {
9920
+ "text": "number | undefined"
9921
+ },
9922
+ "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
9923
+ "attribute": "value",
9924
+ "reflects": true
9925
+ },
9926
+ {
9927
+ "kind": "field",
9928
+ "name": "max",
9929
+ "type": {
9930
+ "text": "number"
9931
+ },
9932
+ "default": "100",
9933
+ "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
9934
+ "attribute": "max",
9935
+ "reflects": true
9936
+ },
9937
+ {
9938
+ "kind": "field",
9939
+ "name": "label",
9940
+ "type": {
9941
+ "text": "string"
9942
+ },
9943
+ "default": "\"Current progress\"",
9944
+ "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
9945
+ "attribute": "label",
9946
+ "reflects": true
9947
+ },
9948
+ {
9949
+ "kind": "field",
9950
+ "name": "focusableRef",
9951
+ "privacy": "protected",
9952
+ "inheritedFrom": {
9953
+ "name": "FocusableMixin",
9954
+ "module": "src/common/mixins/FocusableMixin.ts"
9955
+ }
9956
+ },
9957
+ {
9958
+ "kind": "method",
9959
+ "name": "focus",
9960
+ "parameters": [
9961
+ {
9962
+ "name": "options",
9963
+ "optional": true,
9964
+ "type": {
9965
+ "text": "FocusOptions"
9966
+ },
9967
+ "description": "An object which controls aspects of the focusing process."
9968
+ }
9969
+ ],
9970
+ "description": "Programmatically move focus to the component.",
9971
+ "inheritedFrom": {
9972
+ "name": "FocusableMixin",
9973
+ "module": "src/common/mixins/FocusableMixin.ts"
9974
+ }
9975
+ },
9976
+ {
9977
+ "kind": "method",
9978
+ "name": "blur",
9979
+ "description": "Programmatically remove focus from the component.",
9980
+ "inheritedFrom": {
9981
+ "name": "FocusableMixin",
9982
+ "module": "src/common/mixins/FocusableMixin.ts"
9983
+ }
9984
+ },
9985
+ {
9986
+ "kind": "method",
9987
+ "name": "click",
9988
+ "description": "Programmatically simulates a click on the component.",
9989
+ "inheritedFrom": {
9990
+ "name": "FocusableMixin",
9991
+ "module": "src/common/mixins/FocusableMixin.ts"
9992
+ }
9993
+ }
9994
+ ],
9995
+ "attributes": [
9996
+ {
9997
+ "name": "value",
9998
+ "type": {
9999
+ "text": "number | undefined"
10000
+ },
10001
+ "description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
10002
+ "fieldName": "value"
10003
+ },
10004
+ {
10005
+ "name": "max",
10006
+ "type": {
10007
+ "text": "number"
10008
+ },
10009
+ "default": "100",
10010
+ "description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
10011
+ "fieldName": "max"
10012
+ },
10013
+ {
10014
+ "name": "label",
10015
+ "type": {
10016
+ "text": "string"
10017
+ },
10018
+ "default": "\"Current progress\"",
10019
+ "description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
10020
+ "fieldName": "label"
10021
+ }
10022
+ ],
10023
+ "mixins": [
10024
+ {
10025
+ "name": "FocusableMixin",
10026
+ "module": "/src/common/mixins/FocusableMixin.js"
10027
+ }
10028
+ ],
10029
+ "superclass": {
10030
+ "name": "LitElement",
10031
+ "package": "lit"
10032
+ },
10033
+ "localization": [],
10034
+ "status": "ready",
10035
+ "category": "feedback",
10036
+ "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 the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n",
9963
10037
  "examples": [],
9964
- "tagName": "nord-qrcode",
10038
+ "tagName": "nord-progress-bar",
9965
10039
  "customElement": true
9966
10040
  }
9967
10041
  ],
@@ -9970,16 +10044,16 @@
9970
10044
  "kind": "js",
9971
10045
  "name": "default",
9972
10046
  "declaration": {
9973
- "name": "Qrcode",
9974
- "module": "src/qrcode/Qrcode.ts"
10047
+ "name": "ProgressBar",
10048
+ "module": "src/progress-bar/ProgressBar.ts"
9975
10049
  }
9976
10050
  },
9977
10051
  {
9978
10052
  "kind": "custom-element-definition",
9979
- "name": "nord-qrcode",
10053
+ "name": "nord-progress-bar",
9980
10054
  "declaration": {
9981
- "name": "Qrcode",
9982
- "module": "src/qrcode/Qrcode.ts"
10055
+ "name": "ProgressBar",
10056
+ "module": "src/progress-bar/ProgressBar.ts"
9983
10057
  }
9984
10058
  }
9985
10059
  ]
@@ -12325,6 +12399,100 @@
12325
12399
  }
12326
12400
  ]
12327
12401
  },
12402
+ {
12403
+ "kind": "javascript-module",
12404
+ "path": "src/tab/Tab.ts",
12405
+ "declarations": [
12406
+ {
12407
+ "kind": "class",
12408
+ "description": "The interactive tab button for use within the tab group component.",
12409
+ "name": "Tab",
12410
+ "cssProperties": [
12411
+ {
12412
+ "description": "Controls the text color of the tab, using our [color tokens](/tokens/#color).",
12413
+ "name": "--n-tab-color",
12414
+ "default": "var(--n-color-text-weak)"
12415
+ },
12416
+ {
12417
+ "description": "Controls the font weight of the tab, using our [font tokens](/tokens/#font).",
12418
+ "name": "--n-tab-font-weight",
12419
+ "default": "var(--n-font-weight)"
12420
+ }
12421
+ ],
12422
+ "slots": [
12423
+ {
12424
+ "description": "The tab button content.",
12425
+ "name": ""
12426
+ }
12427
+ ],
12428
+ "members": [
12429
+ {
12430
+ "kind": "field",
12431
+ "name": "defaultSlot",
12432
+ "privacy": "private",
12433
+ "default": "new SlotController(this)"
12434
+ },
12435
+ {
12436
+ "kind": "field",
12437
+ "name": "selected",
12438
+ "type": {
12439
+ "text": "boolean"
12440
+ },
12441
+ "default": "false",
12442
+ "description": "Whether the tab item is selected",
12443
+ "attribute": "selected",
12444
+ "reflects": true
12445
+ },
12446
+ {
12447
+ "kind": "method",
12448
+ "name": "handleSelectionChange",
12449
+ "privacy": "protected",
12450
+ "description": "Apply accessible attributes and values to the tab button.\nObserve the selected property if it changes"
12451
+ }
12452
+ ],
12453
+ "attributes": [
12454
+ {
12455
+ "name": "selected",
12456
+ "type": {
12457
+ "text": "boolean"
12458
+ },
12459
+ "default": "false",
12460
+ "description": "Whether the tab item is selected",
12461
+ "fieldName": "selected"
12462
+ }
12463
+ ],
12464
+ "superclass": {
12465
+ "name": "LitElement",
12466
+ "package": "lit"
12467
+ },
12468
+ "localization": [],
12469
+ "status": "ready",
12470
+ "category": "navigation",
12471
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab component within the tab group component.\n- Use the `selected` option to signify if the tab is selected.\n- Use text, icons and other non-interactive content within the tab.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use the tab component outside of the tab group component.\n- Don't add interactive elements, such as buttons and links, inside the tab component.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab 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 tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular section you wish to show out of order of the tabs UI itself consider using the `selected` option to select the tab but prevent the order of the tabs being affected.\n",
12472
+ "examples": [],
12473
+ "tagName": "nord-tab",
12474
+ "customElement": true
12475
+ }
12476
+ ],
12477
+ "exports": [
12478
+ {
12479
+ "kind": "js",
12480
+ "name": "default",
12481
+ "declaration": {
12482
+ "name": "Tab",
12483
+ "module": "src/tab/Tab.ts"
12484
+ }
12485
+ },
12486
+ {
12487
+ "kind": "custom-element-definition",
12488
+ "name": "nord-tab",
12489
+ "declaration": {
12490
+ "name": "Tab",
12491
+ "module": "src/tab/Tab.ts"
12492
+ }
12493
+ }
12494
+ ]
12495
+ },
12328
12496
  {
12329
12497
  "kind": "javascript-module",
12330
12498
  "path": "src/stack/Stack.ts",
@@ -12504,66 +12672,19 @@
12504
12672
  },
12505
12673
  {
12506
12674
  "kind": "javascript-module",
12507
- "path": "src/tab/Tab.ts",
12675
+ "path": "src/tab-panel/TabPanel.ts",
12508
12676
  "declarations": [
12509
12677
  {
12510
12678
  "kind": "class",
12511
- "description": "The interactive tab button for use within the tab group component.",
12512
- "name": "Tab",
12513
- "cssProperties": [
12514
- {
12515
- "description": "Controls the text color of the tab, using our [color tokens](/tokens/#color).",
12516
- "name": "--n-tab-color",
12517
- "default": "var(--n-color-text-weak)"
12518
- },
12519
- {
12520
- "description": "Controls the font weight of the tab, using our [font tokens](/tokens/#font).",
12521
- "name": "--n-tab-font-weight",
12522
- "default": "var(--n-font-weight)"
12523
- }
12524
- ],
12679
+ "description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
12680
+ "name": "TabPanel",
12525
12681
  "slots": [
12526
12682
  {
12527
- "description": "The tab button content.",
12683
+ "description": "The tab panel content.",
12528
12684
  "name": ""
12529
12685
  }
12530
12686
  ],
12531
- "members": [
12532
- {
12533
- "kind": "field",
12534
- "name": "defaultSlot",
12535
- "privacy": "private",
12536
- "default": "new SlotController(this)"
12537
- },
12538
- {
12539
- "kind": "field",
12540
- "name": "selected",
12541
- "type": {
12542
- "text": "boolean"
12543
- },
12544
- "default": "false",
12545
- "description": "Whether the tab item is selected",
12546
- "attribute": "selected",
12547
- "reflects": true
12548
- },
12549
- {
12550
- "kind": "method",
12551
- "name": "handleSelectionChange",
12552
- "privacy": "protected",
12553
- "description": "Apply accessible attributes and values to the tab button.\nObserve the selected property if it changes"
12554
- }
12555
- ],
12556
- "attributes": [
12557
- {
12558
- "name": "selected",
12559
- "type": {
12560
- "text": "boolean"
12561
- },
12562
- "default": "false",
12563
- "description": "Whether the tab item is selected",
12564
- "fieldName": "selected"
12565
- }
12566
- ],
12687
+ "members": [],
12567
12688
  "superclass": {
12568
12689
  "name": "LitElement",
12569
12690
  "package": "lit"
@@ -12571,9 +12692,9 @@
12571
12692
  "localization": [],
12572
12693
  "status": "ready",
12573
12694
  "category": "navigation",
12574
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab component within the tab group component.\n- Use the `selected` option to signify if the tab is selected.\n- Use text, icons and other non-interactive content within the tab.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use the tab component outside of the tab group component.\n- Don't add interactive elements, such as buttons and links, inside the tab component.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab 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 tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular section you wish to show out of order of the tabs UI itself consider using the `selected` option to select the tab but prevent the order of the tabs being affected.\n",
12695
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab 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 tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n",
12575
12696
  "examples": [],
12576
- "tagName": "nord-tab",
12697
+ "tagName": "nord-tab-panel",
12577
12698
  "customElement": true
12578
12699
  }
12579
12700
  ],
@@ -12582,16 +12703,16 @@
12582
12703
  "kind": "js",
12583
12704
  "name": "default",
12584
12705
  "declaration": {
12585
- "name": "Tab",
12586
- "module": "src/tab/Tab.ts"
12706
+ "name": "TabPanel",
12707
+ "module": "src/tab-panel/TabPanel.ts"
12587
12708
  }
12588
12709
  },
12589
12710
  {
12590
12711
  "kind": "custom-element-definition",
12591
- "name": "nord-tab",
12712
+ "name": "nord-tab-panel",
12592
12713
  "declaration": {
12593
- "name": "Tab",
12594
- "module": "src/tab/Tab.ts"
12714
+ "name": "TabPanel",
12715
+ "module": "src/tab-panel/TabPanel.ts"
12595
12716
  }
12596
12717
  }
12597
12718
  ]
@@ -12840,29 +12961,121 @@
12840
12961
  },
12841
12962
  {
12842
12963
  "kind": "javascript-module",
12843
- "path": "src/tab-panel/TabPanel.ts",
12964
+ "path": "src/toast/Toast.ts",
12844
12965
  "declarations": [
12845
12966
  {
12846
12967
  "kind": "class",
12847
- "description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
12848
- "name": "TabPanel",
12968
+ "description": "Toasts are non-disruptive messages that appear in the interface\nto provide quick, at-a-glance feedback on the outcome of an action.",
12969
+ "name": "Toast",
12849
12970
  "slots": [
12850
12971
  {
12851
- "description": "The tab panel content.",
12852
- "name": ""
12972
+ "description": "Default slot used for the toast text/message.",
12973
+ "name": ""
12974
+ }
12975
+ ],
12976
+ "members": [
12977
+ {
12978
+ "kind": "field",
12979
+ "name": "timeoutId",
12980
+ "type": {
12981
+ "text": "ReturnType<typeof setTimeout> | undefined"
12982
+ },
12983
+ "privacy": "private"
12984
+ },
12985
+ {
12986
+ "kind": "field",
12987
+ "name": "events",
12988
+ "privacy": "private",
12989
+ "default": "new EventController(this)"
12990
+ },
12991
+ {
12992
+ "kind": "field",
12993
+ "name": "toast",
12994
+ "type": {
12995
+ "text": "HTMLElement"
12996
+ },
12997
+ "privacy": "private"
12998
+ },
12999
+ {
13000
+ "kind": "field",
13001
+ "name": "dismissed",
13002
+ "type": {
13003
+ "text": "boolean"
13004
+ },
13005
+ "privacy": "private",
13006
+ "default": "false"
13007
+ },
13008
+ {
13009
+ "kind": "field",
13010
+ "name": "variant",
13011
+ "type": {
13012
+ "text": "\"default\" | \"danger\""
13013
+ },
13014
+ "default": "\"default\"",
13015
+ "description": "The style variant of the toast.",
13016
+ "attribute": "variant",
13017
+ "reflects": true
13018
+ },
13019
+ {
13020
+ "kind": "field",
13021
+ "name": "autoDismiss",
13022
+ "type": {
13023
+ "text": "number"
13024
+ },
13025
+ "default": "10000",
13026
+ "description": "Timeout in milliseconds before the toast is automatically dismissed.",
13027
+ "attribute": "auto-dismiss"
13028
+ },
13029
+ {
13030
+ "kind": "method",
13031
+ "name": "dismiss",
13032
+ "description": "Programmatically dismiss the toast.\nThe returned promise resolves when toast's exit animation is complete."
13033
+ },
13034
+ {
13035
+ "kind": "method",
13036
+ "name": "handleAutoDismissChange",
13037
+ "privacy": "protected"
13038
+ }
13039
+ ],
13040
+ "events": [
13041
+ {
13042
+ "name": "dismiss",
13043
+ "type": {
13044
+ "text": "NordEvent"
13045
+ },
13046
+ "description": "Fired when the toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM."
13047
+ }
13048
+ ],
13049
+ "attributes": [
13050
+ {
13051
+ "name": "variant",
13052
+ "type": {
13053
+ "text": "\"default\" | \"danger\""
13054
+ },
13055
+ "default": "\"default\"",
13056
+ "description": "The style variant of the toast.",
13057
+ "fieldName": "variant"
13058
+ },
13059
+ {
13060
+ "name": "auto-dismiss",
13061
+ "type": {
13062
+ "text": "number"
13063
+ },
13064
+ "default": "10000",
13065
+ "description": "Timeout in milliseconds before the toast is automatically dismissed.",
13066
+ "fieldName": "autoDismiss"
12853
13067
  }
12854
13068
  ],
12855
- "members": [],
12856
13069
  "superclass": {
12857
13070
  "name": "LitElement",
12858
13071
  "package": "lit"
12859
13072
  },
12860
13073
  "localization": [],
12861
13074
  "status": "ready",
12862
- "category": "navigation",
12863
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab 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 tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n",
13075
+ "category": "feedback",
13076
+ "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 short messages that confirm an action taken by a user.\n- Use for ephemeral status updates.\n- Use in combination with [Toast group](../toast-group/) so that toasts get styled and announced to screen readers correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Dont use toasts for critical information that user needs to act on.\n- Dont rely on users seeing toasts. Toasts are transient and should not be used for critical messages.\n- Don’t place interactive content in toasts. Assistive technology like screen readers will not convey any semantics when announcing toast messages.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast 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\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
12864
13077
  "examples": [],
12865
- "tagName": "nord-tab-panel",
13078
+ "tagName": "nord-toast",
12866
13079
  "customElement": true
12867
13080
  }
12868
13081
  ],
@@ -12871,16 +13084,16 @@
12871
13084
  "kind": "js",
12872
13085
  "name": "default",
12873
13086
  "declaration": {
12874
- "name": "TabPanel",
12875
- "module": "src/tab-panel/TabPanel.ts"
13087
+ "name": "Toast",
13088
+ "module": "src/toast/Toast.ts"
12876
13089
  }
12877
13090
  },
12878
13091
  {
12879
13092
  "kind": "custom-element-definition",
12880
- "name": "nord-tab-panel",
13093
+ "name": "nord-toast",
12881
13094
  "declaration": {
12882
- "name": "TabPanel",
12883
- "module": "src/tab-panel/TabPanel.ts"
13095
+ "name": "Toast",
13096
+ "module": "src/toast/Toast.ts"
12884
13097
  }
12885
13098
  }
12886
13099
  ]
@@ -13896,145 +14109,6 @@
13896
14109
  }
13897
14110
  ]
13898
14111
  },
13899
- {
13900
- "kind": "javascript-module",
13901
- "path": "src/toast/Toast.ts",
13902
- "declarations": [
13903
- {
13904
- "kind": "class",
13905
- "description": "Toasts are non-disruptive messages that appear in the interface\nto provide quick, at-a-glance feedback on the outcome of an action.",
13906
- "name": "Toast",
13907
- "slots": [
13908
- {
13909
- "description": "Default slot used for the toast text/message.",
13910
- "name": ""
13911
- }
13912
- ],
13913
- "members": [
13914
- {
13915
- "kind": "field",
13916
- "name": "timeoutId",
13917
- "type": {
13918
- "text": "ReturnType<typeof setTimeout> | undefined"
13919
- },
13920
- "privacy": "private"
13921
- },
13922
- {
13923
- "kind": "field",
13924
- "name": "events",
13925
- "privacy": "private",
13926
- "default": "new EventController(this)"
13927
- },
13928
- {
13929
- "kind": "field",
13930
- "name": "toast",
13931
- "type": {
13932
- "text": "HTMLElement"
13933
- },
13934
- "privacy": "private"
13935
- },
13936
- {
13937
- "kind": "field",
13938
- "name": "dismissed",
13939
- "type": {
13940
- "text": "boolean"
13941
- },
13942
- "privacy": "private",
13943
- "default": "false"
13944
- },
13945
- {
13946
- "kind": "field",
13947
- "name": "variant",
13948
- "type": {
13949
- "text": "\"default\" | \"danger\""
13950
- },
13951
- "default": "\"default\"",
13952
- "description": "The style variant of the toast.",
13953
- "attribute": "variant",
13954
- "reflects": true
13955
- },
13956
- {
13957
- "kind": "field",
13958
- "name": "autoDismiss",
13959
- "type": {
13960
- "text": "number"
13961
- },
13962
- "default": "10000",
13963
- "description": "Timeout in milliseconds before the toast is automatically dismissed.",
13964
- "attribute": "auto-dismiss"
13965
- },
13966
- {
13967
- "kind": "method",
13968
- "name": "dismiss",
13969
- "description": "Programmatically dismiss the toast.\nThe returned promise resolves when toast's exit animation is complete."
13970
- },
13971
- {
13972
- "kind": "method",
13973
- "name": "handleAutoDismissChange",
13974
- "privacy": "protected"
13975
- }
13976
- ],
13977
- "events": [
13978
- {
13979
- "name": "dismiss",
13980
- "type": {
13981
- "text": "NordEvent"
13982
- },
13983
- "description": "Fired when the toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM."
13984
- }
13985
- ],
13986
- "attributes": [
13987
- {
13988
- "name": "variant",
13989
- "type": {
13990
- "text": "\"default\" | \"danger\""
13991
- },
13992
- "default": "\"default\"",
13993
- "description": "The style variant of the toast.",
13994
- "fieldName": "variant"
13995
- },
13996
- {
13997
- "name": "auto-dismiss",
13998
- "type": {
13999
- "text": "number"
14000
- },
14001
- "default": "10000",
14002
- "description": "Timeout in milliseconds before the toast is automatically dismissed.",
14003
- "fieldName": "autoDismiss"
14004
- }
14005
- ],
14006
- "superclass": {
14007
- "name": "LitElement",
14008
- "package": "lit"
14009
- },
14010
- "localization": [],
14011
- "status": "ready",
14012
- "category": "feedback",
14013
- "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 short messages that confirm an action taken by a user.\n- Use for ephemeral status updates.\n- Use in combination with [Toast group](../toast-group/) so that toasts get styled and announced to screen readers correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use toasts for critical information that user needs to act on.\n- Don’t rely on users seeing toasts. Toasts are transient and should not be used for critical messages.\n- Don’t place interactive content in toasts. Assistive technology like screen readers will not convey any semantics when announcing toast messages.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast 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\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
14014
- "examples": [],
14015
- "tagName": "nord-toast",
14016
- "customElement": true
14017
- }
14018
- ],
14019
- "exports": [
14020
- {
14021
- "kind": "js",
14022
- "name": "default",
14023
- "declaration": {
14024
- "name": "Toast",
14025
- "module": "src/toast/Toast.ts"
14026
- }
14027
- },
14028
- {
14029
- "kind": "custom-element-definition",
14030
- "name": "nord-toast",
14031
- "declaration": {
14032
- "name": "Toast",
14033
- "module": "src/toast/Toast.ts"
14034
- }
14035
- }
14036
- ]
14037
- },
14038
14112
  {
14039
14113
  "kind": "javascript-module",
14040
14114
  "path": "src/toast-group/ToastGroup.ts",
@@ -15081,41 +15155,6 @@
15081
15155
  }
15082
15156
  ]
15083
15157
  },
15084
- {
15085
- "kind": "javascript-module",
15086
- "path": "src/common/decorators/observe.ts",
15087
- "declarations": [
15088
- {
15089
- "kind": "function",
15090
- "name": "observe",
15091
- "parameters": [
15092
- {
15093
- "name": "propertyName",
15094
- "type": {
15095
- "text": "string"
15096
- }
15097
- },
15098
- {
15099
- "name": "lifecycle",
15100
- "default": "\"update\"",
15101
- "type": {
15102
- "text": "ObserveLifecycle"
15103
- }
15104
- }
15105
- ]
15106
- }
15107
- ],
15108
- "exports": [
15109
- {
15110
- "kind": "js",
15111
- "name": "observe",
15112
- "declaration": {
15113
- "name": "observe",
15114
- "module": "src/common/decorators/observe.ts"
15115
- }
15116
- }
15117
- ]
15118
- },
15119
15158
  {
15120
15159
  "kind": "javascript-module",
15121
15160
  "path": "src/common/controllers/DirectionController.ts",
@@ -16173,6 +16212,41 @@
16173
16212
  }
16174
16213
  ]
16175
16214
  },
16215
+ {
16216
+ "kind": "javascript-module",
16217
+ "path": "src/common/decorators/observe.ts",
16218
+ "declarations": [
16219
+ {
16220
+ "kind": "function",
16221
+ "name": "observe",
16222
+ "parameters": [
16223
+ {
16224
+ "name": "propertyName",
16225
+ "type": {
16226
+ "text": "string"
16227
+ }
16228
+ },
16229
+ {
16230
+ "name": "lifecycle",
16231
+ "default": "\"update\"",
16232
+ "type": {
16233
+ "text": "ObserveLifecycle"
16234
+ }
16235
+ }
16236
+ ]
16237
+ }
16238
+ ],
16239
+ "exports": [
16240
+ {
16241
+ "kind": "js",
16242
+ "name": "observe",
16243
+ "declaration": {
16244
+ "name": "observe",
16245
+ "module": "src/common/decorators/observe.ts"
16246
+ }
16247
+ }
16248
+ ]
16249
+ },
16176
16250
  {
16177
16251
  "kind": "javascript-module",
16178
16252
  "path": "src/common/directives/cond.ts",