@nordhealth/components 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -673,6 +673,123 @@
673
673
  }
674
674
  ]
675
675
  },
676
+ {
677
+ "kind": "javascript-module",
678
+ "path": "src/badge/Badge.ts",
679
+ "declarations": [
680
+ {
681
+ "kind": "class",
682
+ "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.",
683
+ "name": "Badge",
684
+ "slots": [
685
+ {
686
+ "description": "The badge content.",
687
+ "name": ""
688
+ },
689
+ {
690
+ "description": "Used to place an icon at the start of badge.",
691
+ "name": "icon"
692
+ }
693
+ ],
694
+ "members": [
695
+ {
696
+ "kind": "field",
697
+ "name": "type",
698
+ "type": {
699
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
700
+ },
701
+ "description": "The type of badge.\nDetermines the background color of the badge.",
702
+ "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
703
+ "default": "\"neutral\"",
704
+ "attribute": "type",
705
+ "reflects": true
706
+ },
707
+ {
708
+ "kind": "field",
709
+ "name": "variant",
710
+ "type": {
711
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
712
+ },
713
+ "description": "The style variant of the badge.\nDetermines the background color of the badge.",
714
+ "default": "\"neutral\"",
715
+ "attribute": "variant",
716
+ "reflects": true
717
+ },
718
+ {
719
+ "kind": "field",
720
+ "name": "strong",
721
+ "type": {
722
+ "text": "boolean"
723
+ },
724
+ "default": "false",
725
+ "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
726
+ "attribute": "strong",
727
+ "reflects": true
728
+ }
729
+ ],
730
+ "attributes": [
731
+ {
732
+ "name": "type",
733
+ "type": {
734
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
735
+ },
736
+ "description": "The type of badge.\nDetermines the background color of the badge.",
737
+ "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
738
+ "default": "\"neutral\"",
739
+ "fieldName": "type"
740
+ },
741
+ {
742
+ "name": "variant",
743
+ "type": {
744
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
745
+ },
746
+ "description": "The style variant of the badge.\nDetermines the background color of the badge.",
747
+ "default": "\"neutral\"",
748
+ "fieldName": "variant"
749
+ },
750
+ {
751
+ "name": "strong",
752
+ "type": {
753
+ "text": "boolean"
754
+ },
755
+ "default": "false",
756
+ "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
757
+ "fieldName": "strong"
758
+ }
759
+ ],
760
+ "superclass": {
761
+ "name": "LitElement",
762
+ "package": "lit"
763
+ },
764
+ "localization": [],
765
+ "status": "ready",
766
+ "category": "text",
767
+ "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 easy 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- Don't use badges for labeling, categorizing, or organizing objects. Use the [tag component](/components/tag/) instead.\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",
768
+ "examples": [],
769
+ "dependencies": [],
770
+ "tagName": "nord-badge",
771
+ "customElement": true
772
+ }
773
+ ],
774
+ "exports": [
775
+ {
776
+ "kind": "js",
777
+ "name": "default",
778
+ "declaration": {
779
+ "name": "Badge",
780
+ "module": "src/badge/Badge.ts"
781
+ }
782
+ },
783
+ {
784
+ "kind": "custom-element-definition",
785
+ "name": "nord-badge",
786
+ "declaration": {
787
+ "name": "Badge",
788
+ "module": "src/badge/Badge.ts"
789
+ }
790
+ }
791
+ ]
792
+ },
676
793
  {
677
794
  "kind": "javascript-module",
678
795
  "path": "src/button/Button.ts",
@@ -1369,123 +1486,6 @@
1369
1486
  }
1370
1487
  ]
1371
1488
  },
1372
- {
1373
- "kind": "javascript-module",
1374
- "path": "src/badge/Badge.ts",
1375
- "declarations": [
1376
- {
1377
- "kind": "class",
1378
- "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.",
1379
- "name": "Badge",
1380
- "slots": [
1381
- {
1382
- "description": "The badge content.",
1383
- "name": ""
1384
- },
1385
- {
1386
- "description": "Used to place an icon at the start of badge.",
1387
- "name": "icon"
1388
- }
1389
- ],
1390
- "members": [
1391
- {
1392
- "kind": "field",
1393
- "name": "type",
1394
- "type": {
1395
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1396
- },
1397
- "description": "The type of badge.\nDetermines the background color of the badge.",
1398
- "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
1399
- "default": "\"neutral\"",
1400
- "attribute": "type",
1401
- "reflects": true
1402
- },
1403
- {
1404
- "kind": "field",
1405
- "name": "variant",
1406
- "type": {
1407
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
1408
- },
1409
- "description": "The style variant of the badge.\nDetermines the background color of the badge.",
1410
- "default": "\"neutral\"",
1411
- "attribute": "variant",
1412
- "reflects": true
1413
- },
1414
- {
1415
- "kind": "field",
1416
- "name": "strong",
1417
- "type": {
1418
- "text": "boolean"
1419
- },
1420
- "default": "false",
1421
- "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
1422
- "attribute": "strong",
1423
- "reflects": true
1424
- }
1425
- ],
1426
- "attributes": [
1427
- {
1428
- "name": "type",
1429
- "type": {
1430
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1431
- },
1432
- "description": "The type of badge.\nDetermines the background color of the badge.",
1433
- "deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
1434
- "default": "\"neutral\"",
1435
- "fieldName": "type"
1436
- },
1437
- {
1438
- "name": "variant",
1439
- "type": {
1440
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
1441
- },
1442
- "description": "The style variant of the badge.\nDetermines the background color of the badge.",
1443
- "default": "\"neutral\"",
1444
- "fieldName": "variant"
1445
- },
1446
- {
1447
- "name": "strong",
1448
- "type": {
1449
- "text": "boolean"
1450
- },
1451
- "default": "false",
1452
- "description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
1453
- "fieldName": "strong"
1454
- }
1455
- ],
1456
- "superclass": {
1457
- "name": "LitElement",
1458
- "package": "lit"
1459
- },
1460
- "localization": [],
1461
- "status": "ready",
1462
- "category": "text",
1463
- "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 easy 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- Don't use badges for labeling, categorizing, or organizing objects. Use the [tag component](/components/tag/) instead.\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",
1464
- "examples": [],
1465
- "dependencies": [],
1466
- "tagName": "nord-badge",
1467
- "customElement": true
1468
- }
1469
- ],
1470
- "exports": [
1471
- {
1472
- "kind": "js",
1473
- "name": "default",
1474
- "declaration": {
1475
- "name": "Badge",
1476
- "module": "src/badge/Badge.ts"
1477
- }
1478
- },
1479
- {
1480
- "kind": "custom-element-definition",
1481
- "name": "nord-badge",
1482
- "declaration": {
1483
- "name": "Badge",
1484
- "module": "src/badge/Badge.ts"
1485
- }
1486
- }
1487
- ]
1488
- },
1489
1489
  {
1490
1490
  "kind": "javascript-module",
1491
1491
  "path": "src/button-group/ButtonGroup.ts",
@@ -1782,6 +1782,16 @@
1782
1782
  "attribute": "max",
1783
1783
  "reflects": true
1784
1784
  },
1785
+ {
1786
+ "kind": "field",
1787
+ "name": "today",
1788
+ "type": {
1789
+ "text": "string | undefined"
1790
+ },
1791
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
1792
+ "attribute": "today",
1793
+ "reflects": true
1794
+ },
1785
1795
  {
1786
1796
  "kind": "field",
1787
1797
  "name": "expand",
@@ -1861,6 +1871,11 @@
1861
1871
  "name": "handleDaySelect",
1862
1872
  "privacy": "private"
1863
1873
  },
1874
+ {
1875
+ "kind": "method",
1876
+ "name": "getToday",
1877
+ "privacy": "private"
1878
+ },
1864
1879
  {
1865
1880
  "kind": "method",
1866
1881
  "name": "addDays",
@@ -2030,6 +2045,14 @@
2030
2045
  "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
2031
2046
  "fieldName": "max"
2032
2047
  },
2048
+ {
2049
+ "name": "today",
2050
+ "type": {
2051
+ "text": "string | undefined"
2052
+ },
2053
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
2054
+ "fieldName": "today"
2055
+ },
2033
2056
  {
2034
2057
  "name": "expand",
2035
2058
  "type": {
@@ -5174,17 +5197,27 @@
5174
5197
  },
5175
5198
  {
5176
5199
  "kind": "field",
5177
- "name": "firstDayOfWeek",
5200
+ "name": "today",
5178
5201
  "type": {
5179
- "text": "DaysOfWeek"
5202
+ "text": "string | undefined"
5180
5203
  },
5181
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
5182
- "attribute": "first-day-of-week",
5204
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
5205
+ "attribute": "today",
5183
5206
  "reflects": true
5184
5207
  },
5185
5208
  {
5186
5209
  "kind": "field",
5187
- "name": "dateAdapter",
5210
+ "name": "firstDayOfWeek",
5211
+ "type": {
5212
+ "text": "DaysOfWeek"
5213
+ },
5214
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
5215
+ "attribute": "first-day-of-week",
5216
+ "reflects": true
5217
+ },
5218
+ {
5219
+ "kind": "field",
5220
+ "name": "dateAdapter",
5188
5221
  "type": {
5189
5222
  "text": "DateAdapter"
5190
5223
  },
@@ -5817,6 +5850,14 @@
5817
5850
  "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
5818
5851
  "fieldName": "max"
5819
5852
  },
5853
+ {
5854
+ "name": "today",
5855
+ "type": {
5856
+ "text": "string | undefined"
5857
+ },
5858
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
5859
+ "fieldName": "today"
5860
+ },
5820
5861
  {
5821
5862
  "name": "first-day-of-week",
5822
5863
  "type": {
@@ -10607,6 +10648,136 @@
10607
10648
  }
10608
10649
  ]
10609
10650
  },
