@nordhealth/components 3.5.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/custom-elements.json +1907 -1915
  2. package/lib/{AutocompleteMixin-a98ada34.js → AutocompleteMixin-60503685.js} +2 -2
  3. package/lib/{AutocompleteMixin-a98ada34.js.map → AutocompleteMixin-60503685.js.map} +1 -1
  4. package/lib/Avatar.js +1 -1
  5. package/lib/Badge.js +1 -1
  6. package/lib/Banner.js +1 -1
  7. package/lib/Banner.js.map +1 -1
  8. package/lib/Button.js +1 -1
  9. package/lib/ButtonGroup.js +1 -1
  10. package/lib/{Calendar-b19b4bf6.js → Calendar-c68fd0d2.js} +2 -2
  11. package/lib/{Calendar-b19b4bf6.js.map → Calendar-c68fd0d2.js.map} +1 -1
  12. package/lib/Calendar.js +1 -1
  13. package/lib/Card.js +1 -1
  14. package/lib/Checkbox.js +1 -1
  15. package/lib/CommandMenu.js +1 -1
  16. package/lib/CommandMenu.js.map +1 -1
  17. package/lib/CommandMenuAction.js +1 -1
  18. package/lib/CommandMenuAction.js.map +1 -1
  19. package/lib/{Component-1f694235.js → Component-253ecb24.js} +2 -2
  20. package/lib/Component-253ecb24.js.map +1 -0
  21. package/lib/DatePicker.js +1 -1
  22. package/lib/Divider.js +1 -1
  23. package/lib/Drawer.js +1 -1
  24. package/lib/Dropdown.js +1 -1
  25. package/lib/DropdownGroup.js +1 -1
  26. package/lib/{DropdownItem-5c12978f.js → DropdownItem-397cd757.js} +2 -2
  27. package/lib/DropdownItem-397cd757.js.map +1 -0
  28. package/lib/DropdownItem.js +1 -1
  29. package/lib/EmptyState.js +1 -1
  30. package/lib/Fieldset.js +1 -1
  31. package/lib/FocusableMixin-003e1094.js +2 -0
  32. package/lib/{FocusableMixin-186c69a2.js.map → FocusableMixin-003e1094.js.map} +1 -1
  33. package/lib/{FormAssociatedMixin-5fedde68.js → FormAssociatedMixin-0638b151.js} +2 -2
  34. package/lib/{FormAssociatedMixin-5fedde68.js.map → FormAssociatedMixin-0638b151.js.map} +1 -1
  35. package/lib/{FormField-3226fb17.js → FormField-0783cb5a.js} +2 -2
  36. package/lib/FormField-0783cb5a.js.map +1 -0
  37. package/lib/Header.js +1 -1
  38. package/lib/Icon.js +2 -2
  39. package/lib/Input.js +1 -1
  40. package/lib/{InputMixin-d50cb41a.js → InputMixin-87012c5a.js} +2 -2
  41. package/lib/{InputMixin-d50cb41a.js.map → InputMixin-87012c5a.js.map} +1 -1
  42. package/lib/Layout.js +1 -1
  43. package/lib/Layout.js.map +1 -1
  44. package/lib/LightDomController-2b7e42a2.js +2 -0
  45. package/lib/LightDomController-2b7e42a2.js.map +1 -0
  46. package/lib/Message.js +1 -1
  47. package/lib/Modal.js +1 -1
  48. package/lib/NavGroup.js +1 -1
  49. package/lib/NavItem.js +1 -1
  50. package/lib/{NavToggle-0e6c6458.js → NavToggle-d39f3c6d.js} +2 -2
  51. package/lib/{NavToggle-0e6c6458.js.map → NavToggle-d39f3c6d.js.map} +1 -1
  52. package/lib/NavToggle.js +1 -1
  53. package/lib/Navigation.js +1 -1
  54. package/lib/Notification.js +1 -1
  55. package/lib/NotificationGroup.js +1 -1
  56. package/lib/{NotificationMixin-5e028561.js → NotificationMixin-cea138a7.js} +2 -2
  57. package/lib/{NotificationMixin-5e028561.js.map → NotificationMixin-cea138a7.js.map} +1 -1
  58. package/lib/{Popout-6a85e4b6.js → Popout-1183c22b.js} +2 -2
  59. package/lib/{Popout-6a85e4b6.js.map → Popout-1183c22b.js.map} +1 -1
  60. package/lib/Popout.js +1 -1
  61. package/lib/ProgressBar.js +1 -1
  62. package/lib/Qrcode.js +1 -1
  63. package/lib/Qrcode.js.map +1 -1
  64. package/lib/Radio.js +1 -1
  65. package/lib/Radio.js.map +1 -1
  66. package/lib/Range.js +1 -1
  67. package/lib/Select.js +1 -1
  68. package/lib/{SizeMixin-f04ac402.js → SizeMixin-bc2098f4.js} +2 -2
  69. package/lib/{SizeMixin-f04ac402.js.map → SizeMixin-bc2098f4.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-b4e6c315.js → Sticky-220280e0.js} +2 -2
  74. package/lib/Sticky-220280e0.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-3f901ec8.js → TextField-b455a6dd.js} +2 -2
  80. package/lib/{TextField-3f901ec8.js.map → TextField-b455a6dd.js.map} +1 -1
  81. package/lib/Textarea.js +1 -1
  82. package/lib/Toast.js +1 -1
  83. package/lib/ToastGroup.js +1 -1
  84. package/lib/Toggle.js +1 -1
  85. package/lib/Tooltip.js +1 -1
  86. package/lib/TopBar.js +1 -1
  87. package/lib/VisuallyHidden.js +1 -1
  88. package/lib/bundle.js +6 -6
  89. package/lib/bundle.js.map +1 -1
  90. package/lib/{class-map-c0d8e1e5.js → class-map-4a0dec4a.js} +2 -2
  91. package/lib/{class-map-c0d8e1e5.js.map → class-map-4a0dec4a.js.map} +1 -1
  92. package/lib/{collection-498f2b1f.js → collection-bba319d3.js} +3 -3
  93. package/lib/{collection-498f2b1f.js.map → collection-bba319d3.js.map} +1 -1
  94. package/lib/cond-77258def.js +2 -0
  95. package/lib/{cond-09498763.js.map → cond-77258def.js.map} +1 -1
  96. package/lib/{if-defined-8a007930.js → if-defined-10508457.js} +2 -2
  97. package/lib/{if-defined-8a007930.js.map → if-defined-10508457.js.map} +1 -1
  98. package/lib/index.js +1 -1
  99. package/lib/positioning-a572d126.js +1 -1
  100. package/lib/positioning-a572d126.js.map +1 -1
  101. package/lib/{query-assigned-elements-822fe360.js → query-assigned-elements-2f8275b7.js} +2 -2
  102. package/lib/query-assigned-elements-2f8275b7.js.map +1 -0
  103. package/lib/{ref-6b46e5ea.js → ref-f75a30b7.js} +3 -3
  104. package/lib/{ref-6b46e5ea.js.map → ref-f75a30b7.js.map} +1 -1
  105. package/lib/src/common/controllers/LightDomController.d.ts +0 -1
  106. package/lib/src/common/controllers/LightSlotController.d.ts +0 -1
  107. package/lib/style-map-75ce20b3.js +7 -0
  108. package/lib/style-map-75ce20b3.js.map +1 -0
  109. package/package.json +3 -3
  110. package/lib/Component-1f694235.js.map +0 -1
  111. package/lib/DropdownItem-5c12978f.js.map +0 -1
  112. package/lib/FocusableMixin-186c69a2.js +0 -2
  113. package/lib/FormField-3226fb17.js.map +0 -1
  114. package/lib/LightDomController-8a770234.js +0 -2
  115. package/lib/LightDomController-8a770234.js.map +0 -1
  116. package/lib/Sticky-b4e6c315.js.map +0 -1
  117. package/lib/cond-09498763.js +0 -2
  118. package/lib/query-assigned-elements-822fe360.js.map +0 -1
  119. package/lib/style-map-5b757428.js +0 -7
  120. package/lib/style-map-5b757428.js.map +0 -1
@@ -433,119 +433,6 @@
433
433
  }
434
434
  ]
435
435
  },
436
- {
437
- "kind": "javascript-module",
438
- "path": "src/badge/Badge.ts",
439
- "declarations": [
440
- {
441
- "kind": "class",
442
- "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.",
443
- "name": "Badge",
444
- "slots": [
445
- {
446
- "description": "The badge content.",
447
- "name": ""
448
- },
449
- {
450
- "description": "Used to place an icon at the start of badge.",
451
- "name": "icon"
452
- }
453
- ],
454
- "members": [
455
- {
456
- "kind": "field",
457
- "name": "type",
458
- "type": {
459
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
460
- },
461
- "description": "The type of badge.\nDetermines the background color of the badge.",
462
- "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
463
- "attribute": "type",
464
- "reflects": true
465
- },
466
- {
467
- "kind": "field",
468
- "name": "variant",
469
- "type": {
470
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
471
- },
472
- "description": "The style variant of the badge.\nDetermines the background color of the badge.",
473
- "attribute": "variant",
474
- "reflects": true
475
- },
476
- {
477
- "kind": "field",
478
- "name": "strong",
479
- "type": {
480
- "text": "boolean"
481
- },
482
- "default": "false",
483
- "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
484
- "attribute": "strong",
485
- "reflects": true
486
- }
487
- ],
488
- "attributes": [
489
- {
490
- "name": "type",
491
- "type": {
492
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
493
- },
494
- "description": "The type of badge.\nDetermines the background color of the badge.",
495
- "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
496
- "fieldName": "type"
497
- },
498
- {
499
- "name": "variant",
500
- "type": {
501
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
502
- },
503
- "description": "The style variant of the badge.\nDetermines the background color of the badge.",
504
- "fieldName": "variant"
505
- },
506
- {
507
- "name": "strong",
508
- "type": {
509
- "text": "boolean"
510
- },
511
- "default": "false",
512
- "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
513
- "fieldName": "strong"
514
- }
515
- ],
516
- "superclass": {
517
- "name": "LitElement",
518
- "package": "lit"
519
- },
520
- "localization": [],
521
- "status": "ready",
522
- "category": "text",
523
- "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",
524
- "examples": [],
525
- "dependencies": [],
526
- "tagName": "nord-badge",
527
- "customElement": true
528
- }
529
- ],
530
- "exports": [
531
- {
532
- "kind": "js",
533
- "name": "default",
534
- "declaration": {
535
- "name": "Badge",
536
- "module": "src/badge/Badge.ts"
537
- }
538
- },
539
- {
540
- "kind": "custom-element-definition",
541
- "name": "nord-badge",
542
- "declaration": {
543
- "name": "Badge",
544
- "module": "src/badge/Badge.ts"
545
- }
546
- }
547
- ]
548
- },
549
436
  {
550
437
  "kind": "javascript-module",
551
438
  "path": "src/avatar/Avatar.ts",
@@ -1330,6 +1217,119 @@
1330
1217
  }
1331
1218
  ]
1332
1219
  },
1220
+ {
1221
+ "kind": "javascript-module",
1222
+ "path": "src/badge/Badge.ts",
1223
+ "declarations": [
1224
+ {
1225
+ "kind": "class",
1226
+ "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.",
1227
+ "name": "Badge",
1228
+ "slots": [
1229
+ {
1230
+ "description": "The badge content.",
1231
+ "name": ""
1232
+ },
1233
+ {
1234
+ "description": "Used to place an icon at the start of badge.",
1235
+ "name": "icon"
1236
+ }
1237
+ ],
1238
+ "members": [
1239
+ {
1240
+ "kind": "field",
1241
+ "name": "type",
1242
+ "type": {
1243
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1244
+ },
1245
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1246
+ "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
1247
+ "attribute": "type",
1248
+ "reflects": true
1249
+ },
1250
+ {
1251
+ "kind": "field",
1252
+ "name": "variant",
1253
+ "type": {
1254
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
1255
+ },
1256
+ "description": "The style variant of the badge.\nDetermines the background color of the badge.",
1257
+ "attribute": "variant",
1258
+ "reflects": true
1259
+ },
1260
+ {
1261
+ "kind": "field",
1262
+ "name": "strong",
1263
+ "type": {
1264
+ "text": "boolean"
1265
+ },
1266
+ "default": "false",
1267
+ "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
1268
+ "attribute": "strong",
1269
+ "reflects": true
1270
+ }
1271
+ ],
1272
+ "attributes": [
1273
+ {
1274
+ "name": "type",
1275
+ "type": {
1276
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1277
+ },
1278
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1279
+ "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
1280
+ "fieldName": "type"
1281
+ },
1282
+ {
1283
+ "name": "variant",
1284
+ "type": {
1285
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
1286
+ },
1287
+ "description": "The style variant of the badge.\nDetermines the background color of the badge.",
1288
+ "fieldName": "variant"
1289
+ },
1290
+ {
1291
+ "name": "strong",
1292
+ "type": {
1293
+ "text": "boolean"
1294
+ },
1295
+ "default": "false",
1296
+ "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
1297
+ "fieldName": "strong"
1298
+ }
1299
+ ],
1300
+ "superclass": {
1301
+ "name": "LitElement",
1302
+ "package": "lit"
1303
+ },
1304
+ "localization": [],
1305
+ "status": "ready",
1306
+ "category": "text",
1307
+ "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",
1308
+ "examples": [],
1309
+ "dependencies": [],
1310
+ "tagName": "nord-badge",
1311
+ "customElement": true
1312
+ }
1313
+ ],
1314
+ "exports": [
1315
+ {
1316
+ "kind": "js",
1317
+ "name": "default",
1318
+ "declaration": {
1319
+ "name": "Badge",
1320
+ "module": "src/badge/Badge.ts"
1321
+ }
1322
+ },
1323
+ {
1324
+ "kind": "custom-element-definition",
1325
+ "name": "nord-badge",
1326
+ "declaration": {
1327
+ "name": "Badge",
1328
+ "module": "src/badge/Badge.ts"
1329
+ }
1330
+ }
1331
+ ]
1332
+ },
1333
1333
  {
1334
1334
  "kind": "javascript-module",
1335
1335
  "path": "src/banner/Banner.ts",
@@ -1417,133 +1417,30 @@
1417
1417
  },
