@nordhealth/components 4.1.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -790,91 +790,6 @@
790
790
  }
791
791
  ]
792
792
  },
793
- {
794
- "kind": "javascript-module",
795
- "path": "src/banner/Banner.ts",
796
- "declarations": [
797
- {
798
- "kind": "class",
799
- "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.",
800
- "name": "Banner",
801
- "cssProperties": [
802
- {
803
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
804
- "name": "--n-banner-border-radius",
805
- "default": "var(--n-border-radius)"
806
- },
807
- {
808
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
809
- "name": "--n-banner-box-shadow",
810
- "default": "var(--n-box-shadow-card)"
811
- }
812
- ],
813
- "slots": [
814
- {
815
- "description": "default slot",
816
- "name": ""
817
- }
818
- ],
819
- "members": [
820
- {
821
- "kind": "field",
822
- "name": "variant",
823
- "type": {
824
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
825
- },
826
- "default": "\"info\"",
827
- "description": "The style variant of the banner.",
828
- "attribute": "variant",
829
- "reflects": true
830
- }
831
- ],
832
- "attributes": [
833
- {
834
- "name": "variant",
835
- "type": {
836
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
837
- },
838
- "default": "\"info\"",
839
- "description": "The style variant of the banner.",
840
- "fieldName": "variant"
841
- }
842
- ],
843
- "superclass": {
844
- "name": "LitElement",
845
- "package": "lit"
846
- },
847
- "localization": [],
848
- "status": "ready",
849
- "category": "feedback",
850
- "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",
851
- "examples": [],
852
- "dependencies": [
853
- "icon"
854
- ],
855
- "tagName": "nord-banner",
856
- "customElement": true
857
- }
858
- ],
859
- "exports": [
860
- {
861
- "kind": "js",
862
- "name": "default",
863
- "declaration": {
864
- "name": "Banner",
865
- "module": "src/banner/Banner.ts"
866
- }
867
- },
868
- {
869
- "kind": "custom-element-definition",
870
- "name": "nord-banner",
871
- "declaration": {
872
- "name": "Banner",
873
- "module": "src/banner/Banner.ts"
874
- }
875
- }
876
- ]
877
- },
878
793
  {
879
794
  "kind": "javascript-module",
880
795
  "path": "src/button/Button.ts",
@@ -1486,6 +1401,91 @@
1486
1401
  }
1487
1402
  ]
1488
1403
  },
1404
+ {
1405
+ "kind": "javascript-module",
1406
+ "path": "src/banner/Banner.ts",
1407
+ "declarations": [
1408
+ {
1409
+ "kind": "class",
1410
+ "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.",
1411
+ "name": "Banner",
1412
+ "cssProperties": [
1413
+ {
1414
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1415
+ "name": "--n-banner-border-radius",
1416
+ "default": "var(--n-border-radius)"
1417
+ },
1418
+ {
1419
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1420
+ "name": "--n-banner-box-shadow",
1421
+ "default": "var(--n-box-shadow-card)"
1422
+ }
1423
+ ],
1424
+ "slots": [
1425
+ {
1426
+ "description": "default slot",
1427
+ "name": ""
1428
+ }
1429
+ ],
1430
+ "members": [
1431
+ {
1432
+ "kind": "field",
1433
+ "name": "variant",
1434
+ "type": {
1435
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1436
+ },
1437
+ "default": "\"info\"",
1438
+ "description": "The style variant of the banner.",
1439
+ "attribute": "variant",
1440
+ "reflects": true
1441
+ }
1442
+ ],
1443
+ "attributes": [
1444
+ {
1445
+ "name": "variant",
1446
+ "type": {
1447
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1448
+ },
1449
+ "default": "\"info\"",
1450
+ "description": "The style variant of the banner.",
1451
+ "fieldName": "variant"
1452
+ }
1453
+ ],
1454
+ "superclass": {
1455
+ "name": "LitElement",
1456
+ "package": "lit"
1457
+ },
1458
+ "localization": [],
1459
+ "status": "ready",
1460
+ "category": "feedback",
1461
+ "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",
1462
+ "examples": [],
1463
+ "dependencies": [
1464
+ "icon"
1465
+ ],
1466
+ "tagName": "nord-banner",
1467
+ "customElement": true
1468
+ }
1469
+ ],
1470
+ "exports": [
1471
+ {
1472
+ "kind": "js",
1473
+ "name": "default",
1474
+ "declaration": {
1475
+ "name": "Banner",
1476
+ "module": "src/banner/Banner.ts"
1477
+ }
1478
+ },
1479
+ {
1480
+ "kind": "custom-element-definition",
1481
+ "name": "nord-banner",
1482
+ "declaration": {
1483
+ "name": "Banner",
1484
+ "module": "src/banner/Banner.ts"
1485
+ }
1486
+ }
1487
+ ]
1488
+ },
1489
1489
  {
1490
1490
  "kind": "javascript-module",
1491
1491
  "path": "src/button-group/ButtonGroup.ts",
@@ -1643,721 +1643,459 @@
1643
1643
  },
1644
1644
  {
1645
1645
  "kind": "javascript-module",
1646
- "path": "src/checkbox/Checkbox.ts",
1646
+ "path": "src/calendar/Calendar.ts",
1647
1647
  "declarations": [
1648
1648
  {
1649
1649
  "kind": "class",
1650
- "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
1651
- "name": "Checkbox",
1650
+ "description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
1651
+ "name": "Calendar",
1652
1652
  "cssProperties": [
1653
1653
  {
1654
- "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
1655
- "name": "--n-label-color",
1656
- "default": "var(--n-color-text)"
1654
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1655
+ "name": "--n-calendar-border-radius",
1656
+ "default": "var(--n-border-radius)"
1657
+ },
1658
+ {
1659
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1660
+ "name": "--n-calendar-box-shadow",
1661
+ "default": "var(--n-box-shadow-popout)"
1657
1662
  }
1658
1663
  ],
1659
- "slots": [
1664
+ "members": [
1660
1665
  {
1661
- "description": "Use when a label requires more than plain text.",
1662
- "name": "label"
1666
+ "kind": "field",
1667
+ "name": "monthSelectNode",
1668
+ "type": {
1669
+ "text": "HTMLElement"
1670
+ },
1671
+ "privacy": "private"
1663
1672
  },
1664
1673
  {
1665
- "description": "Optional slot that holds hint text for the input.",
1666
- "name": "hint"
1674
+ "kind": "field",
1675
+ "name": "focusedDayNode",
1676
+ "type": {
1677
+ "text": "HTMLButtonElement"
1678
+ },
1679
+ "privacy": "private"
1667
1680
  },
1668
1681
  {
1669
- "description": "Optional slot that holds error text for the input.",
1670
- "name": "error"
1671
- }
1672
- ],
1673
- "members": [
1682
+ "kind": "field",
1683
+ "name": "direction",
1684
+ "privacy": "private",
1685
+ "default": "new DirectionController(this)"
1686
+ },
1674
1687
  {
1675
1688
  "kind": "field",
1676
- "name": "formValue",
1677
- "privacy": "protected",
1678
- "readonly": true,
1679
- "inheritedFrom": {
1680
- "name": "FormAssociatedMixin",
1681
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1682
- }
1689
+ "name": "swipe",
1690
+ "privacy": "private",
1691
+ "default": "new SwipeController(this, { matchesGesture: isHorizontalSwipe, onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1), })"
1683
1692
  },
1684
1693
  {
1685
1694
  "kind": "field",
1686
- "name": "indeterminate",
1695
+ "name": "shortcuts",
1696
+ "privacy": "private"
1697
+ },
1698
+ {
1699
+ "kind": "field",
1700
+ "name": "localize",
1701
+ "privacy": "private",
1702
+ "default": "new LocalizeController<\"nord-calendar\">(this, { onLangChange: () => this.handleLangChange(), })"
1703
+ },
1704
+ {
1705
+ "kind": "field",
1706
+ "name": "dateFormatShort",
1687
1707
  "type": {
1688
- "text": "boolean"
1708
+ "text": "Intl.DateTimeFormat"
1689
1709
  },
1690
- "default": "false",
1691
- "description": "Controls whether the checkbox is in an indeterminate state.",
1692
- "attribute": "indeterminate",
1693
- "reflects": true
1710
+ "privacy": "private",
1711
+ "description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
1694
1712
  },
1695
1713
  {
1696
1714
  "kind": "field",
1697
- "name": "checked",
1715
+ "name": "monthNames",
1698
1716
  "type": {
1699
- "text": "boolean"
1717
+ "text": "string[]"
1700
1718
  },
1701
- "default": "false",
1702
- "description": "Controls whether the checkbox is checked or not.",
1703
- "attribute": "checked",
1704
- "reflects": true
1705
- },
1706
- {
1707
- "kind": "method",
1708
- "name": "handleChange",
1709
- "privacy": "protected",
1710
- "parameters": [
1711
- {
1712
- "name": "e",
1713
- "type": {
1714
- "text": "Event"
1715
- }
1716
- }
1717
- ],
1718
- "return": {
1719
- "type": {
1720
- "text": "void"
1721
- }
1722
- },
1723
- "inheritedFrom": {
1724
- "name": "FormAssociatedMixin",
1725
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1726
- }
1719
+ "privacy": "private"
1727
1720
  },
1728
1721
  {
1729
1722
  "kind": "field",
1730
- "name": "size",
1723
+ "name": "monthNamesShort",
1731
1724
  "type": {
1732
- "text": "\"s\" | \"m\" | \"l\""
1725
+ "text": "string[]"
1733
1726
  },
1734
- "default": "\"m\"",
1735
- "description": "The size of the component.",
1736
- "attribute": "size",
1737
- "reflects": true,
1738
- "inheritedFrom": {
1739
- "name": "SizeMixin",
1740
- "module": "src/common/mixins/SizeMixin.ts"
1741
- }
1742
- },
1743
- {
1744
- "kind": "field",
1745
- "name": "labelSlot",
1746
- "privacy": "protected",
1747
- "default": "new SlotController(this, \"label\")",
1748
- "inheritedFrom": {
1749
- "name": "FormAssociatedMixin",
1750
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1751
- }
1752
- },
1753
- {
1754
- "kind": "field",
1755
- "name": "errorSlot",
1756
- "privacy": "protected",
1757
- "default": "new SlotController(this, \"error\")",
1758
- "inheritedFrom": {
1759
- "name": "FormAssociatedMixin",
1760
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1761
- }
1727
+ "privacy": "private"
1762
1728
  },
1763
1729
  {
1764
1730
  "kind": "field",
1765
- "name": "hintSlot",
1766
- "privacy": "protected",
1767
- "default": "new SlotController(this, \"hint\")",
1768
- "inheritedFrom": {
1769
- "name": "FormAssociatedMixin",
1770
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1771
- }
1731
+ "name": "dayNames",
1732
+ "type": {
1733
+ "text": "string[]"
1734
+ },
1735
+ "privacy": "private"
1772
1736
  },
1773
1737
  {
1774
1738
  "kind": "field",
1775
- "name": "formData",
1776
- "privacy": "protected",
1777
- "default": "new FormDataController(this, { value: () => this.formValue })",
1778
- "inheritedFrom": {
1779
- "name": "FormAssociatedMixin",
1780
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1781
- }
1739
+ "name": "dayNamesShort",
1740
+ "type": {
1741
+ "text": "string[]"
1742
+ },
1743
+ "privacy": "private"
1782
1744
  },
1783
1745
  {
1784
1746
  "kind": "field",
1785
- "name": "inputId",
1747
+ "name": "value",
1786
1748
  "type": {
1787
1749
  "text": "string"
1788
1750
  },
1789
- "privacy": "protected",
1790
- "default": "\"input\"",
1791
- "inheritedFrom": {
1792
- "name": "FormAssociatedMixin",
1793
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1794
- }
1751
+ "default": "\"\"",
1752
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1753
+ "attribute": "value"
1795
1754
  },
1796
1755
  {
1797
1756
  "kind": "field",
1798
- "name": "errorId",
1757
+ "name": "firstDayOfWeek",
1799
1758
  "type": {
1800
- "text": "string"
1759
+ "text": "DaysOfWeek"
1801
1760
  },
1802
- "privacy": "protected",
1803
- "default": "\"error\"",
1804
- "inheritedFrom": {
1805
- "name": "FormAssociatedMixin",
1806
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1807
- }
1761
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1762
+ "attribute": "first-day-of-week",
1763
+ "reflects": true
1808
1764
  },
1809
1765
  {
1810
1766
  "kind": "field",
1811
- "name": "hintId",
1767
+ "name": "min",
1812
1768
  "type": {
1813
- "text": "string"
1769
+ "text": "string | undefined"
1814
1770
  },
1815
- "privacy": "protected",
1816
- "default": "\"hint\"",
1817
- "inheritedFrom": {
1818
- "name": "FormAssociatedMixin",
1819
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1820
- }
1771
+ "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
1772
+ "attribute": "min",
1773
+ "reflects": true
1821
1774
  },
1822
1775
  {
1823
1776
  "kind": "field",
1824
- "name": "label",
1777
+ "name": "max",
1825
1778
  "type": {
1826
- "text": "string"
1779
+ "text": "string | undefined"
1827
1780
  },
1828
- "default": "\"\"",
1829
- "description": "Label for the input.",
1830
- "attribute": "label",
1831
- "reflects": true,
1832
- "inheritedFrom": {
1833
- "name": "FormAssociatedMixin",
1834
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1835
- }
1781
+ "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
1782
+ "attribute": "max",
1783
+ "reflects": true
1836
1784
  },
1837
1785
  {
1838
1786
  "kind": "field",
1839
- "name": "hint",
1787
+ "name": "today",
1840
1788
  "type": {
1841
1789
  "text": "string | undefined"
1842
1790
  },
1843
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1844
- "attribute": "hint",
1845
- "reflects": true,
1846
- "inheritedFrom": {
1847
- "name": "FormAssociatedMixin",
1848
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1849
- }
1791
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
1792
+ "attribute": "today",
1793
+ "reflects": true
1850
1794
  },
1851
1795
  {
1852
1796
  "kind": "field",
1853
- "name": "hideLabel",
1797
+ "name": "expand",
1854
1798
  "type": {
1855
1799
  "text": "boolean"
1856
1800
  },
1857
1801
  "default": "false",
1858
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1859
- "attribute": "hide-label",
1860
- "reflects": true,
1861
- "inheritedFrom": {
1862
- "name": "FormAssociatedMixin",
1863
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1864
- }
1802
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1803
+ "attribute": "expand",
1804
+ "reflects": true
1865
1805
  },
1866
1806
  {
1867
1807
  "kind": "field",
1868
- "name": "placeholder",
1808
+ "name": "isDateDisabled",
1869
1809
  "type": {
1870
- "text": "string | undefined"
1810
+ "text": "DatePredicate"
1871
1811
  },
1872
- "description": "Placeholder text to display within the input.",
1873
- "attribute": "placeholder",
1874
- "reflects": true,
1875
- "inheritedFrom": {
1876
- "name": "FormAssociatedMixin",
1877
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1878
- }
1812
+ "default": "isDateDisabled",
1813
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1879
1814
  },
1880
1815
  {
1881
1816
  "kind": "field",
1882
- "name": "error",
1817
+ "name": "isDateHighlighted",
1883
1818
  "type": {
1884
- "text": "string | undefined"
1819
+ "text": "(date: Date) => string | boolean"
1885
1820
  },
1886
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1887
- "attribute": "error",
1888
- "reflects": true,
1889
- "inheritedFrom": {
1890
- "name": "FormAssociatedMixin",
1891
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1892
- }
1821
+ "default": "isDateHighlighted",
1822
+ "description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
1893
1823
  },
1894
1824
  {
1895
1825
  "kind": "field",
1896
- "name": "required",
1826
+ "name": "activeFocus",
1897
1827
  "type": {
1898
1828
  "text": "boolean"
1899
1829
  },
1900
- "default": "false",
1901
- "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.",
1902
- "attribute": "required",
1903
- "reflects": true,
1904
- "inheritedFrom": {
1905
- "name": "FormAssociatedMixin",
1906
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1907
- }
1830
+ "privacy": "private",
1831
+ "default": "false"
1908
1832
  },
1909
1833
  {
1910
1834
  "kind": "field",
1911
- "name": "hideRequired",
1912
- "type": {
1913
- "text": "boolean"
1914
- },
1915
- "default": "false",
1916
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
1917
- "attribute": "hide-required",
1918
- "reflects": true,
1919
- "inheritedFrom": {
1920
- "name": "FormAssociatedMixin",
1921
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1922
- }
1835
+ "name": "focusedDay",
1836
+ "privacy": "private",
1837
+ "default": "new Date()"
1923
1838
  },
1924
1839
  {
1925
1840
  "kind": "method",
1926
- "name": "handleInput",
1927
- "privacy": "protected",
1841
+ "name": "focus",
1928
1842
  "parameters": [
1929
1843
  {
1930
- "name": "e",
1844
+ "name": "options",
1845
+ "optional": true,
1931
1846
  "type": {
1932
- "text": "Event"
1933
- }
1847
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
1848
+ },
1849
+ "description": "An object which controls aspects of the focusing process."
1934
1850
  }
1935
1851
  ],
1936
- "inheritedFrom": {
1937
- "name": "FormAssociatedMixin",
1938
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1939
- }
1852
+ "description": "Programmatically move focus to the calendar."
1940
1853
  },
1941
1854
  {
1942
1855
  "kind": "method",
1943
- "name": "renderLabel",
1944
- "privacy": "protected",
1945
- "parameters": [
1946
- {
1947
- "name": "additionalContent",
1948
- "optional": true,
1949
- "type": {
1950
- "text": "TemplateResult"
1951
- }
1952
- }
1953
- ],
1954
- "inheritedFrom": {
1955
- "name": "FormAssociatedMixin",
1956
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1957
- }
1856
+ "name": "handleValueChange",
1857
+ "privacy": "protected"
1958
1858
  },
1959
1859
  {
1960
1860
  "kind": "method",
1961
- "name": "renderError",
1962
- "privacy": "protected",
1963
- "inheritedFrom": {
1964
- "name": "FormAssociatedMixin",
1965
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1966
- }
1861
+ "name": "handleFocusedDayChange",
1862
+ "privacy": "protected"
1967
1863
  },
1968
1864
  {
1969
1865
  "kind": "method",
1970
- "name": "getDescribedBy",
1971
- "privacy": "protected",
1972
- "inheritedFrom": {
1973
- "name": "FormAssociatedMixin",
1974
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1975
- }
1976
- },
1977
- {
1978
- "kind": "method",
1979
- "name": "getInvalid",
1980
- "privacy": "protected",
1981
- "inheritedFrom": {
1982
- "name": "FormAssociatedMixin",
1983
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1984
- }
1985
- },
1986
- {
1987
- "kind": "field",
1988
- "name": "hasHint",
1989
- "privacy": "protected",
1990
- "readonly": true,
1991
- "inheritedFrom": {
1992
- "name": "FormAssociatedMixin",
1993
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1994
- }
1866
+ "name": "handleLangChange",
1867
+ "privacy": "private"
1995
1868
  },
1996
1869
  {
1997
1870
  "kind": "field",
1998
- "name": "hasError",
1999
- "privacy": "protected",
2000
- "readonly": true,
2001
- "inheritedFrom": {
2002
- "name": "FormAssociatedMixin",
2003
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2004
- }
1871
+ "name": "handleDaySelect",
1872
+ "privacy": "private"
2005
1873
  },
2006
1874
  {
2007
- "kind": "field",
2008
- "name": "disabled",
2009
- "type": {
2010
- "text": "boolean"
2011
- },
2012
- "default": "false",
2013
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2014
- "attribute": "disabled",
2015
- "reflects": true,
2016
- "inheritedFrom": {
2017
- "name": "InputMixin",
2018
- "module": "src/common/mixins/InputMixin.ts"
2019
- }
1875
+ "kind": "method",
1876
+ "name": "getToday",
1877
+ "privacy": "private"
2020
1878
  },
2021
1879
  {
2022
- "kind": "field",
2023
- "name": "name",
2024
- "type": {
2025
- "text": "string | undefined"
2026
- },
2027
- "description": "The name of the form component.",
2028
- "attribute": "name",
2029
- "reflects": true,
2030
- "inheritedFrom": {
2031
- "name": "InputMixin",
2032
- "module": "src/common/mixins/InputMixin.ts"
2033
- }
1880
+ "kind": "method",
1881
+ "name": "addDays",
1882
+ "privacy": "private",
1883
+ "parameters": [
1884
+ {
1885
+ "name": "days",
1886
+ "type": {
1887
+ "text": "number"
1888
+ }
1889
+ }
1890
+ ]
2034
1891
  },
2035
1892
  {
2036
- "kind": "field",
2037
- "name": "value",
2038
- "type": {
2039
- "text": "string"
2040
- },
2041
- "default": "\"\"",
2042
- "description": "The value of the form component.",
2043
- "attribute": "value",
2044
- "inheritedFrom": {
2045
- "name": "InputMixin",
2046
- "module": "src/common/mixins/InputMixin.ts"
2047
- }
1893
+ "kind": "method",
1894
+ "name": "addMonths",
1895
+ "privacy": "private",
1896
+ "parameters": [
1897
+ {
1898
+ "name": "months",
1899
+ "type": {
1900
+ "text": "number"
1901
+ }
1902
+ }
1903
+ ]
2048
1904
  },
2049
1905
  {
2050
- "kind": "field",
2051
- "name": "formAncestor",
2052
- "type": {
2053
- "text": "HTMLFormElement | null"
2054
- },
1906
+ "kind": "method",
1907
+ "name": "addYears",
2055
1908
  "privacy": "private",
2056
- "default": "null",
2057
- "inheritedFrom": {
2058
- "name": "InputMixin",
2059
- "module": "src/common/mixins/InputMixin.ts"
2060
- }
1909
+ "parameters": [
1910
+ {
1911
+ "name": "years",
1912
+ "type": {
1913
+ "text": "number"
1914
+ }
1915
+ }
1916
+ ]
2061
1917
  },
2062
1918
  {
2063
- "kind": "field",
2064
- "name": "_formId",
2065
- "type": {
2066
- "text": "string | undefined"
2067
- },
2068
- "privacy": "protected",
2069
- "inheritedFrom": {
2070
- "name": "InputMixin",
2071
- "module": "src/common/mixins/InputMixin.ts"
2072
- }
1919
+ "kind": "method",
1920
+ "name": "startOfWeek",
1921
+ "privacy": "private"
2073
1922
  },
2074
1923
  {
2075
- "kind": "field",
2076
- "name": "form",
2077
- "type": {
2078
- "text": "HTMLFormElement | null"
2079
- },
2080
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
2081
- "attribute": "form",
2082
- "inheritedFrom": {
2083
- "name": "InputMixin",
2084
- "module": "src/common/mixins/InputMixin.ts"
2085
- }
1924
+ "kind": "method",
1925
+ "name": "endOfWeek",
1926
+ "privacy": "private"
2086
1927
  },
2087
1928
  {
2088
- "kind": "field",
2089
- "name": "focusableRef",
2090
- "privacy": "protected",
2091
- "inheritedFrom": {
2092
- "name": "FocusableMixin",
2093
- "module": "src/common/mixins/FocusableMixin.ts"
2094
- }
1929
+ "kind": "method",
1930
+ "name": "setMonth",
1931
+ "privacy": "private",
1932
+ "parameters": [
1933
+ {
1934
+ "name": "month",
1935
+ "type": {
1936
+ "text": "number"
1937
+ }
1938
+ }
1939
+ ]
2095
1940
  },
2096
1941
  {
2097
1942
  "kind": "method",
2098
- "name": "focus",
1943
+ "name": "setYear",
1944
+ "privacy": "private",
2099
1945
  "parameters": [
2100
1946
  {
2101
- "name": "options",
2102
- "optional": true,
1947
+ "name": "year",
2103
1948
  "type": {
2104
- "text": "FocusOptions"
2105
- },
2106
- "description": "An object which controls aspects of the focusing process."
1949
+ "text": "number"
1950
+ }
2107
1951
  }
2108
- ],
2109
- "description": "Programmatically move focus to the component.",
2110
- "inheritedFrom": {
2111
- "name": "FocusableMixin",
2112
- "module": "src/common/mixins/FocusableMixin.ts"
2113
- }
1952
+ ]
2114
1953
  },
2115
1954
  {
2116
1955
  "kind": "method",
2117
- "name": "blur",
2118
- "description": "Programmatically remove focus from the component.",
2119
- "inheritedFrom": {
2120
- "name": "FocusableMixin",
2121
- "module": "src/common/mixins/FocusableMixin.ts"
2122
- }
1956
+ "name": "setFocusedDay",
1957
+ "privacy": "private",
1958
+ "parameters": [
1959
+ {
1960
+ "name": "day",
1961
+ "type": {
1962
+ "text": "Date"
1963
+ }
1964
+ }
1965
+ ]
2123
1966
  },
2124
1967
  {
2125
- "kind": "method",
2126
- "name": "click",
2127
- "description": "Programmatically simulates a click on the component.",
2128
- "inheritedFrom": {
2129
- "name": "FocusableMixin",
2130
- "module": "src/common/mixins/FocusableMixin.ts"
2131
- }
1968
+ "kind": "field",
1969
+ "name": "handleMonthSelect",
1970
+ "privacy": "private"
1971
+ },
1972
+ {
1973
+ "kind": "field",
1974
+ "name": "handleYearSelect",
1975
+ "privacy": "private"
1976
+ },
1977
+ {
1978
+ "kind": "field",
1979
+ "name": "handleNextMonthClick",
1980
+ "privacy": "private"
1981
+ },
1982
+ {
1983
+ "kind": "field",
1984
+ "name": "handlePreviousMonthClick",
1985
+ "privacy": "private"
1986
+ },
1987
+ {
1988
+ "kind": "field",
1989
+ "name": "enableActiveFocus",
1990
+ "privacy": "private"
1991
+ },
1992
+ {
1993
+ "kind": "field",
1994
+ "name": "disableActiveFocus",
1995
+ "privacy": "private"
2132
1996
  }
2133
1997
  ],
