@nordhealth/components 4.0.0-alpha.1 → 4.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1634 -1634
- package/package.json +5 -5
package/custom-elements.json
CHANGED
|
@@ -675,1407 +675,935 @@
|
|
|
675
675
|
},
|
|
676
676
|
{
|
|
677
677
|
"kind": "javascript-module",
|
|
678
|
-
"path": "src/
|
|
678
|
+
"path": "src/banner/Banner.ts",
|
|
679
679
|
"declarations": [
|
|
680
680
|
{
|
|
681
681
|
"kind": "class",
|
|
682
|
-
"description": "
|
|
683
|
-
"name": "
|
|
682
|
+
"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.",
|
|
683
|
+
"name": "Banner",
|
|
684
684
|
"cssProperties": [
|
|
685
685
|
{
|
|
686
|
-
"description": "Controls
|
|
687
|
-
"name": "--n-
|
|
688
|
-
"default": "var(--n-border-radius
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
"description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
|
|
692
|
-
"name": "--n-button-gap",
|
|
693
|
-
"default": "var(--n-space-s)"
|
|
694
|
-
},
|
|
695
|
-
{
|
|
696
|
-
"description": "Controls the overlayed gradient background on the button.",
|
|
697
|
-
"name": "--n-button-gradient",
|
|
698
|
-
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
"description": "Controls the background color of the button, using our [color tokens](/tokens/#color).",
|
|
702
|
-
"name": "--n-button-background-color",
|
|
703
|
-
"default": "var(--n-color-button)"
|
|
704
|
-
},
|
|
705
|
-
{
|
|
706
|
-
"description": "Controls the border color of the button, using our [color tokens](/tokens/#color).",
|
|
707
|
-
"name": "--n-button-border-color",
|
|
708
|
-
"default": "var(--n-color-border-strong)"
|
|
709
|
-
},
|
|
710
|
-
{
|
|
711
|
-
"description": "Controls the text alignment for the text in the button.",
|
|
712
|
-
"name": "--n-button-text-align",
|
|
713
|
-
"default": "center"
|
|
714
|
-
},
|
|
715
|
-
{
|
|
716
|
-
"description": "Controls the surrounding shadow, using our [box shadow tokens](/tokens/#box-shadow).",
|
|
717
|
-
"name": "--n-button-box-shadow",
|
|
718
|
-
"default": "var(--n-box-shadow)"
|
|
719
|
-
},
|
|
720
|
-
{
|
|
721
|
-
"description": "Controls the color of the text within the button, using our [color tokens](/tokens/#color).",
|
|
722
|
-
"name": "--n-button-color",
|
|
723
|
-
"default": "var(--n-color-text)"
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
"description": "Controls the inline, or left and right, padding of the button.",
|
|
727
|
-
"name": "--n-button-padding-inline",
|
|
728
|
-
"default": "calc(var(--n-space-m) / 1.2)"
|
|
729
|
-
},
|
|
730
|
-
{
|
|
731
|
-
"description": "Controls the size of the text within the button, using our [font tokens](/tokens/#font).",
|
|
732
|
-
"name": "--n-button-font-size",
|
|
733
|
-
"default": "var(--n-font-size-m)"
|
|
734
|
-
},
|
|
735
|
-
{
|
|
736
|
-
"description": "Controls the weight of the text within the button, using our [font tokens](/tokens/#font).",
|
|
737
|
-
"name": "--n-button-font-weight",
|
|
738
|
-
"default": "var(--n-font-weight)"
|
|
739
|
-
},
|
|
740
|
-
{
|
|
741
|
-
"description": "Controls the minimum block size, or height, of the button using our [spacing tokens](/tokens/#space).",
|
|
742
|
-
"name": "--n-button-min-block-size",
|
|
743
|
-
"default": "var(--n-space-xl)"
|
|
686
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
687
|
+
"name": "--n-banner-border-radius",
|
|
688
|
+
"default": "var(--n-border-radius)"
|
|
744
689
|
},
|
|
745
690
|
{
|
|
746
|
-
"description": "Controls the
|
|
747
|
-
"name": "--n-
|
|
748
|
-
"default": "var(--n-
|
|
691
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
692
|
+
"name": "--n-banner-box-shadow",
|
|
693
|
+
"default": "var(--n-box-shadow-card)"
|
|
749
694
|
}
|
|
750
695
|
],
|
|
751
696
|
"slots": [
|
|
752
697
|
{
|
|
753
|
-
"description": "
|
|
698
|
+
"description": "default slot",
|
|
754
699
|
"name": ""
|
|
755
|
-
},
|
|
756
|
-
{
|
|
757
|
-
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
758
|
-
"name": "start"
|
|
759
|
-
},
|
|
760
|
-
{
|
|
761
|
-
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
762
|
-
"name": "end"
|
|
763
700
|
}
|
|
764
701
|
],
|
|
765
702
|
"members": [
|
|
766
|
-
{
|
|
767
|
-
"kind": "field",
|
|
768
|
-
"name": "defaultSlot",
|
|
769
|
-
"privacy": "private",
|
|
770
|
-
"default": "new SlotController(this)"
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
"kind": "field",
|
|
774
|
-
"name": "buttonRef",
|
|
775
|
-
"privacy": "private"
|
|
776
|
-
},
|
|
777
|
-
{
|
|
778
|
-
"kind": "field",
|
|
779
|
-
"name": "events",
|
|
780
|
-
"privacy": "private",
|
|
781
|
-
"default": "new EventController(this)"
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
"kind": "field",
|
|
785
|
-
"name": "lightDom",
|
|
786
|
-
"privacy": "private",
|
|
787
|
-
"default": "new LightDomController(this, { render: () => this.renderLightDom(), })"
|
|
788
|
-
},
|
|
789
703
|
{
|
|
790
704
|
"kind": "field",
|
|
791
705
|
"name": "variant",
|
|
792
706
|
"type": {
|
|
793
|
-
"text": "\"
|
|
707
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
794
708
|
},
|
|
795
|
-
"default": "\"
|
|
796
|
-
"description": "The style variant of the
|
|
709
|
+
"default": "\"info\"",
|
|
710
|
+
"description": "The style variant of the banner.",
|
|
797
711
|
"attribute": "variant",
|
|
798
712
|
"reflects": true
|
|
799
|
-
}
|
|
713
|
+
}
|
|
714
|
+
],
|
|
715
|
+
"attributes": [
|
|
800
716
|
{
|
|
801
|
-
"
|
|
802
|
-
"name": "type",
|
|
717
|
+
"name": "variant",
|
|
803
718
|
"type": {
|
|
804
|
-
"text": "\"
|
|
719
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
805
720
|
},
|
|
806
|
-
"default": "\"
|
|
807
|
-
"description": "The
|
|
808
|
-
"
|
|
809
|
-
|
|
810
|
-
|
|
721
|
+
"default": "\"info\"",
|
|
722
|
+
"description": "The style variant of the banner.",
|
|
723
|
+
"fieldName": "variant"
|
|
724
|
+
}
|
|
725
|
+
],
|
|
726
|
+
"superclass": {
|
|
727
|
+
"name": "LitElement",
|
|
728
|
+
"package": "lit"
|
|
729
|
+
},
|
|
730
|
+
"localization": [],
|
|
731
|
+
"status": "ready",
|
|
732
|
+
"category": "feedback",
|
|
733
|
+
"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",
|
|
734
|
+
"examples": [],
|
|
735
|
+
"dependencies": [
|
|
736
|
+
"icon"
|
|
737
|
+
],
|
|
738
|
+
"tagName": "nord-banner",
|
|
739
|
+
"customElement": true
|
|
740
|
+
}
|
|
741
|
+
],
|
|
742
|
+
"exports": [
|
|
743
|
+
{
|
|
744
|
+
"kind": "js",
|
|
745
|
+
"name": "default",
|
|
746
|
+
"declaration": {
|
|
747
|
+
"name": "Banner",
|
|
748
|
+
"module": "src/banner/Banner.ts"
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"kind": "custom-element-definition",
|
|
753
|
+
"name": "nord-banner",
|
|
754
|
+
"declaration": {
|
|
755
|
+
"name": "Banner",
|
|
756
|
+
"module": "src/banner/Banner.ts"
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"kind": "javascript-module",
|
|
763
|
+
"path": "src/badge/Badge.ts",
|
|
764
|
+
"declarations": [
|
|
765
|
+
{
|
|
766
|
+
"kind": "class",
|
|
767
|
+
"description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
|
|
768
|
+
"name": "Badge",
|
|
769
|
+
"slots": [
|
|
811
770
|
{
|
|
812
|
-
"
|
|
813
|
-
"name": "
|
|
814
|
-
"type": {
|
|
815
|
-
"text": "\"s\" | \"m\" | \"l\""
|
|
816
|
-
},
|
|
817
|
-
"default": "\"m\"",
|
|
818
|
-
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
819
|
-
"attribute": "size",
|
|
820
|
-
"reflects": true
|
|
771
|
+
"description": "The badge content.",
|
|
772
|
+
"name": ""
|
|
821
773
|
},
|
|
822
774
|
{
|
|
823
|
-
"
|
|
824
|
-
"name": "
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
"privacy": "private",
|
|
829
|
-
"attribute": "aria-expanded"
|
|
830
|
-
},
|
|
775
|
+
"description": "Used to place an icon at the start of badge.",
|
|
776
|
+
"name": "icon"
|
|
777
|
+
}
|
|
778
|
+
],
|
|
779
|
+
"members": [
|
|
831
780
|
{
|
|
832
781
|
"kind": "field",
|
|
833
|
-
"name": "
|
|
782
|
+
"name": "type",
|
|
834
783
|
"type": {
|
|
835
|
-
"text": "
|
|
784
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
836
785
|
},
|
|
837
|
-
"
|
|
838
|
-
"
|
|
786
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
787
|
+
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
788
|
+
"default": "\"neutral\"",
|
|
789
|
+
"attribute": "type",
|
|
790
|
+
"reflects": true
|
|
839
791
|
},
|
|
840
792
|
{
|
|
841
793
|
"kind": "field",
|
|
842
|
-
"name": "
|
|
794
|
+
"name": "variant",
|
|
843
795
|
"type": {
|
|
844
|
-
"text": "
|
|
796
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
|
|
845
797
|
},
|
|
846
|
-
"description": "
|
|
847
|
-
"
|
|
798
|
+
"description": "The style variant of the badge.\nDetermines the background color of the badge.",
|
|
799
|
+
"default": "\"neutral\"",
|
|
800
|
+
"attribute": "variant",
|
|
848
801
|
"reflects": true
|
|
849
802
|
},
|
|
850
803
|
{
|
|
851
804
|
"kind": "field",
|
|
852
|
-
"name": "
|
|
805
|
+
"name": "strong",
|
|
853
806
|
"type": {
|
|
854
807
|
"text": "boolean"
|
|
855
808
|
},
|
|
856
809
|
"default": "false",
|
|
857
|
-
"description": "
|
|
858
|
-
"attribute": "
|
|
810
|
+
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
811
|
+
"attribute": "strong",
|
|
859
812
|
"reflects": true
|
|
860
|
-
}
|
|
813
|
+
}
|
|
814
|
+
],
|
|
815
|
+
"attributes": [
|
|
861
816
|
{
|
|
862
|
-
"
|
|
863
|
-
"name": "target",
|
|
817
|
+
"name": "type",
|
|
864
818
|
"type": {
|
|
865
|
-
"text": "\"
|
|
819
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
866
820
|
},
|
|
867
|
-
"
|
|
868
|
-
"
|
|
869
|
-
"
|
|
821
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
822
|
+
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
823
|
+
"default": "\"neutral\"",
|
|
824
|
+
"fieldName": "type"
|
|
870
825
|
},
|
|
871
826
|
{
|
|
872
|
-
"
|
|
873
|
-
"name": "expand",
|
|
827
|
+
"name": "variant",
|
|
874
828
|
"type": {
|
|
875
|
-
"text": "
|
|
829
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"neutral\" | \"info\" | undefined"
|
|
876
830
|
},
|
|
877
|
-
"
|
|
878
|
-
"
|
|
879
|
-
"
|
|
880
|
-
"reflects": true
|
|
831
|
+
"description": "The style variant of the badge.\nDetermines the background color of the badge.",
|
|
832
|
+
"default": "\"neutral\"",
|
|
833
|
+
"fieldName": "variant"
|
|
881
834
|
},
|
|
882
835
|
{
|
|
883
|
-
"
|
|
884
|
-
"name": "square",
|
|
836
|
+
"name": "strong",
|
|
885
837
|
"type": {
|
|
886
838
|
"text": "boolean"
|
|
887
839
|
},
|
|
888
840
|
"default": "false",
|
|
889
|
-
"description": "
|
|
890
|
-
"
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
841
|
+
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
842
|
+
"fieldName": "strong"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"superclass": {
|
|
846
|
+
"name": "LitElement",
|
|
847
|
+
"package": "lit"
|
|
848
|
+
},
|
|
849
|
+
"localization": [],
|
|
850
|
+
"status": "ready",
|
|
851
|
+
"category": "text",
|
|
852
|
+
"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 easy 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- Don't use badges for labeling, categorizing, or organizing objects. Use the [tag component](/components/tag/) instead.\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",
|
|
853
|
+
"examples": [],
|
|
854
|
+
"dependencies": [],
|
|
855
|
+
"tagName": "nord-badge",
|
|
856
|
+
"customElement": true
|
|
857
|
+
}
|
|
858
|
+
],
|
|
859
|
+
"exports": [
|
|
860
|
+
{
|
|
861
|
+
"kind": "js",
|
|
862
|
+
"name": "default",
|
|
863
|
+
"declaration": {
|
|
864
|
+
"name": "Badge",
|
|
865
|
+
"module": "src/badge/Badge.ts"
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"kind": "custom-element-definition",
|
|
870
|
+
"name": "nord-badge",
|
|
871
|
+
"declaration": {
|
|
872
|
+
"name": "Badge",
|
|
873
|
+
"module": "src/badge/Badge.ts"
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
]
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"kind": "javascript-module",
|
|
880
|
+
"path": "src/button-group/ButtonGroup.ts",
|
|
881
|
+
"declarations": [
|
|
882
|
+
{
|
|
883
|
+
"kind": "class",
|
|
884
|
+
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
885
|
+
"name": "ButtonGroup",
|
|
886
|
+
"cssProperties": [
|
|
904
887
|
{
|
|
905
|
-
"
|
|
906
|
-
"name": "
|
|
907
|
-
"
|
|
908
|
-
"parameters": [
|
|
909
|
-
{
|
|
910
|
-
"name": "innards",
|
|
911
|
-
"type": {
|
|
912
|
-
"text": "TemplateResult"
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
],
|
|
916
|
-
"description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
|
|
888
|
+
"description": "Controls the rounded corners of the button group, using [border radius tokens](/tokens/#border-radius). Only relevant for the default variant.",
|
|
889
|
+
"name": "--n-button-group-border-radius",
|
|
890
|
+
"default": "var(--n-border-radius-s)"
|
|
917
891
|
},
|
|
918
892
|
{
|
|
919
|
-
"
|
|
920
|
-
"name": "
|
|
921
|
-
"
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
"type": {
|
|
926
|
-
"text": "TemplateResult"
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
]
|
|
930
|
-
},
|
|
893
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow). Only relevant for the default variant.",
|
|
894
|
+
"name": "--n-button-group-box-shadow",
|
|
895
|
+
"default": "var(--n-box-shadow)"
|
|
896
|
+
}
|
|
897
|
+
],
|
|
898
|
+
"slots": [
|
|
931
899
|
{
|
|
932
|
-
"
|
|
933
|
-
"name": "
|
|
934
|
-
|
|
935
|
-
|
|
900
|
+
"description": "The button group content",
|
|
901
|
+
"name": ""
|
|
902
|
+
}
|
|
903
|
+
],
|
|
904
|
+
"members": [
|
|
936
905
|
{
|
|
937
906
|
"kind": "field",
|
|
938
|
-
"name": "
|
|
939
|
-
"privacy": "private"
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
"kind": "method",
|
|
943
|
-
"name": "handleClick",
|
|
907
|
+
"name": "defaultSlot",
|
|
944
908
|
"privacy": "private",
|
|
945
|
-
"
|
|
946
|
-
{
|
|
947
|
-
"name": "e",
|
|
948
|
-
"type": {
|
|
949
|
-
"text": "Event"
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
]
|
|
909
|
+
"default": "new SlotController(this)"
|
|
953
910
|
},
|
|
954
911
|
{
|
|
955
|
-
"kind": "
|
|
956
|
-
"name": "
|
|
912
|
+
"kind": "field",
|
|
913
|
+
"name": "dirController",
|
|
957
914
|
"privacy": "private",
|
|
958
|
-
"
|
|
959
|
-
{
|
|
960
|
-
"name": "e",
|
|
961
|
-
"type": {
|
|
962
|
-
"text": "Event"
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
],
|
|
966
|
-
"description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
|
|
915
|
+
"default": "new DirectionController(this)"
|
|
967
916
|
},
|
|
968
917
|
{
|
|
969
918
|
"kind": "field",
|
|
970
|
-
"name": "
|
|
919
|
+
"name": "variant",
|
|
971
920
|
"type": {
|
|
972
|
-
"text": "
|
|
921
|
+
"text": "\"default\" | \"spaced\""
|
|
973
922
|
},
|
|
974
|
-
"default": "
|
|
975
|
-
"description": "
|
|
976
|
-
"attribute": "
|
|
977
|
-
"reflects": true
|
|
978
|
-
"inheritedFrom": {
|
|
979
|
-
"name": "InputMixin",
|
|
980
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
981
|
-
}
|
|
923
|
+
"default": "\"default\"",
|
|
924
|
+
"description": "The style variant of the button group.",
|
|
925
|
+
"attribute": "variant",
|
|
926
|
+
"reflects": true
|
|
982
927
|
},
|
|
983
928
|
{
|
|
984
929
|
"kind": "field",
|
|
985
|
-
"name": "
|
|
930
|
+
"name": "direction",
|
|
986
931
|
"type": {
|
|
987
|
-
"text": "
|
|
932
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
988
933
|
},
|
|
989
|
-
"
|
|
990
|
-
"
|
|
991
|
-
"
|
|
992
|
-
"
|
|
993
|
-
"name": "InputMixin",
|
|
994
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
995
|
-
}
|
|
934
|
+
"default": "\"horizontal\"",
|
|
935
|
+
"description": "The direction of the button group.",
|
|
936
|
+
"attribute": "direction",
|
|
937
|
+
"reflects": true
|
|
996
938
|
},
|
|
997
939
|
{
|
|
998
940
|
"kind": "field",
|
|
999
|
-
"name": "
|
|
941
|
+
"name": "wrap",
|
|
1000
942
|
"type": {
|
|
1001
|
-
"text": "
|
|
943
|
+
"text": "boolean"
|
|
1002
944
|
},
|
|
1003
|
-
"default": "
|
|
1004
|
-
"description": "
|
|
1005
|
-
"attribute": "
|
|
1006
|
-
"
|
|
1007
|
-
"name": "InputMixin",
|
|
1008
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1009
|
-
}
|
|
945
|
+
"default": "false",
|
|
946
|
+
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
947
|
+
"attribute": "wrap",
|
|
948
|
+
"reflects": true
|
|
1010
949
|
},
|
|
1011
950
|
{
|
|
1012
951
|
"kind": "field",
|
|
1013
|
-
"name": "
|
|
952
|
+
"name": "role",
|
|
1014
953
|
"type": {
|
|
1015
|
-
"text": "
|
|
954
|
+
"text": "string"
|
|
1016
955
|
},
|
|
1017
|
-
"
|
|
1018
|
-
"
|
|
1019
|
-
"
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
956
|
+
"default": "\"group\"",
|
|
957
|
+
"description": "The appropriate role for the containing element.",
|
|
958
|
+
"attribute": "role",
|
|
959
|
+
"reflects": true
|
|
960
|
+
}
|
|
961
|
+
],
|
|
962
|
+
"attributes": [
|
|
1024
963
|
{
|
|
1025
|
-
"
|
|
1026
|
-
"name": "_formId",
|
|
964
|
+
"name": "variant",
|
|
1027
965
|
"type": {
|
|
1028
|
-
"text": "
|
|
966
|
+
"text": "\"default\" | \"spaced\""
|
|
1029
967
|
},
|
|
1030
|
-
"
|
|
1031
|
-
"
|
|
1032
|
-
|
|
1033
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1034
|
-
}
|
|
968
|
+
"default": "\"default\"",
|
|
969
|
+
"description": "The style variant of the button group.",
|
|
970
|
+
"fieldName": "variant"
|
|
1035
971
|
},
|
|
1036
972
|
{
|
|
1037
|
-
"
|
|
1038
|
-
"name": "form",
|
|
973
|
+
"name": "direction",
|
|
1039
974
|
"type": {
|
|
1040
|
-
"text": "
|
|
975
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
1041
976
|
},
|
|
1042
|
-
"
|
|
1043
|
-
"
|
|
1044
|
-
"
|
|
1045
|
-
"name": "InputMixin",
|
|
1046
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1047
|
-
}
|
|
977
|
+
"default": "\"horizontal\"",
|
|
978
|
+
"description": "The direction of the button group.",
|
|
979
|
+
"fieldName": "direction"
|
|
1048
980
|
},
|
|
1049
981
|
{
|
|
1050
|
-
"
|
|
1051
|
-
"
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
982
|
+
"name": "wrap",
|
|
983
|
+
"type": {
|
|
984
|
+
"text": "boolean"
|
|
985
|
+
},
|
|
986
|
+
"default": "false",
|
|
987
|
+
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
988
|
+
"fieldName": "wrap"
|
|
1057
989
|
},
|
|
1058
990
|
{
|
|
1059
|
-
"
|
|
1060
|
-
"
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
991
|
+
"name": "role",
|
|
992
|
+
"type": {
|
|
993
|
+
"text": "string"
|
|
994
|
+
},
|
|
995
|
+
"default": "\"group\"",
|
|
996
|
+
"description": "The appropriate role for the containing element.",
|
|
997
|
+
"fieldName": "role"
|
|
998
|
+
}
|
|
999
|
+
],
|
|
1000
|
+
"superclass": {
|
|
1001
|
+
"name": "LitElement",
|
|
1002
|
+
"package": "lit"
|
|
1003
|
+
},
|
|
1004
|
+
"localization": [],
|
|
1005
|
+
"status": "ready",
|
|
1006
|
+
"category": "structure",
|
|
1007
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| --------- | -------------------------------------------------------------------------------------------------------- |\n| `default` | The default variant renders a group of segmented buttons to emphasize that they’re thematically-related. |\n| `spaced` | The spaced variant renders a gap between the buttons to space them out evenly. |\n",
|
|
1008
|
+
"examples": [],
|
|
1009
|
+
"dependencies": [],
|
|
1010
|
+
"tagName": "nord-button-group",
|
|
1011
|
+
"customElement": true
|
|
1012
|
+
}
|
|
1013
|
+
],
|
|
1014
|
+
"exports": [
|
|
1015
|
+
{
|
|
1016
|
+
"kind": "js",
|
|
1017
|
+
"name": "default",
|
|
1018
|
+
"declaration": {
|
|
1019
|
+
"name": "ButtonGroup",
|
|
1020
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"kind": "custom-element-definition",
|
|
1025
|
+
"name": "nord-button-group",
|
|
1026
|
+
"declaration": {
|
|
1027
|
+
"name": "ButtonGroup",
|
|
1028
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
]
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
"kind": "javascript-module",
|
|
1035
|
+
"path": "src/button/Button.ts",
|
|
1036
|
+
"declarations": [
|
|
1037
|
+
{
|
|
1038
|
+
"kind": "class",
|
|
1039
|
+
"description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
|
|
1040
|
+
"name": "Button",
|
|
1041
|
+
"cssProperties": [
|
|
1077
1042
|
{
|
|
1078
|
-
"
|
|
1079
|
-
"name": "
|
|
1080
|
-
"
|
|
1081
|
-
"inheritedFrom": {
|
|
1082
|
-
"name": "FocusableMixin",
|
|
1083
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1084
|
-
}
|
|
1043
|
+
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
1044
|
+
"name": "--n-button-border-radius",
|
|
1045
|
+
"default": "var(--n-border-radius-s)"
|
|
1085
1046
|
},
|
|
1086
1047
|
{
|
|
1087
|
-
"
|
|
1088
|
-
"name": "
|
|
1089
|
-
"
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1048
|
+
"description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
|
|
1049
|
+
"name": "--n-button-gap",
|
|
1050
|
+
"default": "var(--n-space-s)"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"description": "Controls the overlayed gradient background on the button.",
|
|
1054
|
+
"name": "--n-button-gradient",
|
|
1055
|
+
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"description": "Controls the background color of the button, using our [color tokens](/tokens/#color).",
|
|
1059
|
+
"name": "--n-button-background-color",
|
|
1060
|
+
"default": "var(--n-color-button)"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"description": "Controls the border color of the button, using our [color tokens](/tokens/#color).",
|
|
1064
|
+
"name": "--n-button-border-color",
|
|
1065
|
+
"default": "var(--n-color-border-strong)"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
"description": "Controls the text alignment for the text in the button.",
|
|
1069
|
+
"name": "--n-button-text-align",
|
|
1070
|
+
"default": "center"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"description": "Controls the surrounding shadow, using our [box shadow tokens](/tokens/#box-shadow).",
|
|
1074
|
+
"name": "--n-button-box-shadow",
|
|
1075
|
+
"default": "var(--n-box-shadow)"
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"description": "Controls the color of the text within the button, using our [color tokens](/tokens/#color).",
|
|
1079
|
+
"name": "--n-button-color",
|
|
1080
|
+
"default": "var(--n-color-text)"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"description": "Controls the inline, or left and right, padding of the button.",
|
|
1084
|
+
"name": "--n-button-padding-inline",
|
|
1085
|
+
"default": "calc(var(--n-space-m) / 1.2)"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"description": "Controls the size of the text within the button, using our [font tokens](/tokens/#font).",
|
|
1089
|
+
"name": "--n-button-font-size",
|
|
1090
|
+
"default": "var(--n-font-size-m)"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"description": "Controls the weight of the text within the button, using our [font tokens](/tokens/#font).",
|
|
1094
|
+
"name": "--n-button-font-weight",
|
|
1095
|
+
"default": "var(--n-font-weight)"
|
|
1096
|
+
},
|
|
1097
|
+
{
|
|
1098
|
+
"description": "Controls the minimum block size, or height, of the button using our [spacing tokens](/tokens/#space).",
|
|
1099
|
+
"name": "--n-button-min-block-size",
|
|
1100
|
+
"default": "var(--n-space-xl)"
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
"description": "Controls the color of toggle icon that gets rendered when the button is used as a [Dropdown](/components/dropdown/) toggle.",
|
|
1104
|
+
"name": "--n-button-toggle-icon-color",
|
|
1105
|
+
"default": "var(--n-color-icon)"
|
|
1094
1106
|
}
|
|
1095
1107
|
],
|
|
1096
|
-
"
|
|
1108
|
+
"slots": [
|
|
1097
1109
|
{
|
|
1110
|
+
"description": "The button content",
|
|
1111
|
+
"name": ""
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
1115
|
+
"name": "start"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
1119
|
+
"name": "end"
|
|
1120
|
+
}
|
|
1121
|
+
],
|
|
1122
|
+
"members": [
|
|
1123
|
+
{
|
|
1124
|
+
"kind": "field",
|
|
1125
|
+
"name": "defaultSlot",
|
|
1126
|
+
"privacy": "private",
|
|
1127
|
+
"default": "new SlotController(this)"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"kind": "field",
|
|
1131
|
+
"name": "buttonRef",
|
|
1132
|
+
"privacy": "private"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
"kind": "field",
|
|
1136
|
+
"name": "events",
|
|
1137
|
+
"privacy": "private",
|
|
1138
|
+
"default": "new EventController(this)"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"kind": "field",
|
|
1142
|
+
"name": "lightDom",
|
|
1143
|
+
"privacy": "private",
|
|
1144
|
+
"default": "new LightDomController(this, { render: () => this.renderLightDom(), })"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"kind": "field",
|
|
1098
1148
|
"name": "variant",
|
|
1099
1149
|
"type": {
|
|
1100
1150
|
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
1101
1151
|
},
|
|
1102
1152
|
"default": "\"default\"",
|
|
1103
1153
|
"description": "The style variant of the button.",
|
|
1104
|
-
"
|
|
1154
|
+
"attribute": "variant",
|
|
1155
|
+
"reflects": true
|
|
1105
1156
|
},
|
|
1106
1157
|
{
|
|
1158
|
+
"kind": "field",
|
|
1107
1159
|
"name": "type",
|
|
1108
1160
|
"type": {
|
|
1109
1161
|
"text": "\"button\" | \"submit\" | \"reset\""
|
|
1110
1162
|
},
|
|
1111
1163
|
"default": "\"submit\"",
|
|
1112
1164
|
"description": "The type of the button.",
|
|
1113
|
-
"
|
|
1165
|
+
"attribute": "type",
|
|
1166
|
+
"reflects": true
|
|
1114
1167
|
},
|
|
1115
1168
|
{
|
|
1169
|
+
"kind": "field",
|
|
1116
1170
|
"name": "size",
|
|
1117
1171
|
"type": {
|
|
1118
1172
|
"text": "\"s\" | \"m\" | \"l\""
|
|
1119
1173
|
},
|
|
1120
1174
|
"default": "\"m\"",
|
|
1121
1175
|
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1122
|
-
"
|
|
1176
|
+
"attribute": "size",
|
|
1177
|
+
"reflects": true
|
|
1123
1178
|
},
|
|
1124
1179
|
{
|
|
1125
|
-
"
|
|
1180
|
+
"kind": "field",
|
|
1181
|
+
"name": "accessibleExpanded",
|
|
1126
1182
|
"type": {
|
|
1127
1183
|
"text": "\"true\" | \"false\" | undefined"
|
|
1128
1184
|
},
|
|
1129
|
-
"
|
|
1185
|
+
"privacy": "private",
|
|
1186
|
+
"attribute": "aria-expanded"
|
|
1130
1187
|
},
|
|
1131
1188
|
{
|
|
1132
|
-
"
|
|
1189
|
+
"kind": "field",
|
|
1190
|
+
"name": "accessibleHasPopup",
|
|
1133
1191
|
"type": {
|
|
1134
1192
|
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
1135
1193
|
},
|
|
1136
|
-
"
|
|
1194
|
+
"privacy": "private",
|
|
1195
|
+
"attribute": "aria-haspopup"
|
|
1137
1196
|
},
|
|
1138
1197
|
{
|
|
1198
|
+
"kind": "field",
|
|
1139
1199
|
"name": "href",
|
|
1140
1200
|
"type": {
|
|
1141
1201
|
"text": "string | undefined"
|
|
1142
1202
|
},
|
|
1143
1203
|
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1144
|
-
"
|
|
1204
|
+
"attribute": "href",
|
|
1205
|
+
"reflects": true
|
|
1145
1206
|
},
|
|
1146
1207
|
{
|
|
1208
|
+
"kind": "field",
|
|
1147
1209
|
"name": "download",
|
|
1148
1210
|
"type": {
|
|
1149
1211
|
"text": "boolean"
|
|
1150
1212
|
},
|
|
1151
1213
|
"default": "false",
|
|
1152
1214
|
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1153
|
-
"
|
|
1215
|
+
"attribute": "download",
|
|
1216
|
+
"reflects": true
|
|
1154
1217
|
},
|
|
1155
1218
|
{
|
|
1219
|
+
"kind": "field",
|
|
1156
1220
|
"name": "target",
|
|
1157
1221
|
"type": {
|
|
1158
1222
|
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
1159
1223
|
},
|
|
1160
1224
|
"default": "\"_self\"",
|
|
1161
1225
|
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
1162
|
-
"
|
|
1226
|
+
"attribute": "target"
|
|
1163
1227
|
},
|
|
1164
1228
|
{
|
|
1229
|
+
"kind": "field",
|
|
1165
1230
|
"name": "expand",
|
|
1166
1231
|
"type": {
|
|
1167
1232
|
"text": "boolean"
|
|
1168
1233
|
},
|
|
1169
1234
|
"default": "false",
|
|
1170
1235
|
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1171
|
-
"
|
|
1236
|
+
"attribute": "expand",
|
|
1237
|
+
"reflects": true
|
|
1172
1238
|
},
|
|
1173
1239
|
{
|
|
1240
|
+
"kind": "field",
|
|
1174
1241
|
"name": "square",
|
|
1175
1242
|
"type": {
|
|
1176
1243
|
"text": "boolean"
|
|
1177
1244
|
},
|
|
1178
1245
|
"default": "false",
|
|
1179
1246
|
"description": "When provided, the button is rendered as a square button. Use this for icon only buttons.",
|
|
1180
|
-
"
|
|
1247
|
+
"attribute": "square",
|
|
1248
|
+
"reflects": true
|
|
1181
1249
|
},
|
|
1182
1250
|
{
|
|
1251
|
+
"kind": "field",
|
|
1183
1252
|
"name": "loading",
|
|
1184
1253
|
"type": {
|
|
1185
1254
|
"text": "boolean"
|
|
1186
1255
|
},
|
|
1187
1256
|
"default": "false",
|
|
1188
1257
|
"description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
|
|
1189
|
-
"
|
|
1258
|
+
"attribute": "loading",
|
|
1259
|
+
"reflects": true
|
|
1190
1260
|
},
|
|
1191
1261
|
{
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1262
|
+
"kind": "method",
|
|
1263
|
+
"name": "renderLink",
|
|
1264
|
+
"privacy": "private",
|
|
1265
|
+
"parameters": [
|
|
1266
|
+
{
|
|
1267
|
+
"name": "innards",
|
|
1268
|
+
"type": {
|
|
1269
|
+
"text": "TemplateResult"
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
],
|
|
1273
|
+
"description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
|
|
1203
1274
|
},
|
|
1204
1275
|
{
|
|
1205
|
-
"
|
|
1206
|
-
"
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1276
|
+
"kind": "method",
|
|
1277
|
+
"name": "renderButton",
|
|
1278
|
+
"privacy": "private",
|
|
1279
|
+
"parameters": [
|
|
1280
|
+
{
|
|
1281
|
+
"name": "innards",
|
|
1282
|
+
"type": {
|
|
1283
|
+
"text": "TemplateResult"
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
]
|
|
1215
1287
|
},
|
|
1216
1288
|
{
|
|
1289
|
+
"kind": "method",
|
|
1290
|
+
"name": "renderLightDom",
|
|
1291
|
+
"privacy": "private"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"kind": "field",
|
|
1295
|
+
"name": "handleOuterClick",
|
|
1296
|
+
"privacy": "private"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"kind": "method",
|
|
1300
|
+
"name": "handleClick",
|
|
1301
|
+
"privacy": "private",
|
|
1302
|
+
"parameters": [
|
|
1303
|
+
{
|
|
1304
|
+
"name": "e",
|
|
1305
|
+
"type": {
|
|
1306
|
+
"text": "Event"
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
"kind": "method",
|
|
1313
|
+
"name": "handleProxyChange",
|
|
1314
|
+
"privacy": "private",
|
|
1315
|
+
"parameters": [
|
|
1316
|
+
{
|
|
1317
|
+
"name": "e",
|
|
1318
|
+
"type": {
|
|
1319
|
+
"text": "Event"
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
],
|
|
1323
|
+
"description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"kind": "field",
|
|
1327
|
+
"name": "disabled",
|
|
1328
|
+
"type": {
|
|
1329
|
+
"text": "boolean"
|
|
1330
|
+
},
|
|
1331
|
+
"default": "false",
|
|
1332
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1333
|
+
"attribute": "disabled",
|
|
1334
|
+
"reflects": true,
|
|
1335
|
+
"inheritedFrom": {
|
|
1336
|
+
"name": "InputMixin",
|
|
1337
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1338
|
+
}
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
"kind": "field",
|
|
1342
|
+
"name": "name",
|
|
1343
|
+
"type": {
|
|
1344
|
+
"text": "string | undefined"
|
|
1345
|
+
},
|
|
1346
|
+
"description": "The name of the form component.",
|
|
1347
|
+
"attribute": "name",
|
|
1348
|
+
"reflects": true,
|
|
1349
|
+
"inheritedFrom": {
|
|
1350
|
+
"name": "InputMixin",
|
|
1351
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"kind": "field",
|
|
1217
1356
|
"name": "value",
|
|
1218
1357
|
"type": {
|
|
1219
1358
|
"text": "string"
|
|
1220
1359
|
},
|
|
1221
1360
|
"default": "\"\"",
|
|
1222
1361
|
"description": "The value of the form component.",
|
|
1223
|
-
"
|
|
1362
|
+
"attribute": "value",
|
|
1363
|
+
"inheritedFrom": {
|
|
1364
|
+
"name": "InputMixin",
|
|
1365
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
"kind": "field",
|
|
1370
|
+
"name": "formAncestor",
|
|
1371
|
+
"type": {
|
|
1372
|
+
"text": "HTMLFormElement | null"
|
|
1373
|
+
},
|
|
1374
|
+
"privacy": "private",
|
|
1375
|
+
"default": "null",
|
|
1376
|
+
"inheritedFrom": {
|
|
1377
|
+
"name": "InputMixin",
|
|
1378
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"kind": "field",
|
|
1383
|
+
"name": "_formId",
|
|
1384
|
+
"type": {
|
|
1385
|
+
"text": "string | undefined"
|
|
1386
|
+
},
|
|
1387
|
+
"privacy": "protected",
|
|
1224
1388
|
"inheritedFrom": {
|
|
1225
1389
|
"name": "InputMixin",
|
|
1226
1390
|
"module": "src/common/mixins/InputMixin.ts"
|
|
1227
1391
|
}
|
|
1228
1392
|
},
|
|
1229
1393
|
{
|
|
1394
|
+
"kind": "field",
|
|
1230
1395
|
"name": "form",
|
|
1231
1396
|
"type": {
|
|
1232
1397
|
"text": "HTMLFormElement | null"
|
|
1233
1398
|
},
|
|
1234
1399
|
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
1235
|
-
"
|
|
1400
|
+
"attribute": "form",
|
|
1236
1401
|
"inheritedFrom": {
|
|
1237
1402
|
"name": "InputMixin",
|
|
1238
1403
|
"module": "src/common/mixins/InputMixin.ts"
|
|
1239
1404
|
}
|
|
1240
|
-
}
|
|
1241
|
-
],
|
|
1242
|
-
"mixins": [
|
|
1405
|
+
},
|
|
1243
1406
|
{
|
|
1244
|
-
"
|
|
1245
|
-
"
|
|
1407
|
+
"kind": "field",
|
|
1408
|
+
"name": "focusableRef",
|
|
1409
|
+
"privacy": "protected",
|
|
1410
|
+
"inheritedFrom": {
|
|
1411
|
+
"name": "FocusableMixin",
|
|
1412
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1413
|
+
}
|
|
1246
1414
|
},
|
|
1247
1415
|
{
|
|
1248
|
-
"
|
|
1249
|
-
"
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
}
|
|
1267
|
-
],
|
|
1268
|
-
"exports": [
|
|
1269
|
-
{
|
|
1270
|
-
"kind": "js",
|
|
1271
|
-
"name": "default",
|
|
1272
|
-
"declaration": {
|
|
1273
|
-
"name": "Button",
|
|
1274
|
-
"module": "src/button/Button.ts"
|
|
1275
|
-
}
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
"kind": "custom-element-definition",
|
|
1279
|
-
"name": "nord-button",
|
|
1280
|
-
"declaration": {
|
|
1281
|
-
"name": "Button",
|
|
1282
|
-
"module": "src/button/Button.ts"
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
]
|
|
1286
|
-
},
|
|
1287
|
-
{
|
|
1288
|
-
"kind": "javascript-module",
|
|
1289
|
-
"path": "src/badge/Badge.ts",
|
|
1290
|
-
"declarations": [
|
|
1291
|
-
{
|
|
1292
|
-
"kind": "class",
|
|
1293
|
-
"description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
|
|
1294
|
-
"name": "Badge",
|
|
1295
|
-
"slots": [
|
|
1416
|
+
"kind": "method",
|
|
1417
|
+
"name": "focus",
|
|
1418
|
+
"parameters": [
|
|
1419
|
+
{
|
|
1420
|
+
"name": "options",
|
|
1421
|
+
"optional": true,
|
|
1422
|
+
"type": {
|
|
1423
|
+
"text": "FocusOptions"
|
|
1424
|
+
},
|
|
1425
|
+
"description": "An object which controls aspects of the focusing process."
|
|
1426
|
+
}
|
|
1427
|
+
],
|
|
1428
|
+
"description": "Programmatically move focus to the component.",
|
|
1429
|
+
"inheritedFrom": {
|
|
1430
|
+
"name": "FocusableMixin",
|
|
1431
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1432
|
+
}
|
|
1433
|
+
},
|
|
1296
1434
|
{
|
|
1297
|
-
"
|
|
1298
|
-
"name": ""
|
|
1435
|
+
"kind": "method",
|
|
1436
|
+
"name": "blur",
|
|
1437
|
+
"description": "Programmatically remove focus from the component.",
|
|
1438
|
+
"inheritedFrom": {
|
|
1439
|
+
"name": "FocusableMixin",
|
|
1440
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1441
|
+
}
|
|
1299
1442
|
},
|
|
1300
1443
|
{
|
|
1301
|
-
"
|
|
1302
|
-
"name": "
|
|
1444
|
+
"kind": "method",
|
|
1445
|
+
"name": "click",
|
|
1446
|
+
"description": "Programmatically simulates a click on the component.",
|
|
1447
|
+
"inheritedFrom": {
|
|
1448
|
+
"name": "FocusableMixin",
|
|
1449
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1450
|
+
}
|
|
1303
1451
|
}
|
|
1304
1452
|
],
|
|
1305
|
-
"
|
|
1453
|
+
"attributes": [
|
|
1306
1454
|
{
|
|
1307
|
-
"
|
|
1308
|
-
"name": "type",
|
|
1455
|
+
"name": "variant",
|
|
1309
1456
|
"type": {
|
|
1310
|
-
"text": "\"
|
|
1457
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
1311
1458
|
},
|
|
1312
|
-
"
|
|
1313
|
-
"
|
|
1314
|
-
"
|
|
1315
|
-
"attribute": "type",
|
|
1316
|
-
"reflects": true
|
|
1459
|
+
"default": "\"default\"",
|
|
1460
|
+
"description": "The style variant of the button.",
|
|
1461
|
+
"fieldName": "variant"
|
|
1317
1462
|
},
|
|
1318
1463
|
{
|
|
1319
|
-
"
|
|
1320
|
-
"name": "variant",
|
|
1464
|
+
"name": "type",
|
|
1321
1465
|
"type": {
|
|
1322
|
-
"text": "\"
|
|
1466
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
1323
1467
|
},
|
|
1324
|
-
"
|
|
1325
|
-
"
|
|
1326
|
-
"
|
|
1327
|
-
"reflects": true
|
|
1468
|
+
"default": "\"submit\"",
|
|
1469
|
+
"description": "The type of the button.",
|
|
1470
|
+
"fieldName": "type"
|
|
1328
1471
|
},
|
|
1329
1472
|
{
|
|
1330
|
-
"
|
|
1331
|
-
"name": "strong",
|
|
1473
|
+
"name": "size",
|
|
1332
1474
|
"type": {
|
|
1333
|
-
"text": "
|
|
1475
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
1334
1476
|
},
|
|
1335
|
-
"default": "
|
|
1336
|
-
"description": "
|
|
1337
|
-
"
|
|
1338
|
-
|
|
1339
|
-
}
|
|
1340
|
-
],
|
|
1341
|
-
"attributes": [
|
|
1477
|
+
"default": "\"m\"",
|
|
1478
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1479
|
+
"fieldName": "size"
|
|
1480
|
+
},
|
|
1342
1481
|
{
|
|
1343
|
-
"name": "
|
|
1482
|
+
"name": "aria-expanded",
|
|
1344
1483
|
"type": {
|
|
1345
|
-
"text": "\"
|
|
1484
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
1346
1485
|
},
|
|
1347
|
-
"
|
|
1348
|
-
"deprecated": "Use `variant` instead. If you previously used `\"progress\"`, use `\"info\"` instead.",
|
|
1349
|
-
"default": "\"neutral\"",
|
|
1350
|
-
"fieldName": "type"
|
|
1486
|
+
"fieldName": "accessibleExpanded"
|
|
1351
1487
|
},
|
|
1352
1488
|
{
|
|
1353
|
-
"name": "
|
|
1489
|
+
"name": "aria-haspopup",
|
|
1354
1490
|
"type": {
|
|
1355
|
-
"text": "\"
|
|
1491
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
1356
1492
|
},
|
|
1357
|
-
"
|
|
1358
|
-
"default": "\"neutral\"",
|
|
1359
|
-
"fieldName": "variant"
|
|
1493
|
+
"fieldName": "accessibleHasPopup"
|
|
1360
1494
|
},
|
|
1361
1495
|
{
|
|
1362
|
-
"name": "
|
|
1496
|
+
"name": "href",
|
|
1363
1497
|
"type": {
|
|
1364
|
-
"text": "
|
|
1365
|
-
},
|
|
1366
|
-
"default": "false",
|
|
1367
|
-
"description": "Strong badges are a secondary style for badges.\nThey provide more visual prominence and emphasize them.",
|
|
1368
|
-
"fieldName": "strong"
|
|
1369
|
-
}
|
|
1370
|
-
],
|
|
1371
|
-
"superclass": {
|
|
1372
|
-
"name": "LitElement",
|
|
1373
|
-
"package": "lit"
|
|
1374
|
-
},
|
|
1375
|
-
"localization": [],
|
|
1376
|
-
"status": "ready",
|
|
1377
|
-
"category": "text",
|
|
1378
|
-
"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 easy 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- Don't use badges for labeling, categorizing, or organizing objects. Use the [tag component](/components/tag/) instead.\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",
|
|
1379
|
-
"examples": [],
|
|
1380
|
-
"dependencies": [],
|
|
1381
|
-
"tagName": "nord-badge",
|
|
1382
|
-
"customElement": true
|
|
1383
|
-
}
|
|
1384
|
-
],
|
|
1385
|
-
"exports": [
|
|
1386
|
-
{
|
|
1387
|
-
"kind": "js",
|
|
1388
|
-
"name": "default",
|
|
1389
|
-
"declaration": {
|
|
1390
|
-
"name": "Badge",
|
|
1391
|
-
"module": "src/badge/Badge.ts"
|
|
1392
|
-
}
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
"kind": "custom-element-definition",
|
|
1396
|
-
"name": "nord-badge",
|
|
1397
|
-
"declaration": {
|
|
1398
|
-
"name": "Badge",
|
|
1399
|
-
"module": "src/badge/Badge.ts"
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
]
|
|
1403
|
-
},
|
|
1404
|
-
{
|
|
1405
|
-
"kind": "javascript-module",
|
|
1406
|
-
"path": "src/banner/Banner.ts",
|
|
1407
|
-
"declarations": [
|
|
1408
|
-
{
|
|
1409
|
-
"kind": "class",
|
|
1410
|
-
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
1411
|
-
"name": "Banner",
|
|
1412
|
-
"cssProperties": [
|
|
1413
|
-
{
|
|
1414
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1415
|
-
"name": "--n-banner-border-radius",
|
|
1416
|
-
"default": "var(--n-border-radius)"
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1420
|
-
"name": "--n-banner-box-shadow",
|
|
1421
|
-
"default": "var(--n-box-shadow-card)"
|
|
1422
|
-
}
|
|
1423
|
-
],
|
|
1424
|
-
"slots": [
|
|
1425
|
-
{
|
|
1426
|
-
"description": "default slot",
|
|
1427
|
-
"name": ""
|
|
1428
|
-
}
|
|
1429
|
-
],
|
|
1430
|
-
"members": [
|
|
1431
|
-
{
|
|
1432
|
-
"kind": "field",
|
|
1433
|
-
"name": "variant",
|
|
1434
|
-
"type": {
|
|
1435
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1436
|
-
},
|
|
1437
|
-
"default": "\"info\"",
|
|
1438
|
-
"description": "The style variant of the banner.",
|
|
1439
|
-
"attribute": "variant",
|
|
1440
|
-
"reflects": true
|
|
1441
|
-
}
|
|
1442
|
-
],
|
|
1443
|
-
"attributes": [
|
|
1444
|
-
{
|
|
1445
|
-
"name": "variant",
|
|
1446
|
-
"type": {
|
|
1447
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1448
|
-
},
|
|
1449
|
-
"default": "\"info\"",
|
|
1450
|
-
"description": "The style variant of the banner.",
|
|
1451
|
-
"fieldName": "variant"
|
|
1452
|
-
}
|
|
1453
|
-
],
|
|
1454
|
-
"superclass": {
|
|
1455
|
-
"name": "LitElement",
|
|
1456
|
-
"package": "lit"
|
|
1457
|
-
},
|
|
1458
|
-
"localization": [],
|
|
1459
|
-
"status": "ready",
|
|
1460
|
-
"category": "feedback",
|
|
1461
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
|
|
1462
|
-
"examples": [],
|
|
1463
|
-
"dependencies": [
|
|
1464
|
-
"icon"
|
|
1465
|
-
],
|
|
1466
|
-
"tagName": "nord-banner",
|
|
1467
|
-
"customElement": true
|
|
1468
|
-
}
|
|
1469
|
-
],
|
|
1470
|
-
"exports": [
|
|
1471
|
-
{
|
|
1472
|
-
"kind": "js",
|
|
1473
|
-
"name": "default",
|
|
1474
|
-
"declaration": {
|
|
1475
|
-
"name": "Banner",
|
|
1476
|
-
"module": "src/banner/Banner.ts"
|
|
1477
|
-
}
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
"kind": "custom-element-definition",
|
|
1481
|
-
"name": "nord-banner",
|
|
1482
|
-
"declaration": {
|
|
1483
|
-
"name": "Banner",
|
|
1484
|
-
"module": "src/banner/Banner.ts"
|
|
1485
|
-
}
|
|
1486
|
-
}
|
|
1487
|
-
]
|
|
1488
|
-
},
|
|
1489
|
-
{
|
|
1490
|
-
"kind": "javascript-module",
|
|
1491
|
-
"path": "src/calendar/Calendar.ts",
|
|
1492
|
-
"declarations": [
|
|
1493
|
-
{
|
|
1494
|
-
"kind": "class",
|
|
1495
|
-
"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.",
|
|
1496
|
-
"name": "Calendar",
|
|
1497
|
-
"cssProperties": [
|
|
1498
|
-
{
|
|
1499
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1500
|
-
"name": "--n-calendar-border-radius",
|
|
1501
|
-
"default": "var(--n-border-radius)"
|
|
1502
|
-
},
|
|
1503
|
-
{
|
|
1504
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1505
|
-
"name": "--n-calendar-box-shadow",
|
|
1506
|
-
"default": "var(--n-box-shadow-popout)"
|
|
1507
|
-
}
|
|
1508
|
-
],
|
|
1509
|
-
"members": [
|
|
1510
|
-
{
|
|
1511
|
-
"kind": "field",
|
|
1512
|
-
"name": "monthSelectNode",
|
|
1513
|
-
"type": {
|
|
1514
|
-
"text": "HTMLElement"
|
|
1498
|
+
"text": "string | undefined"
|
|
1515
1499
|
},
|
|
1516
|
-
"
|
|
1500
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1501
|
+
"fieldName": "href"
|
|
1517
1502
|
},
|
|
1518
1503
|
{
|
|
1519
|
-
"
|
|
1520
|
-
"name": "focusedDayNode",
|
|
1504
|
+
"name": "download",
|
|
1521
1505
|
"type": {
|
|
1522
|
-
"text": "
|
|
1506
|
+
"text": "boolean"
|
|
1523
1507
|
},
|
|
1524
|
-
"
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
"kind": "field",
|
|
1528
|
-
"name": "direction",
|
|
1529
|
-
"privacy": "private",
|
|
1530
|
-
"default": "new DirectionController(this)"
|
|
1531
|
-
},
|
|
1532
|
-
{
|
|
1533
|
-
"kind": "field",
|
|
1534
|
-
"name": "swipe",
|
|
1535
|
-
"privacy": "private",
|
|
1536
|
-
"default": "new SwipeController(this, { matchesGesture: isHorizontalSwipe, onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1), })"
|
|
1537
|
-
},
|
|
1538
|
-
{
|
|
1539
|
-
"kind": "field",
|
|
1540
|
-
"name": "shortcuts",
|
|
1541
|
-
"privacy": "private"
|
|
1542
|
-
},
|
|
1543
|
-
{
|
|
1544
|
-
"kind": "field",
|
|
1545
|
-
"name": "localize",
|
|
1546
|
-
"privacy": "private",
|
|
1547
|
-
"default": "new LocalizeController<\"nord-calendar\">(this, { onLangChange: () => this.handleLangChange(), })"
|
|
1508
|
+
"default": "false",
|
|
1509
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1510
|
+
"fieldName": "download"
|
|
1548
1511
|
},
|
|
1549
1512
|
{
|
|
1550
|
-
"
|
|
1551
|
-
"name": "dateFormatShort",
|
|
1513
|
+
"name": "target",
|
|
1552
1514
|
"type": {
|
|
1553
|
-
"text": "
|
|
1515
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
1554
1516
|
},
|
|
1555
|
-
"
|
|
1556
|
-
"description": "
|
|
1517
|
+
"default": "\"_self\"",
|
|
1518
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
1519
|
+
"fieldName": "target"
|
|
1557
1520
|
},
|
|
1558
1521
|
{
|
|
1559
|
-
"
|
|
1560
|
-
"name": "monthNames",
|
|
1522
|
+
"name": "expand",
|
|
1561
1523
|
"type": {
|
|
1562
|
-
"text": "
|
|
1524
|
+
"text": "boolean"
|
|
1563
1525
|
},
|
|
1564
|
-
"
|
|
1526
|
+
"default": "false",
|
|
1527
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1528
|
+
"fieldName": "expand"
|
|
1565
1529
|
},
|
|
1566
1530
|
{
|
|
1567
|
-
"
|
|
1568
|
-
"name": "monthNamesShort",
|
|
1531
|
+
"name": "square",
|
|
1569
1532
|
"type": {
|
|
1570
|
-
"text": "
|
|
1533
|
+
"text": "boolean"
|
|
1571
1534
|
},
|
|
1572
|
-
"
|
|
1535
|
+
"default": "false",
|
|
1536
|
+
"description": "When provided, the button is rendered as a square button. Use this for icon only buttons.",
|
|
1537
|
+
"fieldName": "square"
|
|
1573
1538
|
},
|
|
1574
1539
|
{
|
|
1575
|
-
"
|
|
1576
|
-
"name": "dayNames",
|
|
1540
|
+
"name": "loading",
|
|
1577
1541
|
"type": {
|
|
1578
|
-
"text": "
|
|
1542
|
+
"text": "boolean"
|
|
1579
1543
|
},
|
|
1580
|
-
"
|
|
1544
|
+
"default": "false",
|
|
1545
|
+
"description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
|
|
1546
|
+
"fieldName": "loading"
|
|
1581
1547
|
},
|
|
1582
1548
|
{
|
|
1583
|
-
"
|
|
1584
|
-
"name": "dayNamesShort",
|
|
1549
|
+
"name": "disabled",
|
|
1585
1550
|
"type": {
|
|
1586
|
-
"text": "
|
|
1551
|
+
"text": "boolean"
|
|
1587
1552
|
},
|
|
1588
|
-
"
|
|
1553
|
+
"default": "false",
|
|
1554
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1555
|
+
"fieldName": "disabled",
|
|
1556
|
+
"inheritedFrom": {
|
|
1557
|
+
"name": "InputMixin",
|
|
1558
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1559
|
+
}
|
|
1589
1560
|
},
|
|
1590
1561
|
{
|
|
1591
|
-
"
|
|
1592
|
-
"name": "value",
|
|
1562
|
+
"name": "name",
|
|
1593
1563
|
"type": {
|
|
1594
|
-
"text": "string"
|
|
1564
|
+
"text": "string | undefined"
|
|
1595
1565
|
},
|
|
1596
|
-
"
|
|
1597
|
-
"
|
|
1598
|
-
"
|
|
1566
|
+
"description": "The name of the form component.",
|
|
1567
|
+
"fieldName": "name",
|
|
1568
|
+
"inheritedFrom": {
|
|
1569
|
+
"name": "InputMixin",
|
|
1570
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1571
|
+
}
|
|
1599
1572
|
},
|
|
1600
|
-
{
|
|
1601
|
-
"
|
|
1602
|
-
"
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
"description": "
|
|
1607
|
-
"
|
|
1608
|
-
"
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
"name": "min",
|
|
1613
|
-
"type": {
|
|
1614
|
-
"text": "string | undefined"
|
|
1615
|
-
},
|
|
1616
|
-
"description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
|
|
1617
|
-
"attribute": "min",
|
|
1618
|
-
"reflects": true
|
|
1619
|
-
},
|
|
1620
|
-
{
|
|
1621
|
-
"kind": "field",
|
|
1622
|
-
"name": "max",
|
|
1623
|
-
"type": {
|
|
1624
|
-
"text": "string | undefined"
|
|
1625
|
-
},
|
|
1626
|
-
"description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
|
|
1627
|
-
"attribute": "max",
|
|
1628
|
-
"reflects": true
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
"kind": "field",
|
|
1632
|
-
"name": "expand",
|
|
1633
|
-
"type": {
|
|
1634
|
-
"text": "boolean"
|
|
1635
|
-
},
|
|
1636
|
-
"default": "false",
|
|
1637
|
-
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1638
|
-
"attribute": "expand",
|
|
1639
|
-
"reflects": true
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
"kind": "field",
|
|
1643
|
-
"name": "isDateDisabled",
|
|
1644
|
-
"type": {
|
|
1645
|
-
"text": "DatePredicate"
|
|
1646
|
-
},
|
|
1647
|
-
"default": "isDateDisabled",
|
|
1648
|
-
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
1649
|
-
},
|
|
1650
|
-
{
|
|
1651
|
-
"kind": "field",
|
|
1652
|
-
"name": "isDateHighlighted",
|
|
1653
|
-
"type": {
|
|
1654
|
-
"text": "(date: Date) => string | boolean"
|
|
1655
|
-
},
|
|
1656
|
-
"default": "isDateHighlighted",
|
|
1657
|
-
"description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
|
|
1658
|
-
},
|
|
1659
|
-
{
|
|
1660
|
-
"kind": "field",
|
|
1661
|
-
"name": "activeFocus",
|
|
1662
|
-
"type": {
|
|
1663
|
-
"text": "boolean"
|
|
1664
|
-
},
|
|
1665
|
-
"privacy": "private",
|
|
1666
|
-
"default": "false"
|
|
1667
|
-
},
|
|
1668
|
-
{
|
|
1669
|
-
"kind": "field",
|
|
1670
|
-
"name": "focusedDay",
|
|
1671
|
-
"privacy": "private",
|
|
1672
|
-
"default": "new Date()"
|
|
1673
|
-
},
|
|
1674
|
-
{
|
|
1675
|
-
"kind": "method",
|
|
1676
|
-
"name": "focus",
|
|
1677
|
-
"parameters": [
|
|
1678
|
-
{
|
|
1679
|
-
"name": "options",
|
|
1680
|
-
"optional": true,
|
|
1681
|
-
"type": {
|
|
1682
|
-
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
1683
|
-
},
|
|
1684
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1685
|
-
}
|
|
1686
|
-
],
|
|
1687
|
-
"description": "Programmatically move focus to the calendar."
|
|
1688
|
-
},
|
|
1689
|
-
{
|
|
1690
|
-
"kind": "method",
|
|
1691
|
-
"name": "handleValueChange",
|
|
1692
|
-
"privacy": "protected"
|
|
1693
|
-
},
|
|
1694
|
-
{
|
|
1695
|
-
"kind": "method",
|
|
1696
|
-
"name": "handleFocusedDayChange",
|
|
1697
|
-
"privacy": "protected"
|
|
1698
|
-
},
|
|
1699
|
-
{
|
|
1700
|
-
"kind": "method",
|
|
1701
|
-
"name": "handleLangChange",
|
|
1702
|
-
"privacy": "private"
|
|
1703
|
-
},
|
|
1704
|
-
{
|
|
1705
|
-
"kind": "field",
|
|
1706
|
-
"name": "handleDaySelect",
|
|
1707
|
-
"privacy": "private"
|
|
1708
|
-
},
|
|
1709
|
-
{
|
|
1710
|
-
"kind": "method",
|
|
1711
|
-
"name": "addDays",
|
|
1712
|
-
"privacy": "private",
|
|
1713
|
-
"parameters": [
|
|
1714
|
-
{
|
|
1715
|
-
"name": "days",
|
|
1716
|
-
"type": {
|
|
1717
|
-
"text": "number"
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
]
|
|
1721
|
-
},
|
|
1722
|
-
{
|
|
1723
|
-
"kind": "method",
|
|
1724
|
-
"name": "addMonths",
|
|
1725
|
-
"privacy": "private",
|
|
1726
|
-
"parameters": [
|
|
1727
|
-
{
|
|
1728
|
-
"name": "months",
|
|
1729
|
-
"type": {
|
|
1730
|
-
"text": "number"
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
]
|
|
1734
|
-
},
|
|
1735
|
-
{
|
|
1736
|
-
"kind": "method",
|
|
1737
|
-
"name": "addYears",
|
|
1738
|
-
"privacy": "private",
|
|
1739
|
-
"parameters": [
|
|
1740
|
-
{
|
|
1741
|
-
"name": "years",
|
|
1742
|
-
"type": {
|
|
1743
|
-
"text": "number"
|
|
1744
|
-
}
|
|
1745
|
-
}
|
|
1746
|
-
]
|
|
1747
|
-
},
|
|
1748
|
-
{
|
|
1749
|
-
"kind": "method",
|
|
1750
|
-
"name": "startOfWeek",
|
|
1751
|
-
"privacy": "private"
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
"kind": "method",
|
|
1755
|
-
"name": "endOfWeek",
|
|
1756
|
-
"privacy": "private"
|
|
1757
|
-
},
|
|
1758
|
-
{
|
|
1759
|
-
"kind": "method",
|
|
1760
|
-
"name": "setMonth",
|
|
1761
|
-
"privacy": "private",
|
|
1762
|
-
"parameters": [
|
|
1763
|
-
{
|
|
1764
|
-
"name": "month",
|
|
1765
|
-
"type": {
|
|
1766
|
-
"text": "number"
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
]
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
"kind": "method",
|
|
1773
|
-
"name": "setYear",
|
|
1774
|
-
"privacy": "private",
|
|
1775
|
-
"parameters": [
|
|
1776
|
-
{
|
|
1777
|
-
"name": "year",
|
|
1778
|
-
"type": {
|
|
1779
|
-
"text": "number"
|
|
1780
|
-
}
|
|
1781
|
-
}
|
|
1782
|
-
]
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
"kind": "method",
|
|
1786
|
-
"name": "setFocusedDay",
|
|
1787
|
-
"privacy": "private",
|
|
1788
|
-
"parameters": [
|
|
1789
|
-
{
|
|
1790
|
-
"name": "day",
|
|
1791
|
-
"type": {
|
|
1792
|
-
"text": "Date"
|
|
1793
|
-
}
|
|
1794
|
-
}
|
|
1795
|
-
]
|
|
1796
|
-
},
|
|
1797
|
-
{
|
|
1798
|
-
"kind": "field",
|
|
1799
|
-
"name": "handleMonthSelect",
|
|
1800
|
-
"privacy": "private"
|
|
1801
|
-
},
|
|
1802
|
-
{
|
|
1803
|
-
"kind": "field",
|
|
1804
|
-
"name": "handleYearSelect",
|
|
1805
|
-
"privacy": "private"
|
|
1806
|
-
},
|
|
1807
|
-
{
|
|
1808
|
-
"kind": "field",
|
|
1809
|
-
"name": "handleNextMonthClick",
|
|
1810
|
-
"privacy": "private"
|
|
1811
|
-
},
|
|
1812
|
-
{
|
|
1813
|
-
"kind": "field",
|
|
1814
|
-
"name": "handlePreviousMonthClick",
|
|
1815
|
-
"privacy": "private"
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
"kind": "field",
|
|
1819
|
-
"name": "enableActiveFocus",
|
|
1820
|
-
"privacy": "private"
|
|
1821
|
-
},
|
|
1822
|
-
{
|
|
1823
|
-
"kind": "field",
|
|
1824
|
-
"name": "disableActiveFocus",
|
|
1825
|
-
"privacy": "private"
|
|
1826
|
-
}
|
|
1827
|
-
],
|
|
1828
|
-
"events": [
|
|
1829
|
-
{
|
|
1830
|
-
"name": "nord-focus-date",
|
|
1831
|
-
"type": {
|
|
1832
|
-
"text": "DateSelectEvent"
|
|
1833
|
-
},
|
|
1834
|
-
"description": "Dispatched when the calendar's focused date changes."
|
|
1835
|
-
},
|
|
1836
|
-
{
|
|
1837
|
-
"type": {
|
|
1838
|
-
"text": "DateSelectEvent"
|
|
1839
|
-
},
|
|
1840
|
-
"description": "Dispatched when a date is selected and the value changes.",
|
|
1841
|
-
"name": "change"
|
|
1842
|
-
}
|
|
1843
|
-
],
|
|
1844
|
-
"attributes": [
|
|
1845
|
-
{
|
|
1846
|
-
"name": "value",
|
|
1847
|
-
"type": {
|
|
1848
|
-
"text": "string"
|
|
1849
|
-
},
|
|
1850
|
-
"default": "\"\"",
|
|
1851
|
-
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1852
|
-
"fieldName": "value"
|
|
1853
|
-
},
|
|
1854
|
-
{
|
|
1855
|
-
"name": "first-day-of-week",
|
|
1856
|
-
"type": {
|
|
1857
|
-
"text": "DaysOfWeek"
|
|
1858
|
-
},
|
|
1859
|
-
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1860
|
-
"fieldName": "firstDayOfWeek"
|
|
1861
|
-
},
|
|
1862
|
-
{
|
|
1863
|
-
"name": "min",
|
|
1864
|
-
"type": {
|
|
1865
|
-
"text": "string | undefined"
|
|
1866
|
-
},
|
|
1867
|
-
"description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
|
|
1868
|
-
"fieldName": "min"
|
|
1869
|
-
},
|
|
1870
|
-
{
|
|
1871
|
-
"name": "max",
|
|
1872
|
-
"type": {
|
|
1873
|
-
"text": "string | undefined"
|
|
1874
|
-
},
|
|
1875
|
-
"description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
|
|
1876
|
-
"fieldName": "max"
|
|
1877
|
-
},
|
|
1878
|
-
{
|
|
1879
|
-
"name": "expand",
|
|
1880
|
-
"type": {
|
|
1881
|
-
"text": "boolean"
|
|
1882
|
-
},
|
|
1883
|
-
"default": "false",
|
|
1884
|
-
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1885
|
-
"fieldName": "expand"
|
|
1886
|
-
}
|
|
1887
|
-
],
|
|
1888
|
-
"superclass": {
|
|
1889
|
-
"name": "LitElement",
|
|
1890
|
-
"package": "lit"
|
|
1891
|
-
},
|
|
1892
|
-
"localization": [
|
|
1893
|
-
{
|
|
1894
|
-
"name": "prevMonthLabel",
|
|
1895
|
-
"description": "Accessible label for the previous month button."
|
|
1896
|
-
},
|
|
1897
|
-
{
|
|
1898
|
-
"name": "nextMonthLabel",
|
|
1899
|
-
"description": "Accessible label for the next month button."
|
|
1900
|
-
},
|
|
1901
|
-
{
|
|
1902
|
-
"name": "monthSelectLabel",
|
|
1903
|
-
"description": "Accessible label for the month select."
|
|
1904
|
-
},
|
|
1905
|
-
{
|
|
1906
|
-
"name": "yearSelectLabel",
|
|
1907
|
-
"description": "Accessible label for the year select."
|
|
1908
|
-
}
|
|
1909
|
-
],
|
|
1910
|
-
"status": "ready",
|
|
1911
|
-
"category": "list",
|
|
1912
|
-
"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",
|
|
1913
|
-
"examples": [],
|
|
1914
|
-
"dependencies": [
|
|
1915
|
-
"button",
|
|
1916
|
-
"visually-hidden",
|
|
1917
|
-
"icon"
|
|
1918
|
-
],
|
|
1919
|
-
"tagName": "nord-calendar",
|
|
1920
|
-
"customElement": true
|
|
1921
|
-
}
|
|
1922
|
-
],
|
|
1923
|
-
"exports": [
|
|
1924
|
-
{
|
|
1925
|
-
"kind": "js",
|
|
1926
|
-
"name": "default",
|
|
1927
|
-
"declaration": {
|
|
1928
|
-
"name": "Calendar",
|
|
1929
|
-
"module": "src/calendar/Calendar.ts"
|
|
1930
|
-
}
|
|
1931
|
-
},
|
|
1932
|
-
{
|
|
1933
|
-
"kind": "custom-element-definition",
|
|
1934
|
-
"name": "nord-calendar",
|
|
1935
|
-
"declaration": {
|
|
1936
|
-
"name": "Calendar",
|
|
1937
|
-
"module": "src/calendar/Calendar.ts"
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
]
|
|
1941
|
-
},
|
|
1942
|
-
{
|
|
1943
|
-
"kind": "javascript-module",
|
|
1944
|
-
"path": "src/calendar/DateSelectEvent.ts",
|
|
1945
|
-
"declarations": [
|
|
1946
|
-
{
|
|
1947
|
-
"kind": "class",
|
|
1948
|
-
"description": "",
|
|
1949
|
-
"name": "DateSelectEvent",
|
|
1950
|
-
"superclass": {
|
|
1951
|
-
"name": "NordEvent",
|
|
1952
|
-
"module": "/src/common/events.js"
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
|
-
],
|
|
1956
|
-
"exports": [
|
|
1957
|
-
{
|
|
1958
|
-
"kind": "js",
|
|
1959
|
-
"name": "DateSelectEvent",
|
|
1960
|
-
"declaration": {
|
|
1961
|
-
"name": "DateSelectEvent",
|
|
1962
|
-
"module": "src/calendar/DateSelectEvent.ts"
|
|
1963
|
-
}
|
|
1964
|
-
}
|
|
1965
|
-
]
|
|
1966
|
-
},
|
|
1967
|
-
{
|
|
1968
|
-
"kind": "javascript-module",
|
|
1969
|
-
"path": "src/calendar/localization.ts",
|
|
1970
|
-
"declarations": [
|
|
1971
|
-
{
|
|
1972
|
-
"kind": "variable",
|
|
1973
|
-
"name": "calendarLocalization",
|
|
1974
|
-
"type": {
|
|
1975
|
-
"text": "object"
|
|
1976
|
-
},
|
|
1977
|
-
"default": "{ prevMonthLabel: \"Previous month\", nextMonthLabel: \"Next month\", monthSelectLabel: \"Month\", yearSelectLabel: \"Year\", }"
|
|
1978
|
-
}
|
|
1979
|
-
],
|
|
1980
|
-
"exports": [
|
|
1981
|
-
{
|
|
1982
|
-
"kind": "js",
|
|
1983
|
-
"name": "default",
|
|
1984
|
-
"declaration": {
|
|
1985
|
-
"name": "calendarLocalization",
|
|
1986
|
-
"module": "src/calendar/localization.ts"
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
]
|
|
1990
|
-
},
|
|
1991
|
-
{
|
|
1992
|
-
"kind": "javascript-module",
|
|
1993
|
-
"path": "src/card/Card.ts",
|
|
1994
|
-
"declarations": [
|
|
1995
|
-
{
|
|
1996
|
-
"kind": "class",
|
|
1997
|
-
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
1998
|
-
"name": "Card",
|
|
1999
|
-
"cssProperties": [
|
|
2000
|
-
{
|
|
2001
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
2002
|
-
"name": "--n-card-border-radius",
|
|
2003
|
-
"default": "var(--n-border-radius)"
|
|
2004
|
-
},
|
|
2005
|
-
{
|
|
2006
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
2007
|
-
"name": "--n-card-box-shadow",
|
|
2008
|
-
"default": "var(--n-box-shadow-popout)"
|
|
2009
|
-
},
|
|
2010
|
-
{
|
|
2011
|
-
"description": "Controls the padding on all sides of the card.",
|
|
2012
|
-
"name": "--n-card-padding",
|
|
2013
|
-
"default": "var(--n-space-m)"
|
|
2014
|
-
},
|
|
2015
|
-
{
|
|
2016
|
-
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
2017
|
-
"name": "--n-card-slot-padding",
|
|
2018
|
-
"default": "var(--n-space-m)"
|
|
2019
|
-
}
|
|
2020
|
-
],
|
|
2021
|
-
"slots": [
|
|
2022
|
-
{
|
|
2023
|
-
"description": "The card content.",
|
|
2024
|
-
"name": ""
|
|
2025
|
-
},
|
|
2026
|
-
{
|
|
2027
|
-
"description": "Optional slot that holds a header for the card.",
|
|
2028
|
-
"name": "header"
|
|
2029
|
-
},
|
|
2030
|
-
{
|
|
2031
|
-
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
2032
|
-
"name": "header-end"
|
|
2033
|
-
},
|
|
2034
|
-
{
|
|
2035
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
2036
|
-
"name": "footer"
|
|
2037
|
-
}
|
|
2038
|
-
],
|
|
2039
|
-
"members": [
|
|
2040
|
-
{
|
|
2041
|
-
"kind": "field",
|
|
2042
|
-
"name": "headerSlot",
|
|
2043
|
-
"privacy": "private",
|
|
2044
|
-
"default": "new SlotController(this, \"header\")"
|
|
2045
|
-
},
|
|
2046
|
-
{
|
|
2047
|
-
"kind": "field",
|
|
2048
|
-
"name": "headerEndSlot",
|
|
2049
|
-
"privacy": "private",
|
|
2050
|
-
"default": "new SlotController(this, \"header-end\")"
|
|
2051
|
-
},
|
|
2052
|
-
{
|
|
2053
|
-
"kind": "field",
|
|
2054
|
-
"name": "footerSlot",
|
|
2055
|
-
"privacy": "private",
|
|
2056
|
-
"default": "new SlotController(this, \"footer\")"
|
|
1573
|
+
{
|
|
1574
|
+
"name": "value",
|
|
1575
|
+
"type": {
|
|
1576
|
+
"text": "string"
|
|
1577
|
+
},
|
|
1578
|
+
"default": "\"\"",
|
|
1579
|
+
"description": "The value of the form component.",
|
|
1580
|
+
"fieldName": "value",
|
|
1581
|
+
"inheritedFrom": {
|
|
1582
|
+
"name": "InputMixin",
|
|
1583
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1584
|
+
}
|
|
2057
1585
|
},
|
|
2058
1586
|
{
|
|
2059
|
-
"
|
|
2060
|
-
"name": "padding",
|
|
1587
|
+
"name": "form",
|
|
2061
1588
|
"type": {
|
|
2062
|
-
"text": "
|
|
1589
|
+
"text": "HTMLFormElement | null"
|
|
2063
1590
|
},
|
|
2064
|
-
"
|
|
2065
|
-
"
|
|
2066
|
-
"
|
|
2067
|
-
|
|
1591
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
1592
|
+
"fieldName": "form",
|
|
1593
|
+
"inheritedFrom": {
|
|
1594
|
+
"name": "InputMixin",
|
|
1595
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1596
|
+
}
|
|
2068
1597
|
}
|
|
2069
1598
|
],
|
|
2070
|
-
"
|
|
1599
|
+
"mixins": [
|
|
2071
1600
|
{
|
|
2072
|
-
"name": "
|
|
2073
|
-
"
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
"
|
|
2077
|
-
"
|
|
2078
|
-
"fieldName": "padding"
|
|
1601
|
+
"name": "InputMixin",
|
|
1602
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
"name": "FocusableMixin",
|
|
1606
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
2079
1607
|
}
|
|
2080
1608
|
],
|
|
2081
1609
|
"superclass": {
|
|
@@ -2084,11 +1612,13 @@
|
|
|
2084
1612
|
},
|
|
2085
1613
|
"localization": [],
|
|
2086
1614
|
"status": "ready",
|
|
2087
|
-
"category": "
|
|
2088
|
-
"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-
|
|
1615
|
+
"category": "action",
|
|
1616
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Icon usage in button\n\nIllustrative icons should be always positioned in the `start` slot:\n\n<img src=\"/img/components/button/start-slot.png\" class=\"n-border n-border-radius\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button with icon in start slot\" />\n\nWhen a button is used as a dropdown toggle, the `interface-dropdown-small` icon from [Nordicons](/nordicons/) is automatically placed in the `end` slot:\n\n<img src=\"/img/components/button/dropdown.png\" class=\"n-border n-border-radius\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Dropdown button\" />\n\nEach button size has a recommended icon size. The medium button uses the `s` icon size, the [small button](/components/button/?example=small+buttons) uses the `xs` icon size, and the [large button](/components/button/?example=large+buttons) uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n\n<img src=\"/img/components/button/icon-sizes.png\" class=\"n-border n-border-radius\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button icon sizes\" />\n\nUse `interface-add-small` icon in the `start` slot for create/add type primary actions in the [header](/components/header/):\n\n<img src=\"/img/components/button/create.png\" class=\"n-border n-border-radius\" style=\"max-inline-size:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Create/add type primary action with icon\" />\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n",
|
|
2089
1617
|
"examples": [],
|
|
2090
|
-
"dependencies": [
|
|
2091
|
-
|
|
1618
|
+
"dependencies": [
|
|
1619
|
+
"spinner"
|
|
1620
|
+
],
|
|
1621
|
+
"tagName": "nord-button",
|
|
2092
1622
|
"customElement": true
|
|
2093
1623
|
}
|
|
2094
1624
|
],
|
|
@@ -2097,16 +1627,16 @@
|
|
|
2097
1627
|
"kind": "js",
|
|
2098
1628
|
"name": "default",
|
|
2099
1629
|
"declaration": {
|
|
2100
|
-
"name": "
|
|
2101
|
-
"module": "src/
|
|
1630
|
+
"name": "Button",
|
|
1631
|
+
"module": "src/button/Button.ts"
|
|
2102
1632
|
}
|
|
2103
1633
|
},
|
|
2104
1634
|
{
|
|
2105
1635
|
"kind": "custom-element-definition",
|
|
2106
|
-
"name": "nord-
|
|
1636
|
+
"name": "nord-button",
|
|
2107
1637
|
"declaration": {
|
|
2108
|
-
"name": "
|
|
2109
|
-
"module": "src/
|
|
1638
|
+
"name": "Button",
|
|
1639
|
+
"module": "src/button/Button.ts"
|
|
2110
1640
|
}
|
|
2111
1641
|
}
|
|
2112
1642
|
]
|
|
@@ -2132,20 +1662,230 @@
|
|
|
2132
1662
|
"name": "label"
|
|
2133
1663
|
},
|
|
2134
1664
|
{
|
|
2135
|
-
"description": "Optional slot that holds hint text for the input.",
|
|
2136
|
-
"name": "hint"
|
|
1665
|
+
"description": "Optional slot that holds hint text for the input.",
|
|
1666
|
+
"name": "hint"
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"description": "Optional slot that holds error text for the input.",
|
|
1670
|
+
"name": "error"
|
|
1671
|
+
}
|
|
1672
|
+
],
|
|
1673
|
+
"members": [
|
|
1674
|
+
{
|
|
1675
|
+
"kind": "field",
|
|
1676
|
+
"name": "formValue",
|
|
1677
|
+
"privacy": "protected",
|
|
1678
|
+
"readonly": true,
|
|
1679
|
+
"inheritedFrom": {
|
|
1680
|
+
"name": "FormAssociatedMixin",
|
|
1681
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"kind": "field",
|
|
1686
|
+
"name": "indeterminate",
|
|
1687
|
+
"type": {
|
|
1688
|
+
"text": "boolean"
|
|
1689
|
+
},
|
|
1690
|
+
"default": "false",
|
|
1691
|
+
"description": "Controls whether the checkbox is in an indeterminate state.",
|
|
1692
|
+
"attribute": "indeterminate",
|
|
1693
|
+
"reflects": true
|
|
1694
|
+
},
|
|
1695
|
+
{
|
|
1696
|
+
"kind": "field",
|
|
1697
|
+
"name": "checked",
|
|
1698
|
+
"type": {
|
|
1699
|
+
"text": "boolean"
|
|
1700
|
+
},
|
|
1701
|
+
"default": "false",
|
|
1702
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
1703
|
+
"attribute": "checked",
|
|
1704
|
+
"reflects": true
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
"kind": "method",
|
|
1708
|
+
"name": "handleChange",
|
|
1709
|
+
"privacy": "protected",
|
|
1710
|
+
"parameters": [
|
|
1711
|
+
{
|
|
1712
|
+
"name": "e",
|
|
1713
|
+
"type": {
|
|
1714
|
+
"text": "Event"
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
],
|
|
1718
|
+
"return": {
|
|
1719
|
+
"type": {
|
|
1720
|
+
"text": "void"
|
|
1721
|
+
}
|
|
1722
|
+
},
|
|
1723
|
+
"inheritedFrom": {
|
|
1724
|
+
"name": "FormAssociatedMixin",
|
|
1725
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"kind": "field",
|
|
1730
|
+
"name": "size",
|
|
1731
|
+
"type": {
|
|
1732
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
1733
|
+
},
|
|
1734
|
+
"default": "\"m\"",
|
|
1735
|
+
"description": "The size of the component.",
|
|
1736
|
+
"attribute": "size",
|
|
1737
|
+
"reflects": true,
|
|
1738
|
+
"inheritedFrom": {
|
|
1739
|
+
"name": "SizeMixin",
|
|
1740
|
+
"module": "src/common/mixins/SizeMixin.ts"
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"kind": "field",
|
|
1745
|
+
"name": "labelSlot",
|
|
1746
|
+
"privacy": "protected",
|
|
1747
|
+
"default": "new SlotController(this, \"label\")",
|
|
1748
|
+
"inheritedFrom": {
|
|
1749
|
+
"name": "FormAssociatedMixin",
|
|
1750
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
"kind": "field",
|
|
1755
|
+
"name": "errorSlot",
|
|
1756
|
+
"privacy": "protected",
|
|
1757
|
+
"default": "new SlotController(this, \"error\")",
|
|
1758
|
+
"inheritedFrom": {
|
|
1759
|
+
"name": "FormAssociatedMixin",
|
|
1760
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1761
|
+
}
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
"kind": "field",
|
|
1765
|
+
"name": "hintSlot",
|
|
1766
|
+
"privacy": "protected",
|
|
1767
|
+
"default": "new SlotController(this, \"hint\")",
|
|
1768
|
+
"inheritedFrom": {
|
|
1769
|
+
"name": "FormAssociatedMixin",
|
|
1770
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1771
|
+
}
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
"kind": "field",
|
|
1775
|
+
"name": "formData",
|
|
1776
|
+
"privacy": "protected",
|
|
1777
|
+
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
1778
|
+
"inheritedFrom": {
|
|
1779
|
+
"name": "FormAssociatedMixin",
|
|
1780
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
"kind": "field",
|
|
1785
|
+
"name": "inputId",
|
|
1786
|
+
"type": {
|
|
1787
|
+
"text": "string"
|
|
1788
|
+
},
|
|
1789
|
+
"privacy": "protected",
|
|
1790
|
+
"default": "\"input\"",
|
|
1791
|
+
"inheritedFrom": {
|
|
1792
|
+
"name": "FormAssociatedMixin",
|
|
1793
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
"kind": "field",
|
|
1798
|
+
"name": "errorId",
|
|
1799
|
+
"type": {
|
|
1800
|
+
"text": "string"
|
|
1801
|
+
},
|
|
1802
|
+
"privacy": "protected",
|
|
1803
|
+
"default": "\"error\"",
|
|
1804
|
+
"inheritedFrom": {
|
|
1805
|
+
"name": "FormAssociatedMixin",
|
|
1806
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"kind": "field",
|
|
1811
|
+
"name": "hintId",
|
|
1812
|
+
"type": {
|
|
1813
|
+
"text": "string"
|
|
1814
|
+
},
|
|
1815
|
+
"privacy": "protected",
|
|
1816
|
+
"default": "\"hint\"",
|
|
1817
|
+
"inheritedFrom": {
|
|
1818
|
+
"name": "FormAssociatedMixin",
|
|
1819
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
{
|
|
1823
|
+
"kind": "field",
|
|
1824
|
+
"name": "label",
|
|
1825
|
+
"type": {
|
|
1826
|
+
"text": "string"
|
|
1827
|
+
},
|
|
1828
|
+
"default": "\"\"",
|
|
1829
|
+
"description": "Label for the input.",
|
|
1830
|
+
"attribute": "label",
|
|
1831
|
+
"reflects": true,
|
|
1832
|
+
"inheritedFrom": {
|
|
1833
|
+
"name": "FormAssociatedMixin",
|
|
1834
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
{
|
|
1838
|
+
"kind": "field",
|
|
1839
|
+
"name": "hint",
|
|
1840
|
+
"type": {
|
|
1841
|
+
"text": "string | undefined"
|
|
1842
|
+
},
|
|
1843
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
1844
|
+
"attribute": "hint",
|
|
1845
|
+
"reflects": true,
|
|
1846
|
+
"inheritedFrom": {
|
|
1847
|
+
"name": "FormAssociatedMixin",
|
|
1848
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"kind": "field",
|
|
1853
|
+
"name": "hideLabel",
|
|
1854
|
+
"type": {
|
|
1855
|
+
"text": "boolean"
|
|
1856
|
+
},
|
|
1857
|
+
"default": "false",
|
|
1858
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
1859
|
+
"attribute": "hide-label",
|
|
1860
|
+
"reflects": true,
|
|
1861
|
+
"inheritedFrom": {
|
|
1862
|
+
"name": "FormAssociatedMixin",
|
|
1863
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
"kind": "field",
|
|
1868
|
+
"name": "placeholder",
|
|
1869
|
+
"type": {
|
|
1870
|
+
"text": "string | undefined"
|
|
1871
|
+
},
|
|
1872
|
+
"description": "Placeholder text to display within the input.",
|
|
1873
|
+
"attribute": "placeholder",
|
|
1874
|
+
"reflects": true,
|
|
1875
|
+
"inheritedFrom": {
|
|
1876
|
+
"name": "FormAssociatedMixin",
|
|
1877
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1878
|
+
}
|
|
2137
1879
|
},
|
|
2138
|
-
{
|
|
2139
|
-
"description": "Optional slot that holds error text for the input.",
|
|
2140
|
-
"name": "error"
|
|
2141
|
-
}
|
|
2142
|
-
],
|
|
2143
|
-
"members": [
|
|
2144
1880
|
{
|
|
2145
1881
|
"kind": "field",
|
|
2146
|
-
"name": "
|
|
2147
|
-
"
|
|
2148
|
-
|
|
1882
|
+
"name": "error",
|
|
1883
|
+
"type": {
|
|
1884
|
+
"text": "string | undefined"
|
|
1885
|
+
},
|
|
1886
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
1887
|
+
"attribute": "error",
|
|
1888
|
+
"reflects": true,
|
|
2149
1889
|
"inheritedFrom": {
|
|
2150
1890
|
"name": "FormAssociatedMixin",
|
|
2151
1891
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -2153,29 +1893,37 @@
|
|
|
2153
1893
|
},
|
|
2154
1894
|
{
|
|
2155
1895
|
"kind": "field",
|
|
2156
|
-
"name": "
|
|
1896
|
+
"name": "required",
|
|
2157
1897
|
"type": {
|
|
2158
1898
|
"text": "boolean"
|
|
2159
1899
|
},
|
|
2160
1900
|
"default": "false",
|
|
2161
|
-
"description": "
|
|
2162
|
-
"attribute": "
|
|
2163
|
-
"reflects": true
|
|
1901
|
+
"description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
1902
|
+
"attribute": "required",
|
|
1903
|
+
"reflects": true,
|
|
1904
|
+
"inheritedFrom": {
|
|
1905
|
+
"name": "FormAssociatedMixin",
|
|
1906
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1907
|
+
}
|
|
2164
1908
|
},
|
|
2165
1909
|
{
|
|
2166
1910
|
"kind": "field",
|
|
2167
|
-
"name": "
|
|
1911
|
+
"name": "hideRequired",
|
|
2168
1912
|
"type": {
|
|
2169
1913
|
"text": "boolean"
|
|
2170
1914
|
},
|
|
2171
1915
|
"default": "false",
|
|
2172
|
-
"description": "
|
|
2173
|
-
"attribute": "
|
|
2174
|
-
"reflects": true
|
|
1916
|
+
"description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
|
|
1917
|
+
"attribute": "hide-required",
|
|
1918
|
+
"reflects": true,
|
|
1919
|
+
"inheritedFrom": {
|
|
1920
|
+
"name": "FormAssociatedMixin",
|
|
1921
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1922
|
+
}
|
|
2175
1923
|
},
|
|
2176
1924
|
{
|
|
2177
1925
|
"kind": "method",
|
|
2178
|
-
"name": "
|
|
1926
|
+
"name": "handleInput",
|
|
2179
1927
|
"privacy": "protected",
|
|
2180
1928
|
"parameters": [
|
|
2181
1929
|
{
|
|
@@ -2185,46 +1933,51 @@
|
|
|
2185
1933
|
}
|
|
2186
1934
|
}
|
|
2187
1935
|
],
|
|
2188
|
-
"
|
|
2189
|
-
"
|
|
2190
|
-
|
|
1936
|
+
"inheritedFrom": {
|
|
1937
|
+
"name": "FormAssociatedMixin",
|
|
1938
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1939
|
+
}
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
"kind": "method",
|
|
1943
|
+
"name": "renderLabel",
|
|
1944
|
+
"privacy": "protected",
|
|
1945
|
+
"parameters": [
|
|
1946
|
+
{
|
|
1947
|
+
"name": "additionalContent",
|
|
1948
|
+
"optional": true,
|
|
1949
|
+
"type": {
|
|
1950
|
+
"text": "TemplateResult"
|
|
1951
|
+
}
|
|
2191
1952
|
}
|
|
2192
|
-
|
|
1953
|
+
],
|
|
2193
1954
|
"inheritedFrom": {
|
|
2194
1955
|
"name": "FormAssociatedMixin",
|
|
2195
1956
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2196
1957
|
}
|
|
2197
1958
|
},
|
|
2198
1959
|
{
|
|
2199
|
-
"kind": "
|
|
2200
|
-
"name": "
|
|
2201
|
-
"
|
|
2202
|
-
"text": "\"s\" | \"m\" | \"l\""
|
|
2203
|
-
},
|
|
2204
|
-
"default": "\"m\"",
|
|
2205
|
-
"description": "The size of the component.",
|
|
2206
|
-
"attribute": "size",
|
|
2207
|
-
"reflects": true,
|
|
1960
|
+
"kind": "method",
|
|
1961
|
+
"name": "renderError",
|
|
1962
|
+
"privacy": "protected",
|
|
2208
1963
|
"inheritedFrom": {
|
|
2209
|
-
"name": "
|
|
2210
|
-
"module": "src/common/mixins/
|
|
1964
|
+
"name": "FormAssociatedMixin",
|
|
1965
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2211
1966
|
}
|
|
2212
1967
|
},
|
|
2213
1968
|
{
|
|
2214
|
-
"kind": "
|
|
2215
|
-
"name": "
|
|
1969
|
+
"kind": "method",
|
|
1970
|
+
"name": "getDescribedBy",
|
|
2216
1971
|
"privacy": "protected",
|
|
2217
|
-
"default": "new SlotController(this, \"label\")",
|
|
2218
1972
|
"inheritedFrom": {
|
|
2219
1973
|
"name": "FormAssociatedMixin",
|
|
2220
1974
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2221
1975
|
}
|
|
2222
1976
|
},
|
|
2223
1977
|
{
|
|
2224
|
-
"kind": "
|
|
2225
|
-
"name": "
|
|
1978
|
+
"kind": "method",
|
|
1979
|
+
"name": "getInvalid",
|
|
2226
1980
|
"privacy": "protected",
|
|
2227
|
-
"default": "new SlotController(this, \"error\")",
|
|
2228
1981
|
"inheritedFrom": {
|
|
2229
1982
|
"name": "FormAssociatedMixin",
|
|
2230
1983
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -2232,9 +1985,9 @@
|
|
|
2232
1985
|
},
|
|
2233
1986
|
{
|
|
2234
1987
|
"kind": "field",
|
|
2235
|
-
"name": "
|
|
1988
|
+
"name": "hasHint",
|
|
2236
1989
|
"privacy": "protected",
|
|
2237
|
-
"
|
|
1990
|
+
"readonly": true,
|
|
2238
1991
|
"inheritedFrom": {
|
|
2239
1992
|
"name": "FormAssociatedMixin",
|
|
2240
1993
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -2242,9 +1995,9 @@
|
|
|
2242
1995
|
},
|
|
2243
1996
|
{
|
|
2244
1997
|
"kind": "field",
|
|
2245
|
-
"name": "
|
|
1998
|
+
"name": "hasError",
|
|
2246
1999
|
"privacy": "protected",
|
|
2247
|
-
"
|
|
2000
|
+
"readonly": true,
|
|
2248
2001
|
"inheritedFrom": {
|
|
2249
2002
|
"name": "FormAssociatedMixin",
|
|
2250
2003
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -2252,736 +2005,934 @@
|
|
|
2252
2005
|
},
|
|
2253
2006
|
{
|
|
2254
2007
|
"kind": "field",
|
|
2255
|
-
"name": "
|
|
2008
|
+
"name": "disabled",
|
|
2009
|
+
"type": {
|
|
2010
|
+
"text": "boolean"
|
|
2011
|
+
},
|
|
2012
|
+
"default": "false",
|
|
2013
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
2014
|
+
"attribute": "disabled",
|
|
2015
|
+
"reflects": true,
|
|
2016
|
+
"inheritedFrom": {
|
|
2017
|
+
"name": "InputMixin",
|
|
2018
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2019
|
+
}
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
"kind": "field",
|
|
2023
|
+
"name": "name",
|
|
2024
|
+
"type": {
|
|
2025
|
+
"text": "string | undefined"
|
|
2026
|
+
},
|
|
2027
|
+
"description": "The name of the form component.",
|
|
2028
|
+
"attribute": "name",
|
|
2029
|
+
"reflects": true,
|
|
2030
|
+
"inheritedFrom": {
|
|
2031
|
+
"name": "InputMixin",
|
|
2032
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2033
|
+
}
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
"kind": "field",
|
|
2037
|
+
"name": "value",
|
|
2256
2038
|
"type": {
|
|
2257
2039
|
"text": "string"
|
|
2258
2040
|
},
|
|
2041
|
+
"default": "\"\"",
|
|
2042
|
+
"description": "The value of the form component.",
|
|
2043
|
+
"attribute": "value",
|
|
2044
|
+
"inheritedFrom": {
|
|
2045
|
+
"name": "InputMixin",
|
|
2046
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
{
|
|
2050
|
+
"kind": "field",
|
|
2051
|
+
"name": "formAncestor",
|
|
2052
|
+
"type": {
|
|
2053
|
+
"text": "HTMLFormElement | null"
|
|
2054
|
+
},
|
|
2055
|
+
"privacy": "private",
|
|
2056
|
+
"default": "null",
|
|
2057
|
+
"inheritedFrom": {
|
|
2058
|
+
"name": "InputMixin",
|
|
2059
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
"kind": "field",
|
|
2064
|
+
"name": "_formId",
|
|
2065
|
+
"type": {
|
|
2066
|
+
"text": "string | undefined"
|
|
2067
|
+
},
|
|
2259
2068
|
"privacy": "protected",
|
|
2260
|
-
"default": "\"input\"",
|
|
2261
2069
|
"inheritedFrom": {
|
|
2262
|
-
"name": "
|
|
2263
|
-
"module": "src/common/mixins/
|
|
2070
|
+
"name": "InputMixin",
|
|
2071
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2264
2072
|
}
|
|
2265
2073
|
},
|
|
2266
2074
|
{
|
|
2267
2075
|
"kind": "field",
|
|
2268
|
-
"name": "
|
|
2076
|
+
"name": "form",
|
|
2269
2077
|
"type": {
|
|
2270
|
-
"text": "
|
|
2078
|
+
"text": "HTMLFormElement | null"
|
|
2271
2079
|
},
|
|
2080
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
2081
|
+
"attribute": "form",
|
|
2082
|
+
"inheritedFrom": {
|
|
2083
|
+
"name": "InputMixin",
|
|
2084
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
"kind": "field",
|
|
2089
|
+
"name": "focusableRef",
|
|
2272
2090
|
"privacy": "protected",
|
|
2273
|
-
"default": "\"error\"",
|
|
2274
2091
|
"inheritedFrom": {
|
|
2275
|
-
"name": "
|
|
2276
|
-
"module": "src/common/mixins/
|
|
2092
|
+
"name": "FocusableMixin",
|
|
2093
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2094
|
+
}
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
"kind": "method",
|
|
2098
|
+
"name": "focus",
|
|
2099
|
+
"parameters": [
|
|
2100
|
+
{
|
|
2101
|
+
"name": "options",
|
|
2102
|
+
"optional": true,
|
|
2103
|
+
"type": {
|
|
2104
|
+
"text": "FocusOptions"
|
|
2105
|
+
},
|
|
2106
|
+
"description": "An object which controls aspects of the focusing process."
|
|
2107
|
+
}
|
|
2108
|
+
],
|
|
2109
|
+
"description": "Programmatically move focus to the component.",
|
|
2110
|
+
"inheritedFrom": {
|
|
2111
|
+
"name": "FocusableMixin",
|
|
2112
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
"kind": "method",
|
|
2117
|
+
"name": "blur",
|
|
2118
|
+
"description": "Programmatically remove focus from the component.",
|
|
2119
|
+
"inheritedFrom": {
|
|
2120
|
+
"name": "FocusableMixin",
|
|
2121
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2122
|
+
}
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
"kind": "method",
|
|
2126
|
+
"name": "click",
|
|
2127
|
+
"description": "Programmatically simulates a click on the component.",
|
|
2128
|
+
"inheritedFrom": {
|
|
2129
|
+
"name": "FocusableMixin",
|
|
2130
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2277
2131
|
}
|
|
2132
|
+
}
|
|
2133
|
+
],
|
|
2134
|
+
"attributes": [
|
|
2135
|
+
{
|
|
2136
|
+
"name": "indeterminate",
|
|
2137
|
+
"type": {
|
|
2138
|
+
"text": "boolean"
|
|
2139
|
+
},
|
|
2140
|
+
"default": "false",
|
|
2141
|
+
"description": "Controls whether the checkbox is in an indeterminate state.",
|
|
2142
|
+
"fieldName": "indeterminate"
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
"name": "checked",
|
|
2146
|
+
"type": {
|
|
2147
|
+
"text": "boolean"
|
|
2148
|
+
},
|
|
2149
|
+
"default": "false",
|
|
2150
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
2151
|
+
"fieldName": "checked"
|
|
2278
2152
|
},
|
|
2279
2153
|
{
|
|
2280
|
-
"
|
|
2281
|
-
"name": "hintId",
|
|
2154
|
+
"name": "size",
|
|
2282
2155
|
"type": {
|
|
2283
|
-
"text": "
|
|
2156
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
2284
2157
|
},
|
|
2285
|
-
"
|
|
2286
|
-
"
|
|
2158
|
+
"default": "\"m\"",
|
|
2159
|
+
"description": "The size of the component.",
|
|
2160
|
+
"fieldName": "size",
|
|
2287
2161
|
"inheritedFrom": {
|
|
2288
|
-
"name": "
|
|
2289
|
-
"module": "src/common/mixins/
|
|
2162
|
+
"name": "SizeMixin",
|
|
2163
|
+
"module": "src/common/mixins/SizeMixin.ts"
|
|
2290
2164
|
}
|
|
2291
2165
|
},
|
|
2292
2166
|
{
|
|
2293
|
-
"kind": "field",
|
|
2294
2167
|
"name": "label",
|
|
2295
2168
|
"type": {
|
|
2296
2169
|
"text": "string"
|
|
2297
2170
|
},
|
|
2298
2171
|
"default": "\"\"",
|
|
2299
2172
|
"description": "Label for the input.",
|
|
2300
|
-
"
|
|
2301
|
-
"reflects": true,
|
|
2173
|
+
"fieldName": "label",
|
|
2302
2174
|
"inheritedFrom": {
|
|
2303
2175
|
"name": "FormAssociatedMixin",
|
|
2304
2176
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2305
2177
|
}
|
|
2306
2178
|
},
|
|
2307
2179
|
{
|
|
2308
|
-
"kind": "field",
|
|
2309
2180
|
"name": "hint",
|
|
2310
2181
|
"type": {
|
|
2311
2182
|
"text": "string | undefined"
|
|
2312
2183
|
},
|
|
2313
2184
|
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
2314
|
-
"
|
|
2315
|
-
"reflects": true,
|
|
2185
|
+
"fieldName": "hint",
|
|
2316
2186
|
"inheritedFrom": {
|
|
2317
2187
|
"name": "FormAssociatedMixin",
|
|
2318
2188
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2319
2189
|
}
|
|
2320
2190
|
},
|
|
2321
2191
|
{
|
|
2322
|
-
"
|
|
2323
|
-
"name": "hideLabel",
|
|
2192
|
+
"name": "hide-label",
|
|
2324
2193
|
"type": {
|
|
2325
2194
|
"text": "boolean"
|
|
2326
2195
|
},
|
|
2327
2196
|
"default": "false",
|
|
2328
2197
|
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
2329
|
-
"
|
|
2330
|
-
"reflects": true,
|
|
2198
|
+
"fieldName": "hideLabel",
|
|
2331
2199
|
"inheritedFrom": {
|
|
2332
2200
|
"name": "FormAssociatedMixin",
|
|
2333
2201
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2334
2202
|
}
|
|
2335
2203
|
},
|
|
2336
2204
|
{
|
|
2337
|
-
"kind": "field",
|
|
2338
2205
|
"name": "placeholder",
|
|
2339
2206
|
"type": {
|
|
2340
2207
|
"text": "string | undefined"
|
|
2341
2208
|
},
|
|
2342
2209
|
"description": "Placeholder text to display within the input.",
|
|
2343
|
-
"
|
|
2344
|
-
"reflects": true,
|
|
2210
|
+
"fieldName": "placeholder",
|
|
2345
2211
|
"inheritedFrom": {
|
|
2346
2212
|
"name": "FormAssociatedMixin",
|
|
2347
2213
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2348
2214
|
}
|
|
2349
2215
|
},
|
|
2350
2216
|
{
|
|
2351
|
-
"kind": "field",
|
|
2352
2217
|
"name": "error",
|
|
2353
2218
|
"type": {
|
|
2354
2219
|
"text": "string | undefined"
|
|
2355
2220
|
},
|
|
2356
2221
|
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
2357
|
-
"
|
|
2358
|
-
"reflects": true,
|
|
2222
|
+
"fieldName": "error",
|
|
2359
2223
|
"inheritedFrom": {
|
|
2360
2224
|
"name": "FormAssociatedMixin",
|
|
2361
2225
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2362
2226
|
}
|
|
2363
2227
|
},
|
|
2364
2228
|
{
|
|
2365
|
-
"kind": "field",
|
|
2366
2229
|
"name": "required",
|
|
2367
2230
|
"type": {
|
|
2368
2231
|
"text": "boolean"
|
|
2369
2232
|
},
|
|
2370
2233
|
"default": "false",
|
|
2371
2234
|
"description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
2372
|
-
"
|
|
2373
|
-
"reflects": true,
|
|
2235
|
+
"fieldName": "required",
|
|
2374
2236
|
"inheritedFrom": {
|
|
2375
2237
|
"name": "FormAssociatedMixin",
|
|
2376
2238
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2377
2239
|
}
|
|
2378
2240
|
},
|
|
2379
2241
|
{
|
|
2380
|
-
"
|
|
2381
|
-
"name": "hideRequired",
|
|
2242
|
+
"name": "hide-required",
|
|
2382
2243
|
"type": {
|
|
2383
2244
|
"text": "boolean"
|
|
2384
2245
|
},
|
|
2385
2246
|
"default": "false",
|
|
2386
2247
|
"description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
|
|
2387
|
-
"
|
|
2388
|
-
"reflects": true,
|
|
2248
|
+
"fieldName": "hideRequired",
|
|
2389
2249
|
"inheritedFrom": {
|
|
2390
2250
|
"name": "FormAssociatedMixin",
|
|
2391
2251
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2392
2252
|
}
|
|
2393
2253
|
},
|
|
2394
2254
|
{
|
|
2395
|
-
"
|
|
2396
|
-
"
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
"text": "Event"
|
|
2403
|
-
}
|
|
2404
|
-
}
|
|
2405
|
-
],
|
|
2255
|
+
"name": "disabled",
|
|
2256
|
+
"type": {
|
|
2257
|
+
"text": "boolean"
|
|
2258
|
+
},
|
|
2259
|
+
"default": "false",
|
|
2260
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
2261
|
+
"fieldName": "disabled",
|
|
2406
2262
|
"inheritedFrom": {
|
|
2407
|
-
"name": "
|
|
2408
|
-
"module": "src/common/mixins/
|
|
2263
|
+
"name": "InputMixin",
|
|
2264
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2409
2265
|
}
|
|
2410
2266
|
},
|
|
2411
2267
|
{
|
|
2412
|
-
"
|
|
2413
|
-
"
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
"optional": true,
|
|
2419
|
-
"type": {
|
|
2420
|
-
"text": "TemplateResult"
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
],
|
|
2268
|
+
"name": "name",
|
|
2269
|
+
"type": {
|
|
2270
|
+
"text": "string | undefined"
|
|
2271
|
+
},
|
|
2272
|
+
"description": "The name of the form component.",
|
|
2273
|
+
"fieldName": "name",
|
|
2424
2274
|
"inheritedFrom": {
|
|
2425
|
-
"name": "
|
|
2426
|
-
"module": "src/common/mixins/
|
|
2275
|
+
"name": "InputMixin",
|
|
2276
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2427
2277
|
}
|
|
2428
2278
|
},
|
|
2429
2279
|
{
|
|
2430
|
-
"
|
|
2431
|
-
"
|
|
2432
|
-
|
|
2280
|
+
"name": "value",
|
|
2281
|
+
"type": {
|
|
2282
|
+
"text": "string"
|
|
2283
|
+
},
|
|
2284
|
+
"default": "\"\"",
|
|
2285
|
+
"description": "The value of the form component.",
|
|
2286
|
+
"fieldName": "value",
|
|
2433
2287
|
"inheritedFrom": {
|
|
2434
|
-
"name": "
|
|
2435
|
-
"module": "src/common/mixins/
|
|
2288
|
+
"name": "InputMixin",
|
|
2289
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2436
2290
|
}
|
|
2437
2291
|
},
|
|
2438
2292
|
{
|
|
2439
|
-
"
|
|
2440
|
-
"
|
|
2441
|
-
|
|
2293
|
+
"name": "form",
|
|
2294
|
+
"type": {
|
|
2295
|
+
"text": "HTMLFormElement | null"
|
|
2296
|
+
},
|
|
2297
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
2298
|
+
"fieldName": "form",
|
|
2442
2299
|
"inheritedFrom": {
|
|
2443
|
-
"name": "
|
|
2444
|
-
"module": "src/common/mixins/
|
|
2300
|
+
"name": "InputMixin",
|
|
2301
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
2445
2302
|
}
|
|
2303
|
+
}
|
|
2304
|
+
],
|
|
2305
|
+
"mixins": [
|
|
2306
|
+
{
|
|
2307
|
+
"name": "SizeMixin",
|
|
2308
|
+
"module": "/src/common/mixins/SizeMixin.js"
|
|
2446
2309
|
},
|
|
2447
2310
|
{
|
|
2448
|
-
"
|
|
2449
|
-
"
|
|
2450
|
-
|
|
2311
|
+
"name": "FormAssociatedMixin",
|
|
2312
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
"name": "InputMixin",
|
|
2316
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"name": "FocusableMixin",
|
|
2320
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
2321
|
+
}
|
|
2322
|
+
],
|
|
2323
|
+
"superclass": {
|
|
2324
|
+
"name": "LitElement",
|
|
2325
|
+
"package": "lit"
|
|
2326
|
+
},
|
|
2327
|
+
"localization": [],
|
|
2328
|
+
"status": "ready",
|
|
2329
|
+
"category": "form",
|
|
2330
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n",
|
|
2331
|
+
"examples": [],
|
|
2332
|
+
"dependencies": [
|
|
2333
|
+
"icon"
|
|
2334
|
+
],
|
|
2335
|
+
"tagName": "nord-checkbox",
|
|
2336
|
+
"customElement": true,
|
|
2337
|
+
"events": [
|
|
2338
|
+
{
|
|
2339
|
+
"name": "input",
|
|
2340
|
+
"type": {
|
|
2341
|
+
"text": "NordEvent"
|
|
2342
|
+
},
|
|
2343
|
+
"description": "Fired as the user types into the input.",
|
|
2451
2344
|
"inheritedFrom": {
|
|
2452
2345
|
"name": "FormAssociatedMixin",
|
|
2453
2346
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2454
2347
|
}
|
|
2455
2348
|
},
|
|
2456
2349
|
{
|
|
2457
|
-
"
|
|
2458
|
-
"
|
|
2459
|
-
|
|
2460
|
-
|
|
2350
|
+
"name": "change",
|
|
2351
|
+
"type": {
|
|
2352
|
+
"text": "NordEvent"
|
|
2353
|
+
},
|
|
2354
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
2461
2355
|
"inheritedFrom": {
|
|
2462
2356
|
"name": "FormAssociatedMixin",
|
|
2463
2357
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2464
2358
|
}
|
|
2359
|
+
}
|
|
2360
|
+
]
|
|
2361
|
+
}
|
|
2362
|
+
],
|
|
2363
|
+
"exports": [
|
|
2364
|
+
{
|
|
2365
|
+
"kind": "js",
|
|
2366
|
+
"name": "default",
|
|
2367
|
+
"declaration": {
|
|
2368
|
+
"name": "Checkbox",
|
|
2369
|
+
"module": "src/checkbox/Checkbox.ts"
|
|
2370
|
+
}
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"kind": "custom-element-definition",
|
|
2374
|
+
"name": "nord-checkbox",
|
|
2375
|
+
"declaration": {
|
|
2376
|
+
"name": "Checkbox",
|
|
2377
|
+
"module": "src/checkbox/Checkbox.ts"
|
|
2378
|
+
}
|
|
2379
|
+
}
|
|
2380
|
+
]
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"kind": "javascript-module",
|
|
2384
|
+
"path": "src/card/Card.ts",
|
|
2385
|
+
"declarations": [
|
|
2386
|
+
{
|
|
2387
|
+
"kind": "class",
|
|
2388
|
+
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
2389
|
+
"name": "Card",
|
|
2390
|
+
"cssProperties": [
|
|
2391
|
+
{
|
|
2392
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
2393
|
+
"name": "--n-card-border-radius",
|
|
2394
|
+
"default": "var(--n-border-radius)"
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
2398
|
+
"name": "--n-card-box-shadow",
|
|
2399
|
+
"default": "var(--n-box-shadow-popout)"
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
"description": "Controls the padding on all sides of the card.",
|
|
2403
|
+
"name": "--n-card-padding",
|
|
2404
|
+
"default": "var(--n-space-m)"
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
2408
|
+
"name": "--n-card-slot-padding",
|
|
2409
|
+
"default": "var(--n-space-m)"
|
|
2410
|
+
}
|
|
2411
|
+
],
|
|
2412
|
+
"slots": [
|
|
2413
|
+
{
|
|
2414
|
+
"description": "The card content.",
|
|
2415
|
+
"name": ""
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"description": "Optional slot that holds a header for the card.",
|
|
2419
|
+
"name": "header"
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
2423
|
+
"name": "header-end"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
2427
|
+
"name": "footer"
|
|
2428
|
+
}
|
|
2429
|
+
],
|
|
2430
|
+
"members": [
|
|
2431
|
+
{
|
|
2432
|
+
"kind": "field",
|
|
2433
|
+
"name": "headerSlot",
|
|
2434
|
+
"privacy": "private",
|
|
2435
|
+
"default": "new SlotController(this, \"header\")"
|
|
2465
2436
|
},
|
|
2466
2437
|
{
|
|
2467
2438
|
"kind": "field",
|
|
2468
|
-
"name": "
|
|
2469
|
-
"privacy": "
|
|
2470
|
-
"
|
|
2471
|
-
"inheritedFrom": {
|
|
2472
|
-
"name": "FormAssociatedMixin",
|
|
2473
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2474
|
-
}
|
|
2439
|
+
"name": "headerEndSlot",
|
|
2440
|
+
"privacy": "private",
|
|
2441
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
2475
2442
|
},
|
|
2476
2443
|
{
|
|
2477
2444
|
"kind": "field",
|
|
2478
|
-
"name": "
|
|
2479
|
-
"
|
|
2480
|
-
|
|
2481
|
-
},
|
|
2482
|
-
"default": "false",
|
|
2483
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
2484
|
-
"attribute": "disabled",
|
|
2485
|
-
"reflects": true,
|
|
2486
|
-
"inheritedFrom": {
|
|
2487
|
-
"name": "InputMixin",
|
|
2488
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2489
|
-
}
|
|
2445
|
+
"name": "footerSlot",
|
|
2446
|
+
"privacy": "private",
|
|
2447
|
+
"default": "new SlotController(this, \"footer\")"
|
|
2490
2448
|
},
|
|
2491
2449
|
{
|
|
2492
2450
|
"kind": "field",
|
|
2493
|
-
"name": "
|
|
2451
|
+
"name": "padding",
|
|
2494
2452
|
"type": {
|
|
2495
|
-
"text": "
|
|
2453
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
2496
2454
|
},
|
|
2497
|
-
"
|
|
2498
|
-
"
|
|
2499
|
-
"
|
|
2500
|
-
"
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
},
|
|
2455
|
+
"default": "\"m\"",
|
|
2456
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2457
|
+
"attribute": "padding",
|
|
2458
|
+
"reflects": true
|
|
2459
|
+
}
|
|
2460
|
+
],
|
|
2461
|
+
"attributes": [
|
|
2505
2462
|
{
|
|
2506
|
-
"
|
|
2507
|
-
"name": "value",
|
|
2463
|
+
"name": "padding",
|
|
2508
2464
|
"type": {
|
|
2509
|
-
"text": "
|
|
2465
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
2510
2466
|
},
|
|
2511
|
-
"default": "\"\"",
|
|
2512
|
-
"description": "
|
|
2513
|
-
"
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2467
|
+
"default": "\"m\"",
|
|
2468
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2469
|
+
"fieldName": "padding"
|
|
2470
|
+
}
|
|
2471
|
+
],
|
|
2472
|
+
"superclass": {
|
|
2473
|
+
"name": "LitElement",
|
|
2474
|
+
"package": "lit"
|
|
2475
|
+
},
|
|
2476
|
+
"localization": [],
|
|
2477
|
+
"status": "ready",
|
|
2478
|
+
"category": "structure",
|
|
2479
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to 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",
|
|
2480
|
+
"examples": [],
|
|
2481
|
+
"dependencies": [],
|
|
2482
|
+
"tagName": "nord-card",
|
|
2483
|
+
"customElement": true
|
|
2484
|
+
}
|
|
2485
|
+
],
|
|
2486
|
+
"exports": [
|
|
2487
|
+
{
|
|
2488
|
+
"kind": "js",
|
|
2489
|
+
"name": "default",
|
|
2490
|
+
"declaration": {
|
|
2491
|
+
"name": "Card",
|
|
2492
|
+
"module": "src/card/Card.ts"
|
|
2493
|
+
}
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
"kind": "custom-element-definition",
|
|
2497
|
+
"name": "nord-card",
|
|
2498
|
+
"declaration": {
|
|
2499
|
+
"name": "Card",
|
|
2500
|
+
"module": "src/card/Card.ts"
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
]
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
"kind": "javascript-module",
|
|
2507
|
+
"path": "src/calendar/Calendar.ts",
|
|
2508
|
+
"declarations": [
|
|
2509
|
+
{
|
|
2510
|
+
"kind": "class",
|
|
2511
|
+
"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.",
|
|
2512
|
+
"name": "Calendar",
|
|
2513
|
+
"cssProperties": [
|
|
2514
|
+
{
|
|
2515
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
2516
|
+
"name": "--n-calendar-border-radius",
|
|
2517
|
+
"default": "var(--n-border-radius)"
|
|
2518
2518
|
},
|
|
2519
|
+
{
|
|
2520
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
2521
|
+
"name": "--n-calendar-box-shadow",
|
|
2522
|
+
"default": "var(--n-box-shadow-popout)"
|
|
2523
|
+
}
|
|
2524
|
+
],
|
|
2525
|
+
"members": [
|
|
2519
2526
|
{
|
|
2520
2527
|
"kind": "field",
|
|
2521
|
-
"name": "
|
|
2528
|
+
"name": "monthSelectNode",
|
|
2522
2529
|
"type": {
|
|
2523
|
-
"text": "
|
|
2530
|
+
"text": "HTMLElement"
|
|
2524
2531
|
},
|
|
2525
|
-
"privacy": "private"
|
|
2526
|
-
"default": "null",
|
|
2527
|
-
"inheritedFrom": {
|
|
2528
|
-
"name": "InputMixin",
|
|
2529
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2530
|
-
}
|
|
2532
|
+
"privacy": "private"
|
|
2531
2533
|
},
|
|
2532
2534
|
{
|
|
2533
2535
|
"kind": "field",
|
|
2534
|
-
"name": "
|
|
2536
|
+
"name": "focusedDayNode",
|
|
2535
2537
|
"type": {
|
|
2536
|
-
"text": "
|
|
2538
|
+
"text": "HTMLButtonElement"
|
|
2537
2539
|
},
|
|
2538
|
-
"privacy": "
|
|
2539
|
-
"inheritedFrom": {
|
|
2540
|
-
"name": "InputMixin",
|
|
2541
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2542
|
-
}
|
|
2540
|
+
"privacy": "private"
|
|
2543
2541
|
},
|
|
2544
2542
|
{
|
|
2545
2543
|
"kind": "field",
|
|
2546
|
-
"name": "
|
|
2547
|
-
"
|
|
2548
|
-
|
|
2549
|
-
},
|
|
2550
|
-
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
2551
|
-
"attribute": "form",
|
|
2552
|
-
"inheritedFrom": {
|
|
2553
|
-
"name": "InputMixin",
|
|
2554
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2555
|
-
}
|
|
2544
|
+
"name": "direction",
|
|
2545
|
+
"privacy": "private",
|
|
2546
|
+
"default": "new DirectionController(this)"
|
|
2556
2547
|
},
|
|
2557
2548
|
{
|
|
2558
2549
|
"kind": "field",
|
|
2559
|
-
"name": "
|
|
2560
|
-
"privacy": "
|
|
2561
|
-
"
|
|
2562
|
-
"name": "FocusableMixin",
|
|
2563
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2564
|
-
}
|
|
2550
|
+
"name": "swipe",
|
|
2551
|
+
"privacy": "private",
|
|
2552
|
+
"default": "new SwipeController(this, { matchesGesture: isHorizontalSwipe, onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1), })"
|
|
2565
2553
|
},
|
|
2566
2554
|
{
|
|
2567
|
-
"kind": "
|
|
2568
|
-
"name": "
|
|
2569
|
-
"
|
|
2570
|
-
{
|
|
2571
|
-
"name": "options",
|
|
2572
|
-
"optional": true,
|
|
2573
|
-
"type": {
|
|
2574
|
-
"text": "FocusOptions"
|
|
2575
|
-
},
|
|
2576
|
-
"description": "An object which controls aspects of the focusing process."
|
|
2577
|
-
}
|
|
2578
|
-
],
|
|
2579
|
-
"description": "Programmatically move focus to the component.",
|
|
2580
|
-
"inheritedFrom": {
|
|
2581
|
-
"name": "FocusableMixin",
|
|
2582
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2583
|
-
}
|
|
2555
|
+
"kind": "field",
|
|
2556
|
+
"name": "shortcuts",
|
|
2557
|
+
"privacy": "private"
|
|
2584
2558
|
},
|
|
2585
2559
|
{
|
|
2586
|
-
"kind": "
|
|
2587
|
-
"name": "
|
|
2588
|
-
"
|
|
2589
|
-
"
|
|
2590
|
-
"name": "FocusableMixin",
|
|
2591
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
2592
|
-
}
|
|
2560
|
+
"kind": "field",
|
|
2561
|
+
"name": "localize",
|
|
2562
|
+
"privacy": "private",
|
|
2563
|
+
"default": "new LocalizeController<\"nord-calendar\">(this, { onLangChange: () => this.handleLangChange(), })"
|
|
2593
2564
|
},
|
|
2594
2565
|
{
|
|
2595
|
-
"kind": "
|
|
2596
|
-
"name": "
|
|
2597
|
-
"
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}
|
|
2603
|
-
],
|
|
2604
|
-
"attributes": [
|
|
2566
|
+
"kind": "field",
|
|
2567
|
+
"name": "dateFormatShort",
|
|
2568
|
+
"type": {
|
|
2569
|
+
"text": "Intl.DateTimeFormat"
|
|
2570
|
+
},
|
|
2571
|
+
"privacy": "private",
|
|
2572
|
+
"description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
|
|
2573
|
+
},
|
|
2605
2574
|
{
|
|
2606
|
-
"
|
|
2575
|
+
"kind": "field",
|
|
2576
|
+
"name": "monthNames",
|
|
2607
2577
|
"type": {
|
|
2608
|
-
"text": "
|
|
2578
|
+
"text": "string[]"
|
|
2609
2579
|
},
|
|
2610
|
-
"
|
|
2611
|
-
"description": "Controls whether the checkbox is in an indeterminate state.",
|
|
2612
|
-
"fieldName": "indeterminate"
|
|
2580
|
+
"privacy": "private"
|
|
2613
2581
|
},
|
|
2614
2582
|
{
|
|
2615
|
-
"
|
|
2583
|
+
"kind": "field",
|
|
2584
|
+
"name": "monthNamesShort",
|
|
2616
2585
|
"type": {
|
|
2617
|
-
"text": "
|
|
2586
|
+
"text": "string[]"
|
|
2618
2587
|
},
|
|
2619
|
-
"
|
|
2620
|
-
"description": "Controls whether the checkbox is checked or not.",
|
|
2621
|
-
"fieldName": "checked"
|
|
2588
|
+
"privacy": "private"
|
|
2622
2589
|
},
|
|
2623
2590
|
{
|
|
2624
|
-
"
|
|
2591
|
+
"kind": "field",
|
|
2592
|
+
"name": "dayNames",
|
|
2625
2593
|
"type": {
|
|
2626
|
-
"text": "
|
|
2594
|
+
"text": "string[]"
|
|
2627
2595
|
},
|
|
2628
|
-
"
|
|
2629
|
-
"description": "The size of the component.",
|
|
2630
|
-
"fieldName": "size",
|
|
2631
|
-
"inheritedFrom": {
|
|
2632
|
-
"name": "SizeMixin",
|
|
2633
|
-
"module": "src/common/mixins/SizeMixin.ts"
|
|
2634
|
-
}
|
|
2596
|
+
"privacy": "private"
|
|
2635
2597
|
},
|
|
2636
2598
|
{
|
|
2637
|
-
"
|
|
2599
|
+
"kind": "field",
|
|
2600
|
+
"name": "dayNamesShort",
|
|
2638
2601
|
"type": {
|
|
2639
|
-
"text": "string"
|
|
2602
|
+
"text": "string[]"
|
|
2640
2603
|
},
|
|
2641
|
-
"
|
|
2642
|
-
"description": "Label for the input.",
|
|
2643
|
-
"fieldName": "label",
|
|
2644
|
-
"inheritedFrom": {
|
|
2645
|
-
"name": "FormAssociatedMixin",
|
|
2646
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2647
|
-
}
|
|
2604
|
+
"privacy": "private"
|
|
2648
2605
|
},
|
|
2649
2606
|
{
|
|
2650
|
-
"
|
|
2607
|
+
"kind": "field",
|
|
2608
|
+
"name": "value",
|
|
2651
2609
|
"type": {
|
|
2652
|
-
"text": "string
|
|
2610
|
+
"text": "string"
|
|
2653
2611
|
},
|
|
2654
|
-
"
|
|
2655
|
-
"
|
|
2656
|
-
"
|
|
2657
|
-
"name": "FormAssociatedMixin",
|
|
2658
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2659
|
-
}
|
|
2612
|
+
"default": "\"\"",
|
|
2613
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
2614
|
+
"attribute": "value"
|
|
2660
2615
|
},
|
|
2661
2616
|
{
|
|
2662
|
-
"
|
|
2617
|
+
"kind": "field",
|
|
2618
|
+
"name": "firstDayOfWeek",
|
|
2663
2619
|
"type": {
|
|
2664
|
-
"text": "
|
|
2620
|
+
"text": "DaysOfWeek"
|
|
2665
2621
|
},
|
|
2666
|
-
"
|
|
2667
|
-
"
|
|
2668
|
-
"
|
|
2669
|
-
"inheritedFrom": {
|
|
2670
|
-
"name": "FormAssociatedMixin",
|
|
2671
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2672
|
-
}
|
|
2622
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
2623
|
+
"attribute": "first-day-of-week",
|
|
2624
|
+
"reflects": true
|
|
2673
2625
|
},
|
|
2674
2626
|
{
|
|
2675
|
-
"
|
|
2627
|
+
"kind": "field",
|
|
2628
|
+
"name": "min",
|
|
2676
2629
|
"type": {
|
|
2677
2630
|
"text": "string | undefined"
|
|
2678
2631
|
},
|
|
2679
|
-
"description": "
|
|
2680
|
-
"
|
|
2681
|
-
"
|
|
2682
|
-
"name": "FormAssociatedMixin",
|
|
2683
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2684
|
-
}
|
|
2632
|
+
"description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
|
|
2633
|
+
"attribute": "min",
|
|
2634
|
+
"reflects": true
|
|
2685
2635
|
},
|
|
2686
2636
|
{
|
|
2687
|
-
"
|
|
2637
|
+
"kind": "field",
|
|
2638
|
+
"name": "max",
|
|
2688
2639
|
"type": {
|
|
2689
2640
|
"text": "string | undefined"
|
|
2690
2641
|
},
|
|
2691
|
-
"description": "
|
|
2692
|
-
"
|
|
2693
|
-
"
|
|
2694
|
-
"name": "FormAssociatedMixin",
|
|
2695
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2696
|
-
}
|
|
2642
|
+
"description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
|
|
2643
|
+
"attribute": "max",
|
|
2644
|
+
"reflects": true
|
|
2697
2645
|
},
|
|
2698
2646
|
{
|
|
2699
|
-
"
|
|
2647
|
+
"kind": "field",
|
|
2648
|
+
"name": "expand",
|
|
2700
2649
|
"type": {
|
|
2701
2650
|
"text": "boolean"
|
|
2702
2651
|
},
|
|
2703
2652
|
"default": "false",
|
|
2704
|
-
"description": "
|
|
2705
|
-
"
|
|
2706
|
-
"
|
|
2707
|
-
"name": "FormAssociatedMixin",
|
|
2708
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2709
|
-
}
|
|
2653
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
2654
|
+
"attribute": "expand",
|
|
2655
|
+
"reflects": true
|
|
2710
2656
|
},
|
|
2711
2657
|
{
|
|
2712
|
-
"
|
|
2658
|
+
"kind": "field",
|
|
2659
|
+
"name": "isDateDisabled",
|
|
2713
2660
|
"type": {
|
|
2714
|
-
"text": "
|
|
2661
|
+
"text": "DatePredicate"
|
|
2715
2662
|
},
|
|
2716
|
-
"default": "
|
|
2717
|
-
"description": "
|
|
2718
|
-
"fieldName": "hideRequired",
|
|
2719
|
-
"inheritedFrom": {
|
|
2720
|
-
"name": "FormAssociatedMixin",
|
|
2721
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
2722
|
-
}
|
|
2663
|
+
"default": "isDateDisabled",
|
|
2664
|
+
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
2723
2665
|
},
|
|
2724
2666
|
{
|
|
2725
|
-
"
|
|
2667
|
+
"kind": "field",
|
|
2668
|
+
"name": "isDateHighlighted",
|
|
2726
2669
|
"type": {
|
|
2727
|
-
"text": "boolean"
|
|
2670
|
+
"text": "(date: Date) => string | boolean"
|
|
2728
2671
|
},
|
|
2729
|
-
"default": "
|
|
2730
|
-
"description": "
|
|
2731
|
-
"fieldName": "disabled",
|
|
2732
|
-
"inheritedFrom": {
|
|
2733
|
-
"name": "InputMixin",
|
|
2734
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2735
|
-
}
|
|
2672
|
+
"default": "isDateHighlighted",
|
|
2673
|
+
"description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
|
|
2736
2674
|
},
|
|
2737
2675
|
{
|
|
2738
|
-
"
|
|
2676
|
+
"kind": "field",
|
|
2677
|
+
"name": "activeFocus",
|
|
2739
2678
|
"type": {
|
|
2740
|
-
"text": "
|
|
2679
|
+
"text": "boolean"
|
|
2741
2680
|
},
|
|
2742
|
-
"
|
|
2743
|
-
"
|
|
2744
|
-
"inheritedFrom": {
|
|
2745
|
-
"name": "InputMixin",
|
|
2746
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2747
|
-
}
|
|
2681
|
+
"privacy": "private",
|
|
2682
|
+
"default": "false"
|
|
2748
2683
|
},
|
|
2749
2684
|
{
|
|
2750
|
-
"
|
|
2751
|
-
"
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
"default": "\"\"",
|
|
2755
|
-
"description": "The value of the form component.",
|
|
2756
|
-
"fieldName": "value",
|
|
2757
|
-
"inheritedFrom": {
|
|
2758
|
-
"name": "InputMixin",
|
|
2759
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
2760
|
-
}
|
|
2685
|
+
"kind": "field",
|
|
2686
|
+
"name": "focusedDay",
|
|
2687
|
+
"privacy": "private",
|
|
2688
|
+
"default": "new Date()"
|
|
2761
2689
|
},
|
|
2762
2690
|
{
|
|
2763
|
-
"
|
|
2764
|
-
"
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2691
|
+
"kind": "method",
|
|
2692
|
+
"name": "focus",
|
|
2693
|
+
"parameters": [
|
|
2694
|
+
{
|
|
2695
|
+
"name": "options",
|
|
2696
|
+
"optional": true,
|
|
2697
|
+
"type": {
|
|
2698
|
+
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
2699
|
+
},
|
|
2700
|
+
"description": "An object which controls aspects of the focusing process."
|
|
2701
|
+
}
|
|
2702
|
+
],
|
|
2703
|
+
"description": "Programmatically move focus to the calendar."
|
|
2704
|
+
},
|
|
2776
2705
|
{
|
|
2777
|
-
"
|
|
2778
|
-
"
|
|
2706
|
+
"kind": "method",
|
|
2707
|
+
"name": "handleValueChange",
|
|
2708
|
+
"privacy": "protected"
|
|
2779
2709
|
},
|
|
2780
2710
|
{
|
|
2781
|
-
"
|
|
2782
|
-
"
|
|
2711
|
+
"kind": "method",
|
|
2712
|
+
"name": "handleFocusedDayChange",
|
|
2713
|
+
"privacy": "protected"
|
|
2783
2714
|
},
|
|
2784
2715
|
{
|
|
2785
|
-
"
|
|
2786
|
-
"
|
|
2716
|
+
"kind": "method",
|
|
2717
|
+
"name": "handleLangChange",
|
|
2718
|
+
"privacy": "private"
|
|
2787
2719
|
},
|
|
2788
2720
|
{
|
|
2789
|
-
"
|
|
2790
|
-
"
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
"superclass": {
|
|
2794
|
-
"name": "LitElement",
|
|
2795
|
-
"package": "lit"
|
|
2796
|
-
},
|
|
2797
|
-
"localization": [],
|
|
2798
|
-
"status": "ready",
|
|
2799
|
-
"category": "form",
|
|
2800
|
-
"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",
|
|
2801
|
-
"examples": [],
|
|
2802
|
-
"dependencies": [
|
|
2803
|
-
"icon"
|
|
2804
|
-
],
|
|
2805
|
-
"tagName": "nord-checkbox",
|
|
2806
|
-
"customElement": true,
|
|
2807
|
-
"events": [
|
|
2721
|
+
"kind": "field",
|
|
2722
|
+
"name": "handleDaySelect",
|
|
2723
|
+
"privacy": "private"
|
|
2724
|
+
},
|
|
2808
2725
|
{
|
|
2809
|
-
"
|
|
2810
|
-
"
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2726
|
+
"kind": "method",
|
|
2727
|
+
"name": "addDays",
|
|
2728
|
+
"privacy": "private",
|
|
2729
|
+
"parameters": [
|
|
2730
|
+
{
|
|
2731
|
+
"name": "days",
|
|
2732
|
+
"type": {
|
|
2733
|
+
"text": "number"
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
]
|
|
2818
2737
|
},
|
|
2819
2738
|
{
|
|
2820
|
-
"
|
|
2821
|
-
"
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
"declaration": {
|
|
2846
|
-
"name": "Checkbox",
|
|
2847
|
-
"module": "src/checkbox/Checkbox.ts"
|
|
2848
|
-
}
|
|
2849
|
-
}
|
|
2850
|
-
]
|
|
2851
|
-
},
|
|
2852
|
-
{
|
|
2853
|
-
"kind": "javascript-module",
|
|
2854
|
-
"path": "src/button-group/ButtonGroup.ts",
|
|
2855
|
-
"declarations": [
|
|
2856
|
-
{
|
|
2857
|
-
"kind": "class",
|
|
2858
|
-
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
2859
|
-
"name": "ButtonGroup",
|
|
2860
|
-
"cssProperties": [
|
|
2739
|
+
"kind": "method",
|
|
2740
|
+
"name": "addMonths",
|
|
2741
|
+
"privacy": "private",
|
|
2742
|
+
"parameters": [
|
|
2743
|
+
{
|
|
2744
|
+
"name": "months",
|
|
2745
|
+
"type": {
|
|
2746
|
+
"text": "number"
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
]
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
"kind": "method",
|
|
2753
|
+
"name": "addYears",
|
|
2754
|
+
"privacy": "private",
|
|
2755
|
+
"parameters": [
|
|
2756
|
+
{
|
|
2757
|
+
"name": "years",
|
|
2758
|
+
"type": {
|
|
2759
|
+
"text": "number"
|
|
2760
|
+
}
|
|
2761
|
+
}
|
|
2762
|
+
]
|
|
2763
|
+
},
|
|
2861
2764
|
{
|
|
2862
|
-
"
|
|
2863
|
-
"name": "
|
|
2864
|
-
"
|
|
2765
|
+
"kind": "method",
|
|
2766
|
+
"name": "startOfWeek",
|
|
2767
|
+
"privacy": "private"
|
|
2865
2768
|
},
|
|
2866
2769
|
{
|
|
2867
|
-
"
|
|
2868
|
-
"name": "
|
|
2869
|
-
"
|
|
2870
|
-
}
|
|
2871
|
-
],
|
|
2872
|
-
"slots": [
|
|
2770
|
+
"kind": "method",
|
|
2771
|
+
"name": "endOfWeek",
|
|
2772
|
+
"privacy": "private"
|
|
2773
|
+
},
|
|
2873
2774
|
{
|
|
2874
|
-
"
|
|
2875
|
-
"name": ""
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2775
|
+
"kind": "method",
|
|
2776
|
+
"name": "setMonth",
|
|
2777
|
+
"privacy": "private",
|
|
2778
|
+
"parameters": [
|
|
2779
|
+
{
|
|
2780
|
+
"name": "month",
|
|
2781
|
+
"type": {
|
|
2782
|
+
"text": "number"
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
]
|
|
2786
|
+
},
|
|
2879
2787
|
{
|
|
2880
|
-
"kind": "
|
|
2881
|
-
"name": "
|
|
2788
|
+
"kind": "method",
|
|
2789
|
+
"name": "setYear",
|
|
2882
2790
|
"privacy": "private",
|
|
2883
|
-
"
|
|
2791
|
+
"parameters": [
|
|
2792
|
+
{
|
|
2793
|
+
"name": "year",
|
|
2794
|
+
"type": {
|
|
2795
|
+
"text": "number"
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
]
|
|
2884
2799
|
},
|
|
2885
2800
|
{
|
|
2886
|
-
"kind": "
|
|
2887
|
-
"name": "
|
|
2801
|
+
"kind": "method",
|
|
2802
|
+
"name": "setFocusedDay",
|
|
2888
2803
|
"privacy": "private",
|
|
2889
|
-
"
|
|
2804
|
+
"parameters": [
|
|
2805
|
+
{
|
|
2806
|
+
"name": "day",
|
|
2807
|
+
"type": {
|
|
2808
|
+
"text": "Date"
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
]
|
|
2890
2812
|
},
|
|
2891
2813
|
{
|
|
2892
2814
|
"kind": "field",
|
|
2893
|
-
"name": "
|
|
2894
|
-
"
|
|
2895
|
-
"text": "\"default\" | \"spaced\""
|
|
2896
|
-
},
|
|
2897
|
-
"default": "\"default\"",
|
|
2898
|
-
"description": "The style variant of the button group.",
|
|
2899
|
-
"attribute": "variant",
|
|
2900
|
-
"reflects": true
|
|
2815
|
+
"name": "handleMonthSelect",
|
|
2816
|
+
"privacy": "private"
|
|
2901
2817
|
},
|
|
2902
2818
|
{
|
|
2903
2819
|
"kind": "field",
|
|
2904
|
-
"name": "
|
|
2905
|
-
"
|
|
2906
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
2907
|
-
},
|
|
2908
|
-
"default": "\"horizontal\"",
|
|
2909
|
-
"description": "The direction of the button group.",
|
|
2910
|
-
"attribute": "direction",
|
|
2911
|
-
"reflects": true
|
|
2820
|
+
"name": "handleYearSelect",
|
|
2821
|
+
"privacy": "private"
|
|
2912
2822
|
},
|
|
2913
2823
|
{
|
|
2914
2824
|
"kind": "field",
|
|
2915
|
-
"name": "
|
|
2825
|
+
"name": "handleNextMonthClick",
|
|
2826
|
+
"privacy": "private"
|
|
2827
|
+
},
|
|
2828
|
+
{
|
|
2829
|
+
"kind": "field",
|
|
2830
|
+
"name": "handlePreviousMonthClick",
|
|
2831
|
+
"privacy": "private"
|
|
2832
|
+
},
|
|
2833
|
+
{
|
|
2834
|
+
"kind": "field",
|
|
2835
|
+
"name": "enableActiveFocus",
|
|
2836
|
+
"privacy": "private"
|
|
2837
|
+
},
|
|
2838
|
+
{
|
|
2839
|
+
"kind": "field",
|
|
2840
|
+
"name": "disableActiveFocus",
|
|
2841
|
+
"privacy": "private"
|
|
2842
|
+
}
|
|
2843
|
+
],
|
|
2844
|
+
"events": [
|
|
2845
|
+
{
|
|
2846
|
+
"name": "nord-focus-date",
|
|
2916
2847
|
"type": {
|
|
2917
|
-
"text": "
|
|
2848
|
+
"text": "DateSelectEvent"
|
|
2918
2849
|
},
|
|
2919
|
-
"
|
|
2920
|
-
"description": "Defines whether the buttons are forced in a single line\nor can be flowed into multiple lines (only applied when variant is set to `spaced`).",
|
|
2921
|
-
"attribute": "wrap",
|
|
2922
|
-
"reflects": true
|
|
2850
|
+
"description": "Dispatched when the calendar's focused date changes."
|
|
2923
2851
|
},
|
|
2924
2852
|
{
|
|
2925
|
-
"kind": "field",
|
|
2926
|
-
"name": "role",
|
|
2927
2853
|
"type": {
|
|
2928
|
-
"text": "
|
|
2854
|
+
"text": "DateSelectEvent"
|
|
2929
2855
|
},
|
|
2930
|
-
"
|
|
2931
|
-
"
|
|
2932
|
-
"attribute": "role",
|
|
2933
|
-
"reflects": true
|
|
2856
|
+
"description": "Dispatched when a date is selected and the value changes.",
|
|
2857
|
+
"name": "change"
|
|
2934
2858
|
}
|
|
2935
2859
|
],
|
|
2936
2860
|
"attributes": [
|
|
2937
2861
|
{
|
|
2938
|
-
"name": "
|
|
2862
|
+
"name": "value",
|
|
2939
2863
|
"type": {
|
|
2940
|
-
"text": "
|
|
2864
|
+
"text": "string"
|
|
2941
2865
|
},
|
|
2942
|
-
"default": "\"
|
|
2943
|
-
"description": "The
|
|
2944
|
-
"fieldName": "
|
|
2866
|
+
"default": "\"\"",
|
|
2867
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
2868
|
+
"fieldName": "value"
|
|
2945
2869
|
},
|
|
2946
2870
|
{
|
|
2947
|
-
"name": "
|
|
2871
|
+
"name": "first-day-of-week",
|
|
2948
2872
|
"type": {
|
|
2949
|
-
"text": "
|
|
2873
|
+
"text": "DaysOfWeek"
|
|
2950
2874
|
},
|
|
2951
|
-
"
|
|
2952
|
-
"
|
|
2953
|
-
"fieldName": "direction"
|
|
2875
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
2876
|
+
"fieldName": "firstDayOfWeek"
|
|
2954
2877
|
},
|
|
2955
2878
|
{
|
|
2956
|
-
"name": "
|
|
2879
|
+
"name": "min",
|
|
2957
2880
|
"type": {
|
|
2958
|
-
"text": "
|
|
2881
|
+
"text": "string | undefined"
|
|
2959
2882
|
},
|
|
2960
|
-
"
|
|
2961
|
-
"
|
|
2962
|
-
"fieldName": "wrap"
|
|
2883
|
+
"description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
|
|
2884
|
+
"fieldName": "min"
|
|
2963
2885
|
},
|
|
2964
2886
|
{
|
|
2965
|
-
"name": "
|
|
2887
|
+
"name": "max",
|
|
2966
2888
|
"type": {
|
|
2967
|
-
"text": "string"
|
|
2889
|
+
"text": "string | undefined"
|
|
2968
2890
|
},
|
|
2969
|
-
"
|
|
2970
|
-
"
|
|
2971
|
-
|
|
2891
|
+
"description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
|
|
2892
|
+
"fieldName": "max"
|
|
2893
|
+
},
|
|
2894
|
+
{
|
|
2895
|
+
"name": "expand",
|
|
2896
|
+
"type": {
|
|
2897
|
+
"text": "boolean"
|
|
2898
|
+
},
|
|
2899
|
+
"default": "false",
|
|
2900
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
2901
|
+
"fieldName": "expand"
|
|
2972
2902
|
}
|
|
2973
2903
|
],
|
|
2974
2904
|
"superclass": {
|
|
2975
2905
|
"name": "LitElement",
|
|
2976
2906
|
"package": "lit"
|
|
2977
2907
|
},
|
|
2978
|
-
"localization": [
|
|
2908
|
+
"localization": [
|
|
2909
|
+
{
|
|
2910
|
+
"name": "prevMonthLabel",
|
|
2911
|
+
"description": "Accessible label for the previous month button."
|
|
2912
|
+
},
|
|
2913
|
+
{
|
|
2914
|
+
"name": "nextMonthLabel",
|
|
2915
|
+
"description": "Accessible label for the next month button."
|
|
2916
|
+
},
|
|
2917
|
+
{
|
|
2918
|
+
"name": "monthSelectLabel",
|
|
2919
|
+
"description": "Accessible label for the month select."
|
|
2920
|
+
},
|
|
2921
|
+
{
|
|
2922
|
+
"name": "yearSelectLabel",
|
|
2923
|
+
"description": "Accessible label for the year select."
|
|
2924
|
+
}
|
|
2925
|
+
],
|
|
2979
2926
|
"status": "ready",
|
|
2980
|
-
"category": "
|
|
2981
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use
|
|
2927
|
+
"category": "list",
|
|
2928
|
+
"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",
|
|
2982
2929
|
"examples": [],
|
|
2983
|
-
"dependencies": [
|
|
2984
|
-
|
|
2930
|
+
"dependencies": [
|
|
2931
|
+
"button",
|
|
2932
|
+
"visually-hidden",
|
|
2933
|
+
"icon"
|
|
2934
|
+
],
|
|
2935
|
+
"tagName": "nord-calendar",
|
|
2985
2936
|
"customElement": true
|
|
2986
2937
|
}
|
|
2987
2938
|
],
|
|
@@ -2990,16 +2941,65 @@
|
|
|
2990
2941
|
"kind": "js",
|
|
2991
2942
|
"name": "default",
|
|
2992
2943
|
"declaration": {
|
|
2993
|
-
"name": "
|
|
2994
|
-
"module": "src/
|
|
2944
|
+
"name": "Calendar",
|
|
2945
|
+
"module": "src/calendar/Calendar.ts"
|
|
2995
2946
|
}
|
|
2996
2947
|
},
|
|
2997
2948
|
{
|
|
2998
2949
|
"kind": "custom-element-definition",
|
|
2999
|
-
"name": "nord-
|
|
2950
|
+
"name": "nord-calendar",
|
|
3000
2951
|
"declaration": {
|
|
3001
|
-
"name": "
|
|
3002
|
-
"module": "src/
|
|
2952
|
+
"name": "Calendar",
|
|
2953
|
+
"module": "src/calendar/Calendar.ts"
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
]
|
|
2957
|
+
},
|
|
2958
|
+
{
|
|
2959
|
+
"kind": "javascript-module",
|
|
2960
|
+
"path": "src/calendar/DateSelectEvent.ts",
|
|
2961
|
+
"declarations": [
|
|
2962
|
+
{
|
|
2963
|
+
"kind": "class",
|
|
2964
|
+
"description": "",
|
|
2965
|
+
"name": "DateSelectEvent",
|
|
2966
|
+
"superclass": {
|
|
2967
|
+
"name": "NordEvent",
|
|
2968
|
+
"module": "/src/common/events.js"
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
],
|
|
2972
|
+
"exports": [
|
|
2973
|
+
{
|
|
2974
|
+
"kind": "js",
|
|
2975
|
+
"name": "DateSelectEvent",
|
|
2976
|
+
"declaration": {
|
|
2977
|
+
"name": "DateSelectEvent",
|
|
2978
|
+
"module": "src/calendar/DateSelectEvent.ts"
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
]
|
|
2982
|
+
},
|
|
2983
|
+
{
|
|
2984
|
+
"kind": "javascript-module",
|
|
2985
|
+
"path": "src/calendar/localization.ts",
|
|
2986
|
+
"declarations": [
|
|
2987
|
+
{
|
|
2988
|
+
"kind": "variable",
|
|
2989
|
+
"name": "calendarLocalization",
|
|
2990
|
+
"type": {
|
|
2991
|
+
"text": "object"
|
|
2992
|
+
},
|
|
2993
|
+
"default": "{ prevMonthLabel: \"Previous month\", nextMonthLabel: \"Next month\", monthSelectLabel: \"Month\", yearSelectLabel: \"Year\", }"
|
|
2994
|
+
}
|
|
2995
|
+
],
|
|
2996
|
+
"exports": [
|
|
2997
|
+
{
|
|
2998
|
+
"kind": "js",
|
|
2999
|
+
"name": "default",
|
|
3000
|
+
"declaration": {
|
|
3001
|
+
"name": "calendarLocalization",
|
|
3002
|
+
"module": "src/calendar/localization.ts"
|
|
3003
3003
|
}
|
|
3004
3004
|
}
|
|
3005
3005
|
]
|