1418
1418
  {
1419
1419
  "kind": "javascript-module",
1420
- "path": "src/button-group/ButtonGroup.ts",
1420
+ "path": "src/calendar/Calendar.ts",
1421
1421
  "declarations": [
1422
1422
  {
1423
1423
  "kind": "class",
1424
- "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
1425
- "name": "ButtonGroup",
1424
+ "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.",
1425
+ "name": "Calendar",
1426
1426
  "cssProperties": [
1427
1427
  {
1428
- "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1429
- "name": "--n-button-group-border-radius",
1430
- "default": "var(--n-border-radius-s)"
1428
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1429
+ "name": "--n-calendar-border-radius",
1430
+ "default": "var(--n-border-radius)"
1431
1431
  },
1432
1432
  {
1433
1433
  "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1434
- "name": "--n-button-group-box-shadow",
1435
- "default": "var(--n-box-shadow)"
1436
- }
1437
- ],
1438
- "slots": [
1439
- {
1440
- "description": "The button group content",
1441
- "name": ""
1434
+ "name": "--n-calendar-box-shadow",
1435
+ "default": "var(--n-box-shadow-popout)"
1442
1436
  }
1443
1437
  ],
1444
1438
  "members": [
1445
1439
  {
1446
1440
  "kind": "field",
1447
- "name": "direction",
1441
+ "name": "monthSelectNode",
1448
1442
  "type": {
1449
- "text": "\"vertical\" | \"horizontal\""
1450
- },
1451
- "default": "\"horizontal\"",
1452
- "description": "The direction of the button group.",
1453
- "attribute": "direction",
1454
- "reflects": true
1455
- },
1456
- {
1457
- "kind": "field",
1458
- "name": "role",
1459
- "type": {
1460
- "text": "string"
1461
- },
1462
- "default": "\"group\"",
1463
- "description": "The appropriate role for the containing element.",
1464
- "attribute": "role",
1465
- "reflects": true
1466
- }
1467
- ],
1468
- "attributes": [
1469
- {
1470
- "name": "direction",
1471
- "type": {
1472
- "text": "\"vertical\" | \"horizontal\""
1473
- },
1474
- "default": "\"horizontal\"",
1475
- "description": "The direction of the button group.",
1476
- "fieldName": "direction"
1477
- },
1478
- {
1479
- "name": "role",
1480
- "type": {
1481
- "text": "string"
1482
- },
1483
- "default": "\"group\"",
1484
- "description": "The appropriate role for the containing element.",
1485
- "fieldName": "role"
1486
- }
1487
- ],
1488
- "superclass": {
1489
- "name": "LitElement",
1490
- "package": "lit"
1491
- },
1492
- "localization": [],
1493
- "status": "new",
1494
- "category": "structure",
1495
- "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 group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
1496
- "examples": [],
1497
- "dependencies": [],
1498
- "tagName": "nord-button-group",
1499
- "customElement": true
1500
- }
1501
- ],
1502
- "exports": [
1503
- {
1504
- "kind": "js",
1505
- "name": "default",
1506
- "declaration": {
1507
- "name": "ButtonGroup",
1508
- "module": "src/button-group/ButtonGroup.ts"
1509
- }
1510
- },
1511
- {
1512
- "kind": "custom-element-definition",
1513
- "name": "nord-button-group",
1514
- "declaration": {
1515
- "name": "ButtonGroup",
1516
- "module": "src/button-group/ButtonGroup.ts"
1517
- }
1518
- }
1519
- ]
1520
- },
1521
- {
1522
- "kind": "javascript-module",
1523
- "path": "src/calendar/Calendar.ts",
1524
- "declarations": [
1525
- {
1526
- "kind": "class",
1527
- "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.",
1528
- "name": "Calendar",
1529
- "cssProperties": [
1530
- {
1531
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1532
- "name": "--n-calendar-border-radius",
1533
- "default": "var(--n-border-radius)"
1534
- },
1535
- {
1536
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1537
- "name": "--n-calendar-box-shadow",
1538
- "default": "var(--n-box-shadow-popout)"
1539
- }
1540
- ],
1541
- "members": [
1542
- {
1543
- "kind": "field",
1544
- "name": "monthSelectNode",
1545
- "type": {
1546
- "text": "HTMLElement"
1443
+ "text": "HTMLElement"
1547
1444
  },
1548
1445
  "privacy": "private"
1549
1446
  },
@@ -2021,129 +1918,6 @@
2021
1918
  }
2022
1919
  ]
2023
1920
  },
2024
- {
2025
- "kind": "javascript-module",
2026
- "path": "src/card/Card.ts",
2027
- "declarations": [
2028
- {
2029
- "kind": "class",
2030
- "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
2031
- "name": "Card",
2032
- "cssProperties": [
2033
- {
2034
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2035
- "name": "--n-card-border-radius",
2036
- "default": "var(--n-border-radius)"
2037
- },
2038
- {
2039
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2040
- "name": "--n-card-box-shadow",
2041
- "default": "var(--n-box-shadow-popout)"
2042
- },
2043
- {
2044
- "description": "Controls the padding on all sides of the card.",
2045
- "name": "--n-card-padding",
2046
- "default": "var(--n-space-m)"
2047
- },
2048
- {
2049
- "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2050
- "name": "--n-card-slot-padding",
2051
- "default": "var(--n-space-m)"
2052
- }
2053
- ],
2054
- "slots": [
2055
- {
2056
- "description": "The card content.",
2057
- "name": ""
2058
- },
2059
- {
2060
- "description": "Optional slot that holds a header for the card.",
2061
- "name": "header"
2062
- },
2063
- {
2064
- "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2065
- "name": "header-end"
2066
- },
2067
- {
2068
- "description": "Optional slot that holds footer content for the card.",
2069
- "name": "footer"
2070
- }
2071
- ],
2072
- "members": [
2073
- {
2074
- "kind": "field",
2075
- "name": "headerSlot",
2076
- "privacy": "private",
2077
- "default": "new SlotController(this, \"header\")"
2078
- },
2079
- {
2080
- "kind": "field",
2081
- "name": "headerEndSlot",
2082
- "privacy": "private",
2083
- "default": "new SlotController(this, \"header-end\")"
2084
- },
2085
- {
2086
- "kind": "field",
2087
- "name": "footerSlot",
2088
- "privacy": "private",
2089
- "default": "new SlotController(this, \"footer\")"
2090
- },
2091
- {
2092
- "kind": "field",
2093
- "name": "padding",
2094
- "type": {
2095
- "text": "\"m\" | \"l\" | \"none\""
2096
- },
2097
- "default": "\"m\"",
2098
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2099
- "attribute": "padding",
2100
- "reflects": true
2101
- }
2102
- ],
2103
- "attributes": [
2104
- {
2105
- "name": "padding",
2106
- "type": {
2107
- "text": "\"m\" | \"l\" | \"none\""
2108
- },
2109
- "default": "\"m\"",
2110
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2111
- "fieldName": "padding"
2112
- }
2113
- ],
2114
- "superclass": {
2115
- "name": "LitElement",
2116
- "package": "lit"
2117
- },
2118
- "localization": [],
2119
- "status": "ready",
2120
- "category": "structure",
2121
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
2122
- "examples": [],
2123
- "dependencies": [],
2124
- "tagName": "nord-card",
2125
- "customElement": true
2126
- }
2127
- ],
2128
- "exports": [
2129
- {
2130
- "kind": "js",
2131
- "name": "default",
2132
- "declaration": {
2133
- "name": "Card",
2134
- "module": "src/card/Card.ts"
2135
- }
2136
- },
2137
- {
2138
- "kind": "custom-element-definition",
2139
- "name": "nord-card",
2140
- "declaration": {
2141
- "name": "Card",
2142
- "module": "src/card/Card.ts"
2143
- }
2144
- }
2145
- ]
2146
- },
2147
1921
  {
2148
1922
  "kind": "javascript-module",
2149
1923
  "path": "src/checkbox/Checkbox.ts",
@@ -2867,40 +2641,266 @@
2867
2641
  },
2868
2642
  {
2869
2643
  "kind": "javascript-module",
2870
- "path": "src/command-menu/CommandMenu.ts",
2644
+ "path": "src/card/Card.ts",
2871
2645
  "declarations": [
2872
2646
  {
2873
2647
  "kind": "class",
2874
- "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
2875
- "name": "CommandMenu",
2648
+ "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
2649
+ "name": "Card",
2876
2650
  "cssProperties": [
2877
2651
  {
2878
- "description": "Controls the max inline size, or width, of the command menu.",
2879
- "name": "--n-command-menu-inline-size",
2880
- "default": "640px"
2652
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2653
+ "name": "--n-card-border-radius",
2654
+ "default": "var(--n-border-radius)"
2881
2655
  },
2882
2656
  {
2883
- "description": "Controls the max block size, or height, of the command menu.",
2884
- "name": "--n-command-menu-block-size",
2885
- "default": "290px"
2657
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2658
+ "name": "--n-card-box-shadow",
2659
+ "default": "var(--n-box-shadow-popout)"
2886
2660
  },
2887
2661
  {
2888
- "description": "Controls the command menu offset from the block start, or top, of the screen.",
2889
- "name": "--n-command-menu-block-start",
2890
- "default": "16%"
2891
- }
2892
- ],
2893
- "slots": [
2662
+ "description": "Controls the padding on all sides of the card.",
2663
+ "name": "--n-card-padding",
2664
+ "default": "var(--n-space-m)"
2665
+ },
2894
2666
  {
2895
- "description": "Used to replace the default footer contents.",
2896
- "name": "footer"
2667
+ "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2668
+ "name": "--n-card-slot-padding",
2669
+ "default": "var(--n-space-m)"
2897
2670
  }
2898
2671
  ],
2899
- "members": [
2672
+ "slots": [
2900
2673
  {
2901
- "kind": "field",
2902
- "name": "inputRef",
2903
- "privacy": "private"
2674
+ "description": "The card content.",
2675
+ "name": ""
2676
+ },
2677
+ {
2678
+ "description": "Optional slot that holds a header for the card.",
2679
+ "name": "header"
2680
+ },
2681
+ {
2682
+ "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2683
+ "name": "header-end"
2684
+ },
2685
+ {
2686
+ "description": "Optional slot that holds footer content for the card.",
2687
+ "name": "footer"
2688
+ }
2689
+ ],
2690
+ "members": [
2691
+ {
2692
+ "kind": "field",
2693
+ "name": "headerSlot",
2694
+ "privacy": "private",
2695
+ "default": "new SlotController(this, \"header\")"
2696
+ },
2697
+ {
2698
+ "kind": "field",
2699
+ "name": "headerEndSlot",
2700
+ "privacy": "private",
2701
+ "default": "new SlotController(this, \"header-end\")"
2702
+ },
2703
+ {
2704
+ "kind": "field",
2705
+ "name": "footerSlot",
2706
+ "privacy": "private",
2707
+ "default": "new SlotController(this, \"footer\")"
2708
+ },
2709
+ {
2710
+ "kind": "field",
2711
+ "name": "padding",
2712
+ "type": {
2713
+ "text": "\"m\" | \"l\" | \"none\""
2714
+ },
2715
+ "default": "\"m\"",
2716
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2717
+ "attribute": "padding",
2718
+ "reflects": true
2719
+ }
2720
+ ],
2721
+ "attributes": [
2722
+ {
2723
+ "name": "padding",
2724
+ "type": {
2725
+ "text": "\"m\" | \"l\" | \"none\""
2726
+ },
2727
+ "default": "\"m\"",
2728
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2729
+ "fieldName": "padding"
2730
+ }
2731
+ ],
2732
+ "superclass": {
2733
+ "name": "LitElement",
2734
+ "package": "lit"
2735
+ },
2736
+ "localization": [],
2737
+ "status": "ready",
2738
+ "category": "structure",
2739
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
2740
+ "examples": [],
2741
+ "dependencies": [],
2742
+ "tagName": "nord-card",
2743
+ "customElement": true
2744
+ }
2745
+ ],
2746
+ "exports": [
2747
+ {
2748
+ "kind": "js",
2749
+ "name": "default",
2750
+ "declaration": {
2751
+ "name": "Card",
2752
+ "module": "src/card/Card.ts"
2753
+ }
2754
+ },
2755
+ {
2756
+ "kind": "custom-element-definition",
2757
+ "name": "nord-card",
2758
+ "declaration": {
2759
+ "name": "Card",
2760
+ "module": "src/card/Card.ts"
2761
+ }
2762
+ }
2763
+ ]
2764
+ },
2765
+ {
2766
+ "kind": "javascript-module",
2767
+ "path": "src/button-group/ButtonGroup.ts",
2768
+ "declarations": [
2769
+ {
2770
+ "kind": "class",
2771
+ "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
2772
+ "name": "ButtonGroup",
2773
+ "cssProperties": [
2774
+ {
2775
+ "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
2776
+ "name": "--n-button-group-border-radius",
2777
+ "default": "var(--n-border-radius-s)"
2778
+ },
2779
+ {
2780
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2781
+ "name": "--n-button-group-box-shadow",
2782
+ "default": "var(--n-box-shadow)"
2783
+ }
2784
+ ],
2785
+ "slots": [
2786
+ {
2787
+ "description": "The button group content",
2788
+ "name": ""
2789
+ }
2790
+ ],
2791
+ "members": [
2792
+ {
2793
+ "kind": "field",
2794
+ "name": "direction",
2795
+ "type": {
2796
+ "text": "\"vertical\" | \"horizontal\""
2797
+ },
2798
+ "default": "\"horizontal\"",
2799
+ "description": "The direction of the button group.",
2800
+ "attribute": "direction",
2801
+ "reflects": true
2802
+ },
2803
+ {
2804
+ "kind": "field",
2805
+ "name": "role",
2806
+ "type": {
2807
+ "text": "string"
2808
+ },
2809
+ "default": "\"group\"",
2810
+ "description": "The appropriate role for the containing element.",
2811
+ "attribute": "role",
2812
+ "reflects": true
2813
+ }
2814
+ ],
2815
+ "attributes": [
2816
+ {
2817
+ "name": "direction",
2818
+ "type": {
2819
+ "text": "\"vertical\" | \"horizontal\""
2820
+ },
2821
+ "default": "\"horizontal\"",
2822
+ "description": "The direction of the button group.",
2823
+ "fieldName": "direction"
2824
+ },
2825
+ {
2826
+ "name": "role",
2827
+ "type": {
2828
+ "text": "string"
2829
+ },
2830
+ "default": "\"group\"",
2831
+ "description": "The appropriate role for the containing element.",
2832
+ "fieldName": "role"
2833
+ }
2834
+ ],
2835
+ "superclass": {
2836
+ "name": "LitElement",
2837
+ "package": "lit"
2838
+ },
2839
+ "localization": [],
2840
+ "status": "new",
2841
+ "category": "structure",
2842
+ "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 group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
2843
+ "examples": [],
2844
+ "dependencies": [],
2845
+ "tagName": "nord-button-group",
2846
+ "customElement": true
2847
+ }
2848
+ ],
2849
+ "exports": [
2850
+ {
2851
+ "kind": "js",
2852
+ "name": "default",
2853
+ "declaration": {
2854
+ "name": "ButtonGroup",
2855
+ "module": "src/button-group/ButtonGroup.ts"
2856
+ }
2857
+ },
2858
+ {
2859
+ "kind": "custom-element-definition",
2860
+ "name": "nord-button-group",
2861
+ "declaration": {
2862
+ "name": "ButtonGroup",
2863
+ "module": "src/button-group/ButtonGroup.ts"
2864
+ }
2865
+ }
2866
+ ]
2867
+ },
2868
+ {
2869
+ "kind": "javascript-module",
2870
+ "path": "src/command-menu/CommandMenu.ts",
2871
+ "declarations": [
2872
+ {
2873
+ "kind": "class",
2874
+ "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
2875
+ "name": "CommandMenu",
2876
+ "cssProperties": [
2877
+ {
2878
+ "description": "Controls the max inline size, or width, of the command menu.",
2879
+ "name": "--n-command-menu-inline-size",
2880
+ "default": "640px"
2881
+ },
2882
+ {
2883
+ "description": "Controls the max block size, or height, of the command menu.",
2884
+ "name": "--n-command-menu-block-size",
2885
+ "default": "290px"
2886
+ },
2887
+ {
2888
+ "description": "Controls the command menu offset from the block start, or top, of the screen.",
2889
+ "name": "--n-command-menu-block-start",
2890
+ "default": "16%"
2891
+ }
2892
+ ],
2893
+ "slots": [
2894
+ {
2895
+ "description": "Used to replace the default footer contents.",
2896
+ "name": "footer"
2897
+ }
2898
+ ],
2899
+ "members": [
2900
+ {
2901
+ "kind": "field",
2902
+ "name": "inputRef",
2903
+ "privacy": "private"
2904
2904
  },
2905
2905
  {
2906
2906
  "kind": "field",
@@ -4833,102 +4833,20 @@
4833
4833
  },
4834
4834
  {
4835
4835
  "kind": "javascript-module",
4836
- "path": "src/divider/Divider.ts",
4836
+ "path": "src/date-picker/DatePicker.ts",
4837
4837
  "declarations": [
4838
4838
  {
4839
4839
  "kind": "class",
4840
- "description": "Divider components are used to separate and distinguish sections of\ncontent or groups of menu items. Visually, they look like\nhorizontal or vertical lines.",
4841
- "name": "Divider",
4842
- "cssProperties": [
4843
- {
4844
- "description": "Controls the color of the divider, using our [color tokens](/tokens/#color).",
4845
- "name": "--n-divider-color",
4846
- "default": "var(--n-color-border)"
4847
- },
4848
- {
4849
- "description": "Controls the size, or thickness, of the divider.",
4850
- "name": "--n-divider-size",
4851
- "default": "1px"
4852
- }
4853
- ],
4840
+ "description": "\nDate Picker allows user to enter a date either through text input,\nor by choosing a date from the calendar. Please note that the date\nmust be passed in ISO-8601 format: YYYY-MM-DD.",
4841
+ "name": "DatePicker",
4854
4842
  "members": [
4855
4843
  {
4856
4844
  "kind": "field",
4857
- "name": "direction",
4845
+ "name": "toggleButton",
4858
4846
  "type": {
4859
- "text": "\"vertical\" | \"horizontal\""
4847
+ "text": "Button"
4860
4848
  },
4861
- "default": "\"horizontal\"",
4862
- "description": "The direction of the divider.",
4863
- "attribute": "direction",
4864
- "reflects": true
4865
- },
4866
- {
4867
- "kind": "method",
4868
- "name": "handleDirectionChange",
4869
- "privacy": "private"
4870
- }
4871
- ],
4872
- "attributes": [
4873
- {
4874
- "name": "direction",
4875
- "type": {
4876
- "text": "\"vertical\" | \"horizontal\""
4877
- },
4878
- "default": "\"horizontal\"",
4879
- "description": "The direction of the divider.",
4880
- "fieldName": "direction"
4881
- }
4882
- ],
4883
- "superclass": {
4884
- "name": "LitElement",
4885
- "package": "lit"
4886
- },
4887
- "localization": [],
4888
- "status": "new",
4889
- "category": "structure",
4890
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to represent thematic breaks between elements.\n- Use when you need to divide sections of content from each other.\n- Use to separate content into clear groups.\n- Use dividers sparingly, to create groupings or to separate items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using for presentational purposes only.\n- Don’t use strong colors in dividers.\n- Don’t use dividers for replacing card components.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Divider uses a role called `separator` which indicates that the element is a divider that separates and distinguishes sections of content or groups of menu items. The implicit ARIA role of the native thematic break (`<hr>` element) is a separator.\n- Dividers have an implicit aria-orientation value of `horizontal` which can be changed using the `direction` property.\n- For more details, please see [ARIA: separator role on MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role).\n",
4891
- "examples": [],
4892
- "dependencies": [],
4893
- "tagName": "nord-divider",
4894
- "customElement": true
4895
- }
4896
- ],
4897
- "exports": [
4898
- {
4899
- "kind": "js",
4900
- "name": "default",
4901
- "declaration": {
4902
- "name": "Divider",
4903
- "module": "src/divider/Divider.ts"
4904
- }
4905
- },
4906
- {
4907
- "kind": "custom-element-definition",
4908
- "name": "nord-divider",
4909
- "declaration": {
4910
- "name": "Divider",
4911
- "module": "src/divider/Divider.ts"
4912
- }
4913
- }
4914
- ]
4915
- },
4916
- {
4917
- "kind": "javascript-module",
4918
- "path": "src/date-picker/DatePicker.ts",
4919
- "declarations": [
4920
- {
4921
- "kind": "class",
4922
- "description": "\nDate Picker allows user to enter a date either through text input,\nor by choosing a date from the calendar. Please note that the date\nmust be passed in ISO-8601 format: YYYY-MM-DD.",
4923
- "name": "DatePicker",
4924
- "members": [
4925
- {
4926
- "kind": "field",
4927
- "name": "toggleButton",
4928
- "type": {
4929
- "text": "Button"
4930
- },
4931
- "privacy": "private"
4849
+ "privacy": "private"
4932
4850
  },
4933
4851
  {
4934
4852
  "kind": "field",
@@ -5950,6 +5868,88 @@
5950
5868
  }
5951
5869
  ]
5952
5870
  },
5871
+ {
5872
+ "kind": "javascript-module",
5873
+ "path": "src/divider/Divider.ts",
5874
+ "declarations": [
5875
+ {
5876
+ "kind": "class",
5877
+ "description": "Divider components are used to separate and distinguish sections of\ncontent or groups of menu items. Visually, they look like\nhorizontal or vertical lines.",
5878
+ "name": "Divider",
5879
+ "cssProperties": [
5880
+ {
5881
+ "description": "Controls the color of the divider, using our [color tokens](/tokens/#color).",
5882
+ "name": "--n-divider-color",
5883
+ "default": "var(--n-color-border)"
5884
+ },
5885
+ {
5886
+ "description": "Controls the size, or thickness, of the divider.",
5887
+ "name": "--n-divider-size",
5888
+ "default": "1px"
5889
+ }
5890
+ ],
5891
+ "members": [
5892
+ {
5893
+ "kind": "field",
5894
+ "name": "direction",
5895
+ "type": {
5896
+ "text": "\"vertical\" | \"horizontal\""
5897
+ },
5898
+ "default": "\"horizontal\"",
5899
+ "description": "The direction of the divider.",
5900
+ "attribute": "direction",
5901
+ "reflects": true
5902
+ },
5903
+ {
5904
+ "kind": "method",
5905
+ "name": "handleDirectionChange",
5906
+ "privacy": "private"
5907
+ }
5908
+ ],
5909
+ "attributes": [
5910
+ {
5911
+ "name": "direction",
5912
+ "type": {
5913
+ "text": "\"vertical\" | \"horizontal\""
5914
+ },
5915
+ "default": "\"horizontal\"",
5916
+ "description": "The direction of the divider.",
5917
+ "fieldName": "direction"
5918
+ }
5919
+ ],
5920
+ "superclass": {
5921
+ "name": "LitElement",
5922
+ "package": "lit"
5923
+ },
5924
+ "localization": [],
5925
+ "status": "new",
5926
+ "category": "structure",
5927
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to represent thematic breaks between elements.\n- Use when you need to divide sections of content from each other.\n- Use to separate content into clear groups.\n- Use dividers sparingly, to create groupings or to separate items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using for presentational purposes only.\n- Don’t use strong colors in dividers.\n- Don’t use dividers for replacing card components.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Divider uses a role called `separator` which indicates that the element is a divider that separates and distinguishes sections of content or groups of menu items. The implicit ARIA role of the native thematic break (`<hr>` element) is a separator.\n- Dividers have an implicit aria-orientation value of `horizontal` which can be changed using the `direction` property.\n- For more details, please see [ARIA: separator role on MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role).\n",
5928
+ "examples": [],
5929
+ "dependencies": [],
5930
+ "tagName": "nord-divider",
5931
+ "customElement": true
5932
+ }
5933
+ ],
5934
+ "exports": [
5935
+ {
5936
+ "kind": "js",
5937
+ "name": "default",
5938
+ "declaration": {
5939
+ "name": "Divider",
5940
+ "module": "src/divider/Divider.ts"
5941
+ }
5942
+ },
5943
+ {
5944
+ "kind": "custom-element-definition",
5945
+ "name": "nord-divider",
5946
+ "declaration": {
5947
+ "name": "Divider",
5948
+ "module": "src/divider/Divider.ts"
5949
+ }
5950
+ }
5951
+ ]
5952
+ },
5953
5953
  {
5954
5954
  "kind": "javascript-module",
5955
5955
  "path": "src/drawer/Drawer.ts",
@@ -6870,478 +6870,308 @@
6870
6870
  },
6871
6871
  {
6872
6872
  "kind": "javascript-module",
6873
- "path": "src/layout/Layout.ts",
6873
+ "path": "src/icon/Icon.ts",
6874
6874
  "declarations": [
6875
6875
  {
6876
6876
  "kind": "class",
6877
- "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
6878
- "name": "Layout",
6879
- "cssProperties": [
6880
- {
6881
- "description": "Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).",
6882
- "name": "--n-layout-padding",
6883
- "default": "var(--n-space-l)"
6884
- },
6885
- {
6886
- "description": "Controls the width of the drawer area, when used.",
6887
- "name": "--n-layout-drawer-inline-size",
6888
- "default": "320px"
6889
- },
6890
- {
6891
- "description": "Controls the background color of the layout, using [color tokens](/tokens/#color).",
6892
- "name": "--n-layout-background-color",
6893
- "default": "var(--n-color-background)"
6894
- }
6895
- ],
6877
+ "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
6878
+ "name": "Icon",
6896
6879
  "slots": [
6897
6880
  {
6898
- "description": "The default main section content.",
6881
+ "description": "The default slot used for placing a custom SVG icon.",
6899
6882
  "name": ""
6900
- },
6901
- {
6902
- "description": "Used to place content inside the navigation sidebar.",
6903
- "name": "nav"
6904
- },
6905
- {
6906
- "description": "Used to place the [Top Bar](../top-bar/) component.",
6907
- "name": "top-bar"
6908
- },
6909
- {
6910
- "description": "Used to place content inside the header section.",
6911
- "name": "header"
6912
- },
6913
- {
6914
- "description": "Used to place additional content/details relating to a selected item.",
6915
- "name": "drawer"
6916
- },
6917
- {
6918
- "description": "Used to place a own nav-toggle component, for cases where you might need to add a tooltip.",
6919
- "name": "nav-toggle"
6920
6883
  }
6921
6884
  ],
6922
6885
  "members": [
6923
6886
  {
6924
6887
  "kind": "field",
6925
- "name": "peekTimeoutId",
6926
- "type": {
6927
- "text": "ReturnType<typeof setTimeout> | undefined"
6928
- },
6929
- "privacy": "private"
6930
- },
6931
- {
6932
- "kind": "field",
6933
- "name": "navSlot",
6934
- "privacy": "private",
6935
- "default": "new SlotController(this, \"nav\")"
6936
- },
6937
- {
6938
- "kind": "field",
6939
- "name": "drawerSlot",
6888
+ "name": "manager",
6940
6889
  "privacy": "private",
6941
- "default": "new SlotController(this, \"drawer\")"
6890
+ "static": true,
6891
+ "default": "new IconManager()"
6942
6892
  },
6943
6893
  {
6944
- "kind": "field",
6945
- "name": "topBarSlot",
6946
- "privacy": "private",
6947
- "default": "new SlotController(this, \"top-bar\")"
6894
+ "kind": "method",
6895
+ "name": "registerResolver",
6896
+ "static": true,
6897
+ "parameters": [
6898
+ {
6899
+ "name": "resolver",
6900
+ "type": {
6901
+ "text": "IconResolver"
6902
+ },
6903
+ "description": "The resolver function to register."
6904
+ }
6905
+ ],
6906
+ "description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
6948
6907
  },
6949
6908
  {
6950
- "kind": "field",
6951
- "name": "headerSlot",
6952
- "privacy": "private",
6953
- "default": "new SlotController(this, \"header\")"
6909
+ "kind": "method",
6910
+ "name": "registerIcon",
6911
+ "static": true,
6912
+ "return": {
6913
+ "type": {
6914
+ "text": "void"
6915
+ }
6916
+ },
6917
+ "parameters": [
6918
+ {
6919
+ "name": "icon",
6920
+ "type": {
6921
+ "text": "{ title: string; default: string }"
6922
+ },
6923
+ "description": "An object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string.\nThis is intended to be used in cases where you import an icon's entire ES module and register it directly."
6924
+ }
6925
+ ],
6926
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
6954
6927
  },
6955
6928
  {
6956
- "kind": "field",
6957
- "name": "direction",
6958
- "privacy": "private",
6959
- "default": "new DirectionController(this)"
6960
- },
6961
- {
6962
- "kind": "field",
6963
- "name": "events",
6964
- "privacy": "private",
6965
- "default": "new EventController(this)"
6966
- },
6967
- {
6968
- "kind": "field",
6969
- "name": "lightDismiss",
6970
- "privacy": "private",
6971
- "default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !this.wideScreen,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl,\n })"
6929
+ "kind": "method",
6930
+ "name": "registerIcon",
6931
+ "static": true,
6932
+ "return": {
6933
+ "type": {
6934
+ "text": "void"
6935
+ }
6936
+ },
6937
+ "parameters": [
6938
+ {
6939
+ "name": "name",
6940
+ "type": {
6941
+ "text": "string"
6942
+ },
6943
+ "description": "The name of the icon to be registered."
6944
+ },
6945
+ {
6946
+ "name": "icon",
6947
+ "type": {
6948
+ "text": "string"
6949
+ },
6950
+ "description": "The SVG string for the icon."
6951
+ }
6952
+ ],
6953
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
6972
6954
  },
6973
6955
  {
6974
- "kind": "field",
6975
- "name": "broadcast",
6976
- "privacy": "private",
6977
- "default": "new BroadcastChannelController<{ navOpen: boolean } | { navWidth: number }>(this, {\n channelName: \"nord-layout-nav-state\",\n enabled: () => this.syncNavState && this.wideScreen,\n onMessage: data => {\n if (\"navOpen\" in data) {\n this.navOpen = data.navOpen\n }\n if (\"navWidth\" in data) {\n this.navWidth = data.navWidth\n }\n },\n })"
6956
+ "kind": "method",
6957
+ "name": "registerIcon",
6958
+ "static": true,
6959
+ "parameters": [
6960
+ {
6961
+ "name": "iconOrName",
6962
+ "type": {
6963
+ "text": "string | { title: string; default: string }"
6964
+ },
6965
+ "description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
6966
+ },
6967
+ {
6968
+ "name": "icon",
6969
+ "optional": true,
6970
+ "type": {
6971
+ "text": "string"
6972
+ },
6973
+ "description": "The SVG string for the icon."
6974
+ }
6975
+ ],
6976
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
6978
6977
  },
6979
6978
  {
6980
6979
  "kind": "field",
6981
- "name": "navEl",
6980
+ "name": "name",
6982
6981
  "type": {
6983
- "text": "HTMLDivElement"
6982
+ "text": "string"
6984
6983
  },
6985
- "privacy": "private"
6986
- },
6987
- {
6988
- "kind": "field",
6989
- "name": "navWidth",
6990
- "privacy": "private"
6984
+ "default": "\"\"",
6985
+ "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
6986
+ "attribute": "name",
6987
+ "reflects": true
6991
6988
  },
6992
6989
  {
6993
6990
  "kind": "field",
6994
- "name": "isDragging",
6991
+ "name": "size",
6995
6992
  "type": {
6996
- "text": "boolean"
6993
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
6997
6994
  },
6998
- "privacy": "private",
6999
- "default": "false"
6995
+ "description": "The size of the icon.",
6996
+ "attribute": "size",
6997
+ "reflects": true
7000
6998
  },
7001
6999
  {
7002
7000
  "kind": "field",
7003
- "name": "navState",
7001
+ "name": "color",
7004
7002
  "type": {
7005
- "text": "NavState"
7003
+ "text": "string | undefined"
7006
7004
  },
7007
- "privacy": "private"
7008
- },
7009
- {
7010
- "kind": "field",
7011
- "name": "wideScreen",
7012
- "privacy": "private"
7005
+ "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
7006
+ "attribute": "color",
7007
+ "reflects": true
7013
7008
  },
7014
7009
  {
7015
7010
  "kind": "field",
7016
- "name": "navOpen",
7011
+ "name": "label",
7017
7012
  "type": {
7018
- "text": "boolean"
7013
+ "text": "string | undefined"
7019
7014
  },
7020
- "description": "Controls whether the navigation is hidden off-screen or not.\nDefaults to `true` for wide viewports, and `false` otherwise.",
7021
- "attribute": "nav-open",
7015
+ "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
7016
+ "attribute": "label",
7022
7017
  "reflects": true
7023
7018
  },
7024
7019
  {
7025
7020
  "kind": "field",
7026
- "name": "persistNavState",
7021
+ "name": "svg",
7027
7022
  "type": {
7028
- "text": "boolean"
7023
+ "text": "string"
7029
7024
  },
7030
- "default": "false",
7031
- "description": "Controls whether the navigation's open/closed state is persisted across page loads.\nThis is useful for multi-page apps, where clicks on links trigger a full page load.",
7032
- "attribute": "persist-nav-state"
7025
+ "privacy": "private",
7026
+ "default": "\"\""
7033
7027
  },
7034
7028
  {
7035
- "kind": "field",
7036
- "name": "syncNavState",
7029
+ "kind": "method",
7030
+ "name": "handleNameChange",
7031
+ "privacy": "protected"
7032
+ }
7033
+ ],
7034
+ "attributes": [
7035
+ {
7036
+ "name": "name",
7037
7037
  "type": {
7038
- "text": "boolean"
7038
+ "text": "string"
7039
7039
  },
7040
- "default": "false",
7041
- "description": "Controls whether the navigation's open/closed state and width is synced across tabs/windows on the same origin.\nThis is useful for long-lived app sessions where you may have multiple tabs/windows open at once.",
7042
- "attribute": "sync-nav-state",
7043
- "reflects": true
7040
+ "default": "\"\"",
7041
+ "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
7042
+ "fieldName": "name"
7044
7043
  },
7045
7044
  {
7046
- "kind": "field",
7047
- "name": "padding",
7045
+ "name": "size",
7048
7046
  "type": {
7049
- "text": "\"m\" | \"none\""
7047
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
7050
7048
  },
7051
- "default": "\"m\"",
7052
- "description": "Controls the padding of the default main section slot. When set to “none”,\nthe nav and header slots will still have padding.",
7053
- "attribute": "padding",
7054
- "reflects": true
7049
+ "description": "The size of the icon.",
7050
+ "fieldName": "size"
7055
7051
  },
7056
7052
  {
7057
- "kind": "field",
7058
- "name": "sticky",
7053
+ "name": "color",
7059
7054
  "type": {
7060
- "text": "boolean"
7055
+ "text": "string | undefined"
7061
7056
  },
7062
- "default": "false",
7063
- "description": "Controls whether the layout's header has sticky positioning.",
7064
- "attribute": "sticky",
7065
- "reflects": true
7057
+ "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
7058
+ "fieldName": "color"
7066
7059
  },
7067
7060
  {
7068
- "kind": "field",
7069
- "name": "isNarrow",
7061
+ "name": "label",
7070
7062
  "type": {
7071
- "text": "boolean"
7063
+ "text": "string | undefined"
7072
7064
  },
7073
- "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.",
7074
- "readonly": true
7075
- },
7076
- {
7077
- "kind": "method",
7078
- "name": "renderNavToggle",
7079
- "privacy": "private"
7080
- },
7065
+ "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
7066
+ "fieldName": "label"
7067
+ }
7068
+ ],
7069
+ "superclass": {
7070
+ "name": "LitElement",
7071
+ "package": "lit"
7072
+ },
7073
+ "localization": [],
7074
+ "status": "ready",
7075
+ "category": "image",
7076
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n",
7077
+ "examples": [],
7078
+ "dependencies": [],
7079
+ "tagName": "nord-icon",
7080
+ "customElement": true
7081
+ }
7082
+ ],
7083
+ "exports": [
7084
+ {
7085
+ "kind": "js",
7086
+ "name": "default",
7087
+ "declaration": {
7088
+ "name": "Icon",
7089
+ "module": "src/icon/Icon.ts"
7090
+ }
7091
+ },
7092
+ {
7093
+ "kind": "custom-element-definition",
7094
+ "name": "nord-icon",
7095
+ "declaration": {
7096
+ "name": "Icon",
7097
+ "module": "src/icon/Icon.ts"
7098
+ }
7099
+ }
7100
+ ]
7101
+ },
7102
+ {
7103
+ "kind": "javascript-module",
7104
+ "path": "src/icon/IconManager.ts",
7105
+ "declarations": [
7106
+ {
7107
+ "kind": "class",
7108
+ "description": "",
7109
+ "name": "IconManager",
7110
+ "members": [
7081
7111
  {
7082
- "kind": "method",
7083
- "name": "renderNavCollapse",
7084
- "privacy": "private"
7112
+ "kind": "field",
7113
+ "name": "cache",
7114
+ "privacy": "private",
7115
+ "default": "new Map<string, string | Promise<string>>()"
7085
7116
  },
7086
7117
  {
7087
- "kind": "method",
7088
- "name": "handleNavWidthChange",
7089
- "privacy": "protected"
7118
+ "kind": "field",
7119
+ "name": "resolver",
7120
+ "type": {
7121
+ "text": "IconResolver"
7122
+ }
7090
7123
  },
7091
7124
  {
7092
7125
  "kind": "method",
7093
- "name": "handleNavStateChange",
7094
- "privacy": "protected",
7126
+ "name": "resolve",
7095
7127
  "parameters": [
7096
7128
  {
7097
- "name": "prev",
7129
+ "name": "name",
7098
7130
  "type": {
7099
- "text": "NavState"
7131
+ "text": "string"
7132
+ }
7133
+ },
7134
+ {
7135
+ "name": "onResolved",
7136
+ "type": {
7137
+ "text": "(svg: string) => void"
7100
7138
  }
7101
7139
  }
7102
7140
  ]
7103
7141
  },
7104
7142
  {
7105
7143
  "kind": "method",
7106
- "name": "handleOpenChange",
7107
- "privacy": "protected",
7144
+ "name": "registerIcon",
7108
7145
  "parameters": [
7109
7146
  {
7110
- "name": "prev",
7147
+ "name": "iconOrName",
7111
7148
  "type": {
7112
- "text": "boolean"
7149
+ "text": "string | { title: string; default: string }"
7150
+ }
7151
+ },
7152
+ {
7153
+ "name": "icon",
7154
+ "optional": true,
7155
+ "type": {
7156
+ "text": "string"
7113
7157
  }
7114
7158
  }
7115
7159
  ]
7116
7160
  },
7117
7161
  {
7118
7162
  "kind": "method",
7119
- "name": "navTransition",
7120
- "privacy": "private",
7121
- "parameters": [
7122
- {
7123
- "name": "event",
7124
- "type": {
7125
- "text": "NavEvent"
7126
- }
7127
- }
7128
- ]
7129
- },
7130
- {
7131
- "kind": "method",
7132
- "name": "handleNavClick",
7133
- "privacy": "private",
7134
- "parameters": [
7135
- {
7136
- "name": "e",
7137
- "type": {
7138
- "text": "Event"
7139
- }
7140
- }
7141
- ]
7142
- },
7143
- {
7144
- "kind": "method",
7145
- "name": "handleMainClick",
7146
- "privacy": "private"
7147
- },
7148
- {
7149
- "kind": "method",
7150
- "name": "handleDropdownOpen",
7151
- "privacy": "private",
7152
- "parameters": [
7153
- {
7154
- "name": "e",
7155
- "type": {
7156
- "text": "Event"
7157
- }
7158
- }
7159
- ]
7160
- },
7161
- {
7162
- "kind": "method",
7163
- "name": "handleDropdownClose",
7164
- "privacy": "private",
7165
- "parameters": [
7166
- {
7167
- "name": "e",
7168
- "type": {
7169
- "text": "Event"
7170
- }
7171
- }
7172
- ]
7173
- },
7174
- {
7175
- "kind": "field",
7176
- "name": "handleMediaQueryChange",
7177
- "privacy": "private"
7178
- },
7179
- {
7180
- "kind": "field",
7181
- "name": "handleToggleClick",
7182
- "privacy": "private"
7183
- },
7184
- {
7185
- "kind": "field",
7186
- "name": "handleNavFocus",
7187
- "privacy": "private"
7188
- },
7189
- {
7190
- "kind": "field",
7191
- "name": "handleMainFocus",
7192
- "privacy": "private"
7193
- },
7194
- {
7195
- "kind": "field",
7196
- "name": "handleMouseEnter",
7197
- "privacy": "private"
7198
- },
7199
- {
7200
- "kind": "field",
7201
- "name": "handleMouseLeave",
7202
- "privacy": "private"
7203
- },
7204
- {
7205
- "kind": "field",
7206
- "name": "handleTransitionEnd",
7207
- "privacy": "private"
7208
- },
7209
- {
7210
- "kind": "method",
7211
- "name": "handleKeyboardResize",
7212
- "privacy": "private",
7213
- "parameters": [
7214
- {
7215
- "name": "e",
7216
- "type": {
7217
- "text": "KeyboardEvent"
7218
- }
7219
- }
7220
- ]
7221
- },
7222
- {
7223
- "kind": "method",
7224
- "name": "setNavWidth",
7225
- "privacy": "private",
7226
- "parameters": [
7227
- {
7228
- "name": "width",
7229
- "type": {
7230
- "text": "number"
7231
- }
7232
- }
7233
- ]
7234
- },
7235
- {
7236
- "kind": "method",
7237
- "name": "startDragging",
7238
- "privacy": "private",
7239
- "parameters": [
7240
- {
7241
- "name": "e",
7242
- "type": {
7243
- "text": "PointerEvent"
7244
- }
7245
- }
7246
- ]
7247
- },
7248
- {
7249
- "kind": "method",
7250
- "name": "stopDragging",
7251
- "privacy": "private"
7252
- },
7253
- {
7254
- "kind": "method",
7255
- "name": "handleDrag",
7256
- "privacy": "private",
7257
- "parameters": [
7258
- {
7259
- "name": "e",
7260
- "type": {
7261
- "text": "PointerEvent"
7262
- }
7263
- }
7264
- ]
7265
- }
7266
- ],
7267
- "attributes": [
7268
- {
7269
- "name": "nav-open",
7270
- "type": {
7271
- "text": "boolean"
7272
- },
7273
- "description": "Controls whether the navigation is hidden off-screen or not.\nDefaults to `true` for wide viewports, and `false` otherwise.",
7274
- "fieldName": "navOpen"
7275
- },
7276
- {
7277
- "name": "persist-nav-state",
7278
- "type": {
7279
- "text": "boolean"
7280
- },
7281
- "default": "false",
7282
- "description": "Controls whether the navigation's open/closed state is persisted across page loads.\nThis is useful for multi-page apps, where clicks on links trigger a full page load.",
7283
- "fieldName": "persistNavState"
7284
- },
7285
- {
7286
- "name": "sync-nav-state",
7287
- "type": {
7288
- "text": "boolean"
7289
- },
7290
- "default": "false",
7291
- "description": "Controls whether the navigation's open/closed state and width is synced across tabs/windows on the same origin.\nThis is useful for long-lived app sessions where you may have multiple tabs/windows open at once.",
7292
- "fieldName": "syncNavState"
7293
- },
7294
- {
7295
- "name": "padding",
7296
- "type": {
7297
- "text": "\"m\" | \"none\""
7298
- },
7299
- "default": "\"m\"",
7300
- "description": "Controls the padding of the default main section slot. When set to “none”,\nthe nav and header slots will still have padding.",
7301
- "fieldName": "padding"
7302
- },
7303
- {
7304
- "name": "sticky",
7305
- "type": {
7306
- "text": "boolean"
7307
- },
7308
- "default": "false",
7309
- "description": "Controls whether the layout's header has sticky positioning.",
7310
- "fieldName": "sticky"
7163
+ "name": "clear"
7311
7164
  }
7312
- ],
7313
- "superclass": {
7314
- "name": "LitElement",
7315
- "package": "lit"
7316
- },
7317
- "localization": [],
7318
- "status": "ready",
7319
- "category": "structure",
7320
- "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- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n\n---\n\n## Theming\n\nPlease see the [Accent color](/themes/#accent-color) and [Top Bar theming](/themes/#top-bar-theming) sections in our theming documentation for detailed guidelines.\n\n<nord-button variant=\"primary\" href=\"/themes/#accent-color\">Theming Guidelines</nord-button>\n",
7321
- "examples": [],
7322
- "dependencies": [
7323
- "icon",
7324
- "nav-toggle"
7325
- ],
7326
- "tagName": "nord-layout",
7327
- "customElement": true
7165
+ ]
7328
7166
  }
7329
7167
  ],
7330
7168
  "exports": [
7331
7169
  {
7332
7170
  "kind": "js",
7333
- "name": "default",
7334
- "declaration": {
7335
- "name": "Layout",
7336
- "module": "src/layout/Layout.ts"
7337
- }
7338
- },
7339
- {
7340
- "kind": "custom-element-definition",
7341
- "name": "nord-layout",
7171
+ "name": "IconManager",
7342
7172
  "declaration": {
7343
- "name": "Layout",
7344
- "module": "src/layout/Layout.ts"
7173
+ "name": "IconManager",
7174
+ "module": "src/icon/IconManager.ts"
7345
7175
  }
7346
7176
  }
7347
7177
  ]
@@ -8244,308 +8074,478 @@
8244
8074
  },
8245
8075
  {
8246
8076
  "kind": "javascript-module",
8247
- "path": "src/icon/Icon.ts",
8077
+ "path": "src/layout/Layout.ts",
8248
8078
  "declarations": [
8249
8079
  {
8250
8080
  "kind": "class",
8251
- "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
8252
- "name": "Icon",
8253
- "slots": [
8081
+ "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
8082
+ "name": "Layout",
8083
+ "cssProperties": [
8254
8084
  {
8255
- "description": "The default slot used for placing a custom SVG icon.",
8256
- "name": ""
8085
+ "description": "Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).",
8086
+ "name": "--n-layout-padding",
8087
+ "default": "var(--n-space-l)"
8088
+ },
8089
+ {
8090
+ "description": "Controls the width of the drawer area, when used.",
8091
+ "name": "--n-layout-drawer-inline-size",
8092
+ "default": "320px"
8093
+ },
8094
+ {
8095
+ "description": "Controls the background color of the layout, using [color tokens](/tokens/#color).",
8096
+ "name": "--n-layout-background-color",
8097
+ "default": "var(--n-color-background)"
8257
8098
  }
8258
8099
  ],
8259
- "members": [
8100
+ "slots": [
8260
8101
  {
8261
- "kind": "field",
8262
- "name": "manager",
8263
- "privacy": "private",
8264
- "static": true,
8265
- "default": "new IconManager()"
8102
+ "description": "The default main section content.",
8103
+ "name": ""
8266
8104
  },
8267
8105
  {
8268
- "kind": "method",
8269
- "name": "registerResolver",
8270
- "static": true,
8271
- "parameters": [
8272
- {
8273
- "name": "resolver",
8274
- "type": {
8275
- "text": "IconResolver"
8276
- },
8277
- "description": "The resolver function to register."
8278
- }
8279
- ],
8280
- "description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
8106
+ "description": "Used to place content inside the navigation sidebar.",
8107
+ "name": "nav"
8281
8108
  },
8282
8109
  {
8283
- "kind": "method",
8284
- "name": "registerIcon",
8285
- "static": true,
8286
- "return": {
8287
- "type": {
8288
- "text": "void"
8289
- }
8290
- },
8291
- "parameters": [
8292
- {
8293
- "name": "icon",
8294
- "type": {
8295
- "text": "{ title: string; default: string }"
8296
- },
8297
- "description": "An object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string.\nThis is intended to be used in cases where you import an icon's entire ES module and register it directly."
8298
- }
8299
- ],
8300
- "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
8110
+ "description": "Used to place the [Top Bar](../top-bar/) component.",
8111
+ "name": "top-bar"
8301
8112
  },
8302
8113
  {
8303
- "kind": "method",
8304
- "name": "registerIcon",
8305
- "static": true,
8306
- "return": {
8307
- "type": {
8308
- "text": "void"
8309
- }
8114
+ "description": "Used to place content inside the header section.",
8115
+ "name": "header"
8116
+ },
8117
+ {
8118
+ "description": "Used to place additional content/details relating to a selected item.",
8119
+ "name": "drawer"
8120
+ },
8121
+ {
8122
+ "description": "Used to place a own nav-toggle component, for cases where you might need to add a tooltip.",
8123
+ "name": "nav-toggle"
8124
+ }
8125
+ ],
8126
+ "members": [
8127
+ {
8128
+ "kind": "field",
8129
+ "name": "peekTimeoutId",
8130
+ "type": {
8131
+ "text": "ReturnType<typeof setTimeout> | undefined"
8310
8132
  },
8311
- "parameters": [
8312
- {
8313
- "name": "name",
8314
- "type": {
8315
- "text": "string"
8316
- },
8317
- "description": "The name of the icon to be registered."
8318
- },
8319
- {
8320
- "name": "icon",
8321
- "type": {
8322
- "text": "string"
8323
- },
8324
- "description": "The SVG string for the icon."
8325
- }
8326
- ],
8327
- "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
8133
+ "privacy": "private"
8328
8134
  },
8329
8135
  {
8330
- "kind": "method",
8331
- "name": "registerIcon",
8332
- "static": true,
8333
- "parameters": [
8334
- {
8335
- "name": "iconOrName",
8336
- "type": {
8337
- "text": "string | { title: string; default: string }"
8338
- },
8339
- "description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
8340
- },
8341
- {
8342
- "name": "icon",
8343
- "optional": true,
8344
- "type": {
8345
- "text": "string"
8346
- },
8347
- "description": "The SVG string for the icon."
8348
- }
8349
- ],
8350
- "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
8136
+ "kind": "field",
8137
+ "name": "navSlot",
8138
+ "privacy": "private",
8139
+ "default": "new SlotController(this, \"nav\")"
8351
8140
  },
8352
8141
  {
8353
8142
  "kind": "field",
8354
- "name": "name",
8143
+ "name": "drawerSlot",
8144
+ "privacy": "private",
8145
+ "default": "new SlotController(this, \"drawer\")"
8146
+ },
8147
+ {
8148
+ "kind": "field",
8149
+ "name": "topBarSlot",
8150
+ "privacy": "private",
8151
+ "default": "new SlotController(this, \"top-bar\")"
8152
+ },
8153
+ {
8154
+ "kind": "field",
8155
+ "name": "headerSlot",
8156
+ "privacy": "private",
8157
+ "default": "new SlotController(this, \"header\")"
8158
+ },
8159
+ {
8160
+ "kind": "field",
8161
+ "name": "direction",
8162
+ "privacy": "private",
8163
+ "default": "new DirectionController(this)"
8164
+ },
8165
+ {
8166
+ "kind": "field",
8167
+ "name": "events",
8168
+ "privacy": "private",
8169
+ "default": "new EventController(this)"
8170
+ },
8171
+ {
8172
+ "kind": "field",
8173
+ "name": "lightDismiss",
8174
+ "privacy": "private",
8175
+ "default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !this.wideScreen,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl,\n })"
8176
+ },
8177
+ {
8178
+ "kind": "field",
8179
+ "name": "broadcast",
8180
+ "privacy": "private",
8181
+ "default": "new BroadcastChannelController<{ navOpen: boolean } | { navWidth: number }>(this, {\n channelName: \"nord-layout-nav-state\",\n enabled: () => this.syncNavState && this.wideScreen,\n onMessage: data => {\n if (\"navOpen\" in data) {\n this.navOpen = data.navOpen\n }\n if (\"navWidth\" in data) {\n this.navWidth = data.navWidth\n }\n },\n })"
8182
+ },
8183
+ {
8184
+ "kind": "field",
8185
+ "name": "navEl",
8355
8186
  "type": {
8356
- "text": "string"
8187
+ "text": "HTMLDivElement"
8357
8188
  },
8358
- "default": "\"\"",
8359
- "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
8360
- "attribute": "name",
8361
- "reflects": true
8189
+ "privacy": "private"
8362
8190
  },
8363
8191
  {
8364
8192
  "kind": "field",
8365
- "name": "size",
8193
+ "name": "navWidth",
8194
+ "privacy": "private"
8195
+ },
8196
+ {
8197
+ "kind": "field",
8198
+ "name": "isDragging",
8366
8199
  "type": {
8367
- "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
8200
+ "text": "boolean"
8368
8201
  },
8369
- "description": "The size of the icon.",
8370
- "attribute": "size",
8371
- "reflects": true
8202
+ "privacy": "private",
8203
+ "default": "false"
8372
8204
  },
8373
8205
  {
8374
8206
  "kind": "field",
8375
- "name": "color",
8207
+ "name": "navState",
8376
8208
  "type": {
8377
- "text": "string | undefined"
8209
+ "text": "NavState"
8378
8210
  },
8379
- "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
8380
- "attribute": "color",
8381
- "reflects": true
8211
+ "privacy": "private"
8382
8212
  },
8383
8213
  {
8384
8214
  "kind": "field",
8385
- "name": "label",
8215
+ "name": "wideScreen",
8216
+ "privacy": "private"
8217
+ },
8218
+ {
8219
+ "kind": "field",
8220
+ "name": "navOpen",
8386
8221
  "type": {
8387
- "text": "string | undefined"
8222
+ "text": "boolean"
8388
8223
  },
8389
- "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
8390
- "attribute": "label",
8224
+ "description": "Controls whether the navigation is hidden off-screen or not.\nDefaults to `true` for wide viewports, and `false` otherwise.",
8225
+ "attribute": "nav-open",
8391
8226
  "reflects": true
8392
8227
  },
8393
8228
  {
8394
8229
  "kind": "field",
8395
- "name": "svg",
8230
+ "name": "persistNavState",
8396
8231
  "type": {
8397
- "text": "string"
8232
+ "text": "boolean"
8398
8233
  },
8399
- "privacy": "private",
8400
- "default": "\"\""
8234
+ "default": "false",
8235
+ "description": "Controls whether the navigation's open/closed state is persisted across page loads.\nThis is useful for multi-page apps, where clicks on links trigger a full page load.",
8236
+ "attribute": "persist-nav-state"
8401
8237
  },
8402
8238
  {
8403
- "kind": "method",
8404
- "name": "handleNameChange",
8405
- "privacy": "protected"
8406
- }
8407
- ],
8408
- "attributes": [
8409
- {
8410
- "name": "name",
8239
+ "kind": "field",
8240
+ "name": "syncNavState",
8411
8241
  "type": {
8412
- "text": "string"
8242
+ "text": "boolean"
8413
8243
  },
8414
- "default": "\"\"",
8415
- "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
8416
- "fieldName": "name"
8244
+ "default": "false",
8245
+ "description": "Controls whether the navigation's open/closed state and width is synced across tabs/windows on the same origin.\nThis is useful for long-lived app sessions where you may have multiple tabs/windows open at once.",
8246
+ "attribute": "sync-nav-state",
8247
+ "reflects": true
8417
8248
  },
8418
8249
  {
8419
- "name": "size",
8250
+ "kind": "field",
8251
+ "name": "padding",
8420
8252
  "type": {
8421
- "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
8253
+ "text": "\"m\" | \"none\""
8422
8254
  },
8423
- "description": "The size of the icon.",
8424
- "fieldName": "size"
8255
+ "default": "\"m\"",
8256
+ "description": "Controls the padding of the default main section slot. When set to “none”,\nthe nav and header slots will still have padding.",
8257
+ "attribute": "padding",
8258
+ "reflects": true
8425
8259
  },
8426
8260
  {
8427
- "name": "color",
8261
+ "kind": "field",
8262
+ "name": "sticky",
8428
8263
  "type": {
8429
- "text": "string | undefined"
8264
+ "text": "boolean"
8430
8265
  },
8431
- "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
8432
- "fieldName": "color"
8266
+ "default": "false",
8267
+ "description": "Controls whether the layout's header has sticky positioning.",
8268
+ "attribute": "sticky",
8269
+ "reflects": true
8433
8270
  },
8434
8271
  {
8435
- "name": "label",
8272
+ "kind": "field",
8273
+ "name": "isNarrow",
8436
8274
  "type": {
8437
- "text": "string | undefined"
8275
+ "text": "boolean"
8438
8276
  },
8439
- "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
8440
- "fieldName": "label"
8441
- }
8442
- ],
8443
- "superclass": {
8444
- "name": "LitElement",
8445
- "package": "lit"
8446
- },
8447
- "localization": [],
8448
- "status": "ready",
8449
- "category": "image",
8450
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n",
8451
- "examples": [],
8452
- "dependencies": [],
8453
- "tagName": "nord-icon",
8454
- "customElement": true
8455
- }
8456
- ],
8457
- "exports": [
8458
- {
8459
- "kind": "js",
8460
- "name": "default",
8461
- "declaration": {
8462
- "name": "Icon",
8463
- "module": "src/icon/Icon.ts"
8464
- }
8465
- },
8466
- {
8467
- "kind": "custom-element-definition",
8468
- "name": "nord-icon",
8469
- "declaration": {
8470
- "name": "Icon",
8471
- "module": "src/icon/Icon.ts"
8472
- }
8473
- }
8474
- ]
8475
- },
8476
- {
8477
- "kind": "javascript-module",
8478
- "path": "src/icon/IconManager.ts",
8479
- "declarations": [
8480
- {
8481
- "kind": "class",
8482
- "description": "",
8483
- "name": "IconManager",
8484
- "members": [
8277
+ "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.",
8278
+ "readonly": true
8279
+ },
8485
8280
  {
8486
- "kind": "field",
8487
- "name": "cache",
8281
+ "kind": "method",
8282
+ "name": "renderNavToggle",
8283
+ "privacy": "private"
8284
+ },
8285
+ {
8286
+ "kind": "method",
8287
+ "name": "renderNavCollapse",
8288
+ "privacy": "private"
8289
+ },
8290
+ {
8291
+ "kind": "method",
8292
+ "name": "handleNavWidthChange",
8293
+ "privacy": "protected"
8294
+ },
8295
+ {
8296
+ "kind": "method",
8297
+ "name": "handleNavStateChange",
8298
+ "privacy": "protected",
8299
+ "parameters": [
8300
+ {
8301
+ "name": "prev",
8302
+ "type": {
8303
+ "text": "NavState"
8304
+ }
8305
+ }
8306
+ ]
8307
+ },
8308
+ {
8309
+ "kind": "method",
8310
+ "name": "handleOpenChange",
8311
+ "privacy": "protected",
8312
+ "parameters": [
8313
+ {
8314
+ "name": "prev",
8315
+ "type": {
8316
+ "text": "boolean"
8317
+ }
8318
+ }
8319
+ ]
8320
+ },
8321
+ {
8322
+ "kind": "method",
8323
+ "name": "navTransition",
8488
8324
  "privacy": "private",
8489
- "default": "new Map<string, string | Promise<string>>()"
8325
+ "parameters": [
8326
+ {
8327
+ "name": "event",
8328
+ "type": {
8329
+ "text": "NavEvent"
8330
+ }
8331
+ }
8332
+ ]
8333
+ },
8334
+ {
8335
+ "kind": "method",
8336
+ "name": "handleNavClick",
8337
+ "privacy": "private",
8338
+ "parameters": [
8339
+ {
8340
+ "name": "e",
8341
+ "type": {
8342
+ "text": "Event"
8343
+ }
8344
+ }
8345
+ ]
8346
+ },
8347
+ {
8348
+ "kind": "method",
8349
+ "name": "handleMainClick",
8350
+ "privacy": "private"
8351
+ },
8352
+ {
8353
+ "kind": "method",
8354
+ "name": "handleDropdownOpen",
8355
+ "privacy": "private",
8356
+ "parameters": [
8357
+ {
8358
+ "name": "e",
8359
+ "type": {
8360
+ "text": "Event"
8361
+ }
8362
+ }
8363
+ ]
8364
+ },
8365
+ {
8366
+ "kind": "method",
8367
+ "name": "handleDropdownClose",
8368
+ "privacy": "private",
8369
+ "parameters": [
8370
+ {
8371
+ "name": "e",
8372
+ "type": {
8373
+ "text": "Event"
8374
+ }
8375
+ }
8376
+ ]
8490
8377
  },
8491
8378
  {
8492
8379
  "kind": "field",
8493
- "name": "resolver",
8494
- "type": {
8495
- "text": "IconResolver"
8496
- }
8380
+ "name": "handleMediaQueryChange",
8381
+ "privacy": "private"
8382
+ },
8383
+ {
8384
+ "kind": "field",
8385
+ "name": "handleToggleClick",
8386
+ "privacy": "private"
8387
+ },
8388
+ {
8389
+ "kind": "field",
8390
+ "name": "handleNavFocus",
8391
+ "privacy": "private"
8392
+ },
8393
+ {
8394
+ "kind": "field",
8395
+ "name": "handleMainFocus",
8396
+ "privacy": "private"
8397
+ },
8398
+ {
8399
+ "kind": "field",
8400
+ "name": "handleMouseEnter",
8401
+ "privacy": "private"
8402
+ },
8403
+ {
8404
+ "kind": "field",
8405
+ "name": "handleMouseLeave",
8406
+ "privacy": "private"
8407
+ },
8408
+ {
8409
+ "kind": "field",
8410
+ "name": "handleTransitionEnd",
8411
+ "privacy": "private"
8497
8412
  },
8498
8413
  {
8499
8414
  "kind": "method",
8500
- "name": "resolve",
8415
+ "name": "handleKeyboardResize",
8416
+ "privacy": "private",
8501
8417
  "parameters": [
8502
8418
  {
8503
- "name": "name",
8419
+ "name": "e",
8504
8420
  "type": {
8505
- "text": "string"
8421
+ "text": "KeyboardEvent"
8506
8422
  }
8507
- },
8423
+ }
8424
+ ]
8425
+ },
8426
+ {
8427
+ "kind": "method",
8428
+ "name": "setNavWidth",
8429
+ "privacy": "private",
8430
+ "parameters": [
8508
8431
  {
8509
- "name": "onResolved",
8432
+ "name": "width",
8510
8433
  "type": {
8511
- "text": "(svg: string) => void"
8434
+ "text": "number"
8512
8435
  }
8513
8436
  }
8514
8437
  ]
8515
8438
  },
8516
8439
  {
8517
8440
  "kind": "method",
8518
- "name": "registerIcon",
8441
+ "name": "startDragging",
8442
+ "privacy": "private",
8519
8443
  "parameters": [
8520
8444
  {
8521
- "name": "iconOrName",
8445
+ "name": "e",
8522
8446
  "type": {
8523
- "text": "string | { title: string; default: string }"
8447
+ "text": "PointerEvent"
8524
8448
  }
8525
- },
8449
+ }
8450
+ ]
8451
+ },
8452
+ {
8453
+ "kind": "method",
8454
+ "name": "stopDragging",
8455
+ "privacy": "private"
8456
+ },
8457
+ {
8458
+ "kind": "method",
8459
+ "name": "handleDrag",
8460
+ "privacy": "private",
8461
+ "parameters": [
8526
8462
  {
8527
- "name": "icon",
8528
- "optional": true,
8463
+ "name": "e",
8529
8464
  "type": {
8530
- "text": "string"
8465
+ "text": "PointerEvent"
8531
8466
  }
8532
8467
  }
8533
8468
  ]
8469
+ }
8470
+ ],
8471
+ "attributes": [
8472
+ {
8473
+ "name": "nav-open",
8474
+ "type": {
8475
+ "text": "boolean"
8476
+ },
8477
+ "description": "Controls whether the navigation is hidden off-screen or not.\nDefaults to `true` for wide viewports, and `false` otherwise.",
8478
+ "fieldName": "navOpen"
8479
+ },
8480
+ {
8481
+ "name": "persist-nav-state",
8482
+ "type": {
8483
+ "text": "boolean"
8484
+ },
8485
+ "default": "false",
8486
+ "description": "Controls whether the navigation's open/closed state is persisted across page loads.\nThis is useful for multi-page apps, where clicks on links trigger a full page load.",
8487
+ "fieldName": "persistNavState"
8488
+ },
8489
+ {
8490
+ "name": "sync-nav-state",
8491
+ "type": {
8492
+ "text": "boolean"
8493
+ },
8494
+ "default": "false",
8495
+ "description": "Controls whether the navigation's open/closed state and width is synced across tabs/windows on the same origin.\nThis is useful for long-lived app sessions where you may have multiple tabs/windows open at once.",
8496
+ "fieldName": "syncNavState"
8534
8497
  },
8535
8498
  {
8536
- "kind": "method",
8537
- "name": "clear"
8499
+ "name": "padding",
8500
+ "type": {
8501
+ "text": "\"m\" | \"none\""
8502
+ },
8503
+ "default": "\"m\"",
8504
+ "description": "Controls the padding of the default main section slot. When set to “none”,\nthe nav and header slots will still have padding.",
8505
+ "fieldName": "padding"
8506
+ },
8507
+ {
8508
+ "name": "sticky",
8509
+ "type": {
8510
+ "text": "boolean"
8511
+ },
8512
+ "default": "false",
8513
+ "description": "Controls whether the layout's header has sticky positioning.",
8514
+ "fieldName": "sticky"
8538
8515
  }
8539
- ]
8516
+ ],
8517
+ "superclass": {
8518
+ "name": "LitElement",
8519
+ "package": "lit"
8520
+ },
8521
+ "localization": [],
8522
+ "status": "ready",
8523
+ "category": "structure",
8524
+ "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- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n\n---\n\n## Theming\n\nPlease see the [Accent color](/themes/#accent-color) and [Top Bar theming](/themes/#top-bar-theming) sections in our theming documentation for detailed guidelines.\n\n<nord-button variant=\"primary\" href=\"/themes/#accent-color\">Theming Guidelines</nord-button>\n",
8525
+ "examples": [],
8526
+ "dependencies": [
8527
+ "icon",
8528
+ "nav-toggle"
8529
+ ],
8530
+ "tagName": "nord-layout",
8531
+ "customElement": true
8540
8532
  }
8541
8533
  ],
8542
8534
  "exports": [
8543
8535
  {
8544
8536
  "kind": "js",
8545
- "name": "IconManager",
8537
+ "name": "default",
8546
8538
  "declaration": {
8547
- "name": "IconManager",
8548
- "module": "src/icon/IconManager.ts"
8539
+ "name": "Layout",
8540
+ "module": "src/layout/Layout.ts"
8541
+ }
8542
+ },
8543
+ {
8544
+ "kind": "custom-element-definition",
8545
+ "name": "nord-layout",
8546
+ "declaration": {
8547
+ "name": "Layout",
8548
+ "module": "src/layout/Layout.ts"
8549
8549
  }
8550
8550
  }
8551
8551
  ]
@@ -8733,74 +8733,279 @@
8733
8733
  {
8734
8734
  "name": "lang",
8735
8735
  "type": {
8736
- "text": "string"
8736
+ "text": "string"
8737
+ },
8738
+ "description": "the lang code e.g. \"en\" or \"en-GB\""
8739
+ }
8740
+ ],
8741
+ "description": "Check whether there is a translation registered for the given lang"
8742
+ },
8743
+ {
8744
+ "kind": "function",
8745
+ "name": "resolveTranslation",
8746
+ "parameters": [
8747
+ {
8748
+ "name": "langCode",
8749
+ "type": {
8750
+ "text": "string"
8751
+ }
8752
+ }
8753
+ ],
8754
+ "description": "Picks the most appropriate translation for the given language, from most specific to least specific.\nFirst tries lang + region, then lang only, then fallback."
8755
+ }
8756
+ ],
8757
+ "exports": [
8758
+ {
8759
+ "kind": "js",
8760
+ "name": "clearTranslations",
8761
+ "declaration": {
8762
+ "name": "clearTranslations",
8763
+ "module": "src/localization/translation.ts"
8764
+ }
8765
+ },
8766
+ {
8767
+ "kind": "js",
8768
+ "name": "registerTranslation",
8769
+ "declaration": {
8770
+ "name": "registerTranslation",
8771
+ "module": "src/localization/translation.ts"
8772
+ }
8773
+ },
8774
+ {
8775
+ "kind": "js",
8776
+ "name": "subscribe",
8777
+ "declaration": {
8778
+ "name": "subscribe",
8779
+ "module": "src/localization/translation.ts"
8780
+ }
8781
+ },
8782
+ {
8783
+ "kind": "js",
8784
+ "name": "isTranslationRegistered",
8785
+ "declaration": {
8786
+ "name": "isTranslationRegistered",
8787
+ "module": "src/localization/translation.ts"
8788
+ }
8789
+ },
8790
+ {
8791
+ "kind": "js",
8792
+ "name": "resolveTranslation",
8793
+ "declaration": {
8794
+ "name": "resolveTranslation",
8795
+ "module": "src/localization/translation.ts"
8796
+ }
8797
+ },
8798
+ {
8799
+ "kind": "js",
8800
+ "name": "fallback",
8801
+ "declaration": {
8802
+ "name": "en",
8803
+ "module": "src/localization/translation.ts"
8804
+ }
8805
+ }
8806
+ ]
8807
+ },
8808
+ {
8809
+ "kind": "javascript-module",
8810
+ "path": "src/message/Message.ts",
8811
+ "declarations": [
8812
+ {
8813
+ "kind": "class",
8814
+ "description": "Message represents a specific item within a collection,\nsuch as notifications, tasks or conversations. Message\ncan be placed directly inside a dropdown component.",
8815
+ "name": "Message",
8816
+ "cssProperties": [
8817
+ {
8818
+ "description": "Controls the border color of the message, using our [color tokens](/tokens/#color).",
8819
+ "name": "--n-message-border-color",
8820
+ "default": "var(--n-color-border)"
8821
+ }
8822
+ ],
8823
+ "slots": [
8824
+ {
8825
+ "description": "The message content.",
8826
+ "name": ""
8827
+ },
8828
+ {
8829
+ "description": "Used to place content after the message. Typically used for a timestamp.",
8830
+ "name": "footer"
8831
+ }
8832
+ ],
8833
+ "members": [
8834
+ {
8835
+ "kind": "field",
8836
+ "name": "localize",
8837
+ "privacy": "private",
8838
+ "default": "new LocalizeController<\"nord-message\">(this)"
8839
+ },
8840
+ {
8841
+ "kind": "field",
8842
+ "name": "href",
8843
+ "type": {
8844
+ "text": "string | undefined"
8845
+ },
8846
+ "description": "The url the message should link to.",
8847
+ "attribute": "href",
8848
+ "reflects": true
8849
+ },
8850
+ {
8851
+ "kind": "field",
8852
+ "name": "highlight",
8853
+ "type": {
8854
+ "text": "boolean | undefined"
8855
+ },
8856
+ "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
8857
+ "attribute": "highlight",
8858
+ "reflects": true
8859
+ },
8860
+ {
8861
+ "kind": "field",
8862
+ "name": "unread",
8863
+ "type": {
8864
+ "text": "boolean | undefined"
8865
+ },
8866
+ "description": "Mark the message as unread. By default messages are read.",
8867
+ "attribute": "unread",
8868
+ "reflects": true
8869
+ },
8870
+ {
8871
+ "kind": "field",
8872
+ "name": "focusableRef",
8873
+ "privacy": "protected",
8874
+ "inheritedFrom": {
8875
+ "name": "FocusableMixin",
8876
+ "module": "src/common/mixins/FocusableMixin.ts"
8877
+ }
8878
+ },
8879
+ {
8880
+ "kind": "method",
8881
+ "name": "focus",
8882
+ "parameters": [
8883
+ {
8884
+ "name": "options",
8885
+ "optional": true,
8886
+ "type": {
8887
+ "text": "FocusOptions"
8888
+ },
8889
+ "description": "An object which controls aspects of the focusing process."
8890
+ }
8891
+ ],
8892
+ "description": "Programmatically move focus to the component.",
8893
+ "inheritedFrom": {
8894
+ "name": "FocusableMixin",
8895
+ "module": "src/common/mixins/FocusableMixin.ts"
8896
+ }
8897
+ },
8898
+ {
8899
+ "kind": "method",
8900
+ "name": "blur",
8901
+ "description": "Programmatically remove focus from the component.",
8902
+ "inheritedFrom": {
8903
+ "name": "FocusableMixin",
8904
+ "module": "src/common/mixins/FocusableMixin.ts"
8905
+ }
8906
+ },
8907
+ {
8908
+ "kind": "method",
8909
+ "name": "click",
8910
+ "description": "Programmatically simulates a click on the component.",
8911
+ "inheritedFrom": {
8912
+ "name": "FocusableMixin",
8913
+ "module": "src/common/mixins/FocusableMixin.ts"
8914
+ }
8915
+ }
8916
+ ],
8917
+ "attributes": [
8918
+ {
8919
+ "name": "href",
8920
+ "type": {
8921
+ "text": "string | undefined"
8922
+ },
8923
+ "description": "The url the message should link to.",
8924
+ "fieldName": "href"
8925
+ },
8926
+ {
8927
+ "name": "highlight",
8928
+ "type": {
8929
+ "text": "boolean | undefined"
8930
+ },
8931
+ "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
8932
+ "fieldName": "highlight"
8933
+ },
8934
+ {
8935
+ "name": "unread",
8936
+ "type": {
8937
+ "text": "boolean | undefined"
8737
8938
  },
8738
- "description": "the lang code e.g. \"en\" or \"en-GB\""
8939
+ "description": "Mark the message as unread. By default messages are read.",
8940
+ "fieldName": "unread"
8739
8941
  }
8740
8942
  ],
8741
- "description": "Check whether there is a translation registered for the given lang"
8742
- },
8743
- {
8744
- "kind": "function",
8745
- "name": "resolveTranslation",
8746
- "parameters": [
8943
+ "mixins": [
8747
8944
  {
8748
- "name": "langCode",
8749
- "type": {
8750
- "text": "string"
8751
- }
8945
+ "name": "FocusableMixin",
8946
+ "module": "/src/common/mixins/FocusableMixin.js"
8752
8947
  }
8753
8948
  ],
8754
- "description": "Picks the most appropriate translation for the given language, from most specific to least specific.\nFirst tries lang + region, then lang only, then fallback."
8949
+ "superclass": {
8950
+ "name": "LitElement",
8951
+ "package": "lit"
8952
+ },
8953
+ "localization": [
8954
+ {
8955
+ "name": "unreadLabel",
8956
+ "description": "Label for the unread messages."
8957
+ }
8958
+ ],
8959
+ "status": "draft",
8960
+ "category": "action",
8961
+ "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- Messages should always perform an action when clicked.\n- The click action should navigate to a new page or provide more detail about the message.\n- Mark unread messages as read on user interaction.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t slot other components inside a message.\n\n</div>\n\n---\n\n## Content guidelines\n\nMessage content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the message content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification 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\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAvoid all caps for messages:\n\n<div class=\"n-usage n-usage-do\">Nina Williams arrived to clinic with Norfryd</div>\n<div class=\"n-usage n-usage-dont\">NINA WILLIAMS ARRIVED TO CLINIC WITH NORFRYD</div>\n",
8962
+ "examples": [],
8963
+ "dependencies": [
8964
+ "dropdown-item"
8965
+ ],
8966
+ "tagName": "nord-message",
8967
+ "customElement": true
8755
8968
  }
8756
8969
  ],
8757
8970
  "exports": [
8758
8971
  {
8759
8972
  "kind": "js",
8760
- "name": "clearTranslations",
8761
- "declaration": {
8762
- "name": "clearTranslations",
8763
- "module": "src/localization/translation.ts"
8764
- }
8765
- },
8766
- {
8767
- "kind": "js",
8768
- "name": "registerTranslation",
8769
- "declaration": {
8770
- "name": "registerTranslation",
8771
- "module": "src/localization/translation.ts"
8772
- }
8773
- },
8774
- {
8775
- "kind": "js",
8776
- "name": "subscribe",
8973
+ "name": "default",
8777
8974
  "declaration": {
8778
- "name": "subscribe",
8779
- "module": "src/localization/translation.ts"
8975
+ "name": "Message",
8976
+ "module": "src/message/Message.ts"
8780
8977
  }
8781
8978
  },
8782
8979
  {
8783
- "kind": "js",
8784
- "name": "isTranslationRegistered",
8980
+ "kind": "custom-element-definition",
8981
+ "name": "nord-message",
8785
8982
  "declaration": {
8786
- "name": "isTranslationRegistered",
8787
- "module": "src/localization/translation.ts"
8983
+ "name": "Message",
8984
+ "module": "src/message/Message.ts"
8788
8985
  }
8789
- },
8986
+ }
8987
+ ]
8988
+ },
8989
+ {
8990
+ "kind": "javascript-module",
8991
+ "path": "src/message/localization.ts",
8992
+ "declarations": [
8790
8993
  {
8791
- "kind": "js",
8792
- "name": "resolveTranslation",
8793
- "declaration": {
8794
- "name": "resolveTranslation",
8795
- "module": "src/localization/translation.ts"
8796
- }
8797
- },
8994
+ "kind": "variable",
8995
+ "name": "localization",
8996
+ "type": {
8997
+ "text": "object"
8998
+ },
8999
+ "default": "{\n unreadLabel: \"Unread\",\n}"
9000
+ }
9001
+ ],
9002
+ "exports": [
8798
9003
  {
8799
9004
  "kind": "js",
8800
- "name": "fallback",
9005
+ "name": "default",
8801
9006
  "declaration": {
8802
- "name": "en",
8803
- "module": "src/localization/translation.ts"
9007
+ "name": "localization",
9008
+ "module": "src/message/localization.ts"
8804
9009
  }
8805
9010
  }
8806
9011
  ]
@@ -9098,326 +9303,121 @@
9098
9303
  "default": "new ScrollbarController(host)"
9099
9304
  },