10651
+ {
10652
+ "kind": "javascript-module",
10653
+ "path": "src/navigation/Navigation.ts",
10654
+ "declarations": [
10655
+ {
10656
+ "kind": "class",
10657
+ "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
10658
+ "name": "Navigation",
10659
+ "cssProperties": [
10660
+ {
10661
+ "description": "Controls the background color of the navigation element.",
10662
+ "name": "--n-navigation-background-color",
10663
+ "default": "var(--n-color-nav-surface)"
10664
+ }
10665
+ ],
10666
+ "slots": [
10667
+ {
10668
+ "description": "The main section of the sidebar, for holding nav components.",
10669
+ "name": ""
10670
+ },
10671
+ {
10672
+ "description": "The top section of the sidebar.",
10673
+ "name": "header"
10674
+ },
10675
+ {
10676
+ "description": "The bottom section of the sidebar.",
10677
+ "name": "footer"
10678
+ }
10679
+ ],
10680
+ "members": [
10681
+ {
10682
+ "kind": "field",
10683
+ "name": "headerSlot",
10684
+ "privacy": "private",
10685
+ "default": "new SlotController(this, \"header\")"
10686
+ },
10687
+ {
10688
+ "kind": "field",
10689
+ "name": "events",
10690
+ "privacy": "private",
10691
+ "default": "new EventController(this)"
10692
+ },
10693
+ {
10694
+ "kind": "field",
10695
+ "name": "allowItemsToRemainOpen",
10696
+ "type": {
10697
+ "text": "boolean"
10698
+ },
10699
+ "privacy": "private",
10700
+ "default": "false"
10701
+ },
10702
+ {
10703
+ "kind": "field",
10704
+ "name": "stickyFooter",
10705
+ "type": {
10706
+ "text": "boolean"
10707
+ },
10708
+ "default": "false",
10709
+ "description": "Controls whether the navigations's footer has sticky positioning.",
10710
+ "attribute": "sticky-footer",
10711
+ "reflects": true
10712
+ },
10713
+ {
10714
+ "kind": "field",
10715
+ "name": "handleActivate",
10716
+ "privacy": "private"
10717
+ }
10718
+ ],
10719
+ "events": [
10720
+ {
10721
+ "type": {
10722
+ "text": "NordEvent"
10723
+ },
10724
+ "description": "Dispatched whenever a nav item's state changes between open and closed.",
10725
+ "name": "toggle"
10726
+ },
10727
+ {
10728
+ "type": {
10729
+ "text": "NordEvent"
10730
+ },
10731
+ "description": "Dispatched whenever a nav item has been marked as active",
10732
+ "name": "activate"
10733
+ }
10734
+ ],
10735
+ "attributes": [
10736
+ {
10737
+ "name": "sticky-footer",
10738
+ "type": {
10739
+ "text": "boolean"
10740
+ },
10741
+ "default": "false",
10742
+ "description": "Controls whether the navigations's footer has sticky positioning.",
10743
+ "fieldName": "stickyFooter"
10744
+ }
10745
+ ],
10746
+ "superclass": {
10747
+ "name": "LitElement",
10748
+ "package": "lit"
10749
+ },
10750
+ "localization": [],
10751
+ "status": "ready",
10752
+ "category": "navigation",
10753
+ "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",
10754
+ "examples": [],
10755
+ "dependencies": [
10756
+ "nav-item"
10757
+ ],
10758
+ "tagName": "nord-navigation",
10759
+ "customElement": true
10760
+ }
10761
+ ],
10762
+ "exports": [
10763
+ {
10764
+ "kind": "js",
10765
+ "name": "default",
10766
+ "declaration": {
10767
+ "name": "Navigation",
10768
+ "module": "src/navigation/Navigation.ts"
10769
+ }
10770
+ },
10771
+ {
10772
+ "kind": "custom-element-definition",
10773
+ "name": "nord-navigation",
10774
+ "declaration": {
10775
+ "name": "Navigation",
10776
+ "module": "src/navigation/Navigation.ts"
10777
+ }
10778
+ }
10779
+ ]
10780
+ },
10610
10781
  {
10611
10782
  "kind": "javascript-module",
10612
10783
  "path": "src/notification/Notification.ts",
@@ -10750,97 +10921,26 @@
10750
10921
  },
10751
10922
  {
10752
10923
  "kind": "javascript-module",
10753
- "path": "src/navigation/Navigation.ts",
10924
+ "path": "src/notification-group/NotificationGroup.ts",
10754
10925
  "declarations": [
10755
10926
  {
10756
10927
  "kind": "class",
10757
- "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
10758
- "name": "Navigation",
10759
- "cssProperties": [
10760
- {
10761
- "description": "Controls the background color of the navigation element.",
10762
- "name": "--n-navigation-background-color",
10763
- "default": "var(--n-color-nav-surface)"
10764
- }
10765
- ],
10928
+ "description": "Notification group is used to position and style a group of notifications.",
10929
+ "name": "NotificationGroup",
10766
10930
  "slots": [
10767
10931
  {
10768
- "description": "The main section of the sidebar, for holding nav components.",
10932
+ "description": "Default slot in which to place notifications.",
10769
10933
  "name": ""
10770
- },
10771
- {
10772
- "description": "The top section of the sidebar.",
10773
- "name": "header"
10774
- },
10775
- {
10776
- "description": "The bottom section of the sidebar.",
10777
- "name": "footer"
10778
- }
10779
- ],
10780
- "members": [
10781
- {
10782
- "kind": "field",
10783
- "name": "headerSlot",
10784
- "privacy": "private",
10785
- "default": "new SlotController(this, \"header\")"
10786
- },
10787
- {
10788
- "kind": "field",
10789
- "name": "events",
10790
- "privacy": "private",
10791
- "default": "new EventController(this)"
10792
- },
10793
- {
10794
- "kind": "field",
10795
- "name": "allowItemsToRemainOpen",
10796
- "type": {
10797
- "text": "boolean"
10798
- },
10799
- "privacy": "private",
10800
- "default": "false"
10801
- },
10802
- {
10803
- "kind": "field",
10804
- "name": "stickyFooter",
10805
- "type": {
10806
- "text": "boolean"
10807
- },
10808
- "default": "false",
10809
- "description": "Controls whether the navigations's footer has sticky positioning.",
10810
- "attribute": "sticky-footer",
10811
- "reflects": true
10812
- },
10813
- {
10814
- "kind": "field",
10815
- "name": "handleActivate",
10816
- "privacy": "private"
10817
10934
  }
10818
10935
  ],
10936
+ "members": [],
10819
10937
  "events": [
10820
10938
  {
10821
10939
  "type": {
10822
10940
  "text": "NordEvent"
10823
10941
  },
10824
- "description": "Dispatched whenever a nav item's state changes between open and closed.",
10825
- "name": "toggle"
10826
- },
10827
- {
10828
- "type": {
10829
- "text": "NordEvent"
10830
- },
10831
- "description": "Dispatched whenever a nav item has been marked as active",
10832
- "name": "activate"
10833
- }
10834
- ],
10835
- "attributes": [
10836
- {
10837
- "name": "sticky-footer",
10838
- "type": {
10839
- "text": "boolean"
10840
- },
10841
- "default": "false",
10842
- "description": "Controls whether the navigations's footer has sticky positioning.",
10843
- "fieldName": "stickyFooter"
10942
+ "description": "Fired when a notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
10943
+ "name": "dismiss"
10844
10944
  }
10845
10945
  ],
10846
10946
  "superclass": {
@@ -10849,13 +10949,11 @@
10849
10949
  },
10850
10950
  "localization": [],
10851
10951
  "status": "ready",
10852
- "category": "navigation",
10853
- "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- Dont 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",
10952
+ "category": "feedback",
10953
+ "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 [Notification](/components/notification/) so that notifications get styled and positioned correctly.\n- Add as close to the start of your main content area as possible.\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 notification components\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\">Youve 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",
10854
10954
  "examples": [],
10855
- "dependencies": [
10856
- "nav-item"
10857
- ],
10858
- "tagName": "nord-navigation",
10955
+ "dependencies": [],
10956
+ "tagName": "nord-notification-group",
10859
10957
  "customElement": true
10860
10958
  }
10861
10959
  ],
@@ -10864,80 +10962,23 @@
10864
10962
  "kind": "js",
10865
10963
  "name": "default",
10866
10964
  "declaration": {
10867
- "name": "Navigation",
10868
- "module": "src/navigation/Navigation.ts"
10965
+ "name": "NotificationGroup",
10966
+ "module": "src/notification-group/NotificationGroup.ts"
10869
10967
  }
10870
10968
  },
10871
10969
  {
10872
10970
  "kind": "custom-element-definition",
10873
- "name": "nord-navigation",
10971
+ "name": "nord-notification-group",
10874
10972
  "declaration": {
10875
- "name": "Navigation",
10876
- "module": "src/navigation/Navigation.ts"
10973
+ "name": "NotificationGroup",
10974
+ "module": "src/notification-group/NotificationGroup.ts"
10877
10975
  }
10878
10976
  }
