@nordhealth/components 3.2.0 → 3.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.
Files changed (119) hide show
  1. package/custom-elements.json +1124 -1105
  2. package/lib/{AutocompleteMixin-a98ada34.js → AutocompleteMixin-60503685.js} +2 -2
  3. package/lib/{AutocompleteMixin-a98ada34.js.map → AutocompleteMixin-60503685.js.map} +1 -1
  4. package/lib/Avatar.js +1 -1
  5. package/lib/Badge.js +1 -1
  6. package/lib/Banner.js +1 -1
  7. package/lib/Banner.js.map +1 -1
  8. package/lib/Button.js +1 -1
  9. package/lib/ButtonGroup.js +1 -1
  10. package/lib/{Calendar-3fd55b5d.js → Calendar-f7e95d9a.js} +2 -2
  11. package/lib/{Calendar-3fd55b5d.js.map → Calendar-f7e95d9a.js.map} +1 -1
  12. package/lib/Calendar.js +1 -1
  13. package/lib/Card.js +1 -1
  14. package/lib/Card.js.map +1 -1
  15. package/lib/Checkbox.js +1 -1
  16. package/lib/CommandMenu.js +1 -1
  17. package/lib/CommandMenu.js.map +1 -1
  18. package/lib/CommandMenuAction.js +1 -1
  19. package/lib/CommandMenuAction.js.map +1 -1
  20. package/lib/{Component-1f694235.js → Component-253ecb24.js} +2 -2
  21. package/lib/Component-253ecb24.js.map +1 -0
  22. package/lib/DatePicker.js +1 -1
  23. package/lib/Divider.js +1 -1
  24. package/lib/Drawer.js +1 -1
  25. package/lib/Dropdown.js +1 -1
  26. package/lib/DropdownGroup.js +1 -1
  27. package/lib/{DropdownItem-4a02675f.js → DropdownItem-75a2468a.js} +2 -2
  28. package/lib/DropdownItem-75a2468a.js.map +1 -0
  29. package/lib/DropdownItem.js +1 -1
  30. package/lib/EmptyState.js +1 -1
  31. package/lib/EmptyState.js.map +1 -1
  32. package/lib/Fieldset.js +1 -1
  33. package/lib/Fieldset.js.map +1 -1
  34. package/lib/FocusableMixin-003e1094.js +2 -0
  35. package/lib/{FocusableMixin-186c69a2.js.map → FocusableMixin-003e1094.js.map} +1 -1
  36. package/lib/{FormAssociatedMixin-5fedde68.js → FormAssociatedMixin-0638b151.js} +2 -2
  37. package/lib/{FormAssociatedMixin-5fedde68.js.map → FormAssociatedMixin-0638b151.js.map} +1 -1
  38. package/lib/{FormField-3226fb17.js → FormField-0783cb5a.js} +2 -2
  39. package/lib/FormField-0783cb5a.js.map +1 -0
  40. package/lib/Header.js +1 -1
  41. package/lib/Icon.js +2 -2
  42. package/lib/Input.js +1 -1
  43. package/lib/{InputMixin-d50cb41a.js → InputMixin-87012c5a.js} +2 -2
  44. package/lib/{InputMixin-d50cb41a.js.map → InputMixin-87012c5a.js.map} +1 -1
  45. package/lib/Layout.js +1 -1
  46. package/lib/Layout.js.map +1 -1
  47. package/lib/{LightDomController-8a770234.js → LightDomController-5c53b3f4.js} +2 -2
  48. package/lib/{LightDomController-8a770234.js.map → LightDomController-5c53b3f4.js.map} +1 -1
  49. package/lib/Message.js +1 -1
  50. package/lib/Modal.js +1 -1
  51. package/lib/NavGroup.js +1 -1
  52. package/lib/NavItem.js +1 -1
  53. package/lib/{NavToggle-fbd227e5.js → NavToggle-7e1ba314.js} +2 -2
  54. package/lib/{NavToggle-fbd227e5.js.map → NavToggle-7e1ba314.js.map} +1 -1
  55. package/lib/NavToggle.js +1 -1
  56. package/lib/Navigation.js +1 -1
  57. package/lib/Notification.js +1 -1
  58. package/lib/NotificationGroup.js +1 -1
  59. package/lib/{NotificationMixin-5e028561.js → NotificationMixin-cea138a7.js} +2 -2
  60. package/lib/{NotificationMixin-5e028561.js.map → NotificationMixin-cea138a7.js.map} +1 -1
  61. package/lib/{Popout-6a85e4b6.js → Popout-1183c22b.js} +2 -2
  62. package/lib/{Popout-6a85e4b6.js.map → Popout-1183c22b.js.map} +1 -1
  63. package/lib/Popout.js +1 -1
  64. package/lib/ProgressBar.js +1 -1
  65. package/lib/Qrcode.js +1 -1
  66. package/lib/Qrcode.js.map +1 -1
  67. package/lib/Radio.js +1 -1
  68. package/lib/Range.js +1 -1
  69. package/lib/Select.js +1 -1
  70. package/lib/{SizeMixin-f04ac402.js → SizeMixin-bc2098f4.js} +2 -2
  71. package/lib/{SizeMixin-f04ac402.js.map → SizeMixin-bc2098f4.js.map} +1 -1
  72. package/lib/Skeleton.js +1 -1
  73. package/lib/Spinner.js +1 -1
  74. package/lib/Stack.js +1 -1
  75. package/lib/{Sticky-b4e6c315.js → Sticky-220280e0.js} +2 -2
  76. package/lib/Sticky-220280e0.js.map +1 -0
  77. package/lib/Tab.js +1 -1
  78. package/lib/TabGroup.js +1 -1
  79. package/lib/TabPanel.js +1 -1
  80. package/lib/Table.js +1 -1
  81. package/lib/{TextField-3f901ec8.js → TextField-b455a6dd.js} +2 -2
  82. package/lib/{TextField-3f901ec8.js.map → TextField-b455a6dd.js.map} +1 -1
  83. package/lib/Textarea.js +1 -1
  84. package/lib/Toast.js +1 -1
  85. package/lib/ToastGroup.js +1 -1
  86. package/lib/Toggle.js +1 -1
  87. package/lib/Tooltip.js +1 -1
  88. package/lib/TopBar.js +1 -1
  89. package/lib/VisuallyHidden.js +1 -1
  90. package/lib/bundle.js +6 -6
  91. package/lib/bundle.js.map +1 -1
  92. package/lib/{class-map-c0d8e1e5.js → class-map-4a0dec4a.js} +2 -2
  93. package/lib/{class-map-c0d8e1e5.js.map → class-map-4a0dec4a.js.map} +1 -1
  94. package/lib/{collection-498f2b1f.js → collection-bba319d3.js} +3 -3
  95. package/lib/{collection-498f2b1f.js.map → collection-bba319d3.js.map} +1 -1
  96. package/lib/cond-77258def.js +2 -0
  97. package/lib/{cond-09498763.js.map → cond-77258def.js.map} +1 -1
  98. package/lib/{if-defined-8a007930.js → if-defined-10508457.js} +2 -2
  99. package/lib/{if-defined-8a007930.js.map → if-defined-10508457.js.map} +1 -1
  100. package/lib/index.js +1 -1
  101. package/lib/positioning-a572d126.js +1 -1
  102. package/lib/positioning-a572d126.js.map +1 -1
  103. package/lib/{query-assigned-elements-822fe360.js → query-assigned-elements-2f8275b7.js} +2 -2
  104. package/lib/query-assigned-elements-2f8275b7.js.map +1 -0
  105. package/lib/{ref-6b46e5ea.js → ref-f75a30b7.js} +3 -3
  106. package/lib/{ref-6b46e5ea.js.map → ref-f75a30b7.js.map} +1 -1
  107. package/lib/src/fieldset/Fieldset.d.ts +5 -1
  108. package/lib/style-map-75ce20b3.js +7 -0
  109. package/lib/style-map-75ce20b3.js.map +1 -0
  110. package/package.json +2 -2
  111. package/lib/Component-1f694235.js.map +0 -1
  112. package/lib/DropdownItem-4a02675f.js.map +0 -1
  113. package/lib/FocusableMixin-186c69a2.js +0 -2
  114. package/lib/FormField-3226fb17.js.map +0 -1
  115. package/lib/Sticky-b4e6c315.js.map +0 -1
  116. package/lib/cond-09498763.js +0 -2
  117. package/lib/query-assigned-elements-822fe360.js.map +0 -1
  118. package/lib/style-map-5b757428.js +0 -7
  119. package/lib/style-map-5b757428.js.map +0 -1
@@ -1415,109 +1415,6 @@
1415
1415
  }
1416
1416
  ]
1417
1417
  },
1418
- {
1419
- "kind": "javascript-module",
1420
- "path": "src/button-group/ButtonGroup.ts",
1421
- "declarations": [
1422
- {
1423
- "kind": "class",
1424
- "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
1425
- "name": "ButtonGroup",
1426
- "cssProperties": [
1427
- {
1428
- "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1429
- "name": "--n-button-group-border-radius",
1430
- "default": "var(--n-border-radius-s)"
1431
- },
1432
- {
1433
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1434
- "name": "--n-button-group-box-shadow",
1435
- "default": "var(--n-box-shadow)"
1436
- }
1437
- ],
1438
- "slots": [
1439
- {
1440
- "description": "The button group content",
1441
- "name": ""
1442
- }
1443
- ],
1444
- "members": [
1445
- {
1446
- "kind": "field",
1447
- "name": "direction",
1448
- "type": {
1449
- "text": "\"vertical\" | \"horizontal\""
1450
- },
1451
- "default": "\"horizontal\"",
1452
- "description": "The direction of the button group.",
1453
- "attribute": "direction",
1454
- "reflects": true
1455
- },
1456
- {
1457
- "kind": "field",
1458
- "name": "role",
1459
- "type": {
1460
- "text": "string"
1461
- },
1462
- "default": "\"group\"",
1463
- "description": "The appropriate role for the containing element.",
1464
- "attribute": "role",
1465
- "reflects": true
1466
- }
1467
- ],
1468
- "attributes": [
1469
- {
1470
- "name": "direction",
1471
- "type": {
1472
- "text": "\"vertical\" | \"horizontal\""
1473
- },
1474
- "default": "\"horizontal\"",
1475
- "description": "The direction of the button group.",
1476
- "fieldName": "direction"
1477
- },
1478
- {
1479
- "name": "role",
1480
- "type": {
1481
- "text": "string"
1482
- },
1483
- "default": "\"group\"",
1484
- "description": "The appropriate role for the containing element.",
1485
- "fieldName": "role"
1486
- }
1487
- ],
1488
- "superclass": {
1489
- "name": "LitElement",
1490
- "package": "lit"
1491
- },
1492
- "localization": [],
1493
- "status": "new",
1494
- "category": "structure",
1495
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
1496
- "examples": [],
1497
- "dependencies": [],
1498
- "tagName": "nord-button-group",
1499
- "customElement": true
1500
- }
1501
- ],
1502
- "exports": [
1503
- {
1504
- "kind": "js",
1505
- "name": "default",
1506
- "declaration": {
1507
- "name": "ButtonGroup",
1508
- "module": "src/button-group/ButtonGroup.ts"
1509
- }
1510
- },
1511
- {
1512
- "kind": "custom-element-definition",
1513
- "name": "nord-button-group",
1514
- "declaration": {
1515
- "name": "ButtonGroup",
1516
- "module": "src/button-group/ButtonGroup.ts"
1517
- }
1518
- }
1519
- ]
1520
- },
1521
1418
  {
1522
1419
  "kind": "javascript-module",
1523
1420
  "path": "src/calendar/Calendar.ts",
@@ -2021,6 +1918,109 @@
2021
1918
  }
2022
1919
  ]
2023
1920
  },