9100
9305
  {
9101
- "kind": "field",
9102
- "name": "focusTrap",
9103
- "type": {
9104
- "text": "FocusTrapController"
9105
- },
9106
- "privacy": "private",
9107
- "default": "new FocusTrapController(host, options.dialog)"
9108
- },
9109
- {
9110
- "kind": "field",
9111
- "name": "lightDismiss",
9112
- "type": {
9113
- "text": "LightDismissController"
9114
- },
9115
- "privacy": "private",
9116
- "default": "new LightDismissController(host, {\n isOpen: options.isOpen,\n isDismissible: node => node !== options.dialog(),\n onDismiss: this.handleLightDismiss,\n })"
9117
- },
9118
- {
9119
- "kind": "field",
9120
- "name": "events",
9121
- "type": {
9122
- "text": "EventController"
9123
- },
9124
- "privacy": "private",
9125
- "default": "new EventController(host)"
9126
- },
9127
- {
9128
- "kind": "field",
9129
- "name": "options",
9130
- "type": {
9131
- "text": "ModalControllerOptions"
9132
- },
9133
- "privacy": "private",
9134
- "default": "options"
9135
- },
9136
- {
9137
- "kind": "field",
9138
- "name": "trigger",
9139
- "type": {
9140
- "text": "HTMLElement | undefined"
9141
- },
9142
- "privacy": "private"
9143
- },
9144
- {
9145
- "kind": "field",
9146
- "name": "lastButton",
9147
- "type": {
9148
- "text": "HTMLButtonElement | undefined"
9149
- },
9150
- "privacy": "private"
9151
- },
9152
- {
9153
- "kind": "method",
9154
- "name": "hostConnected"
9155
- },
9156
- {
9157
- "kind": "method",
9158
- "name": "hostDisconnected",
9159
- "return": {
9160
- "type": {
9161
- "text": "void"
9162
- }
9163
- }
9164
- },
9165
- {
9166
- "kind": "method",
9167
- "name": "block"
9168
- },
9169
- {
9170
- "kind": "method",
9171
- "name": "unblock"
9172
- },
9173
- {
9174
- "kind": "field",
9175
- "name": "trackLastButton",
9176
- "privacy": "private",
9177
- "description": "capture the last button clicked, so that we can polyfill `submitter` property in submit event"
9178
- },
9179
- {
9180
- "kind": "field",
9181
- "name": "polyfillSubmitter",
9182
- "privacy": "private"
9183
- },
9184
- {
9185
- "kind": "field",
9186
- "name": "handleTransitionEnd",
9187
- "privacy": "private"
9188
- },
9189
- {
9190
- "kind": "field",
9191
- "name": "handleLightDismiss",
9192
- "privacy": "private"
9193
- },
9194
- {
9195
- "kind": "field",
9196
- "name": "handleSubmit",
9197
- "privacy": "private"
9198
- }
9199
- ]
9200
- }
9201
- ],
9202
- "exports": [
9203
- {
9204
- "kind": "js",
9205
- "name": "ModalController",
9206
- "declaration": {
9207
- "name": "ModalController",
9208
- "module": "src/modal/ModalController.ts"
9209
- }
9210
- }
9211
- ]
9212
- },
9213
- {
9214
- "kind": "javascript-module",
9215
- "path": "src/modal/localization.ts",
9216
- "declarations": [
9217
- {
9218
- "kind": "variable",
9219
- "name": "localization",
9220
- "type": {
9221
- "text": "object"
9222
- },
9223
- "default": "{\n closeLabel: \"Close dialog\",\n}"
9224
- }
9225
- ],
9226
- "exports": [
9227
- {
9228
- "kind": "js",
9229
- "name": "default",
9230
- "declaration": {
9231
- "name": "localization",
9232
- "module": "src/modal/localization.ts"
9233
- }
9234
- }
9235
- ]
9236
- },
9237
- {
9238
- "kind": "javascript-module",
9239
- "path": "src/message/Message.ts",
9240
- "declarations": [
9241
- {
9242
- "kind": "class",
9243
- "description": "Message represents a specific item within a collection,\nsuch as notifications, tasks or conversations. Message\ncan be placed directly inside a dropdown component.",
9244
- "name": "Message",
9245
- "cssProperties": [
9246
- {
9247
- "description": "Controls the border color of the message, using our [color tokens](/tokens/#color).",
9248
- "name": "--n-message-border-color",
9249
- "default": "var(--n-color-border)"
9250
- }
9251
- ],
9252
- "slots": [
9253
- {
9254
- "description": "The message content.",
9255
- "name": ""
9256
- },
9257
- {
9258
- "description": "Used to place content after the message. Typically used for a timestamp.",
9259
- "name": "footer"
9260
- }
9261
- ],
9262
- "members": [
9306
+ "kind": "field",
9307
+ "name": "focusTrap",
9308
+ "type": {
9309
+ "text": "FocusTrapController"
9310
+ },
9311
+ "privacy": "private",
9312
+ "default": "new FocusTrapController(host, options.dialog)"
9313
+ },
9263
9314
  {
9264
9315
  "kind": "field",
9265
- "name": "localize",
9316
+ "name": "lightDismiss",
9317
+ "type": {
9318
+ "text": "LightDismissController"
9319
+ },
9266
9320
  "privacy": "private",
9267
- "default": "new LocalizeController<\"nord-message\">(this)"
9321
+ "default": "new LightDismissController(host, {\n isOpen: options.isOpen,\n isDismissible: node => node !== options.dialog(),\n onDismiss: this.handleLightDismiss,\n })"
9268
9322
  },
9269
9323
  {
9270
9324
  "kind": "field",
9271
- "name": "href",
9325
+ "name": "events",
9272
9326
  "type": {
9273
- "text": "string | undefined"
9327
+ "text": "EventController"
9274
9328
  },
9275
- "description": "The url the message should link to.",
9276
- "attribute": "href",
9277
- "reflects": true
9329
+ "privacy": "private",
9330
+ "default": "new EventController(host)"
9278
9331
  },
9279
9332
  {
9280
9333
  "kind": "field",
9281
- "name": "highlight",
9334
+ "name": "options",
9282
9335
  "type": {
9283
- "text": "boolean | undefined"
9336
+ "text": "ModalControllerOptions"
9284
9337
  },
9285
- "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
9286
- "attribute": "highlight",
9287
- "reflects": true
9338
+ "privacy": "private",
9339
+ "default": "options"
9288
9340
  },
9289
9341
  {
9290
9342
  "kind": "field",
9291
- "name": "unread",
9343
+ "name": "trigger",
9292
9344
  "type": {
9293
- "text": "boolean | undefined"
9345
+ "text": "HTMLElement | undefined"
9294
9346
  },
9295
- "description": "Mark the message as unread. By default messages are read.",
9296
- "attribute": "unread",
9297
- "reflects": true
9347
+ "privacy": "private"
9298
9348
  },
9299
9349
  {
9300
9350
  "kind": "field",
9301
- "name": "focusableRef",
9302
- "privacy": "protected",
9303
- "inheritedFrom": {
9304
- "name": "FocusableMixin",
9305
- "module": "src/common/mixins/FocusableMixin.ts"
9306
- }
9351
+ "name": "lastButton",
9352
+ "type": {
9353
+ "text": "HTMLButtonElement | undefined"
9354
+ },
9355
+ "privacy": "private"
9307
9356
  },
9308
9357
  {
9309
9358
  "kind": "method",
9310
- "name": "focus",
9311
- "parameters": [
9312
- {
9313
- "name": "options",
9314
- "optional": true,
9315
- "type": {
9316
- "text": "FocusOptions"
9317
- },
9318
- "description": "An object which controls aspects of the focusing process."
9359
+ "name": "hostConnected"
9360
+ },
9361
+ {
9362
+ "kind": "method",
9363
+ "name": "hostDisconnected",
9364
+ "return": {
9365
+ "type": {
9366
+ "text": "void"
9319
9367
  }
9320
- ],
9321
- "description": "Programmatically move focus to the component.",
9322
- "inheritedFrom": {
9323
- "name": "FocusableMixin",
9324
- "module": "src/common/mixins/FocusableMixin.ts"
9325
9368
  }
9326
9369
  },
9327
9370
  {
9328
9371
  "kind": "method",
9329
- "name": "blur",
9330
- "description": "Programmatically remove focus from the component.",
9331
- "inheritedFrom": {
9332
- "name": "FocusableMixin",
9333
- "module": "src/common/mixins/FocusableMixin.ts"
9334
- }
9372
+ "name": "block"
9335
9373
  },
9336
9374
  {
9337
9375
  "kind": "method",
9338
- "name": "click",
9339
- "description": "Programmatically simulates a click on the component.",
9340
- "inheritedFrom": {
9341
- "name": "FocusableMixin",
9342
- "module": "src/common/mixins/FocusableMixin.ts"
9343
- }
9344
- }
9345
- ],
9346
- "attributes": [
9376
+ "name": "unblock"
9377
+ },
9347
9378
  {
9348
- "name": "href",
9349
- "type": {
9350
- "text": "string | undefined"
9351
- },
9352
- "description": "The url the message should link to.",
9353
- "fieldName": "href"
9379
+ "kind": "field",
9380
+ "name": "trackLastButton",
9381
+ "privacy": "private",
9382
+ "description": "capture the last button clicked, so that we can polyfill `submitter` property in submit event"
9354
9383
  },
9355
9384
  {
9356
- "name": "highlight",
9357
- "type": {
9358
- "text": "boolean | undefined"
9359
- },
9360
- "description": "Highlight the message visually. This is meant for highlighting\na new message that just appeared. Highlight style should be removed\nafter the user has seen the message and there’s been a timeout of\ne.g. 30 seconds.",
9361
- "fieldName": "highlight"
9385
+ "kind": "field",
9386
+ "name": "polyfillSubmitter",
9387
+ "privacy": "private"
9362
9388
  },
9363
9389
  {
9364
- "name": "unread",
9365
- "type": {
9366
- "text": "boolean | undefined"
9367
- },
9368
- "description": "Mark the message as unread. By default messages are read.",
9369
- "fieldName": "unread"
9370
- }
9371
- ],
9372
- "mixins": [
9390
+ "kind": "field",
9391
+ "name": "handleTransitionEnd",
9392
+ "privacy": "private"
9393
+ },
9373
9394
  {
9374
- "name": "FocusableMixin",
9375
- "module": "/src/common/mixins/FocusableMixin.js"
9376
- }
9377
- ],
9378
- "superclass": {
9379
- "name": "LitElement",
9380
- "package": "lit"
9381
- },
9382
- "localization": [
9395
+ "kind": "field",
9396
+ "name": "handleLightDismiss",
9397
+ "privacy": "private"
9398
+ },
9383
9399
  {
9384
- "name": "unreadLabel",
9385
- "description": "Label for the unread messages."
9400
+ "kind": "field",
9401
+ "name": "handleSubmit",
9402
+ "privacy": "private"
9386
9403
  }
9387
- ],
9388
- "status": "draft",
9389
- "category": "action",
9390
- "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- Messages should always perform an action when clicked.\n- The click action should navigate to a new page or provide more detail about the message.\n- Mark unread messages as read on user interaction.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t slot other components inside a message.\n\n</div>\n\n---\n\n## Content guidelines\n\nMessage content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the message content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification 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\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAvoid all caps for messages:\n\n<div class=\"n-usage n-usage-do\">Nina Williams arrived to clinic with Norfryd</div>\n<div class=\"n-usage n-usage-dont\">NINA WILLIAMS ARRIVED TO CLINIC WITH NORFRYD</div>\n",
9391
- "examples": [],
9392
- "dependencies": [
9393
- "dropdown-item"
9394
- ],
9395
- "tagName": "nord-message",
9396
- "customElement": true
9404
+ ]
9397
9405
  }