2134
- "attributes": [
1998
+ "events": [
2135
1999
  {
2136
- "name": "indeterminate",
2000
+ "name": "nord-focus-date",
2137
2001
  "type": {
2138
- "text": "boolean"
2002
+ "text": "DateSelectEvent"
2139
2003
  },
2140
- "default": "false",
2141
- "description": "Controls whether the checkbox is in an indeterminate state.",
2142
- "fieldName": "indeterminate"
2004
+ "description": "Dispatched when the calendar's focused date changes."
2143
2005
  },
2144
2006
  {
2145
- "name": "checked",
2146
2007
  "type": {
2147
- "text": "boolean"
2008
+ "text": "DateSelectEvent"
2148
2009
  },
2149
- "default": "false",
2150
- "description": "Controls whether the checkbox is checked or not.",
2151
- "fieldName": "checked"
2152
- },
2010
+ "description": "Dispatched when a date is selected and the value changes.",
2011
+ "name": "change"
2012
+ }
2013
+ ],
2014
+ "attributes": [
2153
2015
  {
2154
- "name": "size",
2016
+ "name": "value",
2155
2017
  "type": {
2156
- "text": "\"s\" | \"m\" | \"l\""
2018
+ "text": "string"
2157
2019
  },
2158
- "default": "\"m\"",
2159
- "description": "The size of the component.",
2160
- "fieldName": "size",
2161
- "inheritedFrom": {
2162
- "name": "SizeMixin",
2163
- "module": "src/common/mixins/SizeMixin.ts"
2164
- }
2020
+ "default": "\"\"",
2021
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2022
+ "fieldName": "value"
2165
2023
  },
2166
2024
  {
2167
- "name": "label",
2025
+ "name": "first-day-of-week",
2168
2026
  "type": {
2169
- "text": "string"
2027
+ "text": "DaysOfWeek"
2170
2028
  },
2171
- "default": "\"\"",
2172
- "description": "Label for the input.",
2173
- "fieldName": "label",
2174
- "inheritedFrom": {
2175
- "name": "FormAssociatedMixin",
2176
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2177
- }
2029
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2030
+ "fieldName": "firstDayOfWeek"
2178
2031
  },
2179
2032
  {
2180
- "name": "hint",
2033
+ "name": "min",
2181
2034
  "type": {
2182
2035
  "text": "string | undefined"
2183
2036
  },
2184
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2185
- "fieldName": "hint",
2186
- "inheritedFrom": {
2187
- "name": "FormAssociatedMixin",
2188
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2189
- }
2190
- },
2191
- {
2192
- "name": "hide-label",
2193
- "type": {
2194
- "text": "boolean"
2195
- },
2196
- "default": "false",
2197
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2198
- "fieldName": "hideLabel",
2199
- "inheritedFrom": {
2200
- "name": "FormAssociatedMixin",
2201
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2202
- }
2037
+ "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
2038
+ "fieldName": "min"
2203
2039
  },
2204
2040
  {
2205
- "name": "placeholder",
2041
+ "name": "max",
2206
2042
  "type": {
2207
2043
  "text": "string | undefined"
2208
2044
  },
2209
- "description": "Placeholder text to display within the input.",
2210
- "fieldName": "placeholder",
2211
- "inheritedFrom": {
2212
- "name": "FormAssociatedMixin",
2213
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2214
- }
2045
+ "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
2046
+ "fieldName": "max"
2215
2047
  },
2216
2048
  {
2217
- "name": "error",
2049
+ "name": "today",
2218
2050
  "type": {
2219
2051
  "text": "string | undefined"
2220
2052
  },
2221
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2222
- "fieldName": "error",
2223
- "inheritedFrom": {
2224
- "name": "FormAssociatedMixin",
2225
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2226
- }
2227
- },
2228
- {
2229
- "name": "required",
2230
- "type": {
2231
- "text": "boolean"
2232
- },
2233
- "default": "false",
2234
- "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.",
2235
- "fieldName": "required",
2236
- "inheritedFrom": {
2237
- "name": "FormAssociatedMixin",
2238
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2239
- }
2240
- },
2241
- {
2242
- "name": "hide-required",
2243
- "type": {
2244
- "text": "boolean"
2245
- },
2246
- "default": "false",
2247
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
2248
- "fieldName": "hideRequired",
2249
- "inheritedFrom": {
2250
- "name": "FormAssociatedMixin",
2251
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2252
- }
2053
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
2054
+ "fieldName": "today"
2253
2055
  },
2254
2056
  {
2255
- "name": "disabled",
2057
+ "name": "expand",
2256
2058
  "type": {
2257
2059
  "text": "boolean"
2258
2060
  },
2259
2061
  "default": "false",
2260
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2261
- "fieldName": "disabled",
2262
- "inheritedFrom": {
2263
- "name": "InputMixin",
2264
- "module": "src/common/mixins/InputMixin.ts"
2265
- }
2266
- },
2267
- {
2268
- "name": "name",
2269
- "type": {
2270
- "text": "string | undefined"
2271
- },
2272
- "description": "The name of the form component.",
2273
- "fieldName": "name",
2274
- "inheritedFrom": {
2275
- "name": "InputMixin",
2276
- "module": "src/common/mixins/InputMixin.ts"
2277
- }
2278
- },
2279
- {
2280
- "name": "value",
2281
- "type": {
2282
- "text": "string"
2283
- },
2284
- "default": "\"\"",
2285
- "description": "The value of the form component.",
2286
- "fieldName": "value",
2287
- "inheritedFrom": {
2288
- "name": "InputMixin",
2289
- "module": "src/common/mixins/InputMixin.ts"
2290
- }
2291
- },
2292
- {
2293
- "name": "form",
2294
- "type": {
2295
- "text": "HTMLFormElement | null"
2296
- },
2297
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
2298
- "fieldName": "form",
2299
- "inheritedFrom": {
2300
- "name": "InputMixin",
2301
- "module": "src/common/mixins/InputMixin.ts"
2302
- }
2062
+ "description": "Controls whether the calendar expands to fill the width of its container.",
2063
+ "fieldName": "expand"
2303
2064
  }
2304
2065
  ],
2305
- "mixins": [
2066
+ "superclass": {
2067
+ "name": "LitElement",
2068
+ "package": "lit"
2069
+ },
2070
+ "localization": [
2306
2071
  {
2307
- "name": "SizeMixin",
2308
- "module": "/src/common/mixins/SizeMixin.js"
2072
+ "name": "prevMonthLabel",
2073
+ "description": "Accessible label for the previous month button."
2309
2074
  },
2310
2075
  {
2311
- "name": "FormAssociatedMixin",
2312
- "module": "/src/common/mixins/FormAssociatedMixin.js"
2076
+ "name": "nextMonthLabel",
2077
+ "description": "Accessible label for the next month button."
2313
2078
  },
2314
2079
  {
2315
- "name": "InputMixin",
2316
- "module": "/src/common/mixins/InputMixin.js"
2080
+ "name": "monthSelectLabel",
2081
+ "description": "Accessible label for the month select."
2317
2082
  },
2318
2083
  {
2319
- "name": "FocusableMixin",
2320
- "module": "/src/common/mixins/FocusableMixin.js"
2084
+ "name": "yearSelectLabel",
2085
+ "description": "Accessible label for the year select."
2321
2086
  }
2322
2087
  ],
2323
- "superclass": {
2324
- "name": "LitElement",
2325
- "package": "lit"
2326
- },
2327
- "localization": [],
2328
2088
  "status": "ready",
2329
- "category": "form",
2330
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
2089
+ "category": "list",
2090
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n",
2331
2091
  "examples": [],
2332
2092
  "dependencies": [
2093
+ "button",
2094
+ "visually-hidden",
2333
2095
  "icon"
2334
2096
  ],
2335
- "tagName": "nord-checkbox",
2336
- "customElement": true,
2337
- "events": [
2338
- {
2339
- "name": "input",
2340
- "type": {
2341
- "text": "NordEvent"
2342
- },
2343
- "description": "Fired as the user types into the input.",
2344
- "inheritedFrom": {
2345
- "name": "FormAssociatedMixin",
2346
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2347
- }
2348
- },
2349
- {
2350
- "name": "change",
2351
- "type": {
2352
- "text": "NordEvent"
2353
- },
2354
- "description": "Fired whenever the input's value is changed via user interaction.",
2355
- "inheritedFrom": {
2356
- "name": "FormAssociatedMixin",
2357
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2358
- }
2359
- }
2360
- ]
2097
+ "tagName": "nord-calendar",
2098
+ "customElement": true
2361
2099
  }