1921
+ {
1922
+ "kind": "javascript-module",
1923
+ "path": "src/button-group/ButtonGroup.ts",
1924
+ "declarations": [
1925
+ {
1926
+ "kind": "class",
1927
+ "description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
1928
+ "name": "ButtonGroup",
1929
+ "cssProperties": [
1930
+ {
1931
+ "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1932
+ "name": "--n-button-group-border-radius",
1933
+ "default": "var(--n-border-radius-s)"
1934
+ },
1935
+ {
1936
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1937
+ "name": "--n-button-group-box-shadow",
1938
+ "default": "var(--n-box-shadow)"
1939
+ }
1940
+ ],
1941
+ "slots": [
1942
+ {
1943
+ "description": "The button group content",
1944
+ "name": ""
1945
+ }
1946
+ ],
1947
+ "members": [
1948
+ {
1949
+ "kind": "field",
1950
+ "name": "direction",
1951
+ "type": {
1952
+ "text": "\"vertical\" | \"horizontal\""
1953
+ },
1954
+ "default": "\"horizontal\"",
1955
+ "description": "The direction of the button group.",
1956
+ "attribute": "direction",
1957
+ "reflects": true
1958
+ },
1959
+ {
1960
+ "kind": "field",
1961
+ "name": "role",
1962
+ "type": {
1963
+ "text": "string"
1964
+ },
1965
+ "default": "\"group\"",
1966
+ "description": "The appropriate role for the containing element.",
1967
+ "attribute": "role",
1968
+ "reflects": true
1969
+ }
1970
+ ],
1971
+ "attributes": [
1972
+ {
1973
+ "name": "direction",
1974
+ "type": {
1975
+ "text": "\"vertical\" | \"horizontal\""
1976
+ },
1977
+ "default": "\"horizontal\"",
1978
+ "description": "The direction of the button group.",
1979
+ "fieldName": "direction"
1980
+ },
1981
+ {
1982
+ "name": "role",
1983
+ "type": {
1984
+ "text": "string"
1985
+ },
1986
+ "default": "\"group\"",
1987
+ "description": "The appropriate role for the containing element.",
1988
+ "fieldName": "role"
1989
+ }
1990
+ ],
1991
+ "superclass": {
1992
+ "name": "LitElement",
1993
+ "package": "lit"
1994
+ },
1995
+ "localization": [],
1996
+ "status": "new",
1997
+ "category": "structure",
1998
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
1999
+ "examples": [],
2000
+ "dependencies": [],
2001
+ "tagName": "nord-button-group",
2002
+ "customElement": true
2003
+ }
2004
+ ],
2005
+ "exports": [
2006
+ {
2007
+ "kind": "js",
2008
+ "name": "default",
2009
+ "declaration": {
2010
+ "name": "ButtonGroup",
2011
+ "module": "src/button-group/ButtonGroup.ts"
2012
+ }
2013
+ },
2014
+ {
2015
+ "kind": "custom-element-definition",
2016
+ "name": "nord-button-group",
2017
+ "declaration": {
2018
+ "name": "ButtonGroup",
2019
+ "module": "src/button-group/ButtonGroup.ts"
2020
+ }
2021
+ }
2022
+ ]
2023
+ },
2024
2024
  {
2025
2025
  "kind": "javascript-module",
2026
2026
  "path": "src/checkbox/Checkbox.ts",
@@ -6636,7 +6636,7 @@
6636
6636
  "text": "string"
6637
6637
  },
6638
6638
  "default": "\"\"",
6639
- "description": "Label for the fieldset.",
6639
+ "description": "Label for the fieldset. Rendered as a `<legend>` element.",
6640
6640
  "attribute": "label"
6641
6641
  },
6642
6642
  {
@@ -6677,6 +6677,16 @@
6677
6677
  "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
6678
6678
  "attribute": "hide-required"
6679
6679
  },
6680
+ {
6681
+ "kind": "field",
6682
+ "name": "hideLabel",
6683
+ "type": {
6684
+ "text": "boolean"
6685
+ },
6686
+ "default": "false",
6687
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
6688
+ "attribute": "hide-label"
6689
+ },
6680
6690
  {
6681
6691
  "kind": "field",
6682
6692
  "name": "hasHint",
@@ -6697,7 +6707,7 @@
6697
6707
  "text": "string"
6698
6708
  },
6699
6709
  "default": "\"\"",
6700
- "description": "Label for the fieldset.",
6710
+ "description": "Label for the fieldset. Rendered as a `<legend>` element.",
6701
6711
  "fieldName": "label"
6702
6712
  },
6703
6713
  {
@@ -6733,6 +6743,15 @@
6733
6743
  "default": "false",
6734
6744
  "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
6735
6745
  "fieldName": "hideRequired"
6746
+ },
6747
+ {
6748
+ "name": "hide-label",
6749
+ "type": {
6750
+ "text": "boolean"
6751
+ },
6752
+ "default": "false",
6753
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
6754
+ "fieldName": "hideLabel"
6736
6755
  }
6737
6756
  ],
6738
6757
  "superclass": {
@@ -6851,1096 +6870,1147 @@
6851
6870
  },