9398
9406
  ],
9399
9407
  "exports": [
9400
9408
  {
9401
9409
  "kind": "js",
9402
- "name": "default",
9403
- "declaration": {
9404
- "name": "Message",
9405
- "module": "src/message/Message.ts"
9406
- }
9407
- },
9408
- {
9409
- "kind": "custom-element-definition",
9410
- "name": "nord-message",
9410
+ "name": "ModalController",
9411
9411
  "declaration": {
9412
- "name": "Message",
9413
- "module": "src/message/Message.ts"
9412
+ "name": "ModalController",
9413
+ "module": "src/modal/ModalController.ts"
9414
9414
  }
9415
9415
  }
9416
9416
  ]
9417
9417
  },
9418
9418
  {
9419
9419
  "kind": "javascript-module",
9420
- "path": "src/message/localization.ts",
9420
+ "path": "src/modal/localization.ts",
9421
9421
  "declarations": [
9422
9422
  {
9423
9423
  "kind": "variable",
@@ -9425,7 +9425,7 @@
9425
9425
  "type": {
9426
9426
  "text": "object"
9427
9427
  },
9428
- "default": "{\n unreadLabel: \"Unread\",\n}"
9428
+ "default": "{\n closeLabel: \"Close dialog\",\n}"
9429
9429
  }
9430
9430
  ],
9431
9431
  "exports": [
@@ -9434,7 +9434,7 @@
9434
9434
  "name": "default",
9435
9435
  "declaration": {
9436
9436
  "name": "localization",
9437
- "module": "src/message/localization.ts"
9437
+ "module": "src/modal/localization.ts"
9438
9438
  }
9439
9439
  }
9440
9440
  ]
