@nordhealth/components 3.4.0-alpha.2 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +339 -245
- package/lib/DropdownItem-5c12978f.js +2 -0
- package/lib/DropdownItem-5c12978f.js.map +1 -0
- package/lib/DropdownItem.js +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Message.js +1 -1
- package/lib/TopBar.js +1 -1
- package/lib/TopBar.js.map +1 -1
- package/lib/bundle.js +5 -5
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/common/controllers/BroadcastChannelController.d.ts +16 -0
- package/lib/src/layout/Layout.d.ts +7 -1
- package/lib/src/top-bar/TopBar.d.ts +1 -4
- package/package.json +2 -2
- package/lib/DropdownItem-4a02675f.js +0 -2
- package/lib/DropdownItem-4a02675f.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -713,6 +713,119 @@
|
|
|
713
713
|
}
|
|
714
714
|
]
|
|
715
715
|
},
|
|
716
|
+
{
|
|
717
|
+
"kind": "javascript-module",
|
|
718
|
+
"path": "src/badge/Badge.ts",
|
|
719
|
+
"declarations": [
|
|
720
|
+
{
|
|
721
|
+
"kind": "class",
|
|
722
|
+
"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.",
|
|
723
|
+
"name": "Badge",
|
|
724
|
+
"slots": [
|
|
725
|
+
{
|
|
726
|
+
"description": "The badge content.",
|
|
727
|
+
"name": ""
|
|
728
|
+
},
|
|
729
|
+
{
|
|
730
|
+
"description": "Used to place an icon at the start of badge.",
|
|
731
|
+
"name": "icon"
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
"members": [
|
|
735
|
+
{
|
|
736
|
+
"kind": "field",
|
|
737
|
+
"name": "type",
|
|
738
|
+
"type": {
|
|
739
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
740
|
+
},
|
|
741
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
742
|
+
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
743
|
+
"attribute": "type",
|
|
744
|
+
"reflects": true
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"kind": "field",
|
|
748
|
+
"name": "variant",
|
|
749
|
+
"type": {
|
|
750
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
|
|
751
|
+
},
|
|
752
|
+
"description": "The style variant of the badge.\nDetermines the background color of the badge.",
|
|
753
|
+
"attribute": "variant",
|
|
754
|
+
"reflects": true
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"kind": "field",
|
|
758
|
+
"name": "strong",
|
|
759
|
+
"type": {
|
|
760
|
+
"text": "boolean"
|
|
761
|
+
},
|
|
762
|
+
"default": "false",
|
|
763
|
+
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
764
|
+
"attribute": "strong",
|
|
765
|
+
"reflects": true
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
"attributes": [
|
|
769
|
+
{
|
|
770
|
+
"name": "type",
|
|
771
|
+
"type": {
|
|
772
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
773
|
+
},
|
|
774
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
775
|
+
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
776
|
+
"fieldName": "type"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"name": "variant",
|
|
780
|
+
"type": {
|
|
781
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
|
|
782
|
+
},
|
|
783
|
+
"description": "The style variant of the badge.\nDetermines the background color of the badge.",
|
|
784
|
+
"fieldName": "variant"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"name": "strong",
|
|
788
|
+
"type": {
|
|
789
|
+
"text": "boolean"
|
|
790
|
+
},
|
|
791
|
+
"default": "false",
|
|
792
|
+
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
793
|
+
"fieldName": "strong"
|
|
794
|
+
}
|
|
795
|
+
],
|
|
796
|
+
"superclass": {
|
|
797
|
+
"name": "LitElement",
|
|
798
|
+
"package": "lit"
|
|
799
|
+
},
|
|
800
|
+
"localization": [],
|
|
801
|
+
"status": "ready",
|
|
802
|
+
"category": "text",
|
|
803
|
+
"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",
|
|
804
|
+
"examples": [],
|
|
805
|
+
"dependencies": [],
|
|
806
|
+
"tagName": "nord-badge",
|
|
807
|
+
"customElement": true
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
"exports": [
|
|
811
|
+
{
|
|
812
|
+
"kind": "js",
|
|
813
|
+
"name": "default",
|
|
814
|
+
"declaration": {
|
|
815
|
+
"name": "Badge",
|
|
816
|
+
"module": "src/badge/Badge.ts"
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"kind": "custom-element-definition",
|
|
821
|
+
"name": "nord-badge",
|
|
822
|
+
"declaration": {
|
|
823
|
+
"name": "Badge",
|
|
824
|
+
"module": "src/badge/Badge.ts"
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
]
|
|
828
|
+
},
|
|
716
829
|
{
|
|
717
830
|
"kind": "javascript-module",
|
|
718
831
|
"path": "src/button/Button.ts",
|
|
@@ -1405,119 +1518,6 @@
|
|
|
1405
1518
|
}
|
|
1406
1519
|
]
|
|
1407
1520
|
},
|
|
1408
|
-
{
|
|
1409
|
-
"kind": "javascript-module",
|
|
1410
|
-
"path": "src/badge/Badge.ts",
|
|
1411
|
-
"declarations": [
|
|
1412
|
-
{
|
|
1413
|
-
"kind": "class",
|
|
1414
|
-
"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.",
|
|
1415
|
-
"name": "Badge",
|
|
1416
|
-
"slots": [
|
|
1417
|
-
{
|
|
1418
|
-
"description": "The badge content.",
|
|
1419
|
-
"name": ""
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
"description": "Used to place an icon at the start of badge.",
|
|
1423
|
-
"name": "icon"
|
|
1424
|
-
}
|
|
1425
|
-
],
|
|
1426
|
-
"members": [
|
|
1427
|
-
{
|
|
1428
|
-
"kind": "field",
|
|
1429
|
-
"name": "type",
|
|
1430
|
-
"type": {
|
|
1431
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1432
|
-
},
|
|
1433
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1434
|
-
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
1435
|
-
"attribute": "type",
|
|
1436
|
-
"reflects": true
|
|
1437
|
-
},
|
|
1438
|
-
{
|
|
1439
|
-
"kind": "field",
|
|
1440
|
-
"name": "variant",
|
|
1441
|
-
"type": {
|
|
1442
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
|
|
1443
|
-
},
|
|
1444
|
-
"description": "The style variant of the badge.\nDetermines the background color of the badge.",
|
|
1445
|
-
"attribute": "variant",
|
|
1446
|
-
"reflects": true
|
|
1447
|
-
},
|
|
1448
|
-
{
|
|
1449
|
-
"kind": "field",
|
|
1450
|
-
"name": "strong",
|
|
1451
|
-
"type": {
|
|
1452
|
-
"text": "boolean"
|
|
1453
|
-
},
|
|
1454
|
-
"default": "false",
|
|
1455
|
-
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
1456
|
-
"attribute": "strong",
|
|
1457
|
-
"reflects": true
|
|
1458
|
-
}
|
|
1459
|
-
],
|
|
1460
|
-
"attributes": [
|
|
1461
|
-
{
|
|
1462
|
-
"name": "type",
|
|
1463
|
-
"type": {
|
|
1464
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1465
|
-
},
|
|
1466
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1467
|
-
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
1468
|
-
"fieldName": "type"
|
|
1469
|
-
},
|
|
1470
|
-
{
|
|
1471
|
-
"name": "variant",
|
|
1472
|
-
"type": {
|
|
1473
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
|
|
1474
|
-
},
|
|
1475
|
-
"description": "The style variant of the badge.\nDetermines the background color of the badge.",
|
|
1476
|
-
"fieldName": "variant"
|
|
1477
|
-
},
|
|
1478
|
-
{
|
|
1479
|
-
"name": "strong",
|
|
1480
|
-
"type": {
|
|
1481
|
-
"text": "boolean"
|
|
1482
|
-
},
|
|
1483
|
-
"default": "false",
|
|
1484
|
-
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
1485
|
-
"fieldName": "strong"
|
|
1486
|
-
}
|
|
1487
|
-
],
|
|
1488
|
-
"superclass": {
|
|
1489
|
-
"name": "LitElement",
|
|
1490
|
-
"package": "lit"
|
|
1491
|
-
},
|
|
1492
|
-
"localization": [],
|
|
1493
|
-
"status": "ready",
|
|
1494
|
-
"category": "text",
|
|
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 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",
|
|
1496
|
-
"examples": [],
|
|
1497
|
-
"dependencies": [],
|
|
1498
|
-
"tagName": "nord-badge",
|
|
1499
|
-
"customElement": true
|
|
1500
|
-
}
|
|
1501
|
-
],
|
|
1502
|
-
"exports": [
|
|
1503
|
-
{
|
|
1504
|
-
"kind": "js",
|
|
1505
|
-
"name": "default",
|
|
1506
|
-
"declaration": {
|
|
1507
|
-
"name": "Badge",
|
|
1508
|
-
"module": "src/badge/Badge.ts"
|
|
1509
|
-
}
|
|
1510
|
-
},
|
|
1511
|
-
{
|
|
1512
|
-
"kind": "custom-element-definition",
|
|
1513
|
-
"name": "nord-badge",
|
|
1514
|
-
"declaration": {
|
|
1515
|
-
"name": "Badge",
|
|
1516
|
-
"module": "src/badge/Badge.ts"
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
]
|
|
1520
|
-
},
|
|
1521
1521
|
{
|
|
1522
1522
|
"kind": "javascript-module",
|
|
1523
1523
|
"path": "src/calendar/Calendar.ts",
|
|
@@ -8174,6 +8174,12 @@
|
|
|
8174
8174
|
"privacy": "private",
|
|
8175
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
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
|
+
},
|
|
8177
8183
|
{
|
|
8178
8184
|
"kind": "field",
|
|
8179
8185
|
"name": "navEl",
|
|
@@ -8229,6 +8235,17 @@
|
|
|
8229
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.",
|
|
8230
8236
|
"attribute": "persist-nav-state"
|
|
8231
8237
|
},
|
|
8238
|
+
{
|
|
8239
|
+
"kind": "field",
|
|
8240
|
+
"name": "syncNavState",
|
|
8241
|
+
"type": {
|
|
8242
|
+
"text": "boolean"
|
|
8243
|
+
},
|
|
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
|
|
8248
|
+
},
|
|
8232
8249
|
{
|
|
8233
8250
|
"kind": "field",
|
|
8234
8251
|
"name": "padding",
|
|
@@ -8291,7 +8308,15 @@
|
|
|
8291
8308
|
{
|
|
8292
8309
|
"kind": "method",
|
|
8293
8310
|
"name": "handleOpenChange",
|
|
8294
|
-
"privacy": "protected"
|
|
8311
|
+
"privacy": "protected",
|
|
8312
|
+
"parameters": [
|
|
8313
|
+
{
|
|
8314
|
+
"name": "prev",
|
|
8315
|
+
"type": {
|
|
8316
|
+
"text": "boolean"
|
|
8317
|
+
}
|
|
8318
|
+
}
|
|
8319
|
+
]
|
|
8295
8320
|
},
|
|
8296
8321
|
{
|
|
8297
8322
|
"kind": "method",
|
|
@@ -8461,6 +8486,15 @@
|
|
|
8461
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.",
|
|
8462
8487
|
"fieldName": "persistNavState"
|
|
8463
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"
|
|
8497
|
+
},
|
|
8464
8498
|
{
|
|
8465
8499
|
"name": "padding",
|
|
8466
8500
|
"type": {
|
|
@@ -15145,85 +15179,7 @@
|
|
|
15145
15179
|
},
|
|
15146
15180
|
{
|
|
15147
15181
|
"kind": "javascript-module",
|
|
15148
|
-
"path": "src/
|
|
15149
|
-
"declarations": [
|
|
15150
|
-
{
|
|
15151
|
-
"kind": "class",
|
|
15152
|
-
"description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
|
|
15153
|
-
"name": "ToastGroup",
|
|
15154
|
-
"slots": [
|
|
15155
|
-
{
|
|
15156
|
-
"description": "Default slot in which to place toasts.",
|
|
15157
|
-
"name": ""
|
|
15158
|
-
}
|
|
15159
|
-
],
|
|
15160
|
-
"members": [
|
|
15161
|
-
{
|
|
15162
|
-
"kind": "method",
|
|
15163
|
-
"name": "addToast",
|
|
15164
|
-
"parameters": [
|
|
15165
|
-
{
|
|
15166
|
-
"name": "text",
|
|
15167
|
-
"type": {
|
|
15168
|
-
"text": "string"
|
|
15169
|
-
},
|
|
15170
|
-
"description": "The text/message of the toast."
|
|
15171
|
-
},
|
|
15172
|
-
{
|
|
15173
|
-
"name": "options",
|
|
15174
|
-
"default": "{}",
|
|
15175
|
-
"type": {
|
|
15176
|
-
"text": "ToastOptions"
|
|
15177
|
-
},
|
|
15178
|
-
"description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
|
|
15179
|
-
}
|
|
15180
|
-
],
|
|
15181
|
-
"description": "Convenience method for creating and adding a toast to the group.",
|
|
15182
|
-
"return": {
|
|
15183
|
-
"type": {
|
|
15184
|
-
"text": "Toast"
|
|
15185
|
-
}
|
|
15186
|
-
}
|
|
15187
|
-
}
|
|
15188
|
-
],
|
|
15189
|
-
"superclass": {
|
|
15190
|
-
"name": "LitElement",
|
|
15191
|
-
"package": "lit"
|
|
15192
|
-
},
|
|
15193
|
-
"localization": [],
|
|
15194
|
-
"status": "ready",
|
|
15195
|
-
"category": "feedback",
|
|
15196
|
-
"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 in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
|
|
15197
|
-
"examples": [],
|
|
15198
|
-
"dependencies": [
|
|
15199
|
-
"toast"
|
|
15200
|
-
],
|
|
15201
|
-
"tagName": "nord-toast-group",
|
|
15202
|
-
"customElement": true
|
|
15203
|
-
}
|
|
15204
|
-
],
|
|
15205
|
-
"exports": [
|
|
15206
|
-
{
|
|
15207
|
-
"kind": "js",
|
|
15208
|
-
"name": "default",
|
|
15209
|
-
"declaration": {
|
|
15210
|
-
"name": "ToastGroup",
|
|
15211
|
-
"module": "src/toast-group/ToastGroup.ts"
|
|
15212
|
-
}
|
|
15213
|
-
},
|
|
15214
|
-
{
|
|
15215
|
-
"kind": "custom-element-definition",
|
|
15216
|
-
"name": "nord-toast-group",
|
|
15217
|
-
"declaration": {
|
|
15218
|
-
"name": "ToastGroup",
|
|
15219
|
-
"module": "src/toast-group/ToastGroup.ts"
|
|
15220
|
-
}
|
|
15221
|
-
}
|
|
15222
|
-
]
|
|
15223
|
-
},
|
|
15224
|
-
{
|
|
15225
|
-
"kind": "javascript-module",
|
|
15226
|
-
"path": "src/toggle/Toggle.ts",
|
|
15182
|
+
"path": "src/toggle/Toggle.ts",
|
|
15227
15183
|
"declarations": [
|
|
15228
15184
|
{
|
|
15229
15185
|
"kind": "class",
|
|
@@ -15928,6 +15884,84 @@
|
|
|
15928
15884
|
}
|
|
15929
15885
|
]
|
|
15930
15886
|
},
|
|
15887
|
+
{
|
|
15888
|
+
"kind": "javascript-module",
|
|
15889
|
+
"path": "src/toast-group/ToastGroup.ts",
|
|
15890
|
+
"declarations": [
|
|
15891
|
+
{
|
|
15892
|
+
"kind": "class",
|
|
15893
|
+
"description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
|
|
15894
|
+
"name": "ToastGroup",
|
|
15895
|
+
"slots": [
|
|
15896
|
+
{
|
|
15897
|
+
"description": "Default slot in which to place toasts.",
|
|
15898
|
+
"name": ""
|
|
15899
|
+
}
|
|
15900
|
+
],
|
|
15901
|
+
"members": [
|
|
15902
|
+
{
|
|
15903
|
+
"kind": "method",
|
|
15904
|
+
"name": "addToast",
|
|
15905
|
+
"parameters": [
|
|
15906
|
+
{
|
|
15907
|
+
"name": "text",
|
|
15908
|
+
"type": {
|
|
15909
|
+
"text": "string"
|
|
15910
|
+
},
|
|
15911
|
+
"description": "The text/message of the toast."
|
|
15912
|
+
},
|
|
15913
|
+
{
|
|
15914
|
+
"name": "options",
|
|
15915
|
+
"default": "{}",
|
|
15916
|
+
"type": {
|
|
15917
|
+
"text": "ToastOptions"
|
|
15918
|
+
},
|
|
15919
|
+
"description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
|
|
15920
|
+
}
|
|
15921
|
+
],
|
|
15922
|
+
"description": "Convenience method for creating and adding a toast to the group.",
|
|
15923
|
+
"return": {
|
|
15924
|
+
"type": {
|
|
15925
|
+
"text": "Toast"
|
|
15926
|
+
}
|
|
15927
|
+
}
|
|
15928
|
+
}
|
|
15929
|
+
],
|
|
15930
|
+
"superclass": {
|
|
15931
|
+
"name": "LitElement",
|
|
15932
|
+
"package": "lit"
|
|
15933
|
+
},
|
|
15934
|
+
"localization": [],
|
|
15935
|
+
"status": "ready",
|
|
15936
|
+
"category": "feedback",
|
|
15937
|
+
"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 in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
|
|
15938
|
+
"examples": [],
|
|
15939
|
+
"dependencies": [
|
|
15940
|
+
"toast"
|
|
15941
|
+
],
|
|
15942
|
+
"tagName": "nord-toast-group",
|
|
15943
|
+
"customElement": true
|
|
15944
|
+
}
|
|
15945
|
+
],
|
|
15946
|
+
"exports": [
|
|
15947
|
+
{
|
|
15948
|
+
"kind": "js",
|
|
15949
|
+
"name": "default",
|
|
15950
|
+
"declaration": {
|
|
15951
|
+
"name": "ToastGroup",
|
|
15952
|
+
"module": "src/toast-group/ToastGroup.ts"
|
|
15953
|
+
}
|
|
15954
|
+
},
|
|
15955
|
+
{
|
|
15956
|
+
"kind": "custom-element-definition",
|
|
15957
|
+
"name": "nord-toast-group",
|
|
15958
|
+
"declaration": {
|
|
15959
|
+
"name": "ToastGroup",
|
|
15960
|
+
"module": "src/toast-group/ToastGroup.ts"
|
|
15961
|
+
}
|
|
15962
|
+
}
|
|
15963
|
+
]
|
|
15964
|
+
},
|
|
15931
15965
|
{
|
|
15932
15966
|
"kind": "javascript-module",
|
|
15933
15967
|
"path": "src/tooltip/Tooltip.ts",
|
|
@@ -16193,55 +16227,30 @@
|
|
|
16193
16227
|
},
|
|
16194
16228
|
{
|
|
16195
16229
|
"kind": "javascript-module",
|
|
16196
|
-
"path": "src/
|
|
16230
|
+
"path": "src/visually-hidden/VisuallyHidden.ts",
|
|
16197
16231
|
"declarations": [
|
|
16198
16232
|
{
|
|
16199
16233
|
"kind": "class",
|
|
16200
|
-
"description": "
|
|
16201
|
-
"name": "
|
|
16234
|
+
"description": "Visually hidden is used when an element needs to be available\nto assistive technologies like screen readers, but be otherwise\nhidden.",
|
|
16235
|
+
"name": "VisuallyHidden",
|
|
16202
16236
|
"slots": [
|
|
16203
16237
|
{
|
|
16204
|
-
"description": "
|
|
16238
|
+
"description": "The visually hidden content.",
|
|
16205
16239
|
"name": ""
|
|
16206
|
-
},
|
|
16207
|
-
{
|
|
16208
|
-
"description": "Optional slot for menus, buttons, toggles, etc.",
|
|
16209
|
-
"name": "end"
|
|
16210
|
-
}
|
|
16211
|
-
],
|
|
16212
|
-
"members": [
|
|
16213
|
-
{
|
|
16214
|
-
"kind": "field",
|
|
16215
|
-
"name": "_warningLogged",
|
|
16216
|
-
"type": {
|
|
16217
|
-
"text": "boolean"
|
|
16218
|
-
},
|
|
16219
|
-
"privacy": "private",
|
|
16220
|
-
"static": true,
|
|
16221
|
-
"default": "false",
|
|
16222
|
-
"inheritedFrom": {
|
|
16223
|
-
"name": "DraftComponentMixin",
|
|
16224
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
16225
|
-
}
|
|
16226
|
-
}
|
|
16227
|
-
],
|
|
16228
|
-
"mixins": [
|
|
16229
|
-
{
|
|
16230
|
-
"name": "DraftComponentMixin",
|
|
16231
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
16232
16240
|
}
|
|
16233
16241
|
],
|
|
16242
|
+
"members": [],
|
|
16234
16243
|
"superclass": {
|
|
16235
16244
|
"name": "LitElement",
|
|
16236
16245
|
"package": "lit"
|
|
16237
16246
|
},
|
|
16238
16247
|
"localization": [],
|
|
16239
|
-
"status": "
|
|
16240
|
-
"category": "
|
|
16241
|
-
"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-
|
|
16248
|
+
"status": "ready",
|
|
16249
|
+
"category": "text",
|
|
16250
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
|
|
16242
16251
|
"examples": [],
|
|
16243
16252
|
"dependencies": [],
|
|
16244
|
-
"tagName": "nord-
|
|
16253
|
+
"tagName": "nord-visually-hidden",
|
|
16245
16254
|
"customElement": true
|
|
16246
16255
|
}
|
|
16247
16256
|
],
|
|
@@ -16250,32 +16259,36 @@
|
|
|
16250
16259
|
"kind": "js",
|
|
16251
16260
|
"name": "default",
|
|
16252
16261
|
"declaration": {
|
|
16253
|
-
"name": "
|
|
16254
|
-
"module": "src/
|
|
16262
|
+
"name": "VisuallyHidden",
|
|
16263
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
16255
16264
|
}
|
|
16256
16265
|
},
|
|
16257
16266
|
{
|
|
16258
16267
|
"kind": "custom-element-definition",
|
|
16259
|
-
"name": "nord-
|
|
16268
|
+
"name": "nord-visually-hidden",
|
|
16260
16269
|
"declaration": {
|
|
16261
|
-
"name": "
|
|
16262
|
-
"module": "src/
|
|
16270
|
+
"name": "VisuallyHidden",
|
|
16271
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
16263
16272
|
}
|
|
16264
16273
|
}
|
|
16265
16274
|
]
|
|
16266
16275
|
},
|
|
16267
16276
|
{
|
|
16268
16277
|
"kind": "javascript-module",
|
|
16269
|
-
"path": "src/
|
|
16278
|
+
"path": "src/top-bar/TopBar.ts",
|
|
16270
16279
|
"declarations": [
|
|
16271
16280
|
{
|
|
16272
16281
|
"kind": "class",
|
|
16273
|
-
"description": "
|
|
16274
|
-
"name": "
|
|
16282
|
+
"description": "Top bar is a header component that is always visible at the top of the interface. Top bar allows functionality such as search and contextual menus to be placed at the top of the interface.",
|
|
16283
|
+
"name": "TopBar",
|
|
16275
16284
|
"slots": [
|
|
16276
16285
|
{
|
|
16277
|
-
"description": "
|
|
16286
|
+
"description": "Used for the main content of the top bar. We recommend placing your application’s global search functionality into this slot.",
|
|
16278
16287
|
"name": ""
|
|
16288
|
+
},
|
|
16289
|
+
{
|
|
16290
|
+
"description": "Optional slot for menus, buttons, toggles, etc.",
|
|
16291
|
+
"name": "end"
|
|
16279
16292
|
}
|
|
16280
16293
|
],
|
|
16281
16294
|
"members": [],
|
|
@@ -16284,12 +16297,11 @@
|
|
|
16284
16297
|
"package": "lit"
|
|
16285
16298
|
},
|
|
16286
16299
|
"localization": [],
|
|
16287
|
-
"
|
|
16288
|
-
"
|
|
16289
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
|
|
16300
|
+
"category": "structure",
|
|
16301
|
+
"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- Applications that utilize the top bar can allow users to customize the color of the top bar to match their preference. [View an example](/components/top-bar/?example=color).\n- If your application allows it, include search to help users find resources and navigate.\n- Include a user menu in the end slot of the top bar.\n- Use the [layout component](/components/layout/?example=top-bar) to provide structure for the top bar component. We’ve also created [an example which shows full theming capabilities](/components/layout/?example=theming).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for global navigation. Use the [navigation component](/components/navigation/) instead.\n- Don’t allow the user to set a top bar color that doesn’t provide enough contrast with the content.\n- Don’t allow the user to freely pick a hex code as the top bar color. Instead, offer a choice from a predefined palette of colors which provides sufficient contrast with the content. [View an example](/components/top-bar/?example=color).\n\n</div>\n\n---\n\n## Theming\n\nPlease see the [Top Bar theming](/themes/#top-bar-theming) section in our theming documentation for detailed guidelines.\n\n<nord-button variant=\"primary\" href=\"/themes/#top-bar-theming\">Theming Guidelines</nord-button>\n",
|
|
16290
16302
|
"examples": [],
|
|
16291
16303
|
"dependencies": [],
|
|
16292
|
-
"tagName": "nord-
|
|
16304
|
+
"tagName": "nord-top-bar",
|
|
16293
16305
|
"customElement": true
|
|
16294
16306
|
}
|
|
16295
16307
|
],
|
|
@@ -16298,16 +16310,98 @@
|
|
|
16298
16310
|
"kind": "js",
|
|
16299
16311
|
"name": "default",
|
|
16300
16312
|
"declaration": {
|
|
16301
|
-
"name": "
|
|
16302
|
-
"module": "src/
|
|
16313
|
+
"name": "TopBar",
|
|
16314
|
+
"module": "src/top-bar/TopBar.ts"
|
|
16303
16315
|
}
|
|
16304
16316
|
},
|
|
16305
16317
|
{
|
|
16306
16318
|
"kind": "custom-element-definition",
|
|
16307
|
-
"name": "nord-
|
|
16319
|
+
"name": "nord-top-bar",
|
|
16308
16320
|
"declaration": {
|
|
16309
|
-
"name": "
|
|
16310
|
-
"module": "src/
|
|
16321
|
+
"name": "TopBar",
|
|
16322
|
+
"module": "src/top-bar/TopBar.ts"
|
|
16323
|
+
}
|
|
16324
|
+
}
|
|
16325
|
+
]
|
|
16326
|
+
},
|
|
16327
|
+
{
|
|
16328
|
+
"kind": "javascript-module",
|
|
16329
|
+
"path": "src/common/controllers/BroadcastChannelController.ts",
|
|
16330
|
+
"declarations": [
|
|
16331
|
+
{
|
|
16332
|
+
"kind": "class",
|
|
16333
|
+
"description": "",
|
|
16334
|
+
"name": "BroadcastChannelController",
|
|
16335
|
+
"members": [
|
|
16336
|
+
{
|
|
16337
|
+
"kind": "field",
|
|
16338
|
+
"name": "channel",
|
|
16339
|
+
"type": {
|
|
16340
|
+
"text": "BroadcastChannel | undefined"
|
|
16341
|
+
},
|
|
16342
|
+
"privacy": "private"
|
|
16343
|
+
},
|
|
16344
|
+
{
|
|
16345
|
+
"kind": "field",
|
|
16346
|
+
"name": "options",
|
|
16347
|
+
"type": {
|
|
16348
|
+
"text": "Required<Options<T>>"
|
|
16349
|
+
},
|
|
16350
|
+
"privacy": "private",
|
|
16351
|
+
"default": "{ enabled: defaultEnabled, ...options }"
|
|
16352
|
+
},
|
|
16353
|
+
{
|
|
16354
|
+
"kind": "method",
|
|
16355
|
+
"name": "hostConnected",
|
|
16356
|
+
"return": {
|
|
16357
|
+
"type": {
|
|
16358
|
+
"text": "void"
|
|
16359
|
+
}
|
|
16360
|
+
}
|
|
16361
|
+
},
|
|
16362
|
+
{
|
|
16363
|
+
"kind": "method",
|
|
16364
|
+
"name": "hostDisconnected",
|
|
16365
|
+
"return": {
|
|
16366
|
+
"type": {
|
|
16367
|
+
"text": "void"
|
|
16368
|
+
}
|
|
16369
|
+
}
|
|
16370
|
+
},
|
|
16371
|
+
{
|
|
16372
|
+
"kind": "method",
|
|
16373
|
+
"name": "handleEvent",
|
|
16374
|
+
"parameters": [
|
|
16375
|
+
{
|
|
16376
|
+
"name": "event",
|
|
16377
|
+
"type": {
|
|
16378
|
+
"text": "MessageEvent<T>"
|
|
16379
|
+
}
|
|
16380
|
+
}
|
|
16381
|
+
]
|
|
16382
|
+
},
|
|
16383
|
+
{
|
|
16384
|
+
"kind": "method",
|
|
16385
|
+
"name": "post",
|
|
16386
|
+
"parameters": [
|
|
16387
|
+
{
|
|
16388
|
+
"name": "message",
|
|
16389
|
+
"type": {
|
|
16390
|
+
"text": "T"
|
|
16391
|
+
}
|
|
16392
|
+
}
|
|
16393
|
+
]
|
|
16394
|
+
}
|
|
16395
|
+
]
|
|
16396
|
+
}
|
|
16397
|
+
],
|
|
16398
|
+
"exports": [
|
|
16399
|
+
{
|
|
16400
|
+
"kind": "js",
|
|
16401
|
+
"name": "BroadcastChannelController",
|
|
16402
|
+
"declaration": {
|
|
16403
|
+
"name": "BroadcastChannelController",
|
|
16404
|
+
"module": "src/common/controllers/BroadcastChannelController.ts"
|
|
16311
16405
|
}
|
|
16312
16406
|
}
|
|
16313
16407
|
]
|