6852
6871
  {
6853
6872
  "kind": "javascript-module",
6854
- "path": "src/input/Input.ts",
6873
+ "path": "src/icon/Icon.ts",
6855
6874
  "declarations": [
6856
6875
  {
6857
6876
  "kind": "class",
6858
- "description": "Inputs are used to allow users to provide text input when the expected input is short.\nAs well as plain text, Input supports various types of text, including passwords and numbers.",
6859
- "name": "Input",
6860
- "cssProperties": [
6861
- {
6862
- "description": "Controls the inline size, or width, of the input.",
6863
- "name": "--n-input-inline-size",
6864
- "default": "240px"
6865
- },
6877
+ "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
6878
+ "name": "Icon",
6879
+ "slots": [
6866
6880
  {
6867
- "description": "Controls the background of the input, using our [color tokens](/tokens/#color).",
6868
- "name": "--n-input-background",
6869
- "default": "var(--n-color-active)"
6870
- },
6881
+ "description": "The default slot used for placing a custom SVG icon.",
6882
+ "name": ""
6883
+ }
6884
+ ],
6885
+ "members": [
6871
6886
  {
6872
- "description": "Controls the text color of the input, using our [color tokens](/tokens/#color).",
6873
- "name": "--n-input-color",
6874
- "default": "var(--n-color-text)"
6887
+ "kind": "field",
6888
+ "name": "manager",
6889
+ "privacy": "private",
6890
+ "static": true,
6891
+ "default": "new IconManager()"
6875
6892
  },
6876
6893
  {
6877
- "description": "Controls the border color of the input, using our [color tokens](/tokens/#color).",
6878
- "name": "--n-input-border-color",
6879
- "default": "var(--n-color-border-strong)"
6880
- },
6881
- {
6882
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
6883
- "name": "--n-input-border-radius",
6884
- "default": "var(--n-border-radius-s)"
6885
- },
6886
- {
6887
- "description": "Controls the alignment of text within the input itself.",
6888
- "name": "--n-input-text-align",
6889
- "default": "start"
6890
- }
6891
- ],
6892
- "slots": [
6893
- {
6894
- "description": "Use when a label requires more than plain text.",
6895
- "name": "label"
6896
- },
6897
- {
6898
- "description": "Optional slot that holds hint text for the input.",
6899
- "name": "hint"
6900
- },
6901
- {
6902
- "description": "Optional slot that holds error text for the input.",
6903
- "name": "error"
6904
- },
6905
- {
6906
- "description": "Optional slot used to place an icon or prefix at the start of the input.",
6907
- "name": "start"
6908
- },
6909
- {
6910
- "description": "Optional slot used to place an icon or suffix at the end of the input.",
6911
- "name": "end"
6912
- }
6913
- ],
6914
- "members": [
6915
- {
6916
- "kind": "field",
6917
- "name": "startSlot",
6918
- "type": {
6919
- "text": "HTMLSlotElement"
6920
- },
6921
- "privacy": "private"
6922
- },
6923
- {
6924
- "kind": "field",
6925
- "name": "endSlot",
6926
- "type": {
6927
- "text": "HTMLSlotElement"
6928
- },
6929
- "privacy": "private"
6930
- },
6931
- {
6932
- "kind": "field",
6933
- "name": "startObserver",
6934
- "privacy": "private",
6935
- "default": "new ResizeController(this, () => this.startSlot)"
6936
- },
6937
- {
6938
- "kind": "field",
6939
- "name": "endObserver",
6940
- "privacy": "private",
6941
- "default": "new ResizeController(this, () => this.endSlot)"
6942
- },
6943
- {
6944
- "kind": "field",
6945
- "name": "direction",
6946
- "privacy": "private",
6947
- "default": "new DirectionController(this)"
6948
- },
6949
- {
6950
- "kind": "field",
6951
- "name": "type",
6952
- "type": {
6953
- "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\""
6954
- },
6955
- "default": "\"text\"",
6956
- "description": "The type of the input.",
6957
- "attribute": "type",
6958
- "reflects": true
6894
+ "kind": "method",
6895
+ "name": "registerResolver",
6896
+ "static": true,
6897
+ "parameters": [
6898
+ {
6899
+ "name": "resolver",
6900
+ "type": {
6901
+ "text": "IconResolver"
6902
+ },
6903
+ "description": "The resolver function to register."
6904
+ }
6905
+ ],
6906
+ "description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
6959
6907
  },
6960
6908
  {
6961
- "kind": "field",
6962
- "name": "expand",
6963
- "type": {
6964
- "text": "boolean"
6909
+ "kind": "method",
6910
+ "name": "registerIcon",
6911
+ "static": true,
6912
+ "return": {
6913
+ "type": {
6914
+ "text": "void"
6915
+ }
6965
6916
  },
6966
- "default": "false",
6967
- "description": "Controls whether the input expands to fill the width of its container.",
6968
- "attribute": "expand",
6969
- "reflects": true
6917
+ "parameters": [
6918
+ {
6919
+ "name": "icon",
6920
+ "type": {
6921
+ "text": "{ title: string; default: string }"
6922
+ },
6923
+ "description": "An object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string.\nThis is intended to be used in cases where you import an icon's entire ES module and register it directly."
6924
+ }
6925
+ ],
6926
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
6970
6927
  },
6971
6928
  {
6972
- "kind": "field",
6973
- "name": "disallowPattern",
6974
- "type": {
6975
- "text": "string | undefined"
6929
+ "kind": "method",
6930
+ "name": "registerIcon",
6931
+ "static": true,
6932
+ "return": {
6933
+ "type": {
6934
+ "text": "void"
6935
+ }
6976
6936
  },
6977
- "default": "undefined",
6978
- "description": "Optionally disallow certain characters from being used inside the input, using a regex pattern.",
6979
- "attribute": "disallow-pattern",
6980
- "reflects": true
6937
+ "parameters": [
6938
+ {
6939
+ "name": "name",
6940
+ "type": {
6941
+ "text": "string"
6942
+ },
6943
+ "description": "The name of the icon to be registered."
6944
+ },
6945
+ {
6946
+ "name": "icon",
6947
+ "type": {
6948
+ "text": "string"
6949
+ },
6950
+ "description": "The SVG string for the icon."
6951
+ }
6952
+ ],
6953
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
6981
6954
  },
6982
6955
  {
6983
6956
  "kind": "method",
6984
- "name": "handleKeydown",
6985
- "privacy": "private",
6957
+ "name": "registerIcon",
6958
+ "static": true,
6986
6959
  "parameters": [
6987
6960
  {
6988
- "name": "e",
6961
+ "name": "iconOrName",
6989
6962
  "type": {
6990
- "text": "KeyboardEvent"
6991
- }
6963
+ "text": "string | { title: string; default: string }"
6964
+ },
6965
+ "description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
6966
+ },
6967
+ {
6968
+ "name": "icon",
6969
+ "optional": true,
6970
+ "type": {
6971
+ "text": "string"
6972
+ },
6973
+ "description": "The SVG string for the icon."
6992
6974
  }
6993
- ]
6975
+ ],
6976
+ "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
6994
6977
  },
6995
6978
  {
6996
6979
  "kind": "field",
6997
- "name": "handleInputChange",
6998
- "privacy": "private"
6980
+ "name": "name",
6981
+ "type": {
6982
+ "text": "string"
6983
+ },
6984
+ "default": "\"\"",
6985
+ "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
6986
+ "attribute": "name",
6987
+ "reflects": true
6999
6988
  },
7000
6989
  {
7001
6990
  "kind": "field",
7002
6991
  "name": "size",
7003
6992
  "type": {
7004
- "text": "\"s\" | \"m\" | \"l\""
6993
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
7005
6994
  },
7006
- "default": "\"m\"",
7007
- "description": "The size of the component.",
6995
+ "description": "The size of the icon.",
7008
6996
  "attribute": "size",
7009
- "reflects": true,
7010
- "inheritedFrom": {
7011
- "name": "SizeMixin",
7012
- "module": "src/common/mixins/SizeMixin.ts"
7013
- }
7014
- },
7015
- {
7016
- "kind": "field",
7017
- "name": "labelSlot",
7018
- "privacy": "protected",
7019
- "default": "new SlotController(this, \"label\")",
7020
- "inheritedFrom": {
7021
- "name": "FormAssociatedMixin",
7022
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7023
- }
7024
- },
7025
- {
7026
- "kind": "field",
7027
- "name": "errorSlot",
7028
- "privacy": "protected",
7029
- "default": "new SlotController(this, \"error\")",
7030
- "inheritedFrom": {
7031
- "name": "FormAssociatedMixin",
7032
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7033
- }
7034
- },
7035
- {
7036
- "kind": "field",
7037
- "name": "hintSlot",
7038
- "privacy": "protected",
7039
- "default": "new SlotController(this, \"hint\")",
7040
- "inheritedFrom": {
7041
- "name": "FormAssociatedMixin",
7042
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7043
- }
7044
- },
7045
- {
7046
- "kind": "field",
7047
- "name": "formData",
7048
- "privacy": "protected",
7049
- "default": "new FormDataController(this, { value: () => this.formValue })",
7050
- "inheritedFrom": {
7051
- "name": "FormAssociatedMixin",
7052
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7053
- }
7054
- },
7055
- {
7056
- "kind": "field",
7057
- "name": "formValue",
7058
- "privacy": "protected",
7059
- "readonly": true,
7060
- "inheritedFrom": {
7061
- "name": "FormAssociatedMixin",
7062
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7063
- }
6997
+ "reflects": true
7064
6998
  },
7065
6999
  {
7066
7000
  "kind": "field",
7067
- "name": "inputId",
7001
+ "name": "color",
7068
7002
  "type": {
7069
- "text": "string"
7003
+ "text": "string | undefined"
7070
7004
  },
7071
- "privacy": "protected",
7072
- "default": "\"input\"",
7073
- "inheritedFrom": {
7074
- "name": "FormAssociatedMixin",
7075
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7076
- }
7005
+ "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
7006
+ "attribute": "color",
7007
+ "reflects": true
7077
7008
  },
7078
7009
  {
7079
7010
  "kind": "field",
7080
- "name": "errorId",
7011
+ "name": "label",
7081
7012
  "type": {
7082
- "text": "string"
7013
+ "text": "string | undefined"
7083
7014
  },
7084
- "privacy": "protected",
7085
- "default": "\"error\"",
7086
- "inheritedFrom": {
7087
- "name": "FormAssociatedMixin",
7088
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7089
- }
7015
+ "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
7016
+ "attribute": "label",
7017
+ "reflects": true
7090
7018
  },
7091
7019
  {
7092
7020
  "kind": "field",
7093
- "name": "hintId",
7021
+ "name": "svg",
7094
7022
  "type": {
7095
7023
  "text": "string"
7096
7024
  },
7097
- "privacy": "protected",
7098
- "default": "\"hint\"",
7099
- "inheritedFrom": {
7100
- "name": "FormAssociatedMixin",
7101
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7102
- }
7025
+ "privacy": "private",
7026
+ "default": "\"\""
7103
7027
  },
7104
7028
  {
7105
- "kind": "field",
7106
- "name": "label",
7029
+ "kind": "method",
7030
+ "name": "handleNameChange",
7031
+ "privacy": "protected"
7032
+ }
7033
+ ],
7034
+ "attributes": [
7035
+ {
7036
+ "name": "name",
7107
7037
  "type": {
7108
7038
  "text": "string"
7109
7039
  },
7110
7040
  "default": "\"\"",
7111
- "description": "Label for the input.",
7112
- "attribute": "label",
7113
- "inheritedFrom": {
7114
- "name": "FormAssociatedMixin",
7115
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7116
- }
7117
- },
7118
- {
7119
- "kind": "field",
7120
- "name": "hint",
7121
- "type": {
7122
- "text": "string | undefined"
7123
- },
7124
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
7125
- "attribute": "hint",
7126
- "inheritedFrom": {
7127
- "name": "FormAssociatedMixin",
7128
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7129
- }
7041
+ "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
7042
+ "fieldName": "name"
7130
7043
  },
7131
7044
  {
7132
- "kind": "field",
7133
- "name": "hideLabel",
7045
+ "name": "size",
7134
7046
  "type": {
7135
- "text": "boolean"
7047
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
7136
7048
  },
7137
- "default": "false",
7138
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
7139
- "attribute": "hide-label",
7140
- "inheritedFrom": {
7141
- "name": "FormAssociatedMixin",
7142
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7143
- }
7049
+ "description": "The size of the icon.",
7050
+ "fieldName": "size"
7144
7051
  },
7145
7052
  {
7146
- "kind": "field",
7147
- "name": "placeholder",
7053
+ "name": "color",
7148
7054
  "type": {
7149
7055
  "text": "string | undefined"
7150
7056
  },
7151
- "description": "Placeholder text to display within the input.",
7152
- "attribute": "placeholder",
7153
- "inheritedFrom": {
7154
- "name": "FormAssociatedMixin",
7155
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7156
- }
7057
+ "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
7058
+ "fieldName": "color"
7157
7059
  },
7158
7060
  {
7159
- "kind": "field",
7160
- "name": "error",
7061
+ "name": "label",
7161
7062
  "type": {
7162
7063
  "text": "string | undefined"
7163
7064
  },
7164
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
7165
- "attribute": "error",
7166
- "inheritedFrom": {
7167
- "name": "FormAssociatedMixin",
7168
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7169
- }
7170
- },
7065
+ "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
7066
+ "fieldName": "label"
7067
+ }
7068
+ ],
7069
+ "superclass": {
7070
+ "name": "LitElement",
7071
+ "package": "lit"
7072
+ },
7073
+ "localization": [],
7074
+ "status": "ready",
7075
+ "category": "image",
7076
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n",
7077
+ "examples": [],
7078
+ "dependencies": [],
7079
+ "tagName": "nord-icon",
7080
+ "customElement": true
7081
+ }
7082
+ ],
7083
+ "exports": [
7084
+ {
7085
+ "kind": "js",
7086
+ "name": "default",
7087
+ "declaration": {
7088
+ "name": "Icon",
7089
+ "module": "src/icon/Icon.ts"
7090
+ }
7091
+ },
7092
+ {
7093
+ "kind": "custom-element-definition",
7094
+ "name": "nord-icon",
7095
+ "declaration": {
7096
+ "name": "Icon",
7097
+ "module": "src/icon/Icon.ts"
7098
+ }
7099
+ }
7100
+ ]
7101
+ },
7102
+ {
7103
+ "kind": "javascript-module",
7104
+ "path": "src/icon/IconManager.ts",
7105
+ "declarations": [
7106
+ {
7107
+ "kind": "class",
7108
+ "description": "",
7109
+ "name": "IconManager",
7110
+ "members": [
7171
7111
  {
7172
7112
  "kind": "field",
7173
- "name": "required",
7174
- "type": {
7175
- "text": "boolean"
7176
- },
7177
- "default": "false",
7178
- "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.",
7179
- "attribute": "required",
7180
- "inheritedFrom": {
7181
- "name": "FormAssociatedMixin",
7182
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7183
- }
7113
+ "name": "cache",
7114
+ "privacy": "private",
7115
+ "default": "new Map<string, string | Promise<string>>()"
7184
7116
  },
7185
7117
  {
7186
7118
  "kind": "field",
7187
- "name": "hideRequired",
7188
- "type": {
7189
- "text": "boolean"
7190
- },
7191
- "default": "false",
7192
- "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
7193
- "attribute": "hide-required",
7194
- "inheritedFrom": {
7195
- "name": "FormAssociatedMixin",
7196
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7197
- }
7198
- },
7199
- {
7200
- "kind": "method",
7201
- "name": "handleInput",
7202
- "privacy": "protected",
7203
- "parameters": [
7204
- {
7205
- "name": "e",
7206
- "type": {
7207
- "text": "Event"
7208
- }
7209
- }
7210
- ],
7211
- "inheritedFrom": {
7212
- "name": "FormAssociatedMixin",
7213
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7119
+ "name": "resolver",
7120
+ "type": {
7121
+ "text": "IconResolver"
7214
7122
  }
7215
7123
  },
7216
7124
  {
7217
7125
  "kind": "method",
7218
- "name": "handleChange",
7219
- "privacy": "protected",
7126
+ "name": "resolve",
7220
7127
  "parameters": [
7221
7128
  {
7222
- "name": "e",
7129
+ "name": "name",
7223
7130
  "type": {
7224
- "text": "Event"
7131
+ "text": "string"
7132
+ }
7133
+ },
7134
+ {
7135
+ "name": "onResolved",
7136
+ "type": {
7137
+ "text": "(svg: string) => void"
7225
7138
  }
7226
7139
  }
7227
- ],
7228
- "inheritedFrom": {
7229
- "name": "FormAssociatedMixin",
7230
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7231
- }
7140
+ ]
7232
7141
  },
7233
7142
  {
7234
7143
  "kind": "method",
7235
- "name": "renderLabel",
7236
- "privacy": "protected",
7144
+ "name": "registerIcon",
7237
7145
  "parameters": [
7238
7146
  {
7239
- "name": "additionalContent",
7147
+ "name": "iconOrName",
7148
+ "type": {
7149
+ "text": "string | { title: string; default: string }"
7150
+ }
7151
+ },
7152
+ {
7153
+ "name": "icon",
7240
7154
  "optional": true,
7241
7155
  "type": {
7242
- "text": "TemplateResult"
7156
+ "text": "string"
7243
7157
  }
7244
7158
  }
7245
- ],
7246
- "inheritedFrom": {
7247
- "name": "FormAssociatedMixin",
7248
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7249
- }
7159
+ ]
7250
7160
  },
7251
7161
  {
7252
7162
  "kind": "method",
7253
- "name": "renderError",
7254
- "privacy": "protected",
7255
- "inheritedFrom": {
7256
- "name": "FormAssociatedMixin",
7257
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7258
- }
7163
+ "name": "clear"
7164
+ }
7165
+ ]
7166
+ }
7167
+ ],
7168
+ "exports": [
7169
+ {
7170
+ "kind": "js",
7171
+ "name": "IconManager",
7172
+ "declaration": {
7173
+ "name": "IconManager",
7174
+ "module": "src/icon/IconManager.ts"
7175
+ }
7176
+ }
7177
+ ]
7178
+ },
7179
+ {
7180
+ "kind": "javascript-module",
7181
+ "path": "src/input/Input.ts",
7182
+ "declarations": [
7183
+ {
7184
+ "kind": "class",
7185
+ "description": "Inputs are used to allow users to provide text input when the expected input is short.\nAs well as plain text, Input supports various types of text, including passwords and numbers.",
7186
+ "name": "Input",
7187
+ "cssProperties": [
7188
+ {
7189
+ "description": "Controls the inline size, or width, of the input.",
7190
+ "name": "--n-input-inline-size",
7191
+ "default": "240px"
7259
7192
  },
7260
7193
  {
7261
- "kind": "method",
7262
- "name": "getDescribedBy",
7263
- "privacy": "protected",
7264
- "inheritedFrom": {
7265
- "name": "FormAssociatedMixin",
7266
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7267
- }
7194
+ "description": "Controls the background of the input, using our [color tokens](/tokens/#color).",
7195
+ "name": "--n-input-background",
7196
+ "default": "var(--n-color-active)"
7268
7197
  },
7269
7198
  {
7270
- "kind": "method",
7271
- "name": "getInvalid",
7272
- "privacy": "protected",
7273
- "inheritedFrom": {
7274
- "name": "FormAssociatedMixin",
7275
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7276
- }
7199
+ "description": "Controls the text color of the input, using our [color tokens](/tokens/#color).",
7200
+ "name": "--n-input-color",
7201
+ "default": "var(--n-color-text)"
7277
7202
  },
7278
7203
  {
7279
- "kind": "field",
7280
- "name": "hasHint",
7281
- "privacy": "protected",
7282
- "readonly": true,
7283
- "inheritedFrom": {
7284
- "name": "FormAssociatedMixin",
7285
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7286
- }
7204
+ "description": "Controls the border color of the input, using our [color tokens](/tokens/#color).",
7205
+ "name": "--n-input-border-color",
7206
+ "default": "var(--n-color-border-strong)"
7287
7207
  },
7288
7208
  {
7289
- "kind": "field",
7290
- "name": "hasError",
7291
- "privacy": "protected",
7292
- "readonly": true,
7293
- "inheritedFrom": {
7294
- "name": "FormAssociatedMixin",
7295
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7296
- }
7209
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
7210
+ "name": "--n-input-border-radius",
7211
+ "default": "var(--n-border-radius-s)"
7212
+ },
7213
+ {
7214
+ "description": "Controls the alignment of text within the input itself.",
7215
+ "name": "--n-input-text-align",
7216
+ "default": "start"
7217
+ }
7218
+ ],
7219
+ "slots": [
7220
+ {
7221
+ "description": "Use when a label requires more than plain text.",
7222
+ "name": "label"
7223
+ },
7224
+ {
7225
+ "description": "Optional slot that holds hint text for the input.",
7226
+ "name": "hint"
7227
+ },
7228
+ {
7229
+ "description": "Optional slot that holds error text for the input.",
7230
+ "name": "error"
7231
+ },
7232
+ {
7233
+ "description": "Optional slot used to place an icon or prefix at the start of the input.",
7234
+ "name": "start"
7297
7235
  },
7236
+ {
7237
+ "description": "Optional slot used to place an icon or suffix at the end of the input.",
7238
+ "name": "end"
7239
+ }
7240
+ ],
7241
+ "members": [
7298
7242
  {
7299
7243
  "kind": "field",
7300
- "name": "autocomplete",
7244
+ "name": "startSlot",
7301
7245
  "type": {
7302
- "text": "AutocompleteAttribute"
7246
+ "text": "HTMLSlotElement"
7303
7247
  },
7304
- "default": "\"off\"",
7305
- "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.",
7306
- "attribute": "autocomplete",
7307
- "inheritedFrom": {
7308
- "name": "AutocompleteMixin",
7309
- "module": "src/common/mixins/AutocompleteMixin.ts"
7310
- }
7248
+ "privacy": "private"
7311
7249
  },
7312
7250
  {
7313
7251
  "kind": "field",
7314
- "name": "readonly",
7252
+ "name": "endSlot",
7315
7253
  "type": {
7316
- "text": "boolean"
7254
+ "text": "HTMLSlotElement"
7317
7255
  },
7318
- "default": "false",
7319
- "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
7320
- "attribute": "readonly",
7321
- "reflects": true,
7322
- "inheritedFrom": {
7323
- "name": "ReadonlyMixin",
7324
- "module": "src/common/mixins/ReadonlyMixin.ts"
7325
- }
7256
+ "privacy": "private"
7326
7257
  },
7327
7258
  {
7328
7259
  "kind": "field",
7329
- "name": "disabled",
7330
- "type": {
7331
- "text": "boolean"
7332
- },
7333
- "default": "false",
7334
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
7335
- "attribute": "disabled",
7336
- "reflects": true,
7337
- "inheritedFrom": {
7338
- "name": "InputMixin",
7339
- "module": "src/common/mixins/InputMixin.ts"
7340
- }
7260
+ "name": "startObserver",
7261
+ "privacy": "private",
7262
+ "default": "new ResizeController(this, () => this.startSlot)"
7341
7263
  },
7342
7264
  {
7343
7265
  "kind": "field",
7344
- "name": "name",
7266
+ "name": "endObserver",
7267
+ "privacy": "private",
7268
+ "default": "new ResizeController(this, () => this.endSlot)"
7269
+ },
7270
+ {
7271
+ "kind": "field",
7272
+ "name": "direction",
7273
+ "privacy": "private",
7274
+ "default": "new DirectionController(this)"
7275
+ },
7276
+ {
7277
+ "kind": "field",
7278
+ "name": "type",
7345
7279
  "type": {
7346
- "text": "string | undefined"
7280
+ "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\""
7347
7281
  },
7348
- "description": "The name of the form component.",
7349
- "attribute": "name",
7350
- "inheritedFrom": {
7351
- "name": "InputMixin",
7352
- "module": "src/common/mixins/InputMixin.ts"
7353
- }
7282
+ "default": "\"text\"",
7283
+ "description": "The type of the input.",
7284
+ "attribute": "type",
7285
+ "reflects": true
7354
7286
  },
7355
7287
  {
7356
7288
  "kind": "field",
7357
- "name": "value",
7289
+ "name": "expand",
7358
7290
  "type": {
7359
- "text": "string"
7291
+ "text": "boolean"
7360
7292
  },
7361
- "default": "\"\"",
7362
- "description": "The value of the form component.",
7363
- "attribute": "value",
7364
- "inheritedFrom": {
7365
- "name": "InputMixin",
7366
- "module": "src/common/mixins/InputMixin.ts"
7367
- }
7293
+ "default": "false",
7294
+ "description": "Controls whether the input expands to fill the width of its container.",
7295
+ "attribute": "expand",
7296
+ "reflects": true
7368
7297
  },
7369
7298
  {
7370
7299
  "kind": "field",
7371
- "name": "formAncestor",
7300
+ "name": "disallowPattern",
7372
7301
  "type": {
7373
- "text": "HTMLFormElement | null"
7302
+ "text": "string | undefined"
7374
7303
  },
7304
+ "default": "undefined",
7305
+ "description": "Optionally disallow certain characters from being used inside the input, using a regex pattern.",
7306
+ "attribute": "disallow-pattern",
7307
+ "reflects": true
7308
+ },
7309
+ {
7310
+ "kind": "method",
7311
+ "name": "handleKeydown",
7375
7312
  "privacy": "private",
7376
- "default": "null",
7377
- "inheritedFrom": {
7378
- "name": "InputMixin",
7379
- "module": "src/common/mixins/InputMixin.ts"
7380
- }
7313
+ "parameters": [
7314
+ {
7315
+ "name": "e",
7316
+ "type": {
7317
+ "text": "KeyboardEvent"
7318
+ }
7319
+ }
7320
+ ]
7321
+ },
7322
+ {
7323
+ "kind": "field",
7324
+ "name": "handleInputChange",
7325
+ "privacy": "private"
7381
7326
  },
7382
7327
  {
7383
7328
  "kind": "field",
7384
- "name": "_formId",
7329
+ "name": "size",
7385
7330
  "type": {
7386
- "text": "string | undefined"
7331
+ "text": "\"s\" | \"m\" | \"l\""
7387
7332
  },
7388
- "privacy": "protected",
7333
+ "default": "\"m\"",
7334
+ "description": "The size of the component.",
7335
+ "attribute": "size",
7336
+ "reflects": true,
7389
7337
  "inheritedFrom": {
7390
- "name": "InputMixin",
7391
- "module": "src/common/mixins/InputMixin.ts"
7338
+ "name": "SizeMixin",
7339
+ "module": "src/common/mixins/SizeMixin.ts"
7392
7340
  }
7393
7341
  },
7394
7342
  {
7395
7343
  "kind": "field",
7396
- "name": "form",
7397
- "type": {
7398
- "text": "HTMLFormElement | null"
7399
- },
7400
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
7401
- "attribute": "form",
7344
+ "name": "labelSlot",
7345
+ "privacy": "protected",
7346
+ "default": "new SlotController(this, \"label\")",
7402
7347
  "inheritedFrom": {
7403
- "name": "InputMixin",
7404
- "module": "src/common/mixins/InputMixin.ts"
7348
+ "name": "FormAssociatedMixin",
7349
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7405
7350
  }
7406
7351
  },
7407
7352
  {
7408
7353
  "kind": "field",
7409
- "name": "focusableRef",
7354
+ "name": "errorSlot",
7410
7355
  "privacy": "protected",
7356
+ "default": "new SlotController(this, \"error\")",
7411
7357
  "inheritedFrom": {
7412
- "name": "FocusableMixin",
7413
- "module": "src/common/mixins/FocusableMixin.ts"
7358
+ "name": "FormAssociatedMixin",
7359
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7414
7360
  }
7415
7361
  },
7416
7362
  {
7417
- "kind": "method",
7418
- "name": "focus",
7419
- "parameters": [
7420
- {
7421
- "name": "options",
7422
- "optional": true,
7423
- "type": {
7424
- "text": "FocusOptions"
7425
- },
7426
- "description": "An object which controls aspects of the focusing process."
7427
- }
7428
- ],
7429
- "description": "Programmatically move focus to the component.",
7363
+ "kind": "field",
7364
+ "name": "hintSlot",
7365
+ "privacy": "protected",
7366
+ "default": "new SlotController(this, \"hint\")",
7430
7367
  "inheritedFrom": {
7431
- "name": "FocusableMixin",
7432
- "module": "src/common/mixins/FocusableMixin.ts"
7368
+ "name": "FormAssociatedMixin",
7369
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7433
7370
  }
7434
7371
  },
7435
7372
  {
7436
- "kind": "method",
7437
- "name": "blur",
7438
- "description": "Programmatically remove focus from the component.",
7373
+ "kind": "field",
7374
+ "name": "formData",
7375
+ "privacy": "protected",
7376
+ "default": "new FormDataController(this, { value: () => this.formValue })",
7439
7377
  "inheritedFrom": {
7440
- "name": "FocusableMixin",
7441
- "module": "src/common/mixins/FocusableMixin.ts"
7378
+ "name": "FormAssociatedMixin",
7379
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7442
7380
  }
7443
7381
  },
7444
7382
  {
7445
- "kind": "method",
7446
- "name": "click",
7447
- "description": "Programmatically simulates a click on the component.",
7383
+ "kind": "field",
7384
+ "name": "formValue",
7385
+ "privacy": "protected",
7386
+ "readonly": true,
7448
7387
  "inheritedFrom": {
7449
- "name": "FocusableMixin",
7450
- "module": "src/common/mixins/FocusableMixin.ts"
7388
+ "name": "FormAssociatedMixin",
7389
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7451
7390
  }
7452
- }
7453
- ],
7454
- "attributes": [
7455
- {
7456
- "name": "type",
7457
- "type": {
7458
- "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\""
7459
- },
7460
- "default": "\"text\"",
7461
- "description": "The type of the input.",
7462
- "fieldName": "type"
7463
7391
  },
7464
7392
  {
7465
- "name": "expand",
7393
+ "kind": "field",
7394
+ "name": "inputId",
7466
7395
  "type": {
7467
- "text": "boolean"
7396
+ "text": "string"
7468
7397
  },
7469
- "default": "false",
7470
- "description": "Controls whether the input expands to fill the width of its container.",
7471
- "fieldName": "expand"
7398
+ "privacy": "protected",
7399
+ "default": "\"input\"",
7400
+ "inheritedFrom": {
7401
+ "name": "FormAssociatedMixin",
7402
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7403
+ }
7472
7404
  },
7473
7405
  {
7474
- "name": "disallow-pattern",
7406
+ "kind": "field",
7407
+ "name": "errorId",
7475
7408
  "type": {
7476
- "text": "string | undefined"
7477
- },
7478
- "default": "undefined",
7479
- "description": "Optionally disallow certain characters from being used inside the input, using a regex pattern.",
7480
- "resolveInitializer": {
7481
- "module": "src/input/Input.ts"
7409
+ "text": "string"
7482
7410
  },
7483
- "fieldName": "disallowPattern"
7411
+ "privacy": "protected",
7412
+ "default": "\"error\"",
7413
+ "inheritedFrom": {
7414
+ "name": "FormAssociatedMixin",
7415
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7416
+ }
7484
7417
  },
7485
7418
  {
7486
- "name": "size",
7419
+ "kind": "field",
7420
+ "name": "hintId",
7487
7421
  "type": {
7488
- "text": "\"s\" | \"m\" | \"l\""
7422
+ "text": "string"
7489
7423
  },
7490
- "default": "\"m\"",
7491
- "description": "The size of the component.",
7492
- "fieldName": "size",
7424
+ "privacy": "protected",
7425
+ "default": "\"hint\"",
7493
7426
  "inheritedFrom": {
7494
- "name": "SizeMixin",
7495
- "module": "src/common/mixins/SizeMixin.ts"
7427
+ "name": "FormAssociatedMixin",
7428
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7496
7429
  }
7497
7430
  },
7498
7431
  {
7432
+ "kind": "field",
7499
7433
  "name": "label",
7500
7434
  "type": {
7501
7435
  "text": "string"
7502
7436
  },
7503
7437
  "default": "\"\"",
7504
7438
  "description": "Label for the input.",
7505
- "fieldName": "label",
7439
+ "attribute": "label",
7506
7440
  "inheritedFrom": {
7507
7441
  "name": "FormAssociatedMixin",
7508
7442
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7509
7443
  }
7510
7444
  },
7511
7445
  {
7446
+ "kind": "field",
7512
7447
  "name": "hint",
7513
7448
  "type": {
7514
7449
  "text": "string | undefined"
7515
7450
  },
7516
7451
  "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
7517
- "fieldName": "hint",
7452
+ "attribute": "hint",
7518
7453
  "inheritedFrom": {
7519
7454
  "name": "FormAssociatedMixin",
7520
7455
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7521
7456
  }
7522
7457
  },
7523
7458
  {
7524
- "name": "hide-label",
7459
+ "kind": "field",
7460
+ "name": "hideLabel",
7525
7461
  "type": {
7526
7462
  "text": "boolean"
7527
7463
  },
7528
7464
  "default": "false",
7529
7465
  "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
7530
- "fieldName": "hideLabel",
7466
+ "attribute": "hide-label",
7531
7467
  "inheritedFrom": {
7532
7468
  "name": "FormAssociatedMixin",
7533
7469
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7534
7470
  }
7535
7471
  },
7536
7472
  {
7473
+ "kind": "field",
7537
7474
  "name": "placeholder",
7538
7475
  "type": {
7539
7476
  "text": "string | undefined"
7540
7477
  },
7541
7478
  "description": "Placeholder text to display within the input.",
7542
- "fieldName": "placeholder",
7479
+ "attribute": "placeholder",
7543
7480
  "inheritedFrom": {
7544
7481
  "name": "FormAssociatedMixin",
7545
7482
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7546
7483
  }
7547
7484
  },
7548
7485
  {
7486
+ "kind": "field",
7549
7487
  "name": "error",
7550
7488
  "type": {
7551
7489
  "text": "string | undefined"
7552
7490
  },
7553
7491
  "description": "Optional error to be shown with the input. Alternatively use the error slot.",
7554
- "fieldName": "error",
7492
+ "attribute": "error",
7555
7493
  "inheritedFrom": {
7556
7494
  "name": "FormAssociatedMixin",
7557
7495
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7558
7496
  }
7559
7497
  },
7560
7498
  {
7499
+ "kind": "field",
7561
7500
  "name": "required",
7562
7501
  "type": {
7563
7502
  "text": "boolean"
7564
7503
  },
7565
7504
  "default": "false",
7566
7505
  "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.",
7567
- "fieldName": "required",
7506
+ "attribute": "required",
7568
7507
  "inheritedFrom": {
7569
7508
  "name": "FormAssociatedMixin",
7570
7509
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7571
7510
  }
7572
7511
  },
7573
7512
  {
7574
- "name": "hide-required",
7513
+ "kind": "field",
7514
+ "name": "hideRequired",
7575
7515
  "type": {
7576
7516
  "text": "boolean"
7577
7517
  },
7578
7518
  "default": "false",
7579
7519
  "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
7580
- "fieldName": "hideRequired",
7520
+ "attribute": "hide-required",
7521
+ "inheritedFrom": {
7522
+ "name": "FormAssociatedMixin",
7523
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7524
+ }
7525
+ },
7526
+ {
7527
+ "kind": "method",
7528
+ "name": "handleInput",
7529
+ "privacy": "protected",
7530
+ "parameters": [
7531
+ {
7532
+ "name": "e",
7533
+ "type": {
7534
+ "text": "Event"
7535
+ }
7536
+ }
7537
+ ],
7538
+ "inheritedFrom": {
7539
+ "name": "FormAssociatedMixin",
7540
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7541
+ }
7542
+ },
7543
+ {
7544
+ "kind": "method",
7545
+ "name": "handleChange",
7546
+ "privacy": "protected",
7547
+ "parameters": [
7548
+ {
7549
+ "name": "e",
7550
+ "type": {
7551
+ "text": "Event"
7552
+ }
7553
+ }
7554
+ ],
7555
+ "inheritedFrom": {
7556
+ "name": "FormAssociatedMixin",
7557
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7558
+ }
7559
+ },
7560
+ {
7561
+ "kind": "method",
7562
+ "name": "renderLabel",
7563
+ "privacy": "protected",
7564
+ "parameters": [
7565
+ {
7566
+ "name": "additionalContent",
7567
+ "optional": true,
7568
+ "type": {
7569
+ "text": "TemplateResult"
7570
+ }
7571
+ }
7572
+ ],
7573
+ "inheritedFrom": {
7574
+ "name": "FormAssociatedMixin",
7575
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7576
+ }
7577
+ },
7578
+ {
7579
+ "kind": "method",
7580
+ "name": "renderError",
7581
+ "privacy": "protected",
7582
+ "inheritedFrom": {
7583
+ "name": "FormAssociatedMixin",
7584
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7585
+ }
7586
+ },
7587
+ {
7588
+ "kind": "method",
7589
+ "name": "getDescribedBy",
7590
+ "privacy": "protected",
7591
+ "inheritedFrom": {
7592
+ "name": "FormAssociatedMixin",
7593
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7594
+ }
7595
+ },
7596
+ {
7597
+ "kind": "method",
7598
+ "name": "getInvalid",
7599
+ "privacy": "protected",
7600
+ "inheritedFrom": {
7601
+ "name": "FormAssociatedMixin",
7602
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7603
+ }
7604
+ },
7605
+ {
7606
+ "kind": "field",
7607
+ "name": "hasHint",
7608
+ "privacy": "protected",
7609
+ "readonly": true,
7610
+ "inheritedFrom": {
7611
+ "name": "FormAssociatedMixin",
7612
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7613
+ }
7614
+ },
7615
+ {
7616
+ "kind": "field",
7617
+ "name": "hasError",
7618
+ "privacy": "protected",
7619
+ "readonly": true,
7581
7620
  "inheritedFrom": {
7582
7621
  "name": "FormAssociatedMixin",
7583
7622
  "module": "src/common/mixins/FormAssociatedMixin.ts"
7584
7623
  }
7585
7624
  },
7586
7625
  {
7626
+ "kind": "field",
7587
7627
  "name": "autocomplete",
7588
7628
  "type": {
7589
7629
  "text": "AutocompleteAttribute"
7590
7630
  },
7591
7631
  "default": "\"off\"",
7592
7632
  "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.",
7593
- "fieldName": "autocomplete",
7633
+ "attribute": "autocomplete",
7594
7634
  "inheritedFrom": {
7595
7635
  "name": "AutocompleteMixin",
7596
7636
  "module": "src/common/mixins/AutocompleteMixin.ts"
7597
7637
  }
7598
7638
  },
7599
7639
  {
7640
+ "kind": "field",
7600
7641
  "name": "readonly",
7601
7642
  "type": {
7602
7643
  "text": "boolean"
7603
7644
  },
7604
7645
  "default": "false",
7605
7646
  "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
7606
- "fieldName": "readonly",
7647
+ "attribute": "readonly",
7648
+ "reflects": true,
7607
7649
  "inheritedFrom": {
7608
7650
  "name": "ReadonlyMixin",
7609
7651
  "module": "src/common/mixins/ReadonlyMixin.ts"
7610
7652
  }
7611
7653
  },
7612
7654
  {
7655
+ "kind": "field",
7613
7656
  "name": "disabled",
7614
7657
  "type": {
7615
7658
  "text": "boolean"
7616
7659
  },
7617
7660
  "default": "false",
7618
7661
  "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
7619
- "fieldName": "disabled",
7662
+ "attribute": "disabled",
7663
+ "reflects": true,
7620
7664
  "inheritedFrom": {
7621
7665
  "name": "InputMixin",
7622
7666
  "module": "src/common/mixins/InputMixin.ts"
7623
7667
  }
7624
7668
  },
7625
7669
  {
7670
+ "kind": "field",
7626
7671
  "name": "name",
7627
7672
  "type": {
7628
7673
  "text": "string | undefined"
7629
7674
  },
7630
7675
  "description": "The name of the form component.",
7631
- "fieldName": "name",
7676
+ "attribute": "name",
7632
7677
  "inheritedFrom": {
7633
7678
  "name": "InputMixin",
7634
7679
  "module": "src/common/mixins/InputMixin.ts"
7635
7680
  }
7636
7681
  },
7637
7682
  {
7683
+ "kind": "field",
7638
7684
  "name": "value",
7639
7685
  "type": {
7640
7686
  "text": "string"
7641
7687
  },
7642
7688
  "default": "\"\"",
7643
7689
  "description": "The value of the form component.",
7644
- "fieldName": "value",
7690
+ "attribute": "value",
7645
7691
  "inheritedFrom": {
7646
7692
  "name": "InputMixin",
7647
7693
  "module": "src/common/mixins/InputMixin.ts"
7648
7694
  }
7649
7695
  },
7650
7696
  {
7651
- "name": "form",
7697
+ "kind": "field",
7698
+ "name": "formAncestor",
7652
7699
  "type": {
7653
7700
  "text": "HTMLFormElement | null"
7654
7701
  },
7655
- "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
7656
- "fieldName": "form",
7702
+ "privacy": "private",
7703
+ "default": "null",
7657
7704
  "inheritedFrom": {
7658
7705
  "name": "InputMixin",
7659
7706
  "module": "src/common/mixins/InputMixin.ts"
7660
7707
  }
7661
- }
7662
- ],
7663
- "mixins": [
7664
- {
7665
- "name": "SizeMixin",
7666
- "module": "/src/common/mixins/SizeMixin.js"
7667
7708
  },
7668
7709
  {
7669
- "name": "FormAssociatedMixin",
7670
- "module": "/src/common/mixins/FormAssociatedMixin.js"
7671
- },
7672
- {
7673
- "name": "AutocompleteMixin",
7674
- "module": "/src/common/mixins/AutocompleteMixin.js"
7675
- },
7676
- {
7677
- "name": "ReadonlyMixin",
7678
- "module": "/src/common/mixins/ReadonlyMixin.js"
7679
- },
7680
- {
7681
- "name": "InputMixin",
7682
- "module": "/src/common/mixins/InputMixin.js"
7683
- },
7684
- {
7685
- "name": "FocusableMixin",
7686
- "module": "/src/common/mixins/FocusableMixin.js"
7687
- }
7688
- ],
7689
- "superclass": {
7690
- "name": "LitElement",
7691
- "package": "lit"
7692
- },
7693
- "localization": [],
7694
- "status": "ready",
7695
- "category": "form",
7696
- "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 provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input 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\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n\n## Icon usage in input\n\nEach [input size](/components/input/?example=size) has a recommended icon size. The medium input uses the `s` icon size, the small input uses the `xs` icon size, and the large input uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n",
7697
- "examples": [],
7698
- "dependencies": [
7699
- "icon"
7700
- ],
7701
- "tagName": "nord-input",
7702
- "customElement": true,
7703
- "events": [
7704
- {
7705
- "name": "input",
7710
+ "kind": "field",
7711
+ "name": "_formId",
7706
7712
  "type": {
7707
- "text": "NordEvent"
7713
+ "text": "string | undefined"
7708
7714
  },
7709
- "description": "Fired as the user types into the input.",
7715
+ "privacy": "protected",
7710
7716
  "inheritedFrom": {
7711
- "name": "FormAssociatedMixin",
7712
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7717
+ "name": "InputMixin",
7718
+ "module": "src/common/mixins/InputMixin.ts"
7713
7719
  }
7714
7720
  },
7715
7721
  {
7716
- "name": "change",
7722
+ "kind": "field",
7723
+ "name": "form",
7717
7724
  "type": {
7718
- "text": "NordEvent"
7725
+ "text": "HTMLFormElement | null"
7719
7726
  },
7720
- "description": "Fired whenever the input's value is changed via user interaction.",
7727
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
7728
+ "attribute": "form",
7721
7729
  "inheritedFrom": {
7722
- "name": "FormAssociatedMixin",
7723
- "module": "src/common/mixins/FormAssociatedMixin.ts"
7730
+ "name": "InputMixin",
7731
+ "module": "src/common/mixins/InputMixin.ts"
7724
7732
  }
7725
- }
7726
- ]
7727
- }
7728
- ],
7729
- "exports": [
7730
- {
7731
- "kind": "js",
7732
- "name": "default",
7733
- "declaration": {
7734
- "name": "Input",
7735
- "module": "src/input/Input.ts"
7736
- }
7737
- },
7738
- {
7739
- "kind": "custom-element-definition",
7740
- "name": "nord-input",
7741
- "declaration": {
7742
- "name": "Input",
7743
- "module": "src/input/Input.ts"
7744
- }
7745
- }
7746
- ]
7747
- },
7748
- {
7749
- "kind": "javascript-module",
7750
- "path": "src/icon/Icon.ts",
7751
- "declarations": [
7752
- {
7753
- "kind": "class",
7754
- "description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
7755
- "name": "Icon",
7756
- "slots": [
7757
- {
7758
- "description": "The default slot used for placing a custom SVG icon.",
7759
- "name": ""
7760
- }
7761
- ],
7762
- "members": [
7733
+ },
7763
7734
  {
7764
7735
  "kind": "field",
7765
- "name": "manager",
7766
- "privacy": "private",
7767
- "static": true,
7768
- "default": "new IconManager()"
7736
+ "name": "focusableRef",
7737
+ "privacy": "protected",
7738
+ "inheritedFrom": {
7739
+ "name": "FocusableMixin",
7740
+ "module": "src/common/mixins/FocusableMixin.ts"
7741
+ }
7769
7742
  },
7770
7743
  {
7771
7744
  "kind": "method",
7772
- "name": "registerResolver",
7773
- "static": true,
7745
+ "name": "focus",
7774
7746
  "parameters": [
7775
7747
  {
7776
- "name": "resolver",
7748
+ "name": "options",
7749
+ "optional": true,
7777
7750
  "type": {
7778
- "text": "IconResolver"
7751
+ "text": "FocusOptions"
7779
7752
  },
7780
- "description": "The resolver function to register."
7753
+ "description": "An object which controls aspects of the focusing process."
7781
7754
  }
7782
7755
  ],
7783
- "description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
7756
+ "description": "Programmatically move focus to the component.",
7757
+ "inheritedFrom": {
7758
+ "name": "FocusableMixin",
7759
+ "module": "src/common/mixins/FocusableMixin.ts"
7760
+ }
7784
7761
  },
7785
7762
  {
7786
7763
  "kind": "method",
7787
- "name": "registerIcon",
7788
- "static": true,
7789
- "return": {
7790
- "type": {
7791
- "text": "void"
7792
- }
7793
- },
7794
- "parameters": [
7795
- {
7796
- "name": "icon",
7797
- "type": {
7798
- "text": "{ title: string; default: string }"
7799
- },
7800
- "description": "An object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string.\nThis is intended to be used in cases where you import an icon's entire ES module and register it directly."
7801
- }
7802
- ],
7803
- "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
7764
+ "name": "blur",
7765
+ "description": "Programmatically remove focus from the component.",
7766
+ "inheritedFrom": {
7767
+ "name": "FocusableMixin",
7768
+ "module": "src/common/mixins/FocusableMixin.ts"
7769
+ }
7804
7770
  },
7805
7771
  {
7806
7772
  "kind": "method",
7807
- "name": "registerIcon",
7808
- "static": true,
7809
- "return": {
7810
- "type": {
7811
- "text": "void"
7812
- }
7773
+ "name": "click",
7774
+ "description": "Programmatically simulates a click on the component.",
7775
+ "inheritedFrom": {
7776
+ "name": "FocusableMixin",
7777
+ "module": "src/common/mixins/FocusableMixin.ts"
7778
+ }
7779
+ }
7780
+ ],
7781
+ "attributes": [
7782
+ {
7783
+ "name": "type",
7784
+ "type": {
7785
+ "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\""
7813
7786
  },
7814
- "parameters": [
7815
- {
7816
- "name": "name",
7817
- "type": {
7818
- "text": "string"
7819
- },
7820
- "description": "The name of the icon to be registered."
7821
- },
7822
- {
7823
- "name": "icon",
7824
- "type": {
7825
- "text": "string"
7826
- },
7827
- "description": "The SVG string for the icon."
7828
- }
7829
- ],
7830
- "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
7787
+ "default": "\"text\"",
7788
+ "description": "The type of the input.",
7789
+ "fieldName": "type"
7831
7790
  },
7832
7791
  {
7833
- "kind": "method",
7834
- "name": "registerIcon",
7835
- "static": true,
7836
- "parameters": [
7837
- {
7838
- "name": "iconOrName",
7839
- "type": {
7840
- "text": "string | { title: string; default: string }"
7841
- },
7842
- "description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
7843
- },
7844
- {
7845
- "name": "icon",
7846
- "optional": true,
7847
- "type": {
7848
- "text": "string"
7849
- },
7850
- "description": "The SVG string for the icon."
7851
- }
7852
- ],
7853
- "description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
7792
+ "name": "expand",
7793
+ "type": {
7794
+ "text": "boolean"
7795
+ },
7796
+ "default": "false",
7797
+ "description": "Controls whether the input expands to fill the width of its container.",
7798
+ "fieldName": "expand"
7799
+ },
7800
+ {
7801
+ "name": "disallow-pattern",
7802
+ "type": {
7803
+ "text": "string | undefined"
7804
+ },
7805
+ "default": "undefined",
7806
+ "description": "Optionally disallow certain characters from being used inside the input, using a regex pattern.",
7807
+ "resolveInitializer": {
7808
+ "module": "src/input/Input.ts"
7809
+ },
7810
+ "fieldName": "disallowPattern"
7854
7811
  },
7855
7812
  {
7856
- "kind": "field",
7857
- "name": "name",
7813
+ "name": "size",
7814
+ "type": {
7815
+ "text": "\"s\" | \"m\" | \"l\""
7816
+ },
7817
+ "default": "\"m\"",
7818
+ "description": "The size of the component.",
7819
+ "fieldName": "size",
7820
+ "inheritedFrom": {
7821
+ "name": "SizeMixin",
7822
+ "module": "src/common/mixins/SizeMixin.ts"
7823
+ }
7824
+ },
7825
+ {
7826
+ "name": "label",
7858
7827
  "type": {
7859
7828
  "text": "string"
7860
7829
  },
7861
7830
  "default": "\"\"",
7862
- "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
7863
- "attribute": "name",
7864
- "reflects": true
7831
+ "description": "Label for the input.",
7832
+ "fieldName": "label",
7833
+ "inheritedFrom": {
7834
+ "name": "FormAssociatedMixin",
7835
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7836
+ }
7865
7837
  },
7866
7838
  {
7867
- "kind": "field",
7868
- "name": "size",
7839
+ "name": "hint",
7869
7840
  "type": {
7870
- "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
7841
+ "text": "string | undefined"
7871
7842
  },
7872
- "description": "The size of the icon.",
7873
- "attribute": "size",
7874
- "reflects": true
7843
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
7844
+ "fieldName": "hint",
7845
+ "inheritedFrom": {
7846
+ "name": "FormAssociatedMixin",
7847
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7848
+ }
7875
7849
  },
7876
7850
  {
7877
- "kind": "field",
7878
- "name": "color",
7851
+ "name": "hide-label",
7852
+ "type": {
7853
+ "text": "boolean"
7854
+ },
7855
+ "default": "false",
7856
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
7857
+ "fieldName": "hideLabel",
7858
+ "inheritedFrom": {
7859
+ "name": "FormAssociatedMixin",
7860
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7861
+ }
7862
+ },
7863
+ {
7864
+ "name": "placeholder",
7879
7865
  "type": {
7880
7866
  "text": "string | undefined"
7881
7867
  },
7882
- "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
7883
- "attribute": "color",
7884
- "reflects": true
7868
+ "description": "Placeholder text to display within the input.",
7869
+ "fieldName": "placeholder",
7870
+ "inheritedFrom": {
7871
+ "name": "FormAssociatedMixin",
7872
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7873
+ }
7885
7874
  },
7886
7875
  {
7887
- "kind": "field",
7888
- "name": "label",
7876
+ "name": "error",
7889
7877
  "type": {
7890
7878
  "text": "string | undefined"
7891
7879
  },
7892
- "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
7893
- "attribute": "label",
7894
- "reflects": true
7880
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
7881
+ "fieldName": "error",
7882
+ "inheritedFrom": {
7883
+ "name": "FormAssociatedMixin",
7884
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7885
+ }
7895
7886
  },
7896
7887
  {
7897
- "kind": "field",
7898
- "name": "svg",
7888
+ "name": "required",
7899
7889
  "type": {
7900
- "text": "string"
7890
+ "text": "boolean"
7901
7891
  },
7902
- "privacy": "private",
7903
- "default": "\"\""
7892
+ "default": "false",
7893
+ "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.",
7894
+ "fieldName": "required",
7895
+ "inheritedFrom": {
7896
+ "name": "FormAssociatedMixin",
7897
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7898
+ }
7904
7899
  },
7905
7900
  {
7906
- "kind": "method",
7907
- "name": "handleNameChange",
7908
- "privacy": "protected"
7909
- }
7910
- ],
7911
- "attributes": [
7901
+ "name": "hide-required",
7902
+ "type": {
7903
+ "text": "boolean"
7904
+ },
7905
+ "default": "false",
7906
+ "description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
7907
+ "fieldName": "hideRequired",
7908
+ "inheritedFrom": {
7909
+ "name": "FormAssociatedMixin",
7910
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7911
+ }
7912
+ },
7912
7913
  {
7913
- "name": "name",
7914
+ "name": "autocomplete",
7914
7915
  "type": {
7915
- "text": "string"
7916
+ "text": "AutocompleteAttribute"
7916
7917
  },
7917
- "default": "\"\"",
7918
- "description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
7919
- "fieldName": "name"
7918
+ "default": "\"off\"",
7919
+ "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.",
7920
+ "fieldName": "autocomplete",
7921
+ "inheritedFrom": {
7922
+ "name": "AutocompleteMixin",
7923
+ "module": "src/common/mixins/AutocompleteMixin.ts"
7924
+ }
7920
7925
  },
7921
7926
  {
7922
- "name": "size",
7927
+ "name": "readonly",
7923
7928
  "type": {
7924
- "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
7929
+ "text": "boolean"
7925
7930
  },
7926
- "description": "The size of the icon.",
7927
- "fieldName": "size"
7931
+ "default": "false",
7932
+ "description": "Makes the component readonly, so that it is not editable.\nReadonly differs from disabled in that readonly fields are still focusable and will be submitted with a form.",
7933
+ "fieldName": "readonly",
7934
+ "inheritedFrom": {
7935
+ "name": "ReadonlyMixin",
7936
+ "module": "src/common/mixins/ReadonlyMixin.ts"
7937
+ }
7928
7938
  },
7929
7939
  {
7930
- "name": "color",
7940
+ "name": "disabled",
7931
7941
  "type": {
7932
- "text": "string | undefined"
7942
+ "text": "boolean"
7933
7943
  },
7934
- "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
7935
- "fieldName": "color"
7944
+ "default": "false",
7945
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
7946
+ "fieldName": "disabled",
7947
+ "inheritedFrom": {
7948
+ "name": "InputMixin",
7949
+ "module": "src/common/mixins/InputMixin.ts"
7950
+ }
7936
7951
  },
7937
7952
  {
7938
- "name": "label",
7953
+ "name": "name",
7939
7954
  "type": {
7940
7955
  "text": "string | undefined"
7941
7956
  },
7942
- "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
7943
- "fieldName": "label"
7957
+ "description": "The name of the form component.",
7958
+ "fieldName": "name",
7959
+ "inheritedFrom": {
7960
+ "name": "InputMixin",
7961
+ "module": "src/common/mixins/InputMixin.ts"
7962
+ }
7963
+ },
7964
+ {
7965
+ "name": "value",
7966
+ "type": {
7967
+ "text": "string"
7968
+ },
7969
+ "default": "\"\"",
7970
+ "description": "The value of the form component.",
7971
+ "fieldName": "value",
7972
+ "inheritedFrom": {
7973
+ "name": "InputMixin",
7974
+ "module": "src/common/mixins/InputMixin.ts"
7975
+ }
7976
+ },
7977
+ {
7978
+ "name": "form",
7979
+ "type": {
7980
+ "text": "HTMLFormElement | null"
7981
+ },
7982
+ "description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
7983
+ "fieldName": "form",
7984
+ "inheritedFrom": {
7985
+ "name": "InputMixin",
7986
+ "module": "src/common/mixins/InputMixin.ts"
7987
+ }
7988
+ }
7989
+ ],
7990
+ "mixins": [
7991
+ {
7992
+ "name": "SizeMixin",
7993
+ "module": "/src/common/mixins/SizeMixin.js"
7994
+ },
7995
+ {
7996
+ "name": "FormAssociatedMixin",
7997
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
7998
+ },
7999
+ {
8000
+ "name": "AutocompleteMixin",
8001
+ "module": "/src/common/mixins/AutocompleteMixin.js"
8002
+ },
8003
+ {
8004
+ "name": "ReadonlyMixin",
8005
+ "module": "/src/common/mixins/ReadonlyMixin.js"
8006
+ },
8007
+ {
8008
+ "name": "InputMixin",
8009
+ "module": "/src/common/mixins/InputMixin.js"
8010
+ },
8011
+ {
8012
+ "name": "FocusableMixin",
8013
+ "module": "/src/common/mixins/FocusableMixin.js"
7944
8014
  }
7945
8015
  ],
7946
8016
  "superclass": {
@@ -7949,95 +8019,36 @@
7949
8019
  },
7950
8020
  "localization": [],
7951
8021
  "status": "ready",
7952
- "category": "image",
7953
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n",
8022
+ "category": "form",
8023
+ "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 provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input 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\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n\n## Icon usage in input\n\nEach [input size](/components/input/?example=size) has a recommended icon size. The medium input uses the `s` icon size, the small input uses the `xs` icon size, and the large input uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n",
7954
8024
  "examples": [],
7955
- "dependencies": [],
7956
- "tagName": "nord-icon",
7957
- "customElement": true
7958
- }
7959
- ],
7960
- "exports": [
7961
- {
7962
- "kind": "js",
7963
- "name": "default",
7964
- "declaration": {
7965
- "name": "Icon",
7966
- "module": "src/icon/Icon.ts"
7967
- }
7968
- },
7969
- {
7970
- "kind": "custom-element-definition",
7971
- "name": "nord-icon",
7972
- "declaration": {
7973
- "name": "Icon",
7974
- "module": "src/icon/Icon.ts"
7975
- }
7976
- }
7977
- ]
7978
- },
7979
- {
7980
- "kind": "javascript-module",
7981
- "path": "src/icon/IconManager.ts",
7982
- "declarations": [
7983
- {
7984
- "kind": "class",
7985
- "description": "",
7986
- "name": "IconManager",
7987
- "members": [
7988
- {
7989
- "kind": "field",
7990
- "name": "cache",
7991
- "privacy": "private",
7992
- "default": "new Map<string, string | Promise<string>>()"
7993
- },
8025
+ "dependencies": [
8026
+ "icon"
8027
+ ],
8028
+ "tagName": "nord-input",
8029
+ "customElement": true,
8030
+ "events": [
7994
8031
  {
7995
- "kind": "field",
7996
- "name": "resolver",
8032
+ "name": "input",
7997
8033
  "type": {
7998
- "text": "IconResolver"
8034
+ "text": "NordEvent"
8035
+ },
8036
+ "description": "Fired as the user types into the input.",
8037
+ "inheritedFrom": {
8038
+ "name": "FormAssociatedMixin",
8039
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
7999
8040
  }
8000
8041
  },
8001
8042
  {
8002
- "kind": "method",
8003
- "name": "resolve",
8004
- "parameters": [
8005
- {
8006
- "name": "name",
8007
- "type": {
8008
- "text": "string"
8009
- }
8010
- },
8011
- {
8012
- "name": "onResolved",
8013
- "type": {
8014
- "text": "(svg: string) => void"
8015
- }
8016
- }
8017
- ]
8018
- },
8019
- {
8020
- "kind": "method",
8021
- "name": "registerIcon",
8022
- "parameters": [
8023
- {
8024
- "name": "iconOrName",
8025
- "type": {
8026
- "text": "string | { title: string; default: string }"
8027
- }
8028
- },
8029
- {
8030
- "name": "icon",
8031
- "optional": true,
8032
- "type": {
8033
- "text": "string"
8034
- }
8035
- }
8036
- ]
8037
- },
8038
- {
8039
- "kind": "method",
8040
- "name": "clear"
8043
+ "name": "change",
8044
+ "type": {
8045
+ "text": "NordEvent"
8046
+ },
8047
+ "description": "Fired whenever the input's value is changed via user interaction.",
8048
+ "inheritedFrom": {
8049
+ "name": "FormAssociatedMixin",
8050
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
8051
+ }
8041
8052
  }
8042
8053
  ]
8043
8054
  }
@@ -8045,10 +8056,18 @@
8045
8056
  "exports": [
8046
8057
  {
8047
8058
  "kind": "js",
8048
- "name": "IconManager",
8059
+ "name": "default",
8049
8060
  "declaration": {
8050
- "name": "IconManager",
8051
- "module": "src/icon/IconManager.ts"
8061
+ "name": "Input",
8062
+ "module": "src/input/Input.ts"
8063
+ }
8064
+ },
8065
+ {
8066
+ "kind": "custom-element-definition",
8067
+ "name": "nord-input",
8068
+ "declaration": {
8069
+ "name": "Input",
8070
+ "module": "src/input/Input.ts"
8052
8071
  }
8053
8072
  }
8054
8073
  ]
@@ -9897,188 +9916,21 @@
9897
9916
  "name": "handleActivate",
9898
9917
  "privacy": "private"
9899
9918
  }
9900
- ],
9901
- "superclass": {
9902
- "name": "LitElement",
9903
- "package": "lit"
9904
- },
9905
- "localization": [],
9906
- "status": "ready",
9907
- "category": "navigation",
9908
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
9909
- "examples": [],
9910
- "dependencies": [
9911
- "nav-item"
9912
- ],
9913
- "tagName": "nord-navigation",
9914
- "customElement": true
9915
- }
9916
- ],
9917
- "exports": [
9918
- {
9919
- "kind": "js",
9920
- "name": "default",
9921
- "declaration": {
9922
- "name": "Navigation",
9923
- "module": "src/navigation/Navigation.ts"
9924
- }
9925
- },
9926
- {
9927
- "kind": "custom-element-definition",
9928
- "name": "nord-navigation",
9929
- "declaration": {
9930
- "name": "Navigation",
9931
- "module": "src/navigation/Navigation.ts"
9932
- }
9933
- }
9934
- ]
9935
- },
9936
- {
9937
- "kind": "javascript-module",
9938
- "path": "src/notification/Notification.ts",
9939
- "declarations": [
9940
- {
9941
- "kind": "class",
9942
- "description": "Notifications provide important information that requires action or acknowledgement.\nA notification is displayed until the user dismisses it.",
9943
- "name": "Notification",
9944
- "slots": [
9945
- {
9946
- "description": "Default slot used for the notification text/message.",
9947
- "name": ""
9948
- },
9949
- {
9950
- "description": "Slot used for the notification icon.",
9951
- "name": "icon"
9952
- }
9953
- ],
9954
- "members": [
9955
- {
9956
- "kind": "field",
9957
- "name": "localize",
9958
- "privacy": "private",
9959
- "default": "new LocalizeController<\"nord-notification\">(this)"
9960
- },
9961
- {
9962
- "kind": "field",
9963
- "name": "notificationRef",
9964
- "privacy": "protected",
9965
- "inheritedFrom": {
9966
- "name": "NotificationMixin",
9967
- "module": "src/common/mixins/NotificationMixin.ts"
9968
- }
9969
- },
9970
- {
9971
- "kind": "field",
9972
- "name": "dismissed",
9973
- "type": {
9974
- "text": "boolean"
9975
- },
9976
- "privacy": "protected",
9977
- "default": "false",
9978
- "inheritedFrom": {
9979
- "name": "NotificationMixin",
9980
- "module": "src/common/mixins/NotificationMixin.ts"
9981
- }
9982
- },
9983
- {
9984
- "kind": "method",
9985
- "name": "dismiss",
9986
- "description": "Programmatically dismiss the notification.\nThe returned promise resolves when notification's exit animation is complete.",
9987
- "inheritedFrom": {
9988
- "name": "NotificationMixin",
9989
- "module": "src/common/mixins/NotificationMixin.ts"
9990
- }
9991
- },
9992
- {
9993
- "kind": "field",
9994
- "name": "_warningLogged",
9995
- "type": {
9996
- "text": "boolean"
9997
- },
9998
- "privacy": "private",
9999
- "static": true,
10000
- "default": "false",
10001
- "inheritedFrom": {
10002
- "name": "DraftComponentMixin",
10003
- "module": "src/common/mixins/DraftComponentMixin.ts"
10004
- }
10005
- }
10006
- ],
10007
- "events": [
10008
- {
10009
- "name": "dismiss",
10010
- "type": {
10011
- "text": "NordEvent"
10012
- },
10013
- "description": "Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
10014
- "inheritedFrom": {
10015
- "name": "NotificationMixin",
10016
- "module": "src/common/mixins/NotificationMixin.ts"
10017
- }
10018
- }
10019
- ],
10020
- "mixins": [
10021
- {
10022
- "name": "NotificationMixin",
10023
- "module": "/src/common/mixins/NotificationMixin.js"
10024
- },
10025
- {
10026
- "name": "DraftComponentMixin",
10027
- "module": "/src/common/mixins/DraftComponentMixin.js"
10028
- }
10029
- ],
10030
- "superclass": {
10031
- "name": "LitElement",
10032
- "package": "lit"
10033
- },
10034
- "localization": [
10035
- {
10036
- "name": "dismissLabel",
10037
- "description": "Accessible label for the dismiss button."
10038
- }
10039
- ],
10040
- "status": "draft",
10041
- "category": "feedback",
10042
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for short messages that describe the purpose of the notification.\n- Use for important updates that require user action/attention.\n- Provide a single call to action within the notification.\n- Use in combination with [Notification group](../notification-group/) so that notifications get styled and positioned correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for transient or unimportant messages. Consider using a [Toast](/components/toast) instead.\n- Don't remove a notification until a user has explicitly dismissed, or acted on the notification.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nNotification content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the notification content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAction link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing action link labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Start Consultation</div>\n\nAvoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
10043
- "examples": [],
10044
- "dependencies": [
10045
- "stack",
10046
- "icon"
10047
- ],
10048
- "tagName": "nord-notification",
10049
- "customElement": true
10050
- }
10051
- ],
10052
- "exports": [
10053
- {
10054
- "kind": "js",
10055
- "name": "default",
10056
- "declaration": {
10057
- "name": "Notification",
10058
- "module": "src/notification/Notification.ts"
10059
- }
10060
- },
10061
- {
10062
- "kind": "custom-element-definition",
10063
- "name": "nord-notification",
10064
- "declaration": {
10065
- "name": "Notification",
10066
- "module": "src/notification/Notification.ts"
10067
- }
10068
- }
10069
- ]
10070
- },
10071
- {
10072
- "kind": "javascript-module",
10073
- "path": "src/notification/localization.ts",
10074
- "declarations": [
10075
- {
10076
- "kind": "variable",
10077
- "name": "localization",
10078
- "type": {
10079
- "text": "object"
9919
+ ],
9920
+ "superclass": {
9921
+ "name": "LitElement",
9922
+ "package": "lit"
10080
9923
  },
10081
- "default": "{\n dismissLabel: \"Dismiss notification\",\n}"
9924
+ "localization": [],
9925
+ "status": "ready",
9926
+ "category": "navigation",
9927
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
9928
+ "examples": [],
9929
+ "dependencies": [
9930
+ "nav-item"
9931
+ ],
9932
+ "tagName": "nord-navigation",
9933
+ "customElement": true
10082
9934
  }
10083
9935
  ],
10084
9936
  "exports": [
@@ -10086,8 +9938,16 @@
10086
9938
  "kind": "js",
10087
9939
  "name": "default",
10088
9940
  "declaration": {
10089
- "name": "localization",
10090
- "module": "src/notification/localization.ts"
9941
+ "name": "Navigation",
9942
+ "module": "src/navigation/Navigation.ts"
9943
+ }
9944
+ },
9945
+ {
9946
+ "kind": "custom-element-definition",
9947
+ "name": "nord-navigation",
9948
+ "declaration": {
9949
+ "name": "Navigation",
9950
+ "module": "src/navigation/Navigation.ts"
10091
9951
  }
10092
9952
  }
10093
9953
  ]