@@ -9954,44 +9954,179 @@
9954
9954
  "members": [
9955
9955
  {
9956
9956
  "kind": "field",
9957
- "name": "headerSlot",
9957
+ "name": "headerSlot",
9958
+ "privacy": "private",
9959
+ "default": "new SlotController(this, \"header\")"
9960
+ },
9961
+ {
9962
+ "kind": "field",
9963
+ "name": "events",
9964
+ "privacy": "private",
9965
+ "default": "new EventController(this)"
9966
+ },
9967
+ {
9968
+ "kind": "field",
9969
+ "name": "allowItemsToRemainOpen",
9970
+ "type": {
9971
+ "text": "boolean"
9972
+ },
9973
+ "privacy": "private",
9974
+ "default": "false"
9975
+ },
9976
+ {
9977
+ "kind": "field",
9978
+ "name": "handleActivate",
9979
+ "privacy": "private"
9980
+ }
9981
+ ],
9982
+ "superclass": {
9983
+ "name": "LitElement",
9984
+ "package": "lit"
9985
+ },
9986
+ "localization": [],
9987
+ "status": "ready",
9988
+ "category": "navigation",
9989
+ "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 primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\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 place a `<nav>` element inside the navigation component, as it already contains one internally.\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",
9990
+ "examples": [],
9991
+ "dependencies": [
9992
+ "nav-item"
9993
+ ],
9994
+ "tagName": "nord-navigation",
9995
+ "customElement": true
9996
+ }
9997
+ ],
9998
+ "exports": [
9999
+ {
10000
+ "kind": "js",
10001
+ "name": "default",
10002
+ "declaration": {
10003
+ "name": "Navigation",
10004
+ "module": "src/navigation/Navigation.ts"
10005
+ }
10006
+ },
10007
+ {
10008
+ "kind": "custom-element-definition",
10009
+ "name": "nord-navigation",
10010
+ "declaration": {
10011
+ "name": "Navigation",
10012
+ "module": "src/navigation/Navigation.ts"
10013
+ }
10014
+ }
10015
+ ]
10016
+ },
10017
+ {
10018
+ "kind": "javascript-module",
10019
+ "path": "src/notification/Notification.ts",
10020
+ "declarations": [
10021
+ {
10022
+ "kind": "class",
10023
+ "description": "Notifications provide important information that requires action or acknowledgement.\nA notification is displayed until the user dismisses it.",
10024
+ "name": "Notification",
10025
+ "slots": [
10026
+ {
10027
+ "description": "Default slot used for the notification text/message.",
10028
+ "name": ""
10029
+ },
10030
+ {
10031
+ "description": "Slot used for the notification icon.",
10032
+ "name": "icon"
10033
+ }
10034
+ ],
10035
+ "members": [
10036
+ {
10037
+ "kind": "field",
10038
+ "name": "localize",
9958
10039
  "privacy": "private",
9959
- "default": "new SlotController(this, \"header\")"
10040
+ "default": "new LocalizeController<\"nord-notification\">(this)"
9960
10041
  },
9961
10042
  {
9962
10043
  "kind": "field",
9963
- "name": "events",
9964
- "privacy": "private",
9965
- "default": "new EventController(this)"
10044
+ "name": "notificationRef",
10045
+ "privacy": "protected",
10046
+ "inheritedFrom": {
10047
+ "name": "NotificationMixin",
10048
+ "module": "src/common/mixins/NotificationMixin.ts"
10049
+ }
9966
10050
  },
9967
10051
  {
9968
10052
  "kind": "field",
9969
- "name": "allowItemsToRemainOpen",
10053
+ "name": "dismissed",
9970
10054
  "type": {
9971
10055
  "text": "boolean"
9972
10056
  },
9973
- "privacy": "private",
9974
- "default": "false"
10057
+ "privacy": "protected",
10058
+ "default": "false",
10059
+ "inheritedFrom": {
10060
+ "name": "NotificationMixin",
10061
+ "module": "src/common/mixins/NotificationMixin.ts"
10062
+ }
10063
+ },
10064
+ {
10065
+ "kind": "method",
10066
+ "name": "dismiss",
10067
+ "description": "Programmatically dismiss the notification.\nThe returned promise resolves when notification's exit animation is complete.",
10068
+ "inheritedFrom": {
10069
+ "name": "NotificationMixin",
10070
+ "module": "src/common/mixins/NotificationMixin.ts"
10071
+ }
9975
10072
  },
9976
10073
  {
9977
10074
  "kind": "field",
9978
- "name": "handleActivate",
9979
- "privacy": "private"
10075
+ "name": "_warningLogged",
10076
+ "type": {
10077
+ "text": "boolean"
10078
+ },
10079
+ "privacy": "private",
10080
+ "static": true,
10081
+ "default": "false",
10082
+ "inheritedFrom": {
10083
+ "name": "DraftComponentMixin",
10084
+ "module": "src/common/mixins/DraftComponentMixin.ts"
10085
+ }
10086
+ }
10087
+ ],
10088
+ "events": [
10089
+ {
10090
+ "name": "dismiss",
10091
+ "type": {
10092
+ "text": "NordEvent"
10093
+ },
10094
+ "description": "Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
10095
+ "inheritedFrom": {
10096
+ "name": "NotificationMixin",
10097
+ "module": "src/common/mixins/NotificationMixin.ts"
10098
+ }
10099
+ }
10100
+ ],
10101
+ "mixins": [
10102
+ {
10103
+ "name": "NotificationMixin",
10104
+ "module": "/src/common/mixins/NotificationMixin.js"
10105
+ },
10106
+ {
10107
+ "name": "DraftComponentMixin",
10108
+ "module": "/src/common/mixins/DraftComponentMixin.js"
9980
10109
  }
9981
10110
  ],
9982
10111
  "superclass": {
9983
10112
  "name": "LitElement",
9984
10113
  "package": "lit"
9985
10114
  },
9986
- "localization": [],
9987
- "status": "ready",
9988
- "category": "navigation",
9989
- "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 primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\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 place a `<nav>` element inside the navigation component, as it already contains one internally.\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",
10115
+ "localization": [
10116
+ {
10117
+ "name": "dismissLabel",
10118
+ "description": "Accessible label for the dismiss button."
10119
+ }
10120
+ ],
10121
+ "status": "draft",
10122
+ "category": "feedback",
10123
+ "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 describe the purpose of the notification.\n- Use for important updates that require user action/attention.\n- Provide a single call to action within the notification.\n- Use in combination with [Notification group](../notification-group/) so that notifications get styled and positioned correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for transient or unimportant messages. Consider using a [Toast](/components/toast) instead.\n- Don't remove a notification until a user has explicitly dismissed, or acted on the notification.\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\nNotification content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the notification content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification 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\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAction link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing action link 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\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Start Consultation</div>\n\nAvoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
9990
10124
  "examples": [],
9991
10125
  "dependencies": [
9992
- "nav-item"
10126
+ "stack",
10127
+ "icon"
9993
10128
  ],
9994
- "tagName": "nord-navigation",
10129
+ "tagName": "nord-notification",
9995
10130
  "customElement": true
9996
10131
  }
9997
10132
  ],
@@ -10000,16 +10135,40 @@
10000
10135
  "kind": "js",
10001
10136
  "name": "default",
10002
10137
  "declaration": {
10003
- "name": "Navigation",
10004
- "module": "src/navigation/Navigation.ts"
10138
+ "name": "Notification",
10139
+ "module": "src/notification/Notification.ts"
10005
10140
  }
10006
10141
  },