2362
2100
  ],
2363
2101
  "exports": [
@@ -2365,610 +2103,869 @@
2365
2103
  "kind": "js",
2366
2104
  "name": "default",
2367
2105
  "declaration": {
2368
- "name": "Checkbox",
2369
- "module": "src/checkbox/Checkbox.ts"
2106
+ "name": "Calendar",
2107
+ "module": "src/calendar/Calendar.ts"
2370
2108
  }
2371
2109
  },
2372
2110
  {
2373
2111
  "kind": "custom-element-definition",
2374
- "name": "nord-checkbox",
2112
+ "name": "nord-calendar",
2375
2113
  "declaration": {
2376
- "name": "Checkbox",
2377
- "module": "src/checkbox/Checkbox.ts"
2114
+ "name": "Calendar",
2115
+ "module": "src/calendar/Calendar.ts"
2378
2116
  }
2379
2117
  }
2380
2118
  ]
2381
2119
  },
2382
2120
  {
2383
2121
  "kind": "javascript-module",
2384
- "path": "src/calendar/Calendar.ts",
2122
+ "path": "src/calendar/DateSelectEvent.ts",
2385
2123
  "declarations": [
2386
2124
  {
2387
2125
  "kind": "class",
2388
- "description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
2389
- "name": "Calendar",
2126
+ "description": "",
2127
+ "name": "DateSelectEvent",
2128
+ "superclass": {
2129
+ "name": "NordEvent",
2130
+ "module": "/src/common/events.js"
2131
+ }
2132
+ }
2133
+ ],
2134
+ "exports": [
2135
+ {
2136
+ "kind": "js",
2137
+ "name": "DateSelectEvent",
2138
+ "declaration": {
2139
+ "name": "DateSelectEvent",
2140
+ "module": "src/calendar/DateSelectEvent.ts"
2141
+ }
2142
+ }
2143
+ ]
2144
+ },
2145
+ {
2146
+ "kind": "javascript-module",
2147
+ "path": "src/calendar/localization.ts",
2148
+ "declarations": [
2149
+ {
2150
+ "kind": "variable",
2151
+ "name": "calendarLocalization",
2152
+ "type": {
2153
+ "text": "object"
2154
+ },
2155
+ "default": "{ prevMonthLabel: \"Previous month\", nextMonthLabel: \"Next month\", monthSelectLabel: \"Month\", yearSelectLabel: \"Year\", }"
2156
+ }
2157
+ ],
2158
+ "exports": [
2159
+ {
2160
+ "kind": "js",
2161
+ "name": "default",
2162
+ "declaration": {
2163
+ "name": "calendarLocalization",
2164
+ "module": "src/calendar/localization.ts"
2165
+ }
2166
+ }
2167
+ ]
2168
+ },
2169
+ {
2170
+ "kind": "javascript-module",
2171
+ "path": "src/card/Card.ts",
2172
+ "declarations": [
2173
+ {
2174
+ "kind": "class",
2175
+ "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.",
2176
+ "name": "Card",
2390
2177
  "cssProperties": [
2391
2178
  {
2392
2179
  "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2393
- "name": "--n-calendar-border-radius",
2180
+ "name": "--n-card-border-radius",
2394
2181
  "default": "var(--n-border-radius)"
2395
2182
  },
2396
2183
  {
2397
2184
  "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2398
- "name": "--n-calendar-box-shadow",
2185
+ "name": "--n-card-box-shadow",
2399
2186
  "default": "var(--n-box-shadow-popout)"
2187
+ },
2188
+ {
2189
+ "description": "Controls the padding on all sides of the card.",
2190
+ "name": "--n-card-padding",
2191
+ "default": "var(--n-space-m)"
2192
+ },
2193
+ {
2194
+ "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2195
+ "name": "--n-card-slot-padding",
2196
+ "default": "var(--n-space-m)"
2400
2197
  }
2401
2198
  ],
2402
- "members": [
2199
+ "slots": [
2403
2200
  {
2404
- "kind": "field",
2405
- "name": "monthSelectNode",
2406
- "type": {
2407
- "text": "HTMLElement"
2408
- },
2409
- "privacy": "private"
2201
+ "description": "The card content.",
2202
+ "name": ""
2410
2203
  },
2411
2204
  {
2412
- "kind": "field",
2413
- "name": "focusedDayNode",
2414
- "type": {
2415
- "text": "HTMLButtonElement"
2416
- },
2417
- "privacy": "private"
2205
+ "description": "Optional slot that holds a header for the card.",
2206
+ "name": "header"
2418
2207
  },
2419
2208
  {
2420
- "kind": "field",
2421
- "name": "direction",
2422
- "privacy": "private",
2423
- "default": "new DirectionController(this)"
2209
+ "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2210
+ "name": "header-end"
2424
2211
  },
2425
2212
  {
2426
- "kind": "field",
2427
- "name": "swipe",
2428
- "privacy": "private",
2429
- "default": "new SwipeController(this, { matchesGesture: isHorizontalSwipe, onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1), })"
2430
- },
2213
+ "description": "Optional slot that holds footer content for the card.",
2214
+ "name": "footer"
2215
+ }
2216
+ ],
2217
+ "members": [
2431
2218
  {
2432
2219
  "kind": "field",
2433
- "name": "shortcuts",
2434
- "privacy": "private"
2220
+ "name": "headerSlot",
2221
+ "privacy": "private",
2222
+ "default": "new SlotController(this, \"header\")"
2435
2223
  },
2436
2224
  {
2437
2225
  "kind": "field",
2438
- "name": "localize",
2226
+ "name": "headerEndSlot",
2439
2227
  "privacy": "private",
2440
- "default": "new LocalizeController<\"nord-calendar\">(this, { onLangChange: () => this.handleLangChange(), })"
2228
+ "default": "new SlotController(this, \"header-end\")"
2441
2229
  },
2442
2230
  {
2443
2231
  "kind": "field",
2444
- "name": "dateFormatShort",
2445
- "type": {
2446
- "text": "Intl.DateTimeFormat"
2447
- },
2232
+ "name": "footerSlot",
2448
2233
  "privacy": "private",
2449
- "description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
2234
+ "default": "new SlotController(this, \"footer\")"
2450
2235
  },
2451
2236
  {
2452
2237
  "kind": "field",
2453
- "name": "monthNames",
2238
+ "name": "padding",
2454
2239
  "type": {
2455
- "text": "string[]"
2240
+ "text": "\"m\" | \"l\" | \"none\""
2456
2241
  },
2457
- "privacy": "private"
2458
- },
2242
+ "default": "\"m\"",
2243
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2244
+ "attribute": "padding",
2245
+ "reflects": true
2246
+ }
2247
+ ],
2248
+ "attributes": [
2459
2249
  {
2460
- "kind": "field",
2461
- "name": "monthNamesShort",
2250
+ "name": "padding",
2462
2251
  "type": {
2463
- "text": "string[]"
2252
+ "text": "\"m\" | \"l\" | \"none\""
2464
2253
  },
2465
- "privacy": "private"
2466
- },
2254
+ "default": "\"m\"",
2255
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2256
+ "fieldName": "padding"
2257
+ }
2258
+ ],
2259
+ "superclass": {
2260
+ "name": "LitElement",
2261
+ "package": "lit"
2262
+ },
2263
+ "localization": [],
2264
+ "status": "ready",
2265
+ "category": "structure",
2266
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
2267
+ "examples": [],
2268
+ "dependencies": [],
2269
+ "tagName": "nord-card",
2270
+ "customElement": true
2271
+ }
2272
+ ],
2273
+ "exports": [
2274
+ {
2275
+ "kind": "js",
2276
+ "name": "default",
2277
+ "declaration": {
2278
+ "name": "Card",
2279
+ "module": "src/card/Card.ts"
2280
+ }
2281
+ },
2282
+ {
2283
+ "kind": "custom-element-definition",
2284
+ "name": "nord-card",
2285
+ "declaration": {
2286
+ "name": "Card",
2287
+ "module": "src/card/Card.ts"
2288
+ }
2289
+ }
2290
+ ]
2291
+ },
2292
+ {
2293
+ "kind": "javascript-module",
2294
+ "path": "src/checkbox/Checkbox.ts",
2295
+ "declarations": [
2296
+ {
2297
+ "kind": "class",
2298
+ "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
2299
+ "name": "Checkbox",
2300
+ "cssProperties": [
2467
2301
  {
2468
- "kind": "field",
2469
- "name": "dayNames",
2470
- "type": {
2471
- "text": "string[]"
2472
- },
2473
- "privacy": "private"
2474
- },
2302
+ "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
2303
+ "name": "--n-label-color",
2304
+ "default": "var(--n-color-text)"
2305
+ }
2306
+ ],
2307
+ "slots": [
2475
2308
  {
2476
- "kind": "field",
2477
- "name": "dayNamesShort",
2478
- "type": {
2479
- "text": "string[]"
2480
- },
2481
- "privacy": "private"
2309
+ "description": "Use when a label requires more than plain text.",
2310
+ "name": "label"
2482
2311
  },
2483
2312
  {
2484
- "kind": "field",
2485
- "name": "value",
2486
- "type": {
2487
- "text": "string"
2488
- },
2489
- "default": "\"\"",
2490
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2491
- "attribute": "value"
2313
+ "description": "Optional slot that holds hint text for the input.",
2314
+ "name": "hint"
2492
2315
  },
2493
2316
  {
2494
- "kind": "field",
2495
- "name": "firstDayOfWeek",
2496
- "type": {
2497
- "text": "DaysOfWeek"
2498
- },
2499
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2500
- "attribute": "first-day-of-week",
2501
- "reflects": true
2502
- },
2317
+ "description": "Optional slot that holds error text for the input.",
2318
+ "name": "error"
2319
+ }
2320
+ ],
2321
+ "members": [
2503
2322
  {
2504
2323
  "kind": "field",
2505
- "name": "min",
2506
- "type": {
2507
- "text": "string | undefined"
2508
- },
2509
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
2510
- "attribute": "min",
2511
- "reflects": true
2324
+ "name": "formValue",
2325
+ "privacy": "protected",
2326
+ "readonly": true,
2327
+ "inheritedFrom": {
2328
+ "name": "FormAssociatedMixin",
2329
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2330
+ }
2512
2331
  },
2513
2332
  {
2514
2333
  "kind": "field",
2515
- "name": "max",
2334
+ "name": "indeterminate",
2516
2335
  "type": {
2517
- "text": "string | undefined"
2336
+ "text": "boolean"
2518
2337
  },
2519
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
2520
- "attribute": "max",
2338
+ "default": "false",
2339
+ "description": "Controls whether the checkbox is in an indeterminate state.",
2340
+ "attribute": "indeterminate",
2521
2341
  "reflects": true
2522
2342
  },
2523
2343
  {
2524
2344
  "kind": "field",
2525
- "name": "expand",
2345
+ "name": "checked",
2526
2346
  "type": {
2527
2347
  "text": "boolean"
2528
2348
  },
2529
2349
  "default": "false",
2530
- "description": "Controls whether the calendar expands to fill the width of its container.",
2531
- "attribute": "expand",
2350
+ "description": "Controls whether the checkbox is checked or not.",
2351
+ "attribute": "checked",
2532
2352
  "reflects": true
2533
2353
  },
2534
2354
  {
2535
- "kind": "field",
2536
- "name": "isDateDisabled",
2537
- "type": {
2538
- "text": "DatePredicate"
2355
+ "kind": "method",
2356
+ "name": "handleChange",
2357
+ "privacy": "protected",
2358
+ "parameters": [
2359
+ {
2360
+ "name": "e",
2361
+ "type": {
2362
+ "text": "Event"
2363
+ }
2364
+ }
2365
+ ],
2366
+ "return": {
2367
+ "type": {
2368
+ "text": "void"
2369
+ }
2539
2370
  },
2540
- "default": "isDateDisabled",
2541
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
2371
+ "inheritedFrom": {
2372
+ "name": "FormAssociatedMixin",
2373
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2374
+ }
2542
2375
  },
2543
2376
  {
2544
2377
  "kind": "field",
2545
- "name": "isDateHighlighted",
2378
+ "name": "size",
2546
2379
  "type": {
2547
- "text": "(date: Date) => string | boolean"
2380
+ "text": "\"s\" | \"m\" | \"l\""
2548
2381
  },
2549
- "default": "isDateHighlighted",
2550
- "description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
2382
+ "default": "\"m\"",
2383
+ "description": "The size of the component.",
2384
+ "attribute": "size",
2385
+ "reflects": true,
2386
+ "inheritedFrom": {
2387
+ "name": "SizeMixin",
2388
+ "module": "src/common/mixins/SizeMixin.ts"
2389
+ }
2551
2390
  },
2552
2391
  {
2553
2392
  "kind": "field",
2554
- "name": "activeFocus",
2555
- "type": {
2556
- "text": "boolean"
2557
- },
2558
- "privacy": "private",
2559
- "default": "false"
2393
+ "name": "labelSlot",
2394
+ "privacy": "protected",
2395
+ "default": "new SlotController(this, \"label\")",
2396
+ "inheritedFrom": {
2397
+ "name": "FormAssociatedMixin",
2398
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2399
+ }
2560
2400
  },
2561
2401
  {
2562
2402
  "kind": "field",
2563
- "name": "focusedDay",
2564
- "privacy": "private",
2565
- "default": "new Date()"
2403
+ "name": "errorSlot",
2404
+ "privacy": "protected",
2405
+ "default": "new SlotController(this, \"error\")",
2406
+ "inheritedFrom": {
2407
+ "name": "FormAssociatedMixin",
2408
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2409
+ }
2566
2410
  },
2567
2411
  {
2568
- "kind": "method",
2569
- "name": "focus",
2570
- "parameters": [
2571
- {
2572
- "name": "options",
2573
- "optional": true,
2574
- "type": {
2575
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
2576
- },
2577
- "description": "An object which controls aspects of the focusing process."
2578
- }
2579
- ],
2580
- "description": "Programmatically move focus to the calendar."
2412
+ "kind": "field",
2413
+ "name": "hintSlot",
2414
+ "privacy": "protected",
2415
+ "default": "new SlotController(this, \"hint\")",
2416
+ "inheritedFrom": {
2417
+ "name": "FormAssociatedMixin",
2418
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2419
+ }
2581
2420
  },
2582
2421
  {
2583
- "kind": "method",
2584
- "name": "handleValueChange",
2585
- "privacy": "protected"
2422
+ "kind": "field",
2423
+ "name": "formData",
2424
+ "privacy": "protected",
2425
+ "default": "new FormDataController(this, { value: () => this.formValue })",
2426
+ "inheritedFrom": {
2427
+ "name": "FormAssociatedMixin",
2428
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2429
+ }
2586
2430
  },
2587
2431
  {
2588
- "kind": "method",
2589
- "name": "handleFocusedDayChange",
2590
- "privacy": "protected"
2432
+ "kind": "field",
2433
+ "name": "inputId",
2434
+ "type": {
2435
+ "text": "string"
2436
+ },
2437
+ "privacy": "protected",
2438
+ "default": "\"input\"",
2439
+ "inheritedFrom": {
2440
+ "name": "FormAssociatedMixin",
2441
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2442
+ }
2591
2443
  },
2592
2444
  {
2593
- "kind": "method",
2594
- "name": "handleLangChange",
2595
- "privacy": "private"
2445
+ "kind": "field",
2446
+ "name": "errorId",
2447
+ "type": {
2448
+ "text": "string"
2449
+ },
2450
+ "privacy": "protected",
2451
+ "default": "\"error\"",
2452
+ "inheritedFrom": {
2453
+ "name": "FormAssociatedMixin",
2454
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2455
+ }
2596
2456
  },
2597
2457
  {
2598
2458
  "kind": "field",
2599
- "name": "handleDaySelect",
2600
- "privacy": "private"
2459
+ "name": "hintId",
2460
+ "type": {
2461
+ "text": "string"
2462
+ },
2463
+ "privacy": "protected",
2464
+ "default": "\"hint\"",
2465
+ "inheritedFrom": {
2466
+ "name": "FormAssociatedMixin",
2467
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2468
+ }
2601
2469
  },
2602
2470
  {
2603
- "kind": "method",
2604
- "name": "addDays",
2605
- "privacy": "private",
2606
- "parameters": [
2607
- {
2608
- "name": "days",
2609
- "type": {
2610
- "text": "number"
2611
- }
2612
- }
2613
- ]
2471
+ "kind": "field",
2472
+ "name": "label",
2473
+ "type": {
2474
+ "text": "string"
2475
+ },
2476
+ "default": "\"\"",
2477
+ "description": "Label for the input.",
2478
+ "attribute": "label",
2479
+ "reflects": true,
2480
+ "inheritedFrom": {
2481
+ "name": "FormAssociatedMixin",
2482
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2483
+ }
2614
2484
  },
2615
2485
  {
2616
- "kind": "method",
2617
- "name": "addMonths",
2618
- "privacy": "private",
2619
- "parameters": [
2620
- {
2621
- "name": "months",
2622
- "type": {
2623
- "text": "number"
2624
- }
2625
- }
2626
- ]
2486
+ "kind": "field",
2487
+ "name": "hint",
2488
+ "type": {
2489
+ "text": "string | undefined"
2490
+ },
2491
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2492
+ "attribute": "hint",
2493
+ "reflects": true,
2494
+ "inheritedFrom": {
2495
+ "name": "FormAssociatedMixin",
2496
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2497
+ }
2627
2498
  },
2628
2499
  {
2629
- "kind": "method",
2630
- "name": "addYears",
2631
- "privacy": "private",
2632
- "parameters": [
2633
- {
2634
- "name": "years",
2635
- "type": {
2636
- "text": "number"
2637
- }
2638
- }
2639
- ]
2500
+ "kind": "field",
2501
+ "name": "hideLabel",
2502
+ "type": {
2503
+ "text": "boolean"
2504
+ },
2505
+ "default": "false",
2506
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2507
+ "attribute": "hide-label",
2508
+ "reflects": true,
2509
+ "inheritedFrom": {
2510
+ "name": "FormAssociatedMixin",
2511
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2512
+ }
2640
2513
  },
2641
2514
  {
2642
- "kind": "method",
2643
- "name": "startOfWeek",
2644
- "privacy": "private"
2515
+ "kind": "field",
2516
+ "name": "placeholder",
2517
+ "type": {
2518
+ "text": "string | undefined"
2519
+ },
2520
+ "description": "Placeholder text to display within the input.",
2521
+ "attribute": "placeholder",
2522
+ "reflects": true,
2523
+ "inheritedFrom": {
2524
+ "name": "FormAssociatedMixin",
2525
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2526
+ }
2645
2527
  },
2646
2528
  {
2647
- "kind": "method",
2648
- "name": "endOfWeek",
2649
- "privacy": "private"
2529
+ "kind": "field",
2530
+ "name": "error",
2531
+ "type": {
2532
+ "text": "string | undefined"
2533
+ },
2534
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2535
+ "attribute": "error",
2536
+ "reflects": true,
2537
+ "inheritedFrom": {
2538
+ "name": "FormAssociatedMixin",
2539
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2540
+ }
2541
+ },
2542
+ {
2543
+ "kind": "field",
2544
+ "name": "required",
2545
+ "type": {
2546
+ "text": "boolean"
2547
+ },
2548
+ "default": "false",
2549
+ "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.",
2550
+ "attribute": "required",
2551
+ "reflects": true,
2552
+ "inheritedFrom": {
2553
+ "name": "FormAssociatedMixin",
2554
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2555
+ }
2556
+ },
2557
+ {
2558
+ "kind": "field",
2559
+ "name": "hideRequired",
2560
+ "type": {
2561
+ "text": "boolean"
2562
+ },
2563
+ "default": "false",
2564
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
2565
+ "attribute": "hide-required",
2566
+ "reflects": true,
2567
+ "inheritedFrom": {
2568
+ "name": "FormAssociatedMixin",
2569
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2570
+ }
2650
2571
  },
2651
2572
  {
2652
2573
  "kind": "method",
2653
- "name": "setMonth",
2654
- "privacy": "private",
2574
+ "name": "handleInput",
2575
+ "privacy": "protected",
2655
2576
  "parameters": [
2656
2577
  {
2657
- "name": "month",
2578
+ "name": "e",
2658
2579
  "type": {
2659
- "text": "number"
2580
+ "text": "Event"
2660
2581
  }
2661
2582
  }
2662
- ]
2583
+ ],
2584
+ "inheritedFrom": {
2585
+ "name": "FormAssociatedMixin",
2586
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2587
+ }
2663
2588
  },
2664
2589
  {
2665
2590
  "kind": "method",
2666
- "name": "setYear",
2667
- "privacy": "private",
2591
+ "name": "renderLabel",
2592
+ "privacy": "protected",
2668
2593
  "parameters": [
2669
2594
  {
2670
- "name": "year",
2595
+ "name": "additionalContent",
2596
+ "optional": true,
2671
2597
  "type": {
2672
- "text": "number"
2598
+ "text": "TemplateResult"
2673
2599
  }
2674
2600
  }
2675
- ]
2601
+ ],
2602
+ "inheritedFrom": {
2603
+ "name": "FormAssociatedMixin",
2604
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2605
+ }
2676
2606
  },
2677
2607
  {
2678
2608
  "kind": "method",
2679
- "name": "setFocusedDay",
2680
- "privacy": "private",
2681
- "parameters": [
2682
- {
2683
- "name": "day",
2684
- "type": {
2685
- "text": "Date"
2686
- }
2687
- }
2688
- ]
2609
+ "name": "renderError",
2610
+ "privacy": "protected",
2611
+ "inheritedFrom": {
2612
+ "name": "FormAssociatedMixin",
2613
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2614
+ }
2689
2615
  },
2690
2616
  {
2691
- "kind": "field",
2692
- "name": "handleMonthSelect",
2693
- "privacy": "private"
2694
- },
2695
- {
2696
- "kind": "field",
2697
- "name": "handleYearSelect",
2698
- "privacy": "private"
2617
+ "kind": "method",
2618
+ "name": "getDescribedBy",
2619
+ "privacy": "protected",
2620
+ "inheritedFrom": {
2621
+ "name": "FormAssociatedMixin",
2622
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2623
+ }
2699
2624
  },
2700
2625
  {
2701
- "kind": "field",
2702
- "name": "handleNextMonthClick",
2703
- "privacy": "private"
2626
+ "kind": "method",
2627
+ "name": "getInvalid",
2628
+ "privacy": "protected",
2629
+ "inheritedFrom": {
2630
+ "name": "FormAssociatedMixin",
2631
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2632
+ }
2704
2633
  },
2705
2634
  {
2706
2635
  "kind": "field",
2707
- "name": "handlePreviousMonthClick",
2708
- "privacy": "private"
2636
+ "name": "hasHint",
2637
+ "privacy": "protected",
2638
+ "readonly": true,
2639
+ "inheritedFrom": {
2640
+ "name": "FormAssociatedMixin",
2641
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2642
+ }
2709
2643
  },
2710
2644
  {
2711
2645
  "kind": "field",
2712
- "name": "enableActiveFocus",
2713
- "privacy": "private"
2646
+ "name": "hasError",
2647
+ "privacy": "protected",
2648
+ "readonly": true,
2649
+ "inheritedFrom": {
2650
+ "name": "FormAssociatedMixin",
2651
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2652
+ }
2714
2653
  },
2715
2654
  {
2716
2655
  "kind": "field",
2717
- "name": "disableActiveFocus",
2718
- "privacy": "private"
2719
- }
2720
- ],
2721
- "events": [
2722
- {
2723
- "name": "nord-focus-date",
2656
+ "name": "disabled",
2724
2657
  "type": {
2725
- "text": "DateSelectEvent"
2658
+ "text": "boolean"
2726
2659
  },
2727
- "description": "Dispatched when the calendar's focused date changes."
2660
+ "default": "false",
2661
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2662
+ "attribute": "disabled",
2663
+ "reflects": true,
2664
+ "inheritedFrom": {
2665
+ "name": "InputMixin",
2666
+ "module": "src/common/mixins/InputMixin.ts"
2667
+ }
2728
2668
  },
2729
2669
  {
2670
+ "kind": "field",
2671
+ "name": "name",
2730
2672
  "type": {
2731
- "text": "DateSelectEvent"
2673
+ "text": "string | undefined"
2732
2674
  },
2733
- "description": "Dispatched when a date is selected and the value changes.",
2734
- "name": "change"
2735
- }
2736
- ],
2737
- "attributes": [
2675
+ "description": "The name of the form component.",
2676
+ "attribute": "name",
2677
+ "reflects": true,
2678
+ "inheritedFrom": {
2679
+ "name": "InputMixin",
2680
+ "module": "src/common/mixins/InputMixin.ts"
2681
+ }
2682
+ },
2738
2683
  {
2684
+ "kind": "field",
2739
2685
  "name": "value",
2740
2686
  "type": {
2741
2687
  "text": "string"
2742
2688
  },
2743
2689
  "default": "\"\"",
2744
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2745
- "fieldName": "value"
2690
+ "description": "The value of the form component.",
2691
+ "attribute": "value",
2692
+ "inheritedFrom": {
2693
+ "name": "InputMixin",
2694
+ "module": "src/common/mixins/InputMixin.ts"
2695
+ }
2746
2696
  },