10879
10977
  ]
10880
10978
  },
10881
10979
  {
10882
10980
  "kind": "javascript-module",
10883
- "path": "src/notification-group/NotificationGroup.ts",
10884
- "declarations": [
10885
- {
10886
- "kind": "class",
10887
- "description": "Notification group is used to position and style a group of notifications.",
10888
- "name": "NotificationGroup",
10889
- "slots": [
10890
- {
10891
- "description": "Default slot in which to place notifications.",
10892
- "name": ""
10893
- }
10894
- ],
10895
- "members": [],
10896
- "events": [
10897
- {
10898
- "type": {
10899
- "text": "NordEvent"
10900
- },
10901
- "description": "Fired when a notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
10902
- "name": "dismiss"
10903
- }
10904
- ],
10905
- "superclass": {
10906
- "name": "LitElement",
10907
- "package": "lit"
10908
- },
10909
- "localization": [],
10910
- "status": "ready",
10911
- "category": "feedback",
10912
- "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 [Notification](/components/notification/) so that notifications get styled and positioned correctly.\n- Add as close to the start of your main content area as possible.\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 notification components\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",
10913
- "examples": [],
10914
- "dependencies": [],
10915
- "tagName": "nord-notification-group",
10916
- "customElement": true
10917
- }
10918
- ],
10919
- "exports": [
10920
- {
10921
- "kind": "js",
10922
- "name": "default",
10923
- "declaration": {
10924
- "name": "NotificationGroup",
10925
- "module": "src/notification-group/NotificationGroup.ts"
10926
- }
10927
- },
10928
- {
10929
- "kind": "custom-element-definition",
10930
- "name": "nord-notification-group",
10931
- "declaration": {
10932
- "name": "NotificationGroup",
10933
- "module": "src/notification-group/NotificationGroup.ts"
10934
- }
10935
- }
10936
- ]
10937
- },
10938
- {
10939
- "kind": "javascript-module",
10940
- "path": "src/popout/Popout.ts",
10981
+ "path": "src/popout/Popout.ts",
10941
10982
  "declarations": [
10942
10983
  {
10943
10984
  "kind": "class",
@@ -14551,6 +14592,86 @@
14551
14592
  }
14552
14593
  ]
14553
14594
  },
14595
+ {
14596
+ "kind": "javascript-module",
14597
+ "path": "src/skeleton/Skeleton.ts",
14598
+ "declarations": [
14599
+ {
14600
+ "kind": "class",
14601
+ "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
14602
+ "name": "Skeleton",
14603
+ "cssProperties": [
14604
+ {
14605
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
14606
+ "name": "--n-skeleton-border-radius",
14607
+ "default": "var(--n-border-radius)"
14608
+ },
14609
+ {
14610
+ "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
14611
+ "name": "--n-skeleton-color",
14612
+ "default": "var(--n-color-border)"
14613
+ },
14614
+ {
14615
+ "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
14616
+ "name": "--n-skeleton-sheen-color",
14617
+ "default": "var(--n-color-border-strong)"
14618
+ }
14619
+ ],
14620
+ "members": [
14621
+ {
14622
+ "kind": "field",
14623
+ "name": "effect",
14624
+ "type": {
14625
+ "text": "\"pulse\" | \"sheen\" | undefined"
14626
+ },
14627
+ "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14628
+ "attribute": "effect",
14629
+ "reflects": true
14630
+ }
14631
+ ],
14632
+ "attributes": [
14633
+ {
14634
+ "name": "effect",
14635
+ "type": {
14636
+ "text": "\"pulse\" | \"sheen\" | undefined"
14637
+ },
14638
+ "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14639
+ "fieldName": "effect"
14640
+ }
14641
+ ],
14642
+ "superclass": {
14643
+ "name": "LitElement",
14644
+ "package": "lit"
14645
+ },
14646
+ "localization": [],
14647
+ "status": "ready",
14648
+ "category": "feedback",
14649
+ "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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n",
14650
+ "examples": [],
14651
+ "dependencies": [],
14652
+ "tagName": "nord-skeleton",
14653
+ "customElement": true
14654
+ }
14655
+ ],
14656
+ "exports": [
14657
+ {
14658
+ "kind": "js",
14659
+ "name": "default",
14660
+ "declaration": {
14661
+ "name": "Skeleton",
14662
+ "module": "src/skeleton/Skeleton.ts"
14663
+ }
14664
+ },
14665
+ {
14666
+ "kind": "custom-element-definition",
14667
+ "name": "nord-skeleton",
14668
+ "declaration": {
14669
+ "name": "Skeleton",
14670
+ "module": "src/skeleton/Skeleton.ts"
14671
+ }
14672
+ }
14673
+ ]
14674
+ },
14554
14675
  {
14555
14676
  "kind": "javascript-module",
14556
14677
  "path": "src/spinner/Spinner.ts",
@@ -14661,49 +14782,125 @@
14661
14782
  },
14662
14783
  {
14663
14784
  "kind": "javascript-module",
14664
- "path": "src/skeleton/Skeleton.ts",
14785
+ "path": "src/stack/Stack.ts",
14665
14786
  "declarations": [
14666
14787
  {
14667
14788
  "kind": "class",
14668
- "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
14669
- "name": "Skeleton",
14789
+ "description": "Stack component manages layout of immediate children along the\nvertical or horizontal axis with optional spacing between each child.",
14790
+ "name": "Stack",
14670
14791
  "cssProperties": [
14671
14792
  {
14672
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
14673
- "name": "--n-skeleton-border-radius",
14674
- "default": "var(--n-border-radius)"
14675
- },
14676
- {
14677
- "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
14678
- "name": "--n-skeleton-color",
14679
- "default": "var(--n-color-border)"
14680
- },
14793
+ "description": "Controls the spacing between items, using our [spacing tokens](/tokens/#space).",
14794
+ "name": "--n-stack-gap",
14795
+ "default": "var(--n-space-m)"
14796
+ }
14797
+ ],
14798
+ "slots": [
14681
14799
  {
14682
- "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
14683
- "name": "--n-skeleton-sheen-color",
14684
- "default": "var(--n-color-border-strong)"
14800
+ "description": "The stack content.",
14801
+ "name": ""
14685
14802
  }
14686
14803
  ],
14687
14804
  "members": [
14688
14805
  {
14689
14806
  "kind": "field",
14690
- "name": "effect",
14807
+ "name": "gap",
14691
14808
  "type": {
14692
- "text": "\"pulse\" | \"sheen\" | undefined"
14809
+ "text": "\"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
14693
14810
  },
14694
- "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14695
- "attribute": "effect",
14811
+ "default": "\"m\"",
14812
+ "description": "The space injected between components.",
14813
+ "attribute": "gap",
14814
+ "reflects": true
14815
+ },
14816
+ {
14817
+ "kind": "field",
14818
+ "name": "direction",
14819
+ "type": {
14820
+ "text": "\"vertical\" | \"horizontal\""
14821
+ },
14822
+ "default": "\"vertical\"",
14823
+ "description": "The direction of the stack.",
14824
+ "attribute": "direction",
14825
+ "reflects": true
14826
+ },
14827
+ {
14828
+ "kind": "field",
14829
+ "name": "alignItems",
14830
+ "type": {
14831
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"stretch\" | undefined"
14832
+ },
14833
+ "default": "\"stretch\"",
14834
+ "description": "How to align the child items inside the stack.",
14835
+ "attribute": "align-items",
14836
+ "reflects": true
14837
+ },
14838
+ {
14839
+ "kind": "field",
14840
+ "name": "wrap",
14841
+ "type": {
14842
+ "text": "boolean"
14843
+ },
14844
+ "default": "false",
14845
+ "description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
14846
+ "attribute": "wrap",
14847
+ "reflects": true
14848
+ },
14849
+ {
14850
+ "kind": "field",
14851
+ "name": "justifyContent",
14852
+ "type": {
14853
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
14854
+ },
14855
+ "description": "How to justify the child items inside the stack.",
14856
+ "attribute": "justify-content",
14696
14857
  "reflects": true
14697
14858
  }
14698
14859
  ],
14699
14860
  "attributes": [
14700
14861
  {
14701
- "name": "effect",
14862
+ "name": "gap",
14702
14863
  "type": {
14703
- "text": "\"pulse\" | \"sheen\" | undefined"
14864
+ "text": "\"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
14704
14865
  },
14705
- "description": "Determines which animation effect the skeleton will use.\nThe default is no animation.",
14706
- "fieldName": "effect"
14866
+ "default": "\"m\"",
14867
+ "description": "The space injected between components.",
14868
+ "fieldName": "gap"
14869
+ },
14870
+ {
14871
+ "name": "direction",
14872
+ "type": {
14873
+ "text": "\"vertical\" | \"horizontal\""
14874
+ },
14875
+ "default": "\"vertical\"",
14876
+ "description": "The direction of the stack.",
14877
+ "fieldName": "direction"
14878
+ },
14879
+ {
14880
+ "name": "align-items",
14881
+ "type": {
14882
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"stretch\" | undefined"
14883
+ },
14884
+ "default": "\"stretch\"",
14885
+ "description": "How to align the child items inside the stack.",
14886
+ "fieldName": "alignItems"
14887
+ },
14888
+ {
14889
+ "name": "wrap",
14890
+ "type": {
14891
+ "text": "boolean"
14892
+ },
14893
+ "default": "false",
14894
+ "description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
14895
+ "fieldName": "wrap"
14896
+ },
14897
+ {
14898
+ "name": "justify-content",
14899
+ "type": {
14900
+ "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
14901
+ },
14902
+ "description": "How to justify the child items inside the stack.",
14903
+ "fieldName": "justifyContent"
14707
14904
  }
14708
14905
  ],
14709
14906
  "superclass": {
@@ -14712,11 +14909,11 @@
14712
14909
  },
14713
14910
  "localization": [],
14714
14911
  "status": "ready",
14715
- "category": "feedback",
14716
- "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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n",
14912
+ "category": "structure",
14913
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when you need to stack multiple components vertically or horizontally.\n- Use when you want to adjust the white space between two or more components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for building grid based layouts.\n\n</div>\n",
14717
14914
  "examples": [],
14718
14915
  "dependencies": [],
14719
- "tagName": "nord-skeleton",
14916
+ "tagName": "nord-stack",
14720
14917
  "customElement": true
14721
14918
  }
14722
14919
  ],