10007
10142
  {
10008
10143
  "kind": "custom-element-definition",
10009
- "name": "nord-navigation",
10144
+ "name": "nord-notification",
10010
10145
  "declaration": {
10011
- "name": "Navigation",
10012
- "module": "src/navigation/Navigation.ts"
10146
+ "name": "Notification",
10147
+ "module": "src/notification/Notification.ts"
10148
+ }
10149
+ }
10150
+ ]
10151
+ },
10152
+ {
10153
+ "kind": "javascript-module",
10154
+ "path": "src/notification/localization.ts",
10155
+ "declarations": [
10156
+ {
10157
+ "kind": "variable",
10158
+ "name": "localization",
10159
+ "type": {
10160
+ "text": "object"
10161
+ },
10162
+ "default": "{\n dismissLabel: \"Dismiss notification\",\n}"
10163
+ }
10164
+ ],
10165
+ "exports": [
10166
+ {
10167
+ "kind": "js",
10168
+ "name": "default",
10169
+ "declaration": {
10170
+ "name": "localization",
10171
+ "module": "src/notification/localization.ts"
10013
10172
  }
10014
10173
  }
10015
10174
  ]
@@ -10400,145 +10559,10 @@
10400
10559
  "localization": [],
10401
10560
  "status": "ready",
10402
10561
  "category": "overlay",
10403
- "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",
10404
- "examples": [],
10405
- "dependencies": [],
10406
- "tagName": "nord-popout",
10407
- "customElement": true
10408
- }
10409
- ],
10410
- "exports": [
10411
- {
10412
- "kind": "js",
10413
- "name": "default",
10414
- "declaration": {
10415
- "name": "Popout",
10416
- "module": "src/popout/Popout.ts"
10417
- }
10418
- },
10419
- {
10420
- "kind": "custom-element-definition",
10421
- "name": "nord-popout",
10422
- "declaration": {
10423
- "name": "Popout",
10424
- "module": "src/popout/Popout.ts"
10425
- }
10426
- }
10427
- ]
10428
- },
10429
- {
10430
- "kind": "javascript-module",
10431
- "path": "src/notification/Notification.ts",
10432
- "declarations": [
10433
- {
10434
- "kind": "class",
10435
- "description": "Notifications provide important information that requires action or acknowledgement.\nA notification is displayed until the user dismisses it.",
10436
- "name": "Notification",
10437
- "slots": [
10438
- {
10439
- "description": "Default slot used for the notification text/message.",
10440
- "name": ""
10441
- },
10442
- {
10443
- "description": "Slot used for the notification icon.",
10444
- "name": "icon"
10445
- }
10446
- ],
10447
- "members": [
10448
- {
10449
- "kind": "field",
10450
- "name": "localize",
10451
- "privacy": "private",
10452
- "default": "new LocalizeController<\"nord-notification\">(this)"
10453
- },
10454
- {
10455
- "kind": "field",
10456
- "name": "notificationRef",
10457
- "privacy": "protected",
10458
- "inheritedFrom": {
10459
- "name": "NotificationMixin",
10460
- "module": "src/common/mixins/NotificationMixin.ts"
10461
- }
10462
- },
10463
- {
10464
- "kind": "field",
10465
- "name": "dismissed",
10466
- "type": {
10467
- "text": "boolean"
10468
- },
10469
- "privacy": "protected",
10470
- "default": "false",
10471
- "inheritedFrom": {
10472
- "name": "NotificationMixin",
10473
- "module": "src/common/mixins/NotificationMixin.ts"
10474
- }
10475
- },
10476
- {
10477
- "kind": "method",
10478
- "name": "dismiss",
10479
- "description": "Programmatically dismiss the notification.\nThe returned promise resolves when notification's exit animation is complete.",
10480
- "inheritedFrom": {
10481
- "name": "NotificationMixin",
10482
- "module": "src/common/mixins/NotificationMixin.ts"
10483
- }
10484
- },
10485
- {
10486
- "kind": "field",
10487
- "name": "_warningLogged",
10488
- "type": {
10489
- "text": "boolean"
10490
- },
10491
- "privacy": "private",
10492
- "static": true,
10493
- "default": "false",
10494
- "inheritedFrom": {
10495
- "name": "DraftComponentMixin",
10496
- "module": "src/common/mixins/DraftComponentMixin.ts"
10497
- }
10498
- }
10499
- ],
10500
- "events": [
10501
- {
10502
- "name": "dismiss",
10503
- "type": {
10504
- "text": "NordEvent"
10505
- },
10506
- "description": "Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
10507
- "inheritedFrom": {
10508
- "name": "NotificationMixin",
10509
- "module": "src/common/mixins/NotificationMixin.ts"
10510
- }
10511
- }
10512
- ],
10513
- "mixins": [
10514
- {
10515
- "name": "NotificationMixin",
10516
- "module": "/src/common/mixins/NotificationMixin.js"
10517
- },
10518
- {
10519
- "name": "DraftComponentMixin",
10520
- "module": "/src/common/mixins/DraftComponentMixin.js"
10521
- }
10522
- ],
10523
- "superclass": {
10524
- "name": "LitElement",
10525
- "package": "lit"
10526
- },
10527
- "localization": [
10528
- {
10529
- "name": "dismissLabel",
10530
- "description": "Accessible label for the dismiss button."
10531
- }
10532
- ],
10533
- "status": "draft",
10534
- "category": "feedback",
10535
- "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 describe the purpose of the notification.\n- Use for important updates that require user action/attention.\n- Provide a single call to action within the notification.\n- Use in combination with [Notification group](../notification-group/) so that notifications get styled and positioned correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for transient or unimportant messages. Consider using a [Toast](/components/toast) instead.\n- Don't remove a notification until a user has explicitly dismissed, or acted on the notification.\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\nNotification content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the notification content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification 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\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAction link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing action link 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\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Start Consultation</div>\n\nAvoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
10562
+ "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",
10536
10563
  "examples": [],
10537
- "dependencies": [
10538
- "stack",
10539
- "icon"
10540
- ],
10541
- "tagName": "nord-notification",
10564
+ "dependencies": [],
10565
+ "tagName": "nord-popout",
10542
10566
  "customElement": true
10543
10567
  }
10544
10568
  ],
@@ -10547,40 +10571,16 @@
10547
10571
  "kind": "js",
10548
10572
  "name": "default",
10549
10573
  "declaration": {
10550
- "name": "Notification",
10551
- "module": "src/notification/Notification.ts"
10574
+ "name": "Popout",
10575
+ "module": "src/popout/Popout.ts"
10552
10576
  }
10553
10577
  },