@@ -15105,6 +14965,165 @@
15105
14965
  }
15106
14966
  ]
15107
14967
  },
14968
+ {
14969
+ "kind": "javascript-module",
14970
+ "path": "src/notification/Notification.ts",
14971
+ "declarations": [
14972
+ {
14973
+ "kind": "class",
14974
+ "description": "Notifications provide important information that requires action or acknowledgement.\nA notification is displayed until the user dismisses it.",
14975
+ "name": "Notification",
14976
+ "slots": [
14977
+ {
14978
+ "description": "Default slot used for the notification text/message.",
14979
+ "name": ""
14980
+ },
14981
+ {
14982
+ "description": "Slot used for the notification icon.",
14983
+ "name": "icon"
14984
+ }
14985
+ ],
14986
+ "members": [
14987
+ {
14988
+ "kind": "field",
14989
+ "name": "localize",
14990
+ "privacy": "private",
14991
+ "default": "new LocalizeController<\"nord-notification\">(this)"
14992
+ },
14993
+ {
14994
+ "kind": "field",
14995
+ "name": "notificationRef",
14996
+ "privacy": "protected",
14997
+ "inheritedFrom": {
14998
+ "name": "NotificationMixin",
14999
+ "module": "src/common/mixins/NotificationMixin.ts"
15000
+ }
15001
+ },
15002
+ {
15003
+ "kind": "field",
15004
+ "name": "dismissed",
15005
+ "type": {
15006
+ "text": "boolean"
15007
+ },
15008
+ "privacy": "protected",
15009
+ "default": "false",
15010
+ "inheritedFrom": {
15011
+ "name": "NotificationMixin",
15012
+ "module": "src/common/mixins/NotificationMixin.ts"
15013
+ }
15014
+ },
15015
+ {
15016
+ "kind": "method",
15017
+ "name": "dismiss",
15018
+ "description": "Programmatically dismiss the notification.\nThe returned promise resolves when notification's exit animation is complete.",
15019
+ "inheritedFrom": {
15020
+ "name": "NotificationMixin",
15021
+ "module": "src/common/mixins/NotificationMixin.ts"
15022
+ }
15023
+ },
15024
+ {
15025
+ "kind": "field",
15026
+ "name": "_warningLogged",
15027
+ "type": {
15028
+ "text": "boolean"
15029
+ },
15030
+ "privacy": "private",
15031
+ "static": true,
15032
+ "default": "false",
15033
+ "inheritedFrom": {
15034
+ "name": "DraftComponentMixin",
15035
+ "module": "src/common/mixins/DraftComponentMixin.ts"
15036
+ }
15037
+ }
15038
+ ],
15039
+ "events": [
15040
+ {
15041
+ "name": "dismiss",
15042
+ "type": {
15043
+ "text": "NordEvent"
15044
+ },
15045
+ "description": "Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
15046
+ "inheritedFrom": {
15047
+ "name": "NotificationMixin",
15048
+ "module": "src/common/mixins/NotificationMixin.ts"
15049
+ }
15050
+ }
15051
+ ],
15052
+ "mixins": [
15053
+ {
15054
+ "name": "NotificationMixin",
15055
+ "module": "/src/common/mixins/NotificationMixin.js"
15056
+ },
15057
+ {
15058
+ "name": "DraftComponentMixin",
15059
+ "module": "/src/common/mixins/DraftComponentMixin.js"
15060
+ }
15061
+ ],
15062
+ "superclass": {
15063
+ "name": "LitElement",
15064
+ "package": "lit"
15065
+ },
15066
+ "localization": [
15067
+ {
15068
+ "name": "dismissLabel",
15069
+ "description": "Accessible label for the dismiss button."
15070
+ }
15071
+ ],
15072
+ "status": "draft",
15073
+ "category": "feedback",
15074
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for short messages that describe the purpose of the notification.\n- Use for important updates that require user action/attention.\n- Provide a single call to action within the notification.\n- Use in combination with [Notification group](../notification-group/) so that notifications get styled and positioned correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for transient or unimportant messages. Consider using a [Toast](/components/toast) instead.\n- Don't remove a notification until a user has explicitly dismissed, or acted on the notification.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nNotification content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the notification content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAction link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing action link labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Start Consultation</div>\n\nAvoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
15075
+ "examples": [],
15076
+ "dependencies": [
15077
+ "stack",
15078
+ "icon"
15079
+ ],
15080
+ "tagName": "nord-notification",
15081
+ "customElement": true
15082
+ }
15083
+ ],
15084
+ "exports": [
15085
+ {
15086
+ "kind": "js",
15087
+ "name": "default",
15088
+ "declaration": {
15089
+ "name": "Notification",
15090
+ "module": "src/notification/Notification.ts"
15091
+ }
15092
+ },
15093
+ {
15094
+ "kind": "custom-element-definition",
15095
+ "name": "nord-notification",
15096
+ "declaration": {
15097
+ "name": "Notification",
15098
+ "module": "src/notification/Notification.ts"
15099
+ }
15100
+ }
15101
+ ]
15102
+ },
15103
+ {
15104
+ "kind": "javascript-module",
15105
+ "path": "src/notification/localization.ts",
15106
+ "declarations": [
15107
+ {
15108
+ "kind": "variable",
15109
+ "name": "localization",
15110
+ "type": {
15111
+ "text": "object"
15112
+ },
15113
+ "default": "{\n dismissLabel: \"Dismiss notification\",\n}"
15114
+ }
15115
+ ],
15116
+ "exports": [
15117
+ {
15118
+ "kind": "js",
15119
+ "name": "default",
15120
+ "declaration": {
15121
+ "name": "localization",
15122
+ "module": "src/notification/localization.ts"
15123
+ }
15124
+ }
15125
+ ]
15126
+ },
15108
15127
  {
15109
15128
  "kind": "javascript-module",
15110
15129
  "path": "src/toast-group/ToastGroup.ts",
@@ -17476,6 +17495,41 @@
17476
17495
  }