@@ -14725,16 +14922,16 @@
14725
14922
  "kind": "js",
14726
14923
  "name": "default",
14727
14924
  "declaration": {
14728
- "name": "Skeleton",
14729
- "module": "src/skeleton/Skeleton.ts"
14925
+ "name": "Stack",
14926
+ "module": "src/stack/Stack.ts"
14730
14927
  }
14731
14928
  },
14732
14929
  {
14733
14930
  "kind": "custom-element-definition",
14734
- "name": "nord-skeleton",
14931
+ "name": "nord-stack",
14735
14932
  "declaration": {
14736
- "name": "Skeleton",
14737
- "module": "src/skeleton/Skeleton.ts"
14933
+ "name": "Stack",
14934
+ "module": "src/stack/Stack.ts"
14738
14935
  }
14739
14936
  }
14740
14937
  ]
@@ -14834,162 +15031,6 @@
14834
15031
  }
14835
15032
  ]
14836
15033
  },
14837
- {
14838
- "kind": "javascript-module",
14839
- "path": "src/stack/Stack.ts",
14840
- "declarations": [
14841
- {
14842
- "kind": "class",
14843
- "description": "Stack component manages layout of immediate children along the\nvertical or horizontal axis with optional spacing between each child.",
14844
- "name": "Stack",
14845
- "cssProperties": [
14846
- {
14847
- "description": "Controls the spacing between items, using our [spacing tokens](/tokens/#space).",
14848
- "name": "--n-stack-gap",
14849
- "default": "var(--n-space-m)"
14850
- }
14851
- ],
14852
- "slots": [
14853
- {
14854
- "description": "The stack content.",
14855
- "name": ""
14856
- }
14857
- ],
14858
- "members": [
14859
- {
14860
- "kind": "field",
14861
- "name": "gap",
14862
- "type": {
14863
- "text": "\"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
14864
- },
14865
- "default": "\"m\"",
14866
- "description": "The space injected between components.",
14867
- "attribute": "gap",
14868
- "reflects": true
14869
- },
14870
- {
14871
- "kind": "field",
14872
- "name": "direction",
14873
- "type": {
14874
- "text": "\"vertical\" | \"horizontal\""
14875
- },
14876
- "default": "\"vertical\"",
14877
- "description": "The direction of the stack.",
14878
- "attribute": "direction",
14879
- "reflects": true
14880
- },
14881
- {
14882
- "kind": "field",
14883
- "name": "alignItems",
14884
- "type": {
14885
- "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"stretch\" | undefined"
14886
- },
14887
- "default": "\"stretch\"",
14888
- "description": "How to align the child items inside the stack.",
14889
- "attribute": "align-items",
14890
- "reflects": true
14891
- },
14892
- {
14893
- "kind": "field",
14894
- "name": "wrap",
14895
- "type": {
14896
- "text": "boolean"
14897
- },
14898
- "default": "false",
14899
- "description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
14900
- "attribute": "wrap",
14901
- "reflects": true
14902
- },
14903
- {
14904
- "kind": "field",
14905
- "name": "justifyContent",
14906
- "type": {
14907
- "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
14908
- },
14909
- "description": "How to justify the child items inside the stack.",
14910
- "attribute": "justify-content",
14911
- "reflects": true
14912
- }
14913
- ],
14914
- "attributes": [
14915
- {
14916
- "name": "gap",
14917
- "type": {
14918
- "text": "\"none\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
14919
- },
14920
- "default": "\"m\"",
14921
- "description": "The space injected between components.",
14922
- "fieldName": "gap"
14923
- },
14924
- {
14925
- "name": "direction",
14926
- "type": {
14927
- "text": "\"vertical\" | \"horizontal\""
14928
- },
14929
- "default": "\"vertical\"",
14930
- "description": "The direction of the stack.",
14931
- "fieldName": "direction"
14932
- },
14933
- {
14934
- "name": "align-items",
14935
- "type": {
14936
- "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"stretch\" | undefined"
14937
- },
14938
- "default": "\"stretch\"",
14939
- "description": "How to align the child items inside the stack.",
14940
- "fieldName": "alignItems"
14941
- },
14942
- {
14943
- "name": "wrap",
14944
- "type": {
14945
- "text": "boolean"
14946
- },
14947
- "default": "false",
14948
- "description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
14949
- "fieldName": "wrap"
14950
- },
14951
- {
14952
- "name": "justify-content",
14953
- "type": {
14954
- "text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
14955
- },
14956
- "description": "How to justify the child items inside the stack.",
14957
- "fieldName": "justifyContent"
14958
- }
14959
- ],
14960
- "superclass": {
14961
- "name": "LitElement",
14962
- "package": "lit"
14963
- },
14964
- "localization": [],
14965
- "status": "ready",
14966
- "category": "structure",
14967
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when you need to stack multiple components vertically or horizontally.\n- Use when you want to adjust the white space between two or more components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for building grid based layouts.\n\n</div>\n",
14968
- "examples": [],
14969
- "dependencies": [],
14970
- "tagName": "nord-stack",
14971
- "customElement": true
14972
- }
14973
- ],
14974
- "exports": [
14975
- {
14976
- "kind": "js",
14977
- "name": "default",
14978
- "declaration": {
14979
- "name": "Stack",
14980
- "module": "src/stack/Stack.ts"
14981
- }
14982
- },
14983
- {
14984
- "kind": "custom-element-definition",
14985
- "name": "nord-stack",
14986
- "declaration": {
14987
- "name": "Stack",
14988
- "module": "src/stack/Stack.ts"
14989
- }
14990
- }
14991
- ]
14992
- },
14993
15034
  {
14994
15035
  "kind": "javascript-module",
14995
15036
  "path": "src/tab-group/TabGroup.ts",
@@ -17344,342 +17385,76 @@
17344
17385
  },