2747
2697
  {
2748
- "name": "first-day-of-week",
2698
+ "kind": "field",
2699
+ "name": "formAncestor",
2749
2700
  "type": {
2750
- "text": "DaysOfWeek"
2701
+ "text": "HTMLFormElement | null"
2751
2702
  },
2752
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2753
- "fieldName": "firstDayOfWeek"
2703
+ "privacy": "private",
2704
+ "default": "null",
2705
+ "inheritedFrom": {
2706
+ "name": "InputMixin",
2707
+ "module": "src/common/mixins/InputMixin.ts"
2708
+ }
2754
2709
  },
2755
2710
  {
2756
- "name": "min",
2711
+ "kind": "field",
2712
+ "name": "_formId",
2757
2713
  "type": {
2758
2714
  "text": "string | undefined"
2759
2715
  },
2760
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
2761
- "fieldName": "min"
2716
+ "privacy": "protected",
2717
+ "inheritedFrom": {
2718
+ "name": "InputMixin",
2719
+ "module": "src/common/mixins/InputMixin.ts"
2720
+ }
2762
2721
  },
2763
2722
  {
2764
- "name": "max",
2723
+ "kind": "field",
2724
+ "name": "form",
2765
2725
  "type": {
2766
- "text": "string | undefined"
2726
+ "text": "HTMLFormElement | null"
2767
2727
  },
2768
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
2769
- "fieldName": "max"
2728
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
2729
+ "attribute": "form",
2730
+ "inheritedFrom": {
2731
+ "name": "InputMixin",
2732
+ "module": "src/common/mixins/InputMixin.ts"
2733
+ }
2770
2734
  },
2771
2735
  {
2772
- "name": "expand",
2773
- "type": {
2774
- "text": "boolean"
2775
- },
2776
- "default": "false",
2777
- "description": "Controls whether the calendar expands to fill the width of its container.",
2778
- "fieldName": "expand"
2779
- }
2780
- ],
2781
- "superclass": {
2782
- "name": "LitElement",
2783
- "package": "lit"
2784
- },
2785
- "localization": [
2786
- {
2787
- "name": "prevMonthLabel",
2788
- "description": "Accessible label for the previous month button."
2736
+ "kind": "field",
2737
+ "name": "focusableRef",
2738
+ "privacy": "protected",
2739
+ "inheritedFrom": {
2740
+ "name": "FocusableMixin",
2741
+ "module": "src/common/mixins/FocusableMixin.ts"
2742
+ }
2789
2743
  },
2790
2744
  {
2791
- "name": "nextMonthLabel",
2792
- "description": "Accessible label for the next month button."
2745
+ "kind": "method",
2746
+ "name": "focus",
2747
+ "parameters": [
2748
+ {
2749
+ "name": "options",
2750
+ "optional": true,
2751
+ "type": {
2752
+ "text": "FocusOptions"
2753
+ },
2754
+ "description": "An object which controls aspects of the focusing process."
2755
+ }
2756
+ ],
2757
+ "description": "Programmatically move focus to the component.",
2758
+ "inheritedFrom": {
2759
+ "name": "FocusableMixin",
2760
+ "module": "src/common/mixins/FocusableMixin.ts"
2761
+ }
2793
2762
  },
2794
2763
  {
2795
- "name": "monthSelectLabel",
2796
- "description": "Accessible label for the month select."
2764
+ "kind": "method",
2765
+ "name": "blur",
2766
+ "description": "Programmatically remove focus from the component.",
2767
+ "inheritedFrom": {
2768
+ "name": "FocusableMixin",
2769
+ "module": "src/common/mixins/FocusableMixin.ts"
2770
+ }
2797
2771
  },
2798
2772
  {
2799
- "name": "yearSelectLabel",
2800
- "description": "Accessible label for the year select."
2773
+ "kind": "method",
2774
+ "name": "click",
2775
+ "description": "Programmatically simulates a click on the component.",
2776
+ "inheritedFrom": {
2777
+ "name": "FocusableMixin",
2778
+ "module": "src/common/mixins/FocusableMixin.ts"
2779
+ }
2801
2780
  }
2802
2781
  ],