10554
10578
  {
10555
10579
  "kind": "custom-element-definition",
10556
- "name": "nord-notification",
10557
- "declaration": {
10558
- "name": "Notification",
10559
- "module": "src/notification/Notification.ts"
10560
- }
10561
- }
10562
- ]
10563
- },
10564
- {
10565
- "kind": "javascript-module",
10566
- "path": "src/notification/localization.ts",
10567
- "declarations": [
10568
- {
10569
- "kind": "variable",
10570
- "name": "localization",
10571
- "type": {
10572
- "text": "object"
10573
- },
10574
- "default": "{\n dismissLabel: \"Dismiss notification\",\n}"
10575
- }
10576
- ],
10577
- "exports": [
10578
- {
10579
- "kind": "js",
10580
- "name": "default",
10580
+ "name": "nord-popout",
10581
10581
  "declaration": {
10582
- "name": "localization",
10583
- "module": "src/notification/localization.ts"
10582
+ "name": "Popout",
10583
+ "module": "src/popout/Popout.ts"
10584
10584
  }
10585
10585
  }
10586
10586
  ]
@@ -10946,34 +10946,12 @@
10946
10946
  },
10947
10947
  {
10948
10948
  "kind": "javascript-module",
10949
- "path": "src/range/Range.ts",
10949
+ "path": "src/radio/Radio.ts",
10950
10950
  "declarations": [
10951
10951
  {
10952
10952
  "kind": "class",
10953
- "description": "Range input lets user specify a numeric value using a slider which\nmust be no less than a given value, and no more than another given value.",
10954
- "name": "Range",
10955
- "cssProperties": [
10956
- {
10957
- "description": "Controls the size of the thumb.",
10958
- "name": "--n-range-thumb-size",
10959
- "default": "20px"
10960
- },
10961
- {
10962
- "description": "Controls the color of the portion of the track that represents the current value.",
10963
- "name": "--n-range-track-color-active",
10964
- "default": "var(--n-color-accent)"
10965
- },
10966
- {
10967
- "description": "Controls the color of the portion of the track that represents the remaining value.",
10968
- "name": "--n-range-track-color-inactive",
10969
- "default": "var(--n-color-border-strong)"
10970
- },
10971
- {
10972
- "description": "Controls the height of the track.",
10973
- "name": "--n-range-track-size",
10974
- "default": "3px"
10975
- }
10976
- ],
10953
+ "description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
10954
+ "name": "Radio",
10977
10955
  "slots": [
10978
10956
  {
10979
10957
  "description": "Use when a label requires more than plain text.",
@@ -10991,63 +10969,38 @@
10991
10969
  "members": [
10992
10970
  {
10993
10971
  "kind": "field",
10994
- "name": "direction",
10995
- "privacy": "private",
10996
- "default": "new DirectionController(this)"
10997
- },
10998
- {
10999
- "kind": "field",
11000
- "name": "min",
11001
- "type": {
11002
- "text": "number"
11003
- },
11004
- "default": "0",
11005
- "description": "Minimum value for the range slider.",
11006
- "attribute": "min"
11007
- },
11008
- {
11009
- "kind": "field",
11010
- "name": "max",
10972
+ "name": "inputId",
11011
10973
  "type": {
11012
- "text": "number"
10974
+ "text": "string"
11013
10975
  },
11014
- "default": "10",
11015
- "description": "Maximum value for the range slider.",
11016
- "attribute": "max"
10976
+ "privacy": "protected",
10977
+ "default": "\"input\"",
10978
+ "inheritedFrom": {
10979
+ "name": "FormAssociatedMixin",
10980
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
10981
+ }
11017
10982
  },
11018
10983
  {
11019
10984
  "kind": "field",
11020
- "name": "step",
10985
+ "name": "hintId",
11021
10986
  "type": {
11022
- "text": "number"
10987
+ "text": "string"
11023
10988
  },
11024
- "default": "1",
11025
- "description": "Step amount for the range slider.",
11026
- "attribute": "step"
10989
+ "privacy": "protected",
10990
+ "default": "\"hint\"",
10991
+ "inheritedFrom": {
10992
+ "name": "FormAssociatedMixin",
10993
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
10994
+ }
11027
10995
  },
11028
10996
  {
11029
10997
  "kind": "field",
11030
- "name": "expand",
10998
+ "name": "errorId",
11031
10999
  "type": {
11032
- "text": "boolean"
11000
+ "text": "string"
11033
11001
  },
11034
- "default": "false",
11035
- "description": "Controls whether the input expands to fill the width of its container.",
11036
- "attribute": "expand",
11037
- "reflects": true
11038
- },
11039
- {
11040
- "kind": "method",
11041
- "name": "handleInput",
11042
11002
  "privacy": "protected",
11043
- "parameters": [
11044
- {
11045
- "name": "e",
11046
- "type": {
11047
- "text": "Event"
11048
- }
11049
- }
11050
- ],
11003
+ "default": "\"error\"",
11051
11004
  "inheritedFrom": {
11052
11005
  "name": "FormAssociatedMixin",
11053
11006
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11055,9 +11008,10 @@
11055
11008
  },
11056
11009
  {
11057
11010
  "kind": "field",
11058
- "name": "labelSlot",
11011
+ "name": "hintSlot",
11059
11012
  "privacy": "protected",
11060
- "default": "new SlotController(this, \"label\")",
11013
+ "default": "new LightSlotController(this, {\n slotName: \"hint\",\n render: () => (this.hint ? html`<div slot=\"hint-internal\" id=${this.hintId}>${this.hint}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
11014
+ "description": "For accessibility reasons, we render some parts of the component to the light DOM.",
11061
11015
  "inheritedFrom": {
11062
11016
  "name": "FormAssociatedMixin",
11063
11017
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11065,9 +11019,9 @@
11065
11019
  },
11066
11020
  {
11067
11021
  "kind": "field",
11068
- "name": "errorSlot",
11022
+ "name": "labelSlot",
11069
11023
  "privacy": "protected",
11070
- "default": "new SlotController(this, \"error\")",
11024
+ "default": "new LightSlotController(this, {\n slotName: \"label\",\n render: () => (this.label ? html`<label slot=\"label-internal\" for=${this.inputId}>${this.label}</label>` : nothing),\n syncLightDom: element => {\n if (!isLabel(element)) {\n // eslint-disable-next-line no-console\n console.warn(`NORD: Only <label> elements should be placed in radio's \"label\" slot`)\n } else {\n element.htmlFor = this.inputId\n }\n },\n })",
11071
11025
  "inheritedFrom": {
11072
11026
  "name": "FormAssociatedMixin",
11073
11027
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11075,9 +11029,9 @@
11075
11029
  },
11076
11030
  {
11077
11031
  "kind": "field",
11078
- "name": "hintSlot",
11032
+ "name": "errorSlot",
11079
11033
  "privacy": "protected",
11080
- "default": "new SlotController(this, \"hint\")",
11034
+ "default": "new LightSlotController(this, {\n slotName: \"error\",\n render: () => (this.error ? html`<div slot=\"error-internal\" id=${this.errorId}>${this.error}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
11081
11035
  "inheritedFrom": {
11082
11036
  "name": "FormAssociatedMixin",
11083
11037
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11085,13 +11039,9 @@
11085
11039
  },
11086
11040
  {
11087
11041
  "kind": "field",
11088
- "name": "formData",
11042
+ "name": "inputSlot",
11089
11043
  "privacy": "protected",
11090
- "default": "new FormDataController(this, { value: () => this.formValue })",
11091
- "inheritedFrom": {
11092
- "name": "FormAssociatedMixin",
11093
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11094
- }
11044
+ "default": "new LightDomController(this, {\n render: () =>\n html`\n <input\n slot=\"input\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n ${ref(this.focusableRef)}\n class=\"n-input\"\n id=${this.inputId}\n type=\"radio\"\n name=${cond(this.name)}\n .value=${cond(this.value)}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${cond(this.getDescribedBy())}\n aria-invalid=${cond(this.getInvalid())}\n form=${cond(this._formId)}\n />\n `,\n })"
11095
11045
  },
11096
11046
  {
11097
11047
  "kind": "field",
@@ -11105,25 +11055,50 @@
11105
11055
  },
11106
11056
  {
11107
11057
  "kind": "field",
11108
- "name": "inputId",
11058
+ "name": "checked",
11109
11059
  "type": {
11110
- "text": "string"
11060
+ "text": "boolean"
11111
11061
  },
11062
+ "default": "false",
11063
+ "description": "Controls whether the checkbox is checked or not.",
11064
+ "attribute": "checked",
11065
+ "reflects": true
11066
+ },
11067
+ {
11068
+ "kind": "method",
11069
+ "name": "handleCheckedChange",
11112
11070
  "privacy": "protected",
11113
- "default": "\"input\"",
11114
- "inheritedFrom": {
11115
- "name": "FormAssociatedMixin",
11116
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11117
- }
11071
+ "parameters": [
11072
+ {
11073
+ "name": "previousChecked",
11074
+ "type": {
11075
+ "text": "boolean"
11076
+ }
11077
+ }
11078
+ ]
11118
11079
  },
11119
11080
  {
11120
- "kind": "field",
11121
- "name": "errorId",
11122
- "type": {
11123
- "text": "string"
11124
- },
11081
+ "kind": "method",
11082
+ "name": "uncheckSiblings",
11083
+ "privacy": "private"
11084
+ },
11085
+ {
11086
+ "kind": "method",
11087
+ "name": "handleChange",
11125
11088
  "privacy": "protected",
11126
- "default": "\"error\"",
11089
+ "parameters": [
11090
+ {
11091
+ "name": "e",
11092
+ "type": {
11093
+ "text": "Event"
11094
+ }
11095
+ }
11096
+ ],
11097
+ "return": {
11098
+ "type": {
11099
+ "text": "void"
11100
+ }
11101
+ },
11127
11102
  "inheritedFrom": {
11128
11103
  "name": "FormAssociatedMixin",
11129
11104
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11131,12 +11106,19 @@
11131
11106
  },
11132
11107
  {
11133
11108
  "kind": "field",
11134
- "name": "hintId",
11135
- "type": {
11136
- "text": "string"
11137
- },
11109
+ "name": "handleBlur",
11110
+ "privacy": "private"
11111
+ },
11112
+ {
11113
+ "kind": "field",
11114
+ "name": "handleFocus",
11115
+ "privacy": "private"
11116
+ },
11117
+ {
11118
+ "kind": "field",
11119
+ "name": "formData",
11138
11120
  "privacy": "protected",
11139
- "default": "\"hint\"",
11121
+ "default": "new FormDataController(this, { value: () => this.formValue })",
11140
11122
  "inheritedFrom": {
11141
11123
  "name": "FormAssociatedMixin",
11142
11124
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11239,7 +11221,7 @@
11239
11221
  },
11240
11222
  {
11241
11223
  "kind": "method",
11242
- "name": "handleChange",
11224
+ "name": "handleInput",
11243
11225
  "privacy": "protected",
11244
11226
  "parameters": [
11245
11227
  {
@@ -11296,56 +11278,27 @@
11296
11278
  "privacy": "protected",
11297
11279
  "inheritedFrom": {
11298
11280
  "name": "FormAssociatedMixin",
11299
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11300
- }
11301
- },
11302
- {
11303
- "kind": "field",
11304
- "name": "hasHint",
11305
- "privacy": "protected",
11306
- "readonly": true,
11307
- "inheritedFrom": {
11308
- "name": "FormAssociatedMixin",
11309
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11310
- }
11311
- },
11312
- {
11313
- "kind": "field",
11314
- "name": "hasError",
11315
- "privacy": "protected",
11316
- "readonly": true,
11317
- "inheritedFrom": {
11318
- "name": "FormAssociatedMixin",
11319
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11320
- }
11321
- },
11322
- {
11323
- "kind": "field",
11324
- "name": "autocomplete",
11325
- "type": {
11326
- "text": "AutocompleteAttribute"
11327
- },
11328
- "default": "\"off\"",
11329
- "description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
11330
- "attribute": "autocomplete",
11281
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11282
+ }
11283
+ },
11284
+ {
11285
+ "kind": "field",
11286
+ "name": "hasHint",
11287
+ "privacy": "protected",
11288
+ "readonly": true,
11331
11289
  "inheritedFrom": {
11332
- "name": "AutocompleteMixin",
11333
- "module": "src/common/mixins/AutocompleteMixin.ts"
11290
+ "name": "FormAssociatedMixin",
11291
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11334
11292
  }
11335
11293
  },
11336
11294
  {
11337
11295
  "kind": "field",
11338
- "name": "readonly",
11339
- "type": {
11340
- "text": "boolean"
11341
- },
11342
- "default": "false",
11343
- "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
11344
- "attribute": "readonly",
11345
- "reflects": true,
11296
+ "name": "hasError",
11297
+ "privacy": "protected",
11298
+ "readonly": true,
11346
11299
  "inheritedFrom": {
11347
- "name": "ReadonlyMixin",
11348
- "module": "src/common/mixins/ReadonlyMixin.ts"
11300
+ "name": "FormAssociatedMixin",
11301
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11349
11302
  }
11350
11303
  },
11351
11304
  {
@@ -11475,66 +11428,15 @@
11475
11428
  }
11476
11429
  }
11477
11430
  ],
11478
- "events": [
11479
- {
11480
- "name": "input",
11481
- "type": {
11482
- "text": "NordEvent"
11483
- },
11484
- "description": "Fired as the user types into the input.",
11485
- "inheritedFrom": {
11486
- "name": "FormAssociatedMixin",
11487
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11488
- }
11489
- },
11490
- {
11491
- "name": "change",
11492
- "type": {
11493
- "text": "NordEvent"
11494
- },
11495
- "description": "Fired whenever the input's value is changed via user interaction.",
11496
- "inheritedFrom": {
11497
- "name": "FormAssociatedMixin",
11498
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11499
- }
11500
- }
11501
- ],
11502
11431
  "attributes": [
11503
11432
  {
11504
- "name": "min",
11505
- "type": {
11506
- "text": "number"
11507
- },
11508
- "default": "0",
11509
- "description": "Minimum value for the range slider.",
11510
- "fieldName": "min"
11511
- },
11512
- {
11513
- "name": "max",
11514
- "type": {
11515
- "text": "number"
11516
- },
11517
- "default": "10",
11518
- "description": "Maximum value for the range slider.",
11519
- "fieldName": "max"
11520
- },
11521
- {
11522
- "name": "step",
11523
- "type": {
11524
- "text": "number"
11525
- },
11526
- "default": "1",
11527
- "description": "Step amount for the range slider.",
11528
- "fieldName": "step"
11529
- },
11530
- {
11531
- "name": "expand",
11433
+ "name": "checked",
11532
11434
  "type": {
11533
11435
  "text": "boolean"
11534
11436
  },
11535
11437
  "default": "false",
11536
- "description": "Controls whether the input expands to fill the width of its container.",
11537
- "fieldName": "expand"
11438
+ "description": "Controls whether the checkbox is checked or not.",
11439
+ "fieldName": "checked"
11538
11440
  },
11539
11441
  {
11540
11442
  "name": "label",
@@ -11624,32 +11526,6 @@
11624
11526
  "module": "src/common/mixins/FormAssociatedMixin.ts"
11625
11527
  }
11626
11528
  },
11627
- {
11628
- "name": "autocomplete",
11629
- "type": {
11630
- "text": "AutocompleteAttribute"
11631
- },
11632
- "default": "\"off\"",
11633
- "description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
11634
- "fieldName": "autocomplete",
11635
- "inheritedFrom": {
11636
- "name": "AutocompleteMixin",
11637
- "module": "src/common/mixins/AutocompleteMixin.ts"
11638
- }
11639
- },
11640
- {
11641
- "name": "readonly",
11642
- "type": {
11643
- "text": "boolean"
11644
- },
11645
- "default": "false",
11646
- "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
11647
- "fieldName": "readonly",
11648
- "inheritedFrom": {
11649
- "name": "ReadonlyMixin",
11650
- "module": "src/common/mixins/ReadonlyMixin.ts"
11651
- }
11652
- },
11653
11529
  {
11654
11530
  "name": "disabled",
11655
11531
  "type": {
@@ -11706,14 +11582,6 @@
11706
11582
  "name": "FormAssociatedMixin",
11707
11583
  "module": "/src/common/mixins/FormAssociatedMixin.js"
11708
11584
  },
11709
- {
11710
- "name": "AutocompleteMixin",
11711
- "module": "/src/common/mixins/AutocompleteMixin.js"
11712
- },
11713
- {
11714
- "name": "ReadonlyMixin",
11715
- "module": "/src/common/mixins/ReadonlyMixin.js"
11716
- },
11717
11585
  {
11718
11586
  "name": "InputMixin",
11719
11587
  "module": "/src/common/mixins/InputMixin.js"
@@ -11728,13 +11596,37 @@
11728
11596
  "package": "lit"
11729
11597
  },
11730
11598
  "localization": [],
11731
- "status": "new",
11599
+ "status": "ready",
11732
11600
  "category": "form",
11733
- "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 let user specify a numeric value using a slider.\n- Use when the accuracy of the numeric value entered isn’t important.\n- Always use with a label, even if that label is hidden.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the accuracy of the numeric value entered is important.\n- For entering arbitrary numeric values. Use [input component](/components/input/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRange labels act as a title for the range input. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Lightness percentage</div>\n<div class=\"n-usage n-usage-dont\">What is the lightness percentage?</div>\n\nWhen writing range 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\">Item price</div>\n<div class=\"n-usage n-usage-dont\">Item Price</div>\n\nDo not use colons in range label:\n\n<div class=\"n-usage n-usage-do\">Color depth</div>\n<div class=\"n-usage n-usage-dont\">Color depth:</div>\n",
11601
+ "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 a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\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 radio button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n",
11734
11602
  "examples": [],
11735
11603
  "dependencies": [],
11736
- "tagName": "nord-range",
11737
- "customElement": true
11604
+ "tagName": "nord-radio",
11605
+ "customElement": true,
11606
+ "events": [
11607
+ {
11608
+ "name": "input",
11609
+ "type": {
11610
+ "text": "NordEvent"
11611
+ },
11612
+ "description": "Fired as the user types into the input.",
11613
+ "inheritedFrom": {
11614
+ "name": "FormAssociatedMixin",
11615
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11616
+ }
11617
+ },
11618
+ {
11619
+ "name": "change",
11620
+ "type": {
11621
+ "text": "NordEvent"
11622
+ },
11623
+ "description": "Fired whenever the input's value is changed via user interaction.",
11624
+ "inheritedFrom": {
11625
+ "name": "FormAssociatedMixin",
11626
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11627
+ }
11628
+ }
11629
+ ]
11738
11630
  }
11739
11631
  ],
11740
11632
  "exports": [
@@ -11742,28 +11634,50 @@
11742
11634
  "kind": "js",
11743
11635
  "name": "default",
11744
11636
  "declaration": {
11745
- "name": "Range",
11746
- "module": "src/range/Range.ts"
11637
+ "name": "Radio",
11638
+ "module": "src/radio/Radio.ts"
11747
11639
  }
11748
11640
  },
11749
11641
  {
11750
11642
  "kind": "custom-element-definition",
11751
- "name": "nord-range",
11643
+ "name": "nord-radio",
11752
11644
  "declaration": {
11753
- "name": "Range",
11754
- "module": "src/range/Range.ts"
11645
+ "name": "Radio",
11646
+ "module": "src/radio/Radio.ts"
11755
11647
  }
11756
11648
  }
11757
11649
  ]
11758
11650
  },
11759
11651
  {
11760
11652
  "kind": "javascript-module",
11761
- "path": "src/radio/Radio.ts",
11653
+ "path": "src/range/Range.ts",
11762
11654
  "declarations": [
11763
11655
  {
11764
11656
  "kind": "class",
11765
- "description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
11766
- "name": "Radio",
11657
+ "description": "Range input lets user specify a numeric value using a slider which\nmust be no less than a given value, and no more than another given value.",
11658
+ "name": "Range",
11659
+ "cssProperties": [
11660
+ {
11661
+ "description": "Controls the size of the thumb.",
11662
+ "name": "--n-range-thumb-size",
11663
+ "default": "20px"
11664
+ },
11665
+ {
11666
+ "description": "Controls the color of the portion of the track that represents the current value.",
11667
+ "name": "--n-range-track-color-active",
11668
+ "default": "var(--n-color-accent)"
11669
+ },
11670
+ {
11671
+ "description": "Controls the color of the portion of the track that represents the remaining value.",
11672
+ "name": "--n-range-track-color-inactive",
11673
+ "default": "var(--n-color-border-strong)"
11674
+ },
11675
+ {
11676
+ "description": "Controls the height of the track.",
11677
+ "name": "--n-range-track-size",
11678
+ "default": "3px"
11679
+ }
11680
+ ],
11767
11681
  "slots": [
11768
11682
  {
11769
11683
  "description": "Use when a label requires more than plain text.",
@@ -11781,38 +11695,63 @@
11781
11695
  "members": [
11782
11696
  {
11783
11697
  "kind": "field",
11784
- "name": "inputId",
11698
+ "name": "direction",
11699
+ "privacy": "private",
11700
+ "default": "new DirectionController(this)"
11701
+ },
11702
+ {
11703
+ "kind": "field",
11704
+ "name": "min",
11785
11705
  "type": {
11786
- "text": "string"
11706
+ "text": "number"
11787
11707
  },
11788
- "privacy": "protected",
11789
- "default": "\"input\"",
11790
- "inheritedFrom": {
11791
- "name": "FormAssociatedMixin",
11792
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11793
- }
11708
+ "default": "0",
11709
+ "description": "Minimum value for the range slider.",
11710
+ "attribute": "min"
11794
11711
  },
11795
11712
  {
11796
11713
  "kind": "field",
11797
- "name": "hintId",
11714
+ "name": "max",
11798
11715
  "type": {
11799
- "text": "string"
11716
+ "text": "number"
11800
11717
  },
11801
- "privacy": "protected",
11802
- "default": "\"hint\"",
11803
- "inheritedFrom": {
11804
- "name": "FormAssociatedMixin",
11805
- "module": "src/common/mixins/FormAssociatedMixin.ts"
11806
- }
11718
+ "default": "10",
11719
+ "description": "Maximum value for the range slider.",
11720
+ "attribute": "max"
11807
11721
  },
11808
11722
  {
11809
11723
  "kind": "field",
11810
- "name": "errorId",
11724
+ "name": "step",
11811
11725
  "type": {
11812
- "text": "string"
11726
+ "text": "number"
11813
11727
  },
11728
+ "default": "1",
11729
+ "description": "Step amount for the range slider.",
11730
+ "attribute": "step"
11731
+ },
11732
+ {
11733
+ "kind": "field",
11734
+ "name": "expand",
11735
+ "type": {
11736
+ "text": "boolean"
11737
+ },
11738
+ "default": "false",
11739
+ "description": "Controls whether the input expands to fill the width of its container.",
11740
+ "attribute": "expand",
11741
+ "reflects": true
11742
+ },
11743
+ {
11744
+ "kind": "method",
11745
+ "name": "handleInput",
11814
11746
  "privacy": "protected",
11815
- "default": "\"error\"",
11747
+ "parameters": [
11748
+ {
11749
+ "name": "e",
11750
+ "type": {
11751
+ "text": "Event"
11752
+ }
11753
+ }
11754
+ ],
11816
11755
  "inheritedFrom": {
11817
11756
  "name": "FormAssociatedMixin",
11818
11757
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11820,10 +11759,9 @@
11820
11759
  },
11821
11760
  {
11822
11761
  "kind": "field",
11823
- "name": "hintSlot",
11762
+ "name": "labelSlot",
11824
11763
  "privacy": "protected",
11825
- "default": "new LightSlotController(this, {\n slotName: \"hint\",\n render: () => (this.hint ? html`<div slot=\"hint-internal\" id=${this.hintId}>${this.hint}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
11826
- "description": "For accessibility reasons, we render some parts of the component to the light DOM.",
11764
+ "default": "new SlotController(this, \"label\")",
11827
11765
  "inheritedFrom": {
11828
11766
  "name": "FormAssociatedMixin",
11829
11767
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11831,9 +11769,9 @@
11831
11769
  },
11832
11770
  {
11833
11771
  "kind": "field",
11834
- "name": "labelSlot",
11772
+ "name": "errorSlot",
11835
11773
  "privacy": "protected",
11836
- "default": "new LightSlotController(this, {\n slotName: \"label\",\n render: () => (this.label ? html`<label slot=\"label-internal\" for=${this.inputId}>${this.label}</label>` : nothing),\n syncLightDom: element => {\n if (!isLabel(element)) {\n // eslint-disable-next-line no-console\n console.warn(`NORD: Only <label> elements should be placed in radio's \"label\" slot`)\n } else {\n element.htmlFor = this.inputId\n }\n },\n })",
11774
+ "default": "new SlotController(this, \"error\")",
11837
11775
  "inheritedFrom": {
11838
11776
  "name": "FormAssociatedMixin",
11839
11777
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11841,9 +11779,9 @@
11841
11779
  },
11842
11780
  {
11843
11781
  "kind": "field",
11844
- "name": "errorSlot",
11782
+ "name": "hintSlot",
11845
11783
  "privacy": "protected",
11846
- "default": "new LightSlotController(this, {\n slotName: \"error\",\n render: () => (this.error ? html`<div slot=\"error-internal\" id=${this.errorId}>${this.error}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
11784
+ "default": "new SlotController(this, \"hint\")",
11847
11785
  "inheritedFrom": {
11848
11786
  "name": "FormAssociatedMixin",
11849
11787
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11851,9 +11789,13 @@
11851
11789
  },
11852
11790
  {
11853
11791
  "kind": "field",
11854
- "name": "inputSlot",
11792
+ "name": "formData",
11855
11793
  "privacy": "protected",
11856
- "default": "new LightDomController(this, {\n render: () =>\n html`\n <input\n slot=\"input\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n ${ref(this.focusableRef)}\n class=\"n-input\"\n id=${this.inputId}\n type=\"radio\"\n name=${cond(this.name)}\n .value=${cond(this.value)}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${cond(this.getDescribedBy())}\n aria-invalid=${cond(this.getInvalid())}\n form=${cond(this._formId)}\n />\n `,\n })"
11794
+ "default": "new FormDataController(this, { value: () => this.formValue })",
11795
+ "inheritedFrom": {
11796
+ "name": "FormAssociatedMixin",
11797
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11798
+ }
11857
11799
  },
11858
11800
  {
11859
11801
  "kind": "field",
@@ -11867,50 +11809,12 @@
11867
11809
  },
11868
11810
  {
11869
11811
  "kind": "field",
11870
- "name": "checked",
11812
+ "name": "inputId",
11871
11813
  "type": {
11872
- "text": "boolean"
11814
+ "text": "string"
11873
11815
  },
11874
- "default": "false",
11875
- "description": "Controls whether the checkbox is checked or not.",
11876
- "attribute": "checked",
11877
- "reflects": true
11878
- },
11879
- {
11880
- "kind": "method",
11881
- "name": "handleCheckedChange",
11882
- "privacy": "protected",
11883
- "parameters": [
11884
- {
11885
- "name": "previousChecked",
11886
- "type": {
11887
- "text": "boolean"
11888
- }
11889
- }
11890
- ]
11891
- },
11892
- {
11893
- "kind": "method",
11894
- "name": "uncheckSiblings",
11895
- "privacy": "private"
11896
- },
11897
- {
11898
- "kind": "method",
11899
- "name": "handleChange",
11900
11816
  "privacy": "protected",
11901
- "parameters": [
11902
- {
11903
- "name": "e",
11904
- "type": {
11905
- "text": "Event"
11906
- }
11907
- }
11908
- ],
11909
- "return": {
11910
- "type": {
11911
- "text": "void"
11912
- }
11913
- },
11817
+ "default": "\"input\"",
11914
11818
  "inheritedFrom": {
11915
11819
  "name": "FormAssociatedMixin",
11916
11820
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -11918,19 +11822,25 @@
11918
11822
  },
11919
11823
  {
11920
11824
  "kind": "field",
11921
- "name": "handleBlur",
11922
- "privacy": "private"
11923
- },
11924
- {
11925
- "kind": "field",
11926
- "name": "handleFocus",
11927
- "privacy": "private"
11825
+ "name": "errorId",
11826
+ "type": {
11827
+ "text": "string"
11828
+ },
11829
+ "privacy": "protected",
11830
+ "default": "\"error\"",
11831
+ "inheritedFrom": {
11832
+ "name": "FormAssociatedMixin",
11833
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
11834
+ }
11928
11835
  },
11929
11836
  {
11930
11837
  "kind": "field",
11931
- "name": "formData",
11838
+ "name": "hintId",
11839
+ "type": {
11840
+ "text": "string"
11841
+ },
11932
11842
  "privacy": "protected",
11933
- "default": "new FormDataController(this, { value: () => this.formValue })",
11843
+ "default": "\"hint\"",
11934
11844
  "inheritedFrom": {
11935
11845
  "name": "FormAssociatedMixin",
11936
11846
  "module": "src/common/mixins/FormAssociatedMixin.ts"
@@ -12033,7 +11943,7 @@
12033
11943
  },
12034
11944
  {
12035
11945
  "kind": "method",
12036
- "name": "handleInput",
11946
+ "name": "handleChange",
12037
11947
  "privacy": "protected",
12038
11948
  "parameters": [
12039
11949
  {
@@ -12113,6 +12023,35 @@
12113
12023
  "module": "src/common/mixins/FormAssociatedMixin.ts"
12114
12024
  }
12115
12025
  },
12026
+ {
12027
+ "kind": "field",
12028
+ "name": "autocomplete",
12029
+ "type": {
12030
+ "text": "AutocompleteAttribute"
12031
+ },
12032
+ "default": "\"off\"",
12033
+ "description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
12034
+ "attribute": "autocomplete",
12035
+ "inheritedFrom": {
12036
+ "name": "AutocompleteMixin",
12037
+ "module": "src/common/mixins/AutocompleteMixin.ts"
12038
+ }
12039
+ },
12040
+ {
12041
+ "kind": "field",
12042
+ "name": "readonly",
12043
+ "type": {
12044
+ "text": "boolean"
12045
+ },
12046
+ "default": "false",
12047
+ "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
12048
+ "attribute": "readonly",
12049
+ "reflects": true,
12050
+ "inheritedFrom": {
12051
+ "name": "ReadonlyMixin",
12052
+ "module": "src/common/mixins/ReadonlyMixin.ts"
12053
+ }
12054
+ },
12116
12055
  {
12117
12056
  "kind": "field",
12118
12057
  "name": "disabled",
@@ -12240,15 +12179,66 @@
12240
12179
  }
12241
12180
  }
12242
12181
  ],
12182
+ "events": [
12183
+ {
12184
+ "name": "input",
12185
+ "type": {
12186
+ "text": "NordEvent"
12187
+ },
12188
+ "description": "Fired as the user types into the input.",
12189
+ "inheritedFrom": {
12190
+ "name": "FormAssociatedMixin",
12191
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
12192
+ }
12193
+ },
12194
+ {
12195
+ "name": "change",
12196
+ "type": {
12197
+ "text": "NordEvent"
12198
+ },
12199
+ "description": "Fired whenever the input's value is changed via user interaction.",
12200
+ "inheritedFrom": {
12201
+ "name": "FormAssociatedMixin",
12202
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
12203
+ }
12204
+ }
12205
+ ],
12243
12206
  "attributes": [
12244
12207
  {
12245
- "name": "checked",
12208
+ "name": "min",
12209
+ "type": {
12210
+ "text": "number"
12211
+ },
12212
+ "default": "0",
12213
+ "description": "Minimum value for the range slider.",
12214
+ "fieldName": "min"
12215
+ },
12216
+ {
12217
+ "name": "max",
12218
+ "type": {
12219
+ "text": "number"
12220
+ },
12221
+ "default": "10",
12222
+ "description": "Maximum value for the range slider.",
12223
+ "fieldName": "max"
12224
+ },
12225
+ {
12226
+ "name": "step",
12227
+ "type": {
12228
+ "text": "number"
12229
+ },
12230
+ "default": "1",
12231
+ "description": "Step amount for the range slider.",
12232
+ "fieldName": "step"
12233
+ },
12234
+ {
12235
+ "name": "expand",
12246
12236
  "type": {
12247
12237
  "text": "boolean"
12248
12238
  },
12249
12239
  "default": "false",
12250
- "description": "Controls whether the checkbox is checked or not.",
12251
- "fieldName": "checked"
12240
+ "description": "Controls whether the input expands to fill the width of its container.",
12241
+ "fieldName": "expand"
12252
12242
  },
12253
12243
  {
12254
12244
  "name": "label",
@@ -12338,6 +12328,32 @@
12338
12328
  "module": "src/common/mixins/FormAssociatedMixin.ts"
12339
12329
  }
12340
12330
  },
12331
+ {
12332
+ "name": "autocomplete",
12333
+ "type": {
12334
+ "text": "AutocompleteAttribute"
12335
+ },
12336
+ "default": "\"off\"",
12337
+ "description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
12338
+ "fieldName": "autocomplete",
12339
+ "inheritedFrom": {
12340
+ "name": "AutocompleteMixin",
12341
+ "module": "src/common/mixins/AutocompleteMixin.ts"
12342
+ }
12343
+ },
12344
+ {
12345
+ "name": "readonly",
12346
+ "type": {
12347
+ "text": "boolean"
12348
+ },
12349
+ "default": "false",
12350
+ "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
12351
+ "fieldName": "readonly",
12352
+ "inheritedFrom": {
12353
+ "name": "ReadonlyMixin",
12354
+ "module": "src/common/mixins/ReadonlyMixin.ts"
12355
+ }
12356
+ },
12341
12357
  {
12342
12358
  "name": "disabled",
12343
12359
  "type": {
@@ -12394,6 +12410,14 @@
12394
12410
  "name": "FormAssociatedMixin",
12395
12411
  "module": "/src/common/mixins/FormAssociatedMixin.js"
12396
12412
  },
12413
+ {
12414
+ "name": "AutocompleteMixin",
12415
+ "module": "/src/common/mixins/AutocompleteMixin.js"
12416
+ },
12417
+ {
12418
+ "name": "ReadonlyMixin",
12419
+ "module": "/src/common/mixins/ReadonlyMixin.js"
12420
+ },
12397
12421
  {
12398
12422
  "name": "InputMixin",
12399
12423
  "module": "/src/common/mixins/InputMixin.js"
@@ -12408,37 +12432,13 @@
12408
12432
  "package": "lit"
12409
12433
  },
12410
12434
  "localization": [],
12411
- "status": "ready",
12435
+ "status": "new",
12412
12436
  "category": "form",
12413
- "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 a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\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 radio button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n",
12437
+ "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 let user specify a numeric value using a slider.\n- Use when the accuracy of the numeric value entered isn’t important.\n- Always use with a label, even if that label is hidden.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the accuracy of the numeric value entered is important.\n- For entering arbitrary numeric values. Use [input component](/components/input/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRange labels act as a title for the range input. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Lightness percentage</div>\n<div class=\"n-usage n-usage-dont\">What is the lightness percentage?</div>\n\nWhen writing range 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\">Item price</div>\n<div class=\"n-usage n-usage-dont\">Item Price</div>\n\nDo not use colons in range label:\n\n<div class=\"n-usage n-usage-do\">Color depth</div>\n<div class=\"n-usage n-usage-dont\">Color depth:</div>\n",
12414
12438
  "examples": [],
12415
12439
  "dependencies": [],
12416
- "tagName": "nord-radio",
12417
- "customElement": true,
12418
- "events": [
12419
- {
12420
- "name": "input",
12421
- "type": {
12422
- "text": "NordEvent"
12423
- },
12424
- "description": "Fired as the user types into the input.",
12425
- "inheritedFrom": {
12426
- "name": "FormAssociatedMixin",
12427
- "module": "src/common/mixins/FormAssociatedMixin.ts"
12428
- }
12429
- },
12430
- {
12431
- "name": "change",
12432
- "type": {
12433
- "text": "NordEvent"
12434
- },
12435
- "description": "Fired whenever the input's value is changed via user interaction.",
12436
- "inheritedFrom": {
12437
- "name": "FormAssociatedMixin",
12438
- "module": "src/common/mixins/FormAssociatedMixin.ts"
12439
- }
12440
- }
12441
- ]
12440
+ "tagName": "nord-range",
12441
+ "customElement": true
12442
12442
  }
12443
12443
  ],
12444
12444
  "exports": [
@@ -12446,16 +12446,16 @@
12446
12446
  "kind": "js",
12447
12447
  "name": "default",
12448
12448
  "declaration": {
12449
- "name": "Radio",
12450
- "module": "src/radio/Radio.ts"
12449
+ "name": "Range",
12450
+ "module": "src/range/Range.ts"
12451
12451
  }
12452
12452
  },
12453
12453
  {
12454
12454
  "kind": "custom-element-definition",
12455
- "name": "nord-radio",
12455
+ "name": "nord-range",
12456
12456
  "declaration": {
12457
- "name": "Radio",
12458
- "module": "src/radio/Radio.ts"
12457
+ "name": "Range",
12458
+ "module": "src/range/Range.ts"
12459
12459
  }
12460
12460
  }
12461
12461
  ]
@@ -16991,10 +16991,6 @@
16991
16991
  {
16992
16992
  "kind": "method",
16993
16993
  "name": "hostUpdated"
16994
- },
16995
- {
16996
- "kind": "method",
16997
- "name": "hostDisconnected"
16998
16994
  }
16999
16995
  ]
17000
16996
  }
@@ -17044,10 +17040,6 @@
17044
17040
  "module": "src/common/controllers/SlotController.ts"
17045
17041
  }
17046
17042
  },
17047
- {
17048
- "kind": "method",
17049
- "name": "hostDisconnected"
17050
- },
17051
17043
  {
17052
17044
  "kind": "field",
17053
17045
  "name": "onChange",