17477
17496
  ]
17478
17497
  },
17498
+ {
17499
+ "kind": "javascript-module",
17500
+ "path": "src/common/decorators/observe.ts",
17501
+ "declarations": [
17502
+ {
17503
+ "kind": "function",
17504
+ "name": "observe",
17505
+ "parameters": [
17506
+ {
17507
+ "name": "propertyName",
17508
+ "type": {
17509
+ "text": "string"
17510
+ }
17511
+ },
17512
+ {
17513
+ "name": "lifecycle",
17514
+ "default": "\"update\"",
17515
+ "type": {
17516
+ "text": "ObserveLifecycle"
17517
+ }
17518
+ }
17519
+ ]
17520
+ }
17521
+ ],
17522
+ "exports": [
17523
+ {
17524
+ "kind": "js",
17525
+ "name": "observe",
17526
+ "declaration": {
17527
+ "name": "observe",
17528
+ "module": "src/common/decorators/observe.ts"
17529
+ }
17530
+ }
17531
+ ]
17532
+ },
17479
17533
  {
17480
17534
  "kind": "javascript-module",
17481
17535
  "path": "src/common/directives/cond.ts",
@@ -17910,41 +17964,6 @@
17910
17964
  }
17911
17965
  ]
17912
17966
  },
17913
- {
17914
- "kind": "javascript-module",
17915
- "path": "src/common/decorators/observe.ts",
17916
- "declarations": [
17917
- {
17918
- "kind": "function",
17919
- "name": "observe",
17920
- "parameters": [
17921
- {
17922
- "name": "propertyName",
17923
- "type": {
17924
- "text": "string"
17925
- }
17926
- },
17927
- {
17928
- "name": "lifecycle",
17929
- "default": "\"update\"",
17930
- "type": {
17931
- "text": "ObserveLifecycle"
17932
- }
17933
- }
17934
- ]
17935
- }
17936
- ],
17937
- "exports": [
17938
- {
17939
- "kind": "js",
17940
- "name": "observe",
17941
- "declaration": {
17942
- "name": "observe",
17943
- "module": "src/common/decorators/observe.ts"
17944
- }
17945
- }
17946
- ]
17947
- },
17948
17967
  {
17949
17968
  "kind": "javascript-module",
17950
17969
  "path": "src/common/mixins/AutocompleteMixin.ts",