2803
- "status": "ready",
2804
- "category": "list",
2805
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n",
2806
- "examples": [],
2807
- "dependencies": [
2808
- "button",
2809
- "visually-hidden",
2810
- "icon"
2811
- ],
2812
- "tagName": "nord-calendar",
2813
- "customElement": true
2814
- }
2815
- ],
2816
- "exports": [
2817
- {
2818
- "kind": "js",
2819
- "name": "default",
2820
- "declaration": {
2821
- "name": "Calendar",
2822
- "module": "src/calendar/Calendar.ts"
2823
- }
2824
- },
2825
- {
2826
- "kind": "custom-element-definition",
2827
- "name": "nord-calendar",
2828
- "declaration": {
2829
- "name": "Calendar",
2830
- "module": "src/calendar/Calendar.ts"
2831
- }
2832
- }
2833
- ]
2834
- },
2835
- {
2836
- "kind": "javascript-module",
2837
- "path": "src/calendar/DateSelectEvent.ts",
2838
- "declarations": [
2839
- {
2840
- "kind": "class",
2841
- "description": "",
2842
- "name": "DateSelectEvent",
2843
- "superclass": {
2844
- "name": "NordEvent",
2845
- "module": "/src/common/events.js"
2846
- }
2847
- }
2848
- ],
2849
- "exports": [
2850
- {
2851
- "kind": "js",
2852
- "name": "DateSelectEvent",
2853
- "declaration": {
2854
- "name": "DateSelectEvent",
2855
- "module": "src/calendar/DateSelectEvent.ts"
2856
- }
2857
- }
2858
- ]
2859
- },
2860
- {
2861
- "kind": "javascript-module",
2862
- "path": "src/calendar/localization.ts",
2863
- "declarations": [
2864
- {
2865
- "kind": "variable",
2866
- "name": "calendarLocalization",
2867
- "type": {
2868
- "text": "object"
2869
- },
2870
- "default": "{ prevMonthLabel: \"Previous month\", nextMonthLabel: \"Next month\", monthSelectLabel: \"Month\", yearSelectLabel: \"Year\", }"
2871
- }
2872
- ],
2873
- "exports": [
2874
- {
2875
- "kind": "js",
2876
- "name": "default",
2877
- "declaration": {
2878
- "name": "calendarLocalization",
2879
- "module": "src/calendar/localization.ts"
2880
- }
2881
- }
2882
- ]
2883
- },
2884
- {
2885
- "kind": "javascript-module",
2886
- "path": "src/card/Card.ts",
2887
- "declarations": [
2888
- {
2889
- "kind": "class",
2890
- "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.",
2891
- "name": "Card",
2892
- "cssProperties": [
2782
+ "attributes": [
2893
2783
  {
2894
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2895
- "name": "--n-card-border-radius",
2896
- "default": "var(--n-border-radius)"
2784
+ "name": "indeterminate",
2785
+ "type": {
2786
+ "text": "boolean"
2787
+ },
2788
+ "default": "false",
2789
+ "description": "Controls whether the checkbox is in an indeterminate state.",
2790
+ "fieldName": "indeterminate"
2897
2791
  },
2898
2792
  {
2899
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2900
- "name": "--n-card-box-shadow",
2901
- "default": "var(--n-box-shadow-popout)"
2793
+ "name": "checked",
2794
+ "type": {
2795
+ "text": "boolean"
2796
+ },
2797
+ "default": "false",
2798
+ "description": "Controls whether the checkbox is checked or not.",
2799
+ "fieldName": "checked"
2902
2800
  },
2903
2801
  {
2904
- "description": "Controls the padding on all sides of the card.",
2905
- "name": "--n-card-padding",
2906
- "default": "var(--n-space-m)"
2802
+ "name": "size",
2803
+ "type": {
2804
+ "text": "\"s\" | \"m\" | \"l\""
2805
+ },
2806
+ "default": "\"m\"",
2807
+ "description": "The size of the component.",
2808
+ "fieldName": "size",
2809
+ "inheritedFrom": {
2810
+ "name": "SizeMixin",
2811
+ "module": "src/common/mixins/SizeMixin.ts"
2812
+ }
2907
2813
  },
2908
2814
  {
2909
- "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2910
- "name": "--n-card-slot-padding",
2911
- "default": "var(--n-space-m)"
2912
- }
2913
- ],
2914
- "slots": [
2815
+ "name": "label",
2816
+ "type": {
2817
+ "text": "string"
2818
+ },
2819
+ "default": "\"\"",
2820
+ "description": "Label for the input.",
2821
+ "fieldName": "label",
2822
+ "inheritedFrom": {
2823
+ "name": "FormAssociatedMixin",
2824
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2825
+ }
2826
+ },
2915
2827
  {
2916
- "description": "The card content.",
2917
- "name": ""
2828
+ "name": "hint",
2829
+ "type": {
2830
+ "text": "string | undefined"
2831
+ },
2832
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2833
+ "fieldName": "hint",
2834
+ "inheritedFrom": {
2835
+ "name": "FormAssociatedMixin",
2836
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2837
+ }
2918
2838
  },
2919
2839
  {
2920
- "description": "Optional slot that holds a header for the card.",
2921
- "name": "header"
2840
+ "name": "hide-label",
2841
+ "type": {
2842
+ "text": "boolean"
2843
+ },
2844
+ "default": "false",
2845
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2846
+ "fieldName": "hideLabel",
2847
+ "inheritedFrom": {
2848
+ "name": "FormAssociatedMixin",
2849
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2850
+ }
2922
2851
  },
2923
2852
  {
2924
- "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2925
- "name": "header-end"
2853
+ "name": "placeholder",
2854
+ "type": {
2855
+ "text": "string | undefined"
2856
+ },
2857
+ "description": "Placeholder text to display within the input.",
2858
+ "fieldName": "placeholder",
2859
+ "inheritedFrom": {
2860
+ "name": "FormAssociatedMixin",
2861
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2862
+ }
2926
2863
  },
2927
2864
  {
2928
- "description": "Optional slot that holds footer content for the card.",
2929
- "name": "footer"
2930
- }
2931
- ],
2932
- "members": [
2865
+ "name": "error",
2866
+ "type": {
2867
+ "text": "string | undefined"
2868
+ },
2869
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2870
+ "fieldName": "error",
2871
+ "inheritedFrom": {
2872
+ "name": "FormAssociatedMixin",
2873
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2874
+ }
2875
+ },
2933
2876
  {
2934
- "kind": "field",
2935
- "name": "headerSlot",
2936
- "privacy": "private",
2937
- "default": "new SlotController(this, \"header\")"
2877
+ "name": "required",
2878
+ "type": {
2879
+ "text": "boolean"
2880
+ },
2881
+ "default": "false",
2882
+ "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.",
2883
+ "fieldName": "required",
2884
+ "inheritedFrom": {
2885
+ "name": "FormAssociatedMixin",
2886
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2887
+ }
2938
2888
  },
2939
2889
  {
2940
- "kind": "field",
2941
- "name": "headerEndSlot",
2942
- "privacy": "private",
2943
- "default": "new SlotController(this, \"header-end\")"
2890
+ "name": "hide-required",
2891
+ "type": {
2892
+ "text": "boolean"
2893
+ },
2894
+ "default": "false",
2895
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
2896
+ "fieldName": "hideRequired",
2897
+ "inheritedFrom": {
2898
+ "name": "FormAssociatedMixin",
2899
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2900
+ }
2944
2901
  },
2945
2902
  {
2946
- "kind": "field",
2947
- "name": "footerSlot",
2948
- "privacy": "private",
2949
- "default": "new SlotController(this, \"footer\")"
2903
+ "name": "disabled",
2904
+ "type": {
2905
+ "text": "boolean"
2906
+ },
2907
+ "default": "false",
2908
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2909
+ "fieldName": "disabled",
2910
+ "inheritedFrom": {
2911
+ "name": "InputMixin",
2912
+ "module": "src/common/mixins/InputMixin.ts"
2913
+ }
2950
2914
  },
2951
2915
  {
2952
- "kind": "field",
2953
- "name": "padding",
2916
+ "name": "name",
2954
2917
  "type": {
2955
- "text": "\"m\" | \"l\" | \"none\""
2918
+ "text": "string | undefined"
2956
2919
  },
2957
- "default": "\"m\"",
2958
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2959
- "attribute": "padding",
2960
- "reflects": true
2920
+ "description": "The name of the form component.",
2921
+ "fieldName": "name",
2922
+ "inheritedFrom": {
2923
+ "name": "InputMixin",
2924
+ "module": "src/common/mixins/InputMixin.ts"
2925
+ }
2926
+ },
2927
+ {
2928
+ "name": "value",
2929
+ "type": {
2930
+ "text": "string"
2931
+ },
2932
+ "default": "\"\"",
2933
+ "description": "The value of the form component.",
2934
+ "fieldName": "value",
2935
+ "inheritedFrom": {
2936
+ "name": "InputMixin",
2937
+ "module": "src/common/mixins/InputMixin.ts"
2938
+ }
2939
+ },
2940
+ {
2941
+ "name": "form",
2942
+ "type": {
2943
+ "text": "HTMLFormElement | null"
2944
+ },
2945
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
2946
+ "fieldName": "form",
2947
+ "inheritedFrom": {
2948
+ "name": "InputMixin",
2949
+ "module": "src/common/mixins/InputMixin.ts"
2950
+ }
2961
2951
  }
2962
2952
  ],
2963
- "attributes": [
2953
+ "mixins": [
2954
+ {
2955
+ "name": "SizeMixin",
2956
+ "module": "/src/common/mixins/SizeMixin.js"
2957
+ },
2958
+ {
2959
+ "name": "FormAssociatedMixin",
2960
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
2961
+ },
2964
2962
  {
2965
- "name": "padding",
2966
- "type": {
2967
- "text": "\"m\" | \"l\" | \"none\""
2968
- },
2969
- "default": "\"m\"",
2970
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2971
- "fieldName": "padding"
2963
+ "name": "InputMixin",
2964
+ "module": "/src/common/mixins/InputMixin.js"
2965
+ },
2966
+ {
2967
+ "name": "FocusableMixin",
2968
+ "module": "/src/common/mixins/FocusableMixin.js"
2972
2969
  }
2973
2970
  ],
2974
2971
  "superclass": {
@@ -2977,12 +2974,38 @@
2977
2974
  },
2978
2975
  "localization": [],
2979
2976
  "status": "ready",
2980
- "category": "structure",
2981
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
2977
+ "category": "form",
2978
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
2982
2979
  "examples": [],
2983
- "dependencies": [],
2984
- "tagName": "nord-card",
2985
- "customElement": true
2980
+ "dependencies": [
2981
+ "icon"
2982
+ ],
2983
+ "tagName": "nord-checkbox",
2984
+ "customElement": true,
2985
+ "events": [
2986
+ {
2987
+ "name": "input",
2988
+ "type": {
2989
+ "text": "NordEvent"
2990
+ },
2991
+ "description": "Fired as the user types into the input.",
2992
+ "inheritedFrom": {
2993
+ "name": "FormAssociatedMixin",
2994
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2995
+ }
2996
+ },
2997
+ {
2998
+ "name": "change",
2999
+ "type": {
3000
+ "text": "NordEvent"
3001
+ },
3002
+ "description": "Fired whenever the input's value is changed via user interaction.",
3003
+ "inheritedFrom": {
3004
+ "name": "FormAssociatedMixin",
3005
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
3006
+ }
3007
+ }
3008
+ ]
2986
3009
  }
2987
3010
  ],
2988
3011
  "exports": [
@@ -2990,16 +3013,16 @@
2990
3013
  "kind": "js",
2991
3014
  "name": "default",
2992
3015
  "declaration": {
2993
- "name": "Card",
2994
- "module": "src/card/Card.ts"
3016
+ "name": "Checkbox",
3017
+ "module": "src/checkbox/Checkbox.ts"
2995
3018
  }
2996
3019
  },
2997
3020
  {
2998
3021
  "kind": "custom-element-definition",
2999
- "name": "nord-card",
3022
+ "name": "nord-checkbox",
3000
3023
  "declaration": {
3001
- "name": "Card",
3002
- "module": "src/card/Card.ts"
3024
+ "name": "Checkbox",
3025
+ "module": "src/checkbox/Checkbox.ts"
3003
3026
  }
3004
3027
  }
3005
3028
  ]
@@ -5172,6 +5195,16 @@
5172
5195
  "attribute": "max",
5173
5196
  "reflects": true
5174
5197
  },
5198
+ {
5199
+ "kind": "field",
5200
+ "name": "today",
5201
+ "type": {
5202
+ "text": "string | undefined"
5203
+ },
5204
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
5205
+ "attribute": "today",
5206
+ "reflects": true
5207
+ },
5175
5208
  {
5176
5209
  "kind": "field",
5177
5210
  "name": "firstDayOfWeek",
@@ -5817,6 +5850,14 @@
5817
5850
  "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
5818
5851
  "fieldName": "max"
5819
5852
  },
5853
+ {
5854
+ "name": "today",
5855
+ "type": {
5856
+ "text": "string | undefined"
5857
+ },
5858
+ "description": "The date that is considered today. Must be in IS0-8601 format: YYYY-MM-DD.\nIf not set, the current local date of the user is used.",
5859
+ "fieldName": "today"
5860
+ },
5820
5861
  {
5821
5862
  "name": "first-day-of-week",
5822
5863
  "type": {
@@ -6303,6 +6344,11 @@
6303
6344
  "description": "Controls the inline size, or width, of the dropdown. Will resize up to 1.5 times to account for larger content.",
6304
6345
  "name": "--n-dropdown-size",
6305
6346
  "default": "250px"
6347
+ },
6348
+ {
6349
+ "description": "Controls the maximum block size, or height, of the dropdown. Larger content will get a scrollbar.",
6350
+ "name": "--n-dropdown-max-block-size",
6351
+ "default": "460px"
6306
6352
  }
6307
6353
  ],
6308
6354
  "slots": [
@@ -13294,424 +13340,185 @@
13294
13340
  },
