@nordhealth/components 2.16.1 → 2.17.1
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 +1508 -1014
- package/lib/{AutocompleteMixin-c8018288.js → AutocompleteMixin-3cf61f49.js} +2 -2
- package/lib/{AutocompleteMixin-c8018288.js.map → AutocompleteMixin-3cf61f49.js.map} +1 -1
- package/lib/Avatar.js +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/ButtonGroup.js +1 -1
- package/lib/Calendar-70103fd4.js +2 -0
- package/lib/{Calendar-27eae615.js.map → Calendar-70103fd4.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/Checkbox.js.map +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/CommandMenuAction.js.map +1 -1
- package/lib/{Component-d4d6fa77.js → Component-420bbc41.js} +2 -2
- package/lib/Component-420bbc41.js.map +1 -0
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/DateSelectEvent.js +1 -1
- package/lib/Divider.js +1 -1
- package/lib/Divider.js.map +1 -1
- package/lib/Drawer.js +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/DropdownGroup.js.map +1 -1
- package/lib/DropdownItem.js +1 -1
- package/lib/EmptyState.js +1 -1
- package/lib/EmptyState.js.map +1 -1
- package/lib/Fieldset.js +1 -1
- package/lib/{FocusableMixin-fc1e2a13.js → FocusableMixin-4300e44e.js} +2 -2
- package/lib/{FocusableMixin-fc1e2a13.js.map → FocusableMixin-4300e44e.js.map} +1 -1
- package/lib/{FormAssociatedMixin-ad4d6c08.js → FormAssociatedMixin-edf83ac6.js} +2 -2
- package/lib/{FormAssociatedMixin-ad4d6c08.js.map → FormAssociatedMixin-edf83ac6.js.map} +1 -1
- package/lib/{FormField-c733b196.js → FormField-cbfebb3f.js} +2 -2
- package/lib/FormField-cbfebb3f.js.map +1 -0
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/Icon.js +2 -2
- package/lib/Icon.js.map +1 -1
- package/lib/IconManager.js +1 -1
- package/lib/Input.js +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/{InputMixin-1564ca2a.js → InputMixin-4037827f.js} +2 -2
- package/lib/{InputMixin-1564ca2a.js.map → InputMixin-4037827f.js.map} +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/{LightDomController-3b7b1f44.js → LightDomController-f78fb046.js} +2 -2
- package/lib/{LightDomController-3b7b1f44.js.map → LightDomController-f78fb046.js.map} +1 -1
- package/lib/LocalizeController.js +1 -1
- package/lib/LocalizeController.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/NavGroup.js.map +1 -1
- package/lib/NavItem.js +1 -1
- package/lib/NavToggle.js +1 -1
- package/lib/NavToggle.js.map +1 -1
- package/lib/Navigation.js +1 -1
- package/lib/Navigation.js.map +1 -1
- package/lib/Notification.js +2 -0
- package/lib/Notification.js.map +1 -0
- package/lib/NotificationGroup.js +2 -0
- package/lib/NotificationGroup.js.map +1 -0
- package/lib/NotificationMixin-c06bb631.js +2 -0
- package/lib/NotificationMixin-c06bb631.js.map +1 -0
- package/lib/{Popout-0baf2085.js → Popout-9f0393b2.js} +2 -2
- package/lib/{Popout-0baf2085.js.map → Popout-9f0393b2.js.map} +1 -1
- package/lib/Popout.js +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/Qrcode.js +1 -1
- package/lib/Qrcode.js.map +1 -1
- package/lib/Radio.js +1 -1
- package/lib/Radio.js.map +1 -1
- package/lib/Range.js +1 -1
- package/lib/Select.js +1 -1
- package/lib/SelectEvent.js +1 -1
- package/lib/{SizeMixin-9da6dc81.js → SizeMixin-fb379434.js} +2 -2
- package/lib/{SizeMixin-9da6dc81.js.map → SizeMixin-fb379434.js.map} +1 -1
- package/lib/Skeleton.js +1 -1
- package/lib/Spinner.js +1 -1
- package/lib/Stack.js +1 -1
- package/lib/{Sticky-64b0b58a.js → Sticky-69666e8c.js} +2 -2
- package/lib/Sticky-69666e8c.js.map +1 -0
- package/lib/Tab.js +1 -1
- package/lib/Tab.js.map +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabGroup.js.map +1 -1
- package/lib/TabPanel.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/TextField-d617d0ad.js +2 -0
- package/lib/{TextField-6a272cd7.js.map → TextField-d617d0ad.js.map} +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/Textarea.js.map +1 -1
- package/lib/Toast.js +1 -1
- package/lib/Toast.js.map +1 -1
- package/lib/ToastGroup.js +1 -1
- package/lib/Toggle.js +1 -1
- package/lib/Toggle.js.map +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/VisuallyHidden.js +1 -1
- package/lib/bundle.js +16 -16
- package/lib/bundle.js.map +1 -1
- package/lib/class-map-cb77ead2.js +7 -0
- package/lib/{class-map-1bc3148f.js.map → class-map-cb77ead2.js.map} +1 -1
- package/lib/collection-2f8e38bd.js +7 -0
- package/lib/{collection-a0cd49b2.js.map → collection-2f8e38bd.js.map} +1 -1
- package/lib/cond-44672025.js +2 -0
- package/lib/{cond-8e7df9cf.js.map → cond-44672025.js.map} +1 -1
- package/lib/en-us.js +1 -1
- package/lib/en-us.js.map +1 -1
- package/lib/events-d9666e88.js +2 -0
- package/lib/events-d9666e88.js.map +1 -0
- package/lib/fi-fi.js +1 -1
- package/lib/fi-fi.js.map +1 -1
- package/lib/{if-defined-718a58b2.js → if-defined-9b177db4.js} +2 -2
- package/lib/{if-defined-718a58b2.js.map → if-defined-9b177db4.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/localization7.js +2 -0
- package/lib/localization7.js.map +1 -0
- package/lib/positioning-cc75c800.js +2 -0
- package/lib/positioning-cc75c800.js.map +1 -0
- package/lib/{query-assigned-elements-89f41e17.js → query-assigned-elements-15485e3d.js} +5 -5
- package/lib/query-assigned-elements-15485e3d.js.map +1 -0
- package/lib/ref-5526fb07.js +17 -0
- package/lib/{ref-4265fcf9.js.map → ref-5526fb07.js.map} +1 -1
- package/lib/src/common/events.d.ts +1 -0
- package/lib/src/common/mixins/NotificationMixin.d.ts +10 -0
- package/lib/src/header/Header.d.ts +4 -0
- package/lib/src/index.d.ts +2 -0
- package/lib/src/input/Input.d.ts +2 -1
- package/lib/src/layout/Layout.d.ts +2 -2
- package/lib/src/localization/en-us.d.ts +3 -0
- package/lib/src/localization/translation.d.ts +3 -0
- package/lib/src/navigation/Navigation.d.ts +2 -1
- package/lib/src/notification/Notification.d.ts +26 -0
- package/lib/src/notification/Notification.test.d.ts +1 -0
- package/lib/src/notification/localization.d.ts +4 -0
- package/lib/src/notification-group/NotificationGroup.d.ts +19 -0
- package/lib/src/notification-group/NotificationGroup.test.d.ts +1 -0
- package/lib/src/toast/Toast.d.ts +3 -4
- package/lib/style-map-ed7e6cc6.js +7 -0
- package/lib/style-map-ed7e6cc6.js.map +1 -0
- package/lib/translation.js +1 -1
- package/lib/translation.js.map +1 -1
- package/package.json +6 -6
- package/lib/Calendar-27eae615.js +0 -2
- package/lib/Component-d4d6fa77.js.map +0 -1
- package/lib/FormField-c733b196.js.map +0 -1
- package/lib/Sticky-64b0b58a.js.map +0 -1
- package/lib/TextField-6a272cd7.js +0 -2
- package/lib/class-map-1bc3148f.js +0 -7
- package/lib/collection-a0cd49b2.js +0 -7
- package/lib/cond-8e7df9cf.js +0 -2
- package/lib/events-5337a6d7.js +0 -2
- package/lib/events-5337a6d7.js.map +0 -1
- package/lib/positioning-acf73137.js +0 -2
- package/lib/positioning-acf73137.js.map +0 -1
- package/lib/query-assigned-elements-89f41e17.js.map +0 -1
- package/lib/ref-4265fcf9.js +0 -17
- package/lib/style-map-c63c0180.js +0 -7
- package/lib/style-map-c63c0180.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -398,6 +398,22 @@
|
|
|
398
398
|
"name": "default",
|
|
399
399
|
"module": "\"./button-group/ButtonGroup.js\""
|
|
400
400
|
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"kind": "js",
|
|
404
|
+
"name": "Notification",
|
|
405
|
+
"declaration": {
|
|
406
|
+
"name": "default",
|
|
407
|
+
"module": "\"./notification/Notification.js\""
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"kind": "js",
|
|
412
|
+
"name": "NotificationGroup",
|
|
413
|
+
"declaration": {
|
|
414
|
+
"name": "default",
|
|
415
|
+
"module": "\"./notification-group/NotificationGroup.js\""
|
|
416
|
+
}
|
|
401
417
|
}
|
|
402
418
|
]
|
|
403
419
|
},
|
|
@@ -564,6 +580,10 @@
|
|
|
564
580
|
"category": "image",
|
|
565
581
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Always add the name of the person using the `name` property.\n- For the best results, use square images or images cropped into a square.\n- Use the avatar to represent a single user, pet or entity.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Try to avoid using landscape or portrait images as avatars. Let users crop their images before or after uploading if possible.\n- Don't use an avatar when an icon is more suitable, for example when denoting groups or \"things\".\n\n</div>\n",
|
|
566
582
|
"examples": [],
|
|
583
|
+
"dependencies": [
|
|
584
|
+
"visually-hidden",
|
|
585
|
+
"icon"
|
|
586
|
+
],
|
|
567
587
|
"tagName": "nord-avatar",
|
|
568
588
|
"customElement": true
|
|
569
589
|
}
|
|
@@ -651,6 +671,9 @@
|
|
|
651
671
|
"category": "text",
|
|
652
672
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n",
|
|
653
673
|
"examples": [],
|
|
674
|
+
"dependencies": [
|
|
675
|
+
"icon"
|
|
676
|
+
],
|
|
654
677
|
"tagName": "nord-badge",
|
|
655
678
|
"customElement": true
|
|
656
679
|
}
|
|
@@ -674,6 +697,214 @@
|
|
|
674
697
|
}
|
|
675
698
|
]
|
|
676
699
|
},
|
|
700
|
+
{
|
|
701
|
+
"kind": "javascript-module",
|
|
702
|
+
"path": "src/banner/Banner.ts",
|
|
703
|
+
"declarations": [
|
|
704
|
+
{
|
|
705
|
+
"kind": "class",
|
|
706
|
+
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
707
|
+
"name": "Banner",
|
|
708
|
+
"cssProperties": [
|
|
709
|
+
{
|
|
710
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
711
|
+
"name": "--n-banner-border-radius",
|
|
712
|
+
"default": "var(--n-border-radius)"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
716
|
+
"name": "--n-banner-box-shadow",
|
|
717
|
+
"default": "var(--n-box-shadow-card)"
|
|
718
|
+
}
|
|
719
|
+
],
|
|
720
|
+
"slots": [
|
|
721
|
+
{
|
|
722
|
+
"description": "default slot",
|
|
723
|
+
"name": ""
|
|
724
|
+
}
|
|
725
|
+
],
|
|
726
|
+
"members": [
|
|
727
|
+
{
|
|
728
|
+
"kind": "field",
|
|
729
|
+
"name": "variant",
|
|
730
|
+
"type": {
|
|
731
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
732
|
+
},
|
|
733
|
+
"default": "\"info\"",
|
|
734
|
+
"description": "The style variant of the banner.",
|
|
735
|
+
"attribute": "variant",
|
|
736
|
+
"reflects": true
|
|
737
|
+
}
|
|
738
|
+
],
|
|
739
|
+
"attributes": [
|
|
740
|
+
{
|
|
741
|
+
"name": "variant",
|
|
742
|
+
"type": {
|
|
743
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
744
|
+
},
|
|
745
|
+
"default": "\"info\"",
|
|
746
|
+
"description": "The style variant of the banner.",
|
|
747
|
+
"fieldName": "variant"
|
|
748
|
+
}
|
|
749
|
+
],
|
|
750
|
+
"superclass": {
|
|
751
|
+
"name": "LitElement",
|
|
752
|
+
"package": "lit"
|
|
753
|
+
},
|
|
754
|
+
"localization": [],
|
|
755
|
+
"status": "ready",
|
|
756
|
+
"category": "feedback",
|
|
757
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
|
|
758
|
+
"examples": [],
|
|
759
|
+
"dependencies": [
|
|
760
|
+
"icon"
|
|
761
|
+
],
|
|
762
|
+
"tagName": "nord-banner",
|
|
763
|
+
"customElement": true
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"exports": [
|
|
767
|
+
{
|
|
768
|
+
"kind": "js",
|
|
769
|
+
"name": "default",
|
|
770
|
+
"declaration": {
|
|
771
|
+
"name": "Banner",
|
|
772
|
+
"module": "src/banner/Banner.ts"
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"kind": "custom-element-definition",
|
|
777
|
+
"name": "nord-banner",
|
|
778
|
+
"declaration": {
|
|
779
|
+
"name": "Banner",
|
|
780
|
+
"module": "src/banner/Banner.ts"
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
]
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"kind": "javascript-module",
|
|
787
|
+
"path": "src/button-group/ButtonGroup.ts",
|
|
788
|
+
"declarations": [
|
|
789
|
+
{
|
|
790
|
+
"kind": "class",
|
|
791
|
+
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
792
|
+
"name": "ButtonGroup",
|
|
793
|
+
"cssProperties": [
|
|
794
|
+
{
|
|
795
|
+
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
796
|
+
"name": "--n-button-group-border-radius",
|
|
797
|
+
"default": "var(--n-border-radius-s)"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
801
|
+
"name": "--n-button-group-box-shadow",
|
|
802
|
+
"default": "var(--n-box-shadow)"
|
|
803
|
+
}
|
|
804
|
+
],
|
|
805
|
+
"slots": [
|
|
806
|
+
{
|
|
807
|
+
"description": "The button group content",
|
|
808
|
+
"name": ""
|
|
809
|
+
}
|
|
810
|
+
],
|
|
811
|
+
"members": [
|
|
812
|
+
{
|
|
813
|
+
"kind": "field",
|
|
814
|
+
"name": "direction",
|
|
815
|
+
"type": {
|
|
816
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
817
|
+
},
|
|
818
|
+
"default": "\"horizontal\"",
|
|
819
|
+
"description": "The direction of the button group.",
|
|
820
|
+
"attribute": "direction",
|
|
821
|
+
"reflects": true
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
"kind": "field",
|
|
825
|
+
"name": "role",
|
|
826
|
+
"type": {
|
|
827
|
+
"text": "string"
|
|
828
|
+
},
|
|
829
|
+
"default": "\"group\"",
|
|
830
|
+
"description": "The appropriate role for the containing element.",
|
|
831
|
+
"attribute": "role",
|
|
832
|
+
"reflects": true
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"kind": "field",
|
|
836
|
+
"name": "_warningLogged",
|
|
837
|
+
"type": {
|
|
838
|
+
"text": "boolean"
|
|
839
|
+
},
|
|
840
|
+
"privacy": "private",
|
|
841
|
+
"static": true,
|
|
842
|
+
"default": "false",
|
|
843
|
+
"inheritedFrom": {
|
|
844
|
+
"name": "DraftComponentMixin",
|
|
845
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
],
|
|
849
|
+
"attributes": [
|
|
850
|
+
{
|
|
851
|
+
"name": "direction",
|
|
852
|
+
"type": {
|
|
853
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
854
|
+
},
|
|
855
|
+
"default": "\"horizontal\"",
|
|
856
|
+
"description": "The direction of the button group.",
|
|
857
|
+
"fieldName": "direction"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"name": "role",
|
|
861
|
+
"type": {
|
|
862
|
+
"text": "string"
|
|
863
|
+
},
|
|
864
|
+
"default": "\"group\"",
|
|
865
|
+
"description": "The appropriate role for the containing element.",
|
|
866
|
+
"fieldName": "role"
|
|
867
|
+
}
|
|
868
|
+
],
|
|
869
|
+
"mixins": [
|
|
870
|
+
{
|
|
871
|
+
"name": "DraftComponentMixin",
|
|
872
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
873
|
+
}
|
|
874
|
+
],
|
|
875
|
+
"superclass": {
|
|
876
|
+
"name": "LitElement",
|
|
877
|
+
"package": "lit"
|
|
878
|
+
},
|
|
879
|
+
"localization": [],
|
|
880
|
+
"status": "draft",
|
|
881
|
+
"category": "structure",
|
|
882
|
+
"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",
|
|
883
|
+
"examples": [],
|
|
884
|
+
"dependencies": [],
|
|
885
|
+
"tagName": "nord-button-group",
|
|
886
|
+
"customElement": true
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
"exports": [
|
|
890
|
+
{
|
|
891
|
+
"kind": "js",
|
|
892
|
+
"name": "default",
|
|
893
|
+
"declaration": {
|
|
894
|
+
"name": "ButtonGroup",
|
|
895
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"kind": "custom-element-definition",
|
|
900
|
+
"name": "nord-button-group",
|
|
901
|
+
"declaration": {
|
|
902
|
+
"name": "ButtonGroup",
|
|
903
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
]
|
|
907
|
+
},
|
|
677
908
|
{
|
|
678
909
|
"kind": "javascript-module",
|
|
679
910
|
"path": "src/button/Button.ts",
|
|
@@ -1191,6 +1422,9 @@
|
|
|
1191
1422
|
"category": "action",
|
|
1192
1423
|
"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| `switch` | **Deprecated:** Switch style is reserved for the clinic switcher in the top left corner of an application. |\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\" style=\"max-width: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\" style=\"max-width: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\" style=\"max-width: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\" style=\"max-width: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",
|
|
1193
1424
|
"examples": [],
|
|
1425
|
+
"dependencies": [
|
|
1426
|
+
"spinner"
|
|
1427
|
+
],
|
|
1194
1428
|
"tagName": "nord-button",
|
|
1195
1429
|
"customElement": true
|
|
1196
1430
|
}
|
|
@@ -1216,242 +1450,38 @@
|
|
|
1216
1450
|
},
|
|
1217
1451
|
{
|
|
1218
1452
|
"kind": "javascript-module",
|
|
1219
|
-
"path": "src/
|
|
1453
|
+
"path": "src/calendar/Calendar.ts",
|
|
1220
1454
|
"declarations": [
|
|
1221
1455
|
{
|
|
1222
1456
|
"kind": "class",
|
|
1223
|
-
"description": "
|
|
1224
|
-
"name": "
|
|
1457
|
+
"description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
|
|
1458
|
+
"name": "Calendar",
|
|
1225
1459
|
"cssProperties": [
|
|
1226
1460
|
{
|
|
1227
1461
|
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1228
|
-
"name": "--n-
|
|
1462
|
+
"name": "--n-calendar-border-radius",
|
|
1229
1463
|
"default": "var(--n-border-radius)"
|
|
1230
1464
|
},
|
|
1231
1465
|
{
|
|
1232
1466
|
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1233
|
-
"name": "--n-
|
|
1234
|
-
"default": "var(--n-box-shadow-
|
|
1235
|
-
}
|
|
1236
|
-
],
|
|
1237
|
-
"slots": [
|
|
1238
|
-
{
|
|
1239
|
-
"description": "default slot",
|
|
1240
|
-
"name": ""
|
|
1467
|
+
"name": "--n-calendar-box-shadow",
|
|
1468
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1241
1469
|
}
|
|
1242
1470
|
],
|
|
1243
1471
|
"members": [
|
|
1244
1472
|
{
|
|
1245
1473
|
"kind": "field",
|
|
1246
|
-
"name": "
|
|
1474
|
+
"name": "monthSelectNode",
|
|
1247
1475
|
"type": {
|
|
1248
|
-
"text": "
|
|
1476
|
+
"text": "HTMLElement"
|
|
1249
1477
|
},
|
|
1250
|
-
"
|
|
1251
|
-
|
|
1252
|
-
"attribute": "variant",
|
|
1253
|
-
"reflects": true
|
|
1254
|
-
}
|
|
1255
|
-
],
|
|
1256
|
-
"attributes": [
|
|
1478
|
+
"privacy": "private"
|
|
1479
|
+
},
|
|
1257
1480
|
{
|
|
1258
|
-
"
|
|
1481
|
+
"kind": "field",
|
|
1482
|
+
"name": "focusedDayNode",
|
|
1259
1483
|
"type": {
|
|
1260
|
-
"text": "
|
|
1261
|
-
},
|
|
1262
|
-
"default": "\"info\"",
|
|
1263
|
-
"description": "The style variant of the banner.",
|
|
1264
|
-
"fieldName": "variant"
|
|
1265
|
-
}
|
|
1266
|
-
],
|
|
1267
|
-
"superclass": {
|
|
1268
|
-
"name": "LitElement",
|
|
1269
|
-
"package": "lit"
|
|
1270
|
-
},
|
|
1271
|
-
"localization": [],
|
|
1272
|
-
"status": "ready",
|
|
1273
|
-
"category": "feedback",
|
|
1274
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
|
|
1275
|
-
"examples": [],
|
|
1276
|
-
"tagName": "nord-banner",
|
|
1277
|
-
"customElement": true
|
|
1278
|
-
}
|
|
1279
|
-
],
|
|
1280
|
-
"exports": [
|
|
1281
|
-
{
|
|
1282
|
-
"kind": "js",
|
|
1283
|
-
"name": "default",
|
|
1284
|
-
"declaration": {
|
|
1285
|
-
"name": "Banner",
|
|
1286
|
-
"module": "src/banner/Banner.ts"
|
|
1287
|
-
}
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
"kind": "custom-element-definition",
|
|
1291
|
-
"name": "nord-banner",
|
|
1292
|
-
"declaration": {
|
|
1293
|
-
"name": "Banner",
|
|
1294
|
-
"module": "src/banner/Banner.ts"
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
]
|
|
1298
|
-
},
|
|
1299
|
-
{
|
|
1300
|
-
"kind": "javascript-module",
|
|
1301
|
-
"path": "src/button-group/ButtonGroup.ts",
|
|
1302
|
-
"declarations": [
|
|
1303
|
-
{
|
|
1304
|
-
"kind": "class",
|
|
1305
|
-
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
1306
|
-
"name": "ButtonGroup",
|
|
1307
|
-
"cssProperties": [
|
|
1308
|
-
{
|
|
1309
|
-
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
1310
|
-
"name": "--n-button-group-border-radius",
|
|
1311
|
-
"default": "var(--n-border-radius-s)"
|
|
1312
|
-
},
|
|
1313
|
-
{
|
|
1314
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1315
|
-
"name": "--n-button-group-box-shadow",
|
|
1316
|
-
"default": "var(--n-box-shadow)"
|
|
1317
|
-
}
|
|
1318
|
-
],
|
|
1319
|
-
"slots": [
|
|
1320
|
-
{
|
|
1321
|
-
"description": "The button group content",
|
|
1322
|
-
"name": ""
|
|
1323
|
-
}
|
|
1324
|
-
],
|
|
1325
|
-
"members": [
|
|
1326
|
-
{
|
|
1327
|
-
"kind": "field",
|
|
1328
|
-
"name": "direction",
|
|
1329
|
-
"type": {
|
|
1330
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
1331
|
-
},
|
|
1332
|
-
"default": "\"horizontal\"",
|
|
1333
|
-
"description": "The direction of the button group.",
|
|
1334
|
-
"attribute": "direction",
|
|
1335
|
-
"reflects": true
|
|
1336
|
-
},
|
|
1337
|
-
{
|
|
1338
|
-
"kind": "field",
|
|
1339
|
-
"name": "role",
|
|
1340
|
-
"type": {
|
|
1341
|
-
"text": "string"
|
|
1342
|
-
},
|
|
1343
|
-
"default": "\"group\"",
|
|
1344
|
-
"description": "The appropriate role for the containing element.",
|
|
1345
|
-
"attribute": "role",
|
|
1346
|
-
"reflects": true
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
"kind": "field",
|
|
1350
|
-
"name": "_warningLogged",
|
|
1351
|
-
"type": {
|
|
1352
|
-
"text": "boolean"
|
|
1353
|
-
},
|
|
1354
|
-
"privacy": "private",
|
|
1355
|
-
"static": true,
|
|
1356
|
-
"default": "false",
|
|
1357
|
-
"inheritedFrom": {
|
|
1358
|
-
"name": "DraftComponentMixin",
|
|
1359
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
],
|
|
1363
|
-
"attributes": [
|
|
1364
|
-
{
|
|
1365
|
-
"name": "direction",
|
|
1366
|
-
"type": {
|
|
1367
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
1368
|
-
},
|
|
1369
|
-
"default": "\"horizontal\"",
|
|
1370
|
-
"description": "The direction of the button group.",
|
|
1371
|
-
"fieldName": "direction"
|
|
1372
|
-
},
|
|
1373
|
-
{
|
|
1374
|
-
"name": "role",
|
|
1375
|
-
"type": {
|
|
1376
|
-
"text": "string"
|
|
1377
|
-
},
|
|
1378
|
-
"default": "\"group\"",
|
|
1379
|
-
"description": "The appropriate role for the containing element.",
|
|
1380
|
-
"fieldName": "role"
|
|
1381
|
-
}
|
|
1382
|
-
],
|
|
1383
|
-
"mixins": [
|
|
1384
|
-
{
|
|
1385
|
-
"name": "DraftComponentMixin",
|
|
1386
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
1387
|
-
}
|
|
1388
|
-
],
|
|
1389
|
-
"superclass": {
|
|
1390
|
-
"name": "LitElement",
|
|
1391
|
-
"package": "lit"
|
|
1392
|
-
},
|
|
1393
|
-
"localization": [],
|
|
1394
|
-
"status": "draft",
|
|
1395
|
-
"category": "structure",
|
|
1396
|
-
"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 group labels should be accurate and predictable.\n",
|
|
1397
|
-
"examples": [],
|
|
1398
|
-
"tagName": "nord-button-group",
|
|
1399
|
-
"customElement": true
|
|
1400
|
-
}
|
|
1401
|
-
],
|
|
1402
|
-
"exports": [
|
|
1403
|
-
{
|
|
1404
|
-
"kind": "js",
|
|
1405
|
-
"name": "default",
|
|
1406
|
-
"declaration": {
|
|
1407
|
-
"name": "ButtonGroup",
|
|
1408
|
-
"module": "src/button-group/ButtonGroup.ts"
|
|
1409
|
-
}
|
|
1410
|
-
},
|
|
1411
|
-
{
|
|
1412
|
-
"kind": "custom-element-definition",
|
|
1413
|
-
"name": "nord-button-group",
|
|
1414
|
-
"declaration": {
|
|
1415
|
-
"name": "ButtonGroup",
|
|
1416
|
-
"module": "src/button-group/ButtonGroup.ts"
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
]
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
"kind": "javascript-module",
|
|
1423
|
-
"path": "src/calendar/Calendar.ts",
|
|
1424
|
-
"declarations": [
|
|
1425
|
-
{
|
|
1426
|
-
"kind": "class",
|
|
1427
|
-
"description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
|
|
1428
|
-
"name": "Calendar",
|
|
1429
|
-
"cssProperties": [
|
|
1430
|
-
{
|
|
1431
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1432
|
-
"name": "--n-calendar-border-radius",
|
|
1433
|
-
"default": "var(--n-border-radius)"
|
|
1434
|
-
},
|
|
1435
|
-
{
|
|
1436
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1437
|
-
"name": "--n-calendar-box-shadow",
|
|
1438
|
-
"default": "var(--n-box-shadow-popout)"
|
|
1439
|
-
}
|
|
1440
|
-
],
|
|
1441
|
-
"members": [
|
|
1442
|
-
{
|
|
1443
|
-
"kind": "field",
|
|
1444
|
-
"name": "monthSelectNode",
|
|
1445
|
-
"type": {
|
|
1446
|
-
"text": "HTMLElement"
|
|
1447
|
-
},
|
|
1448
|
-
"privacy": "private"
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
"kind": "field",
|
|
1452
|
-
"name": "focusedDayNode",
|
|
1453
|
-
"type": {
|
|
1454
|
-
"text": "HTMLButtonElement"
|
|
1484
|
+
"text": "HTMLButtonElement"
|
|
1455
1485
|
},
|
|
1456
1486
|
"privacy": "private"
|
|
1457
1487
|
},
|
|
@@ -1844,6 +1874,11 @@
|
|
|
1844
1874
|
"category": "list",
|
|
1845
1875
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n",
|
|
1846
1876
|
"examples": [],
|
|
1877
|
+
"dependencies": [
|
|
1878
|
+
"button",
|
|
1879
|
+
"visually-hidden",
|
|
1880
|
+
"icon"
|
|
1881
|
+
],
|
|
1847
1882
|
"tagName": "nord-calendar",
|
|
1848
1883
|
"customElement": true
|
|
1849
1884
|
}
|
|
@@ -2015,6 +2050,7 @@
|
|
|
2015
2050
|
"category": "structure",
|
|
2016
2051
|
"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",
|
|
2017
2052
|
"examples": [],
|
|
2053
|
+
"dependencies": [],
|
|
2018
2054
|
"tagName": "nord-card",
|
|
2019
2055
|
"customElement": true
|
|
2020
2056
|
}
|
|
@@ -2665,6 +2701,9 @@
|
|
|
2665
2701
|
"category": "form",
|
|
2666
2702
|
"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",
|
|
2667
2703
|
"examples": [],
|
|
2704
|
+
"dependencies": [
|
|
2705
|
+
"icon"
|
|
2706
|
+
],
|
|
2668
2707
|
"tagName": "nord-checkbox",
|
|
2669
2708
|
"customElement": true,
|
|
2670
2709
|
"events": [
|
|
@@ -3110,6 +3149,10 @@
|
|
|
3110
3149
|
"category": "action",
|
|
3111
3150
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n",
|
|
3112
3151
|
"examples": [],
|
|
3152
|
+
"dependencies": [
|
|
3153
|
+
"icon",
|
|
3154
|
+
"visually-hidden"
|
|
3155
|
+
],
|
|
3113
3156
|
"tagName": "nord-command-menu",
|
|
3114
3157
|
"customElement": true
|
|
3115
3158
|
}
|
|
@@ -3207,6 +3250,10 @@
|
|
|
3207
3250
|
"status": "internal",
|
|
3208
3251
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n",
|
|
3209
3252
|
"examples": [],
|
|
3253
|
+
"dependencies": [
|
|
3254
|
+
"icon",
|
|
3255
|
+
"visually-hidden"
|
|
3256
|
+
],
|
|
3210
3257
|
"tagName": "nord-command-menu-action",
|
|
3211
3258
|
"customElement": true
|
|
3212
3259
|
}
|
|
@@ -4177,6 +4224,18 @@
|
|
|
4177
4224
|
}
|
|
4178
4225
|
}
|
|
4179
4226
|
]
|
|
4227
|
+
},
|
|
4228
|
+
{
|
|
4229
|
+
"kind": "function",
|
|
4230
|
+
"name": "animation",
|
|
4231
|
+
"parameters": [
|
|
4232
|
+
{
|
|
4233
|
+
"name": "element",
|
|
4234
|
+
"type": {
|
|
4235
|
+
"text": "HTMLElement"
|
|
4236
|
+
}
|
|
4237
|
+
}
|
|
4238
|
+
]
|
|
4180
4239
|
}
|
|
4181
4240
|
],
|
|
4182
4241
|
"exports": [
|
|
@@ -4203,6 +4262,14 @@
|
|
|
4203
4262
|
"name": "transition",
|
|
4204
4263
|
"module": "src/common/events.ts"
|
|
4205
4264
|
}
|
|
4265
|
+
},
|
|
4266
|
+
{
|
|
4267
|
+
"kind": "js",
|
|
4268
|
+
"name": "animation",
|
|
4269
|
+
"declaration": {
|
|
4270
|
+
"name": "animation",
|
|
4271
|
+
"module": "src/common/events.ts"
|
|
4272
|
+
}
|
|
4206
4273
|
}
|
|
4207
4274
|
]
|
|
4208
4275
|
},
|
|
@@ -5598,6 +5665,15 @@
|
|
|
5598
5665
|
"category": "form",
|
|
5599
5666
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n",
|
|
5600
5667
|
"examples": [],
|
|
5668
|
+
"dependencies": [
|
|
5669
|
+
"icon",
|
|
5670
|
+
"input",
|
|
5671
|
+
"button",
|
|
5672
|
+
"visually-hidden",
|
|
5673
|
+
"popout",
|
|
5674
|
+
"stack",
|
|
5675
|
+
"calendar"
|
|
5676
|
+
],
|
|
5601
5677
|
"tagName": "nord-date-picker",
|
|
5602
5678
|
"customElement": true
|
|
5603
5679
|
}
|
|
@@ -5727,6 +5803,7 @@
|
|
|
5727
5803
|
"category": "structure",
|
|
5728
5804
|
"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 represent thematic breaks between elements.\n- Use when you need to divide sections of content from each other.\n- Use to separate content into clear groups.\n- Use dividers sparingly, to create groupings or to separate items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using for presentational purposes only.\n- Don’t use strong colors in dividers.\n- Don’t use dividers for replacing card components.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Divider uses a role called `separator` which indicates that the element is a divider that separates and distinguishes sections of content or groups of menu items. The implicit ARIA role of the native thematic break (`<hr>` element) is a separator.\n- Dividers have an implicit aria-orientation value of `horizontal` which can be changed using the `direction` property.\n- For more details, please see [ARIA: separator role on MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role).\n",
|
|
5729
5805
|
"examples": [],
|
|
5806
|
+
"dependencies": [],
|
|
5730
5807
|
"tagName": "nord-divider",
|
|
5731
5808
|
"customElement": true
|
|
5732
5809
|
}
|
|
@@ -5838,6 +5915,7 @@
|
|
|
5838
5915
|
"category": "structure",
|
|
5839
5916
|
"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 displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t put cards inside the drawer. Consider using the [divider](/components/divider/) component to break up sections instead.\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- You can customize the width of the component using `--n-layout-drawer-inline-size` CSS Custom Property that is offered on [Layout component](/components/layout/).\n",
|
|
5840
5917
|
"examples": [],
|
|
5918
|
+
"dependencies": [],
|
|
5841
5919
|
"tagName": "nord-drawer",
|
|
5842
5920
|
"customElement": true
|
|
5843
5921
|
}
|
|
@@ -6090,6 +6168,9 @@
|
|
|
6090
6168
|
"category": "action",
|
|
6091
6169
|
"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- Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or commands, where an action is initiated based on the selection.\n- When organizing dropdown menu items, sort the list in a logical order by putting the most selected option at the top.\n- Use for a “more” menu, where the control contains an icon.\n- Use for user profiles, where the control is an avatar.\n- Use in conjunction with the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for form inputs or selects, use the [select component](/components/select/) or [input component](/components/input/) instead.\n- Don’t use for hiding primary actions since they should be visible by default.\n- Don’t nest elements or components other than the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components. Consider using the [popout component](/components/popout/) when creating custom UI.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items 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\nDropdown items 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 dropdown items, 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 dropdown items 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 dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n",
|
|
6092
6170
|
"examples": [],
|
|
6171
|
+
"dependencies": [
|
|
6172
|
+
"popout"
|
|
6173
|
+
],
|
|
6093
6174
|
"tagName": "nord-dropdown",
|
|
6094
6175
|
"customElement": true
|
|
6095
6176
|
}
|
|
@@ -6157,6 +6238,7 @@
|
|
|
6157
6238
|
"category": "action",
|
|
6158
6239
|
"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- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items 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\nDropdown items 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 dropdown items, 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 dropdown items 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 dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n",
|
|
6159
6240
|
"examples": [],
|
|
6241
|
+
"dependencies": [],
|
|
6160
6242
|
"tagName": "nord-dropdown-group",
|
|
6161
6243
|
"customElement": true
|
|
6162
6244
|
}
|
|
@@ -6285,6 +6367,7 @@
|
|
|
6285
6367
|
"category": "action",
|
|
6286
6368
|
"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- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use dropdown item outside of dropdown group and dropdown components.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items 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\nDropdown items 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 dropdown items, 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 dropdown items 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 dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n",
|
|
6287
6369
|
"examples": [],
|
|
6370
|
+
"dependencies": [],
|
|
6288
6371
|
"tagName": "nord-dropdown-item",
|
|
6289
6372
|
"customElement": true
|
|
6290
6373
|
}
|
|
@@ -6332,6 +6415,7 @@
|
|
|
6332
6415
|
"category": "feedback",
|
|
6333
6416
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, 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\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\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\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</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\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</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\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n",
|
|
6334
6417
|
"examples": [],
|
|
6418
|
+
"dependencies": [],
|
|
6335
6419
|
"tagName": "nord-empty-state",
|
|
6336
6420
|
"customElement": true
|
|
6337
6421
|
}
|
|
@@ -6503,6 +6587,7 @@
|
|
|
6503
6587
|
"category": "form",
|
|
6504
6588
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\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 with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset 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\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</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\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n",
|
|
6505
6589
|
"examples": [],
|
|
6590
|
+
"dependencies": [],
|
|
6506
6591
|
"tagName": "nord-fieldset",
|
|
6507
6592
|
"customElement": true
|
|
6508
6593
|
}
|
|
@@ -6550,6 +6635,28 @@
|
|
|
6550
6635
|
"name": "endSlot",
|
|
6551
6636
|
"privacy": "private",
|
|
6552
6637
|
"default": "new SlotController(this, \"end\")"
|
|
6638
|
+
},
|
|
6639
|
+
{
|
|
6640
|
+
"kind": "field",
|
|
6641
|
+
"name": "size",
|
|
6642
|
+
"type": {
|
|
6643
|
+
"text": "\"m\" | \"s\""
|
|
6644
|
+
},
|
|
6645
|
+
"default": "\"m\"",
|
|
6646
|
+
"description": "Controls the size of the header component.",
|
|
6647
|
+
"attribute": "size",
|
|
6648
|
+
"reflects": true
|
|
6649
|
+
}
|
|
6650
|
+
],
|
|
6651
|
+
"attributes": [
|
|
6652
|
+
{
|
|
6653
|
+
"name": "size",
|
|
6654
|
+
"type": {
|
|
6655
|
+
"text": "\"m\" | \"s\""
|
|
6656
|
+
},
|
|
6657
|
+
"default": "\"m\"",
|
|
6658
|
+
"description": "Controls the size of the header component.",
|
|
6659
|
+
"fieldName": "size"
|
|
6553
6660
|
}
|
|
6554
6661
|
],
|
|
6555
6662
|
"superclass": {
|
|
@@ -6561,6 +6668,7 @@
|
|
|
6561
6668
|
"category": "structure",
|
|
6562
6669
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n- Utilise the [`n-truncate`](/css/#miscellaneous-utilities) CSS helper to prevent long headings from wrapping.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n- Don’t add large amounts of content or long headings. Aim for headings that are short and concise.\n\n</div>\n\n---\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n",
|
|
6563
6670
|
"examples": [],
|
|
6671
|
+
"dependencies": [],
|
|
6564
6672
|
"tagName": "nord-header",
|
|
6565
6673
|
"customElement": true
|
|
6566
6674
|
}
|
|
@@ -6791,6 +6899,7 @@
|
|
|
6791
6899
|
"category": "image",
|
|
6792
6900
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n",
|
|
6793
6901
|
"examples": [],
|
|
6902
|
+
"dependencies": [],
|
|
6794
6903
|
"tagName": "nord-icon",
|
|
6795
6904
|
"customElement": true
|
|
6796
6905
|
}
|
|
@@ -6924,6 +7033,11 @@
|
|
|
6924
7033
|
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
6925
7034
|
"name": "--n-input-border-radius",
|
|
6926
7035
|
"default": "var(--n-border-radius-s)"
|
|
7036
|
+
},
|
|
7037
|
+
{
|
|
7038
|
+
"description": "Controls the alignment of text within the input itself.",
|
|
7039
|
+
"name": "--n-input-text-align",
|
|
7040
|
+
"default": "start"
|
|
6927
7041
|
}
|
|
6928
7042
|
],
|
|
6929
7043
|
"slots": [
|
|
@@ -6971,7 +7085,7 @@
|
|
|
6971
7085
|
"kind": "field",
|
|
6972
7086
|
"name": "type",
|
|
6973
7087
|
"type": {
|
|
6974
|
-
"text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\""
|
|
7088
|
+
"text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\""
|
|
6975
7089
|
},
|
|
6976
7090
|
"default": "\"text\"",
|
|
6977
7091
|
"description": "The type of the input.",
|
|
@@ -7444,7 +7558,7 @@
|
|
|
7444
7558
|
{
|
|
7445
7559
|
"name": "type",
|
|
7446
7560
|
"type": {
|
|
7447
|
-
"text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\""
|
|
7561
|
+
"text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\" | \"unit\""
|
|
7448
7562
|
},
|
|
7449
7563
|
"default": "\"text\"",
|
|
7450
7564
|
"description": "The type of the input.",
|
|
@@ -7672,6 +7786,9 @@
|
|
|
7672
7786
|
"category": "form",
|
|
7673
7787
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n\n## Icon usage in input\n\nEach [input size](/components/input/?example=size) has a recommended icon size. The medium input uses the `s` icon size, the small input uses the `xs` icon size, and the large input uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n",
|
|
7674
7788
|
"examples": [],
|
|
7789
|
+
"dependencies": [
|
|
7790
|
+
"icon"
|
|
7791
|
+
],
|
|
7675
7792
|
"tagName": "nord-input",
|
|
7676
7793
|
"customElement": true,
|
|
7677
7794
|
"events": [
|
|
@@ -7779,7 +7896,7 @@
|
|
|
7779
7896
|
"kind": "field",
|
|
7780
7897
|
"name": "resizeObserver",
|
|
7781
7898
|
"privacy": "private",
|
|
7782
|
-
"default": "new ResizeObserver(entries => {\n this.
|
|
7899
|
+
"default": "new ResizeObserver(entries => {\n this.headerSize = Math.round(entries[0].borderBoxSize[0].blockSize)\n })"
|
|
7783
7900
|
},
|
|
7784
7901
|
{
|
|
7785
7902
|
"kind": "field",
|
|
@@ -7856,9 +7973,9 @@
|
|
|
7856
7973
|
},
|
|
7857
7974
|
{
|
|
7858
7975
|
"kind": "field",
|
|
7859
|
-
"name": "
|
|
7976
|
+
"name": "headerSize",
|
|
7860
7977
|
"type": {
|
|
7861
|
-
"text": "number
|
|
7978
|
+
"text": "number"
|
|
7862
7979
|
},
|
|
7863
7980
|
"privacy": "private",
|
|
7864
7981
|
"default": "0"
|
|
@@ -7918,19 +8035,6 @@
|
|
|
7918
8035
|
"name": "renderNavToggle",
|
|
7919
8036
|
"privacy": "private"
|
|
7920
8037
|
},
|
|
7921
|
-
{
|
|
7922
|
-
"kind": "method",
|
|
7923
|
-
"name": "handleStickyChange",
|
|
7924
|
-
"privacy": "protected",
|
|
7925
|
-
"parameters": [
|
|
7926
|
-
{
|
|
7927
|
-
"name": "prev",
|
|
7928
|
-
"type": {
|
|
7929
|
-
"text": "boolean"
|
|
7930
|
-
}
|
|
7931
|
-
}
|
|
7932
|
-
]
|
|
7933
|
-
},
|
|
7934
8038
|
{
|
|
7935
8039
|
"kind": "method",
|
|
7936
8040
|
"name": "handleNavWidthChange",
|
|
@@ -8163,6 +8267,9 @@
|
|
|
8163
8267
|
"category": "structure",
|
|
8164
8268
|
"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- To visually group content in a layout section, use the Card component.\n- To lay out a set of smaller components, use the Stack component.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Never put layout component inside another HTML landmark.\n- Don’t use when you need a vertical or horizontal layout system. Use Stack component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Layout component uses `<main>` element internally which is an HTML sectioning element which by default defines an ARIA landmark role. For that reason you should never put layout component inside another HTML landmark.\n",
|
|
8165
8269
|
"examples": [],
|
|
8270
|
+
"dependencies": [
|
|
8271
|
+
"nav-toggle"
|
|
8272
|
+
],
|
|
8166
8273
|
"tagName": "nord-layout",
|
|
8167
8274
|
"customElement": true
|
|
8168
8275
|
}
|
|
@@ -8188,14 +8295,267 @@
|
|
|
8188
8295
|
},
|
|
8189
8296
|
{
|
|
8190
8297
|
"kind": "javascript-module",
|
|
8191
|
-
"path": "src/
|
|
8298
|
+
"path": "src/localization/LocalizeController.ts",
|
|
8192
8299
|
"declarations": [
|
|
8193
8300
|
{
|
|
8194
8301
|
"kind": "class",
|
|
8195
|
-
"description": "
|
|
8196
|
-
"name": "
|
|
8197
|
-
"
|
|
8198
|
-
{
|
|
8302
|
+
"description": "",
|
|
8303
|
+
"name": "LocalizeController",
|
|
8304
|
+
"members": [
|
|
8305
|
+
{
|
|
8306
|
+
"kind": "field",
|
|
8307
|
+
"name": "unsubscribe",
|
|
8308
|
+
"type": {
|
|
8309
|
+
"text": "ReturnType<typeof subscribe> | undefined"
|
|
8310
|
+
},
|
|
8311
|
+
"privacy": "private"
|
|
8312
|
+
},
|
|
8313
|
+
{
|
|
8314
|
+
"kind": "field",
|
|
8315
|
+
"name": "resolvedTranslation",
|
|
8316
|
+
"type": {
|
|
8317
|
+
"text": "Translation"
|
|
8318
|
+
},
|
|
8319
|
+
"privacy": "private"
|
|
8320
|
+
},
|
|
8321
|
+
{
|
|
8322
|
+
"kind": "field",
|
|
8323
|
+
"name": "lang",
|
|
8324
|
+
"description": "The lang of the document or element, with element taking precedence"
|
|
8325
|
+
},
|
|
8326
|
+
{
|
|
8327
|
+
"kind": "field",
|
|
8328
|
+
"name": "resolvedLang",
|
|
8329
|
+
"description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation"
|
|
8330
|
+
},
|
|
8331
|
+
{
|
|
8332
|
+
"kind": "method",
|
|
8333
|
+
"name": "hostConnected"
|
|
8334
|
+
},
|
|
8335
|
+
{
|
|
8336
|
+
"kind": "method",
|
|
8337
|
+
"name": "hostDisconnected"
|
|
8338
|
+
},
|
|
8339
|
+
{
|
|
8340
|
+
"kind": "method",
|
|
8341
|
+
"name": "term",
|
|
8342
|
+
"return": {
|
|
8343
|
+
"type": {
|
|
8344
|
+
"text": "Result<Translation[TComponentName], Key>"
|
|
8345
|
+
}
|
|
8346
|
+
},
|
|
8347
|
+
"parameters": [
|
|
8348
|
+
{
|
|
8349
|
+
"name": "key",
|
|
8350
|
+
"type": {
|
|
8351
|
+
"text": "Key"
|
|
8352
|
+
}
|
|
8353
|
+
},
|
|
8354
|
+
{
|
|
8355
|
+
"name": "args",
|
|
8356
|
+
"type": {
|
|
8357
|
+
"text": "FuncParams<Translation[TComponentName], Key>"
|
|
8358
|
+
}
|
|
8359
|
+
}
|
|
8360
|
+
]
|
|
8361
|
+
},
|
|
8362
|
+
{
|
|
8363
|
+
"kind": "field",
|
|
8364
|
+
"name": "handleLangChange",
|
|
8365
|
+
"privacy": "private"
|
|
8366
|
+
}
|
|
8367
|
+
]
|
|
8368
|
+
}
|
|
8369
|
+
],
|
|
8370
|
+
"exports": [
|
|
8371
|
+
{
|
|
8372
|
+
"kind": "js",
|
|
8373
|
+
"name": "LocalizeController",
|
|
8374
|
+
"declaration": {
|
|
8375
|
+
"name": "LocalizeController",
|
|
8376
|
+
"module": "src/localization/LocalizeController.ts"
|
|
8377
|
+
}
|
|
8378
|
+
}
|
|
8379
|
+
]
|
|
8380
|
+
},
|
|
8381
|
+
{
|
|
8382
|
+
"kind": "javascript-module",
|
|
8383
|
+
"path": "src/localization/en-us.ts",
|
|
8384
|
+
"declarations": [
|
|
8385
|
+
{
|
|
8386
|
+
"kind": "variable",
|
|
8387
|
+
"name": "en",
|
|
8388
|
+
"type": {
|
|
8389
|
+
"text": "object"
|
|
8390
|
+
},
|
|
8391
|
+
"default": "{\n $lang: \"en-US\",\n $name: \"English\",\n $dir: \"ltr\" as \"ltr\" | \"rtl\",\n \"nord-command-menu\": commandMenuLocalization,\n \"nord-calendar\": calendarLocalization,\n \"nord-date-picker\": datePickerLocalization,\n \"nord-modal\": modalLocalization,\n \"nord-nav-toggle\": navToggleLocalization,\n \"nord-textarea\": textareaLocalization,\n \"nord-notification\": notificationLocalization,\n}"
|
|
8392
|
+
}
|
|
8393
|
+
],
|
|
8394
|
+
"exports": [
|
|
8395
|
+
{
|
|
8396
|
+
"kind": "js",
|
|
8397
|
+
"name": "default",
|
|
8398
|
+
"declaration": {
|
|
8399
|
+
"name": "en",
|
|
8400
|
+
"module": "src/localization/en-us.ts"
|
|
8401
|
+
}
|
|
8402
|
+
}
|
|
8403
|
+
]
|
|
8404
|
+
},
|
|
8405
|
+
{
|
|
8406
|
+
"kind": "javascript-module",
|
|
8407
|
+
"path": "src/localization/fi-fi.ts",
|
|
8408
|
+
"declarations": [
|
|
8409
|
+
{
|
|
8410
|
+
"kind": "variable",
|
|
8411
|
+
"name": "fi",
|
|
8412
|
+
"type": {
|
|
8413
|
+
"text": "Translation"
|
|
8414
|
+
},
|
|
8415
|
+
"default": "{\n $lang: \"fi\",\n $name: \"Suomi\",\n $dir: \"ltr\",\n\n \"nord-command-menu\": {\n instructions: \"Paina 'Enter' vahvistaaksesi valinnan tai 'Escape' peruuttaaksesi\",\n inputLabel: \"Kirjoita komento jonka haluat suorittaa.\",\n footerArrowKeys: \"Siirry\",\n footerEnterKey: \"Valitse\",\n footerEscapeKey: \"Esc sulje\",\n footerBackspaceKey: \"Siirry takaisin\",\n noResults: searchTerm => `Ei tuloksia haulle \"${searchTerm}\"`,\n tip: \"Vinkki: jotkin haut vaativat tarkan hakutermin. Koita kirjoittaa koko hakutermi kokonaisuudessaan, tai kokeile toista sanaa tai fraasia.\",\n },\n\n \"nord-calendar\": {\n prevMonthLabel: \"Edellinen kuukausi\",\n nextMonthLabel: \"Seuraava kuukausi\",\n monthSelectLabel: \"Kuukausi\",\n yearSelectLabel: \"Vuosi\",\n },\n\n \"nord-date-picker\": {\n modalHeading: \"Valitse päivämäärä\",\n closeLabel: \"Sulje ikkuna\",\n buttonLabel: \"Valitse päivämäärä\",\n selectedDateMessage: \"Valittu päivämäärä on\",\n },\n\n \"nord-modal\": {\n closeLabel: \"Sulje ikkuna\",\n },\n\n \"nord-nav-toggle\": {\n label: \"Näytä/Piilota valikko\",\n },\n\n \"nord-textarea\": {\n remainingCharacters: (remaining: number) => `${remaining} merkkiä jäljellä`,\n },\n\n \"nord-notification\": {\n dismissLabel: \"Sulje ilmoitus\",\n },\n}"
|
|
8416
|
+
}
|
|
8417
|
+
],
|
|
8418
|
+
"exports": [
|
|
8419
|
+
{
|
|
8420
|
+
"kind": "js",
|
|
8421
|
+
"name": "default",
|
|
8422
|
+
"declaration": {
|
|
8423
|
+
"name": "fi",
|
|
8424
|
+
"module": "src/localization/fi-fi.ts"
|
|
8425
|
+
}
|
|
8426
|
+
}
|
|
8427
|
+
]
|
|
8428
|
+
},
|
|
8429
|
+
{
|
|
8430
|
+
"kind": "javascript-module",
|
|
8431
|
+
"path": "src/localization/translation.ts",
|
|
8432
|
+
"declarations": [
|
|
8433
|
+
{
|
|
8434
|
+
"kind": "function",
|
|
8435
|
+
"name": "clearTranslations",
|
|
8436
|
+
"description": "Removes all registered translations"
|
|
8437
|
+
},
|
|
8438
|
+
{
|
|
8439
|
+
"kind": "function",
|
|
8440
|
+
"name": "registerTranslation",
|
|
8441
|
+
"parameters": [
|
|
8442
|
+
{
|
|
8443
|
+
"name": "translation",
|
|
8444
|
+
"type": {
|
|
8445
|
+
"text": "Translation[]"
|
|
8446
|
+
}
|
|
8447
|
+
}
|
|
8448
|
+
],
|
|
8449
|
+
"description": "Registers one or more translations"
|
|
8450
|
+
},
|
|
8451
|
+
{
|
|
8452
|
+
"kind": "function",
|
|
8453
|
+
"name": "subscribe",
|
|
8454
|
+
"return": {
|
|
8455
|
+
"type": {
|
|
8456
|
+
"text": ""
|
|
8457
|
+
}
|
|
8458
|
+
},
|
|
8459
|
+
"parameters": [
|
|
8460
|
+
{
|
|
8461
|
+
"name": "onChange",
|
|
8462
|
+
"type": {
|
|
8463
|
+
"text": "() => void"
|
|
8464
|
+
},
|
|
8465
|
+
"description": "callback for when either `lang` attr changes, or a new language is registered."
|
|
8466
|
+
}
|
|
8467
|
+
],
|
|
8468
|
+
"description": "subscribe to language changes"
|
|
8469
|
+
},
|
|
8470
|
+
{
|
|
8471
|
+
"kind": "function",
|
|
8472
|
+
"name": "isTranslationRegistered",
|
|
8473
|
+
"parameters": [
|
|
8474
|
+
{
|
|
8475
|
+
"name": "lang",
|
|
8476
|
+
"type": {
|
|
8477
|
+
"text": "string"
|
|
8478
|
+
},
|
|
8479
|
+
"description": "the lang code e.g. \"en\" or \"en-GB\""
|
|
8480
|
+
}
|
|
8481
|
+
],
|
|
8482
|
+
"description": "Check whether there is a translation registered for the given lang"
|
|
8483
|
+
},
|
|
8484
|
+
{
|
|
8485
|
+
"kind": "function",
|
|
8486
|
+
"name": "resolveTranslation",
|
|
8487
|
+
"parameters": [
|
|
8488
|
+
{
|
|
8489
|
+
"name": "langCode",
|
|
8490
|
+
"type": {
|
|
8491
|
+
"text": "string"
|
|
8492
|
+
}
|
|
8493
|
+
}
|
|
8494
|
+
],
|
|
8495
|
+
"description": "Picks the most appropriate translation for the given language, from most specific to least specific.\nFirst tries lang + region, then lang only, then fallback."
|
|
8496
|
+
}
|
|
8497
|
+
],
|
|
8498
|
+
"exports": [
|
|
8499
|
+
{
|
|
8500
|
+
"kind": "js",
|
|
8501
|
+
"name": "clearTranslations",
|
|
8502
|
+
"declaration": {
|
|
8503
|
+
"name": "clearTranslations",
|
|
8504
|
+
"module": "src/localization/translation.ts"
|
|
8505
|
+
}
|
|
8506
|
+
},
|
|
8507
|
+
{
|
|
8508
|
+
"kind": "js",
|
|
8509
|
+
"name": "registerTranslation",
|
|
8510
|
+
"declaration": {
|
|
8511
|
+
"name": "registerTranslation",
|
|
8512
|
+
"module": "src/localization/translation.ts"
|
|
8513
|
+
}
|
|
8514
|
+
},
|
|
8515
|
+
{
|
|
8516
|
+
"kind": "js",
|
|
8517
|
+
"name": "subscribe",
|
|
8518
|
+
"declaration": {
|
|
8519
|
+
"name": "subscribe",
|
|
8520
|
+
"module": "src/localization/translation.ts"
|
|
8521
|
+
}
|
|
8522
|
+
},
|
|
8523
|
+
{
|
|
8524
|
+
"kind": "js",
|
|
8525
|
+
"name": "isTranslationRegistered",
|
|
8526
|
+
"declaration": {
|
|
8527
|
+
"name": "isTranslationRegistered",
|
|
8528
|
+
"module": "src/localization/translation.ts"
|
|
8529
|
+
}
|
|
8530
|
+
},
|
|
8531
|
+
{
|
|
8532
|
+
"kind": "js",
|
|
8533
|
+
"name": "resolveTranslation",
|
|
8534
|
+
"declaration": {
|
|
8535
|
+
"name": "resolveTranslation",
|
|
8536
|
+
"module": "src/localization/translation.ts"
|
|
8537
|
+
}
|
|
8538
|
+
},
|
|
8539
|
+
{
|
|
8540
|
+
"kind": "js",
|
|
8541
|
+
"name": "fallback",
|
|
8542
|
+
"declaration": {
|
|
8543
|
+
"name": "en",
|
|
8544
|
+
"module": "src/localization/translation.ts"
|
|
8545
|
+
}
|
|
8546
|
+
}
|
|
8547
|
+
]
|
|
8548
|
+
},
|
|
8549
|
+
{
|
|
8550
|
+
"kind": "javascript-module",
|
|
8551
|
+
"path": "src/modal/Modal.ts",
|
|
8552
|
+
"declarations": [
|
|
8553
|
+
{
|
|
8554
|
+
"kind": "class",
|
|
8555
|
+
"description": "Modal component is used to display content that temporarily blocks interactions\nwith the main view of an application. Modal should be used sparingly and\nonly when necessary.",
|
|
8556
|
+
"name": "Modal",
|
|
8557
|
+
"cssProperties": [
|
|
8558
|
+
{
|
|
8199
8559
|
"description": "Controls the padding on the sides of the modal, using our [spacing tokens](/tokens/#space).",
|
|
8200
8560
|
"name": "--n-modal-padding-inline",
|
|
8201
8561
|
"default": "var(--n-space-m)"
|
|
@@ -8427,6 +8787,9 @@
|
|
|
8427
8787
|
"category": "overlay",
|
|
8428
8788
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for confirmations and conditional changes.\n- Use when the user is required to take an action.\n- Use when you need to display content that temporarily blocks interactions with the main view of an application.\n- Use when you need to ask a confirmation from a user before proceeding.\n- Use for important warnings, as a way to prevent or correct critical errors.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for nonessential information that is not related to the current userflow.\n- Don’t use when the modal requires additional information for decision making that is unavailable in the modal itself.\n- Don’t open a modal window on top of another modal.\n\n</div>\n\n---\n\n## Content guidelines\n\nModal title should be clear, accurate and predictable. Always lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit the patient called John Doe</div>\n<div class=\"n-usage n-usage-do\">Discard changes?</div>\n<div class=\"n-usage n-usage-dont\">Discard?</div>\n<div class=\"n-usage n-usage-do\">Delete patient?</div>\n<div class=\"n-usage n-usage-dont\">Are you sure you want to delete this patent?</div>\n\nWhen writing modal titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in modal titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Edit patient</div>\n<div class=\"n-usage n-usage-dont\">Edit patient.</div>\n\n---\n\n## Focus behaviour\n\n- Use the `autofocus` attribute to set the initial focus to the first location that accepts user input.\n- If it is a transactional modal without form inputs, then `autofocus` should be set on the primary button in the modal footer. This is for efficiency since most users will simply dismiss the dialog as soon as they have read the message.\n- If the modal contains a form, use `autofocus` in the first form field.\n- Focus remains trapped inside the modal dialog until it is closed.\n- For more examples and best practices, please see [WAI-ARIA Authoring Practices Modal Dialog Example](https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/dialog-modal/dialog.html).\n",
|
|
8429
8789
|
"examples": [],
|
|
8790
|
+
"dependencies": [
|
|
8791
|
+
"icon"
|
|
8792
|
+
],
|
|
8430
8793
|
"tagName": "nord-modal",
|
|
8431
8794
|
"customElement": true
|
|
8432
8795
|
}
|
|
@@ -8612,259 +8975,6 @@
|
|
|
8612
8975
|
}
|
|
8613
8976
|
]
|
|
8614
8977
|
},
|
|
8615
|
-
{
|
|
8616
|
-
"kind": "javascript-module",
|
|
8617
|
-
"path": "src/localization/LocalizeController.ts",
|
|
8618
|
-
"declarations": [
|
|
8619
|
-
{
|
|
8620
|
-
"kind": "class",
|
|
8621
|
-
"description": "",
|
|
8622
|
-
"name": "LocalizeController",
|
|
8623
|
-
"members": [
|
|
8624
|
-
{
|
|
8625
|
-
"kind": "field",
|
|
8626
|
-
"name": "unsubscribe",
|
|
8627
|
-
"type": {
|
|
8628
|
-
"text": "ReturnType<typeof subscribe> | undefined"
|
|
8629
|
-
},
|
|
8630
|
-
"privacy": "private"
|
|
8631
|
-
},
|
|
8632
|
-
{
|
|
8633
|
-
"kind": "field",
|
|
8634
|
-
"name": "resolvedTranslation",
|
|
8635
|
-
"type": {
|
|
8636
|
-
"text": "Translation"
|
|
8637
|
-
},
|
|
8638
|
-
"privacy": "private"
|
|
8639
|
-
},
|
|
8640
|
-
{
|
|
8641
|
-
"kind": "field",
|
|
8642
|
-
"name": "lang",
|
|
8643
|
-
"description": "The lang of the document or element, with element taking precedence"
|
|
8644
|
-
},
|
|
8645
|
-
{
|
|
8646
|
-
"kind": "field",
|
|
8647
|
-
"name": "resolvedLang",
|
|
8648
|
-
"description": "The lang of the translation being applied.\nThis may not match the document/element lang, in case of fallback translation"
|
|
8649
|
-
},
|
|
8650
|
-
{
|
|
8651
|
-
"kind": "method",
|
|
8652
|
-
"name": "hostConnected"
|
|
8653
|
-
},
|
|
8654
|
-
{
|
|
8655
|
-
"kind": "method",
|
|
8656
|
-
"name": "hostDisconnected"
|
|
8657
|
-
},
|
|
8658
|
-
{
|
|
8659
|
-
"kind": "method",
|
|
8660
|
-
"name": "term",
|
|
8661
|
-
"return": {
|
|
8662
|
-
"type": {
|
|
8663
|
-
"text": "Result<Translation[TComponentName], Key>"
|
|
8664
|
-
}
|
|
8665
|
-
},
|
|
8666
|
-
"parameters": [
|
|
8667
|
-
{
|
|
8668
|
-
"name": "key",
|
|
8669
|
-
"type": {
|
|
8670
|
-
"text": "Key"
|
|
8671
|
-
}
|
|
8672
|
-
},
|
|
8673
|
-
{
|
|
8674
|
-
"name": "args",
|
|
8675
|
-
"type": {
|
|
8676
|
-
"text": "FuncParams<Translation[TComponentName], Key>"
|
|
8677
|
-
}
|
|
8678
|
-
}
|
|
8679
|
-
]
|
|
8680
|
-
},
|
|
8681
|
-
{
|
|
8682
|
-
"kind": "field",
|
|
8683
|
-
"name": "handleLangChange",
|
|
8684
|
-
"privacy": "private"
|
|
8685
|
-
}
|
|
8686
|
-
]
|
|
8687
|
-
}
|
|
8688
|
-
],
|
|
8689
|
-
"exports": [
|
|
8690
|
-
{
|
|
8691
|
-
"kind": "js",
|
|
8692
|
-
"name": "LocalizeController",
|
|
8693
|
-
"declaration": {
|
|
8694
|
-
"name": "LocalizeController",
|
|
8695
|
-
"module": "src/localization/LocalizeController.ts"
|
|
8696
|
-
}
|
|
8697
|
-
}
|
|
8698
|
-
]
|
|
8699
|
-
},
|
|
8700
|
-
{
|
|
8701
|
-
"kind": "javascript-module",
|
|
8702
|
-
"path": "src/localization/en-us.ts",
|
|
8703
|
-
"declarations": [
|
|
8704
|
-
{
|
|
8705
|
-
"kind": "variable",
|
|
8706
|
-
"name": "en",
|
|
8707
|
-
"type": {
|
|
8708
|
-
"text": "object"
|
|
8709
|
-
},
|
|
8710
|
-
"default": "{\n $lang: \"en-US\",\n $name: \"English\",\n $dir: \"ltr\" as \"ltr\" | \"rtl\",\n \"nord-command-menu\": commandMenuLocalization,\n \"nord-calendar\": calendarLocalization,\n \"nord-date-picker\": datePickerLocalization,\n \"nord-modal\": modalLocalization,\n \"nord-nav-toggle\": navToggleLocalization,\n \"nord-textarea\": textareaLocalization,\n}"
|
|
8711
|
-
}
|
|
8712
|
-
],
|
|
8713
|
-
"exports": [
|
|
8714
|
-
{
|
|
8715
|
-
"kind": "js",
|
|
8716
|
-
"name": "default",
|
|
8717
|
-
"declaration": {
|
|
8718
|
-
"name": "en",
|
|
8719
|
-
"module": "src/localization/en-us.ts"
|
|
8720
|
-
}
|
|
8721
|
-
}
|
|
8722
|
-
]
|
|
8723
|
-
},
|
|
8724
|
-
{
|
|
8725
|
-
"kind": "javascript-module",
|
|
8726
|
-
"path": "src/localization/fi-fi.ts",
|
|
8727
|
-
"declarations": [
|
|
8728
|
-
{
|
|
8729
|
-
"kind": "variable",
|
|
8730
|
-
"name": "fi",
|
|
8731
|
-
"type": {
|
|
8732
|
-
"text": "Translation"
|
|
8733
|
-
},
|
|
8734
|
-
"default": "{\n $lang: \"fi\",\n $name: \"Suomi\",\n $dir: \"ltr\",\n\n \"nord-command-menu\": {\n instructions: \"Paina 'Enter' vahvistaaksesi valinnan tai 'Escape' peruuttaaksesi\",\n inputLabel: \"Kirjoita komento jonka haluat suorittaa.\",\n footerArrowKeys: \"Siirry\",\n footerEnterKey: \"Valitse\",\n footerEscapeKey: \"Esc sulje\",\n footerBackspaceKey: \"Siirry takaisin\",\n noResults: searchTerm => `Ei tuloksia haulle \"${searchTerm}\"`,\n tip: \"Vinkki: jotkin haut vaativat tarkan hakutermin. Koita kirjoittaa koko hakutermi kokonaisuudessaan, tai kokeile toista sanaa tai fraasia.\",\n },\n\n \"nord-calendar\": {\n prevMonthLabel: \"Edellinen kuukausi\",\n nextMonthLabel: \"Seuraava kuukausi\",\n monthSelectLabel: \"Kuukausi\",\n yearSelectLabel: \"Vuosi\",\n },\n\n \"nord-date-picker\": {\n modalHeading: \"Valitse päivämäärä\",\n closeLabel: \"Sulje ikkuna\",\n buttonLabel: \"Valitse päivämäärä\",\n selectedDateMessage: \"Valittu päivämäärä on\",\n },\n\n \"nord-modal\": {\n closeLabel: \"Sulje ikkuna\",\n },\n\n \"nord-nav-toggle\": {\n label: \"Näytä/Piilota valikko\",\n },\n\n \"nord-textarea\": {\n remainingCharacters: (remaining: number) => `${remaining} merkkiä jäljellä`,\n },\n}"
|
|
8735
|
-
}
|
|
8736
|
-
],
|
|
8737
|
-
"exports": [
|
|
8738
|
-
{
|
|
8739
|
-
"kind": "js",
|
|
8740
|
-
"name": "default",
|
|
8741
|
-
"declaration": {
|
|
8742
|
-
"name": "fi",
|
|
8743
|
-
"module": "src/localization/fi-fi.ts"
|
|
8744
|
-
}
|
|
8745
|
-
}
|
|
8746
|
-
]
|
|
8747
|
-
},
|
|
8748
|
-
{
|
|
8749
|
-
"kind": "javascript-module",
|
|
8750
|
-
"path": "src/localization/translation.ts",
|
|
8751
|
-
"declarations": [
|
|
8752
|
-
{
|
|
8753
|
-
"kind": "function",
|
|
8754
|
-
"name": "clearTranslations",
|
|
8755
|
-
"description": "Removes all registered translations"
|
|
8756
|
-
},
|
|
8757
|
-
{
|
|
8758
|
-
"kind": "function",
|
|
8759
|
-
"name": "registerTranslation",
|
|
8760
|
-
"parameters": [
|
|
8761
|
-
{
|
|
8762
|
-
"name": "translation",
|
|
8763
|
-
"type": {
|
|
8764
|
-
"text": "Translation[]"
|
|
8765
|
-
}
|
|
8766
|
-
}
|
|
8767
|
-
],
|
|
8768
|
-
"description": "Registers one or more translations"
|
|
8769
|
-
},
|
|
8770
|
-
{
|
|
8771
|
-
"kind": "function",
|
|
8772
|
-
"name": "subscribe",
|
|
8773
|
-
"return": {
|
|
8774
|
-
"type": {
|
|
8775
|
-
"text": ""
|
|
8776
|
-
}
|
|
8777
|
-
},
|
|
8778
|
-
"parameters": [
|
|
8779
|
-
{
|
|
8780
|
-
"name": "onChange",
|
|
8781
|
-
"type": {
|
|
8782
|
-
"text": "() => void"
|
|
8783
|
-
},
|
|
8784
|
-
"description": "callback for when either `lang` attr changes, or a new language is registered."
|
|
8785
|
-
}
|
|
8786
|
-
],
|
|
8787
|
-
"description": "subscribe to language changes"
|
|
8788
|
-
},
|
|
8789
|
-
{
|
|
8790
|
-
"kind": "function",
|
|
8791
|
-
"name": "isTranslationRegistered",
|
|
8792
|
-
"parameters": [
|
|
8793
|
-
{
|
|
8794
|
-
"name": "lang",
|
|
8795
|
-
"type": {
|
|
8796
|
-
"text": "string"
|
|
8797
|
-
},
|
|
8798
|
-
"description": "the lang code e.g. \"en\" or \"en-GB\""
|
|
8799
|
-
}
|
|
8800
|
-
],
|
|
8801
|
-
"description": "Check whether there is a translation registered for the given lang"
|
|
8802
|
-
},
|
|
8803
|
-
{
|
|
8804
|
-
"kind": "function",
|
|
8805
|
-
"name": "resolveTranslation",
|
|
8806
|
-
"parameters": [
|
|
8807
|
-
{
|
|
8808
|
-
"name": "langCode",
|
|
8809
|
-
"type": {
|
|
8810
|
-
"text": "string"
|
|
8811
|
-
}
|
|
8812
|
-
}
|
|
8813
|
-
],
|
|
8814
|
-
"description": "Picks the most appropriate translation for the given language, from most specific to least specific.\nFirst tries lang + region, then lang only, then fallback."
|
|
8815
|
-
}
|
|
8816
|
-
],
|
|
8817
|
-
"exports": [
|
|
8818
|
-
{
|
|
8819
|
-
"kind": "js",
|
|
8820
|
-
"name": "clearTranslations",
|
|
8821
|
-
"declaration": {
|
|
8822
|
-
"name": "clearTranslations",
|
|
8823
|
-
"module": "src/localization/translation.ts"
|
|
8824
|
-
}
|
|
8825
|
-
},
|
|
8826
|
-
{
|
|
8827
|
-
"kind": "js",
|
|
8828
|
-
"name": "registerTranslation",
|
|
8829
|
-
"declaration": {
|
|
8830
|
-
"name": "registerTranslation",
|
|
8831
|
-
"module": "src/localization/translation.ts"
|
|
8832
|
-
}
|
|
8833
|
-
},
|
|
8834
|
-
{
|
|
8835
|
-
"kind": "js",
|
|
8836
|
-
"name": "subscribe",
|
|
8837
|
-
"declaration": {
|
|
8838
|
-
"name": "subscribe",
|
|
8839
|
-
"module": "src/localization/translation.ts"
|
|
8840
|
-
}
|
|
8841
|
-
},
|
|
8842
|
-
{
|
|
8843
|
-
"kind": "js",
|
|
8844
|
-
"name": "isTranslationRegistered",
|
|
8845
|
-
"declaration": {
|
|
8846
|
-
"name": "isTranslationRegistered",
|
|
8847
|
-
"module": "src/localization/translation.ts"
|
|
8848
|
-
}
|
|
8849
|
-
},
|
|
8850
|
-
{
|
|
8851
|
-
"kind": "js",
|
|
8852
|
-
"name": "resolveTranslation",
|
|
8853
|
-
"declaration": {
|
|
8854
|
-
"name": "resolveTranslation",
|
|
8855
|
-
"module": "src/localization/translation.ts"
|
|
8856
|
-
}
|
|
8857
|
-
},
|
|
8858
|
-
{
|
|
8859
|
-
"kind": "js",
|
|
8860
|
-
"name": "fallback",
|
|
8861
|
-
"declaration": {
|
|
8862
|
-
"name": "en",
|
|
8863
|
-
"module": "src/localization/translation.ts"
|
|
8864
|
-
}
|
|
8865
|
-
}
|
|
8866
|
-
]
|
|
8867
|
-
},
|
|
8868
8978
|
{
|
|
8869
8979
|
"kind": "javascript-module",
|
|
8870
8980
|
"path": "src/nav-group/NavGroup.ts",
|
|
@@ -8909,6 +9019,9 @@
|
|
|
8909
9019
|
"category": "navigation",
|
|
8910
9020
|
"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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
|
|
8911
9021
|
"examples": [],
|
|
9022
|
+
"dependencies": [
|
|
9023
|
+
"icon"
|
|
9024
|
+
],
|
|
8912
9025
|
"tagName": "nord-nav-group",
|
|
8913
9026
|
"customElement": true
|
|
8914
9027
|
}
|
|
@@ -9170,6 +9283,7 @@
|
|
|
9170
9283
|
"category": "navigation",
|
|
9171
9284
|
"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- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use navigation item outside of navigation group and navigation components.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
|
|
9172
9285
|
"examples": [],
|
|
9286
|
+
"dependencies": [],
|
|
9173
9287
|
"tagName": "nord-nav-item",
|
|
9174
9288
|
"customElement": true
|
|
9175
9289
|
}
|
|
@@ -9195,12 +9309,152 @@
|
|
|
9195
9309
|
},
|
|
9196
9310
|
{
|
|
9197
9311
|
"kind": "javascript-module",
|
|
9198
|
-
"path": "src/
|
|
9312
|
+
"path": "src/nav-toggle/NavToggle.ts",
|
|
9199
9313
|
"declarations": [
|
|
9200
9314
|
{
|
|
9201
9315
|
"kind": "class",
|
|
9202
|
-
"description": "
|
|
9203
|
-
"name": "
|
|
9316
|
+
"description": "Nav toggle is meant for hiding and showing the primary navigation.\nThis component is used internally in the Layout component, but can also be\nused separate to further customize the behaviour.",
|
|
9317
|
+
"name": "NavToggle",
|
|
9318
|
+
"members": [
|
|
9319
|
+
{
|
|
9320
|
+
"kind": "field",
|
|
9321
|
+
"name": "direction",
|
|
9322
|
+
"privacy": "private",
|
|
9323
|
+
"default": "new DirectionController(this)"
|
|
9324
|
+
},
|
|
9325
|
+
{
|
|
9326
|
+
"kind": "field",
|
|
9327
|
+
"name": "localization",
|
|
9328
|
+
"privacy": "private",
|
|
9329
|
+
"default": "new LocalizeController<\"nord-nav-toggle\">(this)"
|
|
9330
|
+
},
|
|
9331
|
+
{
|
|
9332
|
+
"kind": "field",
|
|
9333
|
+
"name": "focusableRef",
|
|
9334
|
+
"privacy": "protected",
|
|
9335
|
+
"inheritedFrom": {
|
|
9336
|
+
"name": "FocusableMixin",
|
|
9337
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
9338
|
+
}
|
|
9339
|
+
},
|
|
9340
|
+
{
|
|
9341
|
+
"kind": "method",
|
|
9342
|
+
"name": "focus",
|
|
9343
|
+
"parameters": [
|
|
9344
|
+
{
|
|
9345
|
+
"name": "options",
|
|
9346
|
+
"optional": true,
|
|
9347
|
+
"type": {
|
|
9348
|
+
"text": "FocusOptions"
|
|
9349
|
+
},
|
|
9350
|
+
"description": "An object which controls aspects of the focusing process."
|
|
9351
|
+
}
|
|
9352
|
+
],
|
|
9353
|
+
"description": "Programmatically move focus to the component.",
|
|
9354
|
+
"inheritedFrom": {
|
|
9355
|
+
"name": "FocusableMixin",
|
|
9356
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
9357
|
+
}
|
|
9358
|
+
},
|
|
9359
|
+
{
|
|
9360
|
+
"kind": "method",
|
|
9361
|
+
"name": "blur",
|
|
9362
|
+
"description": "Programmatically remove focus from the component.",
|
|
9363
|
+
"inheritedFrom": {
|
|
9364
|
+
"name": "FocusableMixin",
|
|
9365
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
9366
|
+
}
|
|
9367
|
+
},
|
|
9368
|
+
{
|
|
9369
|
+
"kind": "method",
|
|
9370
|
+
"name": "click",
|
|
9371
|
+
"description": "Programmatically simulates a click on the component.",
|
|
9372
|
+
"inheritedFrom": {
|
|
9373
|
+
"name": "FocusableMixin",
|
|
9374
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
9375
|
+
}
|
|
9376
|
+
}
|
|
9377
|
+
],
|
|
9378
|
+
"mixins": [
|
|
9379
|
+
{
|
|
9380
|
+
"name": "FocusableMixin",
|
|
9381
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
9382
|
+
}
|
|
9383
|
+
],
|
|
9384
|
+
"superclass": {
|
|
9385
|
+
"name": "LitElement",
|
|
9386
|
+
"package": "lit"
|
|
9387
|
+
},
|
|
9388
|
+
"localization": [
|
|
9389
|
+
{
|
|
9390
|
+
"name": "label",
|
|
9391
|
+
"description": "Accessible label for the nav toggle button."
|
|
9392
|
+
}
|
|
9393
|
+
],
|
|
9394
|
+
"status": "new",
|
|
9395
|
+
"category": "action",
|
|
9396
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip with the toggle that’s labelled as `Toggle navigation`.\n- We recommend setting a keyboard shortcut that toggles the navigation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic button or toggle. Use the [Button component](/components/button/) instead.\n\n</div>\n",
|
|
9397
|
+
"examples": [],
|
|
9398
|
+
"dependencies": [
|
|
9399
|
+
"button",
|
|
9400
|
+
"icon",
|
|
9401
|
+
"visually-hidden"
|
|
9402
|
+
],
|
|
9403
|
+
"tagName": "nord-nav-toggle",
|
|
9404
|
+
"customElement": true
|
|
9405
|
+
}
|
|
9406
|
+
],
|
|
9407
|
+
"exports": [
|
|
9408
|
+
{
|
|
9409
|
+
"kind": "js",
|
|
9410
|
+
"name": "default",
|
|
9411
|
+
"declaration": {
|
|
9412
|
+
"name": "NavToggle",
|
|
9413
|
+
"module": "src/nav-toggle/NavToggle.ts"
|
|
9414
|
+
}
|
|
9415
|
+
},
|
|
9416
|
+
{
|
|
9417
|
+
"kind": "custom-element-definition",
|
|
9418
|
+
"name": "nord-nav-toggle",
|
|
9419
|
+
"declaration": {
|
|
9420
|
+
"name": "NavToggle",
|
|
9421
|
+
"module": "src/nav-toggle/NavToggle.ts"
|
|
9422
|
+
}
|
|
9423
|
+
}
|
|
9424
|
+
]
|
|
9425
|
+
},
|
|
9426
|
+
{
|
|
9427
|
+
"kind": "javascript-module",
|
|
9428
|
+
"path": "src/nav-toggle/localization.ts",
|
|
9429
|
+
"declarations": [
|
|
9430
|
+
{
|
|
9431
|
+
"kind": "variable",
|
|
9432
|
+
"name": "localization",
|
|
9433
|
+
"type": {
|
|
9434
|
+
"text": "object"
|
|
9435
|
+
},
|
|
9436
|
+
"default": "{\n label: \"Toggle navigation\",\n}"
|
|
9437
|
+
}
|
|
9438
|
+
],
|
|
9439
|
+
"exports": [
|
|
9440
|
+
{
|
|
9441
|
+
"kind": "js",
|
|
9442
|
+
"name": "default",
|
|
9443
|
+
"declaration": {
|
|
9444
|
+
"name": "localization",
|
|
9445
|
+
"module": "src/nav-toggle/localization.ts"
|
|
9446
|
+
}
|
|
9447
|
+
}
|
|
9448
|
+
]
|
|
9449
|
+
},
|
|
9450
|
+
{
|
|
9451
|
+
"kind": "javascript-module",
|
|
9452
|
+
"path": "src/navigation/Navigation.ts",
|
|
9453
|
+
"declarations": [
|
|
9454
|
+
{
|
|
9455
|
+
"kind": "class",
|
|
9456
|
+
"description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
|
|
9457
|
+
"name": "Navigation",
|
|
9204
9458
|
"slots": [
|
|
9205
9459
|
{
|
|
9206
9460
|
"description": "The main section of the sidebar, for holding nav components.",
|
|
@@ -9215,7 +9469,14 @@
|
|
|
9215
9469
|
"name": "footer"
|
|
9216
9470
|
}
|
|
9217
9471
|
],
|
|
9218
|
-
"members": [
|
|
9472
|
+
"members": [
|
|
9473
|
+
{
|
|
9474
|
+
"kind": "field",
|
|
9475
|
+
"name": "headerSlot",
|
|
9476
|
+
"privacy": "private",
|
|
9477
|
+
"default": "new SlotController(this, \"header\")"
|
|
9478
|
+
}
|
|
9479
|
+
],
|
|
9219
9480
|
"superclass": {
|
|
9220
9481
|
"name": "LitElement",
|
|
9221
9482
|
"package": "lit"
|
|
@@ -9225,6 +9486,7 @@
|
|
|
9225
9486
|
"category": "navigation",
|
|
9226
9487
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n",
|
|
9227
9488
|
"examples": [],
|
|
9489
|
+
"dependencies": [],
|
|
9228
9490
|
"tagName": "nord-navigation",
|
|
9229
9491
|
"customElement": true
|
|
9230
9492
|
}
|
|
@@ -9250,93 +9512,210 @@
|
|
|
9250
9512
|
},
|
|
9251
9513
|
{
|
|
9252
9514
|
"kind": "javascript-module",
|
|
9253
|
-
"path": "src/
|
|
9515
|
+
"path": "src/notification/Notification.ts",
|
|
9254
9516
|
"declarations": [
|
|
9255
9517
|
{
|
|
9256
9518
|
"kind": "class",
|
|
9257
|
-
"description": "
|
|
9258
|
-
"name": "
|
|
9519
|
+
"description": "Notifications provide important information that requires action or acknowledgement.\nA notification is displayed until the user dismisses it.",
|
|
9520
|
+
"name": "Notification",
|
|
9521
|
+
"slots": [
|
|
9522
|
+
{
|
|
9523
|
+
"description": "Default slot used for the notification text/message.",
|
|
9524
|
+
"name": ""
|
|
9525
|
+
},
|
|
9526
|
+
{
|
|
9527
|
+
"description": "Slot used for the notification icon.",
|
|
9528
|
+
"name": "icon"
|
|
9529
|
+
}
|
|
9530
|
+
],
|
|
9259
9531
|
"members": [
|
|
9260
9532
|
{
|
|
9261
9533
|
"kind": "field",
|
|
9262
|
-
"name": "
|
|
9534
|
+
"name": "localize",
|
|
9263
9535
|
"privacy": "private",
|
|
9264
|
-
"default": "new
|
|
9536
|
+
"default": "new LocalizeController<\"nord-notification\">(this)"
|
|
9265
9537
|
},
|
|
9266
9538
|
{
|
|
9267
9539
|
"kind": "field",
|
|
9268
|
-
"name": "
|
|
9269
|
-
"privacy": "
|
|
9270
|
-
"
|
|
9540
|
+
"name": "notificationRef",
|
|
9541
|
+
"privacy": "protected",
|
|
9542
|
+
"inheritedFrom": {
|
|
9543
|
+
"name": "NotificationMixin",
|
|
9544
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
9545
|
+
}
|
|
9271
9546
|
},
|
|
9272
9547
|
{
|
|
9273
9548
|
"kind": "field",
|
|
9274
|
-
"name": "
|
|
9549
|
+
"name": "dismissed",
|
|
9550
|
+
"type": {
|
|
9551
|
+
"text": "boolean"
|
|
9552
|
+
},
|
|
9275
9553
|
"privacy": "protected",
|
|
9554
|
+
"default": "false",
|
|
9276
9555
|
"inheritedFrom": {
|
|
9277
|
-
"name": "
|
|
9278
|
-
"module": "src/common/mixins/
|
|
9556
|
+
"name": "NotificationMixin",
|
|
9557
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
9279
9558
|
}
|
|
9280
9559
|
},
|
|
9281
9560
|
{
|
|
9282
9561
|
"kind": "method",
|
|
9283
|
-
"name": "
|
|
9284
|
-
"
|
|
9285
|
-
{
|
|
9286
|
-
"name": "options",
|
|
9287
|
-
"optional": true,
|
|
9288
|
-
"type": {
|
|
9289
|
-
"text": "FocusOptions"
|
|
9290
|
-
},
|
|
9291
|
-
"description": "An object which controls aspects of the focusing process."
|
|
9292
|
-
}
|
|
9293
|
-
],
|
|
9294
|
-
"description": "Programmatically move focus to the component.",
|
|
9562
|
+
"name": "dismiss",
|
|
9563
|
+
"description": "Programmatically dismiss the notification.\nThe returned promise resolves when notification's exit animation is complete.",
|
|
9295
9564
|
"inheritedFrom": {
|
|
9296
|
-
"name": "
|
|
9297
|
-
"module": "src/common/mixins/
|
|
9565
|
+
"name": "NotificationMixin",
|
|
9566
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
9298
9567
|
}
|
|
9299
9568
|
},
|
|
9300
9569
|
{
|
|
9301
|
-
"kind": "
|
|
9302
|
-
"name": "
|
|
9303
|
-
"
|
|
9570
|
+
"kind": "field",
|
|
9571
|
+
"name": "_warningLogged",
|
|
9572
|
+
"type": {
|
|
9573
|
+
"text": "boolean"
|
|
9574
|
+
},
|
|
9575
|
+
"privacy": "private",
|
|
9576
|
+
"static": true,
|
|
9577
|
+
"default": "false",
|
|
9304
9578
|
"inheritedFrom": {
|
|
9305
|
-
"name": "
|
|
9306
|
-
"module": "src/common/mixins/
|
|
9579
|
+
"name": "DraftComponentMixin",
|
|
9580
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
9581
|
+
}
|
|
9582
|
+
}
|
|
9583
|
+
],
|
|
9584
|
+
"events": [
|
|
9585
|
+
{
|
|
9586
|
+
"name": "dismiss",
|
|
9587
|
+
"type": {
|
|
9588
|
+
"text": "NordEvent"
|
|
9589
|
+
},
|
|
9590
|
+
"description": "Fired when the notification is dismissed, and its exit animation has completed. This event should be used to remove the dismissed notification from the DOM.",
|
|
9591
|
+
"inheritedFrom": {
|
|
9592
|
+
"name": "NotificationMixin",
|
|
9593
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
9307
9594
|
}
|
|
9595
|
+
}
|
|
9596
|
+
],
|
|
9597
|
+
"mixins": [
|
|
9598
|
+
{
|
|
9599
|
+
"name": "NotificationMixin",
|
|
9600
|
+
"module": "/src/common/mixins/NotificationMixin.js"
|
|
9308
9601
|
},
|
|
9309
9602
|
{
|
|
9310
|
-
"
|
|
9311
|
-
"
|
|
9312
|
-
|
|
9603
|
+
"name": "DraftComponentMixin",
|
|
9604
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
9605
|
+
}
|
|
9606
|
+
],
|
|
9607
|
+
"superclass": {
|
|
9608
|
+
"name": "LitElement",
|
|
9609
|
+
"package": "lit"
|
|
9610
|
+
},
|
|
9611
|
+
"localization": [
|
|
9612
|
+
{
|
|
9613
|
+
"name": "dismissLabel",
|
|
9614
|
+
"description": "Accessible label for the dismiss button."
|
|
9615
|
+
}
|
|
9616
|
+
],
|
|
9617
|
+
"status": "draft",
|
|
9618
|
+
"category": "feedback",
|
|
9619
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for short messages that describe the purpose of the notification.\n- Use for important updates that require user action/attention.\n- Provide a single call to action within the notification.\n- Use in combination with [Notification group](../notification-group/) so that notifications get styled and positioned correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for transient or unimportant messages. Consider using a [Toast](/components/toast) instead.\n- Don't remove a notification until a user has explicitly dismissed, or acted on the notification.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nNotification content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Patient arrived</div>\n\nWhen writing the notification content, be concise. Keep content to 1 to 2 sentence:\n\n<div class=\"n-usage n-usage-do\">You’ve reached the limit of 30 users included in your plan. Upgrade to add more.</div>\n<div class=\"n-usage n-usage-dont\">You have reached the user limit. Your clinic can only have a maximum of 30 users. To add more users, remove users you no longer need or upgrade your plan to add more.</div>\n\nWhen writing the notification content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen Arrived To Clinic With Pixie Cat.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Ariel Salminen arrived to clinic with Pixie cat.</div>\n<div class=\"n-usage n-usage-dont\">Ariel Salminen arrived to clinic with Pixie cat</div>\n\nAction link labels in notifications should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing action link labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Start Consultation</div>\n\nAvoid unnecessary words and articles in action link labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
|
|
9620
|
+
"examples": [],
|
|
9621
|
+
"dependencies": [
|
|
9622
|
+
"stack",
|
|
9623
|
+
"icon"
|
|
9624
|
+
],
|
|
9625
|
+
"tagName": "nord-notification",
|
|
9626
|
+
"customElement": true
|
|
9627
|
+
}
|
|
9628
|
+
],
|
|
9629
|
+
"exports": [
|
|
9630
|
+
{
|
|
9631
|
+
"kind": "js",
|
|
9632
|
+
"name": "default",
|
|
9633
|
+
"declaration": {
|
|
9634
|
+
"name": "Notification",
|
|
9635
|
+
"module": "src/notification/Notification.ts"
|
|
9636
|
+
}
|
|
9637
|
+
},
|
|
9638
|
+
{
|
|
9639
|
+
"kind": "custom-element-definition",
|
|
9640
|
+
"name": "nord-notification",
|
|
9641
|
+
"declaration": {
|
|
9642
|
+
"name": "Notification",
|
|
9643
|
+
"module": "src/notification/Notification.ts"
|
|
9644
|
+
}
|
|
9645
|
+
}
|
|
9646
|
+
]
|
|
9647
|
+
},
|
|
9648
|
+
{
|
|
9649
|
+
"kind": "javascript-module",
|
|
9650
|
+
"path": "src/notification/localization.ts",
|
|
9651
|
+
"declarations": [
|
|
9652
|
+
{
|
|
9653
|
+
"kind": "variable",
|
|
9654
|
+
"name": "localization",
|
|
9655
|
+
"type": {
|
|
9656
|
+
"text": "object"
|
|
9657
|
+
},
|
|
9658
|
+
"default": "{\n dismissLabel: \"Dismiss notification\",\n}"
|
|
9659
|
+
}
|
|
9660
|
+
],
|
|
9661
|
+
"exports": [
|
|
9662
|
+
{
|
|
9663
|
+
"kind": "js",
|
|
9664
|
+
"name": "default",
|
|
9665
|
+
"declaration": {
|
|
9666
|
+
"name": "localization",
|
|
9667
|
+
"module": "src/notification/localization.ts"
|
|
9668
|
+
}
|
|
9669
|
+
}
|
|
9670
|
+
]
|
|
9671
|
+
},
|
|
9672
|
+
{
|
|
9673
|
+
"kind": "javascript-module",
|
|
9674
|
+
"path": "src/notification-group/NotificationGroup.ts",
|
|
9675
|
+
"declarations": [
|
|
9676
|
+
{
|
|
9677
|
+
"kind": "class",
|
|
9678
|
+
"description": "Notification group is used to position and style a group of notifications.",
|
|
9679
|
+
"name": "NotificationGroup",
|
|
9680
|
+
"slots": [
|
|
9681
|
+
{
|
|
9682
|
+
"description": "Default slot in which to place notifications.",
|
|
9683
|
+
"name": ""
|
|
9684
|
+
}
|
|
9685
|
+
],
|
|
9686
|
+
"members": [
|
|
9687
|
+
{
|
|
9688
|
+
"kind": "field",
|
|
9689
|
+
"name": "_warningLogged",
|
|
9690
|
+
"type": {
|
|
9691
|
+
"text": "boolean"
|
|
9692
|
+
},
|
|
9693
|
+
"privacy": "private",
|
|
9694
|
+
"static": true,
|
|
9695
|
+
"default": "false",
|
|
9313
9696
|
"inheritedFrom": {
|
|
9314
|
-
"name": "
|
|
9315
|
-
"module": "src/common/mixins/
|
|
9697
|
+
"name": "DraftComponentMixin",
|
|
9698
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
9316
9699
|
}
|
|
9317
9700
|
}
|
|
9318
9701
|
],
|
|
9319
9702
|
"mixins": [
|
|
9320
9703
|
{
|
|
9321
|
-
"name": "
|
|
9322
|
-
"module": "/src/common/mixins/
|
|
9704
|
+
"name": "DraftComponentMixin",
|
|
9705
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
9323
9706
|
}
|
|
9324
9707
|
],
|
|
9325
9708
|
"superclass": {
|
|
9326
9709
|
"name": "LitElement",
|
|
9327
9710
|
"package": "lit"
|
|
9328
9711
|
},
|
|
9329
|
-
"localization": [
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
}
|
|
9334
|
-
],
|
|
9335
|
-
"status": "new",
|
|
9336
|
-
"category": "action",
|
|
9337
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip with the toggle that’s labelled as `Toggle navigation`.\n- We recommend setting a keyboard shortcut that toggles the navigation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic button or toggle. Use the [Button component](/components/button/) instead.\n\n</div>\n",
|
|
9712
|
+
"localization": [],
|
|
9713
|
+
"status": "draft",
|
|
9714
|
+
"category": "feedback",
|
|
9715
|
+
"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",
|
|
9338
9716
|
"examples": [],
|
|
9339
|
-
"
|
|
9717
|
+
"dependencies": [],
|
|
9718
|
+
"tagName": "nord-notification-group",
|
|
9340
9719
|
"customElement": true
|
|
9341
9720
|
}
|
|
9342
9721
|
],
|
|
@@ -9345,40 +9724,16 @@
|
|
|
9345
9724
|
"kind": "js",
|
|
9346
9725
|
"name": "default",
|
|
9347
9726
|
"declaration": {
|
|
9348
|
-
"name": "
|
|
9349
|
-
"module": "src/
|
|
9727
|
+
"name": "NotificationGroup",
|
|
9728
|
+
"module": "src/notification-group/NotificationGroup.ts"
|
|
9350
9729
|
}
|
|
9351
9730
|
},
|
|
9352
9731
|
{
|
|
9353
9732
|
"kind": "custom-element-definition",
|
|
9354
|
-
"name": "nord-
|
|
9733
|
+
"name": "nord-notification-group",
|
|
9355
9734
|
"declaration": {
|
|
9356
|
-
"name": "
|
|
9357
|
-
"module": "src/
|
|
9358
|
-
}
|
|
9359
|
-
}
|
|
9360
|
-
]
|
|
9361
|
-
},
|
|
9362
|
-
{
|
|
9363
|
-
"kind": "javascript-module",
|
|
9364
|
-
"path": "src/nav-toggle/localization.ts",
|
|
9365
|
-
"declarations": [
|
|
9366
|
-
{
|
|
9367
|
-
"kind": "variable",
|
|
9368
|
-
"name": "localization",
|
|
9369
|
-
"type": {
|
|
9370
|
-
"text": "object"
|
|
9371
|
-
},
|
|
9372
|
-
"default": "{\n label: \"Toggle navigation\",\n}"
|
|
9373
|
-
}
|
|
9374
|
-
],
|
|
9375
|
-
"exports": [
|
|
9376
|
-
{
|
|
9377
|
-
"kind": "js",
|
|
9378
|
-
"name": "default",
|
|
9379
|
-
"declaration": {
|
|
9380
|
-
"name": "localization",
|
|
9381
|
-
"module": "src/nav-toggle/localization.ts"
|
|
9735
|
+
"name": "NotificationGroup",
|
|
9736
|
+
"module": "src/notification-group/NotificationGroup.ts"
|
|
9382
9737
|
}
|
|
9383
9738
|
}
|
|
9384
9739
|
]
|
|
@@ -9702,6 +10057,7 @@
|
|
|
9702
10057
|
"category": "overlay",
|
|
9703
10058
|
"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",
|
|
9704
10059
|
"examples": [],
|
|
10060
|
+
"dependencies": [],
|
|
9705
10061
|
"tagName": "nord-popout",
|
|
9706
10062
|
"customElement": true
|
|
9707
10063
|
}
|
|
@@ -9873,6 +10229,7 @@
|
|
|
9873
10229
|
"category": "feedback",
|
|
9874
10230
|
"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",
|
|
9875
10231
|
"examples": [],
|
|
10232
|
+
"dependencies": [],
|
|
9876
10233
|
"tagName": "nord-progress-bar",
|
|
9877
10234
|
"customElement": true
|
|
9878
10235
|
}
|
|
@@ -10059,6 +10416,7 @@
|
|
|
10059
10416
|
"displayName": "QR Code",
|
|
10060
10417
|
"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 people to access information on their smartphone without the need to type.\n- Always provide an alternative way to access the same information.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t hide important information behind a QR Code only.\n\n</div>\n",
|
|
10061
10418
|
"examples": [],
|
|
10419
|
+
"dependencies": [],
|
|
10062
10420
|
"tagName": "nord-qrcode",
|
|
10063
10421
|
"customElement": true
|
|
10064
10422
|
}
|
|
@@ -10694,6 +11052,7 @@
|
|
|
10694
11052
|
"category": "form",
|
|
10695
11053
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a radio component when users can only select one option from a list.\n- Favour radios 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- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\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 instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button 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 radio 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 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- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n",
|
|
10696
11054
|
"examples": [],
|
|
11055
|
+
"dependencies": [],
|
|
10697
11056
|
"tagName": "nord-radio",
|
|
10698
11057
|
"customElement": true,
|
|
10699
11058
|
"events": [
|
|
@@ -11485,6 +11844,7 @@
|
|
|
11485
11844
|
"category": "form",
|
|
11486
11845
|
"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",
|
|
11487
11846
|
"examples": [],
|
|
11847
|
+
"dependencies": [],
|
|
11488
11848
|
"tagName": "nord-range",
|
|
11489
11849
|
"customElement": true
|
|
11490
11850
|
}
|
|
@@ -12196,6 +12556,10 @@
|
|
|
12196
12556
|
"category": "form",
|
|
12197
12557
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using radio components instead, if you have enough space to allow it. \n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing select labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n",
|
|
12198
12558
|
"examples": [],
|
|
12559
|
+
"dependencies": [
|
|
12560
|
+
"button",
|
|
12561
|
+
"icon"
|
|
12562
|
+
],
|
|
12199
12563
|
"tagName": "nord-select",
|
|
12200
12564
|
"customElement": true,
|
|
12201
12565
|
"events": [
|
|
@@ -12299,6 +12663,7 @@
|
|
|
12299
12663
|
"category": "feedback",
|
|
12300
12664
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n",
|
|
12301
12665
|
"examples": [],
|
|
12666
|
+
"dependencies": [],
|
|
12302
12667
|
"tagName": "nord-skeleton",
|
|
12303
12668
|
"customElement": true
|
|
12304
12669
|
}
|
|
@@ -12322,106 +12687,6 @@
|
|
|
12322
12687
|
}
|
|
12323
12688
|
]
|
|
12324
12689
|
},
|
|
12325
|
-
{
|
|
12326
|
-
"kind": "javascript-module",
|
|
12327
|
-
"path": "src/spinner/Spinner.ts",
|
|
12328
|
-
"declarations": [
|
|
12329
|
-
{
|
|
12330
|
-
"kind": "class",
|
|
12331
|
-
"description": "Spinner component is used to indicate users that their action is being\nprocessed. You can customize the size and color of the spinner with the\nprovided properties.",
|
|
12332
|
-
"name": "Spinner",
|
|
12333
|
-
"members": [
|
|
12334
|
-
{
|
|
12335
|
-
"kind": "field",
|
|
12336
|
-
"name": "size",
|
|
12337
|
-
"type": {
|
|
12338
|
-
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
12339
|
-
},
|
|
12340
|
-
"default": "\"m\"",
|
|
12341
|
-
"description": "The size of the spinner.",
|
|
12342
|
-
"attribute": "size",
|
|
12343
|
-
"reflects": true
|
|
12344
|
-
},
|
|
12345
|
-
{
|
|
12346
|
-
"kind": "field",
|
|
12347
|
-
"name": "color",
|
|
12348
|
-
"type": {
|
|
12349
|
-
"text": "string | undefined"
|
|
12350
|
-
},
|
|
12351
|
-
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
12352
|
-
"attribute": "color",
|
|
12353
|
-
"reflects": true
|
|
12354
|
-
},
|
|
12355
|
-
{
|
|
12356
|
-
"kind": "field",
|
|
12357
|
-
"name": "label",
|
|
12358
|
-
"type": {
|
|
12359
|
-
"text": "string | undefined"
|
|
12360
|
-
},
|
|
12361
|
-
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
12362
|
-
"attribute": "label",
|
|
12363
|
-
"reflects": true
|
|
12364
|
-
}
|
|
12365
|
-
],
|
|
12366
|
-
"attributes": [
|
|
12367
|
-
{
|
|
12368
|
-
"name": "size",
|
|
12369
|
-
"type": {
|
|
12370
|
-
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
12371
|
-
},
|
|
12372
|
-
"default": "\"m\"",
|
|
12373
|
-
"description": "The size of the spinner.",
|
|
12374
|
-
"fieldName": "size"
|
|
12375
|
-
},
|
|
12376
|
-
{
|
|
12377
|
-
"name": "color",
|
|
12378
|
-
"type": {
|
|
12379
|
-
"text": "string | undefined"
|
|
12380
|
-
},
|
|
12381
|
-
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
12382
|
-
"fieldName": "color"
|
|
12383
|
-
},
|
|
12384
|
-
{
|
|
12385
|
-
"name": "label",
|
|
12386
|
-
"type": {
|
|
12387
|
-
"text": "string | undefined"
|
|
12388
|
-
},
|
|
12389
|
-
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
12390
|
-
"fieldName": "label"
|
|
12391
|
-
}
|
|
12392
|
-
],
|
|
12393
|
-
"superclass": {
|
|
12394
|
-
"name": "LitElement",
|
|
12395
|
-
"package": "lit"
|
|
12396
|
-
},
|
|
12397
|
-
"localization": [],
|
|
12398
|
-
"status": "ready",
|
|
12399
|
-
"category": "feedback",
|
|
12400
|
-
"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 indicating users that their action is being processed.\n- Use the label property to provide an accessible label for the spinner. If no label is supplied, the spinner is hidden from assistive technology.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to show progress. Favor a progress bar instead.\n\n</div>\n",
|
|
12401
|
-
"examples": [],
|
|
12402
|
-
"tagName": "nord-spinner",
|
|
12403
|
-
"customElement": true
|
|
12404
|
-
}
|
|
12405
|
-
],
|
|
12406
|
-
"exports": [
|
|
12407
|
-
{
|
|
12408
|
-
"kind": "js",
|
|
12409
|
-
"name": "default",
|
|
12410
|
-
"declaration": {
|
|
12411
|
-
"name": "Spinner",
|
|
12412
|
-
"module": "src/spinner/Spinner.ts"
|
|
12413
|
-
}
|
|
12414
|
-
},
|
|
12415
|
-
{
|
|
12416
|
-
"kind": "custom-element-definition",
|
|
12417
|
-
"name": "nord-spinner",
|
|
12418
|
-
"declaration": {
|
|
12419
|
-
"name": "Spinner",
|
|
12420
|
-
"module": "src/spinner/Spinner.ts"
|
|
12421
|
-
}
|
|
12422
|
-
}
|
|
12423
|
-
]
|
|
12424
|
-
},
|
|
12425
12690
|
{
|
|
12426
12691
|
"kind": "javascript-module",
|
|
12427
12692
|
"path": "src/stack/Stack.ts",
|
|
@@ -12518,53 +12783,154 @@
|
|
|
12518
12783
|
"text": "\"none\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
12519
12784
|
},
|
|
12520
12785
|
"default": "\"m\"",
|
|
12521
|
-
"description": "The space injected between components.",
|
|
12522
|
-
"fieldName": "gap"
|
|
12786
|
+
"description": "The space injected between components.",
|
|
12787
|
+
"fieldName": "gap"
|
|
12788
|
+
},
|
|
12789
|
+
{
|
|
12790
|
+
"name": "direction",
|
|
12791
|
+
"type": {
|
|
12792
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
12793
|
+
},
|
|
12794
|
+
"default": "\"vertical\"",
|
|
12795
|
+
"description": "The direction of the stack.",
|
|
12796
|
+
"fieldName": "direction"
|
|
12797
|
+
},
|
|
12798
|
+
{
|
|
12799
|
+
"name": "align-items",
|
|
12800
|
+
"type": {
|
|
12801
|
+
"text": "\"center\" | \"start\" | \"end\" | \"stretch\" | undefined"
|
|
12802
|
+
},
|
|
12803
|
+
"default": "\"stretch\"",
|
|
12804
|
+
"description": "How to align the child items inside the stack.",
|
|
12805
|
+
"fieldName": "alignItems"
|
|
12806
|
+
},
|
|
12807
|
+
{
|
|
12808
|
+
"name": "responsive",
|
|
12809
|
+
"type": {
|
|
12810
|
+
"text": "boolean"
|
|
12811
|
+
},
|
|
12812
|
+
"default": "false",
|
|
12813
|
+
"description": "This property is deprecated and will be removed in a future version. We recommend using standard [CSS media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries) over this property. Please see the [updated usage example](/components/stack/?example=using+responsive+media+query).",
|
|
12814
|
+
"deprecated": "true",
|
|
12815
|
+
"fieldName": "responsive"
|
|
12816
|
+
},
|
|
12817
|
+
{
|
|
12818
|
+
"name": "wrap",
|
|
12819
|
+
"type": {
|
|
12820
|
+
"text": "boolean"
|
|
12821
|
+
},
|
|
12822
|
+
"default": "false",
|
|
12823
|
+
"description": "Defines whether the Stack items are forced in a single line\nor can be flowed into multiple lines.",
|
|
12824
|
+
"fieldName": "wrap"
|
|
12825
|
+
},
|
|
12826
|
+
{
|
|
12827
|
+
"name": "justify-content",
|
|
12828
|
+
"type": {
|
|
12829
|
+
"text": "| \"center\"\n | \"start\"\n | \"end\"\n | \"baseline\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\" | undefined"
|
|
12830
|
+
},
|
|
12831
|
+
"description": "How to justify the child items inside the stack.",
|
|
12832
|
+
"fieldName": "justifyContent"
|
|
12833
|
+
}
|
|
12834
|
+
],
|
|
12835
|
+
"superclass": {
|
|
12836
|
+
"name": "LitElement",
|
|
12837
|
+
"package": "lit"
|
|
12838
|
+
},
|
|
12839
|
+
"localization": [],
|
|
12840
|
+
"status": "ready",
|
|
12841
|
+
"category": "structure",
|
|
12842
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when you need to stack multiple components vertically or horizontally.\n- Use when you want to adjust the white space between two or more components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for building grid based layouts.\n\n</div>\n",
|
|
12843
|
+
"examples": [],
|
|
12844
|
+
"dependencies": [],
|
|
12845
|
+
"tagName": "nord-stack",
|
|
12846
|
+
"customElement": true
|
|
12847
|
+
}
|
|
12848
|
+
],
|
|
12849
|
+
"exports": [
|
|
12850
|
+
{
|
|
12851
|
+
"kind": "js",
|
|
12852
|
+
"name": "default",
|
|
12853
|
+
"declaration": {
|
|
12854
|
+
"name": "Stack",
|
|
12855
|
+
"module": "src/stack/Stack.ts"
|
|
12856
|
+
}
|
|
12857
|
+
},
|
|
12858
|
+
{
|
|
12859
|
+
"kind": "custom-element-definition",
|
|
12860
|
+
"name": "nord-stack",
|
|
12861
|
+
"declaration": {
|
|
12862
|
+
"name": "Stack",
|
|
12863
|
+
"module": "src/stack/Stack.ts"
|
|
12864
|
+
}
|
|
12865
|
+
}
|
|
12866
|
+
]
|
|
12867
|
+
},
|
|
12868
|
+
{
|
|
12869
|
+
"kind": "javascript-module",
|
|
12870
|
+
"path": "src/spinner/Spinner.ts",
|
|
12871
|
+
"declarations": [
|
|
12872
|
+
{
|
|
12873
|
+
"kind": "class",
|
|
12874
|
+
"description": "Spinner component is used to indicate users that their action is being\nprocessed. You can customize the size and color of the spinner with the\nprovided properties.",
|
|
12875
|
+
"name": "Spinner",
|
|
12876
|
+
"members": [
|
|
12877
|
+
{
|
|
12878
|
+
"kind": "field",
|
|
12879
|
+
"name": "size",
|
|
12880
|
+
"type": {
|
|
12881
|
+
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
12882
|
+
},
|
|
12883
|
+
"default": "\"m\"",
|
|
12884
|
+
"description": "The size of the spinner.",
|
|
12885
|
+
"attribute": "size",
|
|
12886
|
+
"reflects": true
|
|
12523
12887
|
},
|
|
12524
12888
|
{
|
|
12525
|
-
"
|
|
12889
|
+
"kind": "field",
|
|
12890
|
+
"name": "color",
|
|
12526
12891
|
"type": {
|
|
12527
|
-
"text": "
|
|
12892
|
+
"text": "string | undefined"
|
|
12528
12893
|
},
|
|
12529
|
-
"
|
|
12530
|
-
"
|
|
12531
|
-
"
|
|
12894
|
+
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
12895
|
+
"attribute": "color",
|
|
12896
|
+
"reflects": true
|
|
12532
12897
|
},
|
|
12533
12898
|
{
|
|
12534
|
-
"
|
|
12899
|
+
"kind": "field",
|
|
12900
|
+
"name": "label",
|
|
12535
12901
|
"type": {
|
|
12536
|
-
"text": "
|
|
12902
|
+
"text": "string | undefined"
|
|
12537
12903
|
},
|
|
12538
|
-
"
|
|
12539
|
-
"
|
|
12540
|
-
"
|
|
12541
|
-
}
|
|
12904
|
+
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
12905
|
+
"attribute": "label",
|
|
12906
|
+
"reflects": true
|
|
12907
|
+
}
|
|
12908
|
+
],
|
|
12909
|
+
"attributes": [
|
|
12542
12910
|
{
|
|
12543
|
-
"name": "
|
|
12911
|
+
"name": "size",
|
|
12544
12912
|
"type": {
|
|
12545
|
-
"text": "
|
|
12913
|
+
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
12546
12914
|
},
|
|
12547
|
-
"default": "
|
|
12548
|
-
"description": "
|
|
12549
|
-
"
|
|
12550
|
-
"fieldName": "responsive"
|
|
12915
|
+
"default": "\"m\"",
|
|
12916
|
+
"description": "The size of the spinner.",
|
|
12917
|
+
"fieldName": "size"
|
|
12551
12918
|
},
|
|
12552
12919
|
{
|
|
12553
|
-
"name": "
|
|
12920
|
+
"name": "color",
|
|
12554
12921
|
"type": {
|
|
12555
|
-
"text": "
|
|
12922
|
+
"text": "string | undefined"
|
|
12556
12923
|
},
|
|
12557
|
-
"
|
|
12558
|
-
"
|
|
12559
|
-
"fieldName": "wrap"
|
|
12924
|
+
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
12925
|
+
"fieldName": "color"
|
|
12560
12926
|
},
|
|
12561
12927
|
{
|
|
12562
|
-
"name": "
|
|
12928
|
+
"name": "label",
|
|
12563
12929
|
"type": {
|
|
12564
|
-
"text": "
|
|
12930
|
+
"text": "string | undefined"
|
|
12565
12931
|
},
|
|
12566
|
-
"description": "
|
|
12567
|
-
"fieldName": "
|
|
12932
|
+
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
12933
|
+
"fieldName": "label"
|
|
12568
12934
|
}
|
|
12569
12935
|
],
|
|
12570
12936
|
"superclass": {
|
|
@@ -12573,10 +12939,11 @@
|
|
|
12573
12939
|
},
|
|
12574
12940
|
"localization": [],
|
|
12575
12941
|
"status": "ready",
|
|
12576
|
-
"category": "
|
|
12577
|
-
"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
|
|
12942
|
+
"category": "feedback",
|
|
12943
|
+
"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 indicating users that their action is being processed.\n- Use the label property to provide an accessible label for the spinner. If no label is supplied, the spinner is hidden from assistive technology.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to show progress. Favor a progress bar instead.\n\n</div>\n",
|
|
12578
12944
|
"examples": [],
|
|
12579
|
-
"
|
|
12945
|
+
"dependencies": [],
|
|
12946
|
+
"tagName": "nord-spinner",
|
|
12580
12947
|
"customElement": true
|
|
12581
12948
|
}
|
|
12582
12949
|
],
|
|
@@ -12585,16 +12952,16 @@
|
|
|
12585
12952
|
"kind": "js",
|
|
12586
12953
|
"name": "default",
|
|
12587
12954
|
"declaration": {
|
|
12588
|
-
"name": "
|
|
12589
|
-
"module": "src/
|
|
12955
|
+
"name": "Spinner",
|
|
12956
|
+
"module": "src/spinner/Spinner.ts"
|
|
12590
12957
|
}
|
|
12591
12958
|
},
|
|
12592
12959
|
{
|
|
12593
12960
|
"kind": "custom-element-definition",
|
|
12594
|
-
"name": "nord-
|
|
12961
|
+
"name": "nord-spinner",
|
|
12595
12962
|
"declaration": {
|
|
12596
|
-
"name": "
|
|
12597
|
-
"module": "src/
|
|
12963
|
+
"name": "Spinner",
|
|
12964
|
+
"module": "src/spinner/Spinner.ts"
|
|
12598
12965
|
}
|
|
12599
12966
|
}
|
|
12600
12967
|
]
|
|
@@ -12670,6 +13037,7 @@
|
|
|
12670
13037
|
"category": "navigation",
|
|
12671
13038
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab component within the tab group component.\n- Use the `selected` option to signify if the tab is selected.\n- Use text, icons and other non-interactive content within the tab.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use the tab component outside of the tab group component.\n- Don't add interactive elements, such as buttons and links, inside the tab component.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular section you wish to show out of order of the tabs UI itself consider using the `selected` option to select the tab but prevent the order of the tabs being affected.\n",
|
|
12672
13039
|
"examples": [],
|
|
13040
|
+
"dependencies": [],
|
|
12673
13041
|
"tagName": "nord-tab",
|
|
12674
13042
|
"customElement": true
|
|
12675
13043
|
}
|
|
@@ -12889,199 +13257,18 @@
|
|
|
12889
13257
|
"type": {
|
|
12890
13258
|
"text": "\"m\" | \"l\" | \"none\" | undefined"
|
|
12891
13259
|
},
|
|
12892
|
-
"default": "\"m\"",
|
|
12893
|
-
"description": "Controls the padding of the tab group component.",
|
|
12894
|
-
"fieldName": "padding"
|
|
12895
|
-
},
|
|
12896
|
-
{
|
|
12897
|
-
"name": "sticky",
|
|
12898
|
-
"type": {
|
|
12899
|
-
"text": "boolean"
|
|
12900
|
-
},
|
|
12901
|
-
"default": "false",
|
|
12902
|
-
"description": "Whether the tab list sticks to the top of the tab group as you scroll.",
|
|
12903
|
-
"fieldName": "sticky"
|
|
12904
|
-
}
|
|
12905
|
-
],
|
|
12906
|
-
"superclass": {
|
|
12907
|
-
"name": "LitElement",
|
|
12908
|
-
"package": "lit"
|
|
12909
|
-
},
|
|
12910
|
-
"localization": [],
|
|
12911
|
-
"status": "ready",
|
|
12912
|
-
"category": "navigation",
|
|
12913
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow multiple panels to be contained within a single window.\n- Use the tab panel and tab components within the tab group component.\n- Use the tab and tab panel components in order to create a tab group content structure.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use other components to the tab and tab panel within the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n- Don't add a tab or tab panel component without providing an accompanying panel or tab.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the tab component related to the panel to select the tab but prevent the order of the tabs being affected.\n",
|
|
12914
|
-
"examples": [],
|
|
12915
|
-
"tagName": "nord-tab-group",
|
|
12916
|
-
"customElement": true
|
|
12917
|
-
}
|
|
12918
|
-
],
|
|
12919
|
-
"exports": [
|
|
12920
|
-
{
|
|
12921
|
-
"kind": "js",
|
|
12922
|
-
"name": "default",
|
|
12923
|
-
"declaration": {
|
|
12924
|
-
"name": "TabGroup",
|
|
12925
|
-
"module": "src/tab-group/TabGroup.ts"
|
|
12926
|
-
}
|
|
12927
|
-
},
|
|
12928
|
-
{
|
|
12929
|
-
"kind": "custom-element-definition",
|
|
12930
|
-
"name": "nord-tab-group",
|
|
12931
|
-
"declaration": {
|
|
12932
|
-
"name": "TabGroup",
|
|
12933
|
-
"module": "src/tab-group/TabGroup.ts"
|
|
12934
|
-
}
|
|
12935
|
-
}
|
|
12936
|
-
]
|
|
12937
|
-
},
|
|
12938
|
-
{
|
|
12939
|
-
"kind": "javascript-module",
|
|
12940
|
-
"path": "src/tab-panel/TabPanel.ts",
|
|
12941
|
-
"declarations": [
|
|
12942
|
-
{
|
|
12943
|
-
"kind": "class",
|
|
12944
|
-
"description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
|
|
12945
|
-
"name": "TabPanel",
|
|
12946
|
-
"slots": [
|
|
12947
|
-
{
|
|
12948
|
-
"description": "The tab panel content.",
|
|
12949
|
-
"name": ""
|
|
12950
|
-
}
|
|
12951
|
-
],
|
|
12952
|
-
"members": [],
|
|
12953
|
-
"superclass": {
|
|
12954
|
-
"name": "LitElement",
|
|
12955
|
-
"package": "lit"
|
|
12956
|
-
},
|
|
12957
|
-
"localization": [],
|
|
12958
|
-
"status": "ready",
|
|
12959
|
-
"category": "navigation",
|
|
12960
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n",
|
|
12961
|
-
"examples": [],
|
|
12962
|
-
"tagName": "nord-tab-panel",
|
|
12963
|
-
"customElement": true
|
|
12964
|
-
}
|
|
12965
|
-
],
|
|
12966
|
-
"exports": [
|
|
12967
|
-
{
|
|
12968
|
-
"kind": "js",
|
|
12969
|
-
"name": "default",
|
|
12970
|
-
"declaration": {
|
|
12971
|
-
"name": "TabPanel",
|
|
12972
|
-
"module": "src/tab-panel/TabPanel.ts"
|
|
12973
|
-
}
|
|
12974
|
-
},
|
|
12975
|
-
{
|
|
12976
|
-
"kind": "custom-element-definition",
|
|
12977
|
-
"name": "nord-tab-panel",
|
|
12978
|
-
"declaration": {
|
|
12979
|
-
"name": "TabPanel",
|
|
12980
|
-
"module": "src/tab-panel/TabPanel.ts"
|
|
12981
|
-
}
|
|
12982
|
-
}
|
|
12983
|
-
]
|
|
12984
|
-
},
|
|
12985
|
-
{
|
|
12986
|
-
"kind": "javascript-module",
|
|
12987
|
-
"path": "src/table/Table.ts",
|
|
12988
|
-
"declarations": [
|
|
12989
|
-
{
|
|
12990
|
-
"kind": "class",
|
|
12991
|
-
"description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
|
|
12992
|
-
"name": "Table",
|
|
12993
|
-
"cssProperties": [
|
|
12994
|
-
{
|
|
12995
|
-
"description": "Controls the padding around the table cells.",
|
|
12996
|
-
"name": "--n-table-td-padding",
|
|
12997
|
-
"default": "calc(var(--n-space-m) * 0.95)"
|
|
12998
|
-
},
|
|
12999
|
-
{
|
|
13000
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
13001
|
-
"name": "--n-table-border-radius",
|
|
13002
|
-
"default": "var(--n-border-radius-s)"
|
|
13003
|
-
}
|
|
13004
|
-
],
|
|
13005
|
-
"slots": [
|
|
13006
|
-
{
|
|
13007
|
-
"description": "Default slot which holds the HTML `<table>` element.",
|
|
13008
|
-
"name": ""
|
|
13009
|
-
}
|
|
13010
|
-
],
|
|
13011
|
-
"members": [
|
|
13012
|
-
{
|
|
13013
|
-
"kind": "field",
|
|
13014
|
-
"name": "density",
|
|
13015
|
-
"type": {
|
|
13016
|
-
"text": "\"condensed\" | \"default\" | \"relaxed\""
|
|
13017
|
-
},
|
|
13018
|
-
"default": "\"default\"",
|
|
13019
|
-
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
13020
|
-
"attribute": "density",
|
|
13021
|
-
"reflects": true
|
|
13022
|
-
},
|
|
13023
|
-
{
|
|
13024
|
-
"kind": "field",
|
|
13025
|
-
"name": "scrollSnap",
|
|
13026
|
-
"type": {
|
|
13027
|
-
"text": "boolean"
|
|
13028
|
-
},
|
|
13029
|
-
"default": "false",
|
|
13030
|
-
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
13031
|
-
"attribute": "scroll-snap",
|
|
13032
|
-
"reflects": true
|
|
13033
|
-
},
|
|
13034
|
-
{
|
|
13035
|
-
"kind": "field",
|
|
13036
|
-
"name": "striped",
|
|
13037
|
-
"type": {
|
|
13038
|
-
"text": "boolean"
|
|
13039
|
-
},
|
|
13040
|
-
"default": "false",
|
|
13041
|
-
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
13042
|
-
"attribute": "striped",
|
|
13043
|
-
"reflects": true
|
|
13044
|
-
},
|
|
13045
|
-
{
|
|
13046
|
-
"kind": "method",
|
|
13047
|
-
"name": "renderStyles",
|
|
13048
|
-
"privacy": "private",
|
|
13049
|
-
"description": "renders table styles into nearest root.\nthis is necessary since we do not use shadow dom."
|
|
13050
|
-
},
|
|
13051
|
-
{
|
|
13052
|
-
"kind": "method",
|
|
13053
|
-
"name": "createRenderRoot",
|
|
13054
|
-
"privacy": "protected",
|
|
13055
|
-
"description": "opt out of shadow dom"
|
|
13056
|
-
}
|
|
13057
|
-
],
|
|
13058
|
-
"attributes": [
|
|
13059
|
-
{
|
|
13060
|
-
"name": "density",
|
|
13061
|
-
"type": {
|
|
13062
|
-
"text": "\"condensed\" | \"default\" | \"relaxed\""
|
|
13063
|
-
},
|
|
13064
|
-
"default": "\"default\"",
|
|
13065
|
-
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
13066
|
-
"fieldName": "density"
|
|
13067
|
-
},
|
|
13068
|
-
{
|
|
13069
|
-
"name": "scroll-snap",
|
|
13070
|
-
"type": {
|
|
13071
|
-
"text": "boolean"
|
|
13072
|
-
},
|
|
13073
|
-
"default": "false",
|
|
13074
|
-
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
13075
|
-
"fieldName": "scrollSnap"
|
|
13260
|
+
"default": "\"m\"",
|
|
13261
|
+
"description": "Controls the padding of the tab group component.",
|
|
13262
|
+
"fieldName": "padding"
|
|
13076
13263
|
},
|
|
13077
13264
|
{
|
|
13078
|
-
"name": "
|
|
13265
|
+
"name": "sticky",
|
|
13079
13266
|
"type": {
|
|
13080
13267
|
"text": "boolean"
|
|
13081
13268
|
},
|
|
13082
13269
|
"default": "false",
|
|
13083
|
-
"description": "
|
|
13084
|
-
"fieldName": "
|
|
13270
|
+
"description": "Whether the tab list sticks to the top of the tab group as you scroll.",
|
|
13271
|
+
"fieldName": "sticky"
|
|
13085
13272
|
}
|
|
13086
13273
|
],
|
|
13087
13274
|
"superclass": {
|
|
@@ -13090,27 +13277,61 @@
|
|
|
13090
13277
|
},
|
|
13091
13278
|
"localization": [],
|
|
13092
13279
|
"status": "ready",
|
|
13093
|
-
"category": "
|
|
13094
|
-
"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
|
|
13095
|
-
"examples": [
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13099
|
-
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13280
|
+
"category": "navigation",
|
|
13281
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to allow multiple panels to be contained within a single window.\n- Use the tab panel and tab components within the tab group component.\n- Use the tab and tab panel components in order to create a tab group content structure.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use tabs to navigate to other pages. Use navigation or links instead.\n- Don't use other components to the tab and tab panel within the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n- Don't add a tab or tab panel component without providing an accompanying panel or tab.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the tab component related to the panel to select the tab but prevent the order of the tabs being affected.\n",
|
|
13282
|
+
"examples": [],
|
|
13283
|
+
"dependencies": [
|
|
13284
|
+
"tab"
|
|
13285
|
+
],
|
|
13286
|
+
"tagName": "nord-tab-group",
|
|
13287
|
+
"customElement": true
|
|
13288
|
+
}
|
|
13289
|
+
],
|
|
13290
|
+
"exports": [
|
|
13291
|
+
{
|
|
13292
|
+
"kind": "js",
|
|
13293
|
+
"name": "default",
|
|
13294
|
+
"declaration": {
|
|
13295
|
+
"name": "TabGroup",
|
|
13296
|
+
"module": "src/tab-group/TabGroup.ts"
|
|
13297
|
+
}
|
|
13298
|
+
},
|
|
13299
|
+
{
|
|
13300
|
+
"kind": "custom-element-definition",
|
|
13301
|
+
"name": "nord-tab-group",
|
|
13302
|
+
"declaration": {
|
|
13303
|
+
"name": "TabGroup",
|
|
13304
|
+
"module": "src/tab-group/TabGroup.ts"
|
|
13305
|
+
}
|
|
13306
|
+
}
|
|
13307
|
+
]
|
|
13308
|
+
},
|
|
13309
|
+
{
|
|
13310
|
+
"kind": "javascript-module",
|
|
13311
|
+
"path": "src/tab-panel/TabPanel.ts",
|
|
13312
|
+
"declarations": [
|
|
13313
|
+
{
|
|
13314
|
+
"kind": "class",
|
|
13315
|
+
"description": "The panel which contains content that can be revealed using a tab\nin the tab group component.",
|
|
13316
|
+
"name": "TabPanel",
|
|
13317
|
+
"slots": [
|
|
13108
13318
|
{
|
|
13109
|
-
"
|
|
13110
|
-
"name": "
|
|
13319
|
+
"description": "The tab panel content.",
|
|
13320
|
+
"name": ""
|
|
13111
13321
|
}
|
|
13112
13322
|
],
|
|
13113
|
-
"
|
|
13323
|
+
"members": [],
|
|
13324
|
+
"superclass": {
|
|
13325
|
+
"name": "LitElement",
|
|
13326
|
+
"package": "lit"
|
|
13327
|
+
},
|
|
13328
|
+
"localization": [],
|
|
13329
|
+
"status": "ready",
|
|
13330
|
+
"category": "navigation",
|
|
13331
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the tab panel component within the tab group component.\n- Use both non-interactive and interactive elements within the contents of the tab panel.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use the tab panel component outside of the tab group component.\n- Don't obscure important information within a tab panel that isn't revealed by default.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing tab labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in tab labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">The dashboard</div>\n\nAvoid ending tab labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients.</div>\n\nUse as few words as possible to describe each tab label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoid all caps for tab labels:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n\n---\n\n## Additional considerations\n\n- If the content contained within the tabs UI has significance or is important for the user to see, consider using a different form of presentation that doesn't obscure it.\n- If there is a particular tab panel you wish to show out of order of the tabs UI itself consider using the `selected` option on the related tab component to select the tab but prevent the order of the tabs being affected.\n",
|
|
13332
|
+
"examples": [],
|
|
13333
|
+
"dependencies": [],
|
|
13334
|
+
"tagName": "nord-tab-panel",
|
|
13114
13335
|
"customElement": true
|
|
13115
13336
|
}
|
|
13116
13337
|
],
|
|
@@ -13119,16 +13340,16 @@
|
|
|
13119
13340
|
"kind": "js",
|
|
13120
13341
|
"name": "default",
|
|
13121
13342
|
"declaration": {
|
|
13122
|
-
"name": "
|
|
13123
|
-
"module": "src/
|
|
13343
|
+
"name": "TabPanel",
|
|
13344
|
+
"module": "src/tab-panel/TabPanel.ts"
|
|
13124
13345
|
}
|
|
13125
13346
|
},
|
|
13126
13347
|
{
|
|
13127
13348
|
"kind": "custom-element-definition",
|
|
13128
|
-
"name": "nord-
|
|
13349
|
+
"name": "nord-tab-panel",
|
|
13129
13350
|
"declaration": {
|
|
13130
|
-
"name": "
|
|
13131
|
-
"module": "src/
|
|
13351
|
+
"name": "TabPanel",
|
|
13352
|
+
"module": "src/tab-panel/TabPanel.ts"
|
|
13132
13353
|
}
|
|
13133
13354
|
}
|
|
13134
13355
|
]
|
|
@@ -13892,62 +14113,239 @@
|
|
|
13892
14113
|
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
13893
14114
|
},
|
|
13894
14115
|
{
|
|
13895
|
-
"name": "AutocompleteMixin",
|
|
13896
|
-
"module": "/src/common/mixins/AutocompleteMixin.js"
|
|
13897
|
-
},
|
|
14116
|
+
"name": "AutocompleteMixin",
|
|
14117
|
+
"module": "/src/common/mixins/AutocompleteMixin.js"
|
|
14118
|
+
},
|
|
14119
|
+
{
|
|
14120
|
+
"name": "ReadonlyMixin",
|
|
14121
|
+
"module": "/src/common/mixins/ReadonlyMixin.js"
|
|
14122
|
+
},
|
|
14123
|
+
{
|
|
14124
|
+
"name": "InputMixin",
|
|
14125
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
14126
|
+
},
|
|
14127
|
+
{
|
|
14128
|
+
"name": "FocusableMixin",
|
|
14129
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
14130
|
+
}
|
|
14131
|
+
],
|
|
14132
|
+
"superclass": {
|
|
14133
|
+
"name": "LitElement",
|
|
14134
|
+
"package": "lit"
|
|
14135
|
+
},
|
|
14136
|
+
"localization": [
|
|
14137
|
+
{
|
|
14138
|
+
"name": "remainingCharacters",
|
|
14139
|
+
"description": "A function which receives the number of remaining characters and returns a string to be used as the aria-live message."
|
|
14140
|
+
}
|
|
14141
|
+
],
|
|
14142
|
+
"status": "ready",
|
|
14143
|
+
"category": "form",
|
|
14144
|
+
"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",
|
|
14145
|
+
"examples": [],
|
|
14146
|
+
"dependencies": [],
|
|
14147
|
+
"tagName": "nord-textarea",
|
|
14148
|
+
"customElement": true,
|
|
14149
|
+
"events": [
|
|
14150
|
+
{
|
|
14151
|
+
"name": "input",
|
|
14152
|
+
"type": {
|
|
14153
|
+
"text": "NordEvent"
|
|
14154
|
+
},
|
|
14155
|
+
"description": "Fired as the user types into the input.",
|
|
14156
|
+
"inheritedFrom": {
|
|
14157
|
+
"name": "FormAssociatedMixin",
|
|
14158
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
14159
|
+
}
|
|
14160
|
+
},
|
|
14161
|
+
{
|
|
14162
|
+
"name": "change",
|
|
14163
|
+
"type": {
|
|
14164
|
+
"text": "NordEvent"
|
|
14165
|
+
},
|
|
14166
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
14167
|
+
"inheritedFrom": {
|
|
14168
|
+
"name": "FormAssociatedMixin",
|
|
14169
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
14170
|
+
}
|
|
14171
|
+
}
|
|
14172
|
+
]
|
|
14173
|
+
}
|
|
14174
|
+
],
|
|
14175
|
+
"exports": [
|
|
14176
|
+
{
|
|
14177
|
+
"kind": "js",
|
|
14178
|
+
"name": "default",
|
|
14179
|
+
"declaration": {
|
|
14180
|
+
"name": "Textarea",
|
|
14181
|
+
"module": "src/textarea/Textarea.ts"
|
|
14182
|
+
}
|
|
14183
|
+
},
|
|
14184
|
+
{
|
|
14185
|
+
"kind": "custom-element-definition",
|
|
14186
|
+
"name": "nord-textarea",
|
|
14187
|
+
"declaration": {
|
|
14188
|
+
"name": "Textarea",
|
|
14189
|
+
"module": "src/textarea/Textarea.ts"
|
|
14190
|
+
}
|
|
14191
|
+
}
|
|
14192
|
+
]
|
|
14193
|
+
},
|
|
14194
|
+
{
|
|
14195
|
+
"kind": "javascript-module",
|
|
14196
|
+
"path": "src/textarea/localization.ts",
|
|
14197
|
+
"declarations": [
|
|
14198
|
+
{
|
|
14199
|
+
"kind": "variable",
|
|
14200
|
+
"name": "localization",
|
|
14201
|
+
"type": {
|
|
14202
|
+
"text": "object"
|
|
14203
|
+
},
|
|
14204
|
+
"default": "{\n remainingCharacters: (remainder: number) => `Characters remaining: ${remainder}`,\n}"
|
|
14205
|
+
}
|
|
14206
|
+
],
|
|
14207
|
+
"exports": [
|
|
14208
|
+
{
|
|
14209
|
+
"kind": "js",
|
|
14210
|
+
"name": "default",
|
|
14211
|
+
"declaration": {
|
|
14212
|
+
"name": "localization",
|
|
14213
|
+
"module": "src/textarea/localization.ts"
|
|
14214
|
+
}
|
|
14215
|
+
}
|
|
14216
|
+
]
|
|
14217
|
+
},
|
|
14218
|
+
{
|
|
14219
|
+
"kind": "javascript-module",
|
|
14220
|
+
"path": "src/table/Table.ts",
|
|
14221
|
+
"declarations": [
|
|
14222
|
+
{
|
|
14223
|
+
"kind": "class",
|
|
14224
|
+
"description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
|
|
14225
|
+
"name": "Table",
|
|
14226
|
+
"cssProperties": [
|
|
14227
|
+
{
|
|
14228
|
+
"description": "Controls the padding around the table cells.",
|
|
14229
|
+
"name": "--n-table-td-padding",
|
|
14230
|
+
"default": "calc(var(--n-space-m) * 0.95)"
|
|
14231
|
+
},
|
|
14232
|
+
{
|
|
14233
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
14234
|
+
"name": "--n-table-border-radius",
|
|
14235
|
+
"default": "var(--n-border-radius-s)"
|
|
14236
|
+
}
|
|
14237
|
+
],
|
|
14238
|
+
"slots": [
|
|
14239
|
+
{
|
|
14240
|
+
"description": "Default slot which holds the HTML `<table>` element.",
|
|
14241
|
+
"name": ""
|
|
14242
|
+
}
|
|
14243
|
+
],
|
|
14244
|
+
"members": [
|
|
14245
|
+
{
|
|
14246
|
+
"kind": "field",
|
|
14247
|
+
"name": "density",
|
|
14248
|
+
"type": {
|
|
14249
|
+
"text": "\"condensed\" | \"default\" | \"relaxed\""
|
|
14250
|
+
},
|
|
14251
|
+
"default": "\"default\"",
|
|
14252
|
+
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
14253
|
+
"attribute": "density",
|
|
14254
|
+
"reflects": true
|
|
14255
|
+
},
|
|
14256
|
+
{
|
|
14257
|
+
"kind": "field",
|
|
14258
|
+
"name": "scrollSnap",
|
|
14259
|
+
"type": {
|
|
14260
|
+
"text": "boolean"
|
|
14261
|
+
},
|
|
14262
|
+
"default": "false",
|
|
14263
|
+
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
14264
|
+
"attribute": "scroll-snap",
|
|
14265
|
+
"reflects": true
|
|
14266
|
+
},
|
|
14267
|
+
{
|
|
14268
|
+
"kind": "field",
|
|
14269
|
+
"name": "striped",
|
|
14270
|
+
"type": {
|
|
14271
|
+
"text": "boolean"
|
|
14272
|
+
},
|
|
14273
|
+
"default": "false",
|
|
14274
|
+
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
14275
|
+
"attribute": "striped",
|
|
14276
|
+
"reflects": true
|
|
14277
|
+
},
|
|
14278
|
+
{
|
|
14279
|
+
"kind": "method",
|
|
14280
|
+
"name": "renderStyles",
|
|
14281
|
+
"privacy": "private",
|
|
14282
|
+
"description": "renders table styles into nearest root.\nthis is necessary since we do not use shadow dom."
|
|
14283
|
+
},
|
|
14284
|
+
{
|
|
14285
|
+
"kind": "method",
|
|
14286
|
+
"name": "createRenderRoot",
|
|
14287
|
+
"privacy": "protected",
|
|
14288
|
+
"description": "opt out of shadow dom"
|
|
14289
|
+
}
|
|
14290
|
+
],
|
|
14291
|
+
"attributes": [
|
|
13898
14292
|
{
|
|
13899
|
-
"name": "
|
|
13900
|
-
"
|
|
14293
|
+
"name": "density",
|
|
14294
|
+
"type": {
|
|
14295
|
+
"text": "\"condensed\" | \"default\" | \"relaxed\""
|
|
14296
|
+
},
|
|
14297
|
+
"default": "\"default\"",
|
|
14298
|
+
"description": "Controls the density of the table's rows and headers.\nRelaxed increases space, condensed reduces space.",
|
|
14299
|
+
"fieldName": "density"
|
|
13901
14300
|
},
|
|
13902
14301
|
{
|
|
13903
|
-
"name": "
|
|
13904
|
-
"
|
|
14302
|
+
"name": "scroll-snap",
|
|
14303
|
+
"type": {
|
|
14304
|
+
"text": "boolean"
|
|
14305
|
+
},
|
|
14306
|
+
"default": "false",
|
|
14307
|
+
"description": "Enables scroll-snapping, meaning the scroll position is always column-aligned.",
|
|
14308
|
+
"fieldName": "scrollSnap"
|
|
13905
14309
|
},
|
|
13906
14310
|
{
|
|
13907
|
-
"name": "
|
|
13908
|
-
"
|
|
14311
|
+
"name": "striped",
|
|
14312
|
+
"type": {
|
|
14313
|
+
"text": "boolean"
|
|
14314
|
+
},
|
|
14315
|
+
"default": "false",
|
|
14316
|
+
"description": "Controls whether to use zebra striping on tables, which can improve readability.",
|
|
14317
|
+
"fieldName": "striped"
|
|
13909
14318
|
}
|
|
13910
14319
|
],
|
|
13911
14320
|
"superclass": {
|
|
13912
14321
|
"name": "LitElement",
|
|
13913
14322
|
"package": "lit"
|
|
13914
14323
|
},
|
|
13915
|
-
"localization": [
|
|
13916
|
-
{
|
|
13917
|
-
"name": "remainingCharacters",
|
|
13918
|
-
"description": "A function which receives the number of remaining characters and returns a string to be used as the aria-live message."
|
|
13919
|
-
}
|
|
13920
|
-
],
|
|
14324
|
+
"localization": [],
|
|
13921
14325
|
"status": "ready",
|
|
13922
|
-
"category": "
|
|
13923
|
-
"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
|
|
13924
|
-
"examples": [
|
|
13925
|
-
"tagName": "nord-textarea",
|
|
13926
|
-
"customElement": true,
|
|
13927
|
-
"events": [
|
|
14326
|
+
"category": "list",
|
|
14327
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when you need to display tabular data in a view.\n- Use a `<table>` element directly within the component.\n- Use inside a [Card](/components/card/?example=with+table), and give the card a header.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use to display basic key and value pairs, consider a [description list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl) instead.\n- Don’t use tables for layout.\n- Don't use a primary button in every row of a table.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated _wrapper_ component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- Despite the name the Nord table component does not supplement the HTML `<table>` element. Please ensure that a `<table>` element is a direct descendant of the table component.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that [HTML tables have a large feature set](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) which cannot be fully covered in this documentation.\n- When making adjustments to table columns such as width, color, alignment and other styles please consider using the HTML `<col>` and `<colgroup>` elements for applying them. Further information on the `<col>` and `<colgroup>` elements can be [found in the MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col).\n\n---\n\n## Advanced use-cases\n\nThe table component itself does not provide any functionality, only styles. This works well for simple or static tables, but there are instances where functionality such as sorting, resizing, or column dragging are required. This kind of functionality is out of scope for the table component, as the spectrum of possible use-cases is too broad for a single component to cover effectively. Whilst the table component is limited out of the box, these same limitations make it easy to integrate with third-party libraries which offer advanced functionality.\n\nBroadly speaking, there are two categories of library for building advanced tables: _headless_ and _component-based_.\n\n### Which kind of table library should I use?\n\nEach approach has subtle tradeoffs. Understanding these subtleties will help you make the right decision for your application and team.\n\n#### Component-based Table Libraries\n\nComponent-based table libraries will typically supply you with a feature-rich drop-in solution, and ready-to-use components/markup complete with styles/theming.\n\n**Pros:**\n\n- Ship with ready-to-use markup/styles.\n- Little setup required.\n- Turn-key experience.\n\n**Cons:**\n\n- Less control over markup.\n- Custom styles are typically theme-based.\n- Larger bundle-sizes.\n\nIf you want a ready-to-use table and design/bundle-size are not hard requirements, then you should consider using a component-based table library.\n\n#### Headless Table Libraries\n\nHeadless table libraries will typically supply you with functions, state, utilities and event listeners to build your own table markup or attach to existing table markups.\n\n**Pros:**\n\n- Full control over markup and styles.\n- Supports all styling patterns (CSS, CSS-in-JS, UI libraries, etc).\n- Smaller bundle-sizes.\n\n**Cons:**\n\n- More setup and effort required.\n- No markup, styles or themes provided.\n\nIf you want a lighter-weight table or full control over the design, then you should consider using a headless table library.\n\n### Recommendation for headless libraries\n\nIn the headless category, we recommend [Tanstack Table](https://tanstack.com/table/). Tanstack table offers integrations for many UI frameworks, such as Vue and React. It is easy to work with, and because it does not bring any HTML or styles itself, you can use it to render a plain, semantic `<table>` wrapped in a `<nord-table>`, and you will get all the necessary styles.\n\nWe have created examples in both Vue and React, showing how to combine Tanstack table with Nord's table component, in order to build a table with both sorting and resizable columns. Check out the [React example](/components/table/?example=with+react+and+tanstack+table) and likewise the [Vue example](/components/table/?example=with+vue+and+tanstack+table).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / Tanstack table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / Tanstack table source\n </nord-button>\n</nord-stack>\n\n### Recommendation for component-based libraries\n\nIn the component-based category, we recommend [AG Grid](https://www.ag-grid.com/), specifically the community edition. AG Grid is feature-rich, has extensive documentation, and offers integrations for many UI frameworks, such as Vue and React. AG Grid takes control of all rendering and output, but offers extension points for taking control of some aspects. It does not output a `<table>` element, so it cannot be used with Nord's own table component.\n\nHowever it can be styled via themes, and we have created a Nord theme using our design tokens. The theme is published on npm as `@nordhealth/ag-theme-nord`. To use the theme, include the CSS in your project and add the class `ag-theme-nord` to the element wrapping AG Grid.\n\nWe have created examples in both Vue and React showing how to combine AG Grid with Nord's theme, in order to build a table with sorting, resizable columns, draggable and re-orderable columns, plus sticky/pinned columns. Check out the [React example](/components/table/?example=with+react+and+ag+grid) and likewise the [Vue example](/components/table/?example=with+vue+and+ag+grid).\n\n<nord-stack direction=\"horizontal\" class=\"n-margin-bs-l n-margin-be-s\">\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n React / AG Grid table source\n </nord-button>\n <nord-button href=\"https://github.com/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid\" target=\"_blank\">\n <nord-icon name=\"generic-github\" size=\"s\" slot=\"start\"></nord-icon>\n Vue / AG Grid table source\n </nord-button>\n</nord-stack>\n",
|
|
14328
|
+
"examples": [
|
|
13928
14329
|
{
|
|
13929
|
-
"
|
|
13930
|
-
"
|
|
13931
|
-
"text": "NordEvent"
|
|
13932
|
-
},
|
|
13933
|
-
"description": "Fired as the user types into the input.",
|
|
13934
|
-
"inheritedFrom": {
|
|
13935
|
-
"name": "FormAssociatedMixin",
|
|
13936
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
13937
|
-
}
|
|
14330
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-tanstack-table?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview",
|
|
14331
|
+
"name": "with react and tanstack table"
|
|
13938
14332
|
},
|
|
13939
14333
|
{
|
|
13940
|
-
"
|
|
13941
|
-
"
|
|
13942
|
-
|
|
13943
|
-
|
|
13944
|
-
"
|
|
13945
|
-
"
|
|
13946
|
-
|
|
13947
|
-
|
|
13948
|
-
|
|
14334
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-react-ag-grid?embed=1&file=src/DataTable/DataTable.tsx&hideNavigation=1&view=preview",
|
|
14335
|
+
"name": "with react and ag grid"
|
|
14336
|
+
},
|
|
14337
|
+
{
|
|
14338
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-tanstack-table?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview",
|
|
14339
|
+
"name": "with vue and tanstack table"
|
|
14340
|
+
},
|
|
14341
|
+
{
|
|
14342
|
+
"url": "https://stackblitz.com/github/nordhealth/advanced-table-examples/tree/main/nord-vue-ag-grid?embed=1&file=src/components/DataTable/DataTable.vue&hideNavigation=1&view=preview",
|
|
14343
|
+
"name": "with vue and ag grid"
|
|
13949
14344
|
}
|
|
13950
|
-
]
|
|
14345
|
+
],
|
|
14346
|
+
"dependencies": [],
|
|
14347
|
+
"tagName": "nord-table",
|
|
14348
|
+
"customElement": true
|
|
13951
14349
|
}
|
|
13952
14350
|
],
|
|
13953
14351
|
"exports": [
|
|
@@ -13955,40 +14353,16 @@
|
|
|
13955
14353
|
"kind": "js",
|
|
13956
14354
|
"name": "default",
|
|
13957
14355
|
"declaration": {
|
|
13958
|
-
"name": "
|
|
13959
|
-
"module": "src/
|
|
14356
|
+
"name": "Table",
|
|
14357
|
+
"module": "src/table/Table.ts"
|
|
13960
14358
|
}
|
|
13961
14359
|
},
|
|
13962
14360
|
{
|
|
13963
14361
|
"kind": "custom-element-definition",
|
|
13964
|
-
"name": "nord-
|
|
13965
|
-
"declaration": {
|
|
13966
|
-
"name": "Textarea",
|
|
13967
|
-
"module": "src/textarea/Textarea.ts"
|
|
13968
|
-
}
|
|
13969
|
-
}
|
|
13970
|
-
]
|
|
13971
|
-
},
|
|
13972
|
-
{
|
|
13973
|
-
"kind": "javascript-module",
|
|
13974
|
-
"path": "src/textarea/localization.ts",
|
|
13975
|
-
"declarations": [
|
|
13976
|
-
{
|
|
13977
|
-
"kind": "variable",
|
|
13978
|
-
"name": "localization",
|
|
13979
|
-
"type": {
|
|
13980
|
-
"text": "object"
|
|
13981
|
-
},
|
|
13982
|
-
"default": "{\n remainingCharacters: (remainder: number) => `Characters remaining: ${remainder}`,\n}"
|
|
13983
|
-
}
|
|
13984
|
-
],
|
|
13985
|
-
"exports": [
|
|
13986
|
-
{
|
|
13987
|
-
"kind": "js",
|
|
13988
|
-
"name": "default",
|
|
14362
|
+
"name": "nord-table",
|
|
13989
14363
|
"declaration": {
|
|
13990
|
-
"name": "
|
|
13991
|
-
"module": "src/
|
|
14364
|
+
"name": "Table",
|
|
14365
|
+
"module": "src/table/Table.ts"
|
|
13992
14366
|
}
|
|
13993
14367
|
}
|
|
13994
14368
|
]
|
|
@@ -14016,29 +14390,6 @@
|
|
|
14016
14390
|
},
|
|
14017
14391
|
"privacy": "private"
|
|
14018
14392
|
},
|
|
14019
|
-
{
|
|
14020
|
-
"kind": "field",
|
|
14021
|
-
"name": "events",
|
|
14022
|
-
"privacy": "private",
|
|
14023
|
-
"default": "new EventController(this)"
|
|
14024
|
-
},
|
|
14025
|
-
{
|
|
14026
|
-
"kind": "field",
|
|
14027
|
-
"name": "toast",
|
|
14028
|
-
"type": {
|
|
14029
|
-
"text": "HTMLElement"
|
|
14030
|
-
},
|
|
14031
|
-
"privacy": "private"
|
|
14032
|
-
},
|
|
14033
|
-
{
|
|
14034
|
-
"kind": "field",
|
|
14035
|
-
"name": "dismissed",
|
|
14036
|
-
"type": {
|
|
14037
|
-
"text": "boolean"
|
|
14038
|
-
},
|
|
14039
|
-
"privacy": "private",
|
|
14040
|
-
"default": "false"
|
|
14041
|
-
},
|
|
14042
14393
|
{
|
|
14043
14394
|
"kind": "field",
|
|
14044
14395
|
"name": "variant",
|
|
@@ -14063,12 +14414,38 @@
|
|
|
14063
14414
|
{
|
|
14064
14415
|
"kind": "method",
|
|
14065
14416
|
"name": "dismiss",
|
|
14066
|
-
"description": "Programmatically dismiss the toast.\nThe returned promise resolves when toast's exit animation is complete."
|
|
14417
|
+
"description": "Programmatically dismiss the toast.\nThe returned promise resolves when toast's exit animation is complete.",
|
|
14418
|
+
"inheritedFrom": {
|
|
14419
|
+
"name": "NotificationMixin",
|
|
14420
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
14421
|
+
}
|
|
14067
14422
|
},
|
|
14068
14423
|
{
|
|
14069
14424
|
"kind": "method",
|
|
14070
14425
|
"name": "handleAutoDismissChange",
|
|
14071
14426
|
"privacy": "protected"
|
|
14427
|
+
},
|
|
14428
|
+
{
|
|
14429
|
+
"kind": "field",
|
|
14430
|
+
"name": "notificationRef",
|
|
14431
|
+
"privacy": "protected",
|
|
14432
|
+
"inheritedFrom": {
|
|
14433
|
+
"name": "NotificationMixin",
|
|
14434
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
14435
|
+
}
|
|
14436
|
+
},
|
|
14437
|
+
{
|
|
14438
|
+
"kind": "field",
|
|
14439
|
+
"name": "dismissed",
|
|
14440
|
+
"type": {
|
|
14441
|
+
"text": "boolean"
|
|
14442
|
+
},
|
|
14443
|
+
"privacy": "protected",
|
|
14444
|
+
"default": "false",
|
|
14445
|
+
"inheritedFrom": {
|
|
14446
|
+
"name": "NotificationMixin",
|
|
14447
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
14448
|
+
}
|
|
14072
14449
|
}
|
|
14073
14450
|
],
|
|
14074
14451
|
"events": [
|
|
@@ -14077,7 +14454,11 @@
|
|
|
14077
14454
|
"type": {
|
|
14078
14455
|
"text": "NordEvent"
|
|
14079
14456
|
},
|
|
14080
|
-
"description": "Fired when the 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."
|
|
14457
|
+
"description": "Fired when the 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.",
|
|
14458
|
+
"inheritedFrom": {
|
|
14459
|
+
"name": "NotificationMixin",
|
|
14460
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
14461
|
+
}
|
|
14081
14462
|
}
|
|
14082
14463
|
],
|
|
14083
14464
|
"attributes": [
|
|
@@ -14100,6 +14481,12 @@
|
|
|
14100
14481
|
"fieldName": "autoDismiss"
|
|
14101
14482
|
}
|
|
14102
14483
|
],
|
|
14484
|
+
"mixins": [
|
|
14485
|
+
{
|
|
14486
|
+
"name": "NotificationMixin",
|
|
14487
|
+
"module": "/src/common/mixins/NotificationMixin.js"
|
|
14488
|
+
}
|
|
14489
|
+
],
|
|
14103
14490
|
"superclass": {
|
|
14104
14491
|
"name": "LitElement",
|
|
14105
14492
|
"package": "lit"
|
|
@@ -14107,8 +14494,11 @@
|
|
|
14107
14494
|
"localization": [],
|
|
14108
14495
|
"status": "ready",
|
|
14109
14496
|
"category": "feedback",
|
|
14110
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for short messages that confirm an action taken by a user.\n- Use for ephemeral status updates.\n- Use in combination with [Toast group](../toast-group/) so that toasts get styled and announced to screen readers correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use toasts for critical information that user needs to act on.\n- Don’t rely on users seeing toasts. Toasts are transient and should not be used for critical messages.\n- Don’t place interactive content in toasts. Assistive technology like screen readers will not convey any semantics when announcing toast messages.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and easy to understand:\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",
|
|
14497
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for short messages that confirm an action taken by a user.\n- Use for ephemeral status updates.\n- Use in combination with [Toast group](../toast-group/) so that toasts get styled and announced to screen readers correctly.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use toasts for critical information that user needs to act on. Consider using a [Notification](/components/notification) instead.\n- Don’t rely on users seeing toasts. Toasts are transient and should not be used for critical messages.\n- Don’t place interactive content in toasts. Assistive technology like screen readers will not convey any semantics when announcing toast messages.\n- Don’t use for error messages unless absolutely necessary. Try to favor a [Banner](/components/banner/) for error messaging instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and easy to understand:\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",
|
|
14111
14498
|
"examples": [],
|
|
14499
|
+
"dependencies": [
|
|
14500
|
+
"icon"
|
|
14501
|
+
],
|
|
14112
14502
|
"tagName": "nord-toast",
|
|
14113
14503
|
"customElement": true
|
|
14114
14504
|
}
|
|
@@ -14184,6 +14574,9 @@
|
|
|
14184
14574
|
"category": "feedback",
|
|
14185
14575
|
"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",
|
|
14186
14576
|
"examples": [],
|
|
14577
|
+
"dependencies": [
|
|
14578
|
+
"toast"
|
|
14579
|
+
],
|
|
14187
14580
|
"tagName": "nord-toast-group",
|
|
14188
14581
|
"customElement": true
|
|
14189
14582
|
}
|
|
@@ -14822,6 +15215,7 @@
|
|
|
14822
15215
|
"category": "form",
|
|
14823
15216
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing toggle labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
|
|
14824
15217
|
"examples": [],
|
|
15218
|
+
"dependencies": [],
|
|
14825
15219
|
"tagName": "nord-toggle",
|
|
14826
15220
|
"customElement": true,
|
|
14827
15221
|
"events": [
|
|
@@ -15108,6 +15502,7 @@
|
|
|
15108
15502
|
"category": "overlay",
|
|
15109
15503
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n",
|
|
15110
15504
|
"examples": [],
|
|
15505
|
+
"dependencies": [],
|
|
15111
15506
|
"tagName": "nord-tooltip",
|
|
15112
15507
|
"customElement": true
|
|
15113
15508
|
}
|
|
@@ -15155,6 +15550,7 @@
|
|
|
15155
15550
|
"category": "text",
|
|
15156
15551
|
"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 hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
|
|
15157
15552
|
"examples": [],
|
|
15553
|
+
"dependencies": [],
|
|
15158
15554
|
"tagName": "nord-visually-hidden",
|
|
15159
15555
|
"customElement": true
|
|
15160
15556
|
}
|
|
@@ -17731,6 +18127,104 @@
|
|
|
17731
18127
|
}
|
|
17732
18128
|
]
|
|
17733
18129
|
},
|
|
18130
|
+
{
|
|
18131
|
+
"kind": "javascript-module",
|
|
18132
|
+
"path": "src/common/mixins/NotificationMixin.ts",
|
|
18133
|
+
"declarations": [
|
|
18134
|
+
{
|
|
18135
|
+
"kind": "class",
|
|
18136
|
+
"description": "",
|
|
18137
|
+
"name": "NotificationMixinInterface",
|
|
18138
|
+
"members": [
|
|
18139
|
+
{
|
|
18140
|
+
"kind": "field",
|
|
18141
|
+
"name": "dismissed",
|
|
18142
|
+
"type": {
|
|
18143
|
+
"text": "boolean"
|
|
18144
|
+
},
|
|
18145
|
+
"privacy": "protected"
|
|
18146
|
+
},
|
|
18147
|
+
{
|
|
18148
|
+
"kind": "field",
|
|
18149
|
+
"name": "notificationRef",
|
|
18150
|
+
"type": {
|
|
18151
|
+
"text": "Ref<HTMLElement>"
|
|
18152
|
+
},
|
|
18153
|
+
"privacy": "protected"
|
|
18154
|
+
},
|
|
18155
|
+
{
|
|
18156
|
+
"kind": "method",
|
|
18157
|
+
"name": "dismiss",
|
|
18158
|
+
"return": {
|
|
18159
|
+
"type": {
|
|
18160
|
+
"text": "Promise<void>"
|
|
18161
|
+
}
|
|
18162
|
+
}
|
|
18163
|
+
}
|
|
18164
|
+
]
|
|
18165
|
+
},
|
|
18166
|
+
{
|
|
18167
|
+
"kind": "mixin",
|
|
18168
|
+
"description": "",
|
|
18169
|
+
"name": "NotificationMixin",
|
|
18170
|
+
"members": [
|
|
18171
|
+
{
|
|
18172
|
+
"kind": "field",
|
|
18173
|
+
"name": "notificationRef",
|
|
18174
|
+
"privacy": "protected"
|
|
18175
|
+
},
|
|
18176
|
+
{
|
|
18177
|
+
"kind": "field",
|
|
18178
|
+
"name": "dismissed",
|
|
18179
|
+
"type": {
|
|
18180
|
+
"text": "boolean"
|
|
18181
|
+
},
|
|
18182
|
+
"privacy": "protected",
|
|
18183
|
+
"default": "false"
|
|
18184
|
+
},
|
|
18185
|
+
{
|
|
18186
|
+
"kind": "method",
|
|
18187
|
+
"name": "dismiss",
|
|
18188
|
+
"description": "Programmatically dismiss the notification.\nThe returned promise resolves when notification's exit animation is complete."
|
|
18189
|
+
}
|
|
18190
|
+
],
|
|
18191
|
+
"events": [
|
|
18192
|
+
{
|
|
18193
|
+
"name": "dismiss",
|
|
18194
|
+
"type": {
|
|
18195
|
+
"text": "NordEvent"
|
|
18196
|
+
}
|
|
18197
|
+
}
|
|
18198
|
+
],
|
|
18199
|
+
"parameters": [
|
|
18200
|
+
{
|
|
18201
|
+
"name": "superClass",
|
|
18202
|
+
"type": {
|
|
18203
|
+
"text": "T"
|
|
18204
|
+
}
|
|
18205
|
+
}
|
|
18206
|
+
]
|
|
18207
|
+
}
|
|
18208
|
+
],
|
|
18209
|
+
"exports": [
|
|
18210
|
+
{
|
|
18211
|
+
"kind": "js",
|
|
18212
|
+
"name": "NotificationMixinInterface",
|
|
18213
|
+
"declaration": {
|
|
18214
|
+
"name": "NotificationMixinInterface",
|
|
18215
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
18216
|
+
}
|
|
18217
|
+
},
|
|
18218
|
+
{
|
|
18219
|
+
"kind": "js",
|
|
18220
|
+
"name": "NotificationMixin",
|
|
18221
|
+
"declaration": {
|
|
18222
|
+
"name": "NotificationMixin",
|
|
18223
|
+
"module": "src/common/mixins/NotificationMixin.ts"
|
|
18224
|
+
}
|
|
18225
|
+
}
|
|
18226
|
+
]
|
|
18227
|
+
},
|
|
17734
18228
|
{
|
|
17735
18229
|
"kind": "javascript-module",
|
|
17736
18230
|
"path": "src/common/mixins/ReadonlyMixin.ts",
|