@nordhealth/components 4.0.0-alpha.2 → 4.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/custom-elements.json +1111 -1111
- package/lib/IconManager.js +1 -1
- package/lib/IconManager.js.map +1 -1
- package/lib/Qrcode.js +3 -3
- package/lib/Qrcode.js.map +1 -1
- package/lib/bundle.js +19 -19
- package/lib/bundle.js.map +1 -1
- package/lib/react.d.ts +420 -0
- package/lib/vue.d.ts +420 -0
- package/package.json +19 -17
package/custom-elements.json
CHANGED
|
@@ -875,161 +875,6 @@
|
|
|
875
875
|
}
|
|
876
876
|
]
|
|
877
877
|
},
|
|
878
|
-
{
|
|
879
|
-
"kind": "javascript-module",
|
|
880
|
-
"path": "src/button-group/ButtonGroup.ts",
|
|
881
|
-
"declarations": [
|
|
882
|
-
{
|
|
883
|
-
"kind": "class",
|
|
884
|
-
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
885
|
-
"name": "ButtonGroup",
|
|
886
|
-
"cssProperties": [
|
|
887
|
-
{
|
|
888
|
-
"description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
|
|
889
|
-
"name": "--n-button-group-border-radius",
|
|
890
|
-
"default": "var(--n-border-radius-s)"
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
|
|
894
|
-
"name": "--n-button-group-box-shadow",
|
|
895
|
-
"default": "var(--n-box-shadow)"
|
|
896
|
-
}
|
|
897
|
-
],
|
|
898
|
-
"slots": [
|
|
899
|
-
{
|
|
900
|
-
"description": "The button group content",
|
|
901
|
-
"name": ""
|
|
902
|
-
}
|
|
903
|
-
],
|
|
904
|
-
"members": [
|
|
905
|
-
{
|
|
906
|
-
"kind": "field",
|
|
907
|
-
"name": "defaultSlot",
|
|
908
|
-
"privacy": "private",
|
|
909
|
-
"default": "new SlotController(this)"
|
|
910
|
-
},
|
|
911
|
-
{
|
|
912
|
-
"kind": "field",
|
|
913
|
-
"name": "dirController",
|
|
914
|
-
"privacy": "private",
|
|
915
|
-
"default": "new DirectionController(this)"
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
"kind": "field",
|
|
919
|
-
"name": "variant",
|
|
920
|
-
"type": {
|
|
921
|
-
"text": "\"default\" | \"spaced\""
|
|
922
|
-
},
|
|
923
|
-
"default": "\"default\"",
|
|
924
|
-
"description": "The style variant of the button group.",
|
|
925
|
-
"attribute": "variant",
|
|
926
|
-
"reflects": true
|
|
927
|
-
},
|
|
928
|
-
{
|
|
929
|
-
"kind": "field",
|
|
930
|
-
"name": "direction",
|
|
931
|
-
"type": {
|
|
932
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
933
|
-
},
|
|
934
|
-
"default": "\"horizontal\"",
|
|
935
|
-
"description": "The direction of the button group.",
|
|
936
|
-
"attribute": "direction",
|
|
937
|
-
"reflects": true
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
"kind": "field",
|
|
941
|
-
"name": "wrap",
|
|
942
|
-
"type": {
|
|
943
|
-
"text": "boolean"
|
|
944
|
-
},
|
|
945
|
-
"default": "false",
|
|
946
|
-
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
947
|
-
"attribute": "wrap",
|
|
948
|
-
"reflects": true
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
"kind": "field",
|
|
952
|
-
"name": "role",
|
|
953
|
-
"type": {
|
|
954
|
-
"text": "string"
|
|
955
|
-
},
|
|
956
|
-
"default": "\"group\"",
|
|
957
|
-
"description": "The appropriate role for the containing element.",
|
|
958
|
-
"attribute": "role",
|
|
959
|
-
"reflects": true
|
|
960
|
-
}
|
|
961
|
-
],
|
|
962
|
-
"attributes": [
|
|
963
|
-
{
|
|
964
|
-
"name": "variant",
|
|
965
|
-
"type": {
|
|
966
|
-
"text": "\"default\" | \"spaced\""
|
|
967
|
-
},
|
|
968
|
-
"default": "\"default\"",
|
|
969
|
-
"description": "The style variant of the button group.",
|
|
970
|
-
"fieldName": "variant"
|
|
971
|
-
},
|
|
972
|
-
{
|
|
973
|
-
"name": "direction",
|
|
974
|
-
"type": {
|
|
975
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
976
|
-
},
|
|
977
|
-
"default": "\"horizontal\"",
|
|
978
|
-
"description": "The direction of the button group.",
|
|
979
|
-
"fieldName": "direction"
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
"name": "wrap",
|
|
983
|
-
"type": {
|
|
984
|
-
"text": "boolean"
|
|
985
|
-
},
|
|
986
|
-
"default": "false",
|
|
987
|
-
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
988
|
-
"fieldName": "wrap"
|
|
989
|
-
},
|
|
990
|
-
{
|
|
991
|
-
"name": "role",
|
|
992
|
-
"type": {
|
|
993
|
-
"text": "string"
|
|
994
|
-
},
|
|
995
|
-
"default": "\"group\"",
|
|
996
|
-
"description": "The appropriate role for the containing element.",
|
|
997
|
-
"fieldName": "role"
|
|
998
|
-
}
|
|
999
|
-
],
|
|
1000
|
-
"superclass": {
|
|
1001
|
-
"name": "LitElement",
|
|
1002
|
-
"package": "lit"
|
|
1003
|
-
},
|
|
1004
|
-
"localization": [],
|
|
1005
|
-
"status": "ready",
|
|
1006
|
-
"category": "structure",
|
|
1007
|
-
"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\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| --------- | -------------------------------------------------------------------------------------------------------- |\n| `default` | The default variant renders a group of segmented buttons to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the buttons to space them out evenly. |\n",
|
|
1008
|
-
"examples": [],
|
|
1009
|
-
"dependencies": [],
|
|
1010
|
-
"tagName": "nord-button-group",
|
|
1011
|
-
"customElement": true
|
|
1012
|
-
}
|
|
1013
|
-
],
|
|
1014
|
-
"exports": [
|
|
1015
|
-
{
|
|
1016
|
-
"kind": "js",
|
|
1017
|
-
"name": "default",
|
|
1018
|
-
"declaration": {
|
|
1019
|
-
"name": "ButtonGroup",
|
|
1020
|
-
"module": "src/button-group/ButtonGroup.ts"
|
|
1021
|
-
}
|
|
1022
|
-
},
|
|
1023
|
-
{
|
|
1024
|
-
"kind": "custom-element-definition",
|
|
1025
|
-
"name": "nord-button-group",
|
|
1026
|
-
"declaration": {
|
|
1027
|
-
"name": "ButtonGroup",
|
|
1028
|
-
"module": "src/button-group/ButtonGroup.ts"
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
]
|
|
1032
|
-
},
|
|
1033
878
|
{
|
|
1034
879
|
"kind": "javascript-module",
|
|
1035
880
|
"path": "src/button/Button.ts",
|
|
@@ -1613,7 +1458,7 @@
|
|
|
1613
1458
|
"localization": [],
|
|
1614
1459
|
"status": "ready",
|
|
1615
1460
|
"category": "action",
|
|
1616
|
-
"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- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\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\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Icon usage in button\n\nIllustrative icons should be always positioned in the `start` slot:\n\n<img src=\"/img/components/button/start-slot.png\" class=\"n-border n-border-radius\"
|
|
1461
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\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\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Icon usage in button\n\nIllustrative icons should be always positioned in the `start` slot:\n\n<img src=\"/img/components/button/start-slot.png\" class=\"n-border n-border-radius n-brand-therapy\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button with icon in start slot\" />\n<img src=\"/img/components/button/start-slot-vet.png\" class=\"n-border n-border-radius n-brand-veterinary\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button with icon in start slot\" />\n\nWhen a button is used as a dropdown toggle, the `interface-dropdown-small` icon from [Nordicons](/nordicons/) is automatically placed in the `end` slot:\n\n<img src=\"/img/components/button/dropdown.png\" class=\"n-border n-border-radius\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Dropdown button\" />\n\nEach button size has a recommended icon size. The medium button uses the `s` icon size, the [small button](/components/button/?example=small+buttons) uses the `xs` icon size, and the [large button](/components/button/?example=large+buttons) 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\n<img src=\"/img/components/button/icon-sizes.png\" class=\"n-border n-border-radius n-brand-therapy\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button icon sizes\" />\n<img src=\"/img/components/button/icon-sizes-vet.png\" class=\"n-border n-border-radius n-brand-veterinary\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button icon sizes\" />\n\nUse `interface-add-small` icon in the `start` slot for create/add type primary actions in the [header](/components/header/):\n\n<img src=\"/img/components/button/create.png\" class=\"n-border n-border-radius n-brand-therapy\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Create/add type primary action with icon\" />\n<img src=\"/img/components/button/create-vet.png\" class=\"n-border n-border-radius n-brand-veterinary\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Create/add type primary action with icon\" />\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n",
|
|
1617
1462
|
"examples": [],
|
|
1618
1463
|
"dependencies": [
|
|
1619
1464
|
"spinner"
|
|
@@ -1643,99 +1488,377 @@
|
|
|
1643
1488
|
},
|
|
1644
1489
|
{
|
|
1645
1490
|
"kind": "javascript-module",
|
|
1646
|
-
"path": "src/
|
|
1491
|
+
"path": "src/button-group/ButtonGroup.ts",
|
|
1647
1492
|
"declarations": [
|
|
1648
1493
|
{
|
|
1649
1494
|
"kind": "class",
|
|
1650
|
-
"description": "
|
|
1651
|
-
"name": "
|
|
1495
|
+
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
1496
|
+
"name": "ButtonGroup",
|
|
1652
1497
|
"cssProperties": [
|
|
1653
1498
|
{
|
|
1654
|
-
"description": "Controls the
|
|
1655
|
-
"name": "--n-
|
|
1656
|
-
"default": "var(--n-
|
|
1499
|
+
"description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
|
|
1500
|
+
"name": "--n-button-group-border-radius",
|
|
1501
|
+
"default": "var(--n-border-radius-s)"
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
|
|
1505
|
+
"name": "--n-button-group-box-shadow",
|
|
1506
|
+
"default": "var(--n-box-shadow)"
|
|
1657
1507
|
}
|
|
1658
1508
|
],
|
|
1659
1509
|
"slots": [
|
|
1660
1510
|
{
|
|
1661
|
-
"description": "
|
|
1662
|
-
"name": "
|
|
1663
|
-
},
|
|
1664
|
-
{
|
|
1665
|
-
"description": "Optional slot that holds hint text for the input.",
|
|
1666
|
-
"name": "hint"
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
"description": "Optional slot that holds error text for the input.",
|
|
1670
|
-
"name": "error"
|
|
1511
|
+
"description": "The button group content",
|
|
1512
|
+
"name": ""
|
|
1671
1513
|
}
|
|
1672
1514
|
],
|
|
1673
1515
|
"members": [
|
|
1674
1516
|
{
|
|
1675
1517
|
"kind": "field",
|
|
1676
|
-
"name": "
|
|
1677
|
-
"privacy": "
|
|
1678
|
-
"
|
|
1679
|
-
"inheritedFrom": {
|
|
1680
|
-
"name": "FormAssociatedMixin",
|
|
1681
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1682
|
-
}
|
|
1518
|
+
"name": "defaultSlot",
|
|
1519
|
+
"privacy": "private",
|
|
1520
|
+
"default": "new SlotController(this)"
|
|
1683
1521
|
},
|
|
1684
1522
|
{
|
|
1685
1523
|
"kind": "field",
|
|
1686
|
-
"name": "
|
|
1524
|
+
"name": "dirController",
|
|
1525
|
+
"privacy": "private",
|
|
1526
|
+
"default": "new DirectionController(this)"
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
"kind": "field",
|
|
1530
|
+
"name": "variant",
|
|
1687
1531
|
"type": {
|
|
1688
|
-
"text": "
|
|
1532
|
+
"text": "\"default\" | \"spaced\""
|
|
1689
1533
|
},
|
|
1690
|
-
"default": "
|
|
1691
|
-
"description": "
|
|
1692
|
-
"attribute": "
|
|
1534
|
+
"default": "\"default\"",
|
|
1535
|
+
"description": "The style variant of the button group.",
|
|
1536
|
+
"attribute": "variant",
|
|
1693
1537
|
"reflects": true
|
|
1694
1538
|
},
|
|
1695
1539
|
{
|
|
1696
1540
|
"kind": "field",
|
|
1697
|
-
"name": "
|
|
1541
|
+
"name": "direction",
|
|
1698
1542
|
"type": {
|
|
1699
|
-
"text": "
|
|
1543
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
1700
1544
|
},
|
|
1701
|
-
"default": "
|
|
1702
|
-
"description": "
|
|
1703
|
-
"attribute": "
|
|
1545
|
+
"default": "\"horizontal\"",
|
|
1546
|
+
"description": "The direction of the button group.",
|
|
1547
|
+
"attribute": "direction",
|
|
1704
1548
|
"reflects": true
|
|
1705
1549
|
},
|
|
1706
1550
|
{
|
|
1707
|
-
"kind": "
|
|
1708
|
-
"name": "
|
|
1709
|
-
"
|
|
1710
|
-
|
|
1711
|
-
{
|
|
1712
|
-
"name": "e",
|
|
1713
|
-
"type": {
|
|
1714
|
-
"text": "Event"
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
],
|
|
1718
|
-
"return": {
|
|
1719
|
-
"type": {
|
|
1720
|
-
"text": "void"
|
|
1721
|
-
}
|
|
1551
|
+
"kind": "field",
|
|
1552
|
+
"name": "wrap",
|
|
1553
|
+
"type": {
|
|
1554
|
+
"text": "boolean"
|
|
1722
1555
|
},
|
|
1723
|
-
"
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1556
|
+
"default": "false",
|
|
1557
|
+
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
1558
|
+
"attribute": "wrap",
|
|
1559
|
+
"reflects": true
|
|
1727
1560
|
},
|
|
1728
1561
|
{
|
|
1729
1562
|
"kind": "field",
|
|
1730
|
-
"name": "
|
|
1563
|
+
"name": "role",
|
|
1731
1564
|
"type": {
|
|
1732
|
-
"text": "
|
|
1565
|
+
"text": "string"
|
|
1733
1566
|
},
|
|
1734
|
-
"default": "\"
|
|
1735
|
-
"description": "The
|
|
1736
|
-
"attribute": "
|
|
1737
|
-
"reflects": true
|
|
1738
|
-
|
|
1567
|
+
"default": "\"group\"",
|
|
1568
|
+
"description": "The appropriate role for the containing element.",
|
|
1569
|
+
"attribute": "role",
|
|
1570
|
+
"reflects": true
|
|
1571
|
+
}
|
|
1572
|
+
],
|
|
1573
|
+
"attributes": [
|
|
1574
|
+
{
|
|
1575
|
+
"name": "variant",
|
|
1576
|
+
"type": {
|
|
1577
|
+
"text": "\"default\" | \"spaced\""
|
|
1578
|
+
},
|
|
1579
|
+
"default": "\"default\"",
|
|
1580
|
+
"description": "The style variant of the button group.",
|
|
1581
|
+
"fieldName": "variant"
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
"name": "direction",
|
|
1585
|
+
"type": {
|
|
1586
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
1587
|
+
},
|
|
1588
|
+
"default": "\"horizontal\"",
|
|
1589
|
+
"description": "The direction of the button group.",
|
|
1590
|
+
"fieldName": "direction"
|
|
1591
|
+
},
|
|
1592
|
+
{
|
|
1593
|
+
"name": "wrap",
|
|
1594
|
+
"type": {
|
|
1595
|
+
"text": "boolean"
|
|
1596
|
+
},
|
|
1597
|
+
"default": "false",
|
|
1598
|
+
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
1599
|
+
"fieldName": "wrap"
|
|
1600
|
+
},
|
|
1601
|
+
{
|
|
1602
|
+
"name": "role",
|
|
1603
|
+
"type": {
|
|
1604
|
+
"text": "string"
|
|
1605
|
+
},
|
|
1606
|
+
"default": "\"group\"",
|
|
1607
|
+
"description": "The appropriate role for the containing element.",
|
|
1608
|
+
"fieldName": "role"
|
|
1609
|
+
}
|
|
1610
|
+
],
|
|
1611
|
+
"superclass": {
|
|
1612
|
+
"name": "LitElement",
|
|
1613
|
+
"package": "lit"
|
|
1614
|
+
},
|
|
1615
|
+
"localization": [],
|
|
1616
|
+
"status": "ready",
|
|
1617
|
+
"category": "structure",
|
|
1618
|
+
"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\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| --------- | -------------------------------------------------------------------------------------------------------- |\n| `default` | The default variant renders a group of segmented buttons to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the buttons to space them out evenly. |\n",
|
|
1619
|
+
"examples": [],
|
|
1620
|
+
"dependencies": [],
|
|
1621
|
+
"tagName": "nord-button-group",
|
|
1622
|
+
"customElement": true
|
|
1623
|
+
}
|
|
1624
|
+
],
|
|
1625
|
+
"exports": [
|
|
1626
|
+
{
|
|
1627
|
+
"kind": "js",
|
|
1628
|
+
"name": "default",
|
|
1629
|
+
"declaration": {
|
|
1630
|
+
"name": "ButtonGroup",
|
|
1631
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"kind": "custom-element-definition",
|
|
1636
|
+
"name": "nord-button-group",
|
|
1637
|
+
"declaration": {
|
|
1638
|
+
"name": "ButtonGroup",
|
|
1639
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
]
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
"kind": "javascript-module",
|
|
1646
|
+
"path": "src/card/Card.ts",
|
|
1647
|
+
"declarations": [
|
|
1648
|
+
{
|
|
1649
|
+
"kind": "class",
|
|
1650
|
+
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
1651
|
+
"name": "Card",
|
|
1652
|
+
"cssProperties": [
|
|
1653
|
+
{
|
|
1654
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1655
|
+
"name": "--n-card-border-radius",
|
|
1656
|
+
"default": "var(--n-border-radius)"
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1660
|
+
"name": "--n-card-box-shadow",
|
|
1661
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"description": "Controls the padding on all sides of the card.",
|
|
1665
|
+
"name": "--n-card-padding",
|
|
1666
|
+
"default": "var(--n-space-m)"
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1670
|
+
"name": "--n-card-slot-padding",
|
|
1671
|
+
"default": "var(--n-space-m)"
|
|
1672
|
+
}
|
|
1673
|
+
],
|
|
1674
|
+
"slots": [
|
|
1675
|
+
{
|
|
1676
|
+
"description": "The card content.",
|
|
1677
|
+
"name": ""
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1681
|
+
"name": "header"
|
|
1682
|
+
},
|
|
1683
|
+
{
|
|
1684
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1685
|
+
"name": "header-end"
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1689
|
+
"name": "footer"
|
|
1690
|
+
}
|
|
1691
|
+
],
|
|
1692
|
+
"members": [
|
|
1693
|
+
{
|
|
1694
|
+
"kind": "field",
|
|
1695
|
+
"name": "headerSlot",
|
|
1696
|
+
"privacy": "private",
|
|
1697
|
+
"default": "new SlotController(this, \"header\")"
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
"kind": "field",
|
|
1701
|
+
"name": "headerEndSlot",
|
|
1702
|
+
"privacy": "private",
|
|
1703
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"kind": "field",
|
|
1707
|
+
"name": "footerSlot",
|
|
1708
|
+
"privacy": "private",
|
|
1709
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
"kind": "field",
|
|
1713
|
+
"name": "padding",
|
|
1714
|
+
"type": {
|
|
1715
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1716
|
+
},
|
|
1717
|
+
"default": "\"m\"",
|
|
1718
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1719
|
+
"attribute": "padding",
|
|
1720
|
+
"reflects": true
|
|
1721
|
+
}
|
|
1722
|
+
],
|
|
1723
|
+
"attributes": [
|
|
1724
|
+
{
|
|
1725
|
+
"name": "padding",
|
|
1726
|
+
"type": {
|
|
1727
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1728
|
+
},
|
|
1729
|
+
"default": "\"m\"",
|
|
1730
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1731
|
+
"fieldName": "padding"
|
|
1732
|
+
}
|
|
1733
|
+
],
|
|
1734
|
+
"superclass": {
|
|
1735
|
+
"name": "LitElement",
|
|
1736
|
+
"package": "lit"
|
|
1737
|
+
},
|
|
1738
|
+
"localization": [],
|
|
1739
|
+
"status": "ready",
|
|
1740
|
+
"category": "structure",
|
|
1741
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place cards within cards. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n",
|
|
1742
|
+
"examples": [],
|
|
1743
|
+
"dependencies": [],
|
|
1744
|
+
"tagName": "nord-card",
|
|
1745
|
+
"customElement": true
|
|
1746
|
+
}
|
|
1747
|
+
],
|
|
1748
|
+
"exports": [
|
|
1749
|
+
{
|
|
1750
|
+
"kind": "js",
|
|
1751
|
+
"name": "default",
|
|
1752
|
+
"declaration": {
|
|
1753
|
+
"name": "Card",
|
|
1754
|
+
"module": "src/card/Card.ts"
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
"kind": "custom-element-definition",
|
|
1759
|
+
"name": "nord-card",
|
|
1760
|
+
"declaration": {
|
|
1761
|
+
"name": "Card",
|
|
1762
|
+
"module": "src/card/Card.ts"
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
]
|
|
1766
|
+
},
|
|
1767
|
+
{
|
|
1768
|
+
"kind": "javascript-module",
|
|
1769
|
+
"path": "src/checkbox/Checkbox.ts",
|
|
1770
|
+
"declarations": [
|
|
1771
|
+
{
|
|
1772
|
+
"kind": "class",
|
|
1773
|
+
"description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
|
|
1774
|
+
"name": "Checkbox",
|
|
1775
|
+
"cssProperties": [
|
|
1776
|
+
{
|
|
1777
|
+
"description": "Controls the text color of the label, using our [color tokens](/tokens/#color).",
|
|
1778
|
+
"name": "--n-label-color",
|
|
1779
|
+
"default": "var(--n-color-text)"
|
|
1780
|
+
}
|
|
1781
|
+
],
|
|
1782
|
+
"slots": [
|
|
1783
|
+
{
|
|
1784
|
+
"description": "Use when a label requires more than plain text.",
|
|
1785
|
+
"name": "label"
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
"description": "Optional slot that holds hint text for the input.",
|
|
1789
|
+
"name": "hint"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"description": "Optional slot that holds error text for the input.",
|
|
1793
|
+
"name": "error"
|
|
1794
|
+
}
|
|
1795
|
+
],
|
|
1796
|
+
"members": [
|
|
1797
|
+
{
|
|
1798
|
+
"kind": "field",
|
|
1799
|
+
"name": "formValue",
|
|
1800
|
+
"privacy": "protected",
|
|
1801
|
+
"readonly": true,
|
|
1802
|
+
"inheritedFrom": {
|
|
1803
|
+
"name": "FormAssociatedMixin",
|
|
1804
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1805
|
+
}
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
"kind": "field",
|
|
1809
|
+
"name": "indeterminate",
|
|
1810
|
+
"type": {
|
|
1811
|
+
"text": "boolean"
|
|
1812
|
+
},
|
|
1813
|
+
"default": "false",
|
|
1814
|
+
"description": "Controls whether the checkbox is in an indeterminate state.",
|
|
1815
|
+
"attribute": "indeterminate",
|
|
1816
|
+
"reflects": true
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"kind": "field",
|
|
1820
|
+
"name": "checked",
|
|
1821
|
+
"type": {
|
|
1822
|
+
"text": "boolean"
|
|
1823
|
+
},
|
|
1824
|
+
"default": "false",
|
|
1825
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
1826
|
+
"attribute": "checked",
|
|
1827
|
+
"reflects": true
|
|
1828
|
+
},
|
|
1829
|
+
{
|
|
1830
|
+
"kind": "method",
|
|
1831
|
+
"name": "handleChange",
|
|
1832
|
+
"privacy": "protected",
|
|
1833
|
+
"parameters": [
|
|
1834
|
+
{
|
|
1835
|
+
"name": "e",
|
|
1836
|
+
"type": {
|
|
1837
|
+
"text": "Event"
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
],
|
|
1841
|
+
"return": {
|
|
1842
|
+
"type": {
|
|
1843
|
+
"text": "void"
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
"inheritedFrom": {
|
|
1847
|
+
"name": "FormAssociatedMixin",
|
|
1848
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"kind": "field",
|
|
1853
|
+
"name": "size",
|
|
1854
|
+
"type": {
|
|
1855
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
1856
|
+
},
|
|
1857
|
+
"default": "\"m\"",
|
|
1858
|
+
"description": "The size of the component.",
|
|
1859
|
+
"attribute": "size",
|
|
1860
|
+
"reflects": true,
|
|
1861
|
+
"inheritedFrom": {
|
|
1739
1862
|
"name": "SizeMixin",
|
|
1740
1863
|
"module": "src/common/mixins/SizeMixin.ts"
|
|
1741
1864
|
}
|
|
@@ -2290,183 +2413,34 @@
|
|
|
2290
2413
|
}
|
|
2291
2414
|
},
|
|
2292
2415
|
{
|
|
2293
|
-
"name": "form",
|
|
2294
|
-
"type": {
|
|
2295
|
-
"text": "HTMLFormElement | null"
|
|
2296
|
-
},
|
|
2297
|
-
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
2298
|
-
"fieldName": "form",
|
|
2299
|
-
"inheritedFrom": {
|
|
2300
|
-
"name": "InputMixin",
|
|
2301
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
2304
|
-
],
|
|
2305
|
-
"mixins": [
|
|
2306
|
-
{
|
|
2307
|
-
"name": "SizeMixin",
|
|
2308
|
-
"module": "/src/common/mixins/SizeMixin.js"
|
|
2309
|
-
},
|
|
2310
|
-
{
|
|
2311
|
-
"name": "FormAssociatedMixin",
|
|
2312
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
2313
|
-
},
|
|
2314
|
-
{
|
|
2315
|
-
"name": "InputMixin",
|
|
2316
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
2317
|
-
},
|
|
2318
|
-
{
|
|
2319
|
-
"name": "FocusableMixin",
|
|
2320
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
2321
|
-
}
|
|
2322
|
-
],
|
|
2323
|
-
"superclass": {
|
|
2324
|
-
"name": "LitElement",
|
|
2325
|
-
"package": "lit"
|
|
2326
|
-
},
|
|
2327
|
-
"localization": [],
|
|
2328
|
-
"status": "ready",
|
|
2329
|
-
"category": "form",
|
|
2330
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
|
|
2331
|
-
"examples": [],
|
|
2332
|
-
"dependencies": [
|
|
2333
|
-
"icon"
|
|
2334
|
-
],
|
|
2335
|
-
"tagName": "nord-checkbox",
|
|
2336
|
-
"customElement": true,
|
|
2337
|
-
"events": [
|
|
2338
|
-
{
|
|
2339
|
-
"name": "input",
|
|
2340
|
-
"type": {
|
|
2341
|
-
"text": "NordEvent"
|
|
2342
|
-
},
|
|
2343
|
-
"description": "Fired as the user types into the input.",
|
|
2344
|
-
"inheritedFrom": {
|
|
2345
|
-
"name": "FormAssociatedMixin",
|
|
2346
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2347
|
-
}
|
|
2348
|
-
},
|
|
2349
|
-
{
|
|
2350
|
-
"name": "change",
|
|
2351
|
-
"type": {
|
|
2352
|
-
"text": "NordEvent"
|
|
2353
|
-
},
|
|
2354
|
-
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
2355
|
-
"inheritedFrom": {
|
|
2356
|
-
"name": "FormAssociatedMixin",
|
|
2357
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2358
|
-
}
|
|
2359
|
-
}
|
|
2360
|
-
]
|
|
2361
|
-
}
|
|
2362
|
-
],
|
|
2363
|
-
"exports": [
|
|
2364
|
-
{
|
|
2365
|
-
"kind": "js",
|
|
2366
|
-
"name": "default",
|
|
2367
|
-
"declaration": {
|
|
2368
|
-
"name": "Checkbox",
|
|
2369
|
-
"module": "src/checkbox/Checkbox.ts"
|
|
2370
|
-
}
|
|
2371
|
-
},
|
|
2372
|
-
{
|
|
2373
|
-
"kind": "custom-element-definition",
|
|
2374
|
-
"name": "nord-checkbox",
|
|
2375
|
-
"declaration": {
|
|
2376
|
-
"name": "Checkbox",
|
|
2377
|
-
"module": "src/checkbox/Checkbox.ts"
|
|
2378
|
-
}
|
|
2379
|
-
}
|
|
2380
|
-
]
|
|
2381
|
-
},
|
|
2382
|
-
{
|
|
2383
|
-
"kind": "javascript-module",
|
|
2384
|
-
"path": "src/card/Card.ts",
|
|
2385
|
-
"declarations": [
|
|
2386
|
-
{
|
|
2387
|
-
"kind": "class",
|
|
2388
|
-
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
2389
|
-
"name": "Card",
|
|
2390
|
-
"cssProperties": [
|
|
2391
|
-
{
|
|
2392
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
2393
|
-
"name": "--n-card-border-radius",
|
|
2394
|
-
"default": "var(--n-border-radius)"
|
|
2395
|
-
},
|
|
2396
|
-
{
|
|
2397
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
2398
|
-
"name": "--n-card-box-shadow",
|
|
2399
|
-
"default": "var(--n-box-shadow-popout)"
|
|
2400
|
-
},
|
|
2401
|
-
{
|
|
2402
|
-
"description": "Controls the padding on all sides of the card.",
|
|
2403
|
-
"name": "--n-card-padding",
|
|
2404
|
-
"default": "var(--n-space-m)"
|
|
2405
|
-
},
|
|
2406
|
-
{
|
|
2407
|
-
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
2408
|
-
"name": "--n-card-slot-padding",
|
|
2409
|
-
"default": "var(--n-space-m)"
|
|
2410
|
-
}
|
|
2411
|
-
],
|
|
2412
|
-
"slots": [
|
|
2413
|
-
{
|
|
2414
|
-
"description": "The card content.",
|
|
2415
|
-
"name": ""
|
|
2416
|
-
},
|
|
2417
|
-
{
|
|
2418
|
-
"description": "Optional slot that holds a header for the card.",
|
|
2419
|
-
"name": "header"
|
|
2420
|
-
},
|
|
2421
|
-
{
|
|
2422
|
-
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
2423
|
-
"name": "header-end"
|
|
2424
|
-
},
|
|
2425
|
-
{
|
|
2426
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
2427
|
-
"name": "footer"
|
|
2416
|
+
"name": "form",
|
|
2417
|
+
"type": {
|
|
2418
|
+
"text": "HTMLFormElement | null"
|
|
2419
|
+
},
|
|
2420
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
2421
|
+
"fieldName": "form",
|
|
2422
|
+
"inheritedFrom": {
|
|
2423
|
+
"name": "InputMixin",
|
|
2424
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2425
|
+
}
|
|
2428
2426
|
}
|
|
2429
2427
|
],
|
|
2430
|
-
"
|
|
2428
|
+
"mixins": [
|
|
2431
2429
|
{
|
|
2432
|
-
"
|
|
2433
|
-
"
|
|
2434
|
-
"privacy": "private",
|
|
2435
|
-
"default": "new SlotController(this, \"header\")"
|
|
2430
|
+
"name": "SizeMixin",
|
|
2431
|
+
"module": "/src/common/mixins/SizeMixin.js"
|
|
2436
2432
|
},
|
|
2437
2433
|
{
|
|
2438
|
-
"
|
|
2439
|
-
"
|
|
2440
|
-
"privacy": "private",
|
|
2441
|
-
"default": "new SlotController(this, \"header-end\")"
|
|
2434
|
+
"name": "FormAssociatedMixin",
|
|
2435
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
2442
2436
|
},
|
|
2443
2437
|
{
|
|
2444
|
-
"
|
|
2445
|
-
"
|
|
2446
|
-
"privacy": "private",
|
|
2447
|
-
"default": "new SlotController(this, \"footer\")"
|
|
2438
|
+
"name": "InputMixin",
|
|
2439
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
2448
2440
|
},
|
|
2449
2441
|
{
|
|
2450
|
-
"
|
|
2451
|
-
"
|
|
2452
|
-
"type": {
|
|
2453
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
2454
|
-
},
|
|
2455
|
-
"default": "\"m\"",
|
|
2456
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2457
|
-
"attribute": "padding",
|
|
2458
|
-
"reflects": true
|
|
2459
|
-
}
|
|
2460
|
-
],
|
|
2461
|
-
"attributes": [
|
|
2462
|
-
{
|
|
2463
|
-
"name": "padding",
|
|
2464
|
-
"type": {
|
|
2465
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
2466
|
-
},
|
|
2467
|
-
"default": "\"m\"",
|
|
2468
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2469
|
-
"fieldName": "padding"
|
|
2442
|
+
"name": "FocusableMixin",
|
|
2443
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
2470
2444
|
}
|
|
2471
2445
|
],
|
|
2472
2446
|
"superclass": {
|
|
@@ -2475,12 +2449,38 @@
|
|
|
2475
2449
|
},
|
|
2476
2450
|
"localization": [],
|
|
2477
2451
|
"status": "ready",
|
|
2478
|
-
"category": "
|
|
2479
|
-
"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
|
|
2452
|
+
"category": "form",
|
|
2453
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
|
|
2480
2454
|
"examples": [],
|
|
2481
|
-
"dependencies": [
|
|
2482
|
-
|
|
2483
|
-
|
|
2455
|
+
"dependencies": [
|
|
2456
|
+
"icon"
|
|
2457
|
+
],
|
|
2458
|
+
"tagName": "nord-checkbox",
|
|
2459
|
+
"customElement": true,
|
|
2460
|
+
"events": [
|
|
2461
|
+
{
|
|
2462
|
+
"name": "input",
|
|
2463
|
+
"type": {
|
|
2464
|
+
"text": "NordEvent"
|
|
2465
|
+
},
|
|
2466
|
+
"description": "Fired as the user types into the input.",
|
|
2467
|
+
"inheritedFrom": {
|
|
2468
|
+
"name": "FormAssociatedMixin",
|
|
2469
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2470
|
+
}
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
"name": "change",
|
|
2474
|
+
"type": {
|
|
2475
|
+
"text": "NordEvent"
|
|
2476
|
+
},
|
|
2477
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
2478
|
+
"inheritedFrom": {
|
|
2479
|
+
"name": "FormAssociatedMixin",
|
|
2480
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
]
|
|
2484
2484
|
}
|
|
2485
2485
|
],
|
|
2486
2486
|
"exports": [
|
|
@@ -2488,16 +2488,16 @@
|
|
|
2488
2488
|
"kind": "js",
|
|
2489
2489
|
"name": "default",
|
|
2490
2490
|
"declaration": {
|
|
2491
|
-
"name": "
|
|
2492
|
-
"module": "src/
|
|
2491
|
+
"name": "Checkbox",
|
|
2492
|
+
"module": "src/checkbox/Checkbox.ts"
|
|
2493
2493
|
}
|
|
2494
2494
|
},
|
|
2495
2495
|
{
|
|
2496
2496
|
"kind": "custom-element-definition",
|
|
2497
|
-
"name": "nord-
|
|
2497
|
+
"name": "nord-checkbox",
|
|
2498
2498
|
"declaration": {
|
|
2499
|
-
"name": "
|
|
2500
|
-
"module": "src/
|
|
2499
|
+
"name": "Checkbox",
|
|
2500
|
+
"module": "src/checkbox/Checkbox.ts"
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
2503
|
]
|
|
@@ -10732,6 +10732,63 @@
|
|
|
10732
10732
|
}
|
|
10733
10733
|
]
|
|
10734
10734
|
},
|
|
10735
|
+
{
|
|
10736
|
+
"kind": "javascript-module",
|
|
10737
|
+
"path": "src/notification-group/NotificationGroup.ts",
|
|
10738
|
+
"declarations": [
|
|
10739
|
+
{
|
|
10740
|
+
"kind": "class",
|
|
10741
|
+
"description": "Notification group is used to position and style a group of notifications.",
|
|
10742
|
+
"name": "NotificationGroup",
|
|
10743
|
+
"slots": [
|
|
10744
|
+
{
|
|
10745
|
+
"description": "Default slot in which to place notifications.",
|
|
10746
|
+
"name": ""
|
|
10747
|
+
}
|
|
10748
|
+
],
|
|
10749
|
+
"members": [],
|
|
10750
|
+
"events": [
|
|
10751
|
+
{
|
|
10752
|
+
"type": {
|
|
10753
|
+
"text": "NordEvent"
|
|
10754
|
+
},
|
|
10755
|
+
"description": "Fired when a notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
|
|
10756
|
+
"name": "dismiss"
|
|
10757
|
+
}
|
|
10758
|
+
],
|
|
10759
|
+
"superclass": {
|
|
10760
|
+
"name": "LitElement",
|
|
10761
|
+
"package": "lit"
|
|
10762
|
+
},
|
|
10763
|
+
"localization": [],
|
|
10764
|
+
"status": "ready",
|
|
10765
|
+
"category": "feedback",
|
|
10766
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use in combination with [Notification](/components/notification/) so that notifications get styled and positioned correctly.\n- Add as close to the start of your main content area as possible.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than notification components\n\n</div>\n\n---\n\n## Content guidelines\n\nNotification content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the notification content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAction link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing action link labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Start Consultation</div>\n\nAvoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
|
|
10767
|
+
"examples": [],
|
|
10768
|
+
"dependencies": [],
|
|
10769
|
+
"tagName": "nord-notification-group",
|
|
10770
|
+
"customElement": true
|
|
10771
|
+
}
|
|
10772
|
+
],
|
|
10773
|
+
"exports": [
|
|
10774
|
+
{
|
|
10775
|
+
"kind": "js",
|
|
10776
|
+
"name": "default",
|
|
10777
|
+
"declaration": {
|
|
10778
|
+
"name": "NotificationGroup",
|
|
10779
|
+
"module": "src/notification-group/NotificationGroup.ts"
|
|
10780
|
+
}
|
|
10781
|
+
},
|
|
10782
|
+
{
|
|
10783
|
+
"kind": "custom-element-definition",
|
|
10784
|
+
"name": "nord-notification-group",
|
|
10785
|
+
"declaration": {
|
|
10786
|
+
"name": "NotificationGroup",
|
|
10787
|
+
"module": "src/notification-group/NotificationGroup.ts"
|
|
10788
|
+
}
|
|
10789
|
+
}
|
|
10790
|
+
]
|
|
10791
|
+
},
|
|
10735
10792
|
{
|
|
10736
10793
|
"kind": "javascript-module",
|
|
10737
10794
|
"path": "src/notification/Notification.ts",
|
|
@@ -10875,26 +10932,141 @@
|
|
|
10875
10932
|
},
|
|
10876
10933
|
{
|
|
10877
10934
|
"kind": "javascript-module",
|
|
10878
|
-
"path": "src/
|
|
10935
|
+
"path": "src/progress-bar/ProgressBar.ts",
|
|
10879
10936
|
"declarations": [
|
|
10880
10937
|
{
|
|
10881
10938
|
"kind": "class",
|
|
10882
|
-
"description": "
|
|
10883
|
-
"name": "
|
|
10884
|
-
"
|
|
10939
|
+
"description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
|
|
10940
|
+
"name": "ProgressBar",
|
|
10941
|
+
"cssProperties": [
|
|
10885
10942
|
{
|
|
10886
|
-
"description": "
|
|
10887
|
-
"name": ""
|
|
10943
|
+
"description": "Controls the thickness of the progress bar, using our [spacing tokens](/tokens/#space).",
|
|
10944
|
+
"name": "--n-progress-size",
|
|
10945
|
+
"default": "var(--n-space-s)"
|
|
10946
|
+
},
|
|
10947
|
+
{
|
|
10948
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
10949
|
+
"name": "--n-progress-border-radius",
|
|
10950
|
+
"default": "var(--n-border-radius-s)"
|
|
10951
|
+
},
|
|
10952
|
+
{
|
|
10953
|
+
"description": "Controls the color of the progress bar, using [color tokens](/tokens/#color).",
|
|
10954
|
+
"name": "--n-progress-color",
|
|
10955
|
+
"default": "var(--n-color-accent)"
|
|
10956
|
+
}
|
|
10957
|
+
],
|
|
10958
|
+
"members": [
|
|
10959
|
+
{
|
|
10960
|
+
"kind": "field",
|
|
10961
|
+
"name": "value",
|
|
10962
|
+
"type": {
|
|
10963
|
+
"text": "number | undefined"
|
|
10964
|
+
},
|
|
10965
|
+
"description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
|
|
10966
|
+
"attribute": "value",
|
|
10967
|
+
"reflects": true
|
|
10968
|
+
},
|
|
10969
|
+
{
|
|
10970
|
+
"kind": "field",
|
|
10971
|
+
"name": "max",
|
|
10972
|
+
"type": {
|
|
10973
|
+
"text": "number"
|
|
10974
|
+
},
|
|
10975
|
+
"default": "100",
|
|
10976
|
+
"description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
|
|
10977
|
+
"attribute": "max",
|
|
10978
|
+
"reflects": true
|
|
10979
|
+
},
|
|
10980
|
+
{
|
|
10981
|
+
"kind": "field",
|
|
10982
|
+
"name": "label",
|
|
10983
|
+
"type": {
|
|
10984
|
+
"text": "string"
|
|
10985
|
+
},
|
|
10986
|
+
"default": "\"Current progress\"",
|
|
10987
|
+
"description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
|
|
10988
|
+
"attribute": "label",
|
|
10989
|
+
"reflects": true
|
|
10990
|
+
},
|
|
10991
|
+
{
|
|
10992
|
+
"kind": "field",
|
|
10993
|
+
"name": "focusableRef",
|
|
10994
|
+
"privacy": "protected",
|
|
10995
|
+
"inheritedFrom": {
|
|
10996
|
+
"name": "FocusableMixin",
|
|
10997
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
10998
|
+
}
|
|
10999
|
+
},
|
|
11000
|
+
{
|
|
11001
|
+
"kind": "method",
|
|
11002
|
+
"name": "focus",
|
|
11003
|
+
"parameters": [
|
|
11004
|
+
{
|
|
11005
|
+
"name": "options",
|
|
11006
|
+
"optional": true,
|
|
11007
|
+
"type": {
|
|
11008
|
+
"text": "FocusOptions"
|
|
11009
|
+
},
|
|
11010
|
+
"description": "An object which controls aspects of the focusing process."
|
|
11011
|
+
}
|
|
11012
|
+
],
|
|
11013
|
+
"description": "Programmatically move focus to the component.",
|
|
11014
|
+
"inheritedFrom": {
|
|
11015
|
+
"name": "FocusableMixin",
|
|
11016
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11017
|
+
}
|
|
11018
|
+
},
|
|
11019
|
+
{
|
|
11020
|
+
"kind": "method",
|
|
11021
|
+
"name": "blur",
|
|
11022
|
+
"description": "Programmatically remove focus from the component.",
|
|
11023
|
+
"inheritedFrom": {
|
|
11024
|
+
"name": "FocusableMixin",
|
|
11025
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11026
|
+
}
|
|
11027
|
+
},
|
|
11028
|
+
{
|
|
11029
|
+
"kind": "method",
|
|
11030
|
+
"name": "click",
|
|
11031
|
+
"description": "Programmatically simulates a click on the component.",
|
|
11032
|
+
"inheritedFrom": {
|
|
11033
|
+
"name": "FocusableMixin",
|
|
11034
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11035
|
+
}
|
|
10888
11036
|
}
|
|
10889
11037
|
],
|
|
10890
|
-
"
|
|
10891
|
-
"events": [
|
|
11038
|
+
"attributes": [
|
|
10892
11039
|
{
|
|
11040
|
+
"name": "value",
|
|
10893
11041
|
"type": {
|
|
10894
|
-
"text": "
|
|
11042
|
+
"text": "number | undefined"
|
|
10895
11043
|
},
|
|
10896
|
-
"description": "
|
|
10897
|
-
"
|
|
11044
|
+
"description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
|
|
11045
|
+
"fieldName": "value"
|
|
11046
|
+
},
|
|
11047
|
+
{
|
|
11048
|
+
"name": "max",
|
|
11049
|
+
"type": {
|
|
11050
|
+
"text": "number"
|
|
11051
|
+
},
|
|
11052
|
+
"default": "100",
|
|
11053
|
+
"description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
|
|
11054
|
+
"fieldName": "max"
|
|
11055
|
+
},
|
|
11056
|
+
{
|
|
11057
|
+
"name": "label",
|
|
11058
|
+
"type": {
|
|
11059
|
+
"text": "string"
|
|
11060
|
+
},
|
|
11061
|
+
"default": "\"Current progress\"",
|
|
11062
|
+
"description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
|
|
11063
|
+
"fieldName": "label"
|
|
11064
|
+
}
|
|
11065
|
+
],
|
|
11066
|
+
"mixins": [
|
|
11067
|
+
{
|
|
11068
|
+
"name": "FocusableMixin",
|
|
11069
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
10898
11070
|
}
|
|
10899
11071
|
],
|
|
10900
11072
|
"superclass": {
|
|
@@ -10904,10 +11076,10 @@
|
|
|
10904
11076
|
"localization": [],
|
|
10905
11077
|
"status": "ready",
|
|
10906
11078
|
"category": "feedback",
|
|
10907
|
-
"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
|
|
11079
|
+
"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 show the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n",
|
|
10908
11080
|
"examples": [],
|
|
10909
11081
|
"dependencies": [],
|
|
10910
|
-
"tagName": "nord-
|
|
11082
|
+
"tagName": "nord-progress-bar",
|
|
10911
11083
|
"customElement": true
|
|
10912
11084
|
}
|
|
10913
11085
|
],
|
|
@@ -10916,16 +11088,16 @@
|
|
|
10916
11088
|
"kind": "js",
|
|
10917
11089
|
"name": "default",
|
|
10918
11090
|
"declaration": {
|
|
10919
|
-
"name": "
|
|
10920
|
-
"module": "src/
|
|
11091
|
+
"name": "ProgressBar",
|
|
11092
|
+
"module": "src/progress-bar/ProgressBar.ts"
|
|
10921
11093
|
}
|
|
10922
11094
|
},
|
|
10923
11095
|
{
|
|
10924
11096
|
"kind": "custom-element-definition",
|
|
10925
|
-
"name": "nord-
|
|
11097
|
+
"name": "nord-progress-bar",
|
|
10926
11098
|
"declaration": {
|
|
10927
|
-
"name": "
|
|
10928
|
-
"module": "src/
|
|
11099
|
+
"name": "ProgressBar",
|
|
11100
|
+
"module": "src/progress-bar/ProgressBar.ts"
|
|
10929
11101
|
}
|
|
10930
11102
|
}
|
|
10931
11103
|
]
|
|
@@ -11163,253 +11335,81 @@
|
|
|
11163
11335
|
"events": [
|
|
11164
11336
|
{
|
|
11165
11337
|
"name": "open",
|
|
11166
|
-
"type": {
|
|
11167
|
-
"text": "NordEvent"
|
|
11168
|
-
},
|
|
11169
|
-
"description": "Dispatched when the popout is opened."
|
|
11170
|
-
},
|
|
11171
|
-
{
|
|
11172
|
-
"name": "close",
|
|
11173
|
-
"type": {
|
|
11174
|
-
"text": "NordEvent"
|
|
11175
|
-
},
|
|
11176
|
-
"description": "Dispatched when the popout is closed."
|
|
11177
|
-
}
|
|
11178
|
-
],
|
|
11179
|
-
"attributes": [
|
|
11180
|
-
{
|
|
11181
|
-
"name": "id",
|
|
11182
|
-
"type": {
|
|
11183
|
-
"text": "string"
|
|
11184
|
-
},
|
|
11185
|
-
"default": "\"\"",
|
|
11186
|
-
"description": "The id for the active element to reference via aria-controls.",
|
|
11187
|
-
"fieldName": "id"
|
|
11188
|
-
},
|
|
11189
|
-
{
|
|
11190
|
-
"name": "anchor",
|
|
11191
|
-
"type": {
|
|
11192
|
-
"text": "string | undefined"
|
|
11193
|
-
},
|
|
11194
|
-
"description": "Set an optional anchor element to align against, replacing the triggering element.",
|
|
11195
|
-
"fieldName": "anchor"
|
|
11196
|
-
},
|
|
11197
|
-
{
|
|
11198
|
-
"name": "open",
|
|
11199
|
-
"type": {
|
|
11200
|
-
"text": "boolean"
|
|
11201
|
-
},
|
|
11202
|
-
"default": "false",
|
|
11203
|
-
"description": "Controls whether the component is open or not.",
|
|
11204
|
-
"fieldName": "open",
|
|
11205
|
-
"inheritedFrom": {
|
|
11206
|
-
"name": "FloatingMixin",
|
|
11207
|
-
"module": "src/common/mixins/FloatingComponentMixin.ts"
|
|
11208
|
-
}
|
|
11209
|
-
},
|
|
11210
|
-
{
|
|
11211
|
-
"name": "align",
|
|
11212
|
-
"type": {
|
|
11213
|
-
"text": "\"start\" | \"end\""
|
|
11214
|
-
},
|
|
11215
|
-
"default": "\"start\"",
|
|
11216
|
-
"description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
|
|
11217
|
-
"fieldName": "align",
|
|
11218
|
-
"inheritedFrom": {
|
|
11219
|
-
"name": "FloatingMixin",
|
|
11220
|
-
"module": "src/common/mixins/FloatingComponentMixin.ts"
|
|
11221
|
-
}
|
|
11222
|
-
},
|
|
11223
|
-
{
|
|
11224
|
-
"name": "position",
|
|
11225
|
-
"type": {
|
|
11226
|
-
"text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\" | \"auto\""
|
|
11227
|
-
},
|
|
11228
|
-
"default": "\"block-end\"",
|
|
11229
|
-
"description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.\nYou can also set it to `auto` for automatic positioning depending on\nwhich side has the most space available.",
|
|
11230
|
-
"fieldName": "position",
|
|
11231
|
-
"inheritedFrom": {
|
|
11232
|
-
"name": "FloatingMixin",
|
|
11233
|
-
"module": "src/common/mixins/FloatingComponentMixin.ts"
|
|
11234
|
-
}
|
|
11235
|
-
}
|
|
11236
|
-
],
|
|
11237
|
-
"mixins": [
|
|
11238
|
-
{
|
|
11239
|
-
"name": "FloatingMixin",
|
|
11240
|
-
"module": "/src/common/mixins/FloatingComponentMixin.js"
|
|
11241
|
-
}
|
|
11242
|
-
],
|
|
11243
|
-
"superclass": {
|
|
11244
|
-
"name": "LitElement",
|
|
11245
|
-
"package": "lit"
|
|
11246
|
-
},
|
|
11247
|
-
"localization": [],
|
|
11248
|
-
"status": "ready",
|
|
11249
|
-
"category": "overlay",
|
|
11250
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Always position popout next to the button or other interface element that toggles it.\n- Use a popout to contain controls or information that doesn’t need to be shown immediately.\n- Use a popout to contain items that will most likely not fit into the current view.\n- Use a clearly labelled button to reveal the popout.\n- Use the appropriate `aria-haspopup` and `role` attributes for both the toggle button and containing items. Please refer to the [MDN documentation on both role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values) and [child role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#associated_roles).\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide information inside a popout that is imperative to using the current view.\n- Don’t obscure other controls that are important with the popout.\n- Don’t allow the popout to be obscured by other controls or the outer bounds of the current view.\n</div>\n\n---\n\n## Content guidelines\n\nIf a popout contains actions, they should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nPopout actions should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in popout actions, 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 popout actions 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\nAvoid all caps for popout actions:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\n---\n\n## Additional considerations\n\n- The popout component is a containing component, only providing a way to reveal and hide controls by using a single button.\n",
|
|
11251
|
-
"examples": [],
|
|
11252
|
-
"dependencies": [],
|
|
11253
|
-
"tagName": "nord-popout",
|
|
11254
|
-
"customElement": true
|
|
11255
|
-
}
|
|
11256
|
-
],
|
|
11257
|
-
"exports": [
|
|
11258
|
-
{
|
|
11259
|
-
"kind": "js",
|
|
11260
|
-
"name": "default",
|
|
11261
|
-
"declaration": {
|
|
11262
|
-
"name": "Popout",
|
|
11263
|
-
"module": "src/popout/Popout.ts"
|
|
11264
|
-
}
|
|
11265
|
-
},
|
|
11266
|
-
{
|
|
11267
|
-
"kind": "custom-element-definition",
|
|
11268
|
-
"name": "nord-popout",
|
|
11269
|
-
"declaration": {
|
|
11270
|
-
"name": "Popout",
|
|
11271
|
-
"module": "src/popout/Popout.ts"
|
|
11272
|
-
}
|
|
11273
|
-
}
|
|
11274
|
-
]
|
|
11275
|
-
},
|
|
11276
|
-
{
|
|
11277
|
-
"kind": "javascript-module",
|
|
11278
|
-
"path": "src/progress-bar/ProgressBar.ts",
|
|
11279
|
-
"declarations": [
|
|
11280
|
-
{
|
|
11281
|
-
"kind": "class",
|
|
11282
|
-
"description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
|
|
11283
|
-
"name": "ProgressBar",
|
|
11284
|
-
"cssProperties": [
|
|
11285
|
-
{
|
|
11286
|
-
"description": "Controls the thickness of the progress bar, using our [spacing tokens](/tokens/#space).",
|
|
11287
|
-
"name": "--n-progress-size",
|
|
11288
|
-
"default": "var(--n-space-s)"
|
|
11289
|
-
},
|
|
11290
|
-
{
|
|
11291
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
11292
|
-
"name": "--n-progress-border-radius",
|
|
11293
|
-
"default": "var(--n-border-radius-s)"
|
|
11294
|
-
},
|
|
11295
|
-
{
|
|
11296
|
-
"description": "Controls the color of the progress bar, using [color tokens](/tokens/#color).",
|
|
11297
|
-
"name": "--n-progress-color",
|
|
11298
|
-
"default": "var(--n-color-accent)"
|
|
11299
|
-
}
|
|
11300
|
-
],
|
|
11301
|
-
"members": [
|
|
11302
|
-
{
|
|
11303
|
-
"kind": "field",
|
|
11304
|
-
"name": "value",
|
|
11305
|
-
"type": {
|
|
11306
|
-
"text": "number | undefined"
|
|
11307
|
-
},
|
|
11308
|
-
"description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
|
|
11309
|
-
"attribute": "value",
|
|
11310
|
-
"reflects": true
|
|
11311
|
-
},
|
|
11312
|
-
{
|
|
11313
|
-
"kind": "field",
|
|
11314
|
-
"name": "max",
|
|
11315
|
-
"type": {
|
|
11316
|
-
"text": "number"
|
|
11317
|
-
},
|
|
11318
|
-
"default": "100",
|
|
11319
|
-
"description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
|
|
11320
|
-
"attribute": "max",
|
|
11321
|
-
"reflects": true
|
|
11322
|
-
},
|
|
11323
|
-
{
|
|
11324
|
-
"kind": "field",
|
|
11325
|
-
"name": "label",
|
|
11326
|
-
"type": {
|
|
11327
|
-
"text": "string"
|
|
11328
|
-
},
|
|
11329
|
-
"default": "\"Current progress\"",
|
|
11330
|
-
"description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
|
|
11331
|
-
"attribute": "label",
|
|
11332
|
-
"reflects": true
|
|
11333
|
-
},
|
|
11334
|
-
{
|
|
11335
|
-
"kind": "field",
|
|
11336
|
-
"name": "focusableRef",
|
|
11337
|
-
"privacy": "protected",
|
|
11338
|
-
"inheritedFrom": {
|
|
11339
|
-
"name": "FocusableMixin",
|
|
11340
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11341
|
-
}
|
|
11342
|
-
},
|
|
11343
|
-
{
|
|
11344
|
-
"kind": "method",
|
|
11345
|
-
"name": "focus",
|
|
11346
|
-
"parameters": [
|
|
11347
|
-
{
|
|
11348
|
-
"name": "options",
|
|
11349
|
-
"optional": true,
|
|
11350
|
-
"type": {
|
|
11351
|
-
"text": "FocusOptions"
|
|
11352
|
-
},
|
|
11353
|
-
"description": "An object which controls aspects of the focusing process."
|
|
11354
|
-
}
|
|
11355
|
-
],
|
|
11356
|
-
"description": "Programmatically move focus to the component.",
|
|
11357
|
-
"inheritedFrom": {
|
|
11358
|
-
"name": "FocusableMixin",
|
|
11359
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11360
|
-
}
|
|
11361
|
-
},
|
|
11362
|
-
{
|
|
11363
|
-
"kind": "method",
|
|
11364
|
-
"name": "blur",
|
|
11365
|
-
"description": "Programmatically remove focus from the component.",
|
|
11366
|
-
"inheritedFrom": {
|
|
11367
|
-
"name": "FocusableMixin",
|
|
11368
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11369
|
-
}
|
|
11338
|
+
"type": {
|
|
11339
|
+
"text": "NordEvent"
|
|
11340
|
+
},
|
|
11341
|
+
"description": "Dispatched when the popout is opened."
|
|
11370
11342
|
},
|
|
11371
11343
|
{
|
|
11372
|
-
"
|
|
11373
|
-
"
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11377
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
11378
|
-
}
|
|
11344
|
+
"name": "close",
|
|
11345
|
+
"type": {
|
|
11346
|
+
"text": "NordEvent"
|
|
11347
|
+
},
|
|
11348
|
+
"description": "Dispatched when the popout is closed."
|
|
11379
11349
|
}
|
|
11380
11350
|
],
|
|
11381
11351
|
"attributes": [
|
|
11382
11352
|
{
|
|
11383
|
-
"name": "
|
|
11353
|
+
"name": "id",
|
|
11384
11354
|
"type": {
|
|
11385
|
-
"text": "
|
|
11355
|
+
"text": "string"
|
|
11386
11356
|
},
|
|
11387
|
-
"
|
|
11388
|
-
"
|
|
11357
|
+
"default": "\"\"",
|
|
11358
|
+
"description": "The id for the active element to reference via aria-controls.",
|
|
11359
|
+
"fieldName": "id"
|
|
11389
11360
|
},
|
|
11390
11361
|
{
|
|
11391
|
-
"name": "
|
|
11362
|
+
"name": "anchor",
|
|
11392
11363
|
"type": {
|
|
11393
|
-
"text": "
|
|
11364
|
+
"text": "string | undefined"
|
|
11394
11365
|
},
|
|
11395
|
-
"
|
|
11396
|
-
"
|
|
11397
|
-
"fieldName": "max"
|
|
11366
|
+
"description": "Set an optional anchor element to align against, replacing the triggering element.",
|
|
11367
|
+
"fieldName": "anchor"
|
|
11398
11368
|
},
|
|
11399
11369
|
{
|
|
11400
|
-
"name": "
|
|
11370
|
+
"name": "open",
|
|
11401
11371
|
"type": {
|
|
11402
|
-
"text": "
|
|
11372
|
+
"text": "boolean"
|
|
11403
11373
|
},
|
|
11404
|
-
"default": "
|
|
11405
|
-
"description": "
|
|
11406
|
-
"fieldName": "
|
|
11374
|
+
"default": "false",
|
|
11375
|
+
"description": "Controls whether the component is open or not.",
|
|
11376
|
+
"fieldName": "open",
|
|
11377
|
+
"inheritedFrom": {
|
|
11378
|
+
"name": "FloatingMixin",
|
|
11379
|
+
"module": "src/common/mixins/FloatingComponentMixin.ts"
|
|
11380
|
+
}
|
|
11381
|
+
},
|
|
11382
|
+
{
|
|
11383
|
+
"name": "align",
|
|
11384
|
+
"type": {
|
|
11385
|
+
"text": "\"start\" | \"end\""
|
|
11386
|
+
},
|
|
11387
|
+
"default": "\"start\"",
|
|
11388
|
+
"description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
|
|
11389
|
+
"fieldName": "align",
|
|
11390
|
+
"inheritedFrom": {
|
|
11391
|
+
"name": "FloatingMixin",
|
|
11392
|
+
"module": "src/common/mixins/FloatingComponentMixin.ts"
|
|
11393
|
+
}
|
|
11394
|
+
},
|
|
11395
|
+
{
|
|
11396
|
+
"name": "position",
|
|
11397
|
+
"type": {
|
|
11398
|
+
"text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\" | \"auto\""
|
|
11399
|
+
},
|
|
11400
|
+
"default": "\"block-end\"",
|
|
11401
|
+
"description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.\nYou can also set it to `auto` for automatic positioning depending on\nwhich side has the most space available.",
|
|
11402
|
+
"fieldName": "position",
|
|
11403
|
+
"inheritedFrom": {
|
|
11404
|
+
"name": "FloatingMixin",
|
|
11405
|
+
"module": "src/common/mixins/FloatingComponentMixin.ts"
|
|
11406
|
+
}
|
|
11407
11407
|
}
|
|
11408
11408
|
],
|
|
11409
11409
|
"mixins": [
|
|
11410
11410
|
{
|
|
11411
|
-
"name": "
|
|
11412
|
-
"module": "/src/common/mixins/
|
|
11411
|
+
"name": "FloatingMixin",
|
|
11412
|
+
"module": "/src/common/mixins/FloatingComponentMixin.js"
|
|
11413
11413
|
}
|
|
11414
11414
|
],
|
|
11415
11415
|
"superclass": {
|
|
@@ -11418,11 +11418,11 @@
|
|
|
11418
11418
|
},
|
|
11419
11419
|
"localization": [],
|
|
11420
11420
|
"status": "ready",
|
|
11421
|
-
"category": "
|
|
11422
|
-
"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
|
|
11421
|
+
"category": "overlay",
|
|
11422
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Always position popout next to the button or other interface element that toggles it.\n- Use a popout to contain controls or information that doesn’t need to be shown immediately.\n- Use a popout to contain items that will most likely not fit into the current view.\n- Use a clearly labelled button to reveal the popout.\n- Use the appropriate `aria-haspopup` and `role` attributes for both the toggle button and containing items. Please refer to the [MDN documentation on both role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values) and [child role values](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#associated_roles).\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide information inside a popout that is imperative to using the current view.\n- Don’t obscure other controls that are important with the popout.\n- Don’t allow the popout to be obscured by other controls or the outer bounds of the current view.\n</div>\n\n---\n\n## Content guidelines\n\nIf a popout contains actions, they should be always written 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\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nPopout actions should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in popout actions, 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 popout actions 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\nAvoid all caps for popout actions:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\n---\n\n## Additional considerations\n\n- The popout component is a containing component, only providing a way to reveal and hide controls by using a single button.\n",
|
|
11423
11423
|
"examples": [],
|
|
11424
11424
|
"dependencies": [],
|
|
11425
|
-
"tagName": "nord-
|
|
11425
|
+
"tagName": "nord-popout",
|
|
11426
11426
|
"customElement": true
|
|
11427
11427
|
}
|
|
11428
11428
|
],
|
|
@@ -11431,16 +11431,16 @@
|
|
|
11431
11431
|
"kind": "js",
|
|
11432
11432
|
"name": "default",
|
|
11433
11433
|
"declaration": {
|
|
11434
|
-
"name": "
|
|
11435
|
-
"module": "src/
|
|
11434
|
+
"name": "Popout",
|
|
11435
|
+
"module": "src/popout/Popout.ts"
|
|
11436
11436
|
}
|
|
11437
11437
|
},
|
|
11438
11438
|
{
|
|
11439
11439
|
"kind": "custom-element-definition",
|
|
11440
|
-
"name": "nord-
|
|
11440
|
+
"name": "nord-popout",
|
|
11441
11441
|
"declaration": {
|
|
11442
|
-
"name": "
|
|
11443
|
-
"module": "src/
|
|
11442
|
+
"name": "Popout",
|
|
11443
|
+
"module": "src/popout/Popout.ts"
|
|
11444
11444
|
}
|
|
11445
11445
|
}
|
|
11446
11446
|
]
|
|
@@ -12383,6 +12383,92 @@
|
|
|
12383
12383
|
}
|
|
12384
12384
|
]
|
|
12385
12385
|
},
|
|
12386
|
+
{
|
|
12387
|
+
"kind": "javascript-module",
|
|
12388
|
+
"path": "src/segmented-control/SegmentedControl.ts",
|
|
12389
|
+
"declarations": [
|
|
12390
|
+
{
|
|
12391
|
+
"kind": "class",
|
|
12392
|
+
"description": "Segmented control is used to pick one choice from a set of\nclosely related choices, and immediately apply that selection.",
|
|
12393
|
+
"name": "SegmentedControl",
|
|
12394
|
+
"slots": [
|
|
12395
|
+
{
|
|
12396
|
+
"description": "Default slot.",
|
|
12397
|
+
"name": ""
|
|
12398
|
+
}
|
|
12399
|
+
],
|
|
12400
|
+
"members": [
|
|
12401
|
+
{
|
|
12402
|
+
"kind": "field",
|
|
12403
|
+
"name": "defaultSlot",
|
|
12404
|
+
"privacy": "private",
|
|
12405
|
+
"default": "new SlotController(this)"
|
|
12406
|
+
},
|
|
12407
|
+
{
|
|
12408
|
+
"kind": "field",
|
|
12409
|
+
"name": "expand",
|
|
12410
|
+
"type": {
|
|
12411
|
+
"text": "boolean"
|
|
12412
|
+
},
|
|
12413
|
+
"default": "false",
|
|
12414
|
+
"description": "Controls whether the segmented control expands to fill the width of its container.",
|
|
12415
|
+
"attribute": "expand",
|
|
12416
|
+
"reflects": true
|
|
12417
|
+
}
|
|
12418
|
+
],
|
|
12419
|
+
"events": [
|
|
12420
|
+
{
|
|
12421
|
+
"type": {
|
|
12422
|
+
"text": "NordEvent"
|
|
12423
|
+
},
|
|
12424
|
+
"description": "Fired whenever a segmented control item has been checked.",
|
|
12425
|
+
"name": "change"
|
|
12426
|
+
}
|
|
12427
|
+
],
|
|
12428
|
+
"attributes": [
|
|
12429
|
+
{
|
|
12430
|
+
"name": "expand",
|
|
12431
|
+
"type": {
|
|
12432
|
+
"text": "boolean"
|
|
12433
|
+
},
|
|
12434
|
+
"default": "false",
|
|
12435
|
+
"description": "Controls whether the segmented control expands to fill the width of its container.",
|
|
12436
|
+
"fieldName": "expand"
|
|
12437
|
+
}
|
|
12438
|
+
],
|
|
12439
|
+
"superclass": {
|
|
12440
|
+
"name": "LitElement",
|
|
12441
|
+
"package": "lit"
|
|
12442
|
+
},
|
|
12443
|
+
"localization": [],
|
|
12444
|
+
"status": "new",
|
|
12445
|
+
"category": "action",
|
|
12446
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use segmented control to allow users to pick one choice from a set of closely related choices, and immediately apply that selection.\n- Favor segmented control or [radio component](/components/radio/) over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Segmented control items are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of segmented control items.\n- Give each segmented control item within a group a unique `value`.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a [checkbox](/components/checkbox/) or [selectable tag](/components/tag/?example=selectable) instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a [checkbox](/components/checkbox/) instead.\n- When you have more than 5 options to choose from. Consider using a [select](/components/select/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nSegmented control labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing segmented control labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Once a segmented control item has been selected, users cannot return to having no items selected without refreshing their browser window. Therefore, you should always make sure one of the items is pre-selected.\n",
|
|
12447
|
+
"examples": [],
|
|
12448
|
+
"dependencies": [],
|
|
12449
|
+
"tagName": "nord-segmented-control",
|
|
12450
|
+
"customElement": true
|
|
12451
|
+
}
|
|
12452
|
+
],
|
|
12453
|
+
"exports": [
|
|
12454
|
+
{
|
|
12455
|
+
"kind": "js",
|
|
12456
|
+
"name": "default",
|
|
12457
|
+
"declaration": {
|
|
12458
|
+
"name": "SegmentedControl",
|
|
12459
|
+
"module": "src/segmented-control/SegmentedControl.ts"
|
|
12460
|
+
}
|
|
12461
|
+
},
|
|
12462
|
+
{
|
|
12463
|
+
"kind": "custom-element-definition",
|
|
12464
|
+
"name": "nord-segmented-control",
|
|
12465
|
+
"declaration": {
|
|
12466
|
+
"name": "SegmentedControl",
|
|
12467
|
+
"module": "src/segmented-control/SegmentedControl.ts"
|
|
12468
|
+
}
|
|
12469
|
+
}
|
|
12470
|
+
]
|
|
12471
|
+
},
|
|
12386
12472
|
{
|
|
12387
12473
|
"kind": "javascript-module",
|
|
12388
12474
|
"path": "src/range/Range.ts",
|
|
@@ -13165,98 +13251,12 @@
|
|
|
13165
13251
|
"module": "/src/common/mixins/ReadonlyMixin.js"
|
|
13166
13252
|
},
|
|
13167
13253
|
{
|
|
13168
|
-
"name": "InputMixin",
|
|
13169
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
13170
|
-
},
|
|
13171
|
-
{
|
|
13172
|
-
"name": "FocusableMixin",
|
|
13173
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
13174
|
-
}
|
|
13175
|
-
],
|
|
13176
|
-
"superclass": {
|
|
13177
|
-
"name": "LitElement",
|
|
13178
|
-
"package": "lit"
|
|
13179
|
-
},
|
|
13180
|
-
"localization": [],
|
|
13181
|
-
"status": "ready",
|
|
13182
|
-
"category": "form",
|
|
13183
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to let user specify a numeric value using a slider.\n- Use when the accuracy of the numeric value entered isn’t important.\n- Always use with a label, even if that label is hidden.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the accuracy of the numeric value entered is important.\n- For entering arbitrary numeric values. Use [input component](/components/input/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRange labels act as a title for the range input. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Lightness percentage</div>\n<div class=\"n-usage n-usage-dont\">What is the lightness percentage?</div>\n\nWhen writing range 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\">Item price</div>\n<div class=\"n-usage n-usage-dont\">Item Price</div>\n\nDo not use colons in range label:\n\n<div class=\"n-usage n-usage-do\">Color depth</div>\n<div class=\"n-usage n-usage-dont\">Color depth:</div>\n",
|
|
13184
|
-
"examples": [],
|
|
13185
|
-
"dependencies": [],
|
|
13186
|
-
"tagName": "nord-range",
|
|
13187
|
-
"customElement": true
|
|
13188
|
-
}
|
|
13189
|
-
],
|
|
13190
|
-
"exports": [
|
|
13191
|
-
{
|
|
13192
|
-
"kind": "js",
|
|
13193
|
-
"name": "default",
|
|
13194
|
-
"declaration": {
|
|
13195
|
-
"name": "Range",
|
|
13196
|
-
"module": "src/range/Range.ts"
|
|
13197
|
-
}
|
|
13198
|
-
},
|
|
13199
|
-
{
|
|
13200
|
-
"kind": "custom-element-definition",
|
|
13201
|
-
"name": "nord-range",
|
|
13202
|
-
"declaration": {
|
|
13203
|
-
"name": "Range",
|
|
13204
|
-
"module": "src/range/Range.ts"
|
|
13205
|
-
}
|
|
13206
|
-
}
|
|
13207
|
-
]
|
|
13208
|
-
},
|
|
13209
|
-
{
|
|
13210
|
-
"kind": "javascript-module",
|
|
13211
|
-
"path": "src/segmented-control/SegmentedControl.ts",
|
|
13212
|
-
"declarations": [
|
|
13213
|
-
{
|
|
13214
|
-
"kind": "class",
|
|
13215
|
-
"description": "Segmented control is used to pick one choice from a set of\nclosely related choices, and immediately apply that selection.",
|
|
13216
|
-
"name": "SegmentedControl",
|
|
13217
|
-
"slots": [
|
|
13218
|
-
{
|
|
13219
|
-
"description": "Default slot.",
|
|
13220
|
-
"name": ""
|
|
13221
|
-
}
|
|
13222
|
-
],
|
|
13223
|
-
"members": [
|
|
13224
|
-
{
|
|
13225
|
-
"kind": "field",
|
|
13226
|
-
"name": "defaultSlot",
|
|
13227
|
-
"privacy": "private",
|
|
13228
|
-
"default": "new SlotController(this)"
|
|
13229
|
-
},
|
|
13230
|
-
{
|
|
13231
|
-
"kind": "field",
|
|
13232
|
-
"name": "expand",
|
|
13233
|
-
"type": {
|
|
13234
|
-
"text": "boolean"
|
|
13235
|
-
},
|
|
13236
|
-
"default": "false",
|
|
13237
|
-
"description": "Controls whether the segmented control expands to fill the width of its container.",
|
|
13238
|
-
"attribute": "expand",
|
|
13239
|
-
"reflects": true
|
|
13240
|
-
}
|
|
13241
|
-
],
|
|
13242
|
-
"events": [
|
|
13243
|
-
{
|
|
13244
|
-
"type": {
|
|
13245
|
-
"text": "NordEvent"
|
|
13246
|
-
},
|
|
13247
|
-
"description": "Fired whenever a segmented control item has been checked.",
|
|
13248
|
-
"name": "change"
|
|
13249
|
-
}
|
|
13250
|
-
],
|
|
13251
|
-
"attributes": [
|
|
13254
|
+
"name": "InputMixin",
|
|
13255
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
13256
|
+
},
|
|
13252
13257
|
{
|
|
13253
|
-
"name": "
|
|
13254
|
-
"
|
|
13255
|
-
"text": "boolean"
|
|
13256
|
-
},
|
|
13257
|
-
"default": "false",
|
|
13258
|
-
"description": "Controls whether the segmented control expands to fill the width of its container.",
|
|
13259
|
-
"fieldName": "expand"
|
|
13258
|
+
"name": "FocusableMixin",
|
|
13259
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
13260
13260
|
}
|
|
13261
13261
|
],
|
|
13262
13262
|
"superclass": {
|
|
@@ -13264,12 +13264,12 @@
|
|
|
13264
13264
|
"package": "lit"
|
|
13265
13265
|
},
|
|
13266
13266
|
"localization": [],
|
|
13267
|
-
"status": "
|
|
13268
|
-
"category": "
|
|
13269
|
-
"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
|
|
13267
|
+
"status": "ready",
|
|
13268
|
+
"category": "form",
|
|
13269
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to let user specify a numeric value using a slider.\n- Use when the accuracy of the numeric value entered isn’t important.\n- Always use with a label, even if that label is hidden.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the accuracy of the numeric value entered is important.\n- For entering arbitrary numeric values. Use [input component](/components/input/) instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRange labels act as a title for the range input. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Lightness percentage</div>\n<div class=\"n-usage n-usage-dont\">What is the lightness percentage?</div>\n\nWhen writing range 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\">Item price</div>\n<div class=\"n-usage n-usage-dont\">Item Price</div>\n\nDo not use colons in range label:\n\n<div class=\"n-usage n-usage-do\">Color depth</div>\n<div class=\"n-usage n-usage-dont\">Color depth:</div>\n",
|
|
13270
13270
|
"examples": [],
|
|
13271
13271
|
"dependencies": [],
|
|
13272
|
-
"tagName": "nord-
|
|
13272
|
+
"tagName": "nord-range",
|
|
13273
13273
|
"customElement": true
|
|
13274
13274
|
}
|
|
13275
13275
|
],
|
|
@@ -13278,16 +13278,16 @@
|
|
|
13278
13278
|
"kind": "js",
|
|
13279
13279
|
"name": "default",
|
|
13280
13280
|
"declaration": {
|
|
13281
|
-
"name": "
|
|
13282
|
-
"module": "src/
|
|
13281
|
+
"name": "Range",
|
|
13282
|
+
"module": "src/range/Range.ts"
|
|
13283
13283
|
}
|
|
13284
13284
|
},
|
|
13285
13285
|
{
|
|
13286
13286
|
"kind": "custom-element-definition",
|
|
13287
|
-
"name": "nord-
|
|
13287
|
+
"name": "nord-range",
|
|
13288
13288
|
"declaration": {
|
|
13289
|
-
"name": "
|
|
13290
|
-
"module": "src/
|
|
13289
|
+
"name": "Range",
|
|
13290
|
+
"module": "src/range/Range.ts"
|
|
13291
13291
|
}
|
|
13292
13292
|
}
|
|
13293
13293
|
]
|
|
@@ -15759,246 +15759,51 @@
|
|
|
15759
15759
|
"description": "The value of the form component.",
|
|
15760
15760
|
"fieldName": "value",
|
|
15761
15761
|
"inheritedFrom": {
|
|
15762
|
-
"name": "InputMixin",
|
|
15763
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
15764
|
-
}
|
|
15765
|
-
},
|
|
15766
|
-
{
|
|
15767
|
-
"name": "form",
|
|
15768
|
-
"type": {
|
|
15769
|
-
"text": "HTMLFormElement | null"
|
|
15770
|
-
},
|
|
15771
|
-
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
15772
|
-
"fieldName": "form",
|
|
15773
|
-
"inheritedFrom": {
|
|
15774
|
-
"name": "InputMixin",
|
|
15775
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
15776
|
-
}
|
|
15777
|
-
}
|
|
15778
|
-
],
|
|
15779
|
-
"mixins": [
|
|
15780
|
-
{
|
|
15781
|
-
"name": "InputMixin",
|
|
15782
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
15783
|
-
},
|
|
15784
|
-
{
|
|
15785
|
-
"name": "FocusableMixin",
|
|
15786
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
15787
|
-
}
|
|
15788
|
-
],
|
|
15789
|
-
"superclass": {
|
|
15790
|
-
"name": "LitElement",
|
|
15791
|
-
"package": "lit"
|
|
15792
|
-
},
|
|
15793
|
-
"localization": [
|
|
15794
|
-
{
|
|
15795
|
-
"name": "removeLabel",
|
|
15796
|
-
"description": "Accessible label for the remove button."
|
|
15797
|
-
}
|
|
15798
|
-
],
|
|
15799
|
-
"status": "new",
|
|
15800
|
-
"category": "text",
|
|
15801
|
-
"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 labeling, categorizing, or organizing objects.\n- Ensure there is enough space around tags when they are interactive.\n- Always position tags so that it’s easy to understand what object they’re related to.\n- Keep in mind that tags can increase the amount of cognitive noise, particularly when combined with the status component, so use them in moderation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for showing the status of an object, use the [badge component](/components/badge/) instead.\n- Don’t use when you want to highlight something that has been added recently, use the [badge component](/components/badge/) instead.\n- Don’t use alternatives to existing tag variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nTags should use short and clear labels for easy scanning. They should be concise and informative:\n\n<div class=\"n-usage n-usage-do\">Has seizures</div>\n<div class=\"n-usage n-usage-dont\">This dog has seizures often</div>\n\nWhen writing tag 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\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">Service Dog</div>\n\nAvoid unnecessary words and articles in tag labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">A service dog</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ------------ | ------------------------------------------------- |\n| `default` | The default variant for a non-interactive tag. |\n| `removable` | Used for tags that can be removed by the user. |\n| `selectable` | Used for tags that can be selected or deselected. |\n",
|
|
15802
|
-
"examples": [],
|
|
15803
|
-
"dependencies": [
|
|
15804
|
-
"icon"
|
|
15805
|
-
],
|
|
15806
|
-
"tagName": "nord-tag",
|
|
15807
|
-
"customElement": true
|
|
15808
|
-
}
|
|
15809
|
-
],
|
|
15810
|
-
"exports": [
|
|
15811
|
-
{
|
|
15812
|
-
"kind": "js",
|
|
15813
|
-
"name": "default",
|
|
15814
|
-
"declaration": {
|
|
15815
|
-
"name": "Tag",
|
|
15816
|
-
"module": "src/tag/Tag.ts"
|
|
15817
|
-
}
|
|
15818
|
-
},
|
|
15819
|
-
{
|
|
15820
|
-
"kind": "custom-element-definition",
|
|
15821
|
-
"name": "nord-tag",
|
|
15822
|
-
"declaration": {
|
|
15823
|
-
"name": "Tag",
|
|
15824
|
-
"module": "src/tag/Tag.ts"
|
|
15825
|
-
}
|
|
15826
|
-
}
|
|
15827
|
-
]
|
|
15828
|
-
},
|
|
15829
|
-
{
|
|
15830
|
-
"kind": "javascript-module",
|
|
15831
|
-
"path": "src/tag/localization.ts",
|
|
15832
|
-
"declarations": [
|
|
15833
|
-
{
|
|
15834
|
-
"kind": "variable",
|
|
15835
|
-
"name": "localization",
|
|
15836
|
-
"type": {
|
|
15837
|
-
"text": "object"
|
|
15838
|
-
},
|
|
15839
|
-
"default": "{ removeLabel: \"Remove\", }"
|
|
15840
|
-
}
|
|
15841
|
-
],
|
|
15842
|
-
"exports": [
|
|
15843
|
-
{
|
|
15844
|
-
"kind": "js",
|
|
15845
|
-
"name": "default",
|
|
15846
|
-
"declaration": {
|
|
15847
|
-
"name": "localization",
|
|
15848
|
-
"module": "src/tag/localization.ts"
|
|
15849
|
-
}
|
|
15850
|
-
}
|
|
15851
|
-
]
|
|
15852
|
-
},
|
|
15853
|
-
{
|
|
15854
|
-
"kind": "javascript-module",
|
|
15855
|
-
"path": "src/tag-group/TagGroup.ts",
|
|
15856
|
-
"declarations": [
|
|
15857
|
-
{
|
|
15858
|
-
"kind": "class",
|
|
15859
|
-
"description": "Tag groups are designed to bring together selectable tags that are of a similar nature. For example categories you can filter by.",
|
|
15860
|
-
"name": "TagGroup",
|
|
15861
|
-
"cssProperties": [
|
|
15862
|
-
{
|
|
15863
|
-
"description": "Controls the rounded corners of the tag group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
|
|
15864
|
-
"name": "--n-tag-group-border-radius",
|
|
15865
|
-
"default": "var(--n-border-radius-s)"
|
|
15866
|
-
},
|
|
15867
|
-
{
|
|
15868
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
|
|
15869
|
-
"name": "--n-tag-group-box-shadow",
|
|
15870
|
-
"default": "var(--n-box-shadow)"
|
|
15871
|
-
}
|
|
15872
|
-
],
|
|
15873
|
-
"slots": [
|
|
15874
|
-
{
|
|
15875
|
-
"description": "The tag group content",
|
|
15876
|
-
"name": ""
|
|
15877
|
-
}
|
|
15878
|
-
],
|
|
15879
|
-
"members": [
|
|
15880
|
-
{
|
|
15881
|
-
"kind": "field",
|
|
15882
|
-
"name": "defaultSlot",
|
|
15883
|
-
"privacy": "private",
|
|
15884
|
-
"default": "new SlotController(this)"
|
|
15885
|
-
},
|
|
15886
|
-
{
|
|
15887
|
-
"kind": "field",
|
|
15888
|
-
"name": "dirController",
|
|
15889
|
-
"privacy": "private",
|
|
15890
|
-
"default": "new DirectionController(this)"
|
|
15891
|
-
},
|
|
15892
|
-
{
|
|
15893
|
-
"kind": "field",
|
|
15894
|
-
"name": "variant",
|
|
15895
|
-
"type": {
|
|
15896
|
-
"text": "\"default\" | \"spaced\""
|
|
15897
|
-
},
|
|
15898
|
-
"default": "\"default\"",
|
|
15899
|
-
"description": "The style variant of the tag group.",
|
|
15900
|
-
"attribute": "variant",
|
|
15901
|
-
"reflects": true
|
|
15902
|
-
},
|
|
15903
|
-
{
|
|
15904
|
-
"kind": "field",
|
|
15905
|
-
"name": "direction",
|
|
15906
|
-
"type": {
|
|
15907
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
15908
|
-
},
|
|
15909
|
-
"default": "\"horizontal\"",
|
|
15910
|
-
"description": "The direction of the tag group.",
|
|
15911
|
-
"attribute": "direction",
|
|
15912
|
-
"reflects": true
|
|
15913
|
-
},
|
|
15914
|
-
{
|
|
15915
|
-
"kind": "field",
|
|
15916
|
-
"name": "wrap",
|
|
15917
|
-
"type": {
|
|
15918
|
-
"text": "boolean"
|
|
15919
|
-
},
|
|
15920
|
-
"default": "false",
|
|
15921
|
-
"description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
15922
|
-
"attribute": "wrap",
|
|
15923
|
-
"reflects": true
|
|
15924
|
-
},
|
|
15925
|
-
{
|
|
15926
|
-
"kind": "field",
|
|
15927
|
-
"name": "role",
|
|
15928
|
-
"type": {
|
|
15929
|
-
"text": "string"
|
|
15930
|
-
},
|
|
15931
|
-
"default": "\"group\"",
|
|
15932
|
-
"description": "The appropriate role for the containing element.",
|
|
15933
|
-
"attribute": "role",
|
|
15934
|
-
"reflects": true
|
|
15935
|
-
}
|
|
15936
|
-
],
|
|
15937
|
-
"events": [
|
|
15938
|
-
{
|
|
15939
|
-
"type": {
|
|
15940
|
-
"text": "NordEvent"
|
|
15941
|
-
},
|
|
15942
|
-
"description": "Fired whenever a tag has been checked or unchecked via user interaction.",
|
|
15943
|
-
"name": "change"
|
|
15944
|
-
},
|
|
15945
|
-
{
|
|
15946
|
-
"type": {
|
|
15947
|
-
"text": "NordEvent"
|
|
15948
|
-
},
|
|
15949
|
-
"description": "Fired when the remove button is activated on a tag. This event should be used to remove the tag from the DOM.",
|
|
15950
|
-
"name": "remove"
|
|
15951
|
-
}
|
|
15952
|
-
],
|
|
15953
|
-
"attributes": [
|
|
15954
|
-
{
|
|
15955
|
-
"name": "variant",
|
|
15956
|
-
"type": {
|
|
15957
|
-
"text": "\"default\" | \"spaced\""
|
|
15958
|
-
},
|
|
15959
|
-
"default": "\"default\"",
|
|
15960
|
-
"description": "The style variant of the tag group.",
|
|
15961
|
-
"fieldName": "variant"
|
|
15962
|
-
},
|
|
15963
|
-
{
|
|
15964
|
-
"name": "direction",
|
|
15965
|
-
"type": {
|
|
15966
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
15967
|
-
},
|
|
15968
|
-
"default": "\"horizontal\"",
|
|
15969
|
-
"description": "The direction of the tag group.",
|
|
15970
|
-
"fieldName": "direction"
|
|
15971
|
-
},
|
|
15972
|
-
{
|
|
15973
|
-
"name": "wrap",
|
|
15974
|
-
"type": {
|
|
15975
|
-
"text": "boolean"
|
|
15976
|
-
},
|
|
15977
|
-
"default": "false",
|
|
15978
|
-
"description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
15979
|
-
"fieldName": "wrap"
|
|
15762
|
+
"name": "InputMixin",
|
|
15763
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
15764
|
+
}
|
|
15980
15765
|
},
|
|
15981
15766
|
{
|
|
15982
|
-
"name": "
|
|
15767
|
+
"name": "form",
|
|
15983
15768
|
"type": {
|
|
15984
|
-
"text": "
|
|
15769
|
+
"text": "HTMLFormElement | null"
|
|
15985
15770
|
},
|
|
15986
|
-
"
|
|
15987
|
-
"
|
|
15988
|
-
"
|
|
15771
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
15772
|
+
"fieldName": "form",
|
|
15773
|
+
"inheritedFrom": {
|
|
15774
|
+
"name": "InputMixin",
|
|
15775
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
15776
|
+
}
|
|
15777
|
+
}
|
|
15778
|
+
],
|
|
15779
|
+
"mixins": [
|
|
15780
|
+
{
|
|
15781
|
+
"name": "InputMixin",
|
|
15782
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
15783
|
+
},
|
|
15784
|
+
{
|
|
15785
|
+
"name": "FocusableMixin",
|
|
15786
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
15989
15787
|
}
|
|
15990
15788
|
],
|
|
15991
15789
|
"superclass": {
|
|
15992
15790
|
"name": "LitElement",
|
|
15993
15791
|
"package": "lit"
|
|
15994
15792
|
},
|
|
15995
|
-
"localization": [
|
|
15793
|
+
"localization": [
|
|
15794
|
+
{
|
|
15795
|
+
"name": "removeLabel",
|
|
15796
|
+
"description": "Accessible label for the remove button."
|
|
15797
|
+
}
|
|
15798
|
+
],
|
|
15996
15799
|
"status": "new",
|
|
15997
|
-
"category": "
|
|
15998
|
-
"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
|
|
15800
|
+
"category": "text",
|
|
15801
|
+
"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 labeling, categorizing, or organizing objects.\n- Ensure there is enough space around tags when they are interactive.\n- Always position tags so that it’s easy to understand what object they’re related to.\n- Keep in mind that tags can increase the amount of cognitive noise, particularly when combined with the status component, so use them in moderation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for showing the status of an object, use the [badge component](/components/badge/) instead.\n- Don’t use when you want to highlight something that has been added recently, use the [badge component](/components/badge/) instead.\n- Don’t use alternatives to existing tag variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nTags should use short and clear labels for easy scanning. They should be concise and informative:\n\n<div class=\"n-usage n-usage-do\">Has seizures</div>\n<div class=\"n-usage n-usage-dont\">This dog has seizures often</div>\n\nWhen writing tag 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\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">Service Dog</div>\n\nAvoid unnecessary words and articles in tag labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">A service dog</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ------------ | ------------------------------------------------- |\n| `default` | The default variant for a non-interactive tag. |\n| `removable` | Used for tags that can be removed by the user. |\n| `selectable` | Used for tags that can be selected or deselected. |\n",
|
|
15999
15802
|
"examples": [],
|
|
16000
|
-
"dependencies": [
|
|
16001
|
-
|
|
15803
|
+
"dependencies": [
|
|
15804
|
+
"icon"
|
|
15805
|
+
],
|
|
15806
|
+
"tagName": "nord-tag",
|
|
16002
15807
|
"customElement": true
|
|
16003
15808
|
}
|
|
16004
15809
|
],
|
|
@@ -16007,16 +15812,40 @@
|
|
|
16007
15812
|
"kind": "js",
|
|
16008
15813
|
"name": "default",
|
|
16009
15814
|
"declaration": {
|
|
16010
|
-
"name": "
|
|
16011
|
-
"module": "src/tag
|
|
15815
|
+
"name": "Tag",
|
|
15816
|
+
"module": "src/tag/Tag.ts"
|
|
16012
15817
|
}
|
|
16013
15818
|
},
|
|
16014
15819
|
{
|
|
16015
15820
|
"kind": "custom-element-definition",
|
|
16016
|
-
"name": "nord-tag
|
|
15821
|
+
"name": "nord-tag",
|
|
16017
15822
|
"declaration": {
|
|
16018
|
-
"name": "
|
|
16019
|
-
"module": "src/tag
|
|
15823
|
+
"name": "Tag",
|
|
15824
|
+
"module": "src/tag/Tag.ts"
|
|
15825
|
+
}
|
|
15826
|
+
}
|
|
15827
|
+
]
|
|
15828
|
+
},
|
|
15829
|
+
{
|
|
15830
|
+
"kind": "javascript-module",
|
|
15831
|
+
"path": "src/tag/localization.ts",
|
|
15832
|
+
"declarations": [
|
|
15833
|
+
{
|
|
15834
|
+
"kind": "variable",
|
|
15835
|
+
"name": "localization",
|
|
15836
|
+
"type": {
|
|
15837
|
+
"text": "object"
|
|
15838
|
+
},
|
|
15839
|
+
"default": "{ removeLabel: \"Remove\", }"
|
|
15840
|
+
}
|
|
15841
|
+
],
|
|
15842
|
+
"exports": [
|
|
15843
|
+
{
|
|
15844
|
+
"kind": "js",
|
|
15845
|
+
"name": "default",
|
|
15846
|
+
"declaration": {
|
|
15847
|
+
"name": "localization",
|
|
15848
|
+
"module": "src/tag/localization.ts"
|
|
16020
15849
|
}
|
|
16021
15850
|
}
|
|
16022
15851
|
]
|
|
@@ -17020,34 +16849,229 @@
|
|
|
17020
16849
|
"module": "/src/common/mixins/ReadonlyMixin.js"
|
|
17021
16850
|
},
|
|
17022
16851
|
{
|
|
17023
|
-
"name": "TextSelectableMixin",
|
|
17024
|
-
"module": "/src/common/mixins/TextSelectableMixin.js"
|
|
16852
|
+
"name": "TextSelectableMixin",
|
|
16853
|
+
"module": "/src/common/mixins/TextSelectableMixin.js"
|
|
16854
|
+
},
|
|
16855
|
+
{
|
|
16856
|
+
"name": "InputMixin",
|
|
16857
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
16858
|
+
},
|
|
16859
|
+
{
|
|
16860
|
+
"name": "FocusableMixin",
|
|
16861
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
16862
|
+
}
|
|
16863
|
+
],
|
|
16864
|
+
"superclass": {
|
|
16865
|
+
"name": "LitElement",
|
|
16866
|
+
"package": "lit"
|
|
16867
|
+
},
|
|
16868
|
+
"localization": [
|
|
16869
|
+
{
|
|
16870
|
+
"name": "remainingCharacters",
|
|
16871
|
+
"description": "A function which receives the number of remaining characters and returns a string to be used as the aria-live message."
|
|
16872
|
+
}
|
|
16873
|
+
],
|
|
16874
|
+
"status": "ready",
|
|
16875
|
+
"category": "form",
|
|
16876
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow text input where the expected input is long.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is short. Use input component instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nTextarea labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing textarea labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide Description</div>\n\nWhen a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in textarea labels:\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide description:</div>\n",
|
|
16877
|
+
"examples": [],
|
|
16878
|
+
"dependencies": [],
|
|
16879
|
+
"tagName": "nord-textarea",
|
|
16880
|
+
"customElement": true
|
|
16881
|
+
}
|
|
16882
|
+
],
|
|
16883
|
+
"exports": [
|
|
16884
|
+
{
|
|
16885
|
+
"kind": "js",
|
|
16886
|
+
"name": "default",
|
|
16887
|
+
"declaration": {
|
|
16888
|
+
"name": "Textarea",
|
|
16889
|
+
"module": "src/textarea/Textarea.ts"
|
|
16890
|
+
}
|
|
16891
|
+
},
|
|
16892
|
+
{
|
|
16893
|
+
"kind": "custom-element-definition",
|
|
16894
|
+
"name": "nord-textarea",
|
|
16895
|
+
"declaration": {
|
|
16896
|
+
"name": "Textarea",
|
|
16897
|
+
"module": "src/textarea/Textarea.ts"
|
|
16898
|
+
}
|
|
16899
|
+
}
|
|
16900
|
+
]
|
|
16901
|
+
},
|
|
16902
|
+
{
|
|
16903
|
+
"kind": "javascript-module",
|
|
16904
|
+
"path": "src/textarea/localization.ts",
|
|
16905
|
+
"declarations": [
|
|
16906
|
+
{
|
|
16907
|
+
"kind": "variable",
|
|
16908
|
+
"name": "localization",
|
|
16909
|
+
"type": {
|
|
16910
|
+
"text": "object"
|
|
16911
|
+
},
|
|
16912
|
+
"default": "{ remainingCharacters: (remainder: number) => `Characters remaining: ${remainder}`, }"
|
|
16913
|
+
}
|
|
16914
|
+
],
|
|
16915
|
+
"exports": [
|
|
16916
|
+
{
|
|
16917
|
+
"kind": "js",
|
|
16918
|
+
"name": "default",
|
|
16919
|
+
"declaration": {
|
|
16920
|
+
"name": "localization",
|
|
16921
|
+
"module": "src/textarea/localization.ts"
|
|
16922
|
+
}
|
|
16923
|
+
}
|
|
16924
|
+
]
|
|
16925
|
+
},
|
|
16926
|
+
{
|
|
16927
|
+
"kind": "javascript-module",
|
|
16928
|
+
"path": "src/tag-group/TagGroup.ts",
|
|
16929
|
+
"declarations": [
|
|
16930
|
+
{
|
|
16931
|
+
"kind": "class",
|
|
16932
|
+
"description": "Tag groups are designed to bring together selectable tags that are of a similar nature. For example categories you can filter by.",
|
|
16933
|
+
"name": "TagGroup",
|
|
16934
|
+
"cssProperties": [
|
|
16935
|
+
{
|
|
16936
|
+
"description": "Controls the rounded corners of the tag group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
|
|
16937
|
+
"name": "--n-tag-group-border-radius",
|
|
16938
|
+
"default": "var(--n-border-radius-s)"
|
|
16939
|
+
},
|
|
16940
|
+
{
|
|
16941
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
|
|
16942
|
+
"name": "--n-tag-group-box-shadow",
|
|
16943
|
+
"default": "var(--n-box-shadow)"
|
|
16944
|
+
}
|
|
16945
|
+
],
|
|
16946
|
+
"slots": [
|
|
16947
|
+
{
|
|
16948
|
+
"description": "The tag group content",
|
|
16949
|
+
"name": ""
|
|
16950
|
+
}
|
|
16951
|
+
],
|
|
16952
|
+
"members": [
|
|
16953
|
+
{
|
|
16954
|
+
"kind": "field",
|
|
16955
|
+
"name": "defaultSlot",
|
|
16956
|
+
"privacy": "private",
|
|
16957
|
+
"default": "new SlotController(this)"
|
|
16958
|
+
},
|
|
16959
|
+
{
|
|
16960
|
+
"kind": "field",
|
|
16961
|
+
"name": "dirController",
|
|
16962
|
+
"privacy": "private",
|
|
16963
|
+
"default": "new DirectionController(this)"
|
|
16964
|
+
},
|
|
16965
|
+
{
|
|
16966
|
+
"kind": "field",
|
|
16967
|
+
"name": "variant",
|
|
16968
|
+
"type": {
|
|
16969
|
+
"text": "\"default\" | \"spaced\""
|
|
16970
|
+
},
|
|
16971
|
+
"default": "\"default\"",
|
|
16972
|
+
"description": "The style variant of the tag group.",
|
|
16973
|
+
"attribute": "variant",
|
|
16974
|
+
"reflects": true
|
|
16975
|
+
},
|
|
16976
|
+
{
|
|
16977
|
+
"kind": "field",
|
|
16978
|
+
"name": "direction",
|
|
16979
|
+
"type": {
|
|
16980
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
16981
|
+
},
|
|
16982
|
+
"default": "\"horizontal\"",
|
|
16983
|
+
"description": "The direction of the tag group.",
|
|
16984
|
+
"attribute": "direction",
|
|
16985
|
+
"reflects": true
|
|
16986
|
+
},
|
|
16987
|
+
{
|
|
16988
|
+
"kind": "field",
|
|
16989
|
+
"name": "wrap",
|
|
16990
|
+
"type": {
|
|
16991
|
+
"text": "boolean"
|
|
16992
|
+
},
|
|
16993
|
+
"default": "false",
|
|
16994
|
+
"description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
16995
|
+
"attribute": "wrap",
|
|
16996
|
+
"reflects": true
|
|
16997
|
+
},
|
|
16998
|
+
{
|
|
16999
|
+
"kind": "field",
|
|
17000
|
+
"name": "role",
|
|
17001
|
+
"type": {
|
|
17002
|
+
"text": "string"
|
|
17003
|
+
},
|
|
17004
|
+
"default": "\"group\"",
|
|
17005
|
+
"description": "The appropriate role for the containing element.",
|
|
17006
|
+
"attribute": "role",
|
|
17007
|
+
"reflects": true
|
|
17008
|
+
}
|
|
17009
|
+
],
|
|
17010
|
+
"events": [
|
|
17011
|
+
{
|
|
17012
|
+
"type": {
|
|
17013
|
+
"text": "NordEvent"
|
|
17014
|
+
},
|
|
17015
|
+
"description": "Fired whenever a tag has been checked or unchecked via user interaction.",
|
|
17016
|
+
"name": "change"
|
|
17017
|
+
},
|
|
17018
|
+
{
|
|
17019
|
+
"type": {
|
|
17020
|
+
"text": "NordEvent"
|
|
17021
|
+
},
|
|
17022
|
+
"description": "Fired when the remove button is activated on a tag. This event should be used to remove the tag from the DOM.",
|
|
17023
|
+
"name": "remove"
|
|
17024
|
+
}
|
|
17025
|
+
],
|
|
17026
|
+
"attributes": [
|
|
17027
|
+
{
|
|
17028
|
+
"name": "variant",
|
|
17029
|
+
"type": {
|
|
17030
|
+
"text": "\"default\" | \"spaced\""
|
|
17031
|
+
},
|
|
17032
|
+
"default": "\"default\"",
|
|
17033
|
+
"description": "The style variant of the tag group.",
|
|
17034
|
+
"fieldName": "variant"
|
|
17035
|
+
},
|
|
17036
|
+
{
|
|
17037
|
+
"name": "direction",
|
|
17038
|
+
"type": {
|
|
17039
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
17040
|
+
},
|
|
17041
|
+
"default": "\"horizontal\"",
|
|
17042
|
+
"description": "The direction of the tag group.",
|
|
17043
|
+
"fieldName": "direction"
|
|
17025
17044
|
},
|
|
17026
17045
|
{
|
|
17027
|
-
"name": "
|
|
17028
|
-
"
|
|
17046
|
+
"name": "wrap",
|
|
17047
|
+
"type": {
|
|
17048
|
+
"text": "boolean"
|
|
17049
|
+
},
|
|
17050
|
+
"default": "false",
|
|
17051
|
+
"description": "Defines whether the tags are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
17052
|
+
"fieldName": "wrap"
|
|
17029
17053
|
},
|
|
17030
17054
|
{
|
|
17031
|
-
"name": "
|
|
17032
|
-
"
|
|
17055
|
+
"name": "role",
|
|
17056
|
+
"type": {
|
|
17057
|
+
"text": "string"
|
|
17058
|
+
},
|
|
17059
|
+
"default": "\"group\"",
|
|
17060
|
+
"description": "The appropriate role for the containing element.",
|
|
17061
|
+
"fieldName": "role"
|
|
17033
17062
|
}
|
|
17034
17063
|
],
|
|
17035
17064
|
"superclass": {
|
|
17036
17065
|
"name": "LitElement",
|
|
17037
17066
|
"package": "lit"
|
|
17038
17067
|
},
|
|
17039
|
-
"localization": [
|
|
17040
|
-
|
|
17041
|
-
|
|
17042
|
-
|
|
17043
|
-
}
|
|
17044
|
-
],
|
|
17045
|
-
"status": "ready",
|
|
17046
|
-
"category": "form",
|
|
17047
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow text input where the expected input is long.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is short. Use input component instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nTextarea labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing textarea labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide Description</div>\n\nWhen a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in textarea labels:\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide description:</div>\n",
|
|
17068
|
+
"localization": [],
|
|
17069
|
+
"status": "new",
|
|
17070
|
+
"category": "structure",
|
|
17071
|
+
"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 selectable tags.\n- Use the appropriate `role` attribute on the tag group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the tag group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than selectable tags and in some instances visually hidden components to the tag 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\nTags should use short and clear labels for easy scanning. They should be concise and informative:\n\n<div class=\"n-usage n-usage-do\">Has seizures</div>\n<div class=\"n-usage n-usage-dont\">This dog has seizures often</div>\n\nWhen writing tag 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\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">Service Dog</div>\n\nAvoid unnecessary words and articles in tag labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Service dog</div>\n<div class=\"n-usage n-usage-dont\">A service dog</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| --------- | ------------------------------------------------------------------------------------------- |\n| `default` | The default variant renders a group of tags to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the tags to space them out evenly. |\n",
|
|
17048
17072
|
"examples": [],
|
|
17049
17073
|
"dependencies": [],
|
|
17050
|
-
"tagName": "nord-
|
|
17074
|
+
"tagName": "nord-tag-group",
|
|
17051
17075
|
"customElement": true
|
|
17052
17076
|
}
|
|
17053
17077
|
],
|
|
@@ -17056,40 +17080,16 @@
|
|
|
17056
17080
|
"kind": "js",
|
|
17057
17081
|
"name": "default",
|
|
17058
17082
|
"declaration": {
|
|
17059
|
-
"name": "
|
|
17060
|
-
"module": "src/
|
|
17083
|
+
"name": "TagGroup",
|
|
17084
|
+
"module": "src/tag-group/TagGroup.ts"
|
|
17061
17085
|
}
|
|
17062
17086
|
},
|
|
17063
17087
|
{
|
|
17064
17088
|
"kind": "custom-element-definition",
|
|
17065
|
-
"name": "nord-
|
|
17066
|
-
"declaration": {
|
|
17067
|
-
"name": "Textarea",
|
|
17068
|
-
"module": "src/textarea/Textarea.ts"
|
|
17069
|
-
}
|
|
17070
|
-
}
|
|
17071
|
-
]
|
|
17072
|
-
},
|
|
17073
|
-
{
|
|
17074
|
-
"kind": "javascript-module",
|
|
17075
|
-
"path": "src/textarea/localization.ts",
|
|
17076
|
-
"declarations": [
|
|
17077
|
-
{
|
|
17078
|
-
"kind": "variable",
|
|
17079
|
-
"name": "localization",
|
|
17080
|
-
"type": {
|
|
17081
|
-
"text": "object"
|
|
17082
|
-
},
|
|
17083
|
-
"default": "{ remainingCharacters: (remainder: number) => `Characters remaining: ${remainder}`, }"
|
|
17084
|
-
}
|
|
17085
|
-
],
|
|
17086
|
-
"exports": [
|
|
17087
|
-
{
|
|
17088
|
-
"kind": "js",
|
|
17089
|
-
"name": "default",
|
|
17089
|
+
"name": "nord-tag-group",
|
|
17090
17090
|
"declaration": {
|
|
17091
|
-
"name": "
|
|
17092
|
-
"module": "src/
|
|
17091
|
+
"name": "TagGroup",
|
|
17092
|
+
"module": "src/tag-group/TagGroup.ts"
|
|
17093
17093
|
}
|
|
17094
17094
|
}
|
|
17095
17095
|
]
|
|
@@ -17250,93 +17250,6 @@
|
|
|
17250
17250
|
}
|
|
17251
17251
|
]
|
|
17252
17252
|
},
|
|
17253
|
-
{
|
|
17254
|
-
"kind": "javascript-module",
|
|
17255
|
-
"path": "src/toast-group/ToastGroup.ts",
|
|
17256
|
-
"declarations": [
|
|
17257
|
-
{
|
|
17258
|
-
"kind": "class",
|
|
17259
|
-
"description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
|
|
17260
|
-
"name": "ToastGroup",
|
|
17261
|
-
"slots": [
|
|
17262
|
-
{
|
|
17263
|
-
"description": "Default slot in which to place toasts.",
|
|
17264
|
-
"name": ""
|
|
17265
|
-
}
|
|
17266
|
-
],
|
|
17267
|
-
"members": [
|
|
17268
|
-
{
|
|
17269
|
-
"kind": "method",
|
|
17270
|
-
"name": "addToast",
|
|
17271
|
-
"parameters": [
|
|
17272
|
-
{
|
|
17273
|
-
"name": "text",
|
|
17274
|
-
"type": {
|
|
17275
|
-
"text": "string"
|
|
17276
|
-
},
|
|
17277
|
-
"description": "The text/message of the toast."
|
|
17278
|
-
},
|
|
17279
|
-
{
|
|
17280
|
-
"name": "options",
|
|
17281
|
-
"default": "{}",
|
|
17282
|
-
"type": {
|
|
17283
|
-
"text": "ToastOptions"
|
|
17284
|
-
},
|
|
17285
|
-
"description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
|
|
17286
|
-
}
|
|
17287
|
-
],
|
|
17288
|
-
"description": "Convenience method for creating and adding a toast to the group.",
|
|
17289
|
-
"return": {
|
|
17290
|
-
"type": {
|
|
17291
|
-
"text": "Toast"
|
|
17292
|
-
}
|
|
17293
|
-
}
|
|
17294
|
-
}
|
|
17295
|
-
],
|
|
17296
|
-
"events": [
|
|
17297
|
-
{
|
|
17298
|
-
"type": {
|
|
17299
|
-
"text": "NordEvent"
|
|
17300
|
-
},
|
|
17301
|
-
"description": "Fired when a toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM.",
|
|
17302
|
-
"name": "dismiss"
|
|
17303
|
-
}
|
|
17304
|
-
],
|
|
17305
|
-
"superclass": {
|
|
17306
|
-
"name": "LitElement",
|
|
17307
|
-
"package": "lit"
|
|
17308
|
-
},
|
|
17309
|
-
"localization": [],
|
|
17310
|
-
"status": "ready",
|
|
17311
|
-
"category": "feedback",
|
|
17312
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
|
|
17313
|
-
"examples": [],
|
|
17314
|
-
"dependencies": [
|
|
17315
|
-
"toast"
|
|
17316
|
-
],
|
|
17317
|
-
"tagName": "nord-toast-group",
|
|
17318
|
-
"customElement": true
|
|
17319
|
-
}
|
|
17320
|
-
],
|
|
17321
|
-
"exports": [
|
|
17322
|
-
{
|
|
17323
|
-
"kind": "js",
|
|
17324
|
-
"name": "default",
|
|
17325
|
-
"declaration": {
|
|
17326
|
-
"name": "ToastGroup",
|
|
17327
|
-
"module": "src/toast-group/ToastGroup.ts"
|
|
17328
|
-
}
|
|
17329
|
-
},
|
|
17330
|
-
{
|
|
17331
|
-
"kind": "custom-element-definition",
|
|
17332
|
-
"name": "nord-toast-group",
|
|
17333
|
-
"declaration": {
|
|
17334
|
-
"name": "ToastGroup",
|
|
17335
|
-
"module": "src/toast-group/ToastGroup.ts"
|
|
17336
|
-
}
|
|
17337
|
-
}
|
|
17338
|
-
]
|
|
17339
|
-
},
|
|
17340
17253
|
{
|
|
17341
17254
|
"kind": "javascript-module",
|
|
17342
17255
|
"path": "src/toggle/Toggle.ts",
|
|
@@ -18061,6 +17974,93 @@
|
|
|
18061
17974
|
}
|
|
18062
17975
|
]
|
|
18063
17976
|
},
|
|
17977
|
+
{
|
|
17978
|
+
"kind": "javascript-module",
|
|
17979
|
+
"path": "src/toast-group/ToastGroup.ts",
|
|
17980
|
+
"declarations": [
|
|
17981
|
+
{
|
|
17982
|
+
"kind": "class",
|
|
17983
|
+
"description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
|
|
17984
|
+
"name": "ToastGroup",
|
|
17985
|
+
"slots": [
|
|
17986
|
+
{
|
|
17987
|
+
"description": "Default slot in which to place toasts.",
|
|
17988
|
+
"name": ""
|
|
17989
|
+
}
|
|
17990
|
+
],
|
|
17991
|
+
"members": [
|
|
17992
|
+
{
|
|
17993
|
+
"kind": "method",
|
|
17994
|
+
"name": "addToast",
|
|
17995
|
+
"parameters": [
|
|
17996
|
+
{
|
|
17997
|
+
"name": "text",
|
|
17998
|
+
"type": {
|
|
17999
|
+
"text": "string"
|
|
18000
|
+
},
|
|
18001
|
+
"description": "The text/message of the toast."
|
|
18002
|
+
},
|
|
18003
|
+
{
|
|
18004
|
+
"name": "options",
|
|
18005
|
+
"default": "{}",
|
|
18006
|
+
"type": {
|
|
18007
|
+
"text": "ToastOptions"
|
|
18008
|
+
},
|
|
18009
|
+
"description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
|
|
18010
|
+
}
|
|
18011
|
+
],
|
|
18012
|
+
"description": "Convenience method for creating and adding a toast to the group.",
|
|
18013
|
+
"return": {
|
|
18014
|
+
"type": {
|
|
18015
|
+
"text": "Toast"
|
|
18016
|
+
}
|
|
18017
|
+
}
|
|
18018
|
+
}
|
|
18019
|
+
],
|
|
18020
|
+
"events": [
|
|
18021
|
+
{
|
|
18022
|
+
"type": {
|
|
18023
|
+
"text": "NordEvent"
|
|
18024
|
+
},
|
|
18025
|
+
"description": "Fired when a toast is dismissed (via user action or auto-dismiss), and its exit animation has completed. This event should be used to remove the dismissed toast from the DOM.",
|
|
18026
|
+
"name": "dismiss"
|
|
18027
|
+
}
|
|
18028
|
+
],
|
|
18029
|
+
"superclass": {
|
|
18030
|
+
"name": "LitElement",
|
|
18031
|
+
"package": "lit"
|
|
18032
|
+
},
|
|
18033
|
+
"localization": [],
|
|
18034
|
+
"status": "ready",
|
|
18035
|
+
"category": "feedback",
|
|
18036
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
|
|
18037
|
+
"examples": [],
|
|
18038
|
+
"dependencies": [
|
|
18039
|
+
"toast"
|
|
18040
|
+
],
|
|
18041
|
+
"tagName": "nord-toast-group",
|
|
18042
|
+
"customElement": true
|
|
18043
|
+
}
|
|
18044
|
+
],
|
|
18045
|
+
"exports": [
|
|
18046
|
+
{
|
|
18047
|
+
"kind": "js",
|
|
18048
|
+
"name": "default",
|
|
18049
|
+
"declaration": {
|
|
18050
|
+
"name": "ToastGroup",
|
|
18051
|
+
"module": "src/toast-group/ToastGroup.ts"
|
|
18052
|
+
}
|
|
18053
|
+
},
|
|
18054
|
+
{
|
|
18055
|
+
"kind": "custom-element-definition",
|
|
18056
|
+
"name": "nord-toast-group",
|
|
18057
|
+
"declaration": {
|
|
18058
|
+
"name": "ToastGroup",
|
|
18059
|
+
"module": "src/toast-group/ToastGroup.ts"
|
|
18060
|
+
}
|
|
18061
|
+
}
|
|
18062
|
+
]
|
|
18063
|
+
},
|
|
18064
18064
|
{
|
|
18065
18065
|
"kind": "javascript-module",
|
|
18066
18066
|
"path": "src/tooltip/Tooltip.ts",
|