17345
17386
  {
17346
17387
  "kind": "javascript-module",
17347
- "path": "src/tooltip/Tooltip.ts",
17388
+ "path": "src/toggle/Toggle.ts",
17348
17389
  "declarations": [
17349
17390
  {
17350
17391
  "kind": "class",
17351
- "description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
17352
- "name": "Tooltip",
17392
+ "description": "Toggle switch gives control over a feature or option that can be\nturned on or off. If a physical switch would work for the action, a\ntoggle is probably the best component to use.",
17393
+ "name": "Toggle",
17353
17394
  "cssProperties": [
17354
17395
  {
17355
- "description": "Controls the maximum inline size, or width, of the tooltip.",
17356
- "name": "--n-tooltip-max-size",
17357
- "default": "50ch"
17396
+ "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
17397
+ "name": "--n-label-color",
17398
+ "default": "var(--n-color-text)"
17358
17399
  }
17359
17400
  ],
17360
17401
  "slots": [
17361
17402
  {
17362
- "description": "The tooltip content",
17363
- "name": ""
17403
+ "description": "Use when a label requires more than plain text.",
17404
+ "name": "label"
17364
17405
  },
17365
17406
  {
17366
- "description": "Optional slot that holds shortcut keys to access the subject",
17367
- "name": "shortcut"
17407
+ "description": "Optional slot that holds hint text for the input.",
17408
+ "name": "hint"
17409
+ },
17410
+ {
17411
+ "description": "Optional slot that holds error text for the input.",
17412
+ "name": "error"
17368
17413
  }
17369
17414
  ],
17370
17415
  "members": [
17371
17416
  {
17372
17417
  "kind": "field",
17373
- "name": "lastOpened",
17374
- "type": {
17375
- "text": "Tooltip | undefined"
17376
- },
17377
- "privacy": "private",
17378
- "static": true
17379
- },
17380
- {
17381
- "kind": "field",
17382
- "name": "shortcutSlot",
17383
- "privacy": "private",
17384
- "default": "new SlotController(this, \"shortcut\")"
17385
- },
17386
- {
17387
- "kind": "field",
17388
- "name": "events",
17389
- "privacy": "private",
17390
- "default": "new EventController(this)"
17418
+ "name": "formValue",
17419
+ "privacy": "protected",
17420
+ "readonly": true,
17421
+ "inheritedFrom": {
17422
+ "name": "FormAssociatedMixin",
17423
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17424
+ }
17391
17425
  },
17392
17426
  {
17393
17427
  "kind": "field",
17394
- "name": "currentElement",
17428
+ "name": "checked",
17395
17429
  "type": {
17396
- "text": "FocusableElement | undefined"
17430
+ "text": "boolean"
17397
17431
  },
17398
- "privacy": "private"
17432
+ "default": "false",
17433
+ "description": "Controls whether the toggle is checked or not.",
17434
+ "attribute": "checked",
17435
+ "reflects": true
17399
17436
  },
17400
17437
  {
17401
17438
  "kind": "field",
17402
- "name": "timeoutId",
17439
+ "name": "reverse",
17403
17440
  "type": {
17404
- "text": "ReturnType<typeof setTimeout> | undefined"
17441
+ "text": "boolean"
17405
17442
  },
17406
- "privacy": "private"
17443
+ "default": "false",
17444
+ "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
17445
+ "attribute": "reverse",
17446
+ "reflects": true
17407
17447
  },
17408
17448
  {
17409
17449
  "kind": "field",
17410
- "name": "proxy",
17450
+ "name": "size",
17411
17451
  "type": {
17412
- "text": "HTMLSpanElement | undefined"
17452
+ "text": "\"s\" | \"m\" | \"l\""
17413
17453
  },
17414
- "privacy": "private",
17415
- "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
17416
- },
17417
- {
17418
- "kind": "field",
17419
- "name": "state",
17420
- "type": {
17421
- "text": "TooltipStates"
17422
- },
17423
- "privacy": "private",
17424
- "default": "\"hidden\"",
17425
- "description": "The current state of the tooltip, dependent on the state machine"
17426
- },
17427
- {
17428
- "kind": "field",
17429
- "name": "coords",
17430
- "type": {
17431
- "text": "[number, number]"
17432
- },
17433
- "privacy": "private",
17434
- "default": "[0, 0]"
17435
- },
17436
- {
17437
- "kind": "field",
17438
- "name": "position",
17439
- "type": {
17440
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
17441
- },
17442
- "default": "\"block-start\"",
17443
- "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
17444
- "attribute": "position",
17445
- "reflects": true
17446
- },
17447
- {
17448
- "kind": "field",
17449
- "name": "role",
17450
- "type": {
17451
- "text": "string"
17452
- },
17453
- "default": "\"tooltip\"",
17454
- "description": "The tooltip role, set on the component by default.",
17455
- "attribute": "role",
17456
- "reflects": true
17457
- },
17458
- {
17459
- "kind": "field",
17460
- "name": "id",
17461
- "type": {
17462
- "text": "string"
17463
- },
17464
- "default": "\"\"",
17465
- "description": "The id for the active element to reference via aria-describedby.",
17466
- "attribute": "id",
17467
- "reflects": true
17468
- },
17469
- {
17470
- "kind": "field",
17471
- "name": "delay",
17472
- "type": {
17473
- "text": "number"
17474
- },
17475
- "default": "500",
17476
- "description": "The delay in milliseconds before the tooltip is opened.",
17477
- "attribute": "delay",
17478
- "reflects": true
17479
- },
17480
- {
17481
- "kind": "method",
17482
- "name": "handleIdChange",
17483
- "privacy": "protected"
17484
- },
17485
- {
17486
- "kind": "method",
17487
- "name": "handleStateChange",
17488
- "privacy": "private",
17489
- "parameters": [
17490
- {
17491
- "name": "prevState",
17492
- "type": {
17493
- "text": "TooltipStates"
17494
- }
17495
- }
17496
- ]
17497
- },
17498
- {
17499
- "kind": "field",
17500
- "name": "updatePosition",
17501
- "privacy": "private",
17502
- "description": "Setting and updating the position of the tooltip"
17503
- },
17504
- {
17505
- "kind": "field",
17506
- "name": "hideTooltip",
17507
- "privacy": "private"
17508
- },
17509
- {
17510
- "kind": "field",
17511
- "name": "reposition",
17512
- "privacy": "private"
17513
- },
17514
- {
17515
- "kind": "field",
17516
- "name": "handleShow",
17517
- "privacy": "private"
17518
- },
17519
- {
17520
- "kind": "field",
17521
- "name": "handleHide",
17522
- "privacy": "private"
17523
- },
17524
- {
17525
- "kind": "field",
17526
- "name": "hideOnEscape",
17527
- "privacy": "private"
17528
- },
17529
- {
17530
- "kind": "field",
17531
- "name": "addDescribedBy",
17532
- "privacy": "private"
17533
- },
17534
- {
17535
- "kind": "field",
17536
- "name": "removeDescribedBy",
17537
- "privacy": "private"
17538
- }
17539
- ],
17540
- "attributes": [
17541
- {
17542
- "name": "position",
17543
- "type": {
17544
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
17545
- },
17546
- "default": "\"block-start\"",
17547
- "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
17548
- "fieldName": "position"
17549
- },
17550
- {
17551
- "name": "role",
17552
- "type": {
17553
- "text": "string"
17554
- },
17555
- "default": "\"tooltip\"",
17556
- "description": "The tooltip role, set on the component by default.",
17557
- "fieldName": "role"
17558
- },
17559
- {
17560
- "name": "id",
17561
- "type": {
17562
- "text": "string"
17563
- },
17564
- "default": "\"\"",
17565
- "description": "The id for the active element to reference via aria-describedby.",
17566
- "fieldName": "id"
17567
- },
17568
- {
17569
- "name": "delay",
17570
- "type": {
17571
- "text": "number"
17572
- },
17573
- "default": "500",
17574
- "description": "The delay in milliseconds before the tooltip is opened.",
17575
- "fieldName": "delay"
17576
- }
17577
- ],
17578
- "superclass": {
17579
- "name": "LitElement",
17580
- "package": "lit"
17581
- },
17582
- "localization": [],
17583
- "status": "ready",
17584
- "category": "overlay",
17585
- "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 tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n",
17586
- "examples": [],
17587
- "dependencies": [],
17588
- "tagName": "nord-tooltip",
17589
- "customElement": true
17590
- }
17591
- ],
17592
- "exports": [
17593
- {
17594
- "kind": "js",
17595
- "name": "default",
17596
- "declaration": {
17597
- "name": "Tooltip",
17598
- "module": "src/tooltip/Tooltip.ts"
17599
- }
17600
- },
17601
- {
17602
- "kind": "custom-element-definition",
17603
- "name": "nord-tooltip",
17604
- "declaration": {
17605
- "name": "Tooltip",
17606
- "module": "src/tooltip/Tooltip.ts"
17607
- }
17608
- }
17609
- ]
17610
- },
17611
- {
17612
- "kind": "javascript-module",
17613
- "path": "src/toggle/Toggle.ts",
17614
- "declarations": [
17615
- {
17616
- "kind": "class",
17617
- "description": "Toggle switch gives control over a feature or option that can be\nturned on or off. If a physical switch would work for the action, a\ntoggle is probably the best component to use.",
17618
- "name": "Toggle",
17619
- "cssProperties": [
17620
- {
17621
- "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
17622
- "name": "--n-label-color",
17623
- "default": "var(--n-color-text)"
17624
- }
17625
- ],
17626
- "slots": [
17627
- {
17628
- "description": "Use when a label requires more than plain text.",
17629
- "name": "label"
17630
- },
17631
- {
17632
- "description": "Optional slot that holds hint text for the input.",
17633
- "name": "hint"
17634
- },
17635
- {
17636
- "description": "Optional slot that holds error text for the input.",
17637
- "name": "error"
17638
- }
17639
- ],
17640
- "members": [
17641
- {
17642
- "kind": "field",
17643
- "name": "formValue",
17644
- "privacy": "protected",
17645
- "readonly": true,
17646
- "inheritedFrom": {
17647
- "name": "FormAssociatedMixin",
17648
- "module": "src/common/mixins/FormAssociatedMixin.ts"
17649
- }
17650
- },
17651
- {
17652
- "kind": "field",
17653
- "name": "checked",
17654
- "type": {
17655
- "text": "boolean"
17656
- },
17657
- "default": "false",
17658
- "description": "Controls whether the toggle is checked or not.",
17659
- "attribute": "checked",
17660
- "reflects": true
17661
- },
17662
- {
17663
- "kind": "field",
17664
- "name": "reverse",
17665
- "type": {
17666
- "text": "boolean"
17667
- },
17668
- "default": "false",
17669
- "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
17670
- "attribute": "reverse",
17671
- "reflects": true
17672
- },
17673
- {
17674
- "kind": "field",
17675
- "name": "size",
17676
- "type": {
17677
- "text": "\"s\" | \"m\" | \"l\""
17678
- },
17679
- "default": "\"m\"",
17680
- "description": "The size of the toggle switch.",
17681
- "attribute": "size",
17682
- "reflects": true
17454
+ "default": "\"m\"",
17455
+ "description": "The size of the toggle switch.",
17456
+ "attribute": "size",
17457
+ "reflects": true
17683
17458
  },
17684
17459
  {
17685
17460
  "kind": "method",
@@ -17938,341 +17713,631 @@
17938
17713
  }
17939
17714
  },
17940
17715
  {
17941
- "kind": "method",
17942
- "name": "getInvalid",
17943
- "privacy": "protected",
17716
+ "kind": "method",
17717
+ "name": "getInvalid",
17718
+ "privacy": "protected",
17719
+ "inheritedFrom": {
17720
+ "name": "FormAssociatedMixin",
17721
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17722
+ }
17723
+ },
17724
+ {
17725
+ "kind": "field",
17726
+ "name": "hasHint",
17727
+ "privacy": "protected",
17728
+ "readonly": true,
17729
+ "inheritedFrom": {
17730
+ "name": "FormAssociatedMixin",
17731
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17732
+ }
17733
+ },
17734
+ {
17735
+ "kind": "field",
17736
+ "name": "hasError",
17737
+ "privacy": "protected",
17738
+ "readonly": true,
17739
+ "inheritedFrom": {
17740
+ "name": "FormAssociatedMixin",
17741
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17742
+ }
17743
+ },
17744
+ {
17745
+ "kind": "field",
17746
+ "name": "disabled",
17747
+ "type": {
17748
+ "text": "boolean"
17749
+ },
17750
+ "default": "false",
17751
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
17752
+ "attribute": "disabled",
17753
+ "reflects": true,
17754
+ "inheritedFrom": {
17755
+ "name": "InputMixin",
17756
+ "module": "src/common/mixins/InputMixin.ts"
17757
+ }
17758
+ },
17759
+ {
17760
+ "kind": "field",
17761
+ "name": "name",
17762
+ "type": {
17763
+ "text": "string | undefined"
17764
+ },
17765
+ "description": "The name of the form component.",
17766
+ "attribute": "name",
17767
+ "reflects": true,
17768
+ "inheritedFrom": {
17769
+ "name": "InputMixin",
17770
+ "module": "src/common/mixins/InputMixin.ts"
17771
+ }
17772
+ },
17773
+ {
17774
+ "kind": "field",
17775
+ "name": "value",
17776
+ "type": {
17777
+ "text": "string"
17778
+ },
17779
+ "default": "\"\"",
17780
+ "description": "The value of the form component.",
17781
+ "attribute": "value",
17782
+ "inheritedFrom": {
17783
+ "name": "InputMixin",
17784
+ "module": "src/common/mixins/InputMixin.ts"
17785
+ }
17786
+ },
17787
+ {
17788
+ "kind": "field",
17789
+ "name": "formAncestor",
17790
+ "type": {
17791
+ "text": "HTMLFormElement | null"
17792
+ },
17793
+ "privacy": "private",
17794
+ "default": "null",
17795
+ "inheritedFrom": {
17796
+ "name": "InputMixin",
17797
+ "module": "src/common/mixins/InputMixin.ts"
17798
+ }
17799
+ },
17800
+ {
17801
+ "kind": "field",
17802
+ "name": "_formId",
17803
+ "type": {
17804
+ "text": "string | undefined"
17805
+ },
17806
+ "privacy": "protected",
17807
+ "inheritedFrom": {
17808
+ "name": "InputMixin",
17809
+ "module": "src/common/mixins/InputMixin.ts"
17810
+ }
17811
+ },
17812
+ {
17813
+ "kind": "field",
17814
+ "name": "form",
17815
+ "type": {
17816
+ "text": "HTMLFormElement | null"
17817
+ },
17818
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
17819
+ "attribute": "form",
17820
+ "inheritedFrom": {
17821
+ "name": "InputMixin",
17822
+ "module": "src/common/mixins/InputMixin.ts"
17823
+ }
17824
+ },
17825
+ {
17826
+ "kind": "field",
17827
+ "name": "focusableRef",
17828
+ "privacy": "protected",
17829
+ "inheritedFrom": {
17830
+ "name": "FocusableMixin",
17831
+ "module": "src/common/mixins/FocusableMixin.ts"
17832
+ }
17833
+ },
17834
+ {
17835
+ "kind": "method",
17836
+ "name": "focus",
17837
+ "parameters": [
17838
+ {
17839
+ "name": "options",
17840
+ "optional": true,
17841
+ "type": {
17842
+ "text": "FocusOptions"
17843
+ },
17844
+ "description": "An object which controls aspects of the focusing process."
17845
+ }
17846
+ ],
17847
+ "description": "Programmatically move focus to the component.",
17848
+ "inheritedFrom": {
17849
+ "name": "FocusableMixin",
17850
+ "module": "src/common/mixins/FocusableMixin.ts"
17851
+ }
17852
+ },
17853
+ {
17854
+ "kind": "method",
17855
+ "name": "blur",
17856
+ "description": "Programmatically remove focus from the component.",
17857
+ "inheritedFrom": {
17858
+ "name": "FocusableMixin",
17859
+ "module": "src/common/mixins/FocusableMixin.ts"
17860
+ }
17861
+ },
17862
+ {
17863
+ "kind": "method",
17864
+ "name": "click",
17865
+ "description": "Programmatically simulates a click on the component.",
17866
+ "inheritedFrom": {
17867
+ "name": "FocusableMixin",
17868
+ "module": "src/common/mixins/FocusableMixin.ts"
17869
+ }
17870
+ }
17871
+ ],
17872
+ "attributes": [
17873
+ {
17874
+ "name": "checked",
17875
+ "type": {
17876
+ "text": "boolean"
17877
+ },
17878
+ "default": "false",
17879
+ "description": "Controls whether the toggle is checked or not.",
17880
+ "fieldName": "checked"
17881
+ },
17882
+ {
17883
+ "name": "reverse",
17884
+ "type": {
17885
+ "text": "boolean"
17886
+ },
17887
+ "default": "false",
17888
+ "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
17889
+ "fieldName": "reverse"
17890
+ },
17891
+ {
17892
+ "name": "size",
17893
+ "type": {
17894
+ "text": "\"s\" | \"m\" | \"l\""
17895
+ },
17896
+ "default": "\"m\"",
17897
+ "description": "The size of the toggle switch.",
17898
+ "fieldName": "size"
17899
+ },
17900
+ {
17901
+ "name": "label",
17902
+ "type": {
17903
+ "text": "string"
17904
+ },
17905
+ "default": "\"\"",
17906
+ "description": "Label for the input.",
17907
+ "fieldName": "label",
17908
+ "inheritedFrom": {
17909
+ "name": "FormAssociatedMixin",
17910
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17911
+ }
17912
+ },
17913
+ {
17914
+ "name": "hint",
17915
+ "type": {
17916
+ "text": "string | undefined"
17917
+ },
17918
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
17919
+ "fieldName": "hint",
17920
+ "inheritedFrom": {
17921
+ "name": "FormAssociatedMixin",
17922
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17923
+ }
17924
+ },
17925
+ {
17926
+ "name": "hide-label",
17927
+ "type": {
17928
+ "text": "boolean"
17929
+ },
17930
+ "default": "false",
17931
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
17932
+ "fieldName": "hideLabel",
17933
+ "inheritedFrom": {
17934
+ "name": "FormAssociatedMixin",
17935
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17936
+ }
17937
+ },
17938
+ {
17939
+ "name": "placeholder",
17940
+ "type": {
17941
+ "text": "string | undefined"
17942
+ },
17943
+ "description": "Placeholder text to display within the input.",
17944
+ "fieldName": "placeholder",
17945
+ "inheritedFrom": {
17946
+ "name": "FormAssociatedMixin",
17947
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
17948
+ }
17949
+ },
17950
+ {
17951
+ "name": "error",
17952
+ "type": {
17953
+ "text": "string | undefined"
17954
+ },
17955
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
17956
+ "fieldName": "error",
17944
17957
  "inheritedFrom": {
17945
17958
  "name": "FormAssociatedMixin",
17946
17959
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17947
17960
  }
17948
17961
  },
17949
17962
  {
17950
- "kind": "field",
17951
- "name": "hasHint",
17952
- "privacy": "protected",
17953
- "readonly": true,
17963
+ "name": "required",
17964
+ "type": {
17965
+ "text": "boolean"
17966
+ },
17967
+ "default": "false",
17968
+ "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
17969
+ "fieldName": "required",
17954
17970
  "inheritedFrom": {
17955
17971
  "name": "FormAssociatedMixin",
17956
17972
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17957
17973
  }
17958
17974
  },
17959
17975
  {
17960
- "kind": "field",
17961
- "name": "hasError",
17962
- "privacy": "protected",
17963
- "readonly": true,
17976
+ "name": "hide-required",
17977
+ "type": {
17978
+ "text": "boolean"
17979
+ },
17980
+ "default": "false",
17981
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
17982
+ "fieldName": "hideRequired",
17964
17983
  "inheritedFrom": {
17965
17984
  "name": "FormAssociatedMixin",
17966
17985
  "module": "src/common/mixins/FormAssociatedMixin.ts"
17967
17986
  }
17968
17987
  },
17969
17988
  {
17970
- "kind": "field",
17971
17989
  "name": "disabled",
17972
17990
  "type": {
17973
17991
  "text": "boolean"
17974
17992
  },
17975
17993
  "default": "false",
17976
17994
  "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
17977
- "attribute": "disabled",
17978
- "reflects": true,
17995
+ "fieldName": "disabled",
17979
17996
  "inheritedFrom": {
17980
17997
  "name": "InputMixin",
17981
17998
  "module": "src/common/mixins/InputMixin.ts"
17982
17999
  }
17983
18000
  },
17984
18001
  {
17985
- "kind": "field",
17986
18002
  "name": "name",
17987
18003
  "type": {
17988
18004
  "text": "string | undefined"
17989
18005
  },
17990
18006
  "description": "The name of the form component.",
17991
- "attribute": "name",
17992
- "reflects": true,
18007
+ "fieldName": "name",
17993
18008
  "inheritedFrom": {
17994
18009
  "name": "InputMixin",
17995
18010
  "module": "src/common/mixins/InputMixin.ts"
17996
18011
  }
17997
18012
  },
17998
18013
  {
17999
- "kind": "field",
18000
18014
  "name": "value",
18001
18015
  "type": {
18002
18016
  "text": "string"
18003
18017
  },
18004
18018
  "default": "\"\"",
18005
18019
  "description": "The value of the form component.",
18006
- "attribute": "value",
18020
+ "fieldName": "value",
18007
18021
  "inheritedFrom": {
18008
18022
  "name": "InputMixin",
18009
18023
  "module": "src/common/mixins/InputMixin.ts"
18010
18024
  }
18011
18025
  },
18012
18026
  {
18013
- "kind": "field",
18014
- "name": "formAncestor",
18027
+ "name": "form",
18015
18028
  "type": {
18016
18029
  "text": "HTMLFormElement | null"
18017
18030
  },
18018
- "privacy": "private",
18019
- "default": "null",
18031
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
18032
+ "fieldName": "form",
18020
18033
  "inheritedFrom": {
18021
18034
  "name": "InputMixin",
18022
18035
  "module": "src/common/mixins/InputMixin.ts"
18023
18036
  }
18037
+ }
18038
+ ],
18039
+ "mixins": [
18040
+ {
18041
+ "name": "FormAssociatedMixin",
18042
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
18024
18043
  },
18025
18044
  {
18026
- "kind": "field",
18027
- "name": "_formId",
18045
+ "name": "InputMixin",
18046
+ "module": "/src/common/mixins/InputMixin.js"
18047
+ },
18048
+ {
18049
+ "name": "FocusableMixin",
18050
+ "module": "/src/common/mixins/FocusableMixin.js"
18051
+ }
18052
+ ],
18053
+ "superclass": {
18054
+ "name": "LitElement",
18055
+ "package": "lit"
18056
+ },
18057
+ "localization": [],
18058
+ "status": "ready",
18059
+ "category": "form",
18060
+ "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 toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing toggle labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
18061
+ "examples": [],
18062
+ "dependencies": [],
18063
+ "tagName": "nord-toggle",
18064
+ "customElement": true,
18065
+ "events": [
18066
+ {
18067
+ "name": "input",
18028
18068
  "type": {
18029
- "text": "string | undefined"
18069
+ "text": "NordEvent"
18030
18070
  },
18031
- "privacy": "protected",
18071
+ "description": "Fired as the user types into the input.",
18032
18072
  "inheritedFrom": {
18033
- "name": "InputMixin",
18034
- "module": "src/common/mixins/InputMixin.ts"
18073
+ "name": "FormAssociatedMixin",
18074
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
18035
18075
  }
18036
18076
  },
18037
18077
  {
18038
- "kind": "field",
18039
- "name": "form",
18078
+ "name": "change",
18040
18079
  "type": {
18041
- "text": "HTMLFormElement | null"
18080
+ "text": "NordEvent"
18042
18081
  },
18043
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
18044
- "attribute": "form",
18082
+ "description": "Fired whenever the input's value is changed via user interaction.",
18045
18083
  "inheritedFrom": {
18046
- "name": "InputMixin",
18047
- "module": "src/common/mixins/InputMixin.ts"
18084
+ "name": "FormAssociatedMixin",
18085
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
18048
18086
  }
18087
+ }
18088
+ ]
18089
+ }
18090
+ ],
18091
+ "exports": [
18092
+ {
18093
+ "kind": "js",
18094
+ "name": "default",
18095
+ "declaration": {
18096
+ "name": "Toggle",
18097
+ "module": "src/toggle/Toggle.ts"
18098
+ }
18099
+ },
18100
+ {
18101
+ "kind": "custom-element-definition",
18102
+ "name": "nord-toggle",
18103
+ "declaration": {
18104
+ "name": "Toggle",
18105
+ "module": "src/toggle/Toggle.ts"
18106
+ }
18107
+ }
18108
+ ]
18109
+ },
18110
+ {
18111
+ "kind": "javascript-module",
18112
+ "path": "src/tooltip/Tooltip.ts",
18113
+ "declarations": [
18114
+ {
18115
+ "kind": "class",
18116
+ "description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
18117
+ "name": "Tooltip",
18118
+ "cssProperties": [
18119
+ {
18120
+ "description": "Controls the maximum inline size, or width, of the tooltip.",
18121
+ "name": "--n-tooltip-max-size",
18122
+ "default": "50ch"
18123
+ }
18124
+ ],
18125
+ "slots": [
18126
+ {
18127
+ "description": "The tooltip content",
18128
+ "name": ""
18049
18129
  },
18130
+ {
18131
+ "description": "Optional slot that holds shortcut keys to access the subject",
18132
+ "name": "shortcut"
18133
+ }
18134
+ ],
18135
+ "members": [
18050
18136
  {
18051
18137
  "kind": "field",
18052
- "name": "focusableRef",
18053
- "privacy": "protected",
18054
- "inheritedFrom": {
18055
- "name": "FocusableMixin",
18056
- "module": "src/common/mixins/FocusableMixin.ts"
18057
- }
18138
+ "name": "lastOpened",
18139
+ "type": {
18140
+ "text": "Tooltip | undefined"
18141
+ },
18142
+ "privacy": "private",
18143
+ "static": true
18058
18144
  },
18059
18145
  {
18060
- "kind": "method",
18061
- "name": "focus",
18062
- "parameters": [
18063
- {
18064
- "name": "options",
18065
- "optional": true,
18066
- "type": {
18067
- "text": "FocusOptions"
18068
- },
18069
- "description": "An object which controls aspects of the focusing process."
18070
- }
18071
- ],
18072
- "description": "Programmatically move focus to the component.",
18073
- "inheritedFrom": {
18074
- "name": "FocusableMixin",
18075
- "module": "src/common/mixins/FocusableMixin.ts"
18076
- }
18146
+ "kind": "field",
18147
+ "name": "shortcutSlot",
18148
+ "privacy": "private",
18149
+ "default": "new SlotController(this, \"shortcut\")"
18077
18150
  },
18078
18151
  {
18079
- "kind": "method",
18080
- "name": "blur",
18081
- "description": "Programmatically remove focus from the component.",
18082
- "inheritedFrom": {
18083
- "name": "FocusableMixin",
18084
- "module": "src/common/mixins/FocusableMixin.ts"
18085
- }
18152
+ "kind": "field",
18153
+ "name": "events",
18154
+ "privacy": "private",
18155
+ "default": "new EventController(this)"
18086
18156
  },
18087
18157
  {
18088
- "kind": "method",
18089
- "name": "click",
18090
- "description": "Programmatically simulates a click on the component.",
18091
- "inheritedFrom": {
18092
- "name": "FocusableMixin",
18093
- "module": "src/common/mixins/FocusableMixin.ts"
18094
- }
18095
- }
18096
- ],
18097
- "attributes": [
18158
+ "kind": "field",
18159
+ "name": "currentElement",
18160
+ "type": {
18161
+ "text": "FocusableElement | undefined"
18162
+ },
18163
+ "privacy": "private"
18164
+ },
18098
18165
  {
18099
- "name": "checked",
18166
+ "kind": "field",
18167
+ "name": "timeoutId",
18100
18168
  "type": {
18101
- "text": "boolean"
18169
+ "text": "ReturnType<typeof setTimeout> | undefined"
18102
18170
  },
18103
- "default": "false",
18104
- "description": "Controls whether the toggle is checked or not.",
18105
- "fieldName": "checked"
18171
+ "privacy": "private"
18106
18172
  },
18107
18173
  {
18108
- "name": "reverse",
18174
+ "kind": "field",
18175
+ "name": "proxy",
18109
18176
  "type": {
18110
- "text": "boolean"
18177
+ "text": "HTMLSpanElement | undefined"
18178
+ },
18179
+ "privacy": "private",
18180
+ "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
18181
+ },
18182
+ {
18183
+ "kind": "field",
18184
+ "name": "state",
18185
+ "type": {
18186
+ "text": "TooltipStates"
18187
+ },
18188
+ "privacy": "private",
18189
+ "default": "\"hidden\"",
18190
+ "description": "The current state of the tooltip, dependent on the state machine"
18191
+ },
18192
+ {
18193
+ "kind": "field",
18194
+ "name": "coords",
18195
+ "type": {
18196
+ "text": "[number, number]"
18197
+ },
18198
+ "privacy": "private",
18199
+ "default": "[0, 0]"
18200
+ },
18201
+ {
18202
+ "kind": "field",
18203
+ "name": "position",
18204
+ "type": {
18205
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
18111
18206
  },
18112
- "default": "false",
18113
- "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
18114
- "fieldName": "reverse"
18207
+ "default": "\"block-start\"",
18208
+ "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
18209
+ "attribute": "position",
18210
+ "reflects": true
18115
18211
  },
18116
18212
  {
18117
- "name": "size",
18213
+ "kind": "field",
18214
+ "name": "role",
18118
18215
  "type": {
18119
- "text": "\"s\" | \"m\" | \"l\""
18216
+ "text": "string"
18120
18217
  },
18121
- "default": "\"m\"",
18122
- "description": "The size of the toggle switch.",
18123
- "fieldName": "size"
18218
+ "default": "\"tooltip\"",
18219
+ "description": "The tooltip role, set on the component by default.",
18220
+ "attribute": "role",
18221
+ "reflects": true
18124
18222
  },
18125
18223
  {
18126
- "name": "label",
18224
+ "kind": "field",
18225
+ "name": "id",
18127
18226
  "type": {
18128
18227
  "text": "string"
18129
18228
  },
18130
18229
  "default": "\"\"",
18131
- "description": "Label for the input.",
18132
- "fieldName": "label",
18133
- "inheritedFrom": {
18134
- "name": "FormAssociatedMixin",
18135
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18136
- }
18230
+ "description": "The id for the active element to reference via aria-describedby.",
18231
+ "attribute": "id",
18232
+ "reflects": true
18137
18233
  },
18138
18234
  {
18139
- "name": "hint",
18235
+ "kind": "field",
18236
+ "name": "delay",
18140
18237
  "type": {
18141
- "text": "string | undefined"
18238
+ "text": "number"
18142
18239
  },
18143
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
18144
- "fieldName": "hint",
18145
- "inheritedFrom": {
18146
- "name": "FormAssociatedMixin",
18147
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18148
- }
18240
+ "default": "500",
18241
+ "description": "The delay in milliseconds before the tooltip is opened.",
18242
+ "attribute": "delay",
18243
+ "reflects": true
18149
18244
  },
18150
18245
  {
18151
- "name": "hide-label",
18152
- "type": {
18153
- "text": "boolean"
18154
- },
18155
- "default": "false",
18156
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
18157
- "fieldName": "hideLabel",
18158
- "inheritedFrom": {
18159
- "name": "FormAssociatedMixin",
18160
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18161
- }
18246
+ "kind": "method",
18247
+ "name": "handleIdChange",
18248
+ "privacy": "protected"
18162
18249
  },
18163
18250
  {
18164
- "name": "placeholder",
18165
- "type": {
18166
- "text": "string | undefined"
18167
- },
18168
- "description": "Placeholder text to display within the input.",
18169
- "fieldName": "placeholder",
18170
- "inheritedFrom": {
18171
- "name": "FormAssociatedMixin",
18172
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18173
- }
18251
+ "kind": "method",
18252
+ "name": "handleStateChange",
18253
+ "privacy": "private",
18254
+ "parameters": [
18255
+ {
18256
+ "name": "prevState",
18257
+ "type": {
18258
+ "text": "TooltipStates"
18259
+ }
18260
+ }
18261
+ ]
18174
18262
  },
18175
18263
  {
18176
- "name": "error",
18177
- "type": {
18178
- "text": "string | undefined"
18179
- },
18180
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
18181
- "fieldName": "error",
18182
- "inheritedFrom": {
18183
- "name": "FormAssociatedMixin",
18184
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18185
- }
18264
+ "kind": "field",
18265
+ "name": "updatePosition",
18266
+ "privacy": "private",
18267
+ "description": "Setting and updating the position of the tooltip"
18186
18268
  },
18187
18269
  {
18188
- "name": "required",
18189
- "type": {
18190
- "text": "boolean"
18191
- },
18192
- "default": "false",
18193
- "description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
18194
- "fieldName": "required",
18195
- "inheritedFrom": {
18196
- "name": "FormAssociatedMixin",
18197
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18198
- }
18270
+ "kind": "field",
18271
+ "name": "hideTooltip",
18272
+ "privacy": "private"
18199
18273
  },
18200
18274
  {
18201
- "name": "hide-required",
18202
- "type": {
18203
- "text": "boolean"
18204
- },
18205
- "default": "false",
18206
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
18207
- "fieldName": "hideRequired",
18208
- "inheritedFrom": {
18209
- "name": "FormAssociatedMixin",
18210
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18211
- }
18275
+ "kind": "field",
18276
+ "name": "reposition",
18277
+ "privacy": "private"
18212
18278
  },
18213
18279
  {
18214
- "name": "disabled",
18280
+ "kind": "field",
18281
+ "name": "handleShow",
18282
+ "privacy": "private"
18283
+ },
18284
+ {
18285
+ "kind": "field",
18286
+ "name": "handleHide",
18287
+ "privacy": "private"
18288
+ },
18289
+ {
18290
+ "kind": "field",
18291
+ "name": "hideOnEscape",
18292
+ "privacy": "private"
18293
+ },
18294
+ {
18295
+ "kind": "field",
18296
+ "name": "addDescribedBy",
18297
+ "privacy": "private"
18298
+ },
18299
+ {
18300
+ "kind": "field",
18301
+ "name": "removeDescribedBy",
18302
+ "privacy": "private"
18303
+ }
18304
+ ],
18305
+ "attributes": [
18306
+ {
18307
+ "name": "position",
18215
18308
  "type": {
18216
- "text": "boolean"
18309
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
18217
18310
  },
18218
- "default": "false",
18219
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
18220
- "fieldName": "disabled",
18221
- "inheritedFrom": {
18222
- "name": "InputMixin",
18223
- "module": "src/common/mixins/InputMixin.ts"
18224
- }
18311
+ "default": "\"block-start\"",
18312
+ "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
18313
+ "fieldName": "position"
18225
18314
  },
18226
18315
  {
18227
- "name": "name",
18316
+ "name": "role",
18228
18317
  "type": {
18229
- "text": "string | undefined"
18318
+ "text": "string"
18230
18319
  },
18231
- "description": "The name of the form component.",
18232
- "fieldName": "name",
18233
- "inheritedFrom": {
18234
- "name": "InputMixin",
18235
- "module": "src/common/mixins/InputMixin.ts"
18236
- }
18320
+ "default": "\"tooltip\"",
18321
+ "description": "The tooltip role, set on the component by default.",
18322
+ "fieldName": "role"
18237
18323
  },
18238
18324
  {
18239
- "name": "value",
18325
+ "name": "id",
18240
18326
  "type": {
18241
18327
  "text": "string"
18242
18328
  },
18243
18329
  "default": "\"\"",
18244
- "description": "The value of the form component.",
18245
- "fieldName": "value",
18246
- "inheritedFrom": {
18247
- "name": "InputMixin",
18248
- "module": "src/common/mixins/InputMixin.ts"
18249
- }
18330
+ "description": "The id for the active element to reference via aria-describedby.",
18331
+ "fieldName": "id"
18250
18332
  },
18251
18333
  {
18252
- "name": "form",
18334
+ "name": "delay",
18253
18335
  "type": {
18254
- "text": "HTMLFormElement | null"
18336
+ "text": "number"
18255
18337
  },
18256
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
18257
- "fieldName": "form",
18258
- "inheritedFrom": {
18259
- "name": "InputMixin",
18260
- "module": "src/common/mixins/InputMixin.ts"
18261
- }
18262
- }
18263
- ],
18264
- "mixins": [
18265
- {
18266
- "name": "FormAssociatedMixin",
18267
- "module": "/src/common/mixins/FormAssociatedMixin.js"
18268
- },
18269
- {
18270
- "name": "InputMixin",
18271
- "module": "/src/common/mixins/InputMixin.js"
18272
- },
18273
- {
18274
- "name": "FocusableMixin",
18275
- "module": "/src/common/mixins/FocusableMixin.js"
18338
+ "default": "500",
18339
+ "description": "The delay in milliseconds before the tooltip is opened.",
18340
+ "fieldName": "delay"
18276
18341
  }
18277
18342
  ],
18278
18343
  "superclass": {
@@ -18281,36 +18346,12 @@
18281
18346
  },
18282
18347
  "localization": [],
18283
18348
  "status": "ready",
18284
- "category": "form",
18285
- "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 toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing toggle labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
18349
+ "category": "overlay",
18350
+ "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 tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n",
18286
18351
  "examples": [],
18287
18352
  "dependencies": [],
18288
- "tagName": "nord-toggle",
18289
- "customElement": true,
18290
- "events": [
18291
- {
18292
- "name": "input",
18293
- "type": {
18294
- "text": "NordEvent"
18295
- },
18296
- "description": "Fired as the user types into the input.",
18297
- "inheritedFrom": {
18298
- "name": "FormAssociatedMixin",
18299
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18300
- }
18301
- },
18302
- {
18303
- "name": "change",
18304
- "type": {
18305
- "text": "NordEvent"
18306
- },
18307
- "description": "Fired whenever the input's value is changed via user interaction.",
18308
- "inheritedFrom": {
18309
- "name": "FormAssociatedMixin",
18310
- "module": "src/common/mixins/FormAssociatedMixin.ts"
18311
- }
18312
- }
18313
- ]
18353
+ "tagName": "nord-tooltip",
18354
+ "customElement": true
18314
18355
  }
18315
18356
  ],
18316
18357
  "exports": [
@@ -18318,16 +18359,16 @@
18318
18359
  "kind": "js",
18319
18360
  "name": "default",
18320
18361
  "declaration": {
18321
- "name": "Toggle",
18322
- "module": "src/toggle/Toggle.ts"
18362
+ "name": "Tooltip",
18363
+ "module": "src/tooltip/Tooltip.ts"
18323
18364
  }
18324
18365
  },
18325
18366
  {
18326
18367
  "kind": "custom-element-definition",
18327
- "name": "nord-toggle",
18368
+ "name": "nord-tooltip",
18328
18369
  "declaration": {
18329
- "name": "Toggle",
18330
- "module": "src/toggle/Toggle.ts"
18370
+ "name": "Tooltip",
18371
+ "module": "src/tooltip/Tooltip.ts"
18331
18372
  }
18332
18373
  }
18333
18374
  ]