13295
13341
  {
13296
13342
  "kind": "javascript-module",
13297
- "path": "src/select/Select.ts",
13343
+ "path": "src/segmented-control-item/SegmentedControlItem.ts",
13298
13344
  "declarations": [
13299
13345
  {
13300
13346
  "kind": "class",
13301
- "description": "Select lets users choose one option from an options menu.\nConsider using select when you have 5 or more options to choose from.",
13302
- "name": "Select",
13347
+ "description": "Segmented control items populate a segmented control with options.\nEvery item should be placed inside a segmented control.",
13348
+ "name": "SegmentedControlItem",
13303
13349
  "cssProperties": [
13304
13350
  {
13305
- "description": "Controls the block size, or height, of the select using our [spacing tokens](/tokens/#space).",
13306
- "name": "--n-select-block-size",
13307
- "default": "var(--n-space-xl)"
13308
- },
13309
- {
13310
- "description": "Controls the inline size, or width, of the select.",
13311
- "name": "--n-select-inline-size",
13312
- "default": "fit-content"
13313
- },
13314
- {
13315
- "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
13316
- "name": "--n-label-color",
13317
- "default": "var(--n-color-text)"
13318
- }
13319
- ],
13320
- "slots": [
13321
- {
13322
- "description": "Default slot for holding <option> elements.",
13323
- "name": ""
13324
- },
13325
- {
13326
- "description": "Use when a label requires more than plain text.",
13327
- "name": "label"
13328
- },
13329
- {
13330
- "description": "Use when a hint requires more than plain text.",
13331
- "name": "hint"
13332
- },
13333
- {
13334
- "description": "Optional slot that holds error text for the input.",
13335
- "name": "error"
13336
- },
13337
- {
13338
- "description": "Used to place an icon at the start of select.",
13339
- "name": "icon"
13340
- }
13341
- ],
13342
- "members": [
13343
- {
13344
- "kind": "field",
13345
- "name": "formValue",
13346
- "privacy": "protected",
13347
- "readonly": true,
13348
- "inheritedFrom": {
13349
- "name": "FormAssociatedMixin",
13350
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13351
- }
13352
- },
13353
- {
13354
- "kind": "field",
13355
- "name": "defaultSlot",
13356
- "privacy": "private",
13357
- "default": "new SlotController(this)"
13358
- },
13359
- {
13360
- "kind": "field",
13361
- "name": "inputId",
13362
- "type": {
13363
- "text": "string"
13364
- },
13365
- "privacy": "protected",
13366
- "default": "\"select\"",
13367
- "inheritedFrom": {
13368
- "name": "FormAssociatedMixin",
13369
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13370
- }
13371
- },
13372
- {
13373
- "kind": "field",
13374
- "name": "expand",
13375
- "type": {
13376
- "text": "boolean"
13377
- },
13378
- "default": "false",
13379
- "description": "Controls whether the select expands to fill the width of its container.",
13380
- "attribute": "expand",
13381
- "reflects": true
13382
- },
13383
- {
13384
- "kind": "field",
13385
- "name": "options",
13386
- "privacy": "private",
13387
- "readonly": true
13388
- },
13389
- {
13390
- "kind": "method",
13391
- "name": "getButtonText",
13392
- "privacy": "private",
13393
- "return": {
13394
- "type": {
13395
- "text": "string"
13396
- }
13397
- },
13398
- "parameters": [
13399
- {
13400
- "name": "options",
13401
- "type": {
13402
- "text": "HTMLOptionElement[]"
13403
- }
13404
- }
13405
- ]
13351
+ "description": "Controls the rounded corners of the item, using [border radius tokens](/tokens/#border-radius).",
13352
+ "name": "--n-segmented-control-item-border-radius",
13353
+ "default": "var(--n-border-radius-s)"
13406
13354
  },
13407
13355
  {
13408
- "kind": "method",
13409
- "name": "renderOption",
13410
- "privacy": "private",
13411
- "parameters": [
13412
- {
13413
- "name": "option",
13414
- "type": {
13415
- "text": "HTMLOptionElement"
13416
- }
13417
- }
13418
- ]
13356
+ "description": "Controls the spacing between elements within the item, using our [spacing tokens](/tokens/#space).",
13357
+ "name": "--n-segmented-control-item-gap",
13358
+ "default": "var(--n-space-xs)"
13419
13359
  },
13420
13360
  {
13421
- "kind": "field",
13422
- "name": "size",
13423
- "type": {
13424
- "text": "\"s\" | \"m\" | \"l\""
13425
- },
13426
- "default": "\"m\"",
13427
- "description": "The size of the component.",
13428
- "attribute": "size",
13429
- "reflects": true,
13430
- "inheritedFrom": {
13431
- "name": "SizeMixin",
13432
- "module": "src/common/mixins/SizeMixin.ts"
13433
- }
13361
+ "description": "Controls the overlayed gradient background on the item.",
13362
+ "name": "--n-segmented-control-item-gradient",
13363
+ "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
13434
13364
  },
13435
13365
  {
13436
- "kind": "field",
13437
- "name": "labelSlot",
13438
- "privacy": "protected",
13439
- "default": "new SlotController(this, \"label\")",
13440
- "inheritedFrom": {
13441
- "name": "FormAssociatedMixin",
13442
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13443
- }
13366
+ "description": "Controls the background color of the item, using our [color tokens](/tokens/#color).",
13367
+ "name": "--n-segmented-control-item-background-color",
13368
+ "default": "var(--n-color-nav-hover)"
13444
13369
  },
13445
13370
  {
13446
- "kind": "field",
13447
- "name": "errorSlot",
13448
- "privacy": "protected",
13449
- "default": "new SlotController(this, \"error\")",
13450
- "inheritedFrom": {
13451
- "name": "FormAssociatedMixin",
13452
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13453
- }
13371
+ "description": "Controls the color of the text within the item, using our [color tokens](/tokens/#color).",
13372
+ "name": "--n-segmented-control-item-color",
13373
+ "default": "var(--n-color-text-weaker)"
13454
13374
  },
13455
13375
  {
13456
- "kind": "field",
13457
- "name": "hintSlot",
13458
- "privacy": "protected",
13459
- "default": "new SlotController(this, \"hint\")",
13460
- "inheritedFrom": {
13461
- "name": "FormAssociatedMixin",
13462
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13463
- }
13376
+ "description": "Controls the inline, or left and right, padding of the item.",
13377
+ "name": "--n-segmented-control-item-padding-inline",
13378
+ "default": "calc(var(--n-space-m) / 1.2)"
13464
13379
  },
13465
- {
13466
- "kind": "field",
13467
- "name": "formData",
13468
- "privacy": "protected",
13469
- "default": "new FormDataController(this, { value: () => this.formValue })",
13470
- "inheritedFrom": {
13471
- "name": "FormAssociatedMixin",
13472
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13473
- }
13380
+ {
13381
+ "description": "Controls the surrounding shadow, using our [box shadow tokens](/tokens/#box-shadow).",
13382
+ "name": "--n-segmented-control-item-box-shadow",
13383
+ "default": "none"
13474
13384
  },
13475
13385
  {
13476
- "kind": "field",
13477
- "name": "errorId",
13478
- "type": {
13479
- "text": "string"
13480
- },
13481
- "privacy": "protected",
13482
- "default": "\"error\"",
13483
- "inheritedFrom": {
13484
- "name": "FormAssociatedMixin",
13485
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13486
- }
13386
+ "description": "Controls the size of the text within the item, using our [font tokens](/tokens/#font).",
13387
+ "name": "--n-segmented-control-item-font-size",
13388
+ "default": "var(--n-font-size-m)"
13487
13389
  },
13488
13390
  {
13489
- "kind": "field",
13490
- "name": "hintId",
13491
- "type": {
13492
- "text": "string"
13493
- },
13494
- "privacy": "protected",
13495
- "default": "\"hint\"",
13496
- "inheritedFrom": {
13497
- "name": "FormAssociatedMixin",
13498
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13499
- }
13391
+ "description": "Controls the weight of the text within the item, using our [font tokens](/tokens/#font).",
13392
+ "name": "--n-segmented-control-item-font-weight",
13393
+ "default": "var(--n-font-weight)"
13500
13394
  },
13501
13395
  {
13502
- "kind": "field",
13503
- "name": "label",
13504
- "type": {
13505
- "text": "string"
13506
- },
13507
- "default": "\"\"",
13508
- "description": "Label for the input.",
13509
- "attribute": "label",
13510
- "reflects": true,
13511
- "inheritedFrom": {
13512
- "name": "FormAssociatedMixin",
13513
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13514
- }
13396
+ "description": "Controls the minimum block size, or height, of the item using our [spacing tokens](/tokens/#space).",
13397
+ "name": "--n-segmented-control-item-min-block-size",
13398
+ "default": "calc(var(--n-space-xl) - 2px)"
13515
13399
  },
13400
+ {
13401
+ "description": "Controls the inline size of the item.",
13402
+ "name": "--n-segmented-control-item-inline-size",
13403
+ "default": "auto"
13404
+ }
13405
+ ],
13406
+ "slots": [
13407
+ {
13408
+ "description": "Use when a label requires more than plain text.",
13409
+ "name": "label"
13410
+ }
13411
+ ],
13412
+ "members": [
13516
13413
  {
13517
13414
  "kind": "field",
13518
- "name": "hint",
13519
- "type": {
13520
- "text": "string | undefined"
13521
- },
13522
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
13523
- "attribute": "hint",
13524
- "reflects": true,
13525
- "inheritedFrom": {
13526
- "name": "FormAssociatedMixin",
13527
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13528
- }
13415
+ "name": "inputId",
13416
+ "privacy": "protected"
13529
13417
  },
13530
13418
  {
13531
13419
  "kind": "field",
13532
- "name": "hideLabel",
13533
- "type": {
13534
- "text": "boolean"
13535
- },
13536
- "default": "false",
13537
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
13538
- "attribute": "hide-label",
13539
- "reflects": true,
13540
- "inheritedFrom": {
13541
- "name": "FormAssociatedMixin",
13542
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13543
- }
13420
+ "name": "inputSlot",
13421
+ "privacy": "protected",
13422
+ "default": "new LightDomController(this, { render: () => html` <input slot=\"input\" @blur=${this.handleBlur} @focus=${this.handleFocus} ${ref(this.focusableRef)} id=${this.inputId} type=\"radio\" class=\"n-input\" name=${cond(this.name)} .value=${cond(this.value)} .checked=${this.checked} ?disabled=${this.disabled} form=${cond(this._formId)} /> `, })",
13423
+ "description": "For accessibility reasons, we render the form parts of the component to the light DOM."
13544
13424
  },
13545
13425
  {
13546
13426
  "kind": "field",
13547
- "name": "placeholder",
13548
- "type": {
13549
- "text": "string | undefined"
13550
- },
13551
- "description": "Placeholder text to display within the input.",
13552
- "attribute": "placeholder",
13553
- "reflects": true,
13554
- "inheritedFrom": {
13555
- "name": "FormAssociatedMixin",
13556
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13557
- }
13427
+ "name": "labelSlot",
13428
+ "privacy": "protected",
13429
+ "default": "new LightSlotController(this, { slotName: \"label\", render: () => this.label ? html`<label slot=\"label-internal\" for=${this.inputId} class=\"n-segmented-control-item\">${this.label}</label>` : nothing, syncLightDom: element => { if (!isLabel(element)) { // eslint-disable-next-line no-console console.warn(`NORD: Only <label> elements should be placed in Segmented Control's \"label\" slot`) } else { element.htmlFor = this.inputId } }, })"
13558
13430
  },
13559
13431
  {
13560
13432
  "kind": "field",
13561
- "name": "error",
13433
+ "name": "checked",
13562
13434
  "type": {
13563
- "text": "string | undefined"
13435
+ "text": "boolean"
13564
13436
  },
13565
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
13566
- "attribute": "error",
13567
- "reflects": true,
13568
- "inheritedFrom": {
13569
- "name": "FormAssociatedMixin",
13570
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13571
- }
13437
+ "default": "false",
13438
+ "description": "Controls whether the segmented control item is checked or not.",
13439
+ "attribute": "checked",
13440
+ "reflects": true
13572
13441
  },
13573
13442
  {
13574
13443
  "kind": "field",
13575
- "name": "required",
13444
+ "name": "size",
13576
13445
  "type": {
13577
- "text": "boolean"
13446
+ "text": "\"s\" | \"m\" | \"l\""
13578
13447
  },
13579
- "default": "false",
13580
- "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.",
13581
- "attribute": "required",
13582
- "reflects": true,
13583
- "inheritedFrom": {
13584
- "name": "FormAssociatedMixin",
13585
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13586
- }
13448
+ "default": "\"m\"",
13449
+ "description": "The size of the segmented control item.\nThis affects font-size and padding.",
13450
+ "attribute": "size",
13451
+ "reflects": true
13587
13452
  },
13588
13453
  {
13589
13454
  "kind": "field",
13590
- "name": "hideRequired",
13455
+ "name": "label",
13591
13456
  "type": {
13592
- "text": "boolean"
13457
+ "text": "string"
13593
13458
  },
13594
- "default": "false",
13595
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
13596
- "attribute": "hide-required",
13597
- "reflects": true,
13598
- "inheritedFrom": {
13599
- "name": "FormAssociatedMixin",
13600
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13601
- }
13459
+ "default": "\"\"",
13460
+ "description": "Label for the segmented control item.",
13461
+ "attribute": "label",
13462
+ "reflects": true
13602
13463
  },
13603
13464
  {
13604
13465
  "kind": "method",
13605
- "name": "handleInput",
13466
+ "name": "handleCheckedChange",
13606
13467
  "privacy": "protected",
13607
13468
  "parameters": [
13608
13469
  {
13609
- "name": "e",
13470
+ "name": "previousChecked",
13610
13471
  "type": {
13611
- "text": "Event"
13472
+ "text": "boolean"
13612
13473
  }
13613
13474
  }
13614
- ],
13615
- "inheritedFrom": {
13616
- "name": "FormAssociatedMixin",
13617
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13618
- }
13475
+ ]
13619
13476
  },
13620
13477
  {
13621
13478
  "kind": "method",
13622
- "name": "handleChange",
13623
- "privacy": "protected",
13624
- "parameters": [
13625
- {
13626
- "name": "e",
13627
- "type": {
13628
- "text": "Event"
13629
- }
13630
- }
13631
- ],
13632
- "inheritedFrom": {
13633
- "name": "FormAssociatedMixin",
13634
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13635
- }
13479
+ "name": "uncheckSiblings",
13480
+ "privacy": "private"
13636
13481
  },
13637
13482
  {
13638
13483
  "kind": "method",
13639
- "name": "renderLabel",
13484
+ "name": "handleChange",
13640
13485
  "privacy": "protected",
13486
+ "return": {
13487
+ "type": {
13488
+ "text": "void"
13489
+ }
13490
+ },
13641
13491
  "parameters": [
13642
13492
  {
13643
- "name": "additionalContent",
13644
- "optional": true,
13493
+ "name": "e",
13645
13494
  "type": {
13646
- "text": "TemplateResult"
13495
+ "text": "Event"
13647
13496
  }
13648
13497
  }
13649
- ],
13650
- "inheritedFrom": {
13651
- "name": "FormAssociatedMixin",
13652
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13653
- }
13654
- },
13655
- {
13656
- "kind": "method",
13657
- "name": "renderError",
13658
- "privacy": "protected",
13659
- "inheritedFrom": {
13660
- "name": "FormAssociatedMixin",
13661
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13662
- }
13663
- },
13664
- {
13665
- "kind": "method",
13666
- "name": "getDescribedBy",
13667
- "privacy": "protected",
13668
- "inheritedFrom": {
13669
- "name": "FormAssociatedMixin",
13670
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13671
- }
13672
- },
13673
- {
13674
- "kind": "method",
13675
- "name": "getInvalid",
13676
- "privacy": "protected",
13677
- "inheritedFrom": {
13678
- "name": "FormAssociatedMixin",
13679
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13680
- }
13681
- },
13682
- {
13683
- "kind": "field",
13684
- "name": "hasHint",
13685
- "privacy": "protected",
13686
- "readonly": true,
13687
- "inheritedFrom": {
13688
- "name": "FormAssociatedMixin",
13689
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13690
- }
13498
+ ]
13691
13499
  },
13692
13500
  {
13693
13501
  "kind": "field",
13694
- "name": "hasError",
13695
- "privacy": "protected",
13696
- "readonly": true,
13697
- "inheritedFrom": {
13698
- "name": "FormAssociatedMixin",
13699
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13700
- }
13502
+ "name": "handleBlur",
13503
+ "privacy": "private"
13701
13504
  },
13702
- {
13703
- "kind": "field",
13704
- "name": "autocomplete",
13705
- "type": {
13706
- "text": "AutocompleteAttribute"
13707
- },
13708
- "default": "\"off\"",
13709
- "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.",
13710
- "attribute": "autocomplete",
13711
- "inheritedFrom": {
13712
- "name": "AutocompleteMixin",
13713
- "module": "src/common/mixins/AutocompleteMixin.ts"
13714
- }
13505
+ {
13506
+ "kind": "field",
13507
+ "name": "handleFocus",
13508
+ "privacy": "private"
13509
+ },
13510
+ {
13511
+ "kind": "method",
13512
+ "name": "handleInput",
13513
+ "privacy": "protected",
13514
+ "parameters": [
13515
+ {
13516
+ "name": "e",
13517
+ "type": {
13518
+ "text": "Event"
13519
+ }
13520
+ }
13521
+ ]
13715
13522
  },
13716
13523
  {
13717
13524
  "kind": "field",
@@ -13841,15 +13648,31 @@
13841
13648
  }
13842
13649
  }
13843
13650
  ],
13651
+ "events": [
13652
+ {
13653
+ "name": "change",
13654
+ "type": {
13655
+ "text": "NordEvent"
13656
+ },
13657
+ "description": "Fired whenever the segmented control item has been checked."
13658
+ },
13659
+ {
13660
+ "name": "input",
13661
+ "type": {
13662
+ "text": "NordEvent"
13663
+ },
13664
+ "description": "Fired as the user types into the input."
13665
+ }
13666
+ ],
13844
13667
  "attributes": [
13845
13668
  {
13846
- "name": "expand",
13669
+ "name": "checked",
13847
13670
  "type": {
13848
13671
  "text": "boolean"
13849
13672
  },
13850
13673
  "default": "false",
13851
- "description": "Controls whether the select expands to fill the width of its container.",
13852
- "fieldName": "expand"
13674
+ "description": "Controls whether the segmented control item is checked or not.",
13675
+ "fieldName": "checked"
13853
13676
  },
13854
13677
  {
13855
13678
  "name": "size",
@@ -13857,12 +13680,8 @@
13857
13680
  "text": "\"s\" | \"m\" | \"l\""
13858
13681
  },
13859
13682
  "default": "\"m\"",
13860
- "description": "The size of the component.",
13861
- "fieldName": "size",
13862
- "inheritedFrom": {
13863
- "name": "SizeMixin",
13864
- "module": "src/common/mixins/SizeMixin.ts"
13865
- }
13683
+ "description": "The size of the segmented control item.\nThis affects font-size and padding.",
13684
+ "fieldName": "size"
13866
13685
  },
13867
13686
  {
13868
13687
  "name": "label",
@@ -13870,384 +13689,432 @@
13870
13689
  "text": "string"
13871
13690
  },
13872
13691
  "default": "\"\"",
13873
- "description": "Label for the input.",
13874
- "fieldName": "label",
13692
+ "description": "Label for the segmented control item.",
13693
+ "fieldName": "label"
13694
+ },
13695
+ {
13696
+ "name": "disabled",
13697
+ "type": {
13698
+ "text": "boolean"
13699
+ },
13700
+ "default": "false",
13701
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
13702
+ "fieldName": "disabled",
13875
13703
  "inheritedFrom": {
13876
- "name": "FormAssociatedMixin",
13877
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13704
+ "name": "InputMixin",
13705
+ "module": "src/common/mixins/InputMixin.ts"
13878
13706
  }
13879
13707
  },
13880
13708
  {
13881
- "name": "hint",
13709
+ "name": "name",
13882
13710
  "type": {
13883
13711
  "text": "string | undefined"
13884
13712
  },
13885
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
13886
- "fieldName": "hint",
13713
+ "description": "The name of the form component.",
13714
+ "fieldName": "name",
13887
13715
  "inheritedFrom": {
13888
- "name": "FormAssociatedMixin",
13889
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13716
+ "name": "InputMixin",
13717
+ "module": "src/common/mixins/InputMixin.ts"
13890
13718
  }
13891
13719
  },
13892
13720
  {
13893
- "name": "hide-label",
13721
+ "name": "value",
13894
13722
  "type": {
13895
- "text": "boolean"
13723
+ "text": "string"
13896
13724
  },
13897
- "default": "false",
13898
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
13899
- "fieldName": "hideLabel",
13725
+ "default": "\"\"",
13726
+ "description": "The value of the form component.",
13727
+ "fieldName": "value",
13900
13728
  "inheritedFrom": {
13901
- "name": "FormAssociatedMixin",
13902
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13729
+ "name": "InputMixin",
13730
+ "module": "src/common/mixins/InputMixin.ts"
13903
13731
  }
13904
13732
  },
13905
13733
  {
13906
- "name": "placeholder",
13734
+ "name": "form",
13907
13735
  "type": {
13908
- "text": "string | undefined"
13736
+ "text": "HTMLFormElement | null"
13909
13737
  },
13910
- "description": "Placeholder text to display within the input.",
13911
- "fieldName": "placeholder",
13738
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
13739
+ "fieldName": "form",
13740
+ "inheritedFrom": {
13741
+ "name": "InputMixin",
13742
+ "module": "src/common/mixins/InputMixin.ts"
13743
+ }
13744
+ }
13745
+ ],
13746
+ "mixins": [
13747
+ {
13748
+ "name": "InputMixin",
13749
+ "module": "/src/common/mixins/InputMixin.js"
13750
+ },
13751
+ {
13752
+ "name": "FocusableMixin",
13753
+ "module": "/src/common/mixins/FocusableMixin.js"
13754
+ }
13755
+ ],
13756
+ "superclass": {
13757
+ "name": "LitElement",
13758
+ "package": "lit"
13759
+ },
13760
+ "localization": [],
13761
+ "status": "new",
13762
+ "category": "action",
13763
+ "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 segmented control to allow users to pick one choice from a set of closely related choices, and immediately apply that selection.\n- Favor segmented control or [radio component](/components/radio/) over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Segmented control items are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of segmented control items.\n- Give each segmented control item within a group a unique `value`.\n- Segmented control items **must** be used in combination with a [segmented control component](/components/segmented-control/).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a [checkbox](/components/checkbox/) or [selectable tag](/components/tag/?example=selectable) instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a [checkbox](/components/checkbox/) instead.\n- When you have more than 5 options to choose from. Consider using a [select](/components/select/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nSegmented control labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing segmented control labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Once a segmented control item has been selected, users cannot return to having no items selected without refreshing their browser window. Therefore, you should always make sure one of the items is pre-selected.\n",
13764
+ "examples": [],
13765
+ "dependencies": [],
13766
+ "tagName": "nord-segmented-control-item",
13767
+ "customElement": true
13768
+ }
13769
+ ],
13770
+ "exports": [
13771
+ {
13772
+ "kind": "js",
13773
+ "name": "default",
13774
+ "declaration": {
13775
+ "name": "SegmentedControlItem",
13776
+ "module": "src/segmented-control-item/SegmentedControlItem.ts"
13777
+ }
13778
+ },
13779
+ {
13780
+ "kind": "custom-element-definition",
13781
+ "name": "nord-segmented-control-item",
13782
+ "declaration": {
13783
+ "name": "SegmentedControlItem",
13784
+ "module": "src/segmented-control-item/SegmentedControlItem.ts"
13785
+ }
13786
+ }
13787
+ ]
13788
+ },
13789
+ {
13790
+ "kind": "javascript-module",
13791
+ "path": "src/select/Select.ts",
13792
+ "declarations": [
13793
+ {
13794
+ "kind": "class",
13795
+ "description": "Select lets users choose one option from an options menu.\nConsider using select when you have 5 or more options to choose from.",
13796
+ "name": "Select",
13797
+ "cssProperties": [
13798
+ {
13799
+ "description": "Controls the block size, or height, of the select using our [spacing tokens](/tokens/#space).",
13800
+ "name": "--n-select-block-size",
13801
+ "default": "var(--n-space-xl)"
13802
+ },
13803
+ {
13804
+ "description": "Controls the inline size, or width, of the select.",
13805
+ "name": "--n-select-inline-size",
13806
+ "default": "fit-content"
13807
+ },
13808
+ {
13809
+ "description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
13810
+ "name": "--n-label-color",
13811
+ "default": "var(--n-color-text)"
13812
+ }
13813
+ ],
13814
+ "slots": [
13815
+ {
13816
+ "description": "Default slot for holding <option> elements.",
13817
+ "name": ""
13818
+ },
13819
+ {
13820
+ "description": "Use when a label requires more than plain text.",
13821
+ "name": "label"
13822
+ },
13823
+ {
13824
+ "description": "Use when a hint requires more than plain text.",
13825
+ "name": "hint"
13826
+ },
13827
+ {
13828
+ "description": "Optional slot that holds error text for the input.",
13829
+ "name": "error"
13830
+ },
13831
+ {
13832
+ "description": "Used to place an icon at the start of select.",
13833
+ "name": "icon"
13834
+ }
13835
+ ],
13836
+ "members": [
13837
+ {
13838
+ "kind": "field",
13839
+ "name": "formValue",
13840
+ "privacy": "protected",
13841
+ "readonly": true,
13912
13842
  "inheritedFrom": {
13913
13843
  "name": "FormAssociatedMixin",
13914
13844
  "module": "src/common/mixins/FormAssociatedMixin.ts"
13915
13845
  }
13916
13846
  },
13917
13847
  {
13918
- "name": "error",
13848
+ "kind": "field",
13849
+ "name": "defaultSlot",
13850
+ "privacy": "private",
13851
+ "default": "new SlotController(this)"
13852
+ },
13853
+ {
13854
+ "kind": "field",
13855
+ "name": "inputId",
13919
13856
  "type": {
13920
- "text": "string | undefined"
13857
+ "text": "string"
13921
13858
  },
13922
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
13923
- "fieldName": "error",
13859
+ "privacy": "protected",
13860
+ "default": "\"select\"",
13924
13861
  "inheritedFrom": {
13925
13862
  "name": "FormAssociatedMixin",
13926
13863
  "module": "src/common/mixins/FormAssociatedMixin.ts"
13927
13864
  }
13928
13865
  },
13929
13866
  {
13930
- "name": "required",
13867
+ "kind": "field",
13868
+ "name": "expand",
13869
+ "type": {
13870
+ "text": "boolean"
13871
+ },
13872
+ "default": "false",
13873
+ "description": "Controls whether the select expands to fill the width of its container.",
13874
+ "attribute": "expand",
13875
+ "reflects": true
13876
+ },
13877
+ {
13878
+ "kind": "field",
13879
+ "name": "options",
13880
+ "privacy": "private",
13881
+ "readonly": true
13882
+ },
13883
+ {
13884
+ "kind": "method",
13885
+ "name": "getButtonText",
13886
+ "privacy": "private",
13887
+ "return": {
13888
+ "type": {
13889
+ "text": "string"
13890
+ }
13891
+ },
13892
+ "parameters": [
13893
+ {
13894
+ "name": "options",
13895
+ "type": {
13896
+ "text": "HTMLOptionElement[]"
13897
+ }
13898
+ }
13899
+ ]
13900
+ },
13901
+ {
13902
+ "kind": "method",
13903
+ "name": "renderOption",
13904
+ "privacy": "private",
13905
+ "parameters": [
13906
+ {
13907
+ "name": "option",
13908
+ "type": {
13909
+ "text": "HTMLOptionElement"
13910
+ }
13911
+ }
13912
+ ]
13913
+ },
13914
+ {
13915
+ "kind": "field",
13916
+ "name": "size",
13931
13917
  "type": {
13932
- "text": "boolean"
13918
+ "text": "\"s\" | \"m\" | \"l\""
13933
13919
  },
13934
- "default": "false",
13935
- "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.",
13936
- "fieldName": "required",
13920
+ "default": "\"m\"",
13921
+ "description": "The size of the component.",
13922
+ "attribute": "size",
13923
+ "reflects": true,
13937
13924
  "inheritedFrom": {
13938
- "name": "FormAssociatedMixin",
13939
- "module": "src/common/mixins/FormAssociatedMixin.ts"
13925
+ "name": "SizeMixin",
13926
+ "module": "src/common/mixins/SizeMixin.ts"
13940
13927
  }
13941
13928
  },
13942
13929
  {
13943
- "name": "hide-required",
13944
- "type": {
13945
- "text": "boolean"
13946
- },
13947
- "default": "false",
13948
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
13949
- "fieldName": "hideRequired",
13930
+ "kind": "field",
13931
+ "name": "labelSlot",
13932
+ "privacy": "protected",
13933
+ "default": "new SlotController(this, \"label\")",
13950
13934
  "inheritedFrom": {
13951
13935
  "name": "FormAssociatedMixin",
13952
13936
  "module": "src/common/mixins/FormAssociatedMixin.ts"
13953
13937
  }
13954
13938
  },
13955
13939
  {
13956
- "name": "autocomplete",
13957
- "type": {
13958
- "text": "AutocompleteAttribute"
13959
- },
13960
- "default": "\"off\"",
13961
- "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.",
13962
- "fieldName": "autocomplete",
13940
+ "kind": "field",
13941
+ "name": "errorSlot",
13942
+ "privacy": "protected",
13943
+ "default": "new SlotController(this, \"error\")",
13963
13944
  "inheritedFrom": {
13964
- "name": "AutocompleteMixin",
13965
- "module": "src/common/mixins/AutocompleteMixin.ts"
13945
+ "name": "FormAssociatedMixin",
13946
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
13966
13947
  }
13967
13948
  },
13968
13949
  {
13969
- "name": "disabled",
13970
- "type": {
13971
- "text": "boolean"
13972
- },
13973
- "default": "false",
13974
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
13975
- "fieldName": "disabled",
13950
+ "kind": "field",
13951
+ "name": "hintSlot",
13952
+ "privacy": "protected",
13953
+ "default": "new SlotController(this, \"hint\")",
13976
13954
  "inheritedFrom": {
13977
- "name": "InputMixin",
13978
- "module": "src/common/mixins/InputMixin.ts"
13955
+ "name": "FormAssociatedMixin",
13956
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
13979
13957
  }
13980
13958
  },
13981
13959
  {
13982
- "name": "name",
13983
- "type": {
13984
- "text": "string | undefined"
13985
- },
13986
- "description": "The name of the form component.",
13987
- "fieldName": "name",
13960
+ "kind": "field",
13961
+ "name": "formData",
13962
+ "privacy": "protected",
13963
+ "default": "new FormDataController(this, { value: () => this.formValue })",
13988
13964
  "inheritedFrom": {
13989
- "name": "InputMixin",
13990
- "module": "src/common/mixins/InputMixin.ts"
13965
+ "name": "FormAssociatedMixin",
13966
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
13991
13967
  }
13992
13968
  },
13993
13969
  {
13994
- "name": "value",
13970
+ "kind": "field",
13971
+ "name": "errorId",
13995
13972
  "type": {
13996
13973
  "text": "string"
13997
13974
  },
13998
- "default": "\"\"",
13999
- "description": "The value of the form component.",
14000
- "fieldName": "value",
14001
- "inheritedFrom": {
14002
- "name": "InputMixin",
14003
- "module": "src/common/mixins/InputMixin.ts"
14004
- }
14005
- },
14006
- {
14007
- "name": "form",
14008
- "type": {
14009
- "text": "HTMLFormElement | null"
14010
- },
14011
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
14012
- "fieldName": "form",
13975
+ "privacy": "protected",
13976
+ "default": "\"error\"",
14013
13977
  "inheritedFrom": {
14014
- "name": "InputMixin",
14015
- "module": "src/common/mixins/InputMixin.ts"
13978
+ "name": "FormAssociatedMixin",
13979
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14016
13980
  }
14017
- }
14018
- ],
14019
- "mixins": [
14020
- {
14021
- "name": "SizeMixin",
14022
- "module": "/src/common/mixins/SizeMixin.js"
14023
- },
14024
- {
14025
- "name": "FormAssociatedMixin",
14026
- "module": "/src/common/mixins/FormAssociatedMixin.js"
14027
- },
14028
- {
14029
- "name": "AutocompleteMixin",
14030
- "module": "/src/common/mixins/AutocompleteMixin.js"
14031
- },
14032
- {
14033
- "name": "InputMixin",
14034
- "module": "/src/common/mixins/InputMixin.js"
14035
13981
  },
14036
13982
  {
14037
- "name": "FocusableMixin",
14038
- "module": "/src/common/mixins/FocusableMixin.js"
14039
- }
14040
- ],
14041
- "superclass": {
14042
- "name": "LitElement",
14043
- "package": "lit"
14044
- },
14045
- "localization": [],
14046
- "status": "ready",
14047
- "category": "form",
14048
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using [segmented control](/components/segmented-control/) or [radio components](/components/radio/) instead, if you have enough space to allow it.\n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun&nbsp;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 select 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\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n",
14049
- "examples": [],
14050
- "dependencies": [
14051
- "button",
14052
- "icon"
14053
- ],
14054
- "tagName": "nord-select",
14055
- "customElement": true,
14056
- "events": [
14057
- {
14058
- "name": "input",
13983
+ "kind": "field",
13984
+ "name": "hintId",
14059
13985
  "type": {
14060
- "text": "NordEvent"
13986
+ "text": "string"
14061
13987
  },
14062
- "description": "Fired as the user types into the input.",
13988
+ "privacy": "protected",
13989
+ "default": "\"hint\"",
14063
13990
  "inheritedFrom": {
14064
13991
  "name": "FormAssociatedMixin",
14065
13992
  "module": "src/common/mixins/FormAssociatedMixin.ts"
14066
13993
  }
14067
13994
  },
14068
13995
  {
14069
- "name": "change",
13996
+ "kind": "field",
13997
+ "name": "label",
14070
13998
  "type": {
14071
- "text": "NordEvent"
13999
+ "text": "string"
14072
14000
  },
14073
- "description": "Fired whenever the input's value is changed via user interaction.",
14001
+ "default": "\"\"",
14002
+ "description": "Label for the input.",
14003
+ "attribute": "label",
14004
+ "reflects": true,
14074
14005
  "inheritedFrom": {
14075
14006
  "name": "FormAssociatedMixin",
14076
14007
  "module": "src/common/mixins/FormAssociatedMixin.ts"
14077
14008
  }
14078
- }
14079
- ]
14080
- }
14081
- ],
14082
- "exports": [
14083
- {
14084
- "kind": "js",
14085
- "name": "default",
14086
- "declaration": {
14087
- "name": "Select",
14088
- "module": "src/select/Select.ts"
14089
- }
14090
- },
14091
- {
14092
- "kind": "custom-element-definition",
14093
- "name": "nord-select",
14094
- "declaration": {
14095
- "name": "Select",
14096
- "module": "src/select/Select.ts"
14097
- }
14098
- }
14099
- ]
14100
- },
14101
- {
14102
- "kind": "javascript-module",
14103
- "path": "src/segmented-control-item/SegmentedControlItem.ts",
14104
- "declarations": [
14105
- {
14106
- "kind": "class",
14107
- "description": "Segmented control items populate a segmented control with options.\nEvery item should be placed inside a segmented control.",
14108
- "name": "SegmentedControlItem",
14109
- "cssProperties": [
14110
- {
14111
- "description": "Controls the rounded corners of the item, using [border radius tokens](/tokens/#border-radius).",
14112
- "name": "--n-segmented-control-item-border-radius",
14113
- "default": "var(--n-border-radius-s)"
14114
- },
14115
- {
14116
- "description": "Controls the spacing between elements within the item, using our [spacing tokens](/tokens/#space).",
14117
- "name": "--n-segmented-control-item-gap",
14118
- "default": "var(--n-space-xs)"
14119
- },
14120
- {
14121
- "description": "Controls the overlayed gradient background on the item.",
14122
- "name": "--n-segmented-control-item-gradient",
14123
- "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
14124
- },
14125
- {
14126
- "description": "Controls the background color of the item, using our [color tokens](/tokens/#color).",
14127
- "name": "--n-segmented-control-item-background-color",
14128
- "default": "var(--n-color-nav-hover)"
14129
- },
14130
- {
14131
- "description": "Controls the color of the text within the item, using our [color tokens](/tokens/#color).",
14132
- "name": "--n-segmented-control-item-color",
14133
- "default": "var(--n-color-text-weaker)"
14134
- },
14135
- {
14136
- "description": "Controls the inline, or left and right, padding of the item.",
14137
- "name": "--n-segmented-control-item-padding-inline",
14138
- "default": "calc(var(--n-space-m) / 1.2)"
14139
- },
14140
- {
14141
- "description": "Controls the surrounding shadow, using our [box shadow tokens](/tokens/#box-shadow).",
14142
- "name": "--n-segmented-control-item-box-shadow",
14143
- "default": "none"
14144
- },
14145
- {
14146
- "description": "Controls the size of the text within the item, using our [font tokens](/tokens/#font).",
14147
- "name": "--n-segmented-control-item-font-size",
14148
- "default": "var(--n-font-size-m)"
14149
- },
14150
- {
14151
- "description": "Controls the weight of the text within the item, using our [font tokens](/tokens/#font).",
14152
- "name": "--n-segmented-control-item-font-weight",
14153
- "default": "var(--n-font-weight)"
14154
- },
14155
- {
14156
- "description": "Controls the minimum block size, or height, of the item using our [spacing tokens](/tokens/#space).",
14157
- "name": "--n-segmented-control-item-min-block-size",
14158
- "default": "calc(var(--n-space-xl) - 2px)"
14159
14009
  },
14160
- {
14161
- "description": "Controls the inline size of the item.",
14162
- "name": "--n-segmented-control-item-inline-size",
14163
- "default": "auto"
14164
- }
14165
- ],
14166
- "slots": [
14167
- {
14168
- "description": "Use when a label requires more than plain text.",
14169
- "name": "label"
14170
- }
14171
- ],
14172
- "members": [
14173
14010
  {
14174
14011
  "kind": "field",
14175
- "name": "inputId",
14176
- "privacy": "protected"
14012
+ "name": "hint",
14013
+ "type": {
14014
+ "text": "string | undefined"
14015
+ },
14016
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
14017
+ "attribute": "hint",
14018
+ "reflects": true,
14019
+ "inheritedFrom": {
14020
+ "name": "FormAssociatedMixin",
14021
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14022
+ }
14177
14023
  },
14178
14024
  {
14179
14025
  "kind": "field",
14180
- "name": "inputSlot",
14181
- "privacy": "protected",
14182
- "default": "new LightDomController(this, { render: () => html` <input slot=\"input\" @blur=${this.handleBlur} @focus=${this.handleFocus} ${ref(this.focusableRef)} id=${this.inputId} type=\"radio\" class=\"n-input\" name=${cond(this.name)} .value=${cond(this.value)} .checked=${this.checked} ?disabled=${this.disabled} form=${cond(this._formId)} /> `, })",
14183
- "description": "For accessibility reasons, we render the form parts of the component to the light DOM."
14026
+ "name": "hideLabel",
14027
+ "type": {
14028
+ "text": "boolean"
14029
+ },
14030
+ "default": "false",
14031
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
14032
+ "attribute": "hide-label",
14033
+ "reflects": true,
14034
+ "inheritedFrom": {
14035
+ "name": "FormAssociatedMixin",
14036
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14037
+ }
14184
14038
  },
14185
14039
  {
14186
14040
  "kind": "field",
14187
- "name": "labelSlot",
14188
- "privacy": "protected",
14189
- "default": "new LightSlotController(this, { slotName: \"label\", render: () => this.label ? html`<label slot=\"label-internal\" for=${this.inputId} class=\"n-segmented-control-item\">${this.label}</label>` : nothing, syncLightDom: element => { if (!isLabel(element)) { // eslint-disable-next-line no-console console.warn(`NORD: Only <label> elements should be placed in Segmented Control's \"label\" slot`) } else { element.htmlFor = this.inputId } }, })"
14041
+ "name": "placeholder",
14042
+ "type": {
14043
+ "text": "string | undefined"
14044
+ },
14045
+ "description": "Placeholder text to display within the input.",
14046
+ "attribute": "placeholder",
14047
+ "reflects": true,
14048
+ "inheritedFrom": {
14049
+ "name": "FormAssociatedMixin",
14050
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14051
+ }
14190
14052
  },
14191
14053
  {
14192
14054
  "kind": "field",
14193
- "name": "checked",
14055
+ "name": "error",
14194
14056
  "type": {
14195
- "text": "boolean"
14057
+ "text": "string | undefined"
14196
14058
  },
14197
- "default": "false",
14198
- "description": "Controls whether the segmented control item is checked or not.",
14199
- "attribute": "checked",
14200
- "reflects": true
14059
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
14060
+ "attribute": "error",
14061
+ "reflects": true,
14062
+ "inheritedFrom": {
14063
+ "name": "FormAssociatedMixin",
14064
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14065
+ }
14201
14066
  },
14202
14067
  {
14203
14068
  "kind": "field",
14204
- "name": "size",
14069
+ "name": "required",
14205
14070
  "type": {
14206
- "text": "\"s\" | \"m\" | \"l\""
14071
+ "text": "boolean"
14207
14072
  },
14208
- "default": "\"m\"",
14209
- "description": "The size of the segmented control item.\nThis affects font-size and padding.",
14210
- "attribute": "size",
14211
- "reflects": true
14073
+ "default": "false",
14074
+ "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.",
14075
+ "attribute": "required",
14076
+ "reflects": true,
14077
+ "inheritedFrom": {
14078
+ "name": "FormAssociatedMixin",
14079
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14080
+ }
14212
14081
  },
14213
14082
  {
14214
14083
  "kind": "field",
14215
- "name": "label",
14084
+ "name": "hideRequired",
14216
14085
  "type": {
14217
- "text": "string"
14086
+ "text": "boolean"
14218
14087
  },
14219
- "default": "\"\"",
14220
- "description": "Label for the segmented control item.",
14221
- "attribute": "label",
14222
- "reflects": true
14088
+ "default": "false",
14089
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
14090
+ "attribute": "hide-required",
14091
+ "reflects": true,
14092
+ "inheritedFrom": {
14093
+ "name": "FormAssociatedMixin",
14094
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14095
+ }
14223
14096
  },
14224
14097
  {
14225
14098
  "kind": "method",
14226
- "name": "handleCheckedChange",
14099
+ "name": "handleInput",
14227
14100
  "privacy": "protected",
14228
14101
  "parameters": [
14229
14102
  {
14230
- "name": "previousChecked",
14103
+ "name": "e",
14231
14104
  "type": {
14232
- "text": "boolean"
14105
+ "text": "Event"
14233
14106
  }
14234
14107
  }
14235
- ]
14236
- },
14237
- {
14238
- "kind": "method",
14239
- "name": "uncheckSiblings",
14240
- "privacy": "private"
14108
+ ],
14109
+ "inheritedFrom": {
14110
+ "name": "FormAssociatedMixin",
14111
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14112
+ }
14241
14113
  },
14242
14114
  {
14243
14115
  "kind": "method",
14244
14116
  "name": "handleChange",
14245
14117
  "privacy": "protected",
14246
- "return": {
14247
- "type": {
14248
- "text": "void"
14249
- }
14250
- },
14251
14118
  "parameters": [
14252
14119
  {
14253
14120
  "name": "e",
@@ -14255,30 +14122,90 @@
14255
14122
  "text": "Event"
14256
14123
  }
14257
14124
  }
14258
- ]
14259
- },
14260
- {
14261
- "kind": "field",
14262
- "name": "handleBlur",
14263
- "privacy": "private"
14264
- },
14265
- {
14266
- "kind": "field",
14267
- "name": "handleFocus",
14268
- "privacy": "private"
14125
+ ],
14126
+ "inheritedFrom": {
14127
+ "name": "FormAssociatedMixin",
14128
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14129
+ }
14269
14130
  },
14270
14131
  {
14271
14132
  "kind": "method",
14272
- "name": "handleInput",
14133
+ "name": "renderLabel",
14273
14134
  "privacy": "protected",
14274
14135
  "parameters": [
14275
14136
  {
14276
- "name": "e",
14137
+ "name": "additionalContent",
14138
+ "optional": true,
14277
14139
  "type": {
14278
- "text": "Event"
14140
+ "text": "TemplateResult"
14279
14141
  }
14280
14142
  }
14281
- ]
14143
+ ],
14144
+ "inheritedFrom": {
14145
+ "name": "FormAssociatedMixin",
14146
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14147
+ }
14148
+ },
14149
+ {
14150
+ "kind": "method",
14151
+ "name": "renderError",
14152
+ "privacy": "protected",
14153
+ "inheritedFrom": {
14154
+ "name": "FormAssociatedMixin",
14155
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14156
+ }
14157
+ },
14158
+ {
14159
+ "kind": "method",
14160
+ "name": "getDescribedBy",
14161
+ "privacy": "protected",
14162
+ "inheritedFrom": {
14163
+ "name": "FormAssociatedMixin",
14164
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14165
+ }
14166
+ },
14167
+ {
14168
+ "kind": "method",
14169
+ "name": "getInvalid",
14170
+ "privacy": "protected",
14171
+ "inheritedFrom": {
14172
+ "name": "FormAssociatedMixin",
14173
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14174
+ }
14175
+ },
14176
+ {
14177
+ "kind": "field",
14178
+ "name": "hasHint",
14179
+ "privacy": "protected",
14180
+ "readonly": true,
14181
+ "inheritedFrom": {
14182
+ "name": "FormAssociatedMixin",
14183
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14184
+ }
14185
+ },
14186
+ {
14187
+ "kind": "field",
14188
+ "name": "hasError",
14189
+ "privacy": "protected",
14190
+ "readonly": true,
14191
+ "inheritedFrom": {
14192
+ "name": "FormAssociatedMixin",
14193
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14194
+ }
14195
+ },
14196
+ {
14197
+ "kind": "field",
14198
+ "name": "autocomplete",
14199
+ "type": {
14200
+ "text": "AutocompleteAttribute"
14201
+ },
14202
+ "default": "\"off\"",
14203
+ "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.",
14204
+ "attribute": "autocomplete",
14205
+ "inheritedFrom": {
14206
+ "name": "AutocompleteMixin",
14207
+ "module": "src/common/mixins/AutocompleteMixin.ts"
14208
+ }
14282
14209
  },
