@nordhealth/components 2.7.0 → 2.8.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.
- package/custom-elements.json +1184 -1091
- package/lib/Avatar.js +1 -1
- package/lib/Avatar.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/{Calendar-1cdf8429.js → Calendar-685c3990.js} +1 -1
- package/lib/{Calendar-1cdf8429.js.map → Calendar-685c3990.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/LightDismissController-a2645ae6.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/ModalController.js +2 -0
- package/lib/ModalController.js.map +1 -0
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/bundle.js +7 -7
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/common/controllers/LightDismissController.d.ts +1 -2
- package/lib/src/modal/Modal.d.ts +14 -14
- package/lib/src/modal/ModalController.d.ts +34 -0
- package/package.json +3 -3
package/custom-elements.json
CHANGED
|
@@ -552,175 +552,6 @@
|
|
|
552
552
|
],
|
|
553
553
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Always add the name of the person using the `name` property.\n- For the best results, use square images or images cropped into a square.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Try to avoid using landscape or portrait images as avatars. Let users crop their images before or after uploading if possible.\n\n</div>\n"
|
|
554
554
|
},
|
|
555
|
-
{
|
|
556
|
-
"kind": "javascript-module",
|
|
557
|
-
"path": "src/banner/Banner.ts",
|
|
558
|
-
"declarations": [
|
|
559
|
-
{
|
|
560
|
-
"kind": "class",
|
|
561
|
-
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
562
|
-
"name": "Banner",
|
|
563
|
-
"cssProperties": [
|
|
564
|
-
{
|
|
565
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
566
|
-
"name": "--n-banner-border-radius",
|
|
567
|
-
"default": "var(--n-border-radius)"
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
571
|
-
"name": "--n-banner-box-shadow",
|
|
572
|
-
"default": "var(--n-box-shadow-card)"
|
|
573
|
-
}
|
|
574
|
-
],
|
|
575
|
-
"slots": [
|
|
576
|
-
{
|
|
577
|
-
"description": "default slot",
|
|
578
|
-
"name": ""
|
|
579
|
-
}
|
|
580
|
-
],
|
|
581
|
-
"members": [
|
|
582
|
-
{
|
|
583
|
-
"kind": "field",
|
|
584
|
-
"name": "variant",
|
|
585
|
-
"type": {
|
|
586
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
587
|
-
},
|
|
588
|
-
"default": "\"info\"",
|
|
589
|
-
"description": "The style variant of the banner.",
|
|
590
|
-
"attribute": "variant",
|
|
591
|
-
"reflects": true
|
|
592
|
-
}
|
|
593
|
-
],
|
|
594
|
-
"attributes": [
|
|
595
|
-
{
|
|
596
|
-
"name": "variant",
|
|
597
|
-
"type": {
|
|
598
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
599
|
-
},
|
|
600
|
-
"default": "\"info\"",
|
|
601
|
-
"description": "The style variant of the banner.",
|
|
602
|
-
"fieldName": "variant"
|
|
603
|
-
}
|
|
604
|
-
],
|
|
605
|
-
"superclass": {
|
|
606
|
-
"name": "LitElement",
|
|
607
|
-
"package": "lit"
|
|
608
|
-
},
|
|
609
|
-
"status": "ready",
|
|
610
|
-
"category": "feedback",
|
|
611
|
-
"displayName": null,
|
|
612
|
-
"examples": [],
|
|
613
|
-
"tagName": "nord-banner",
|
|
614
|
-
"customElement": true
|
|
615
|
-
}
|
|
616
|
-
],
|
|
617
|
-
"exports": [
|
|
618
|
-
{
|
|
619
|
-
"kind": "js",
|
|
620
|
-
"name": "default",
|
|
621
|
-
"declaration": {
|
|
622
|
-
"name": "Banner",
|
|
623
|
-
"module": "src/banner/Banner.ts"
|
|
624
|
-
}
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
"kind": "custom-element-definition",
|
|
628
|
-
"name": "nord-banner",
|
|
629
|
-
"declaration": {
|
|
630
|
-
"name": "Banner",
|
|
631
|
-
"module": "src/banner/Banner.ts"
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
],
|
|
635
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
"kind": "javascript-module",
|
|
639
|
-
"path": "src/badge/Badge.ts",
|
|
640
|
-
"declarations": [
|
|
641
|
-
{
|
|
642
|
-
"kind": "class",
|
|
643
|
-
"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.",
|
|
644
|
-
"name": "Badge",
|
|
645
|
-
"slots": [
|
|
646
|
-
{
|
|
647
|
-
"description": "The badge content.",
|
|
648
|
-
"name": ""
|
|
649
|
-
}
|
|
650
|
-
],
|
|
651
|
-
"members": [
|
|
652
|
-
{
|
|
653
|
-
"kind": "field",
|
|
654
|
-
"name": "type",
|
|
655
|
-
"type": {
|
|
656
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
657
|
-
},
|
|
658
|
-
"default": "\"neutral\"",
|
|
659
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
660
|
-
"attribute": "type",
|
|
661
|
-
"reflects": true
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
"kind": "field",
|
|
665
|
-
"name": "progress",
|
|
666
|
-
"type": {
|
|
667
|
-
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
668
|
-
},
|
|
669
|
-
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
670
|
-
"attribute": "progress"
|
|
671
|
-
}
|
|
672
|
-
],
|
|
673
|
-
"attributes": [
|
|
674
|
-
{
|
|
675
|
-
"name": "type",
|
|
676
|
-
"type": {
|
|
677
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
678
|
-
},
|
|
679
|
-
"default": "\"neutral\"",
|
|
680
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
681
|
-
"fieldName": "type"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"name": "progress",
|
|
685
|
-
"type": {
|
|
686
|
-
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
687
|
-
},
|
|
688
|
-
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
689
|
-
"fieldName": "progress"
|
|
690
|
-
}
|
|
691
|
-
],
|
|
692
|
-
"superclass": {
|
|
693
|
-
"name": "LitElement",
|
|
694
|
-
"package": "lit"
|
|
695
|
-
},
|
|
696
|
-
"status": "ready",
|
|
697
|
-
"category": "text",
|
|
698
|
-
"displayName": null,
|
|
699
|
-
"examples": [],
|
|
700
|
-
"tagName": "nord-badge",
|
|
701
|
-
"customElement": true
|
|
702
|
-
}
|
|
703
|
-
],
|
|
704
|
-
"exports": [
|
|
705
|
-
{
|
|
706
|
-
"kind": "js",
|
|
707
|
-
"name": "default",
|
|
708
|
-
"declaration": {
|
|
709
|
-
"name": "Badge",
|
|
710
|
-
"module": "src/badge/Badge.ts"
|
|
711
|
-
}
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
"kind": "custom-element-definition",
|
|
715
|
-
"name": "nord-badge",
|
|
716
|
-
"declaration": {
|
|
717
|
-
"name": "Badge",
|
|
718
|
-
"module": "src/badge/Badge.ts"
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
],
|
|
722
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
|
|
723
|
-
},
|
|
724
555
|
{
|
|
725
556
|
"kind": "javascript-module",
|
|
726
557
|
"path": "src/calendar/Calendar.ts",
|
|
@@ -1761,92 +1592,52 @@
|
|
|
1761
1592
|
},
|
|
1762
1593
|
{
|
|
1763
1594
|
"kind": "javascript-module",
|
|
1764
|
-
"path": "src/
|
|
1595
|
+
"path": "src/banner/Banner.ts",
|
|
1765
1596
|
"declarations": [
|
|
1766
1597
|
{
|
|
1767
1598
|
"kind": "class",
|
|
1768
|
-
"description": "
|
|
1769
|
-
"name": "
|
|
1599
|
+
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
1600
|
+
"name": "Banner",
|
|
1770
1601
|
"cssProperties": [
|
|
1771
1602
|
{
|
|
1772
1603
|
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1773
|
-
"name": "--n-
|
|
1604
|
+
"name": "--n-banner-border-radius",
|
|
1774
1605
|
"default": "var(--n-border-radius)"
|
|
1775
1606
|
},
|
|
1776
1607
|
{
|
|
1777
1608
|
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1778
|
-
"name": "--n-
|
|
1779
|
-
"default": "var(--n-box-shadow-
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
"description": "Controls the padding on all sides of the card.",
|
|
1783
|
-
"name": "--n-card-padding",
|
|
1784
|
-
"default": "var(--n-space-m)"
|
|
1785
|
-
},
|
|
1786
|
-
{
|
|
1787
|
-
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1788
|
-
"name": "--n-card-slot-padding",
|
|
1789
|
-
"default": "var(--n-space-m)"
|
|
1609
|
+
"name": "--n-banner-box-shadow",
|
|
1610
|
+
"default": "var(--n-box-shadow-card)"
|
|
1790
1611
|
}
|
|
1791
1612
|
],
|
|
1792
1613
|
"slots": [
|
|
1793
1614
|
{
|
|
1794
|
-
"description": "
|
|
1615
|
+
"description": "default slot",
|
|
1795
1616
|
"name": ""
|
|
1796
|
-
},
|
|
1797
|
-
{
|
|
1798
|
-
"description": "Optional slot that holds a header for the card.",
|
|
1799
|
-
"name": "header"
|
|
1800
|
-
},
|
|
1801
|
-
{
|
|
1802
|
-
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1803
|
-
"name": "header-end"
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
1807
|
-
"name": "footer"
|
|
1808
1617
|
}
|
|
1809
1618
|
],
|
|
1810
1619
|
"members": [
|
|
1811
1620
|
{
|
|
1812
1621
|
"kind": "field",
|
|
1813
|
-
"name": "
|
|
1814
|
-
"privacy": "private",
|
|
1815
|
-
"default": "new SlotController(this, \"header\")"
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
"kind": "field",
|
|
1819
|
-
"name": "headerEndSlot",
|
|
1820
|
-
"privacy": "private",
|
|
1821
|
-
"default": "new SlotController(this, \"header-end\")"
|
|
1822
|
-
},
|
|
1823
|
-
{
|
|
1824
|
-
"kind": "field",
|
|
1825
|
-
"name": "footerSlot",
|
|
1826
|
-
"privacy": "private",
|
|
1827
|
-
"default": "new SlotController(this, \"footer\")"
|
|
1828
|
-
},
|
|
1829
|
-
{
|
|
1830
|
-
"kind": "field",
|
|
1831
|
-
"name": "padding",
|
|
1622
|
+
"name": "variant",
|
|
1832
1623
|
"type": {
|
|
1833
|
-
"text": "\"
|
|
1624
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1834
1625
|
},
|
|
1835
|
-
"default": "\"
|
|
1836
|
-
"description": "
|
|
1837
|
-
"attribute": "
|
|
1626
|
+
"default": "\"info\"",
|
|
1627
|
+
"description": "The style variant of the banner.",
|
|
1628
|
+
"attribute": "variant",
|
|
1838
1629
|
"reflects": true
|
|
1839
1630
|
}
|
|
1840
1631
|
],
|
|
1841
1632
|
"attributes": [
|
|
1842
1633
|
{
|
|
1843
|
-
"name": "
|
|
1634
|
+
"name": "variant",
|
|
1844
1635
|
"type": {
|
|
1845
|
-
"text": "\"
|
|
1636
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1846
1637
|
},
|
|
1847
|
-
"default": "\"
|
|
1848
|
-
"description": "
|
|
1849
|
-
"fieldName": "
|
|
1638
|
+
"default": "\"info\"",
|
|
1639
|
+
"description": "The style variant of the banner.",
|
|
1640
|
+
"fieldName": "variant"
|
|
1850
1641
|
}
|
|
1851
1642
|
],
|
|
1852
1643
|
"superclass": {
|
|
@@ -1854,10 +1645,10 @@
|
|
|
1854
1645
|
"package": "lit"
|
|
1855
1646
|
},
|
|
1856
1647
|
"status": "ready",
|
|
1857
|
-
"category": "
|
|
1648
|
+
"category": "feedback",
|
|
1858
1649
|
"displayName": null,
|
|
1859
1650
|
"examples": [],
|
|
1860
|
-
"tagName": "nord-
|
|
1651
|
+
"tagName": "nord-banner",
|
|
1861
1652
|
"customElement": true
|
|
1862
1653
|
}
|
|
1863
1654
|
],
|
|
@@ -1866,17 +1657,226 @@
|
|
|
1866
1657
|
"kind": "js",
|
|
1867
1658
|
"name": "default",
|
|
1868
1659
|
"declaration": {
|
|
1869
|
-
"name": "
|
|
1870
|
-
"module": "src/
|
|
1660
|
+
"name": "Banner",
|
|
1661
|
+
"module": "src/banner/Banner.ts"
|
|
1871
1662
|
}
|
|
1872
1663
|
},
|
|
1873
1664
|
{
|
|
1874
1665
|
"kind": "custom-element-definition",
|
|
1875
|
-
"name": "nord-
|
|
1666
|
+
"name": "nord-banner",
|
|
1876
1667
|
"declaration": {
|
|
1877
|
-
"name": "
|
|
1878
|
-
"module": "src/
|
|
1879
|
-
}
|
|
1668
|
+
"name": "Banner",
|
|
1669
|
+
"module": "src/banner/Banner.ts"
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
"kind": "javascript-module",
|
|
1677
|
+
"path": "src/badge/Badge.ts",
|
|
1678
|
+
"declarations": [
|
|
1679
|
+
{
|
|
1680
|
+
"kind": "class",
|
|
1681
|
+
"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.",
|
|
1682
|
+
"name": "Badge",
|
|
1683
|
+
"slots": [
|
|
1684
|
+
{
|
|
1685
|
+
"description": "The badge content.",
|
|
1686
|
+
"name": ""
|
|
1687
|
+
}
|
|
1688
|
+
],
|
|
1689
|
+
"members": [
|
|
1690
|
+
{
|
|
1691
|
+
"kind": "field",
|
|
1692
|
+
"name": "type",
|
|
1693
|
+
"type": {
|
|
1694
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1695
|
+
},
|
|
1696
|
+
"default": "\"neutral\"",
|
|
1697
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1698
|
+
"attribute": "type",
|
|
1699
|
+
"reflects": true
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
"kind": "field",
|
|
1703
|
+
"name": "progress",
|
|
1704
|
+
"type": {
|
|
1705
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
1706
|
+
},
|
|
1707
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
1708
|
+
"attribute": "progress"
|
|
1709
|
+
}
|
|
1710
|
+
],
|
|
1711
|
+
"attributes": [
|
|
1712
|
+
{
|
|
1713
|
+
"name": "type",
|
|
1714
|
+
"type": {
|
|
1715
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1716
|
+
},
|
|
1717
|
+
"default": "\"neutral\"",
|
|
1718
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1719
|
+
"fieldName": "type"
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
"name": "progress",
|
|
1723
|
+
"type": {
|
|
1724
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
1725
|
+
},
|
|
1726
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
1727
|
+
"fieldName": "progress"
|
|
1728
|
+
}
|
|
1729
|
+
],
|
|
1730
|
+
"superclass": {
|
|
1731
|
+
"name": "LitElement",
|
|
1732
|
+
"package": "lit"
|
|
1733
|
+
},
|
|
1734
|
+
"status": "ready",
|
|
1735
|
+
"category": "text",
|
|
1736
|
+
"displayName": null,
|
|
1737
|
+
"examples": [],
|
|
1738
|
+
"tagName": "nord-badge",
|
|
1739
|
+
"customElement": true
|
|
1740
|
+
}
|
|
1741
|
+
],
|
|
1742
|
+
"exports": [
|
|
1743
|
+
{
|
|
1744
|
+
"kind": "js",
|
|
1745
|
+
"name": "default",
|
|
1746
|
+
"declaration": {
|
|
1747
|
+
"name": "Badge",
|
|
1748
|
+
"module": "src/badge/Badge.ts"
|
|
1749
|
+
}
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"kind": "custom-element-definition",
|
|
1753
|
+
"name": "nord-badge",
|
|
1754
|
+
"declaration": {
|
|
1755
|
+
"name": "Badge",
|
|
1756
|
+
"module": "src/badge/Badge.ts"
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
],
|
|
1760
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"kind": "javascript-module",
|
|
1764
|
+
"path": "src/card/Card.ts",
|
|
1765
|
+
"declarations": [
|
|
1766
|
+
{
|
|
1767
|
+
"kind": "class",
|
|
1768
|
+
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
1769
|
+
"name": "Card",
|
|
1770
|
+
"cssProperties": [
|
|
1771
|
+
{
|
|
1772
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1773
|
+
"name": "--n-card-border-radius",
|
|
1774
|
+
"default": "var(--n-border-radius)"
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1778
|
+
"name": "--n-card-box-shadow",
|
|
1779
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"description": "Controls the padding on all sides of the card.",
|
|
1783
|
+
"name": "--n-card-padding",
|
|
1784
|
+
"default": "var(--n-space-m)"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1788
|
+
"name": "--n-card-slot-padding",
|
|
1789
|
+
"default": "var(--n-space-m)"
|
|
1790
|
+
}
|
|
1791
|
+
],
|
|
1792
|
+
"slots": [
|
|
1793
|
+
{
|
|
1794
|
+
"description": "The card content.",
|
|
1795
|
+
"name": ""
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1799
|
+
"name": "header"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1803
|
+
"name": "header-end"
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1807
|
+
"name": "footer"
|
|
1808
|
+
}
|
|
1809
|
+
],
|
|
1810
|
+
"members": [
|
|
1811
|
+
{
|
|
1812
|
+
"kind": "field",
|
|
1813
|
+
"name": "headerSlot",
|
|
1814
|
+
"privacy": "private",
|
|
1815
|
+
"default": "new SlotController(this, \"header\")"
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"kind": "field",
|
|
1819
|
+
"name": "headerEndSlot",
|
|
1820
|
+
"privacy": "private",
|
|
1821
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
"kind": "field",
|
|
1825
|
+
"name": "footerSlot",
|
|
1826
|
+
"privacy": "private",
|
|
1827
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"kind": "field",
|
|
1831
|
+
"name": "padding",
|
|
1832
|
+
"type": {
|
|
1833
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1834
|
+
},
|
|
1835
|
+
"default": "\"m\"",
|
|
1836
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1837
|
+
"attribute": "padding",
|
|
1838
|
+
"reflects": true
|
|
1839
|
+
}
|
|
1840
|
+
],
|
|
1841
|
+
"attributes": [
|
|
1842
|
+
{
|
|
1843
|
+
"name": "padding",
|
|
1844
|
+
"type": {
|
|
1845
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1846
|
+
},
|
|
1847
|
+
"default": "\"m\"",
|
|
1848
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1849
|
+
"fieldName": "padding"
|
|
1850
|
+
}
|
|
1851
|
+
],
|
|
1852
|
+
"superclass": {
|
|
1853
|
+
"name": "LitElement",
|
|
1854
|
+
"package": "lit"
|
|
1855
|
+
},
|
|
1856
|
+
"status": "ready",
|
|
1857
|
+
"category": "structure",
|
|
1858
|
+
"displayName": null,
|
|
1859
|
+
"examples": [],
|
|
1860
|
+
"tagName": "nord-card",
|
|
1861
|
+
"customElement": true
|
|
1862
|
+
}
|
|
1863
|
+
],
|
|
1864
|
+
"exports": [
|
|
1865
|
+
{
|
|
1866
|
+
"kind": "js",
|
|
1867
|
+
"name": "default",
|
|
1868
|
+
"declaration": {
|
|
1869
|
+
"name": "Card",
|
|
1870
|
+
"module": "src/card/Card.ts"
|
|
1871
|
+
}
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"kind": "custom-element-definition",
|
|
1875
|
+
"name": "nord-card",
|
|
1876
|
+
"declaration": {
|
|
1877
|
+
"name": "Card",
|
|
1878
|
+
"module": "src/card/Card.ts"
|
|
1879
|
+
}
|
|
1880
1880
|
}
|
|
1881
1881
|
],
|
|
1882
1882
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
@@ -7884,22 +7884,6 @@
|
|
|
7884
7884
|
},
|
|
7885
7885
|
"privacy": "private"
|
|
7886
7886
|
},
|
|
7887
|
-
{
|
|
7888
|
-
"kind": "field",
|
|
7889
|
-
"name": "trigger",
|
|
7890
|
-
"type": {
|
|
7891
|
-
"text": "HTMLElement | undefined"
|
|
7892
|
-
},
|
|
7893
|
-
"privacy": "private"
|
|
7894
|
-
},
|
|
7895
|
-
{
|
|
7896
|
-
"kind": "field",
|
|
7897
|
-
"name": "lastButton",
|
|
7898
|
-
"type": {
|
|
7899
|
-
"text": "HTMLButtonElement | undefined"
|
|
7900
|
-
},
|
|
7901
|
-
"privacy": "private"
|
|
7902
|
-
},
|
|
7903
7887
|
{
|
|
7904
7888
|
"kind": "field",
|
|
7905
7889
|
"name": "headerSlot",
|
|
@@ -7918,18 +7902,6 @@
|
|
|
7918
7902
|
"privacy": "private",
|
|
7919
7903
|
"default": "new SlotController(this, \"footer\")"
|
|
7920
7904
|
},
|
|
7921
|
-
{
|
|
7922
|
-
"kind": "field",
|
|
7923
|
-
"name": "scrollBar",
|
|
7924
|
-
"privacy": "private",
|
|
7925
|
-
"default": "new ScrollbarController(this)"
|
|
7926
|
-
},
|
|
7927
|
-
{
|
|
7928
|
-
"kind": "field",
|
|
7929
|
-
"name": "focusTrap",
|
|
7930
|
-
"privacy": "private",
|
|
7931
|
-
"default": "new FocusTrapController(this, () => this.modal)"
|
|
7932
|
-
},
|
|
7933
7905
|
{
|
|
7934
7906
|
"kind": "field",
|
|
7935
7907
|
"name": "localize",
|
|
@@ -7938,15 +7910,9 @@
|
|
|
7938
7910
|
},
|
|
7939
7911
|
{
|
|
7940
7912
|
"kind": "field",
|
|
7941
|
-
"name": "
|
|
7942
|
-
"privacy": "private",
|
|
7943
|
-
"default": "new EventController(this)"
|
|
7944
|
-
},
|
|
7945
|
-
{
|
|
7946
|
-
"kind": "field",
|
|
7947
|
-
"name": "lightDismiss",
|
|
7913
|
+
"name": "modalController",
|
|
7948
7914
|
"privacy": "private",
|
|
7949
|
-
"default": "new
|
|
7915
|
+
"default": "new ModalController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.handleDismiss(),\n dialog: () => this.modal,\n backdrop: () => this.backdrop,\n close: returnValue => this.close(returnValue),\n })"
|
|
7950
7916
|
},
|
|
7951
7917
|
{
|
|
7952
7918
|
"kind": "field",
|
|
@@ -8028,33 +7994,20 @@
|
|
|
8028
7994
|
{
|
|
8029
7995
|
"kind": "method",
|
|
8030
7996
|
"name": "handleOpenUpdated",
|
|
8031
|
-
"privacy": "protected"
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
7997
|
+
"privacy": "protected",
|
|
7998
|
+
"parameters": [
|
|
7999
|
+
{
|
|
8000
|
+
"name": "prev",
|
|
8001
|
+
"type": {
|
|
8002
|
+
"text": "boolean"
|
|
8003
|
+
}
|
|
8004
|
+
}
|
|
8005
|
+
]
|
|
8037
8006
|
},
|
|
8038
8007
|
{
|
|
8039
8008
|
"kind": "method",
|
|
8040
8009
|
"name": "handleDismiss",
|
|
8041
8010
|
"privacy": "private"
|
|
8042
|
-
},
|
|
8043
|
-
{
|
|
8044
|
-
"kind": "field",
|
|
8045
|
-
"name": "trackLastButton",
|
|
8046
|
-
"privacy": "private",
|
|
8047
|
-
"description": "capture the last button clicked, so that we can polyfill `submitter` property in submit event"
|
|
8048
|
-
},
|
|
8049
|
-
{
|
|
8050
|
-
"kind": "field",
|
|
8051
|
-
"name": "polyfillSubmitter",
|
|
8052
|
-
"privacy": "private"
|
|
8053
|
-
},
|
|
8054
|
-
{
|
|
8055
|
-
"kind": "field",
|
|
8056
|
-
"name": "handleSubmit",
|
|
8057
|
-
"privacy": "private"
|
|
8058
8011
|
}
|
|
8059
8012
|
],
|
|
8060
8013
|
"events": [
|
|
@@ -8134,6 +8087,146 @@
|
|
|
8134
8087
|
],
|
|
8135
8088
|
"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 confirmations and conditional changes.\n- Use when the user is required to take an action.\n- Use when you need to display content that temporarily blocks interactions with the main view of an application.\n- Use when you need to ask a confirmation from a user before proceeding.\n- Use for important warnings, as a way to prevent or correct critical errors.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for nonessential information that is not related to the current userflow.\n- Don’t use when the modal requires additional information for decision making that is unavailable in the modal itself.\n- Don’t open a modal window on top of another modal.\n\n</div>\n\n---\n\n## Content guidelines\n\nModal title should be clear, accurate and predictable. Always lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit the patient called John Doe</div>\n<div class=\"n-usage n-usage-do\">Discard changes?</div>\n<div class=\"n-usage n-usage-dont\">Discard?</div>\n<div class=\"n-usage n-usage-do\">Delete patient?</div>\n<div class=\"n-usage n-usage-dont\">Are you sure you want to delete this patent?</div>\n\nWhen writing modal titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in modal titles, 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 in punctuation:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit patient.</div>\n\n---\n\n## Focus behaviour\n\n- Use the `autofocus` attribute to set the initial focus to the first location that accepts user input.\n- If it is a transactional modal without form inputs, then `autofocus` should be set on the primary button in the modal footer. This is for efficiency since most users will simply dismiss the dialog as soon as they have read the message.\n- If the modal contains a form, use `autofocus` in the first form field.\n- Focus remains trapped inside the modal dialog until it is closed.\n- For more examples and best practices, please see [WAI-ARIA Authoring Practices Modal Dialog Example](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/dialog-modal/dialog.html).\n"
|
|
8136
8089
|
},
|
|
8090
|
+
{
|
|
8091
|
+
"kind": "javascript-module",
|
|
8092
|
+
"path": "src/modal/ModalController.ts",
|
|
8093
|
+
"declarations": [
|
|
8094
|
+
{
|
|
8095
|
+
"kind": "class",
|
|
8096
|
+
"description": "",
|
|
8097
|
+
"name": "ModalController",
|
|
8098
|
+
"members": [
|
|
8099
|
+
{
|
|
8100
|
+
"kind": "field",
|
|
8101
|
+
"name": "openModals",
|
|
8102
|
+
"privacy": "private",
|
|
8103
|
+
"static": true,
|
|
8104
|
+
"default": "new Stack<ModalController>()"
|
|
8105
|
+
},
|
|
8106
|
+
{
|
|
8107
|
+
"kind": "field",
|
|
8108
|
+
"name": "scrollBar",
|
|
8109
|
+
"type": {
|
|
8110
|
+
"text": "ScrollbarController"
|
|
8111
|
+
},
|
|
8112
|
+
"privacy": "private",
|
|
8113
|
+
"default": "new ScrollbarController(host)"
|
|
8114
|
+
},
|
|
8115
|
+
{
|
|
8116
|
+
"kind": "field",
|
|
8117
|
+
"name": "focusTrap",
|
|
8118
|
+
"type": {
|
|
8119
|
+
"text": "FocusTrapController"
|
|
8120
|
+
},
|
|
8121
|
+
"privacy": "private",
|
|
8122
|
+
"default": "new FocusTrapController(host, options.dialog)"
|
|
8123
|
+
},
|
|
8124
|
+
{
|
|
8125
|
+
"kind": "field",
|
|
8126
|
+
"name": "lightDismiss",
|
|
8127
|
+
"type": {
|
|
8128
|
+
"text": "LightDismissController"
|
|
8129
|
+
},
|
|
8130
|
+
"privacy": "private",
|
|
8131
|
+
"default": "new LightDismissController(host, {\n isOpen: options.isOpen,\n isDismissible: node => node !== options.dialog(),\n onDismiss: this.handleLightDismiss,\n })"
|
|
8132
|
+
},
|
|
8133
|
+
{
|
|
8134
|
+
"kind": "field",
|
|
8135
|
+
"name": "events",
|
|
8136
|
+
"type": {
|
|
8137
|
+
"text": "EventController"
|
|
8138
|
+
},
|
|
8139
|
+
"privacy": "private",
|
|
8140
|
+
"default": "new EventController(host)"
|
|
8141
|
+
},
|
|
8142
|
+
{
|
|
8143
|
+
"kind": "field",
|
|
8144
|
+
"name": "options",
|
|
8145
|
+
"type": {
|
|
8146
|
+
"text": "ModalControllerOptions"
|
|
8147
|
+
},
|
|
8148
|
+
"privacy": "private",
|
|
8149
|
+
"default": "options"
|
|
8150
|
+
},
|
|
8151
|
+
{
|
|
8152
|
+
"kind": "field",
|
|
8153
|
+
"name": "trigger",
|
|
8154
|
+
"type": {
|
|
8155
|
+
"text": "HTMLElement | undefined"
|
|
8156
|
+
},
|
|
8157
|
+
"privacy": "private"
|
|
8158
|
+
},
|
|
8159
|
+
{
|
|
8160
|
+
"kind": "field",
|
|
8161
|
+
"name": "lastButton",
|
|
8162
|
+
"type": {
|
|
8163
|
+
"text": "HTMLButtonElement | undefined"
|
|
8164
|
+
},
|
|
8165
|
+
"privacy": "private"
|
|
8166
|
+
},
|
|
8167
|
+
{
|
|
8168
|
+
"kind": "method",
|
|
8169
|
+
"name": "hostConnected"
|
|
8170
|
+
},
|
|
8171
|
+
{
|
|
8172
|
+
"kind": "method",
|
|
8173
|
+
"name": "hostDisconnected",
|
|
8174
|
+
"return": {
|
|
8175
|
+
"type": {
|
|
8176
|
+
"text": "void"
|
|
8177
|
+
}
|
|
8178
|
+
}
|
|
8179
|
+
},
|
|
8180
|
+
{
|
|
8181
|
+
"kind": "method",
|
|
8182
|
+
"name": "block"
|
|
8183
|
+
},
|
|
8184
|
+
{
|
|
8185
|
+
"kind": "method",
|
|
8186
|
+
"name": "unblock"
|
|
8187
|
+
},
|
|
8188
|
+
{
|
|
8189
|
+
"kind": "field",
|
|
8190
|
+
"name": "trackLastButton",
|
|
8191
|
+
"privacy": "private",
|
|
8192
|
+
"description": "capture the last button clicked, so that we can polyfill `submitter` property in submit event"
|
|
8193
|
+
},
|
|
8194
|
+
{
|
|
8195
|
+
"kind": "field",
|
|
8196
|
+
"name": "polyfillSubmitter",
|
|
8197
|
+
"privacy": "private"
|
|
8198
|
+
},
|
|
8199
|
+
{
|
|
8200
|
+
"kind": "field",
|
|
8201
|
+
"name": "handleTransitionEnd",
|
|
8202
|
+
"privacy": "private"
|
|
8203
|
+
},
|
|
8204
|
+
{
|
|
8205
|
+
"kind": "field",
|
|
8206
|
+
"name": "handleLightDismiss",
|
|
8207
|
+
"privacy": "private"
|
|
8208
|
+
},
|
|
8209
|
+
{
|
|
8210
|
+
"kind": "field",
|
|
8211
|
+
"name": "handleSubmit",
|
|
8212
|
+
"privacy": "private"
|
|
8213
|
+
}
|
|
8214
|
+
],
|
|
8215
|
+
"examples": []
|
|
8216
|
+
}
|
|
8217
|
+
],
|
|
8218
|
+
"exports": [
|
|
8219
|
+
{
|
|
8220
|
+
"kind": "js",
|
|
8221
|
+
"name": "ModalController",
|
|
8222
|
+
"declaration": {
|
|
8223
|
+
"name": "ModalController",
|
|
8224
|
+
"module": "src/modal/ModalController.ts"
|
|
8225
|
+
}
|
|
8226
|
+
}
|
|
8227
|
+
],
|
|
8228
|
+
"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 confirmations and conditional changes.\n- Use when the user is required to take an action.\n- Use when you need to display content that temporarily blocks interactions with the main view of an application.\n- Use when you need to ask a confirmation from a user before proceeding.\n- Use for important warnings, as a way to prevent or correct critical errors.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for nonessential information that is not related to the current userflow.\n- Don’t use when the modal requires additional information for decision making that is unavailable in the modal itself.\n- Don’t open a modal window on top of another modal.\n\n</div>\n\n---\n\n## Content guidelines\n\nModal title should be clear, accurate and predictable. Always lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit the patient called John Doe</div>\n<div class=\"n-usage n-usage-do\">Discard changes?</div>\n<div class=\"n-usage n-usage-dont\">Discard?</div>\n<div class=\"n-usage n-usage-do\">Delete patient?</div>\n<div class=\"n-usage n-usage-dont\">Are you sure you want to delete this patent?</div>\n\nWhen writing modal titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in modal titles, 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 in punctuation:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit patient.</div>\n\n---\n\n## Focus behaviour\n\n- Use the `autofocus` attribute to set the initial focus to the first location that accepts user input.\n- If it is a transactional modal without form inputs, then `autofocus` should be set on the primary button in the modal footer. This is for efficiency since most users will simply dismiss the dialog as soon as they have read the message.\n- If the modal contains a form, use `autofocus` in the first form field.\n- Focus remains trapped inside the modal dialog until it is closed.\n- For more examples and best practices, please see [WAI-ARIA Authoring Practices Modal Dialog Example](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/dialog-modal/dialog.html).\n"
|
|
8229
|
+
},
|
|
8137
8230
|
{
|
|
8138
8231
|
"kind": "javascript-module",
|
|
8139
8232
|
"path": "src/modal/localization.ts",
|
|
@@ -11142,1121 +11235,1128 @@
|
|
|
11142
11235
|
},
|
|
11143
11236
|
{
|
|
11144
11237
|
"kind": "javascript-module",
|
|
11145
|
-
"path": "src/tab-
|
|
11238
|
+
"path": "src/tab-panel/TabPanel.ts",
|
|
11146
11239
|
"declarations": [
|
|
11147
11240
|
{
|
|
11148
11241
|
"kind": "class",
|
|
11149
|
-
"description": "
|
|
11150
|
-
"name": "
|
|
11242
|
+
"description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
|
|
11243
|
+
"name": "TabPanel",
|
|
11244
|
+
"slots": [
|
|
11245
|
+
{
|
|
11246
|
+
"description": "The tab panel content.",
|
|
11247
|
+
"name": ""
|
|
11248
|
+
}
|
|
11249
|
+
],
|
|
11250
|
+
"members": [],
|
|
11251
|
+
"superclass": {
|
|
11252
|
+
"name": "LitElement",
|
|
11253
|
+
"package": "lit"
|
|
11254
|
+
},
|
|
11255
|
+
"status": "new",
|
|
11256
|
+
"category": "navigation",
|
|
11257
|
+
"displayName": null,
|
|
11258
|
+
"examples": [],
|
|
11259
|
+
"tagName": "nord-tab-panel",
|
|
11260
|
+
"customElement": true
|
|
11261
|
+
}
|
|
11262
|
+
],
|
|
11263
|
+
"exports": [
|
|
11264
|
+
{
|
|
11265
|
+
"kind": "js",
|
|
11266
|
+
"name": "default",
|
|
11267
|
+
"declaration": {
|
|
11268
|
+
"name": "TabPanel",
|
|
11269
|
+
"module": "src/tab-panel/TabPanel.ts"
|
|
11270
|
+
}
|
|
11271
|
+
},
|
|
11272
|
+
{
|
|
11273
|
+
"kind": "custom-element-definition",
|
|
11274
|
+
"name": "nord-tab-panel",
|
|
11275
|
+
"declaration": {
|
|
11276
|
+
"name": "TabPanel",
|
|
11277
|
+
"module": "src/tab-panel/TabPanel.ts"
|
|
11278
|
+
}
|
|
11279
|
+
}
|
|
11280
|
+
],
|
|
11281
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n"
|
|
11282
|
+
},
|
|
11283
|
+
{
|
|
11284
|
+
"kind": "javascript-module",
|
|
11285
|
+
"path": "src/textarea/Textarea.ts",
|
|
11286
|
+
"declarations": [
|
|
11287
|
+
{
|
|
11288
|
+
"kind": "class",
|
|
11289
|
+
"description": "Textarea is a component that allows user to write text over\nmultiple rows. Used when the expected user input is long.\nFor shorter input, use the Input component.",
|
|
11290
|
+
"name": "Textarea",
|
|
11151
11291
|
"cssProperties": [
|
|
11152
11292
|
{
|
|
11153
|
-
"description": "Controls the
|
|
11154
|
-
"name": "--n-
|
|
11155
|
-
"default": "
|
|
11293
|
+
"description": "Controls the inline size, or width, of the textarea.",
|
|
11294
|
+
"name": "--n-textarea-inline-size",
|
|
11295
|
+
"default": "240px"
|
|
11296
|
+
},
|
|
11297
|
+
{
|
|
11298
|
+
"description": "Controls the block size, or height, or the textarea.",
|
|
11299
|
+
"name": "--n-textarea-block-size",
|
|
11300
|
+
"default": "76px"
|
|
11301
|
+
},
|
|
11302
|
+
{
|
|
11303
|
+
"description": "Controls the background of the textarea, using our [color tokens](/tokens/#color).",
|
|
11304
|
+
"name": "--n-textarea-background",
|
|
11305
|
+
"default": "var(--n-color-active)"
|
|
11306
|
+
},
|
|
11307
|
+
{
|
|
11308
|
+
"description": "Controls the text color of the textarea, using our [color tokens](/tokens/#color).",
|
|
11309
|
+
"name": "--n-textarea-color",
|
|
11310
|
+
"default": "var(--n-color-text)"
|
|
11311
|
+
},
|
|
11312
|
+
{
|
|
11313
|
+
"description": "Controls the border color of the textarea, using our [color tokens](/tokens/#color).",
|
|
11314
|
+
"name": "--n-textarea-border-color",
|
|
11315
|
+
"default": "var(--n-color-border-strong)"
|
|
11316
|
+
},
|
|
11317
|
+
{
|
|
11318
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
11319
|
+
"name": "--n-textarea-border-radius",
|
|
11320
|
+
"default": "var(--n-border-radius-s)"
|
|
11156
11321
|
}
|
|
11157
11322
|
],
|
|
11158
11323
|
"slots": [
|
|
11159
11324
|
{
|
|
11160
|
-
"description": "
|
|
11161
|
-
"name": ""
|
|
11325
|
+
"description": "Use when a label requires more than plain text.",
|
|
11326
|
+
"name": "label"
|
|
11162
11327
|
},
|
|
11163
11328
|
{
|
|
11164
|
-
"description": "
|
|
11165
|
-
"name": "
|
|
11329
|
+
"description": "Optional slot that holds hint text for the textarea.",
|
|
11330
|
+
"name": "hint"
|
|
11331
|
+
},
|
|
11332
|
+
{
|
|
11333
|
+
"description": "Optional slot that holds error text for the textarea.",
|
|
11334
|
+
"name": "error"
|
|
11166
11335
|
}
|
|
11167
11336
|
],
|
|
11168
11337
|
"members": [
|
|
11169
11338
|
{
|
|
11170
11339
|
"kind": "field",
|
|
11171
|
-
"name": "
|
|
11172
|
-
"privacy": "private",
|
|
11173
|
-
"default": "new DirectionController(this)"
|
|
11174
|
-
},
|
|
11175
|
-
{
|
|
11176
|
-
"kind": "field",
|
|
11177
|
-
"name": "observer",
|
|
11340
|
+
"name": "inputId",
|
|
11178
11341
|
"type": {
|
|
11179
|
-
"text": "
|
|
11342
|
+
"text": "string"
|
|
11180
11343
|
},
|
|
11181
|
-
"privacy": "
|
|
11344
|
+
"privacy": "protected",
|
|
11345
|
+
"default": "\"textarea\"",
|
|
11346
|
+
"inheritedFrom": {
|
|
11347
|
+
"name": "FormAssociatedMixin",
|
|
11348
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11349
|
+
}
|
|
11182
11350
|
},
|
|
11183
11351
|
{
|
|
11184
11352
|
"kind": "field",
|
|
11185
|
-
"name": "
|
|
11353
|
+
"name": "resize",
|
|
11186
11354
|
"type": {
|
|
11187
|
-
"text": "
|
|
11355
|
+
"text": "\"vertical\" | \"auto\""
|
|
11188
11356
|
},
|
|
11189
|
-
"
|
|
11190
|
-
"
|
|
11191
|
-
"
|
|
11357
|
+
"default": "\"vertical\"",
|
|
11358
|
+
"description": "Controls whether the textarea is resizable.\nBy default is manually resizable vertically.\nSet to \"auto\" to enable auto-resizing as content grows.",
|
|
11359
|
+
"attribute": "resize",
|
|
11360
|
+
"reflects": true
|
|
11192
11361
|
},
|
|
11193
11362
|
{
|
|
11194
11363
|
"kind": "field",
|
|
11195
|
-
"name": "
|
|
11196
|
-
"
|
|
11197
|
-
|
|
11198
|
-
|
|
11364
|
+
"name": "expand",
|
|
11365
|
+
"type": {
|
|
11366
|
+
"text": "boolean"
|
|
11367
|
+
},
|
|
11368
|
+
"default": "false",
|
|
11369
|
+
"description": "Controls whether the textarea expands to fill the width of its container.",
|
|
11370
|
+
"attribute": "expand",
|
|
11371
|
+
"reflects": true
|
|
11372
|
+
},
|
|
11373
|
+
{
|
|
11374
|
+
"kind": "method",
|
|
11375
|
+
"name": "resizeToFitContent",
|
|
11376
|
+
"privacy": "protected"
|
|
11199
11377
|
},
|
|
11200
11378
|
{
|
|
11201
11379
|
"kind": "field",
|
|
11202
|
-
"name": "
|
|
11380
|
+
"name": "size",
|
|
11203
11381
|
"type": {
|
|
11204
|
-
"text": "
|
|
11382
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
11205
11383
|
},
|
|
11206
|
-
"default": "\"\"",
|
|
11207
|
-
"description": "
|
|
11208
|
-
"attribute": "
|
|
11209
|
-
"reflects": true
|
|
11384
|
+
"default": "\"m\"",
|
|
11385
|
+
"description": "The size of the component.",
|
|
11386
|
+
"attribute": "size",
|
|
11387
|
+
"reflects": true,
|
|
11388
|
+
"inheritedFrom": {
|
|
11389
|
+
"name": "SizeMixin",
|
|
11390
|
+
"module": "src/common/mixins/SizeMixin.ts"
|
|
11391
|
+
}
|
|
11210
11392
|
},
|
|
11211
11393
|
{
|
|
11212
11394
|
"kind": "field",
|
|
11213
|
-
"name": "
|
|
11395
|
+
"name": "labelSlot",
|
|
11396
|
+
"privacy": "protected",
|
|
11397
|
+
"default": "new SlotController(this, \"label\")",
|
|
11398
|
+
"inheritedFrom": {
|
|
11399
|
+
"name": "FormAssociatedMixin",
|
|
11400
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11401
|
+
}
|
|
11402
|
+
},
|
|
11403
|
+
{
|
|
11404
|
+
"kind": "field",
|
|
11405
|
+
"name": "errorSlot",
|
|
11406
|
+
"privacy": "protected",
|
|
11407
|
+
"default": "new SlotController(this, \"error\")",
|
|
11408
|
+
"inheritedFrom": {
|
|
11409
|
+
"name": "FormAssociatedMixin",
|
|
11410
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11411
|
+
}
|
|
11412
|
+
},
|
|
11413
|
+
{
|
|
11414
|
+
"kind": "field",
|
|
11415
|
+
"name": "hintSlot",
|
|
11416
|
+
"privacy": "protected",
|
|
11417
|
+
"default": "new SlotController(this, \"hint\")",
|
|
11418
|
+
"inheritedFrom": {
|
|
11419
|
+
"name": "FormAssociatedMixin",
|
|
11420
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11421
|
+
}
|
|
11422
|
+
},
|
|
11423
|
+
{
|
|
11424
|
+
"kind": "field",
|
|
11425
|
+
"name": "formData",
|
|
11426
|
+
"privacy": "protected",
|
|
11427
|
+
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
11428
|
+
"inheritedFrom": {
|
|
11429
|
+
"name": "FormAssociatedMixin",
|
|
11430
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11431
|
+
}
|
|
11432
|
+
},
|
|
11433
|
+
{
|
|
11434
|
+
"kind": "field",
|
|
11435
|
+
"name": "formValue",
|
|
11436
|
+
"privacy": "protected",
|
|
11437
|
+
"inheritedFrom": {
|
|
11438
|
+
"name": "FormAssociatedMixin",
|
|
11439
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11440
|
+
}
|
|
11441
|
+
},
|
|
11442
|
+
{
|
|
11443
|
+
"kind": "field",
|
|
11444
|
+
"name": "errorId",
|
|
11214
11445
|
"type": {
|
|
11215
|
-
"text": "
|
|
11446
|
+
"text": "string"
|
|
11216
11447
|
},
|
|
11217
|
-
"
|
|
11218
|
-
"
|
|
11219
|
-
"
|
|
11220
|
-
|
|
11448
|
+
"privacy": "protected",
|
|
11449
|
+
"default": "\"error\"",
|
|
11450
|
+
"inheritedFrom": {
|
|
11451
|
+
"name": "FormAssociatedMixin",
|
|
11452
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11453
|
+
}
|
|
11221
11454
|
},
|
|
11222
11455
|
{
|
|
11223
11456
|
"kind": "field",
|
|
11224
|
-
"name": "
|
|
11457
|
+
"name": "hintId",
|
|
11225
11458
|
"type": {
|
|
11226
|
-
"text": "
|
|
11459
|
+
"text": "string"
|
|
11227
11460
|
},
|
|
11228
|
-
"
|
|
11229
|
-
"
|
|
11230
|
-
"
|
|
11231
|
-
|
|
11461
|
+
"privacy": "protected",
|
|
11462
|
+
"default": "\"hint\"",
|
|
11463
|
+
"inheritedFrom": {
|
|
11464
|
+
"name": "FormAssociatedMixin",
|
|
11465
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11466
|
+
}
|
|
11232
11467
|
},
|
|
11233
11468
|
{
|
|
11234
11469
|
"kind": "field",
|
|
11235
|
-
"name": "
|
|
11236
|
-
"
|
|
11237
|
-
|
|
11470
|
+
"name": "label",
|
|
11471
|
+
"type": {
|
|
11472
|
+
"text": "string"
|
|
11473
|
+
},
|
|
11474
|
+
"default": "\"\"",
|
|
11475
|
+
"description": "Label for the input.",
|
|
11476
|
+
"attribute": "label",
|
|
11477
|
+
"inheritedFrom": {
|
|
11478
|
+
"name": "FormAssociatedMixin",
|
|
11479
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11480
|
+
}
|
|
11238
11481
|
},
|
|
11239
11482
|
{
|
|
11240
|
-
"kind": "
|
|
11241
|
-
"name": "
|
|
11242
|
-
"
|
|
11483
|
+
"kind": "field",
|
|
11484
|
+
"name": "hint",
|
|
11485
|
+
"type": {
|
|
11486
|
+
"text": "string | undefined"
|
|
11487
|
+
},
|
|
11488
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
11489
|
+
"attribute": "hint",
|
|
11490
|
+
"inheritedFrom": {
|
|
11491
|
+
"name": "FormAssociatedMixin",
|
|
11492
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11493
|
+
}
|
|
11243
11494
|
},
|
|
11244
11495
|
{
|
|
11245
11496
|
"kind": "field",
|
|
11246
|
-
"name": "
|
|
11247
|
-
"
|
|
11248
|
-
|
|
11497
|
+
"name": "hideLabel",
|
|
11498
|
+
"type": {
|
|
11499
|
+
"text": "boolean"
|
|
11500
|
+
},
|
|
11501
|
+
"default": "false",
|
|
11502
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
11503
|
+
"attribute": "hide-label",
|
|
11504
|
+
"inheritedFrom": {
|
|
11505
|
+
"name": "FormAssociatedMixin",
|
|
11506
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11507
|
+
}
|
|
11249
11508
|
},
|
|
11250
11509
|
{
|
|
11251
11510
|
"kind": "field",
|
|
11252
|
-
"name": "
|
|
11253
|
-
"
|
|
11254
|
-
|
|
11511
|
+
"name": "placeholder",
|
|
11512
|
+
"type": {
|
|
11513
|
+
"text": "string | undefined"
|
|
11514
|
+
},
|
|
11515
|
+
"description": "Placeholder text to display within the input.",
|
|
11516
|
+
"attribute": "placeholder",
|
|
11517
|
+
"inheritedFrom": {
|
|
11518
|
+
"name": "FormAssociatedMixin",
|
|
11519
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11520
|
+
}
|
|
11255
11521
|
},
|
|
11256
11522
|
{
|
|
11257
|
-
"kind": "
|
|
11258
|
-
"name": "
|
|
11259
|
-
"
|
|
11260
|
-
|
|
11523
|
+
"kind": "field",
|
|
11524
|
+
"name": "error",
|
|
11525
|
+
"type": {
|
|
11526
|
+
"text": "string | undefined"
|
|
11527
|
+
},
|
|
11528
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
11529
|
+
"attribute": "error",
|
|
11530
|
+
"inheritedFrom": {
|
|
11531
|
+
"name": "FormAssociatedMixin",
|
|
11532
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11533
|
+
}
|
|
11261
11534
|
},
|
|
11262
11535
|
{
|
|
11263
|
-
"kind": "
|
|
11264
|
-
"name": "
|
|
11265
|
-
"
|
|
11266
|
-
|
|
11536
|
+
"kind": "field",
|
|
11537
|
+
"name": "required",
|
|
11538
|
+
"type": {
|
|
11539
|
+
"text": "boolean"
|
|
11540
|
+
},
|
|
11541
|
+
"default": "false",
|
|
11542
|
+
"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.",
|
|
11543
|
+
"attribute": "required",
|
|
11544
|
+
"inheritedFrom": {
|
|
11545
|
+
"name": "FormAssociatedMixin",
|
|
11546
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11547
|
+
}
|
|
11267
11548
|
},
|
|
11268
11549
|
{
|
|
11269
11550
|
"kind": "method",
|
|
11270
|
-
"name": "
|
|
11271
|
-
"privacy": "
|
|
11551
|
+
"name": "handleInput",
|
|
11552
|
+
"privacy": "protected",
|
|
11272
11553
|
"parameters": [
|
|
11273
11554
|
{
|
|
11274
|
-
"name": "
|
|
11555
|
+
"name": "e",
|
|
11275
11556
|
"type": {
|
|
11276
11557
|
"text": "Event"
|
|
11277
11558
|
}
|
|
11278
11559
|
}
|
|
11279
|
-
]
|
|
11560
|
+
],
|
|
11561
|
+
"inheritedFrom": {
|
|
11562
|
+
"name": "FormAssociatedMixin",
|
|
11563
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11564
|
+
}
|
|
11280
11565
|
},
|
|
11281
11566
|
{
|
|
11282
11567
|
"kind": "method",
|
|
11283
|
-
"name": "
|
|
11284
|
-
"privacy": "
|
|
11568
|
+
"name": "handleChange",
|
|
11569
|
+
"privacy": "protected",
|
|
11285
11570
|
"parameters": [
|
|
11286
11571
|
{
|
|
11287
|
-
"name": "
|
|
11572
|
+
"name": "e",
|
|
11288
11573
|
"type": {
|
|
11289
|
-
"text": "
|
|
11574
|
+
"text": "Event"
|
|
11290
11575
|
}
|
|
11291
11576
|
}
|
|
11292
11577
|
],
|
|
11293
|
-
"
|
|
11578
|
+
"inheritedFrom": {
|
|
11579
|
+
"name": "FormAssociatedMixin",
|
|
11580
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11581
|
+
}
|
|
11294
11582
|
},
|
|
11295
11583
|
{
|
|
11296
11584
|
"kind": "method",
|
|
11297
|
-
"name": "
|
|
11298
|
-
"privacy": "
|
|
11299
|
-
"
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
"text": "KeyboardEvent"
|
|
11304
|
-
}
|
|
11305
|
-
}
|
|
11306
|
-
],
|
|
11307
|
-
"description": "Handle keyboard accessible controls."
|
|
11585
|
+
"name": "renderLabel",
|
|
11586
|
+
"privacy": "protected",
|
|
11587
|
+
"inheritedFrom": {
|
|
11588
|
+
"name": "FormAssociatedMixin",
|
|
11589
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11590
|
+
}
|
|
11308
11591
|
},
|
|
11309
11592
|
{
|
|
11310
11593
|
"kind": "method",
|
|
11311
|
-
"name": "
|
|
11312
|
-
"privacy": "
|
|
11313
|
-
"
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
"text": "Tab"
|
|
11318
|
-
}
|
|
11319
|
-
}
|
|
11320
|
-
],
|
|
11321
|
-
"description": "Update the selected tab button with attributes and values.\nUpdate the tab group state."
|
|
11322
|
-
}
|
|
11323
|
-
],
|
|
11324
|
-
"attributes": [
|
|
11325
|
-
{
|
|
11326
|
-
"name": "label",
|
|
11327
|
-
"type": {
|
|
11328
|
-
"text": "string"
|
|
11329
|
-
},
|
|
11330
|
-
"default": "\"\"",
|
|
11331
|
-
"description": "Adds an accessible label to the tab list container.",
|
|
11332
|
-
"fieldName": "label"
|
|
11594
|
+
"name": "renderError",
|
|
11595
|
+
"privacy": "protected",
|
|
11596
|
+
"inheritedFrom": {
|
|
11597
|
+
"name": "FormAssociatedMixin",
|
|
11598
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11599
|
+
}
|
|
11333
11600
|
},
|
|
11334
11601
|
{
|
|
11335
|
-
"
|
|
11336
|
-
"
|
|
11337
|
-
|
|
11338
|
-
|
|
11339
|
-
|
|
11340
|
-
|
|
11341
|
-
|
|
11602
|
+
"kind": "method",
|
|
11603
|
+
"name": "getDescribedBy",
|
|
11604
|
+
"privacy": "protected",
|
|
11605
|
+
"inheritedFrom": {
|
|
11606
|
+
"name": "FormAssociatedMixin",
|
|
11607
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11608
|
+
}
|
|
11342
11609
|
},
|
|
11343
11610
|
{
|
|
11344
|
-
"
|
|
11345
|
-
"
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
}
|
|
11352
|
-
],
|
|
11353
|
-
"superclass": {
|
|
11354
|
-
"name": "LitElement",
|
|
11355
|
-
"package": "lit"
|
|
11356
|
-
},
|
|
11357
|
-
"status": "new",
|
|
11358
|
-
"category": "navigation",
|
|
11359
|
-
"displayName": null,
|
|
11360
|
-
"examples": [],
|
|
11361
|
-
"tagName": "nord-tab-group",
|
|
11362
|
-
"customElement": true
|
|
11363
|
-
}
|
|
11364
|
-
],
|
|
11365
|
-
"exports": [
|
|
11366
|
-
{
|
|
11367
|
-
"kind": "js",
|
|
11368
|
-
"name": "default",
|
|
11369
|
-
"declaration": {
|
|
11370
|
-
"name": "TabGroup",
|
|
11371
|
-
"module": "src/tab-group/TabGroup.ts"
|
|
11372
|
-
}
|
|
11373
|
-
},
|
|
11374
|
-
{
|
|
11375
|
-
"kind": "custom-element-definition",
|
|
11376
|
-
"name": "nord-tab-group",
|
|
11377
|
-
"declaration": {
|
|
11378
|
-
"name": "TabGroup",
|
|
11379
|
-
"module": "src/tab-group/TabGroup.ts"
|
|
11380
|
-
}
|
|
11381
|
-
}
|
|
11382
|
-
],
|
|
11383
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow multiple panels to be contained within a single window.\n- Use the tab panel and tab components within the tab group component.\n- Use the tab and tab panel components in order to create a tab group content structure.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use other components to the tab and tab panel within the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n- Don't add a tab or tab panel component without providing an accompanying panel or tab.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the tab component related to the panel to select the tab but prevent the order of the tabs being affected.\n"
|
|
11384
|
-
},
|
|
11385
|
-
{
|
|
11386
|
-
"kind": "javascript-module",
|
|
11387
|
-
"path": "src/tab-panel/TabPanel.ts",
|
|
11388
|
-
"declarations": [
|
|
11389
|
-
{
|
|
11390
|
-
"kind": "class",
|
|
11391
|
-
"description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
|
|
11392
|
-
"name": "TabPanel",
|
|
11393
|
-
"slots": [
|
|
11394
|
-
{
|
|
11395
|
-
"description": "The tab panel content.",
|
|
11396
|
-
"name": ""
|
|
11397
|
-
}
|
|
11398
|
-
],
|
|
11399
|
-
"members": [],
|
|
11400
|
-
"superclass": {
|
|
11401
|
-
"name": "LitElement",
|
|
11402
|
-
"package": "lit"
|
|
11403
|
-
},
|
|
11404
|
-
"status": "new",
|
|
11405
|
-
"category": "navigation",
|
|
11406
|
-
"displayName": null,
|
|
11407
|
-
"examples": [],
|
|
11408
|
-
"tagName": "nord-tab-panel",
|
|
11409
|
-
"customElement": true
|
|
11410
|
-
}
|
|
11411
|
-
],
|
|
11412
|
-
"exports": [
|
|
11413
|
-
{
|
|
11414
|
-
"kind": "js",
|
|
11415
|
-
"name": "default",
|
|
11416
|
-
"declaration": {
|
|
11417
|
-
"name": "TabPanel",
|
|
11418
|
-
"module": "src/tab-panel/TabPanel.ts"
|
|
11419
|
-
}
|
|
11420
|
-
},
|
|
11421
|
-
{
|
|
11422
|
-
"kind": "custom-element-definition",
|
|
11423
|
-
"name": "nord-tab-panel",
|
|
11424
|
-
"declaration": {
|
|
11425
|
-
"name": "TabPanel",
|
|
11426
|
-
"module": "src/tab-panel/TabPanel.ts"
|
|
11427
|
-
}
|
|
11428
|
-
}
|
|
11429
|
-
],
|
|
11430
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n"
|
|
11431
|
-
},
|
|
11432
|
-
{
|
|
11433
|
-
"kind": "javascript-module",
|
|
11434
|
-
"path": "src/table/Table.ts",
|
|
11435
|
-
"declarations": [
|
|
11436
|
-
{
|
|
11437
|
-
"kind": "class",
|
|
11438
|
-
"description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
|
|
11439
|
-
"name": "Table",
|
|
11440
|
-
"cssProperties": [
|
|
11441
|
-
{
|
|
11442
|
-
"description": "Controls the padding around the table cells.",
|
|
11443
|
-
"name": "--n-table-td-padding",
|
|
11444
|
-
"default": "calc(var(--n-space-m) * 0.95)"
|
|
11611
|
+
"kind": "method",
|
|
11612
|
+
"name": "getInvalid",
|
|
11613
|
+
"privacy": "protected",
|
|
11614
|
+
"inheritedFrom": {
|
|
11615
|
+
"name": "FormAssociatedMixin",
|
|
11616
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11617
|
+
}
|
|
11445
11618
|
},
|
|
11446
|
-
{
|
|
11447
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
11448
|
-
"name": "--n-table-border-radius",
|
|
11449
|
-
"default": "var(--n-border-radius-s)"
|
|
11450
|
-
}
|
|
11451
|
-
],
|
|
11452
|
-
"slots": [
|
|
11453
|
-
{
|
|
11454
|
-
"description": "Default slot which holds the HTML `<table>` element.",
|
|
11455
|
-
"name": ""
|
|
11456
|
-
}
|
|
11457
|
-
],
|
|
11458
|
-
"members": [
|
|
11459
11619
|
{
|
|
11460
11620
|
"kind": "field",
|
|
11461
|
-
"name": "
|
|
11462
|
-
"
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
"attribute": "density",
|
|
11468
|
-
"reflects": true
|
|
11621
|
+
"name": "hasHint",
|
|
11622
|
+
"privacy": "protected",
|
|
11623
|
+
"inheritedFrom": {
|
|
11624
|
+
"name": "FormAssociatedMixin",
|
|
11625
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11626
|
+
}
|
|
11469
11627
|
},
|
|
11470
11628
|
{
|
|
11471
11629
|
"kind": "field",
|
|
11472
|
-
"name": "
|
|
11473
|
-
"
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
"attribute": "scroll-snap",
|
|
11479
|
-
"reflects": true
|
|
11630
|
+
"name": "hasError",
|
|
11631
|
+
"privacy": "protected",
|
|
11632
|
+
"inheritedFrom": {
|
|
11633
|
+
"name": "FormAssociatedMixin",
|
|
11634
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11635
|
+
}
|
|
11480
11636
|
},
|
|
11481
11637
|
{
|
|
11482
11638
|
"kind": "field",
|
|
11483
|
-
"name": "
|
|
11484
|
-
"type": {
|
|
11485
|
-
"text": "boolean"
|
|
11486
|
-
},
|
|
11487
|
-
"default": "false",
|
|
11488
|
-
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
11489
|
-
"attribute": "striped",
|
|
11490
|
-
"reflects": true
|
|
11491
|
-
},
|
|
11492
|
-
{
|
|
11493
|
-
"kind": "method",
|
|
11494
|
-
"name": "renderStyles",
|
|
11495
|
-
"privacy": "private",
|
|
11496
|
-
"description": "renders table styles into nearest root.\nthis is necessary since we do not use shadow dom."
|
|
11497
|
-
},
|
|
11498
|
-
{
|
|
11499
|
-
"kind": "method",
|
|
11500
|
-
"name": "createRenderRoot",
|
|
11501
|
-
"privacy": "protected",
|
|
11502
|
-
"description": "opt out of shadow dom"
|
|
11503
|
-
}
|
|
11504
|
-
],
|
|
11505
|
-
"attributes": [
|
|
11506
|
-
{
|
|
11507
|
-
"name": "density",
|
|
11639
|
+
"name": "autocomplete",
|
|
11508
11640
|
"type": {
|
|
11509
|
-
"text": "
|
|
11641
|
+
"text": "AutocompleteAttribute"
|
|
11510
11642
|
},
|
|
11511
|
-
"default": "\"
|
|
11512
|
-
"description": "
|
|
11513
|
-
"
|
|
11643
|
+
"default": "\"off\"",
|
|
11644
|
+
"description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
|
|
11645
|
+
"attribute": "autocomplete",
|
|
11646
|
+
"inheritedFrom": {
|
|
11647
|
+
"name": "AutocompleteMixin",
|
|
11648
|
+
"module": "src/common/mixins/AutocompleteMixin.ts"
|
|
11649
|
+
}
|
|
11514
11650
|
},
|
|
11515
11651
|
{
|
|
11516
|
-
"
|
|
11652
|
+
"kind": "field",
|
|
11653
|
+
"name": "readonly",
|
|
11517
11654
|
"type": {
|
|
11518
11655
|
"text": "boolean"
|
|
11519
11656
|
},
|
|
11520
11657
|
"default": "false",
|
|
11521
|
-
"description": "
|
|
11522
|
-
"
|
|
11658
|
+
"description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
|
|
11659
|
+
"attribute": "readonly",
|
|
11660
|
+
"reflects": true,
|
|
11661
|
+
"inheritedFrom": {
|
|
11662
|
+
"name": "ReadonlyMixin",
|
|
11663
|
+
"module": "src/common/mixins/ReadonlyMixin.ts"
|
|
11664
|
+
}
|
|
11523
11665
|
},
|
|
11524
11666
|
{
|
|
11525
|
-
"
|
|
11667
|
+
"kind": "field",
|
|
11668
|
+
"name": "disabled",
|
|
11526
11669
|
"type": {
|
|
11527
11670
|
"text": "boolean"
|
|
11528
11671
|
},
|
|
11529
11672
|
"default": "false",
|
|
11530
|
-
"description": "
|
|
11531
|
-
"
|
|
11532
|
-
|
|
11533
|
-
],
|
|
11534
|
-
"superclass": {
|
|
11535
|
-
"name": "LitElement",
|
|
11536
|
-
"package": "lit"
|
|
11537
|
-
},
|
|
11538
|
-
"status": "ready",
|
|
11539
|
-
"category": "list",
|
|
11540
|
-
"displayName": null,
|
|
11541
|
-
"examples": [
|
|
11542
|
-
{
|
|
11543
|
-
"name": "with react and tanstack table",
|
|
11544
|
-
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview"
|
|
11545
|
-
},
|
|
11546
|
-
{
|
|
11547
|
-
"name": "with react and ag grid",
|
|
11548
|
-
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview"
|
|
11549
|
-
},
|
|
11550
|
-
{
|
|
11551
|
-
"name": "with vue and tanstack table",
|
|
11552
|
-
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview"
|
|
11553
|
-
},
|
|
11554
|
-
{
|
|
11555
|
-
"name": "with vue and ag grid",
|
|
11556
|
-
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview"
|
|
11557
|
-
}
|
|
11558
|
-
],
|
|
11559
|
-
"tagName": "nord-table",
|
|
11560
|
-
"customElement": true
|
|
11561
|
-
}
|
|
11562
|
-
],
|
|
11563
|
-
"exports": [
|
|
11564
|
-
{
|
|
11565
|
-
"kind": "js",
|
|
11566
|
-
"name": "default",
|
|
11567
|
-
"declaration": {
|
|
11568
|
-
"name": "Table",
|
|
11569
|
-
"module": "src/table/Table.ts"
|
|
11570
|
-
}
|
|
11571
|
-
},
|
|
11572
|
-
{
|
|
11573
|
-
"kind": "custom-element-definition",
|
|
11574
|
-
"name": "nord-table",
|
|
11575
|
-
"declaration": {
|
|
11576
|
-
"name": "Table",
|
|
11577
|
-
"module": "src/table/Table.ts"
|
|
11578
|
-
}
|
|
11579
|
-
}
|
|
11580
|
-
],
|
|
11581
|
-
"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 display tabular data in a view.\n- Use a `<table>` element directly within the component.\n- Use inside a [Card](/components/card/?example=with+table), and give the card a header.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n- Don't use a primary button in every row of a table.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n\n---\n\n## Advanced use-cases\n\nThe table component itself does not provide any functionality, only styles. This works well for simple or static tables, but there are instances where functionality such as sorting, resizing, or column dragging are required. This kind of functionality is out of scope for the table component, as the spectrum of possible use-cases is too broad for a single component to cover effectively. Whilst the table component is limited out of the box, these same limitations make it easy to integrate with third-party libraries which offer advanced functionality.\n\nBroadly speaking, there are two categories of library for building advanced tables: _headless_ and _component-based_.\n\n### Which kind of table library should I use?\n\nEach approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team.\n\n#### Component-based Table Libraries\n\nComponent-based table libraries will typically supply you with a feature-rich drop-in solution, and ready-to-use components/markup complete with styles/theming.\n\n**Pros:**\n\n- Ship with ready-to-use markup/styles.\n- Little setup required.\n- Turn-key experience.\n\n**Cons:**\n\n- Less control over markup.\n- Custom styles are typically theme-based.\n- Larger bundle-sizes.\n\nIf you want a ready-to-use table and design/bundle-size are not hard requirements, then you should consider using a component-based table library.\n\n#### Headless Table Libraries\n\nHeadless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups.\n\n**Pros:**\n\n- Full control over markup and styles.\n- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc).\n- Smaller bundle-sizes.\n\n**Cons:**\n\n- More setup and effort required.\n- No markup, styles or themes provided.\n\nIf you want a lighter-weight table or full control over the design, then you should consider using a headless table library.\n\n### Recommendation for headless libraries\n\nIn the headless category, we recommend [Tanstack Table](https://tanstack.com/table/). Tanstack table offers integrations for many UI frameworks, such as Vue and React. It is easy to work with, and because it does not bring any HTML or styles itself, you can use it to render a plain, semantic `<table>` wrapped in a `<nord-table>`, and you will get all the necessary styles.\n\nWe have created examples in both Vue and React, showing how to combine Tanstack table with Nord's table component, in order to build a table with both sorting and resizable columns. Check out the [React example](/components/table/?example=with+react+and+tanstack+table) and likewise the [Vue example](/components/table/?example=with+vue+and+tanstack+table).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / Tanstack table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / Tanstack table source\n </nord-button>\n</nord-stack>\n\n### Recommendation for component-based libraries\n\nIn the component-based category, we recommend [AG Grid](https://www.ag-grid.com/), specifically the community edition. AG Grid is feature-rich, has extensive documentation, and offers integrations for many UI frameworks, such as Vue and React. AG Grid takes control of all rendering and output, but offers extension points for taking control of some aspects. It does not output a `<table>` element, so it cannot be used with Nord's own table component.\n\nHowever it can be styled via themes, and we have created a Nord theme using our design tokens. The theme is published on npm as `@nordhealth/ag-theme-nord`. To use the theme, include the CSS in your project and add the class `ag-theme-nord` to the element wrapping AG Grid.\n\nWe have created examples in both Vue and React showing how to combine AG Grid with Nord's theme, in order to build a table with sorting, resizable columns, draggable and re-orderable columns, plus sticky/pinned columns. Check out the [React example](/components/table/?example=with+react+and+ag+grid) and likewise the [Vue example](/components/table/?example=with+vue+and+ag+grid).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l n-margin-be-s\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / AG Grid table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / AG Grid table source\n </nord-button>\n</nord-stack>\n"
|
|
11582
|
-
},
|
|
11583
|
-
{
|
|
11584
|
-
"kind": "javascript-module",
|
|
11585
|
-
"path": "src/textarea/Textarea.ts",
|
|
11586
|
-
"declarations": [
|
|
11587
|
-
{
|
|
11588
|
-
"kind": "class",
|
|
11589
|
-
"description": "Textarea is a component that allows user to write text over\nmultiple rows. Used when the expected user input is long.\nFor shorter input, use the Input component.",
|
|
11590
|
-
"name": "Textarea",
|
|
11591
|
-
"cssProperties": [
|
|
11592
|
-
{
|
|
11593
|
-
"description": "Controls the inline size, or width, of the textarea.",
|
|
11594
|
-
"name": "--n-textarea-inline-size",
|
|
11595
|
-
"default": "240px"
|
|
11596
|
-
},
|
|
11597
|
-
{
|
|
11598
|
-
"description": "Controls the block size, or height, or the textarea.",
|
|
11599
|
-
"name": "--n-textarea-block-size",
|
|
11600
|
-
"default": "76px"
|
|
11601
|
-
},
|
|
11602
|
-
{
|
|
11603
|
-
"description": "Controls the background of the textarea, using our [color tokens](/tokens/#color).",
|
|
11604
|
-
"name": "--n-textarea-background",
|
|
11605
|
-
"default": "var(--n-color-active)"
|
|
11606
|
-
},
|
|
11607
|
-
{
|
|
11608
|
-
"description": "Controls the text color of the textarea, using our [color tokens](/tokens/#color).",
|
|
11609
|
-
"name": "--n-textarea-color",
|
|
11610
|
-
"default": "var(--n-color-text)"
|
|
11611
|
-
},
|
|
11612
|
-
{
|
|
11613
|
-
"description": "Controls the border color of the textarea, using our [color tokens](/tokens/#color).",
|
|
11614
|
-
"name": "--n-textarea-border-color",
|
|
11615
|
-
"default": "var(--n-color-border-strong)"
|
|
11616
|
-
},
|
|
11617
|
-
{
|
|
11618
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
11619
|
-
"name": "--n-textarea-border-radius",
|
|
11620
|
-
"default": "var(--n-border-radius-s)"
|
|
11621
|
-
}
|
|
11622
|
-
],
|
|
11623
|
-
"slots": [
|
|
11624
|
-
{
|
|
11625
|
-
"description": "Use when a label requires more than plain text.",
|
|
11626
|
-
"name": "label"
|
|
11627
|
-
},
|
|
11628
|
-
{
|
|
11629
|
-
"description": "Optional slot that holds hint text for the textarea.",
|
|
11630
|
-
"name": "hint"
|
|
11631
|
-
},
|
|
11632
|
-
{
|
|
11633
|
-
"description": "Optional slot that holds error text for the textarea.",
|
|
11634
|
-
"name": "error"
|
|
11635
|
-
}
|
|
11636
|
-
],
|
|
11637
|
-
"members": [
|
|
11638
|
-
{
|
|
11639
|
-
"kind": "field",
|
|
11640
|
-
"name": "inputId",
|
|
11641
|
-
"type": {
|
|
11642
|
-
"text": "string"
|
|
11643
|
-
},
|
|
11644
|
-
"privacy": "protected",
|
|
11645
|
-
"default": "\"textarea\"",
|
|
11673
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
11674
|
+
"attribute": "disabled",
|
|
11675
|
+
"reflects": true,
|
|
11646
11676
|
"inheritedFrom": {
|
|
11647
|
-
"name": "
|
|
11648
|
-
"module": "src/common/mixins/
|
|
11677
|
+
"name": "InputMixin",
|
|
11678
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11649
11679
|
}
|
|
11650
11680
|
},
|
|
11651
11681
|
{
|
|
11652
11682
|
"kind": "field",
|
|
11653
|
-
"name": "
|
|
11654
|
-
"type": {
|
|
11655
|
-
"text": "\"vertical\" | \"auto\""
|
|
11656
|
-
},
|
|
11657
|
-
"default": "\"vertical\"",
|
|
11658
|
-
"description": "Controls whether the textarea is resizable.\nBy default is manually resizable vertically.\nSet to \"auto\" to enable auto-resizing as content grows.",
|
|
11659
|
-
"attribute": "resize",
|
|
11660
|
-
"reflects": true
|
|
11661
|
-
},
|
|
11662
|
-
{
|
|
11663
|
-
"kind": "field",
|
|
11664
|
-
"name": "expand",
|
|
11683
|
+
"name": "name",
|
|
11665
11684
|
"type": {
|
|
11666
|
-
"text": "
|
|
11685
|
+
"text": "string | undefined"
|
|
11667
11686
|
},
|
|
11668
|
-
"
|
|
11669
|
-
"
|
|
11670
|
-
"
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
"kind": "method",
|
|
11675
|
-
"name": "resizeToFitContent",
|
|
11676
|
-
"privacy": "protected"
|
|
11687
|
+
"description": "The name of the form component.",
|
|
11688
|
+
"attribute": "name",
|
|
11689
|
+
"inheritedFrom": {
|
|
11690
|
+
"name": "InputMixin",
|
|
11691
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11692
|
+
}
|
|
11677
11693
|
},
|
|
11678
11694
|
{
|
|
11679
11695
|
"kind": "field",
|
|
11680
|
-
"name": "
|
|
11696
|
+
"name": "value",
|
|
11681
11697
|
"type": {
|
|
11682
|
-
"text": "
|
|
11698
|
+
"text": "string"
|
|
11683
11699
|
},
|
|
11684
|
-
"default": "\"
|
|
11685
|
-
"description": "The
|
|
11686
|
-
"attribute": "
|
|
11687
|
-
"reflects": true,
|
|
11700
|
+
"default": "\"\"",
|
|
11701
|
+
"description": "The value of the form component.",
|
|
11702
|
+
"attribute": "value",
|
|
11688
11703
|
"inheritedFrom": {
|
|
11689
|
-
"name": "
|
|
11690
|
-
"module": "src/common/mixins/
|
|
11704
|
+
"name": "InputMixin",
|
|
11705
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11691
11706
|
}
|
|
11692
11707
|
},
|
|
11693
11708
|
{
|
|
11694
11709
|
"kind": "field",
|
|
11695
|
-
"name": "
|
|
11696
|
-
"
|
|
11697
|
-
"default": "new SlotController(this, \"label\")",
|
|
11710
|
+
"name": "form",
|
|
11711
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
11698
11712
|
"inheritedFrom": {
|
|
11699
|
-
"name": "
|
|
11700
|
-
"module": "src/common/mixins/
|
|
11713
|
+
"name": "InputMixin",
|
|
11714
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11701
11715
|
}
|
|
11702
11716
|
},
|
|
11703
11717
|
{
|
|
11704
11718
|
"kind": "field",
|
|
11705
|
-
"name": "
|
|
11719
|
+
"name": "focusableRef",
|
|
11706
11720
|
"privacy": "protected",
|
|
11707
|
-
"default": "new SlotController(this, \"error\")",
|
|
11708
11721
|
"inheritedFrom": {
|
|
11709
|
-
"name": "
|
|
11710
|
-
"module": "src/common/mixins/
|
|
11722
|
+
"name": "FocusableMixin",
|
|
11723
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11711
11724
|
}
|
|
11712
11725
|
},
|
|
11713
11726
|
{
|
|
11714
|
-
"kind": "
|
|
11715
|
-
"name": "
|
|
11716
|
-
"
|
|
11717
|
-
|
|
11727
|
+
"kind": "method",
|
|
11728
|
+
"name": "focus",
|
|
11729
|
+
"parameters": [
|
|
11730
|
+
{
|
|
11731
|
+
"name": "options",
|
|
11732
|
+
"optional": true,
|
|
11733
|
+
"type": {
|
|
11734
|
+
"text": "FocusOptions"
|
|
11735
|
+
},
|
|
11736
|
+
"description": "An object which controls aspects of the focusing process."
|
|
11737
|
+
}
|
|
11738
|
+
],
|
|
11739
|
+
"description": "Programmatically move focus to the component.",
|
|
11718
11740
|
"inheritedFrom": {
|
|
11719
|
-
"name": "
|
|
11720
|
-
"module": "src/common/mixins/
|
|
11741
|
+
"name": "FocusableMixin",
|
|
11742
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11721
11743
|
}
|
|
11722
11744
|
},
|
|
11723
11745
|
{
|
|
11724
|
-
"kind": "
|
|
11725
|
-
"name": "
|
|
11726
|
-
"
|
|
11727
|
-
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
11746
|
+
"kind": "method",
|
|
11747
|
+
"name": "blur",
|
|
11748
|
+
"description": "Programmatically remove focus from the component.",
|
|
11728
11749
|
"inheritedFrom": {
|
|
11729
|
-
"name": "
|
|
11730
|
-
"module": "src/common/mixins/
|
|
11750
|
+
"name": "FocusableMixin",
|
|
11751
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11731
11752
|
}
|
|
11732
11753
|
},
|
|
11733
11754
|
{
|
|
11734
|
-
"kind": "
|
|
11735
|
-
"name": "
|
|
11736
|
-
"
|
|
11755
|
+
"kind": "method",
|
|
11756
|
+
"name": "click",
|
|
11757
|
+
"description": "Programmatically simulates a click on the component.",
|
|
11737
11758
|
"inheritedFrom": {
|
|
11738
|
-
"name": "
|
|
11739
|
-
"module": "src/common/mixins/
|
|
11759
|
+
"name": "FocusableMixin",
|
|
11760
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11740
11761
|
}
|
|
11762
|
+
}
|
|
11763
|
+
],
|
|
11764
|
+
"attributes": [
|
|
11765
|
+
{
|
|
11766
|
+
"name": "resize",
|
|
11767
|
+
"type": {
|
|
11768
|
+
"text": "\"vertical\" | \"auto\""
|
|
11769
|
+
},
|
|
11770
|
+
"default": "\"vertical\"",
|
|
11771
|
+
"description": "Controls whether the textarea is resizable.\nBy default is manually resizable vertically.\nSet to \"auto\" to enable auto-resizing as content grows.",
|
|
11772
|
+
"fieldName": "resize"
|
|
11741
11773
|
},
|
|
11742
11774
|
{
|
|
11743
|
-
"
|
|
11744
|
-
"name": "errorId",
|
|
11775
|
+
"name": "expand",
|
|
11745
11776
|
"type": {
|
|
11746
|
-
"text": "
|
|
11777
|
+
"text": "boolean"
|
|
11747
11778
|
},
|
|
11748
|
-
"
|
|
11749
|
-
"
|
|
11750
|
-
"
|
|
11751
|
-
"name": "FormAssociatedMixin",
|
|
11752
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11753
|
-
}
|
|
11779
|
+
"default": "false",
|
|
11780
|
+
"description": "Controls whether the textarea expands to fill the width of its container.",
|
|
11781
|
+
"fieldName": "expand"
|
|
11754
11782
|
},
|
|
11755
11783
|
{
|
|
11756
|
-
"
|
|
11757
|
-
"name": "hintId",
|
|
11784
|
+
"name": "size",
|
|
11758
11785
|
"type": {
|
|
11759
|
-
"text": "
|
|
11786
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
11760
11787
|
},
|
|
11761
|
-
"
|
|
11762
|
-
"
|
|
11788
|
+
"default": "\"m\"",
|
|
11789
|
+
"description": "The size of the component.",
|
|
11790
|
+
"fieldName": "size",
|
|
11763
11791
|
"inheritedFrom": {
|
|
11764
|
-
"name": "
|
|
11765
|
-
"module": "src/common/mixins/
|
|
11792
|
+
"name": "SizeMixin",
|
|
11793
|
+
"module": "src/common/mixins/SizeMixin.ts"
|
|
11766
11794
|
}
|
|
11767
11795
|
},
|
|
11768
11796
|
{
|
|
11769
|
-
"kind": "field",
|
|
11770
11797
|
"name": "label",
|
|
11771
11798
|
"type": {
|
|
11772
11799
|
"text": "string"
|
|
11773
11800
|
},
|
|
11774
11801
|
"default": "\"\"",
|
|
11775
11802
|
"description": "Label for the input.",
|
|
11776
|
-
"
|
|
11803
|
+
"fieldName": "label",
|
|
11777
11804
|
"inheritedFrom": {
|
|
11778
11805
|
"name": "FormAssociatedMixin",
|
|
11779
11806
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11780
11807
|
}
|
|
11781
11808
|
},
|
|
11782
11809
|
{
|
|
11783
|
-
"kind": "field",
|
|
11784
11810
|
"name": "hint",
|
|
11785
11811
|
"type": {
|
|
11786
11812
|
"text": "string | undefined"
|
|
11787
11813
|
},
|
|
11788
11814
|
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
11789
|
-
"
|
|
11815
|
+
"fieldName": "hint",
|
|
11790
11816
|
"inheritedFrom": {
|
|
11791
11817
|
"name": "FormAssociatedMixin",
|
|
11792
11818
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11793
11819
|
}
|
|
11794
11820
|
},
|
|
11795
11821
|
{
|
|
11796
|
-
"
|
|
11797
|
-
"name": "hideLabel",
|
|
11822
|
+
"name": "hide-label",
|
|
11798
11823
|
"type": {
|
|
11799
11824
|
"text": "boolean"
|
|
11800
11825
|
},
|
|
11801
11826
|
"default": "false",
|
|
11802
11827
|
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
11803
|
-
"
|
|
11828
|
+
"fieldName": "hideLabel",
|
|
11804
11829
|
"inheritedFrom": {
|
|
11805
11830
|
"name": "FormAssociatedMixin",
|
|
11806
11831
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11807
11832
|
}
|
|
11808
11833
|
},
|
|
11809
11834
|
{
|
|
11810
|
-
"kind": "field",
|
|
11811
11835
|
"name": "placeholder",
|
|
11812
11836
|
"type": {
|
|
11813
11837
|
"text": "string | undefined"
|
|
11814
11838
|
},
|
|
11815
11839
|
"description": "Placeholder text to display within the input.",
|
|
11816
|
-
"
|
|
11840
|
+
"fieldName": "placeholder",
|
|
11817
11841
|
"inheritedFrom": {
|
|
11818
11842
|
"name": "FormAssociatedMixin",
|
|
11819
11843
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11820
11844
|
}
|
|
11821
11845
|
},
|
|
11822
11846
|
{
|
|
11823
|
-
"kind": "field",
|
|
11824
11847
|
"name": "error",
|
|
11825
11848
|
"type": {
|
|
11826
11849
|
"text": "string | undefined"
|
|
11827
11850
|
},
|
|
11828
11851
|
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
11829
|
-
"
|
|
11852
|
+
"fieldName": "error",
|
|
11830
11853
|
"inheritedFrom": {
|
|
11831
11854
|
"name": "FormAssociatedMixin",
|
|
11832
11855
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11833
11856
|
}
|
|
11834
11857
|
},
|
|
11835
11858
|
{
|
|
11836
|
-
"kind": "field",
|
|
11837
11859
|
"name": "required",
|
|
11838
11860
|
"type": {
|
|
11839
11861
|
"text": "boolean"
|
|
11840
11862
|
},
|
|
11841
11863
|
"default": "false",
|
|
11842
11864
|
"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.",
|
|
11843
|
-
"
|
|
11865
|
+
"fieldName": "required",
|
|
11844
11866
|
"inheritedFrom": {
|
|
11845
11867
|
"name": "FormAssociatedMixin",
|
|
11846
11868
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11847
11869
|
}
|
|
11848
11870
|
},
|
|
11849
11871
|
{
|
|
11850
|
-
"
|
|
11851
|
-
"
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
"text": "Event"
|
|
11858
|
-
}
|
|
11859
|
-
}
|
|
11860
|
-
],
|
|
11872
|
+
"name": "autocomplete",
|
|
11873
|
+
"type": {
|
|
11874
|
+
"text": "AutocompleteAttribute"
|
|
11875
|
+
},
|
|
11876
|
+
"default": "\"off\"",
|
|
11877
|
+
"description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
|
|
11878
|
+
"fieldName": "autocomplete",
|
|
11861
11879
|
"inheritedFrom": {
|
|
11862
|
-
"name": "
|
|
11863
|
-
"module": "src/common/mixins/
|
|
11880
|
+
"name": "AutocompleteMixin",
|
|
11881
|
+
"module": "src/common/mixins/AutocompleteMixin.ts"
|
|
11864
11882
|
}
|
|
11865
11883
|
},
|
|
11866
11884
|
{
|
|
11867
|
-
"
|
|
11868
|
-
"
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
"text": "Event"
|
|
11875
|
-
}
|
|
11876
|
-
}
|
|
11877
|
-
],
|
|
11885
|
+
"name": "readonly",
|
|
11886
|
+
"type": {
|
|
11887
|
+
"text": "boolean"
|
|
11888
|
+
},
|
|
11889
|
+
"default": "false",
|
|
11890
|
+
"description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
|
|
11891
|
+
"fieldName": "readonly",
|
|
11878
11892
|
"inheritedFrom": {
|
|
11879
|
-
"name": "
|
|
11880
|
-
"module": "src/common/mixins/
|
|
11893
|
+
"name": "ReadonlyMixin",
|
|
11894
|
+
"module": "src/common/mixins/ReadonlyMixin.ts"
|
|
11881
11895
|
}
|
|
11882
11896
|
},
|
|
11883
11897
|
{
|
|
11884
|
-
"
|
|
11885
|
-
"
|
|
11886
|
-
|
|
11898
|
+
"name": "disabled",
|
|
11899
|
+
"type": {
|
|
11900
|
+
"text": "boolean"
|
|
11901
|
+
},
|
|
11902
|
+
"default": "false",
|
|
11903
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
11904
|
+
"fieldName": "disabled",
|
|
11887
11905
|
"inheritedFrom": {
|
|
11888
|
-
"name": "
|
|
11889
|
-
"module": "src/common/mixins/
|
|
11906
|
+
"name": "InputMixin",
|
|
11907
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11890
11908
|
}
|
|
11891
11909
|
},
|
|
11892
11910
|
{
|
|
11893
|
-
"
|
|
11894
|
-
"
|
|
11895
|
-
|
|
11911
|
+
"name": "name",
|
|
11912
|
+
"type": {
|
|
11913
|
+
"text": "string | undefined"
|
|
11914
|
+
},
|
|
11915
|
+
"description": "The name of the form component.",
|
|
11916
|
+
"fieldName": "name",
|
|
11896
11917
|
"inheritedFrom": {
|
|
11897
|
-
"name": "
|
|
11898
|
-
"module": "src/common/mixins/
|
|
11918
|
+
"name": "InputMixin",
|
|
11919
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11899
11920
|
}
|
|
11900
11921
|
},
|
|
11901
11922
|
{
|
|
11902
|
-
"
|
|
11903
|
-
"
|
|
11904
|
-
|
|
11923
|
+
"name": "value",
|
|
11924
|
+
"type": {
|
|
11925
|
+
"text": "string"
|
|
11926
|
+
},
|
|
11927
|
+
"default": "\"\"",
|
|
11928
|
+
"description": "The value of the form component.",
|
|
11929
|
+
"fieldName": "value",
|
|
11905
11930
|
"inheritedFrom": {
|
|
11906
|
-
"name": "
|
|
11907
|
-
"module": "src/common/mixins/
|
|
11931
|
+
"name": "InputMixin",
|
|
11932
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
11908
11933
|
}
|
|
11934
|
+
}
|
|
11935
|
+
],
|
|
11936
|
+
"mixins": [
|
|
11937
|
+
{
|
|
11938
|
+
"name": "SizeMixin",
|
|
11939
|
+
"module": "/src/common/mixins/SizeMixin.js"
|
|
11909
11940
|
},
|
|
11910
11941
|
{
|
|
11911
|
-
"
|
|
11912
|
-
"
|
|
11913
|
-
|
|
11942
|
+
"name": "FormAssociatedMixin",
|
|
11943
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
11944
|
+
},
|
|
11945
|
+
{
|
|
11946
|
+
"name": "AutocompleteMixin",
|
|
11947
|
+
"module": "/src/common/mixins/AutocompleteMixin.js"
|
|
11948
|
+
},
|
|
11949
|
+
{
|
|
11950
|
+
"name": "ReadonlyMixin",
|
|
11951
|
+
"module": "/src/common/mixins/ReadonlyMixin.js"
|
|
11952
|
+
},
|
|
11953
|
+
{
|
|
11954
|
+
"name": "InputMixin",
|
|
11955
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
11956
|
+
},
|
|
11957
|
+
{
|
|
11958
|
+
"name": "FocusableMixin",
|
|
11959
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
11960
|
+
}
|
|
11961
|
+
],
|
|
11962
|
+
"superclass": {
|
|
11963
|
+
"name": "LitElement",
|
|
11964
|
+
"package": "lit"
|
|
11965
|
+
},
|
|
11966
|
+
"status": "ready",
|
|
11967
|
+
"category": "form",
|
|
11968
|
+
"displayName": null,
|
|
11969
|
+
"examples": [],
|
|
11970
|
+
"tagName": "nord-textarea",
|
|
11971
|
+
"customElement": true,
|
|
11972
|
+
"events": [
|
|
11973
|
+
{
|
|
11974
|
+
"name": "input",
|
|
11975
|
+
"type": {
|
|
11976
|
+
"text": "NordEvent"
|
|
11977
|
+
},
|
|
11978
|
+
"description": "Fired as the user types into the input.",
|
|
11914
11979
|
"inheritedFrom": {
|
|
11915
11980
|
"name": "FormAssociatedMixin",
|
|
11916
11981
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11917
11982
|
}
|
|
11918
11983
|
},
|
|
11919
11984
|
{
|
|
11920
|
-
"
|
|
11921
|
-
"
|
|
11922
|
-
|
|
11985
|
+
"name": "change",
|
|
11986
|
+
"type": {
|
|
11987
|
+
"text": "NordEvent"
|
|
11988
|
+
},
|
|
11989
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
11923
11990
|
"inheritedFrom": {
|
|
11924
11991
|
"name": "FormAssociatedMixin",
|
|
11925
11992
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11926
11993
|
}
|
|
11994
|
+
}
|
|
11995
|
+
]
|
|
11996
|
+
}
|
|
11997
|
+
],
|
|
11998
|
+
"exports": [
|
|
11999
|
+
{
|
|
12000
|
+
"kind": "js",
|
|
12001
|
+
"name": "default",
|
|
12002
|
+
"declaration": {
|
|
12003
|
+
"name": "Textarea",
|
|
12004
|
+
"module": "src/textarea/Textarea.ts"
|
|
12005
|
+
}
|
|
12006
|
+
},
|
|
12007
|
+
{
|
|
12008
|
+
"kind": "custom-element-definition",
|
|
12009
|
+
"name": "nord-textarea",
|
|
12010
|
+
"declaration": {
|
|
12011
|
+
"name": "Textarea",
|
|
12012
|
+
"module": "src/textarea/Textarea.ts"
|
|
12013
|
+
}
|
|
12014
|
+
}
|
|
12015
|
+
],
|
|
12016
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow text input where the expected input is long.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is short. Use input component instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nTextarea labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing textarea 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\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide Description</div>\n\nWhen a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in textarea labels:\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide description:</div>\n"
|
|
12017
|
+
},
|
|
12018
|
+
{
|
|
12019
|
+
"kind": "javascript-module",
|
|
12020
|
+
"path": "src/tab-group/TabGroup.ts",
|
|
12021
|
+
"declarations": [
|
|
12022
|
+
{
|
|
12023
|
+
"kind": "class",
|
|
12024
|
+
"description": "Tab Group allows multiple panels to be contained within a single window,\nusing tabs as a navigational element.",
|
|
12025
|
+
"name": "TabGroup",
|
|
12026
|
+
"cssProperties": [
|
|
12027
|
+
{
|
|
12028
|
+
"description": "Controls the padding around the tab group (including the tab list), using our [spacing tokens](/tokens/#space).",
|
|
12029
|
+
"name": "--n-tab-group-padding",
|
|
12030
|
+
"default": "0"
|
|
12031
|
+
}
|
|
12032
|
+
],
|
|
12033
|
+
"slots": [
|
|
12034
|
+
{
|
|
12035
|
+
"description": "The element which contains the content to be revealed.",
|
|
12036
|
+
"name": ""
|
|
11927
12037
|
},
|
|
12038
|
+
{
|
|
12039
|
+
"description": "The element which contains all tabs to reveal tabbed content.",
|
|
12040
|
+
"name": "tab"
|
|
12041
|
+
}
|
|
12042
|
+
],
|
|
12043
|
+
"members": [
|
|
11928
12044
|
{
|
|
11929
12045
|
"kind": "field",
|
|
11930
|
-
"name": "
|
|
11931
|
-
"privacy": "
|
|
11932
|
-
"
|
|
11933
|
-
"name": "FormAssociatedMixin",
|
|
11934
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
11935
|
-
}
|
|
12046
|
+
"name": "direction",
|
|
12047
|
+
"privacy": "private",
|
|
12048
|
+
"default": "new DirectionController(this)"
|
|
11936
12049
|
},
|
|
11937
12050
|
{
|
|
11938
12051
|
"kind": "field",
|
|
11939
|
-
"name": "
|
|
12052
|
+
"name": "observer",
|
|
11940
12053
|
"type": {
|
|
11941
|
-
"text": "
|
|
12054
|
+
"text": "MutationObserver | undefined"
|
|
11942
12055
|
},
|
|
11943
|
-
"
|
|
11944
|
-
"description": "Specifies the data type of the field, so that the browser may attempt to fill out the field automatically on behalf of the user.",
|
|
11945
|
-
"attribute": "autocomplete",
|
|
11946
|
-
"inheritedFrom": {
|
|
11947
|
-
"name": "AutocompleteMixin",
|
|
11948
|
-
"module": "src/common/mixins/AutocompleteMixin.ts"
|
|
11949
|
-
}
|
|
12056
|
+
"privacy": "private"
|
|
11950
12057
|
},
|
|
11951
12058
|
{
|
|
11952
12059
|
"kind": "field",
|
|
11953
|
-
"name": "
|
|
12060
|
+
"name": "observerOptions",
|
|
11954
12061
|
"type": {
|
|
11955
|
-
"text": "
|
|
12062
|
+
"text": "object"
|
|
11956
12063
|
},
|
|
11957
|
-
"
|
|
11958
|
-
"
|
|
11959
|
-
"
|
|
11960
|
-
"reflects": true,
|
|
11961
|
-
"inheritedFrom": {
|
|
11962
|
-
"name": "ReadonlyMixin",
|
|
11963
|
-
"module": "src/common/mixins/ReadonlyMixin.ts"
|
|
11964
|
-
}
|
|
12064
|
+
"privacy": "private",
|
|
12065
|
+
"static": true,
|
|
12066
|
+
"default": "{\n attributes: true,\n subtree: true,\n attributeFilter: [\"selected\"],\n attributeOldValue: true,\n }"
|
|
11965
12067
|
},
|
|
11966
12068
|
{
|
|
11967
12069
|
"kind": "field",
|
|
11968
|
-
"name": "
|
|
12070
|
+
"name": "tabGroupId",
|
|
12071
|
+
"privacy": "private",
|
|
12072
|
+
"default": "`nord-tab-group-${tabGroupCount++}`",
|
|
12073
|
+
"description": "Unique ID for each tab group component present."
|
|
12074
|
+
},
|
|
12075
|
+
{
|
|
12076
|
+
"kind": "field",
|
|
12077
|
+
"name": "label",
|
|
11969
12078
|
"type": {
|
|
11970
|
-
"text": "
|
|
12079
|
+
"text": "string"
|
|
11971
12080
|
},
|
|
11972
|
-
"default": "
|
|
11973
|
-
"description": "
|
|
11974
|
-
"attribute": "
|
|
11975
|
-
"reflects": true
|
|
11976
|
-
"inheritedFrom": {
|
|
11977
|
-
"name": "InputMixin",
|
|
11978
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
11979
|
-
}
|
|
12081
|
+
"default": "\"\"",
|
|
12082
|
+
"description": "Adds an accessible label to the tab list container.",
|
|
12083
|
+
"attribute": "label",
|
|
12084
|
+
"reflects": true
|
|
11980
12085
|
},
|
|
11981
12086
|
{
|
|
11982
12087
|
"kind": "field",
|
|
11983
|
-
"name": "
|
|
12088
|
+
"name": "padding",
|
|
11984
12089
|
"type": {
|
|
11985
|
-
"text": "
|
|
12090
|
+
"text": "\"m\" | \"l\" | \"none\" | undefined"
|
|
11986
12091
|
},
|
|
11987
|
-
"
|
|
11988
|
-
"
|
|
11989
|
-
"
|
|
11990
|
-
|
|
11991
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
11992
|
-
}
|
|
12092
|
+
"default": "\"m\"",
|
|
12093
|
+
"description": "Controls the padding of the tab group component.",
|
|
12094
|
+
"attribute": "padding",
|
|
12095
|
+
"reflects": true
|
|
11993
12096
|
},
|
|
11994
12097
|
{
|
|
11995
12098
|
"kind": "field",
|
|
11996
|
-
"name": "
|
|
12099
|
+
"name": "sticky",
|
|
11997
12100
|
"type": {
|
|
11998
|
-
"text": "
|
|
12101
|
+
"text": "boolean"
|
|
11999
12102
|
},
|
|
12000
|
-
"default": "
|
|
12001
|
-
"description": "
|
|
12002
|
-
"attribute": "
|
|
12003
|
-
"
|
|
12004
|
-
"name": "InputMixin",
|
|
12005
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12006
|
-
}
|
|
12103
|
+
"default": "false",
|
|
12104
|
+
"description": "Whether the tab list sticks to the top of the tab group as you scroll.",
|
|
12105
|
+
"attribute": "sticky",
|
|
12106
|
+
"reflects": true
|
|
12007
12107
|
},
|
|
12008
12108
|
{
|
|
12009
12109
|
"kind": "field",
|
|
12010
|
-
"name": "
|
|
12011
|
-
"
|
|
12012
|
-
"
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
|
|
12110
|
+
"name": "selectedTab",
|
|
12111
|
+
"privacy": "private",
|
|
12112
|
+
"description": "The current tab node selected in the tab group."
|
|
12113
|
+
},
|
|
12114
|
+
{
|
|
12115
|
+
"kind": "method",
|
|
12116
|
+
"name": "updateSlots",
|
|
12117
|
+
"privacy": "private"
|
|
12016
12118
|
},
|
|
12017
12119
|
{
|
|
12018
12120
|
"kind": "field",
|
|
12019
|
-
"name": "
|
|
12020
|
-
"privacy": "
|
|
12021
|
-
"
|
|
12022
|
-
|
|
12023
|
-
|
|
12024
|
-
|
|
12121
|
+
"name": "handleMutation",
|
|
12122
|
+
"privacy": "private",
|
|
12123
|
+
"description": "If the selected tab is selected programmatically update all the tabs."
|
|
12124
|
+
},
|
|
12125
|
+
{
|
|
12126
|
+
"kind": "field",
|
|
12127
|
+
"name": "initialSelectedTab",
|
|
12128
|
+
"privacy": "private",
|
|
12129
|
+
"description": "Get the selected tab button, or the first tab button."
|
|
12025
12130
|
},
|
|
12026
12131
|
{
|
|
12027
12132
|
"kind": "method",
|
|
12028
|
-
"name": "
|
|
12133
|
+
"name": "setupTabs",
|
|
12134
|
+
"privacy": "private",
|
|
12135
|
+
"description": "Apply accessible attributes and values to the tab buttons."
|
|
12136
|
+
},
|
|
12137
|
+
{
|
|
12138
|
+
"kind": "method",
|
|
12139
|
+
"name": "setupPanels",
|
|
12140
|
+
"privacy": "private",
|
|
12141
|
+
"description": "Apply accessible attributes and values to the tab panels."
|
|
12142
|
+
},
|
|
12143
|
+
{
|
|
12144
|
+
"kind": "method",
|
|
12145
|
+
"name": "handleTabChange",
|
|
12146
|
+
"privacy": "private",
|
|
12029
12147
|
"parameters": [
|
|
12030
12148
|
{
|
|
12031
|
-
"name": "
|
|
12032
|
-
"optional": true,
|
|
12149
|
+
"name": "event",
|
|
12033
12150
|
"type": {
|
|
12034
|
-
"text": "
|
|
12035
|
-
}
|
|
12036
|
-
|
|
12151
|
+
"text": "Event"
|
|
12152
|
+
}
|
|
12153
|
+
}
|
|
12154
|
+
]
|
|
12155
|
+
},
|
|
12156
|
+
{
|
|
12157
|
+
"kind": "method",
|
|
12158
|
+
"name": "previousTab",
|
|
12159
|
+
"privacy": "private",
|
|
12160
|
+
"parameters": [
|
|
12161
|
+
{
|
|
12162
|
+
"name": "tab",
|
|
12163
|
+
"type": {
|
|
12164
|
+
"text": "Tab"
|
|
12165
|
+
}
|
|
12037
12166
|
}
|
|
12038
12167
|
],
|
|
12039
|
-
"description": "
|
|
12040
|
-
"inheritedFrom": {
|
|
12041
|
-
"name": "FocusableMixin",
|
|
12042
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
12043
|
-
}
|
|
12168
|
+
"description": "Get the previous tab button in the tab group"
|
|
12044
12169
|
},
|
|
12045
12170
|
{
|
|
12046
12171
|
"kind": "method",
|
|
12047
|
-
"name": "
|
|
12048
|
-
"
|
|
12049
|
-
"
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12172
|
+
"name": "handleKeydown",
|
|
12173
|
+
"privacy": "private",
|
|
12174
|
+
"parameters": [
|
|
12175
|
+
{
|
|
12176
|
+
"name": "event",
|
|
12177
|
+
"type": {
|
|
12178
|
+
"text": "KeyboardEvent"
|
|
12179
|
+
}
|
|
12180
|
+
}
|
|
12181
|
+
],
|
|
12182
|
+
"description": "Handle keyboard accessible controls."
|
|
12053
12183
|
},
|
|
12054
12184
|
{
|
|
12055
12185
|
"kind": "method",
|
|
12056
|
-
"name": "
|
|
12057
|
-
"
|
|
12058
|
-
"
|
|
12059
|
-
|
|
12060
|
-
|
|
12061
|
-
|
|
12186
|
+
"name": "updateSelectedTab",
|
|
12187
|
+
"privacy": "private",
|
|
12188
|
+
"parameters": [
|
|
12189
|
+
{
|
|
12190
|
+
"name": "selectedTab",
|
|
12191
|
+
"type": {
|
|
12192
|
+
"text": "Tab"
|
|
12193
|
+
}
|
|
12194
|
+
}
|
|
12195
|
+
],
|
|
12196
|
+
"description": "Update the selected tab button with attributes and values.\nUpdate the tab group state."
|
|
12062
12197
|
}
|
|
12063
12198
|
],
|
|
12064
12199
|
"attributes": [
|
|
12065
|
-
{
|
|
12066
|
-
"name": "resize",
|
|
12067
|
-
"type": {
|
|
12068
|
-
"text": "\"vertical\" | \"auto\""
|
|
12069
|
-
},
|
|
12070
|
-
"default": "\"vertical\"",
|
|
12071
|
-
"description": "Controls whether the textarea is resizable.\nBy default is manually resizable vertically.\nSet to \"auto\" to enable auto-resizing as content grows.",
|
|
12072
|
-
"fieldName": "resize"
|
|
12073
|
-
},
|
|
12074
|
-
{
|
|
12075
|
-
"name": "expand",
|
|
12076
|
-
"type": {
|
|
12077
|
-
"text": "boolean"
|
|
12078
|
-
},
|
|
12079
|
-
"default": "false",
|
|
12080
|
-
"description": "Controls whether the textarea expands to fill the width of its container.",
|
|
12081
|
-
"fieldName": "expand"
|
|
12082
|
-
},
|
|
12083
|
-
{
|
|
12084
|
-
"name": "size",
|
|
12085
|
-
"type": {
|
|
12086
|
-
"text": "\"s\" | \"m\" | \"l\""
|
|
12087
|
-
},
|
|
12088
|
-
"default": "\"m\"",
|
|
12089
|
-
"description": "The size of the component.",
|
|
12090
|
-
"fieldName": "size",
|
|
12091
|
-
"inheritedFrom": {
|
|
12092
|
-
"name": "SizeMixin",
|
|
12093
|
-
"module": "src/common/mixins/SizeMixin.ts"
|
|
12094
|
-
}
|
|
12095
|
-
},
|
|
12096
12200
|
{
|
|
12097
12201
|
"name": "label",
|
|
12098
12202
|
"type": {
|
|
12099
|
-
"text": "string"
|
|
12100
|
-
},
|
|
12101
|
-
"default": "\"\"",
|
|
12102
|
-
"description": "Label for the input.",
|
|
12103
|
-
"fieldName": "label",
|
|
12104
|
-
"inheritedFrom": {
|
|
12105
|
-
"name": "FormAssociatedMixin",
|
|
12106
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12107
|
-
}
|
|
12108
|
-
},
|
|
12109
|
-
{
|
|
12110
|
-
"name": "hint",
|
|
12111
|
-
"type": {
|
|
12112
|
-
"text": "string | undefined"
|
|
12113
|
-
},
|
|
12114
|
-
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
12115
|
-
"fieldName": "hint",
|
|
12116
|
-
"inheritedFrom": {
|
|
12117
|
-
"name": "FormAssociatedMixin",
|
|
12118
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12119
|
-
}
|
|
12120
|
-
},
|
|
12121
|
-
{
|
|
12122
|
-
"name": "hide-label",
|
|
12123
|
-
"type": {
|
|
12124
|
-
"text": "boolean"
|
|
12125
|
-
},
|
|
12126
|
-
"default": "false",
|
|
12127
|
-
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
12128
|
-
"fieldName": "hideLabel",
|
|
12129
|
-
"inheritedFrom": {
|
|
12130
|
-
"name": "FormAssociatedMixin",
|
|
12131
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12132
|
-
}
|
|
12133
|
-
},
|
|
12134
|
-
{
|
|
12135
|
-
"name": "placeholder",
|
|
12136
|
-
"type": {
|
|
12137
|
-
"text": "string | undefined"
|
|
12203
|
+
"text": "string"
|
|
12138
12204
|
},
|
|
12139
|
-
"
|
|
12140
|
-
"
|
|
12141
|
-
"
|
|
12142
|
-
"name": "FormAssociatedMixin",
|
|
12143
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12144
|
-
}
|
|
12205
|
+
"default": "\"\"",
|
|
12206
|
+
"description": "Adds an accessible label to the tab list container.",
|
|
12207
|
+
"fieldName": "label"
|
|
12145
12208
|
},
|
|
12146
12209
|
{
|
|
12147
|
-
"name": "
|
|
12210
|
+
"name": "padding",
|
|
12148
12211
|
"type": {
|
|
12149
|
-
"text": "
|
|
12212
|
+
"text": "\"m\" | \"l\" | \"none\" | undefined"
|
|
12150
12213
|
},
|
|
12151
|
-
"
|
|
12152
|
-
"
|
|
12153
|
-
"
|
|
12154
|
-
"name": "FormAssociatedMixin",
|
|
12155
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12156
|
-
}
|
|
12214
|
+
"default": "\"m\"",
|
|
12215
|
+
"description": "Controls the padding of the tab group component.",
|
|
12216
|
+
"fieldName": "padding"
|
|
12157
12217
|
},
|
|
12158
12218
|
{
|
|
12159
|
-
"name": "
|
|
12219
|
+
"name": "sticky",
|
|
12160
12220
|
"type": {
|
|
12161
12221
|
"text": "boolean"
|
|
12162
12222
|
},
|
|
12163
12223
|
"default": "false",
|
|
12164
|
-
"description": "
|
|
12165
|
-
"fieldName": "
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12169
|
-
|
|
12224
|
+
"description": "Whether the tab list sticks to the top of the tab group as you scroll.",
|
|
12225
|
+
"fieldName": "sticky"
|
|
12226
|
+
}
|
|
12227
|
+
],
|
|
12228
|
+
"superclass": {
|
|
12229
|
+
"name": "LitElement",
|
|
12230
|
+
"package": "lit"
|
|
12231
|
+
},
|
|
12232
|
+
"status": "new",
|
|
12233
|
+
"category": "navigation",
|
|
12234
|
+
"displayName": null,
|
|
12235
|
+
"examples": [],
|
|
12236
|
+
"tagName": "nord-tab-group",
|
|
12237
|
+
"customElement": true
|
|
12238
|
+
}
|
|
12239
|
+
],
|
|
12240
|
+
"exports": [
|
|
12241
|
+
{
|
|
12242
|
+
"kind": "js",
|
|
12243
|
+
"name": "default",
|
|
12244
|
+
"declaration": {
|
|
12245
|
+
"name": "TabGroup",
|
|
12246
|
+
"module": "src/tab-group/TabGroup.ts"
|
|
12247
|
+
}
|
|
12248
|
+
},
|
|
12249
|
+
{
|
|
12250
|
+
"kind": "custom-element-definition",
|
|
12251
|
+
"name": "nord-tab-group",
|
|
12252
|
+
"declaration": {
|
|
12253
|
+
"name": "TabGroup",
|
|
12254
|
+
"module": "src/tab-group/TabGroup.ts"
|
|
12255
|
+
}
|
|
12256
|
+
}
|
|
12257
|
+
],
|
|
12258
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow multiple panels to be contained within a single window.\n- Use the tab panel and tab components within the tab group component.\n- Use the tab and tab panel components in order to create a tab group content structure.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use other components to the tab and tab panel within the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n- Don't add a tab or tab panel component without providing an accompanying panel or tab.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the tab component related to the panel to select the tab but prevent the order of the tabs being affected.\n"
|
|
12259
|
+
},
|
|
12260
|
+
{
|
|
12261
|
+
"kind": "javascript-module",
|
|
12262
|
+
"path": "src/table/Table.ts",
|
|
12263
|
+
"declarations": [
|
|
12264
|
+
{
|
|
12265
|
+
"kind": "class",
|
|
12266
|
+
"description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
|
|
12267
|
+
"name": "Table",
|
|
12268
|
+
"cssProperties": [
|
|
12269
|
+
{
|
|
12270
|
+
"description": "Controls the padding around the table cells.",
|
|
12271
|
+
"name": "--n-table-td-padding",
|
|
12272
|
+
"default": "calc(var(--n-space-m) * 0.95)"
|
|
12170
12273
|
},
|
|
12171
12274
|
{
|
|
12172
|
-
"
|
|
12275
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
12276
|
+
"name": "--n-table-border-radius",
|
|
12277
|
+
"default": "var(--n-border-radius-s)"
|
|
12278
|
+
}
|
|
12279
|
+
],
|
|
12280
|
+
"slots": [
|
|
12281
|
+
{
|
|
12282
|
+
"description": "Default slot which holds the HTML `<table>` element.",
|
|
12283
|
+
"name": ""
|
|
12284
|
+
}
|
|
12285
|
+
],
|
|
12286
|
+
"members": [
|
|
12287
|
+
{
|
|
12288
|
+
"kind": "field",
|
|
12289
|
+
"name": "density",
|
|
12173
12290
|
"type": {
|
|
12174
|
-
"text": "
|
|
12291
|
+
"text": "\"condensed\" | \"default\" | \"relaxed\""
|
|
12175
12292
|
},
|
|
12176
|
-
"default": "\"
|
|
12177
|
-
"description": "
|
|
12178
|
-
"
|
|
12179
|
-
"
|
|
12180
|
-
"name": "AutocompleteMixin",
|
|
12181
|
-
"module": "src/common/mixins/AutocompleteMixin.ts"
|
|
12182
|
-
}
|
|
12293
|
+
"default": "\"default\"",
|
|
12294
|
+
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
12295
|
+
"attribute": "density",
|
|
12296
|
+
"reflects": true
|
|
12183
12297
|
},
|
|
12184
12298
|
{
|
|
12185
|
-
"
|
|
12299
|
+
"kind": "field",
|
|
12300
|
+
"name": "scrollSnap",
|
|
12186
12301
|
"type": {
|
|
12187
12302
|
"text": "boolean"
|
|
12188
12303
|
},
|
|
12189
12304
|
"default": "false",
|
|
12190
|
-
"description": "
|
|
12191
|
-
"
|
|
12192
|
-
"
|
|
12193
|
-
"name": "ReadonlyMixin",
|
|
12194
|
-
"module": "src/common/mixins/ReadonlyMixin.ts"
|
|
12195
|
-
}
|
|
12305
|
+
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
12306
|
+
"attribute": "scroll-snap",
|
|
12307
|
+
"reflects": true
|
|
12196
12308
|
},
|
|
12197
12309
|
{
|
|
12198
|
-
"
|
|
12310
|
+
"kind": "field",
|
|
12311
|
+
"name": "striped",
|
|
12199
12312
|
"type": {
|
|
12200
12313
|
"text": "boolean"
|
|
12201
12314
|
},
|
|
12202
12315
|
"default": "false",
|
|
12203
|
-
"description": "
|
|
12204
|
-
"
|
|
12205
|
-
"
|
|
12206
|
-
"name": "InputMixin",
|
|
12207
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12208
|
-
}
|
|
12316
|
+
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
12317
|
+
"attribute": "striped",
|
|
12318
|
+
"reflects": true
|
|
12209
12319
|
},
|
|
12210
12320
|
{
|
|
12211
|
-
"
|
|
12212
|
-
"
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
"description": "The name of the form component.",
|
|
12216
|
-
"fieldName": "name",
|
|
12217
|
-
"inheritedFrom": {
|
|
12218
|
-
"name": "InputMixin",
|
|
12219
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12220
|
-
}
|
|
12321
|
+
"kind": "method",
|
|
12322
|
+
"name": "renderStyles",
|
|
12323
|
+
"privacy": "private",
|
|
12324
|
+
"description": "renders table styles into nearest root.\nthis is necessary since we do not use shadow dom."
|
|
12221
12325
|
},
|
|
12222
12326
|
{
|
|
12223
|
-
"
|
|
12224
|
-
"
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
"default": "\"\"",
|
|
12228
|
-
"description": "The value of the form component.",
|
|
12229
|
-
"fieldName": "value",
|
|
12230
|
-
"inheritedFrom": {
|
|
12231
|
-
"name": "InputMixin",
|
|
12232
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12233
|
-
}
|
|
12327
|
+
"kind": "method",
|
|
12328
|
+
"name": "createRenderRoot",
|
|
12329
|
+
"privacy": "protected",
|
|
12330
|
+
"description": "opt out of shadow dom"
|
|
12234
12331
|
}
|
|
12235
12332
|
],
|
|
12236
|
-
"
|
|
12237
|
-
{
|
|
12238
|
-
"name": "SizeMixin",
|
|
12239
|
-
"module": "/src/common/mixins/SizeMixin.js"
|
|
12240
|
-
},
|
|
12241
|
-
{
|
|
12242
|
-
"name": "FormAssociatedMixin",
|
|
12243
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
12244
|
-
},
|
|
12245
|
-
{
|
|
12246
|
-
"name": "AutocompleteMixin",
|
|
12247
|
-
"module": "/src/common/mixins/AutocompleteMixin.js"
|
|
12248
|
-
},
|
|
12333
|
+
"attributes": [
|
|
12249
12334
|
{
|
|
12250
|
-
"name": "
|
|
12251
|
-
"
|
|
12335
|
+
"name": "density",
|
|
12336
|
+
"type": {
|
|
12337
|
+
"text": "\"condensed\" | \"default\" | \"relaxed\""
|
|
12338
|
+
},
|
|
12339
|
+
"default": "\"default\"",
|
|
12340
|
+
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
12341
|
+
"fieldName": "density"
|
|
12252
12342
|
},
|
|
12253
12343
|
{
|
|
12254
|
-
"name": "
|
|
12255
|
-
"
|
|
12344
|
+
"name": "scroll-snap",
|
|
12345
|
+
"type": {
|
|
12346
|
+
"text": "boolean"
|
|
12347
|
+
},
|
|
12348
|
+
"default": "false",
|
|
12349
|
+
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
12350
|
+
"fieldName": "scrollSnap"
|
|
12256
12351
|
},
|
|
12257
12352
|
{
|
|
12258
|
-
"name": "
|
|
12259
|
-
"
|
|
12353
|
+
"name": "striped",
|
|
12354
|
+
"type": {
|
|
12355
|
+
"text": "boolean"
|
|
12356
|
+
},
|
|
12357
|
+
"default": "false",
|
|
12358
|
+
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
12359
|
+
"fieldName": "striped"
|
|
12260
12360
|
}
|
|
12261
12361
|
],
|
|
12262
12362
|
"superclass": {
|
|
@@ -12264,35 +12364,28 @@
|
|
|
12264
12364
|
"package": "lit"
|
|
12265
12365
|
},
|
|
12266
12366
|
"status": "ready",
|
|
12267
|
-
"category": "
|
|
12367
|
+
"category": "list",
|
|
12268
12368
|
"displayName": null,
|
|
12269
|
-
"examples": [
|
|
12270
|
-
"tagName": "nord-textarea",
|
|
12271
|
-
"customElement": true,
|
|
12272
|
-
"events": [
|
|
12369
|
+
"examples": [
|
|
12273
12370
|
{
|
|
12274
|
-
"name": "
|
|
12275
|
-
"
|
|
12276
|
-
"text": "NordEvent"
|
|
12277
|
-
},
|
|
12278
|
-
"description": "Fired as the user types into the input.",
|
|
12279
|
-
"inheritedFrom": {
|
|
12280
|
-
"name": "FormAssociatedMixin",
|
|
12281
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12282
|
-
}
|
|
12371
|
+
"name": "with react and tanstack table",
|
|
12372
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview"
|
|
12283
12373
|
},
|
|
12284
12374
|
{
|
|
12285
|
-
"name": "
|
|
12286
|
-
"
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
"
|
|
12290
|
-
"
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12375
|
+
"name": "with react and ag grid",
|
|
12376
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview"
|
|
12377
|
+
},
|
|
12378
|
+
{
|
|
12379
|
+
"name": "with vue and tanstack table",
|
|
12380
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview"
|
|
12381
|
+
},
|
|
12382
|
+
{
|
|
12383
|
+
"name": "with vue and ag grid",
|
|
12384
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview"
|
|
12294
12385
|
}
|
|
12295
|
-
]
|
|
12386
|
+
],
|
|
12387
|
+
"tagName": "nord-table",
|
|
12388
|
+
"customElement": true
|
|
12296
12389
|
}
|
|
12297
12390
|
],
|
|
12298
12391
|
"exports": [
|
|
@@ -12300,20 +12393,20 @@
|
|
|
12300
12393
|
"kind": "js",
|
|
12301
12394
|
"name": "default",
|
|
12302
12395
|
"declaration": {
|
|
12303
|
-
"name": "
|
|
12304
|
-
"module": "src/
|
|
12396
|
+
"name": "Table",
|
|
12397
|
+
"module": "src/table/Table.ts"
|
|
12305
12398
|
}
|
|
12306
12399
|
},
|
|
12307
12400
|
{
|
|
12308
12401
|
"kind": "custom-element-definition",
|
|
12309
|
-
"name": "nord-
|
|
12402
|
+
"name": "nord-table",
|
|
12310
12403
|
"declaration": {
|
|
12311
|
-
"name": "
|
|
12312
|
-
"module": "src/
|
|
12404
|
+
"name": "Table",
|
|
12405
|
+
"module": "src/table/Table.ts"
|
|
12313
12406
|
}
|
|
12314
12407
|
}
|
|
12315
12408
|
],
|
|
12316
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to
|
|
12409
|
+
"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 display tabular data in a view.\n- Use a `<table>` element directly within the component.\n- Use inside a [Card](/components/card/?example=with+table), and give the card a header.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n- Don't use a primary button in every row of a table.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n\n---\n\n## Advanced use-cases\n\nThe table component itself does not provide any functionality, only styles. This works well for simple or static tables, but there are instances where functionality such as sorting, resizing, or column dragging are required. This kind of functionality is out of scope for the table component, as the spectrum of possible use-cases is too broad for a single component to cover effectively. Whilst the table component is limited out of the box, these same limitations make it easy to integrate with third-party libraries which offer advanced functionality.\n\nBroadly speaking, there are two categories of library for building advanced tables: _headless_ and _component-based_.\n\n### Which kind of table library should I use?\n\nEach approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team.\n\n#### Component-based Table Libraries\n\nComponent-based table libraries will typically supply you with a feature-rich drop-in solution, and ready-to-use components/markup complete with styles/theming.\n\n**Pros:**\n\n- Ship with ready-to-use markup/styles.\n- Little setup required.\n- Turn-key experience.\n\n**Cons:**\n\n- Less control over markup.\n- Custom styles are typically theme-based.\n- Larger bundle-sizes.\n\nIf you want a ready-to-use table and design/bundle-size are not hard requirements, then you should consider using a component-based table library.\n\n#### Headless Table Libraries\n\nHeadless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups.\n\n**Pros:**\n\n- Full control over markup and styles.\n- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc).\n- Smaller bundle-sizes.\n\n**Cons:**\n\n- More setup and effort required.\n- No markup, styles or themes provided.\n\nIf you want a lighter-weight table or full control over the design, then you should consider using a headless table library.\n\n### Recommendation for headless libraries\n\nIn the headless category, we recommend [Tanstack Table](https://tanstack.com/table/). Tanstack table offers integrations for many UI frameworks, such as Vue and React. It is easy to work with, and because it does not bring any HTML or styles itself, you can use it to render a plain, semantic `<table>` wrapped in a `<nord-table>`, and you will get all the necessary styles.\n\nWe have created examples in both Vue and React, showing how to combine Tanstack table with Nord's table component, in order to build a table with both sorting and resizable columns. Check out the [React example](/components/table/?example=with+react+and+tanstack+table) and likewise the [Vue example](/components/table/?example=with+vue+and+tanstack+table).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / Tanstack table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / Tanstack table source\n </nord-button>\n</nord-stack>\n\n### Recommendation for component-based libraries\n\nIn the component-based category, we recommend [AG Grid](https://www.ag-grid.com/), specifically the community edition. AG Grid is feature-rich, has extensive documentation, and offers integrations for many UI frameworks, such as Vue and React. AG Grid takes control of all rendering and output, but offers extension points for taking control of some aspects. It does not output a `<table>` element, so it cannot be used with Nord's own table component.\n\nHowever it can be styled via themes, and we have created a Nord theme using our design tokens. The theme is published on npm as `@nordhealth/ag-theme-nord`. To use the theme, include the CSS in your project and add the class `ag-theme-nord` to the element wrapping AG Grid.\n\nWe have created examples in both Vue and React showing how to combine AG Grid with Nord's theme, in order to build a table with sorting, resizable columns, draggable and re-orderable columns, plus sticky/pinned columns. Check out the [React example](/components/table/?example=with+react+and+ag+grid) and likewise the [Vue example](/components/table/?example=with+vue+and+ag+grid).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l n-margin-be-s\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / AG Grid table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / AG Grid table source\n </nord-button>\n</nord-stack>\n"
|
|
12317
12410
|
},
|
|
12318
12411
|
{
|
|
12319
12412
|
"kind": "javascript-module",
|