14283
14210
  {
14284
14211
  "kind": "field",
@@ -14366,91 +14293,171 @@
14366
14293
  "name": "focusableRef",
14367
14294
  "privacy": "protected",
14368
14295
  "inheritedFrom": {
14369
- "name": "FocusableMixin",
14370
- "module": "src/common/mixins/FocusableMixin.ts"
14296
+ "name": "FocusableMixin",
14297
+ "module": "src/common/mixins/FocusableMixin.ts"
14298
+ }
14299
+ },
14300
+ {
14301
+ "kind": "method",
14302
+ "name": "focus",
14303
+ "parameters": [
14304
+ {
14305
+ "name": "options",
14306
+ "optional": true,
14307
+ "type": {
14308
+ "text": "FocusOptions"
14309
+ },
14310
+ "description": "An object which controls aspects of the focusing process."
14311
+ }
14312
+ ],
14313
+ "description": "Programmatically move focus to the component.",
14314
+ "inheritedFrom": {
14315
+ "name": "FocusableMixin",
14316
+ "module": "src/common/mixins/FocusableMixin.ts"
14317
+ }
14318
+ },
14319
+ {
14320
+ "kind": "method",
14321
+ "name": "blur",
14322
+ "description": "Programmatically remove focus from the component.",
14323
+ "inheritedFrom": {
14324
+ "name": "FocusableMixin",
14325
+ "module": "src/common/mixins/FocusableMixin.ts"
14326
+ }
14327
+ },
14328
+ {
14329
+ "kind": "method",
14330
+ "name": "click",
14331
+ "description": "Programmatically simulates a click on the component.",
14332
+ "inheritedFrom": {
14333
+ "name": "FocusableMixin",
14334
+ "module": "src/common/mixins/FocusableMixin.ts"
14335
+ }
14336
+ }
14337
+ ],
14338
+ "attributes": [
14339
+ {
14340
+ "name": "expand",
14341
+ "type": {
14342
+ "text": "boolean"
14343
+ },
14344
+ "default": "false",
14345
+ "description": "Controls whether the select expands to fill the width of its container.",
14346
+ "fieldName": "expand"
14347
+ },
14348
+ {
14349
+ "name": "size",
14350
+ "type": {
14351
+ "text": "\"s\" | \"m\" | \"l\""
14352
+ },
14353
+ "default": "\"m\"",
14354
+ "description": "The size of the component.",
14355
+ "fieldName": "size",
14356
+ "inheritedFrom": {
14357
+ "name": "SizeMixin",
14358
+ "module": "src/common/mixins/SizeMixin.ts"
14371
14359
  }
14372
14360
  },
14373
14361
  {
14374
- "kind": "method",
14375
- "name": "focus",
14376
- "parameters": [
14377
- {
14378
- "name": "options",
14379
- "optional": true,
14380
- "type": {
14381
- "text": "FocusOptions"
14382
- },
14383
- "description": "An object which controls aspects of the focusing process."
14384
- }
14385
- ],
14386
- "description": "Programmatically move focus to the component.",
14362
+ "name": "label",
14363
+ "type": {
14364
+ "text": "string"
14365
+ },
14366
+ "default": "\"\"",
14367
+ "description": "Label for the input.",
14368
+ "fieldName": "label",
14387
14369
  "inheritedFrom": {
14388
- "name": "FocusableMixin",
14389
- "module": "src/common/mixins/FocusableMixin.ts"
14370
+ "name": "FormAssociatedMixin",
14371
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14390
14372
  }
14391
14373
  },
14392
14374
  {
14393
- "kind": "method",
14394
- "name": "blur",
14395
- "description": "Programmatically remove focus from the component.",
14375
+ "name": "hint",
14376
+ "type": {
14377
+ "text": "string | undefined"
14378
+ },
14379
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
14380
+ "fieldName": "hint",
14396
14381
  "inheritedFrom": {
14397
- "name": "FocusableMixin",
14398
- "module": "src/common/mixins/FocusableMixin.ts"
14382
+ "name": "FormAssociatedMixin",
14383
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14399
14384
  }
14400
14385
  },
14401
14386
  {
14402
- "kind": "method",
14403
- "name": "click",
14404
- "description": "Programmatically simulates a click on the component.",
14387
+ "name": "hide-label",
14388
+ "type": {
14389
+ "text": "boolean"
14390
+ },
14391
+ "default": "false",
14392
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
14393
+ "fieldName": "hideLabel",
14405
14394
  "inheritedFrom": {
14406
- "name": "FocusableMixin",
14407
- "module": "src/common/mixins/FocusableMixin.ts"
14395
+ "name": "FormAssociatedMixin",
14396
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14408
14397
  }
14409
- }
14410
- ],
14411
- "events": [
14398
+ },
14412
14399
  {
14413
- "name": "change",
14400
+ "name": "placeholder",
14414
14401
  "type": {
14415
- "text": "NordEvent"
14402
+ "text": "string | undefined"
14416
14403
  },
14417
- "description": "Fired whenever the segmented control item has been checked."
14404
+ "description": "Placeholder text to display within the input.",
14405
+ "fieldName": "placeholder",
14406
+ "inheritedFrom": {
14407
+ "name": "FormAssociatedMixin",
14408
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14409
+ }
14418
14410
  },
14419
14411
  {
14420
- "name": "input",
14412
+ "name": "error",
14421
14413
  "type": {
14422
- "text": "NordEvent"
14414
+ "text": "string | undefined"
14423
14415
  },
14424
- "description": "Fired as the user types into the input."
14425
- }
14426
- ],
14427
- "attributes": [
14416
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
14417
+ "fieldName": "error",
14418
+ "inheritedFrom": {
14419
+ "name": "FormAssociatedMixin",
14420
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14421
+ }
14422
+ },
14428
14423
  {
14429
- "name": "checked",
14424
+ "name": "required",
14430
14425
  "type": {
14431
14426
  "text": "boolean"
14432
14427
  },
14433
14428
  "default": "false",
14434
- "description": "Controls whether the segmented control item is checked or not.",
14435
- "fieldName": "checked"
14429
+ "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.",
14430
+ "fieldName": "required",
14431
+ "inheritedFrom": {
14432
+ "name": "FormAssociatedMixin",
14433
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14434
+ }
14436
14435
  },
14437
14436
  {
14438
- "name": "size",
14437
+ "name": "hide-required",
14439
14438
  "type": {
14440
- "text": "\"s\" | \"m\" | \"l\""
14439
+ "text": "boolean"
14441
14440
  },
14442
- "default": "\"m\"",
14443
- "description": "The size of the segmented control item.\nThis affects font-size and padding.",
14444
- "fieldName": "size"
14441
+ "default": "false",
14442
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
14443
+ "fieldName": "hideRequired",
14444
+ "inheritedFrom": {
14445
+ "name": "FormAssociatedMixin",
14446
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14447
+ }
14445
14448
  },
14446
14449
  {
14447
- "name": "label",
14450
+ "name": "autocomplete",
14448
14451
  "type": {
14449
- "text": "string"
14452
+ "text": "AutocompleteAttribute"
14450
14453
  },
14451
- "default": "\"\"",
14452
- "description": "Label for the segmented control item.",
14453
- "fieldName": "label"
14454
+ "default": "\"off\"",
14455
+ "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.",
14456
+ "fieldName": "autocomplete",
14457
+ "inheritedFrom": {
14458
+ "name": "AutocompleteMixin",
14459
+ "module": "src/common/mixins/AutocompleteMixin.ts"
14460
+ }
14454
14461
  },
14455
14462
  {
14456
14463
  "name": "disabled",
@@ -14504,6 +14511,18 @@
14504
14511
  }
14505
14512
  ],
14506
14513
  "mixins": [
14514
+ {
14515
+ "name": "SizeMixin",
14516
+ "module": "/src/common/mixins/SizeMixin.js"
14517
+ },
14518
+ {
14519
+ "name": "FormAssociatedMixin",
14520
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
14521
+ },
14522
+ {
14523
+ "name": "AutocompleteMixin",
14524
+ "module": "/src/common/mixins/AutocompleteMixin.js"
14525
+ },
14507
14526
  {
14508
14527
  "name": "InputMixin",
14509
14528
  "module": "/src/common/mixins/InputMixin.js"
@@ -14518,13 +14537,40 @@
14518
14537
  "package": "lit"
14519
14538
  },
14520
14539
  "localization": [],
14521
- "status": "new",
14522
- "category": "action",
14523
- "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 segmented control to allow users to pick one choice from a set of closely related choices, and immediately apply that selection.\n- Favor segmented control or [radio component](/components/radio/) over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Segmented control items are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of segmented control items.\n- Give each segmented control item within a group a unique `value`.\n- Segmented control items **must** be used in combination with a [segmented control component](/components/segmented-control/).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Dont place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a [checkbox](/components/checkbox/) or [selectable tag](/components/tag/?example=selectable) instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a [checkbox](/components/checkbox/) instead.\n- When you have more than 5 options to choose from. Consider using a [select](/components/select/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nSegmented control labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing segmented control labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Once a segmented control item has been selected, users cannot return to having no items selected without refreshing their browser window. Therefore, you should always make sure one of the items is pre-selected.\n",
14540
+ "status": "ready",
14541
+ "category": "form",
14542
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using [segmented control](/components/segmented-control/) or [radio components](/components/radio/) instead, if you have enough space to allow it.\n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun&nbsp;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 select 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\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n",
14524
14543
  "examples": [],
14525
- "dependencies": [],
14526
- "tagName": "nord-segmented-control-item",
14527
- "customElement": true
14544
+ "dependencies": [
14545
+ "button",
14546
+ "icon"
14547
+ ],
14548
+ "tagName": "nord-select",
14549
+ "customElement": true,
14550
+ "events": [
14551
+ {
14552
+ "name": "input",
14553
+ "type": {
14554
+ "text": "NordEvent"
14555
+ },
14556
+ "description": "Fired as the user types into the input.",
14557
+ "inheritedFrom": {
14558
+ "name": "FormAssociatedMixin",
14559
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14560
+ }
14561
+ },
14562
+ {
14563
+ "name": "change",
14564
+ "type": {
14565
+ "text": "NordEvent"
14566
+ },
14567
+ "description": "Fired whenever the input's value is changed via user interaction.",
14568
+ "inheritedFrom": {
14569
+ "name": "FormAssociatedMixin",
14570
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
14571
+ }
14572
+ }
14573
+ ]
14528
14574
  }
14529
14575
  ],
14530
14576
  "exports": [
@@ -14532,16 +14578,16 @@
14532
14578
  "kind": "js",
14533
14579
  "name": "default",
14534
14580
  "declaration": {
14535
- "name": "SegmentedControlItem",
14536
- "module": "src/segmented-control-item/SegmentedControlItem.ts"
14581
+ "name": "Select",
14582
+ "module": "src/select/Select.ts"
14537
14583
  }
14538
14584
  },
14539
14585
  {
14540
14586
  "kind": "custom-element-definition",
14541
- "name": "nord-segmented-control-item",
14587
+ "name": "nord-select",
14542
14588
  "declaration": {
14543
- "name": "SegmentedControlItem",
14544
- "module": "src/segmented-control-item/SegmentedControlItem.ts"
14589
+ "name": "Select",
14590
+ "module": "src/select/Select.ts"
14545
14591
  }
14546
14592
  }
14547
14593
  ]
@@ -18427,41 +18473,6 @@
18427
18473
  }
18428
18474
  ]
18429
18475
  },
18430
- {
18431
- "kind": "javascript-module",
18432
- "path": "src/common/decorators/observe.ts",
18433
- "declarations": [
18434
- {
18435
- "kind": "function",
18436
- "name": "observe",
18437
- "parameters": [
18438
- {
18439
- "name": "propertyName",
18440
- "type": {
18441
- "text": "string"
18442
- }
18443
- },
18444
- {
18445
- "name": "lifecycle",
18446
- "default": "\"update\"",
18447
- "type": {
18448
- "text": "ObserveLifecycle"
18449
- }
18450
- }
18451
- ]
18452
- }
18453
- ],
18454
- "exports": [
18455
- {
18456
- "kind": "js",
18457
- "name": "observe",
18458
- "declaration": {
18459
- "name": "observe",
18460
- "module": "src/common/decorators/observe.ts"
18461
- }
18462
- }
18463
- ]
18464
- },
18465
18476
  {
18466
18477
  "kind": "javascript-module",
18467
18478
  "path": "src/common/controllers/BroadcastChannelController.ts",
@@ -19723,6 +19734,41 @@
19723
19734
  }
19724
19735
  ]
19725
19736
  },
19737
+ {
19738
+ "kind": "javascript-module",
19739
+ "path": "src/common/decorators/observe.ts",
19740
+ "declarations": [
19741
+ {
19742
+ "kind": "function",
19743
+ "name": "observe",
19744
+ "parameters": [
19745
+ {
19746
+ "name": "propertyName",
19747
+ "type": {
19748
+ "text": "string"
19749
+ }
19750
+ },
19751
+ {
19752
+ "name": "lifecycle",
19753
+ "default": "\"update\"",
19754
+ "type": {
19755
+ "text": "ObserveLifecycle"
19756
+ }
19757
+ }
19758
+ ]
19759
+ }
19760
+ ],
19761
+ "exports": [
19762
+ {
19763
+ "kind": "js",
19764
+ "name": "observe",
19765
+ "declaration": {
19766
+ "name": "observe",
19767
+ "module": "src/common/decorators/observe.ts"
19768
+ }
19769
+ }
19770
+ ]
19771
+ },
19726
19772
  {
19727
19773
  "kind": "javascript-module",
19728
19774
  "path": "src/common/directives/cond.ts",