@nordhealth/components 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -595,152 +595,152 @@
595
595
  },
596
596
  {
597
597
  "kind": "javascript-module",
598
- "path": "src/button/Button.ts",
598
+ "path": "src/calendar/Calendar.ts",
599
599
  "declarations": [
600
600
  {
601
601
  "kind": "class",
602
- "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.",
603
- "name": "Button",
602
+ "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.",
603
+ "name": "Calendar",
604
604
  "cssProperties": [
605
605
  {
606
- "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
607
- "name": "--n-button-border-radius",
608
- "default": "var(--n-border-radius-s)"
606
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
607
+ "name": "--n-calendar-border-radius",
608
+ "default": "var(--n-border-radius)"
609
609
  },
610
610
  {
611
- "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
612
- "name": "--n-button-gap",
613
- "default": "var(--n-space-s)"
614
- },
611
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
612
+ "name": "--n-calendar-box-shadow",
613
+ "default": "var(--n-box-shadow-popout)"
614
+ }
615
+ ],
616
+ "members": [
615
617
  {
616
- "description": "Controls the overlayed gradient background on the button.",
617
- "name": "--n-button-gradient",
618
- "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
618
+ "kind": "field",
619
+ "name": "dialogLabelId",
620
+ "type": {
621
+ "text": "string"
622
+ },
623
+ "privacy": "private",
624
+ "default": "\"dialog-header\""
619
625
  },
620
626
  {
621
- "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
622
- "name": "--n-button-border-color",
623
- "default": "var(--n-color-border-strong)"
627
+ "kind": "field",
628
+ "name": "monthSelectNode",
629
+ "type": {
630
+ "text": "HTMLElement"
631
+ },
632
+ "privacy": "private"
624
633
  },
625
634
  {
626
- "description": "Controls the text alignment for the text in the button.",
627
- "name": "--n-button-text-align",
628
- "default": "center"
629
- }
630
- ],
631
- "slots": [
632
- {
633
- "description": "The button content",
634
- "name": ""
635
+ "kind": "field",
636
+ "name": "focusedDayNode",
637
+ "type": {
638
+ "text": "HTMLButtonElement"
639
+ },
640
+ "privacy": "private"
635
641
  },
636
642
  {
637
- "description": "Used to place content at the start of button text. Typically used for icons.",
638
- "name": "start"
643
+ "kind": "field",
644
+ "name": "direction",
645
+ "privacy": "private",
646
+ "default": "new DirectionController(this)"
639
647
  },
640
648
  {
641
- "description": "Used to place content at the end of button text. Typically used for icons.",
642
- "name": "end"
643
- }
644
- ],
645
- "members": [
649
+ "kind": "field",
650
+ "name": "swipe",
651
+ "privacy": "private",
652
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
653
+ },
646
654
  {
647
655
  "kind": "field",
648
- "name": "buttonRef",
656
+ "name": "shortcuts",
649
657
  "privacy": "private"
650
658
  },
651
659
  {
652
660
  "kind": "field",
653
- "name": "events",
661
+ "name": "localize",
654
662
  "privacy": "private",
655
- "default": "new EventController(this)"
663
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
656
664
  },
657
665
  {
658
666
  "kind": "field",
659
- "name": "lightDom",
667
+ "name": "dateFormatShort",
668
+ "type": {
669
+ "text": "Intl.DateTimeFormat"
670
+ },
660
671
  "privacy": "private",
661
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
672
+ "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"
662
673
  },
663
674
  {
664
675
  "kind": "field",
665
- "name": "variant",
676
+ "name": "monthNames",
666
677
  "type": {
667
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
678
+ "text": "string[]"
668
679
  },
669
- "default": "\"default\"",
670
- "description": "The style variant of the button.",
671
- "attribute": "variant",
672
- "reflects": true
680
+ "privacy": "private"
673
681
  },
674
682
  {
675
683
  "kind": "field",
676
- "name": "type",
684
+ "name": "monthNamesShort",
677
685
  "type": {
678
- "text": "\"button\" | \"submit\" | \"reset\""
686
+ "text": "string[]"
679
687
  },
680
- "default": "\"submit\"",
681
- "description": "The type of the button.",
682
- "attribute": "type",
683
- "reflects": true
688
+ "privacy": "private"
684
689
  },
685
690
  {
686
691
  "kind": "field",
687
- "name": "size",
692
+ "name": "dayNames",
688
693
  "type": {
689
- "text": "\"s\" | \"m\" | \"l\""
694
+ "text": "string[]"
690
695
  },
691
- "default": "\"m\"",
692
- "description": "The size of the button.\nThis affects font-size and padding.",
693
- "attribute": "size",
694
- "reflects": true
696
+ "privacy": "private"
695
697
  },
696
698
  {
697
699
  "kind": "field",
698
- "name": "accessibleExpanded",
700
+ "name": "dayNamesShort",
699
701
  "type": {
700
- "text": "\"true\" | \"false\" | undefined"
702
+ "text": "string[]"
701
703
  },
702
- "privacy": "private",
703
- "attribute": "aria-expanded"
704
+ "privacy": "private"
704
705
  },
705
706
  {
706
707
  "kind": "field",
707
- "name": "accessibleHasPopup",
708
+ "name": "value",
708
709
  "type": {
709
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
710
+ "text": "string"
710
711
  },
711
- "privacy": "private",
712
- "attribute": "aria-haspopup"
712
+ "default": "\"\"",
713
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
714
+ "attribute": "value"
713
715
  },
714
716
  {
715
717
  "kind": "field",
716
- "name": "href",
718
+ "name": "firstDayOfWeek",
717
719
  "type": {
718
- "text": "string | undefined"
720
+ "text": "DaysOfWeek"
719
721
  },
720
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
721
- "attribute": "href",
722
- "reflects": true
722
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
723
+ "attribute": "firstDayOfWeek"
723
724
  },
724
725
  {
725
726
  "kind": "field",
726
- "name": "download",
727
+ "name": "min",
727
728
  "type": {
728
- "text": "boolean"
729
+ "text": "string"
729
730
  },
730
- "default": "false",
731
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
732
- "attribute": "download"
731
+ "default": "\"\"",
732
+ "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.",
733
+ "attribute": "min"
733
734
  },
734
735
  {
735
736
  "kind": "field",
736
- "name": "target",
737
+ "name": "max",
737
738
  "type": {
738
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
739
+ "text": "string"
739
740
  },
740
- "default": "\"_self\"",
741
- "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.",
742
- "attribute": "target",
743
- "reflects": true
741
+ "default": "\"\"",
742
+ "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.",
743
+ "attribute": "max"
744
744
  },
745
745
  {
746
746
  "kind": "field",
@@ -749,316 +749,248 @@
749
749
  "text": "boolean"
750
750
  },
751
751
  "default": "false",
752
- "description": "Controls whether the button expands to fill the width of its container.",
752
+ "description": "Controls whether the calendar expands to fill the width of its container.",
753
753
  "attribute": "expand",
754
754
  "reflects": true
755
755
  },
756
756
  {
757
757
  "kind": "field",
758
- "name": "loading",
758
+ "name": "isDateDisabled",
759
+ "type": {
760
+ "text": "DateDisabledPredicate"
761
+ },
762
+ "default": "isDateDisabled",
763
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
764
+ },
765
+ {
766
+ "kind": "field",
767
+ "name": "activeFocus",
759
768
  "type": {
760
769
  "text": "boolean"
761
770
  },
762
- "default": "false",
763
- "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.",
764
- "attribute": "loading",
765
- "reflects": true
771
+ "privacy": "private",
772
+ "default": "false"
766
773
  },
767
774
  {
768
- "kind": "method",
769
- "name": "renderLink",
775
+ "kind": "field",
776
+ "name": "focusedDay",
770
777
  "privacy": "private",
778
+ "default": "new Date()"
779
+ },
780
+ {
781
+ "kind": "method",
782
+ "name": "focus",
771
783
  "parameters": [
772
784
  {
773
- "name": "innards",
785
+ "name": "options",
786
+ "optional": true,
774
787
  "type": {
775
- "text": "TemplateResult"
776
- }
788
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
789
+ },
790
+ "description": "An object which controls aspects of the focusing process."
777
791
  }
778
792
  ],
779
- "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."
793
+ "description": "Programmatically move focus to the calendar."
780
794
  },
781
795
  {
782
796
  "kind": "method",
783
- "name": "renderButton",
784
- "privacy": "private",
785
- "parameters": [
786
- {
787
- "name": "innards",
788
- "type": {
789
- "text": "TemplateResult"
790
- }
791
- }
792
- ]
797
+ "name": "handleValueChange",
798
+ "privacy": "protected"
793
799
  },
794
800
  {
795
801
  "kind": "method",
796
- "name": "renderLightDom",
802
+ "name": "handleFocusedDayChange",
803
+ "privacy": "protected"
804
+ },
805
+ {
806
+ "kind": "method",
807
+ "name": "handleLangChange",
797
808
  "privacy": "private"
798
809
  },
799
810
  {
800
811
  "kind": "field",
801
- "name": "handleOuterClick",
812
+ "name": "handleDaySelect",
802
813
  "privacy": "private"
803
814
  },
804
815
  {
805
816
  "kind": "method",
806
- "name": "handleClick",
817
+ "name": "addDays",
807
818
  "privacy": "private",
808
819
  "parameters": [
809
820
  {
810
- "name": "e",
821
+ "name": "days",
811
822
  "type": {
812
- "text": "Event"
823
+ "text": "number"
813
824
  }
814
825
  }
815
826
  ]
816
827
  },
817
828
  {
818
829
  "kind": "method",
819
- "name": "handleProxyChange",
830
+ "name": "addMonths",
820
831
  "privacy": "private",
821
832
  "parameters": [
822
833
  {
823
- "name": "e",
834
+ "name": "months",
824
835
  "type": {
825
- "text": "Event"
836
+ "text": "number"
826
837
  }
827
838
  }
828
- ],
829
- "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."
839
+ ]
830
840
  },
831
841
  {
832
- "kind": "field",
833
- "name": "disabled",
834
- "type": {
835
- "text": "boolean"
836
- },
837
- "default": "false",
838
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
839
- "attribute": "disabled",
840
- "reflects": true,
841
- "inheritedFrom": {
842
- "name": "InputMixin",
843
- "module": "src/common/mixins/InputMixin.ts"
844
- }
842
+ "kind": "method",
843
+ "name": "addYears",
844
+ "privacy": "private",
845
+ "parameters": [
846
+ {
847
+ "name": "years",
848
+ "type": {
849
+ "text": "number"
850
+ }
851
+ }
852
+ ]
845
853
  },
846
854
  {
847
- "kind": "field",
848
- "name": "name",
849
- "type": {
850
- "text": "string | undefined"
851
- },
852
- "description": "The name of the form component.",
853
- "attribute": "name",
854
- "inheritedFrom": {
855
- "name": "InputMixin",
856
- "module": "src/common/mixins/InputMixin.ts"
857
- }
858
- },
859
- {
860
- "kind": "field",
861
- "name": "value",
862
- "type": {
863
- "text": "string"
864
- },
865
- "default": "\"\"",
866
- "description": "The value of the form component.",
867
- "attribute": "value",
868
- "inheritedFrom": {
869
- "name": "InputMixin",
870
- "module": "src/common/mixins/InputMixin.ts"
871
- }
872
- },
873
- {
874
- "kind": "field",
875
- "name": "form",
876
- "description": "Gets the form, if any, associated with the form element.",
877
- "inheritedFrom": {
878
- "name": "InputMixin",
879
- "module": "src/common/mixins/InputMixin.ts"
880
- }
855
+ "kind": "method",
856
+ "name": "startOfWeek",
857
+ "privacy": "private"
881
858
  },
882
859
  {
883
- "kind": "field",
884
- "name": "focusableRef",
885
- "privacy": "protected",
886
- "inheritedFrom": {
887
- "name": "FocusableMixin",
888
- "module": "src/common/mixins/FocusableMixin.ts"
889
- }
860
+ "kind": "method",
861
+ "name": "endOfWeek",
862
+ "privacy": "private"
890
863
  },
891
864
  {
892
865
  "kind": "method",
893
- "name": "focus",
866
+ "name": "setMonth",
867
+ "privacy": "private",
894
868
  "parameters": [
895
869
  {
896
- "name": "options",
897
- "optional": true,
870
+ "name": "month",
898
871
  "type": {
899
- "text": "FocusOptions"
900
- },
901
- "description": "An object which controls aspects of the focusing process."
872
+ "text": "number"
873
+ }
902
874
  }
903
- ],
904
- "description": "Programmatically move focus to the component.",
905
- "inheritedFrom": {
906
- "name": "FocusableMixin",
907
- "module": "src/common/mixins/FocusableMixin.ts"
908
- }
875
+ ]
909
876
  },
910
877
  {
911
878
  "kind": "method",
912
- "name": "blur",
913
- "description": "Programmatically remove focus from the component.",
914
- "inheritedFrom": {
915
- "name": "FocusableMixin",
916
- "module": "src/common/mixins/FocusableMixin.ts"
917
- }
879
+ "name": "setYear",
880
+ "privacy": "private",
881
+ "parameters": [
882
+ {
883
+ "name": "year",
884
+ "type": {
885
+ "text": "number"
886
+ }
887
+ }
888
+ ]
918
889
  },
919
890
  {
920
891
  "kind": "method",
921
- "name": "click",
922
- "description": "Programmatically simulates a click on the component.",
923
- "inheritedFrom": {
924
- "name": "FocusableMixin",
925
- "module": "src/common/mixins/FocusableMixin.ts"
926
- }
927
- }
928
- ],
929
- "attributes": [
930
- {
931
- "name": "variant",
932
- "type": {
933
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
934
- },
935
- "default": "\"default\"",
936
- "description": "The style variant of the button.",
937
- "fieldName": "variant"
892
+ "name": "setFocusedDay",
893
+ "privacy": "private",
894
+ "parameters": [
895
+ {
896
+ "name": "day",
897
+ "type": {
898
+ "text": "Date"
899
+ }
900
+ }
901
+ ]
938
902
  },
939
903
  {
940
- "name": "type",
941
- "type": {
942
- "text": "\"button\" | \"submit\" | \"reset\""
943
- },
944
- "default": "\"submit\"",
945
- "description": "The type of the button.",
946
- "fieldName": "type"
904
+ "kind": "field",
905
+ "name": "handleMonthSelect",
906
+ "privacy": "private"
947
907
  },
948
908
  {
949
- "name": "size",
950
- "type": {
951
- "text": "\"s\" | \"m\" | \"l\""
952
- },
953
- "default": "\"m\"",
954
- "description": "The size of the button.\nThis affects font-size and padding.",
955
- "fieldName": "size"
909
+ "kind": "field",
910
+ "name": "handleYearSelect",
911
+ "privacy": "private"
956
912
  },
957
913
  {
958
- "name": "aria-expanded",
959
- "type": {
960
- "text": "\"true\" | \"false\" | undefined"
961
- },
962
- "fieldName": "accessibleExpanded"
914
+ "kind": "field",
915
+ "name": "handleNextMonthClick",
916
+ "privacy": "private"
963
917
  },
964
918
  {
965
- "name": "aria-haspopup",
966
- "type": {
967
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
968
- },
969
- "fieldName": "accessibleHasPopup"
919
+ "kind": "field",
920
+ "name": "handlePreviousMonthClick",
921
+ "privacy": "private"
970
922
  },
971
923
  {
972
- "name": "href",
973
- "type": {
974
- "text": "string | undefined"
975
- },
976
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
977
- "fieldName": "href"
924
+ "kind": "field",
925
+ "name": "enableActiveFocus",
926
+ "privacy": "private"
978
927
  },
979
928
  {
980
- "name": "download",
981
- "type": {
982
- "text": "boolean"
983
- },
984
- "default": "false",
985
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
986
- "fieldName": "download"
987
- },
929
+ "kind": "field",
930
+ "name": "disableActiveFocus",
931
+ "privacy": "private"
932
+ }
933
+ ],
934
+ "events": [
988
935
  {
989
- "name": "target",
936
+ "name": "nord-focus-date",
990
937
  "type": {
991
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
938
+ "text": "DateSelectEvent"
992
939
  },
993
- "default": "\"_self\"",
994
- "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.",
995
- "fieldName": "target"
940
+ "description": "Dispatched when the calendar's focused date changes."
996
941
  },
997
942
  {
998
- "name": "expand",
999
943
  "type": {
1000
- "text": "boolean"
944
+ "text": "DateSelectEvent"
1001
945
  },
1002
- "default": "false",
1003
- "description": "Controls whether the button expands to fill the width of its container.",
1004
- "fieldName": "expand"
1005
- },
946
+ "description": "Dispatched when a date is selected and the value changes.",
947
+ "name": "change"
948
+ }
949
+ ],
950
+ "attributes": [
1006
951
  {
1007
- "name": "loading",
952
+ "name": "value",
1008
953
  "type": {
1009
- "text": "boolean"
954
+ "text": "string"
1010
955
  },
1011
- "default": "false",
1012
- "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.",
1013
- "fieldName": "loading"
956
+ "default": "\"\"",
957
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
958
+ "fieldName": "value"
1014
959
  },
1015
960
  {
1016
- "name": "disabled",
961
+ "name": "firstDayOfWeek",
1017
962
  "type": {
1018
- "text": "boolean"
963
+ "text": "DaysOfWeek"
1019
964
  },
1020
- "default": "false",
1021
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1022
- "fieldName": "disabled",
1023
- "inheritedFrom": {
1024
- "name": "InputMixin",
1025
- "module": "src/common/mixins/InputMixin.ts"
1026
- }
965
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
966
+ "fieldName": "firstDayOfWeek"
1027
967
  },
1028
968
  {
1029
- "name": "name",
969
+ "name": "min",
1030
970
  "type": {
1031
- "text": "string | undefined"
971
+ "text": "string"
1032
972
  },
1033
- "description": "The name of the form component.",
1034
- "fieldName": "name",
1035
- "inheritedFrom": {
1036
- "name": "InputMixin",
1037
- "module": "src/common/mixins/InputMixin.ts"
1038
- }
973
+ "default": "\"\"",
974
+ "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.",
975
+ "fieldName": "min"
1039
976
  },
1040
977
  {
1041
- "name": "value",
978
+ "name": "max",
1042
979
  "type": {
1043
980
  "text": "string"
1044
981
  },
1045
982
  "default": "\"\"",
1046
- "description": "The value of the form component.",
1047
- "fieldName": "value",
1048
- "inheritedFrom": {
1049
- "name": "InputMixin",
1050
- "module": "src/common/mixins/InputMixin.ts"
1051
- }
1052
- }
1053
- ],
1054
- "mixins": [
1055
- {
1056
- "name": "InputMixin",
1057
- "module": "/src/common/mixins/InputMixin.js"
983
+ "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.",
984
+ "fieldName": "max"
1058
985
  },
1059
986
  {
1060
- "name": "FocusableMixin",
1061
- "module": "/src/common/mixins/FocusableMixin.js"
987
+ "name": "expand",
988
+ "type": {
989
+ "text": "boolean"
990
+ },
991
+ "default": "false",
992
+ "description": "Controls whether the calendar expands to fill the width of its container.",
993
+ "fieldName": "expand"
1062
994
  }
1063
995
  ],
1064
996
  "superclass": {
@@ -1066,10 +998,10 @@
1066
998
  "package": "lit"
1067
999
  },
1068
1000
  "status": "ready",
1069
- "category": "action",
1001
+ "category": "list",
1070
1002
  "displayName": null,
1071
1003
  "examples": [],
1072
- "tagName": "nord-button",
1004
+ "tagName": "nord-calendar",
1073
1005
  "customElement": true
1074
1006
  }
1075
1007
  ],
@@ -1078,778 +1010,675 @@
1078
1010
  "kind": "js",
1079
1011
  "name": "default",
1080
1012
  "declaration": {
1081
- "name": "Button",
1082
- "module": "src/button/Button.ts"
1013
+ "name": "Calendar",
1014
+ "module": "src/calendar/Calendar.ts"
1083
1015
  }
1084
1016
  },
1085
1017
  {
1086
1018
  "kind": "custom-element-definition",
1087
- "name": "nord-button",
1019
+ "name": "nord-calendar",
1088
1020
  "declaration": {
1089
- "name": "Button",
1090
- "module": "src/button/Button.ts"
1021
+ "name": "Calendar",
1022
+ "module": "src/calendar/Calendar.ts"
1091
1023
  }
1092
1024
  }
1093
1025
  ],
1094
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\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"
1026
+ "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- Dont 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"
1095
1027
  },
1096
1028
  {
1097
1029
  "kind": "javascript-module",
1098
- "path": "src/badge/Badge.ts",
1030
+ "path": "src/calendar/DateSelectEvent.ts",
1099
1031
  "declarations": [
1100
1032
  {
1101
1033
  "kind": "class",
1102
- "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.",
1103
- "name": "Badge",
1104
- "slots": [
1105
- {
1106
- "description": "The badge content.",
1107
- "name": ""
1108
- }
1109
- ],
1110
- "members": [
1111
- {
1112
- "kind": "field",
1113
- "name": "type",
1114
- "type": {
1115
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1116
- },
1117
- "default": "\"neutral\"",
1118
- "description": "The type of badge.\nDetermines the background color of the badge.",
1119
- "attribute": "type",
1120
- "reflects": true
1121
- },
1034
+ "description": "",
1035
+ "name": "DateSelectEvent",
1036
+ "superclass": {
1037
+ "name": "NordEvent",
1038
+ "module": "/src/common/events.js"
1039
+ },
1040
+ "examples": []
1041
+ }
1042
+ ],
1043
+ "exports": [
1044
+ {
1045
+ "kind": "js",
1046
+ "name": "DateSelectEvent",
1047
+ "declaration": {
1048
+ "name": "DateSelectEvent",
1049
+ "module": "src/calendar/DateSelectEvent.ts"
1050
+ }
1051
+ }
1052
+ ],
1053
+ "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"
1054
+ },
1055
+ {
1056
+ "kind": "javascript-module",
1057
+ "path": "src/calendar/localization.ts",
1058
+ "declarations": [
1059
+ {
1060
+ "kind": "variable",
1061
+ "name": "calendarLocalization",
1062
+ "type": {
1063
+ "text": "object"
1064
+ },
1065
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1066
+ }
1067
+ ],
1068
+ "exports": [
1069
+ {
1070
+ "kind": "js",
1071
+ "name": "default",
1072
+ "declaration": {
1073
+ "name": "calendarLocalization",
1074
+ "module": "src/calendar/localization.ts"
1075
+ }
1076
+ }
1077
+ ],
1078
+ "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"
1079
+ },
1080
+ {
1081
+ "kind": "javascript-module",
1082
+ "path": "src/calendar/month-view.ts",
1083
+ "declarations": [
1084
+ {
1085
+ "kind": "function",
1086
+ "name": "dayView",
1087
+ "parameters": [
1122
1088
  {
1123
- "kind": "field",
1124
- "name": "progress",
1089
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1125
1090
  "type": {
1126
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1127
- },
1128
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1129
- "attribute": "progress"
1091
+ "text": "DatePickerDayProps"
1092
+ }
1130
1093
  }
1131
- ],
1132
- "attributes": [
1133
- {
1134
- "name": "type",
1135
- "type": {
1136
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1137
- },
1138
- "default": "\"neutral\"",
1139
- "description": "The type of badge.\nDetermines the background color of the badge.",
1140
- "fieldName": "type"
1141
- },
1094
+ ]
1095
+ },
1096
+ {
1097
+ "kind": "function",
1098
+ "name": "monthView",
1099
+ "parameters": [
1142
1100
  {
1143
- "name": "progress",
1101
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1144
1102
  "type": {
1145
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1146
- },
1147
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1148
- "fieldName": "progress"
1103
+ "text": "MonthViewArgs"
1104
+ }
1149
1105
  }
1150
- ],
1151
- "superclass": {
1152
- "name": "LitElement",
1153
- "package": "lit"
1154
- },
1155
- "status": "ready",
1156
- "category": "text",
1157
- "displayName": null,
1158
- "examples": [],
1159
- "tagName": "nord-badge",
1160
- "customElement": true
1106
+ ]
1161
1107
  }
1162
1108
  ],
1163
1109
  "exports": [
1164
1110
  {
1165
1111
  "kind": "js",
1166
- "name": "default",
1112
+ "name": "dayView",
1167
1113
  "declaration": {
1168
- "name": "Badge",
1169
- "module": "src/badge/Badge.ts"
1114
+ "name": "dayView",
1115
+ "module": "src/calendar/month-view.ts"
1170
1116
  }
1171
1117
  },
1172
1118
  {
1173
- "kind": "custom-element-definition",
1174
- "name": "nord-badge",
1119
+ "kind": "js",
1120
+ "name": "monthView",
1175
1121
  "declaration": {
1176
- "name": "Badge",
1177
- "module": "src/badge/Badge.ts"
1122
+ "name": "monthView",
1123
+ "module": "src/calendar/month-view.ts"
1178
1124
  }
1179
1125
  }
1180
1126
  ],
1181
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
1127
+ "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"
1182
1128
  },
1183
1129
  {
1184
1130
  "kind": "javascript-module",
1185
- "path": "src/card/Card.ts",
1131
+ "path": "src/button/Button.ts",
1186
1132
  "declarations": [
1187
1133
  {
1188
1134
  "kind": "class",
1189
- "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.",
1190
- "name": "Card",
1135
+ "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.",
1136
+ "name": "Button",
1191
1137
  "cssProperties": [
1192
1138
  {
1193
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1194
- "name": "--n-card-border-radius",
1195
- "default": "var(--n-border-radius)"
1139
+ "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1140
+ "name": "--n-button-border-radius",
1141
+ "default": "var(--n-border-radius-s)"
1196
1142
  },
1197
1143
  {
1198
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1199
- "name": "--n-card-box-shadow",
1200
- "default": "var(--n-box-shadow-popout)"
1144
+ "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
1145
+ "name": "--n-button-gap",
1146
+ "default": "var(--n-space-s)"
1201
1147
  },
1202
1148
  {
1203
- "description": "Controls the padding on all sides of the card.",
1204
- "name": "--n-card-padding",
1205
- "default": "var(--n-space-m)"
1149
+ "description": "Controls the overlayed gradient background on the button.",
1150
+ "name": "--n-button-gradient",
1151
+ "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
1206
1152
  },
1207
1153
  {
1208
- "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
1209
- "name": "--n-card-slot-padding",
1210
- "default": "var(--n-space-m)"
1154
+ "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
1155
+ "name": "--n-button-border-color",
1156
+ "default": "var(--n-color-border-strong)"
1157
+ },
1158
+ {
1159
+ "description": "Controls the text alignment for the text in the button.",
1160
+ "name": "--n-button-text-align",
1161
+ "default": "center"
1211
1162
  }
1212
1163
  ],
1213
1164
  "slots": [
1214
1165
  {
1215
- "description": "The card content.",
1166
+ "description": "The button content",
1216
1167
  "name": ""
1217
1168
  },
1218
1169
  {
1219
- "description": "Optional slot that holds a header for the card.",
1220
- "name": "header"
1221
- },
1222
- {
1223
- "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
1224
- "name": "header-end"
1170
+ "description": "Used to place content at the start of button text. Typically used for icons.",
1171
+ "name": "start"
1225
1172
  },
1226
1173
  {
1227
- "description": "Optional slot that holds footer content for the card.",
1228
- "name": "footer"
1174
+ "description": "Used to place content at the end of button text. Typically used for icons.",
1175
+ "name": "end"
1229
1176
  }
1230
1177
  ],
1231
1178
  "members": [
1232
1179
  {
1233
1180
  "kind": "field",
1234
- "name": "headerSlot",
1235
- "privacy": "private",
1236
- "default": "new SlotController(this, \"header\")"
1181
+ "name": "buttonRef",
1182
+ "privacy": "private"
1237
1183
  },
1238
1184
  {
1239
1185
  "kind": "field",
1240
- "name": "headerEndSlot",
1186
+ "name": "events",
1241
1187
  "privacy": "private",
1242
- "default": "new SlotController(this, \"header-end\")"
1188
+ "default": "new EventController(this)"
1243
1189
  },
1244
1190
  {
1245
1191
  "kind": "field",
1246
- "name": "footerSlot",
1192
+ "name": "lightDom",
1247
1193
  "privacy": "private",
1248
- "default": "new SlotController(this, \"footer\")"
1194
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
1249
1195
  },
1250
1196
  {
1251
1197
  "kind": "field",
1252
- "name": "padding",
1198
+ "name": "variant",
1253
1199
  "type": {
1254
- "text": "\"m\" | \"l\" | \"none\""
1200
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1255
1201
  },
1256
- "default": "\"m\"",
1257
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1258
- "attribute": "padding",
1202
+ "default": "\"default\"",
1203
+ "description": "The style variant of the button.",
1204
+ "attribute": "variant",
1259
1205
  "reflects": true
1260
- }
1261
- ],
1262
- "attributes": [
1206
+ },
1263
1207
  {
1264
- "name": "padding",
1208
+ "kind": "field",
1209
+ "name": "type",
1265
1210
  "type": {
1266
- "text": "\"m\" | \"l\" | \"none\""
1211
+ "text": "\"button\" | \"submit\" | \"reset\""
1212
+ },
1213
+ "default": "\"submit\"",
1214
+ "description": "The type of the button.",
1215
+ "attribute": "type",
1216
+ "reflects": true
1217
+ },
1218
+ {
1219
+ "kind": "field",
1220
+ "name": "size",
1221
+ "type": {
1222
+ "text": "\"s\" | \"m\" | \"l\""
1267
1223
  },
1268
1224
  "default": "\"m\"",
1269
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1270
- "fieldName": "padding"
1271
- }
1272
- ],
1273
- "superclass": {
1274
- "name": "LitElement",
1275
- "package": "lit"
1276
- },
1277
- "status": "ready",
1278
- "category": "structure",
1279
- "displayName": null,
1280
- "examples": [],
1281
- "tagName": "nord-card",
1282
- "customElement": true
1283
- }
1284
- ],
1285
- "exports": [
1286
- {
1287
- "kind": "js",
1288
- "name": "default",
1289
- "declaration": {
1290
- "name": "Card",
1291
- "module": "src/card/Card.ts"
1292
- }
1293
- },
1294
- {
1295
- "kind": "custom-element-definition",
1296
- "name": "nord-card",
1297
- "declaration": {
1298
- "name": "Card",
1299
- "module": "src/card/Card.ts"
1300
- }
1301
- }
1302
- ],
1303
- "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 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"
1304
- },
1305
- {
1306
- "kind": "javascript-module",
1307
- "path": "src/checkbox/Checkbox.ts",
1308
- "declarations": [
1309
- {
1310
- "kind": "class",
1311
- "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
1312
- "name": "Checkbox",
1313
- "slots": [
1225
+ "description": "The size of the button.\nThis affects font-size and padding.",
1226
+ "attribute": "size",
1227
+ "reflects": true
1228
+ },
1314
1229
  {
1315
- "description": "Use when a label requires more than plain text.",
1316
- "name": "label"
1230
+ "kind": "field",
1231
+ "name": "accessibleExpanded",
1232
+ "type": {
1233
+ "text": "\"true\" | \"false\" | undefined"
1234
+ },
1235
+ "privacy": "private",
1236
+ "attribute": "aria-expanded"
1317
1237
  },
1318
1238
  {
1319
- "description": "Optional slot that holds hint text for the input.",
1320
- "name": "hint"
1239
+ "kind": "field",
1240
+ "name": "accessibleHasPopup",
1241
+ "type": {
1242
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1243
+ },
1244
+ "privacy": "private",
1245
+ "attribute": "aria-haspopup"
1321
1246
  },
1322
1247
  {
1323
- "description": "Optional slot that holds error text for the input.",
1324
- "name": "error"
1325
- }
1326
- ],
1327
- "members": [
1248
+ "kind": "field",
1249
+ "name": "href",
1250
+ "type": {
1251
+ "text": "string | undefined"
1252
+ },
1253
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1254
+ "attribute": "href",
1255
+ "reflects": true
1256
+ },
1328
1257
  {
1329
1258
  "kind": "field",
1330
- "name": "formValue",
1331
- "privacy": "protected",
1332
- "inheritedFrom": {
1333
- "name": "FormAssociatedMixin",
1334
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1335
- }
1259
+ "name": "download",
1260
+ "type": {
1261
+ "text": "boolean"
1262
+ },
1263
+ "default": "false",
1264
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1265
+ "attribute": "download"
1336
1266
  },
1337
1267
  {
1338
1268
  "kind": "field",
1339
- "name": "indeterminate",
1269
+ "name": "target",
1270
+ "type": {
1271
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1272
+ },
1273
+ "default": "\"_self\"",
1274
+ "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.",
1275
+ "attribute": "target",
1276
+ "reflects": true
1277
+ },
1278
+ {
1279
+ "kind": "field",
1280
+ "name": "expand",
1340
1281
  "type": {
1341
1282
  "text": "boolean"
1342
1283
  },
1343
1284
  "default": "false",
1344
- "description": "Controls whether the checkbox is in an indeterminate state.",
1345
- "attribute": "indeterminate"
1285
+ "description": "Controls whether the button expands to fill the width of its container.",
1286
+ "attribute": "expand",
1287
+ "reflects": true
1346
1288
  },
1347
1289
  {
1348
1290
  "kind": "field",
1349
- "name": "checked",
1291
+ "name": "loading",
1350
1292
  "type": {
1351
1293
  "text": "boolean"
1352
1294
  },
1353
1295
  "default": "false",
1354
- "description": "Controls whether the checkbox is checked or not.",
1355
- "attribute": "checked"
1296
+ "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.",
1297
+ "attribute": "loading",
1298
+ "reflects": true
1356
1299
  },
1357
1300
  {
1358
1301
  "kind": "method",
1359
- "name": "handleChange",
1360
- "privacy": "protected",
1302
+ "name": "renderLink",
1303
+ "privacy": "private",
1361
1304
  "parameters": [
1362
1305
  {
1363
- "name": "e",
1306
+ "name": "innards",
1364
1307
  "type": {
1365
- "text": "Event"
1308
+ "text": "TemplateResult"
1366
1309
  }
1367
1310
  }
1368
1311
  ],
1369
- "return": {
1370
- "type": {
1371
- "text": "void"
1312
+ "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."
1313
+ },
1314
+ {
1315
+ "kind": "method",
1316
+ "name": "renderButton",
1317
+ "privacy": "private",
1318
+ "parameters": [
1319
+ {
1320
+ "name": "innards",
1321
+ "type": {
1322
+ "text": "TemplateResult"
1323
+ }
1372
1324
  }
1373
- },
1374
- "inheritedFrom": {
1375
- "name": "FormAssociatedMixin",
1376
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1377
- }
1325
+ ]
1378
1326
  },
1379
1327
  {
1380
- "kind": "field",
1381
- "name": "labelSlot",
1382
- "privacy": "protected",
1383
- "default": "new SlotController(this, \"label\")",
1384
- "inheritedFrom": {
1385
- "name": "FormAssociatedMixin",
1386
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1387
- }
1328
+ "kind": "method",
1329
+ "name": "renderLightDom",
1330
+ "privacy": "private"
1388
1331
  },
1389
1332
  {
1390
1333
  "kind": "field",
1391
- "name": "errorSlot",
1392
- "privacy": "protected",
1393
- "default": "new SlotController(this, \"error\")",
1394
- "inheritedFrom": {
1395
- "name": "FormAssociatedMixin",
1396
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1397
- }
1334
+ "name": "handleOuterClick",
1335
+ "privacy": "private"
1398
1336
  },
1399
1337
  {
1400
- "kind": "field",
1401
- "name": "hintSlot",
1402
- "privacy": "protected",
1403
- "default": "new SlotController(this, \"hint\")",
1404
- "inheritedFrom": {
1405
- "name": "FormAssociatedMixin",
1406
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1407
- }
1338
+ "kind": "method",
1339
+ "name": "handleClick",
1340
+ "privacy": "private",
1341
+ "parameters": [
1342
+ {
1343
+ "name": "e",
1344
+ "type": {
1345
+ "text": "Event"
1346
+ }
1347
+ }
1348
+ ]
1408
1349
  },
1409
1350
  {
1410
- "kind": "field",
1411
- "name": "formData",
1412
- "privacy": "protected",
1413
- "default": "new FormDataController(this, { value: () => this.formValue })",
1414
- "inheritedFrom": {
1415
- "name": "FormAssociatedMixin",
1416
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1417
- }
1351
+ "kind": "method",
1352
+ "name": "handleProxyChange",
1353
+ "privacy": "private",
1354
+ "parameters": [
1355
+ {
1356
+ "name": "e",
1357
+ "type": {
1358
+ "text": "Event"
1359
+ }
1360
+ }
1361
+ ],
1362
+ "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."
1418
1363
  },
1419
1364
  {
1420
1365
  "kind": "field",
1421
- "name": "inputId",
1366
+ "name": "disabled",
1422
1367
  "type": {
1423
- "text": "string"
1368
+ "text": "boolean"
1424
1369
  },
1425
- "privacy": "protected",
1426
- "default": "\"input\"",
1370
+ "default": "false",
1371
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1372
+ "attribute": "disabled",
1373
+ "reflects": true,
1427
1374
  "inheritedFrom": {
1428
- "name": "FormAssociatedMixin",
1429
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1375
+ "name": "InputMixin",
1376
+ "module": "src/common/mixins/InputMixin.ts"
1430
1377
  }
1431
1378
  },
1432
1379
  {
1433
1380
  "kind": "field",
1434
- "name": "errorId",
1381
+ "name": "name",
1435
1382
  "type": {
1436
- "text": "string"
1383
+ "text": "string | undefined"
1437
1384
  },
1438
- "privacy": "protected",
1439
- "default": "\"error\"",
1385
+ "description": "The name of the form component.",
1386
+ "attribute": "name",
1440
1387
  "inheritedFrom": {
1441
- "name": "FormAssociatedMixin",
1442
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1388
+ "name": "InputMixin",
1389
+ "module": "src/common/mixins/InputMixin.ts"
1443
1390
  }
1444
1391
  },
1445
1392
  {
1446
1393
  "kind": "field",
1447
- "name": "hintId",
1394
+ "name": "value",
1448
1395
  "type": {
1449
1396
  "text": "string"
1450
1397
  },
1451
- "privacy": "protected",
1452
- "default": "\"hint\"",
1398
+ "default": "\"\"",
1399
+ "description": "The value of the form component.",
1400
+ "attribute": "value",
1453
1401
  "inheritedFrom": {
1454
- "name": "FormAssociatedMixin",
1455
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1402
+ "name": "InputMixin",
1403
+ "module": "src/common/mixins/InputMixin.ts"
1456
1404
  }
1457
1405
  },
1458
1406
  {
1459
1407
  "kind": "field",
1460
- "name": "label",
1461
- "type": {
1462
- "text": "string"
1463
- },
1464
- "default": "\"\"",
1465
- "description": "Label for the input.",
1466
- "attribute": "label",
1408
+ "name": "form",
1409
+ "description": "Gets the form, if any, associated with the form element.",
1467
1410
  "inheritedFrom": {
1468
- "name": "FormAssociatedMixin",
1469
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1411
+ "name": "InputMixin",
1412
+ "module": "src/common/mixins/InputMixin.ts"
1470
1413
  }
1471
1414
  },
1472
1415
  {
1473
1416
  "kind": "field",
1474
- "name": "hint",
1475
- "type": {
1476
- "text": "string | undefined"
1477
- },
1478
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1479
- "attribute": "hint",
1417
+ "name": "focusableRef",
1418
+ "privacy": "protected",
1480
1419
  "inheritedFrom": {
1481
- "name": "FormAssociatedMixin",
1482
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1420
+ "name": "FocusableMixin",
1421
+ "module": "src/common/mixins/FocusableMixin.ts"
1483
1422
  }
1484
1423
  },
1485
1424
  {
1486
- "kind": "field",
1487
- "name": "hideLabel",
1488
- "type": {
1489
- "text": "boolean"
1490
- },
1491
- "default": "false",
1492
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1493
- "attribute": "hide-label",
1425
+ "kind": "method",
1426
+ "name": "focus",
1427
+ "parameters": [
1428
+ {
1429
+ "name": "options",
1430
+ "optional": true,
1431
+ "type": {
1432
+ "text": "FocusOptions"
1433
+ },
1434
+ "description": "An object which controls aspects of the focusing process."
1435
+ }
1436
+ ],
1437
+ "description": "Programmatically move focus to the component.",
1494
1438
  "inheritedFrom": {
1495
- "name": "FormAssociatedMixin",
1496
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1439
+ "name": "FocusableMixin",
1440
+ "module": "src/common/mixins/FocusableMixin.ts"
1497
1441
  }
1498
1442
  },
1499
1443
  {
1500
- "kind": "field",
1501
- "name": "placeholder",
1502
- "type": {
1503
- "text": "string | undefined"
1504
- },
1505
- "description": "Placeholder text to display within the input.",
1506
- "attribute": "placeholder",
1444
+ "kind": "method",
1445
+ "name": "blur",
1446
+ "description": "Programmatically remove focus from the component.",
1507
1447
  "inheritedFrom": {
1508
- "name": "FormAssociatedMixin",
1509
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1448
+ "name": "FocusableMixin",
1449
+ "module": "src/common/mixins/FocusableMixin.ts"
1510
1450
  }
1511
1451
  },
1512
1452
  {
1513
- "kind": "field",
1514
- "name": "error",
1515
- "type": {
1516
- "text": "string | undefined"
1517
- },
1518
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1519
- "attribute": "error",
1453
+ "kind": "method",
1454
+ "name": "click",
1455
+ "description": "Programmatically simulates a click on the component.",
1520
1456
  "inheritedFrom": {
1521
- "name": "FormAssociatedMixin",
1522
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1457
+ "name": "FocusableMixin",
1458
+ "module": "src/common/mixins/FocusableMixin.ts"
1523
1459
  }
1460
+ }
1461
+ ],
1462
+ "attributes": [
1463
+ {
1464
+ "name": "variant",
1465
+ "type": {
1466
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1467
+ },
1468
+ "default": "\"default\"",
1469
+ "description": "The style variant of the button.",
1470
+ "fieldName": "variant"
1524
1471
  },
1525
1472
  {
1526
- "kind": "field",
1527
- "name": "required",
1473
+ "name": "type",
1528
1474
  "type": {
1529
- "text": "boolean"
1475
+ "text": "\"button\" | \"submit\" | \"reset\""
1530
1476
  },
1531
- "default": "false",
1532
- "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.",
1533
- "attribute": "required",
1534
- "inheritedFrom": {
1535
- "name": "FormAssociatedMixin",
1536
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1537
- }
1477
+ "default": "\"submit\"",
1478
+ "description": "The type of the button.",
1479
+ "fieldName": "type"
1538
1480
  },
1539
1481
  {
1540
- "kind": "method",
1541
- "name": "handleInput",
1542
- "privacy": "protected",
1543
- "parameters": [
1544
- {
1545
- "name": "e",
1546
- "type": {
1547
- "text": "Event"
1548
- }
1549
- }
1550
- ],
1551
- "inheritedFrom": {
1552
- "name": "FormAssociatedMixin",
1553
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1554
- }
1482
+ "name": "size",
1483
+ "type": {
1484
+ "text": "\"s\" | \"m\" | \"l\""
1485
+ },
1486
+ "default": "\"m\"",
1487
+ "description": "The size of the button.\nThis affects font-size and padding.",
1488
+ "fieldName": "size"
1555
1489
  },
1556
1490
  {
1557
- "kind": "method",
1558
- "name": "renderLabel",
1559
- "privacy": "protected",
1560
- "inheritedFrom": {
1561
- "name": "FormAssociatedMixin",
1562
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1563
- }
1491
+ "name": "aria-expanded",
1492
+ "type": {
1493
+ "text": "\"true\" | \"false\" | undefined"
1494
+ },
1495
+ "fieldName": "accessibleExpanded"
1564
1496
  },
1565
1497
  {
1566
- "kind": "method",
1567
- "name": "renderError",
1568
- "privacy": "protected",
1569
- "inheritedFrom": {
1570
- "name": "FormAssociatedMixin",
1571
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1572
- }
1498
+ "name": "aria-haspopup",
1499
+ "type": {
1500
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1501
+ },
1502
+ "fieldName": "accessibleHasPopup"
1573
1503
  },
1574
1504
  {
1575
- "kind": "method",
1576
- "name": "getDescribedBy",
1577
- "privacy": "protected",
1578
- "inheritedFrom": {
1579
- "name": "FormAssociatedMixin",
1580
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1581
- }
1505
+ "name": "href",
1506
+ "type": {
1507
+ "text": "string | undefined"
1508
+ },
1509
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1510
+ "fieldName": "href"
1582
1511
  },
1583
1512
  {
1584
- "kind": "method",
1585
- "name": "getInvalid",
1586
- "privacy": "protected",
1587
- "inheritedFrom": {
1588
- "name": "FormAssociatedMixin",
1589
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1590
- }
1513
+ "name": "download",
1514
+ "type": {
1515
+ "text": "boolean"
1516
+ },
1517
+ "default": "false",
1518
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1519
+ "fieldName": "download"
1591
1520
  },
1592
1521
  {
1593
- "kind": "field",
1594
- "name": "hasHint",
1595
- "privacy": "protected",
1596
- "inheritedFrom": {
1597
- "name": "FormAssociatedMixin",
1598
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1599
- }
1522
+ "name": "target",
1523
+ "type": {
1524
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1525
+ },
1526
+ "default": "\"_self\"",
1527
+ "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.",
1528
+ "fieldName": "target"
1600
1529
  },
1601
1530
  {
1602
- "kind": "field",
1603
- "name": "hasError",
1604
- "privacy": "protected",
1605
- "inheritedFrom": {
1606
- "name": "FormAssociatedMixin",
1607
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1608
- }
1531
+ "name": "expand",
1532
+ "type": {
1533
+ "text": "boolean"
1534
+ },
1535
+ "default": "false",
1536
+ "description": "Controls whether the button expands to fill the width of its container.",
1537
+ "fieldName": "expand"
1538
+ },
1539
+ {
1540
+ "name": "loading",
1541
+ "type": {
1542
+ "text": "boolean"
1543
+ },
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"
1609
1547
  },
1610
1548
  {
1611
- "kind": "field",
1612
1549
  "name": "disabled",
1613
1550
  "type": {
1614
1551
  "text": "boolean"
1615
1552
  },
1616
1553
  "default": "false",
1617
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.",
1618
- "attribute": "disabled",
1619
- "reflects": true,
1555
+ "fieldName": "disabled",
1620
1556
  "inheritedFrom": {
1621
1557
  "name": "InputMixin",
1622
1558
  "module": "src/common/mixins/InputMixin.ts"
1623
1559
  }
1624
1560
  },
1625
1561
  {
1626
- "kind": "field",
1627
1562
  "name": "name",
1628
1563
  "type": {
1629
1564
  "text": "string | undefined"
1630
1565
  },
1631
1566
  "description": "The name of the form component.",
1632
- "attribute": "name",
1567
+ "fieldName": "name",
1633
1568
  "inheritedFrom": {
1634
1569
  "name": "InputMixin",
1635
1570
  "module": "src/common/mixins/InputMixin.ts"
1636
1571
  }
1637
1572
  },
1638
1573
  {
1639
- "kind": "field",
1640
1574
  "name": "value",
1641
1575
  "type": {
1642
1576
  "text": "string"
1643
1577
  },
1644
1578
  "default": "\"\"",
1645
1579
  "description": "The value of the form component.",
1646
- "attribute": "value",
1647
- "inheritedFrom": {
1648
- "name": "InputMixin",
1649
- "module": "src/common/mixins/InputMixin.ts"
1650
- }
1651
- },
1652
- {
1653
- "kind": "field",
1654
- "name": "form",
1655
- "description": "Gets the form, if any, associated with the form element.",
1580
+ "fieldName": "value",
1656
1581
  "inheritedFrom": {
1657
1582
  "name": "InputMixin",
1658
1583
  "module": "src/common/mixins/InputMixin.ts"
1659
1584
  }
1660
- },
1661
- {
1662
- "kind": "field",
1663
- "name": "focusableRef",
1664
- "privacy": "protected",
1665
- "inheritedFrom": {
1666
- "name": "FocusableMixin",
1667
- "module": "src/common/mixins/FocusableMixin.ts"
1668
- }
1669
- },
1670
- {
1671
- "kind": "method",
1672
- "name": "focus",
1673
- "parameters": [
1674
- {
1675
- "name": "options",
1676
- "optional": true,
1677
- "type": {
1678
- "text": "FocusOptions"
1679
- },
1680
- "description": "An object which controls aspects of the focusing process."
1681
- }
1682
- ],
1683
- "description": "Programmatically move focus to the component.",
1684
- "inheritedFrom": {
1685
- "name": "FocusableMixin",
1686
- "module": "src/common/mixins/FocusableMixin.ts"
1687
- }
1688
- },
1585
+ }
1586
+ ],
1587
+ "mixins": [
1689
1588
  {
1690
- "kind": "method",
1691
- "name": "blur",
1692
- "description": "Programmatically remove focus from the component.",
1693
- "inheritedFrom": {
1694
- "name": "FocusableMixin",
1695
- "module": "src/common/mixins/FocusableMixin.ts"
1696
- }
1589
+ "name": "InputMixin",
1590
+ "module": "/src/common/mixins/InputMixin.js"
1697
1591
  },
1698
1592
  {
1699
- "kind": "method",
1700
- "name": "click",
1701
- "description": "Programmatically simulates a click on the component.",
1702
- "inheritedFrom": {
1703
- "name": "FocusableMixin",
1704
- "module": "src/common/mixins/FocusableMixin.ts"
1705
- }
1593
+ "name": "FocusableMixin",
1594
+ "module": "/src/common/mixins/FocusableMixin.js"
1706
1595
  }
1707
1596
  ],
1708
- "attributes": [
1709
- {
1710
- "name": "indeterminate",
1711
- "type": {
1712
- "text": "boolean"
1713
- },
1714
- "default": "false",
1715
- "description": "Controls whether the checkbox is in an indeterminate state.",
1716
- "fieldName": "indeterminate"
1717
- },
1718
- {
1719
- "name": "checked",
1720
- "type": {
1721
- "text": "boolean"
1722
- },
1723
- "default": "false",
1724
- "description": "Controls whether the checkbox is checked or not.",
1725
- "fieldName": "checked"
1726
- },
1727
- {
1728
- "name": "label",
1729
- "type": {
1730
- "text": "string"
1731
- },
1732
- "default": "\"\"",
1733
- "description": "Label for the input.",
1734
- "fieldName": "label",
1735
- "inheritedFrom": {
1736
- "name": "FormAssociatedMixin",
1737
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1738
- }
1739
- },
1740
- {
1741
- "name": "hint",
1742
- "type": {
1743
- "text": "string | undefined"
1744
- },
1745
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1746
- "fieldName": "hint",
1747
- "inheritedFrom": {
1748
- "name": "FormAssociatedMixin",
1749
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1750
- }
1751
- },
1752
- {
1753
- "name": "hide-label",
1754
- "type": {
1755
- "text": "boolean"
1756
- },
1757
- "default": "false",
1758
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1759
- "fieldName": "hideLabel",
1760
- "inheritedFrom": {
1761
- "name": "FormAssociatedMixin",
1762
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1763
- }
1764
- },
1765
- {
1766
- "name": "placeholder",
1767
- "type": {
1768
- "text": "string | undefined"
1769
- },
1770
- "description": "Placeholder text to display within the input.",
1771
- "fieldName": "placeholder",
1772
- "inheritedFrom": {
1773
- "name": "FormAssociatedMixin",
1774
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1775
- }
1776
- },
1597
+ "superclass": {
1598
+ "name": "LitElement",
1599
+ "package": "lit"
1600
+ },
1601
+ "status": "ready",
1602
+ "category": "action",
1603
+ "displayName": null,
1604
+ "examples": [],
1605
+ "tagName": "nord-button",
1606
+ "customElement": true
1607
+ }
1608
+ ],
1609
+ "exports": [
1610
+ {
1611
+ "kind": "js",
1612
+ "name": "default",
1613
+ "declaration": {
1614
+ "name": "Button",
1615
+ "module": "src/button/Button.ts"
1616
+ }
1617
+ },
1618
+ {
1619
+ "kind": "custom-element-definition",
1620
+ "name": "nord-button",
1621
+ "declaration": {
1622
+ "name": "Button",
1623
+ "module": "src/button/Button.ts"
1624
+ }
1625
+ }
1626
+ ],
1627
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\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"
1628
+ },
1629
+ {
1630
+ "kind": "javascript-module",
1631
+ "path": "src/badge/Badge.ts",
1632
+ "declarations": [
1633
+ {
1634
+ "kind": "class",
1635
+ "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.",
1636
+ "name": "Badge",
1637
+ "slots": [
1777
1638
  {
1778
- "name": "error",
1779
- "type": {
1780
- "text": "string | undefined"
1781
- },
1782
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1783
- "fieldName": "error",
1784
- "inheritedFrom": {
1785
- "name": "FormAssociatedMixin",
1786
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1787
- }
1788
- },
1639
+ "description": "The badge content.",
1640
+ "name": ""
1641
+ }
1642
+ ],
1643
+ "members": [
1789
1644
  {
1790
- "name": "required",
1645
+ "kind": "field",
1646
+ "name": "type",
1791
1647
  "type": {
1792
- "text": "boolean"
1648
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1793
1649
  },
1794
- "default": "false",
1795
- "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.",
1796
- "fieldName": "required",
1797
- "inheritedFrom": {
1798
- "name": "FormAssociatedMixin",
1799
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1800
- }
1650
+ "default": "\"neutral\"",
1651
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1652
+ "attribute": "type",
1653
+ "reflects": true
1801
1654
  },
1802
1655
  {
1803
- "name": "disabled",
1656
+ "kind": "field",
1657
+ "name": "progress",
1804
1658
  "type": {
1805
- "text": "boolean"
1659
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1806
1660
  },
1807
- "default": "false",
1808
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1809
- "fieldName": "disabled",
1810
- "inheritedFrom": {
1811
- "name": "InputMixin",
1812
- "module": "src/common/mixins/InputMixin.ts"
1813
- }
1814
- },
1661
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1662
+ "attribute": "progress"
1663
+ }
1664
+ ],
1665
+ "attributes": [
1815
1666
  {
1816
- "name": "name",
1667
+ "name": "type",
1817
1668
  "type": {
1818
- "text": "string | undefined"
1669
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1819
1670
  },
1820
- "description": "The name of the form component.",
1821
- "fieldName": "name",
1822
- "inheritedFrom": {
1823
- "name": "InputMixin",
1824
- "module": "src/common/mixins/InputMixin.ts"
1825
- }
1671
+ "default": "\"neutral\"",
1672
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1673
+ "fieldName": "type"
1826
1674
  },
1827
1675
  {
1828
- "name": "value",
1676
+ "name": "progress",
1829
1677
  "type": {
1830
- "text": "string"
1678
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1831
1679
  },
1832
- "default": "\"\"",
1833
- "description": "The value of the form component.",
1834
- "fieldName": "value",
1835
- "inheritedFrom": {
1836
- "name": "InputMixin",
1837
- "module": "src/common/mixins/InputMixin.ts"
1838
- }
1839
- }
1840
- ],
1841
- "mixins": [
1842
- {
1843
- "name": "FormAssociatedMixin",
1844
- "module": "/src/common/mixins/FormAssociatedMixin.js"
1845
- },
1846
- {
1847
- "name": "InputMixin",
1848
- "module": "/src/common/mixins/InputMixin.js"
1849
- },
1850
- {
1851
- "name": "FocusableMixin",
1852
- "module": "/src/common/mixins/FocusableMixin.js"
1680
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1681
+ "fieldName": "progress"
1853
1682
  }
1854
1683
  ],
1855
1684
  "superclass": {
@@ -1857,35 +1686,11 @@
1857
1686
  "package": "lit"
1858
1687
  },
1859
1688
  "status": "ready",
1860
- "category": "form",
1689
+ "category": "text",
1861
1690
  "displayName": null,
1862
1691
  "examples": [],
1863
- "tagName": "nord-checkbox",
1864
- "customElement": true,
1865
- "events": [
1866
- {
1867
- "name": "input",
1868
- "type": {
1869
- "text": "NordEvent"
1870
- },
1871
- "description": "Fired as the user types into the input.",
1872
- "inheritedFrom": {
1873
- "name": "FormAssociatedMixin",
1874
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1875
- }
1876
- },
1877
- {
1878
- "name": "change",
1879
- "type": {
1880
- "text": "NordEvent"
1881
- },
1882
- "description": "Fired whenever the input's value is changed via user interaction.",
1883
- "inheritedFrom": {
1884
- "name": "FormAssociatedMixin",
1885
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1886
- }
1887
- }
1888
- ]
1692
+ "tagName": "nord-badge",
1693
+ "customElement": true
1889
1694
  }
1890
1695
  ],
1891
1696
  "exports": [
@@ -1893,529 +1698,756 @@
1893
1698
  "kind": "js",
1894
1699
  "name": "default",
1895
1700
  "declaration": {
1896
- "name": "Checkbox",
1897
- "module": "src/checkbox/Checkbox.ts"
1701
+ "name": "Badge",
1702
+ "module": "src/badge/Badge.ts"
1898
1703
  }
1899
1704
  },
1900
1705
  {
1901
1706
  "kind": "custom-element-definition",
1902
- "name": "nord-checkbox",
1707
+ "name": "nord-badge",
1903
1708
  "declaration": {
1904
- "name": "Checkbox",
1905
- "module": "src/checkbox/Checkbox.ts"
1709
+ "name": "Badge",
1710
+ "module": "src/badge/Badge.ts"
1906
1711
  }
1907
1712
  }
1908
1713
  ],
1909
- "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 serviceand 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"
1714
+ "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 “draftor “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
1910
1715
  },
1911
1716
  {
1912
1717
  "kind": "javascript-module",
1913
- "path": "src/calendar/Calendar.ts",
1718
+ "path": "src/card/Card.ts",
1914
1719
  "declarations": [
1915
1720
  {
1916
1721
  "kind": "class",
1917
- "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.",
1918
- "name": "Calendar",
1722
+ "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.",
1723
+ "name": "Card",
1919
1724
  "cssProperties": [
1920
1725
  {
1921
1726
  "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1922
- "name": "--n-calendar-border-radius",
1727
+ "name": "--n-card-border-radius",
1923
1728
  "default": "var(--n-border-radius)"
1924
1729
  },
1925
1730
  {
1926
1731
  "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1927
- "name": "--n-calendar-box-shadow",
1732
+ "name": "--n-card-box-shadow",
1928
1733
  "default": "var(--n-box-shadow-popout)"
1929
- }
1930
- ],
1931
- "members": [
1734
+ },
1932
1735
  {
1933
- "kind": "field",
1934
- "name": "dialogLabelId",
1935
- "type": {
1936
- "text": "string"
1937
- },
1938
- "privacy": "private",
1939
- "default": "\"dialog-header\""
1736
+ "description": "Controls the padding on all sides of the card.",
1737
+ "name": "--n-card-padding",
1738
+ "default": "var(--n-space-m)"
1940
1739
  },
1941
1740
  {
1942
- "kind": "field",
1943
- "name": "monthSelectNode",
1944
- "type": {
1945
- "text": "HTMLElement"
1946
- },
1947
- "privacy": "private"
1741
+ "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
1742
+ "name": "--n-card-slot-padding",
1743
+ "default": "var(--n-space-m)"
1744
+ }
1745
+ ],
1746
+ "slots": [
1747
+ {
1748
+ "description": "The card content.",
1749
+ "name": ""
1948
1750
  },
1949
1751
  {
1950
- "kind": "field",
1951
- "name": "focusedDayNode",
1952
- "type": {
1953
- "text": "HTMLButtonElement"
1954
- },
1955
- "privacy": "private"
1752
+ "description": "Optional slot that holds a header for the card.",
1753
+ "name": "header"
1956
1754
  },
1957
1755
  {
1958
- "kind": "field",
1959
- "name": "direction",
1960
- "privacy": "private",
1961
- "default": "new DirectionController(this)"
1756
+ "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
1757
+ "name": "header-end"
1962
1758
  },
1759
+ {
1760
+ "description": "Optional slot that holds footer content for the card.",
1761
+ "name": "footer"
1762
+ }
1763
+ ],
1764
+ "members": [
1963
1765
  {
1964
1766
  "kind": "field",
1965
- "name": "swipe",
1767
+ "name": "headerSlot",
1966
1768
  "privacy": "private",
1967
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1769
+ "default": "new SlotController(this, \"header\")"
1968
1770
  },
1969
1771
  {
1970
1772
  "kind": "field",
1971
- "name": "shortcuts",
1972
- "privacy": "private"
1773
+ "name": "headerEndSlot",
1774
+ "privacy": "private",
1775
+ "default": "new SlotController(this, \"header-end\")"
1973
1776
  },
1974
1777
  {
1975
1778
  "kind": "field",
1976
- "name": "localize",
1779
+ "name": "footerSlot",
1977
1780
  "privacy": "private",
1978
- "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1781
+ "default": "new SlotController(this, \"footer\")"
1979
1782
  },
1980
1783
  {
1981
1784
  "kind": "field",
1982
- "name": "dateFormatShort",
1785
+ "name": "padding",
1983
1786
  "type": {
1984
- "text": "Intl.DateTimeFormat"
1787
+ "text": "\"m\" | \"l\" | \"none\""
1985
1788
  },
1986
- "privacy": "private",
1987
- "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"
1988
- },
1789
+ "default": "\"m\"",
1790
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1791
+ "attribute": "padding",
1792
+ "reflects": true
1793
+ }
1794
+ ],
1795
+ "attributes": [
1989
1796
  {
1990
- "kind": "field",
1991
- "name": "monthNames",
1797
+ "name": "padding",
1992
1798
  "type": {
1993
- "text": "string[]"
1799
+ "text": "\"m\" | \"l\" | \"none\""
1994
1800
  },
1995
- "privacy": "private"
1801
+ "default": "\"m\"",
1802
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1803
+ "fieldName": "padding"
1804
+ }
1805
+ ],
1806
+ "superclass": {
1807
+ "name": "LitElement",
1808
+ "package": "lit"
1809
+ },
1810
+ "status": "ready",
1811
+ "category": "structure",
1812
+ "displayName": null,
1813
+ "examples": [],
1814
+ "tagName": "nord-card",
1815
+ "customElement": true
1816
+ }
1817
+ ],
1818
+ "exports": [
1819
+ {
1820
+ "kind": "js",
1821
+ "name": "default",
1822
+ "declaration": {
1823
+ "name": "Card",
1824
+ "module": "src/card/Card.ts"
1825
+ }
1826
+ },
1827
+ {
1828
+ "kind": "custom-element-definition",
1829
+ "name": "nord-card",
1830
+ "declaration": {
1831
+ "name": "Card",
1832
+ "module": "src/card/Card.ts"
1833
+ }
1834
+ }
1835
+ ],
1836
+ "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 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"
1837
+ },
1838
+ {
1839
+ "kind": "javascript-module",
1840
+ "path": "src/checkbox/Checkbox.ts",
1841
+ "declarations": [
1842
+ {
1843
+ "kind": "class",
1844
+ "description": "Checkboxes allow user to choose one or more options from a limited set of options.\nIf you have more than 10 options, please use Select component instead.",
1845
+ "name": "Checkbox",
1846
+ "slots": [
1847
+ {
1848
+ "description": "Use when a label requires more than plain text.",
1849
+ "name": "label"
1850
+ },
1851
+ {
1852
+ "description": "Optional slot that holds hint text for the input.",
1853
+ "name": "hint"
1996
1854
  },
1855
+ {
1856
+ "description": "Optional slot that holds error text for the input.",
1857
+ "name": "error"
1858
+ }
1859
+ ],
1860
+ "members": [
1997
1861
  {
1998
1862
  "kind": "field",
1999
- "name": "monthNamesShort",
2000
- "type": {
2001
- "text": "string[]"
2002
- },
2003
- "privacy": "private"
1863
+ "name": "formValue",
1864
+ "privacy": "protected",
1865
+ "inheritedFrom": {
1866
+ "name": "FormAssociatedMixin",
1867
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1868
+ }
2004
1869
  },
2005
1870
  {
2006
1871
  "kind": "field",
2007
- "name": "dayNames",
1872
+ "name": "indeterminate",
2008
1873
  "type": {
2009
- "text": "string[]"
1874
+ "text": "boolean"
2010
1875
  },
2011
- "privacy": "private"
1876
+ "default": "false",
1877
+ "description": "Controls whether the checkbox is in an indeterminate state.",
1878
+ "attribute": "indeterminate"
2012
1879
  },
2013
1880
  {
2014
1881
  "kind": "field",
2015
- "name": "dayNamesShort",
1882
+ "name": "checked",
2016
1883
  "type": {
2017
- "text": "string[]"
1884
+ "text": "boolean"
2018
1885
  },
2019
- "privacy": "private"
1886
+ "default": "false",
1887
+ "description": "Controls whether the checkbox is checked or not.",
1888
+ "attribute": "checked"
2020
1889
  },
2021
1890
  {
2022
- "kind": "field",
2023
- "name": "value",
2024
- "type": {
2025
- "text": "string"
1891
+ "kind": "method",
1892
+ "name": "handleChange",
1893
+ "privacy": "protected",
1894
+ "parameters": [
1895
+ {
1896
+ "name": "e",
1897
+ "type": {
1898
+ "text": "Event"
1899
+ }
1900
+ }
1901
+ ],
1902
+ "return": {
1903
+ "type": {
1904
+ "text": "void"
1905
+ }
2026
1906
  },
2027
- "default": "\"\"",
2028
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2029
- "attribute": "value"
1907
+ "inheritedFrom": {
1908
+ "name": "FormAssociatedMixin",
1909
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1910
+ }
2030
1911
  },
2031
1912
  {
2032
1913
  "kind": "field",
2033
- "name": "firstDayOfWeek",
1914
+ "name": "size",
2034
1915
  "type": {
2035
- "text": "DaysOfWeek"
1916
+ "text": "\"s\" | \"m\" | \"l\""
2036
1917
  },
2037
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2038
- "attribute": "firstDayOfWeek"
1918
+ "default": "\"m\"",
1919
+ "description": "The size of the component.",
1920
+ "attribute": "size",
1921
+ "reflects": true,
1922
+ "inheritedFrom": {
1923
+ "name": "SizeMixin",
1924
+ "module": "src/common/mixins/SizeMixin.ts"
1925
+ }
2039
1926
  },
2040
1927
  {
2041
1928
  "kind": "field",
2042
- "name": "min",
2043
- "type": {
2044
- "text": "string"
2045
- },
2046
- "default": "\"\"",
2047
- "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.",
2048
- "attribute": "min"
1929
+ "name": "labelSlot",
1930
+ "privacy": "protected",
1931
+ "default": "new SlotController(this, \"label\")",
1932
+ "inheritedFrom": {
1933
+ "name": "FormAssociatedMixin",
1934
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1935
+ }
2049
1936
  },
2050
1937
  {
2051
1938
  "kind": "field",
2052
- "name": "max",
2053
- "type": {
2054
- "text": "string"
2055
- },
2056
- "default": "\"\"",
2057
- "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.",
2058
- "attribute": "max"
1939
+ "name": "errorSlot",
1940
+ "privacy": "protected",
1941
+ "default": "new SlotController(this, \"error\")",
1942
+ "inheritedFrom": {
1943
+ "name": "FormAssociatedMixin",
1944
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1945
+ }
2059
1946
  },
2060
1947
  {
2061
1948
  "kind": "field",
2062
- "name": "expand",
2063
- "type": {
2064
- "text": "boolean"
2065
- },
2066
- "default": "false",
2067
- "description": "Controls whether the calendar expands to fill the width of its container.",
2068
- "attribute": "expand",
2069
- "reflects": true
1949
+ "name": "hintSlot",
1950
+ "privacy": "protected",
1951
+ "default": "new SlotController(this, \"hint\")",
1952
+ "inheritedFrom": {
1953
+ "name": "FormAssociatedMixin",
1954
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1955
+ }
2070
1956
  },
2071
1957
  {
2072
1958
  "kind": "field",
2073
- "name": "isDateDisabled",
2074
- "type": {
2075
- "text": "DateDisabledPredicate"
2076
- },
2077
- "default": "isDateDisabled",
2078
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1959
+ "name": "formData",
1960
+ "privacy": "protected",
1961
+ "default": "new FormDataController(this, { value: () => this.formValue })",
1962
+ "inheritedFrom": {
1963
+ "name": "FormAssociatedMixin",
1964
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1965
+ }
2079
1966
  },
2080
1967
  {
2081
1968
  "kind": "field",
2082
- "name": "activeFocus",
1969
+ "name": "inputId",
2083
1970
  "type": {
2084
- "text": "boolean"
1971
+ "text": "string"
2085
1972
  },
2086
- "privacy": "private",
2087
- "default": "false"
1973
+ "privacy": "protected",
1974
+ "default": "\"input\"",
1975
+ "inheritedFrom": {
1976
+ "name": "FormAssociatedMixin",
1977
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1978
+ }
2088
1979
  },
2089
1980
  {
2090
1981
  "kind": "field",
2091
- "name": "focusedDay",
2092
- "privacy": "private",
2093
- "default": "new Date()"
1982
+ "name": "errorId",
1983
+ "type": {
1984
+ "text": "string"
1985
+ },
1986
+ "privacy": "protected",
1987
+ "default": "\"error\"",
1988
+ "inheritedFrom": {
1989
+ "name": "FormAssociatedMixin",
1990
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1991
+ }
2094
1992
  },
2095
1993
  {
2096
- "kind": "method",
2097
- "name": "focus",
2098
- "parameters": [
2099
- {
2100
- "name": "options",
2101
- "optional": true,
2102
- "type": {
2103
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
2104
- },
2105
- "description": "An object which controls aspects of the focusing process."
2106
- }
2107
- ],
2108
- "description": "Programmatically move focus to the calendar."
1994
+ "kind": "field",
1995
+ "name": "hintId",
1996
+ "type": {
1997
+ "text": "string"
1998
+ },
1999
+ "privacy": "protected",
2000
+ "default": "\"hint\"",
2001
+ "inheritedFrom": {
2002
+ "name": "FormAssociatedMixin",
2003
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2004
+ }
2109
2005
  },
2110
2006
  {
2111
- "kind": "method",
2112
- "name": "handleValueChange",
2113
- "privacy": "protected"
2007
+ "kind": "field",
2008
+ "name": "label",
2009
+ "type": {
2010
+ "text": "string"
2011
+ },
2012
+ "default": "\"\"",
2013
+ "description": "Label for the input.",
2014
+ "attribute": "label",
2015
+ "inheritedFrom": {
2016
+ "name": "FormAssociatedMixin",
2017
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2018
+ }
2114
2019
  },
2115
2020
  {
2116
- "kind": "method",
2117
- "name": "handleFocusedDayChange",
2118
- "privacy": "protected"
2021
+ "kind": "field",
2022
+ "name": "hint",
2023
+ "type": {
2024
+ "text": "string | undefined"
2025
+ },
2026
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2027
+ "attribute": "hint",
2028
+ "inheritedFrom": {
2029
+ "name": "FormAssociatedMixin",
2030
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2031
+ }
2119
2032
  },
2120
2033
  {
2121
- "kind": "method",
2122
- "name": "handleLangChange",
2123
- "privacy": "private"
2034
+ "kind": "field",
2035
+ "name": "hideLabel",
2036
+ "type": {
2037
+ "text": "boolean"
2038
+ },
2039
+ "default": "false",
2040
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2041
+ "attribute": "hide-label",
2042
+ "inheritedFrom": {
2043
+ "name": "FormAssociatedMixin",
2044
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2045
+ }
2124
2046
  },
2125
2047
  {
2126
2048
  "kind": "field",
2127
- "name": "handleDaySelect",
2128
- "privacy": "private"
2049
+ "name": "placeholder",
2050
+ "type": {
2051
+ "text": "string | undefined"
2052
+ },
2053
+ "description": "Placeholder text to display within the input.",
2054
+ "attribute": "placeholder",
2055
+ "inheritedFrom": {
2056
+ "name": "FormAssociatedMixin",
2057
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2058
+ }
2129
2059
  },
2130
2060
  {
2131
- "kind": "method",
2132
- "name": "addDays",
2133
- "privacy": "private",
2134
- "parameters": [
2135
- {
2136
- "name": "days",
2137
- "type": {
2138
- "text": "number"
2139
- }
2140
- }
2141
- ]
2061
+ "kind": "field",
2062
+ "name": "error",
2063
+ "type": {
2064
+ "text": "string | undefined"
2065
+ },
2066
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2067
+ "attribute": "error",
2068
+ "inheritedFrom": {
2069
+ "name": "FormAssociatedMixin",
2070
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2071
+ }
2142
2072
  },
2143
2073
  {
2144
- "kind": "method",
2145
- "name": "addMonths",
2146
- "privacy": "private",
2147
- "parameters": [
2148
- {
2149
- "name": "months",
2150
- "type": {
2151
- "text": "number"
2152
- }
2153
- }
2154
- ]
2074
+ "kind": "field",
2075
+ "name": "required",
2076
+ "type": {
2077
+ "text": "boolean"
2078
+ },
2079
+ "default": "false",
2080
+ "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.",
2081
+ "attribute": "required",
2082
+ "inheritedFrom": {
2083
+ "name": "FormAssociatedMixin",
2084
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2085
+ }
2155
2086
  },
2156
2087
  {
2157
2088
  "kind": "method",
2158
- "name": "addYears",
2159
- "privacy": "private",
2089
+ "name": "handleInput",
2090
+ "privacy": "protected",
2160
2091
  "parameters": [
2161
2092
  {
2162
- "name": "years",
2093
+ "name": "e",
2163
2094
  "type": {
2164
- "text": "number"
2095
+ "text": "Event"
2165
2096
  }
2166
2097
  }
2167
- ]
2168
- },
2169
- {
2170
- "kind": "method",
2171
- "name": "startOfWeek",
2172
- "privacy": "private"
2098
+ ],
2099
+ "inheritedFrom": {
2100
+ "name": "FormAssociatedMixin",
2101
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2102
+ }
2173
2103
  },
2174
2104
  {
2175
2105
  "kind": "method",
2176
- "name": "endOfWeek",
2177
- "privacy": "private"
2106
+ "name": "renderLabel",
2107
+ "privacy": "protected",
2108
+ "inheritedFrom": {
2109
+ "name": "FormAssociatedMixin",
2110
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2111
+ }
2178
2112
  },
2179
2113
  {
2180
2114
  "kind": "method",
2181
- "name": "setMonth",
2182
- "privacy": "private",
2183
- "parameters": [
2184
- {
2185
- "name": "month",
2186
- "type": {
2187
- "text": "number"
2188
- }
2189
- }
2190
- ]
2115
+ "name": "renderError",
2116
+ "privacy": "protected",
2117
+ "inheritedFrom": {
2118
+ "name": "FormAssociatedMixin",
2119
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2120
+ }
2191
2121
  },
2192
2122
  {
2193
2123
  "kind": "method",
2194
- "name": "setYear",
2195
- "privacy": "private",
2196
- "parameters": [
2197
- {
2198
- "name": "year",
2199
- "type": {
2200
- "text": "number"
2201
- }
2202
- }
2203
- ]
2124
+ "name": "getDescribedBy",
2125
+ "privacy": "protected",
2126
+ "inheritedFrom": {
2127
+ "name": "FormAssociatedMixin",
2128
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2129
+ }
2204
2130
  },
2205
2131
  {
2206
2132
  "kind": "method",
2207
- "name": "setFocusedDay",
2208
- "privacy": "private",
2209
- "parameters": [
2210
- {
2211
- "name": "day",
2212
- "type": {
2213
- "text": "Date"
2214
- }
2215
- }
2216
- ]
2133
+ "name": "getInvalid",
2134
+ "privacy": "protected",
2135
+ "inheritedFrom": {
2136
+ "name": "FormAssociatedMixin",
2137
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2138
+ }
2217
2139
  },
2218
2140
  {
2219
2141
  "kind": "field",
2220
- "name": "handleMonthSelect",
2221
- "privacy": "private"
2142
+ "name": "hasHint",
2143
+ "privacy": "protected",
2144
+ "inheritedFrom": {
2145
+ "name": "FormAssociatedMixin",
2146
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2147
+ }
2222
2148
  },
2223
2149
  {
2224
2150
  "kind": "field",
2225
- "name": "handleYearSelect",
2226
- "privacy": "private"
2151
+ "name": "hasError",
2152
+ "privacy": "protected",
2153
+ "inheritedFrom": {
2154
+ "name": "FormAssociatedMixin",
2155
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2156
+ }
2227
2157
  },
2228
2158
  {
2229
2159
  "kind": "field",
2230
- "name": "handleNextMonthClick",
2231
- "privacy": "private"
2160
+ "name": "disabled",
2161
+ "type": {
2162
+ "text": "boolean"
2163
+ },
2164
+ "default": "false",
2165
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2166
+ "attribute": "disabled",
2167
+ "reflects": true,
2168
+ "inheritedFrom": {
2169
+ "name": "InputMixin",
2170
+ "module": "src/common/mixins/InputMixin.ts"
2171
+ }
2232
2172
  },
2233
2173
  {
2234
2174
  "kind": "field",
2235
- "name": "handlePreviousMonthClick",
2236
- "privacy": "private"
2237
- },
2175
+ "name": "name",
2176
+ "type": {
2177
+ "text": "string | undefined"
2178
+ },
2179
+ "description": "The name of the form component.",
2180
+ "attribute": "name",
2181
+ "inheritedFrom": {
2182
+ "name": "InputMixin",
2183
+ "module": "src/common/mixins/InputMixin.ts"
2184
+ }
2185
+ },
2238
2186
  {
2239
2187
  "kind": "field",
2240
- "name": "enableActiveFocus",
2241
- "privacy": "private"
2188
+ "name": "value",
2189
+ "type": {
2190
+ "text": "string"
2191
+ },
2192
+ "default": "\"\"",
2193
+ "description": "The value of the form component.",
2194
+ "attribute": "value",
2195
+ "inheritedFrom": {
2196
+ "name": "InputMixin",
2197
+ "module": "src/common/mixins/InputMixin.ts"
2198
+ }
2242
2199
  },
2243
2200
  {
2244
2201
  "kind": "field",
2245
- "name": "disableActiveFocus",
2246
- "privacy": "private"
2202
+ "name": "form",
2203
+ "description": "Gets the form, if any, associated with the form element.",
2204
+ "inheritedFrom": {
2205
+ "name": "InputMixin",
2206
+ "module": "src/common/mixins/InputMixin.ts"
2207
+ }
2208
+ },
2209
+ {
2210
+ "kind": "field",
2211
+ "name": "focusableRef",
2212
+ "privacy": "protected",
2213
+ "inheritedFrom": {
2214
+ "name": "FocusableMixin",
2215
+ "module": "src/common/mixins/FocusableMixin.ts"
2216
+ }
2217
+ },
2218
+ {
2219
+ "kind": "method",
2220
+ "name": "focus",
2221
+ "parameters": [
2222
+ {
2223
+ "name": "options",
2224
+ "optional": true,
2225
+ "type": {
2226
+ "text": "FocusOptions"
2227
+ },
2228
+ "description": "An object which controls aspects of the focusing process."
2229
+ }
2230
+ ],
2231
+ "description": "Programmatically move focus to the component.",
2232
+ "inheritedFrom": {
2233
+ "name": "FocusableMixin",
2234
+ "module": "src/common/mixins/FocusableMixin.ts"
2235
+ }
2236
+ },
2237
+ {
2238
+ "kind": "method",
2239
+ "name": "blur",
2240
+ "description": "Programmatically remove focus from the component.",
2241
+ "inheritedFrom": {
2242
+ "name": "FocusableMixin",
2243
+ "module": "src/common/mixins/FocusableMixin.ts"
2244
+ }
2245
+ },
2246
+ {
2247
+ "kind": "method",
2248
+ "name": "click",
2249
+ "description": "Programmatically simulates a click on the component.",
2250
+ "inheritedFrom": {
2251
+ "name": "FocusableMixin",
2252
+ "module": "src/common/mixins/FocusableMixin.ts"
2253
+ }
2247
2254
  }
2248
2255
  ],
2249
- "events": [
2256
+ "attributes": [
2250
2257
  {
2251
- "name": "nord-focus-date",
2258
+ "name": "indeterminate",
2252
2259
  "type": {
2253
- "text": "DateSelectEvent"
2260
+ "text": "boolean"
2254
2261
  },
2255
- "description": "Dispatched when the calendar's focused date changes."
2262
+ "default": "false",
2263
+ "description": "Controls whether the checkbox is in an indeterminate state.",
2264
+ "fieldName": "indeterminate"
2256
2265
  },
2257
2266
  {
2267
+ "name": "checked",
2258
2268
  "type": {
2259
- "text": "DateSelectEvent"
2269
+ "text": "boolean"
2260
2270
  },
2261
- "description": "Dispatched when a date is selected and the value changes.",
2262
- "name": "change"
2263
- }
2264
- ],
2265
- "attributes": [
2271
+ "default": "false",
2272
+ "description": "Controls whether the checkbox is checked or not.",
2273
+ "fieldName": "checked"
2274
+ },
2266
2275
  {
2267
- "name": "value",
2276
+ "name": "size",
2277
+ "type": {
2278
+ "text": "\"s\" | \"m\" | \"l\""
2279
+ },
2280
+ "default": "\"m\"",
2281
+ "description": "The size of the component.",
2282
+ "fieldName": "size",
2283
+ "inheritedFrom": {
2284
+ "name": "SizeMixin",
2285
+ "module": "src/common/mixins/SizeMixin.ts"
2286
+ }
2287
+ },
2288
+ {
2289
+ "name": "label",
2268
2290
  "type": {
2269
2291
  "text": "string"
2270
2292
  },
2271
2293
  "default": "\"\"",
2272
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2273
- "fieldName": "value"
2294
+ "description": "Label for the input.",
2295
+ "fieldName": "label",
2296
+ "inheritedFrom": {
2297
+ "name": "FormAssociatedMixin",
2298
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2299
+ }
2274
2300
  },
2275
2301
  {
2276
- "name": "firstDayOfWeek",
2302
+ "name": "hint",
2277
2303
  "type": {
2278
- "text": "DaysOfWeek"
2304
+ "text": "string | undefined"
2279
2305
  },
2280
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2281
- "fieldName": "firstDayOfWeek"
2306
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
2307
+ "fieldName": "hint",
2308
+ "inheritedFrom": {
2309
+ "name": "FormAssociatedMixin",
2310
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2311
+ }
2282
2312
  },
2283
2313
  {
2284
- "name": "min",
2314
+ "name": "hide-label",
2285
2315
  "type": {
2286
- "text": "string"
2316
+ "text": "boolean"
2287
2317
  },
2288
- "default": "\"\"",
2289
- "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.",
2290
- "fieldName": "min"
2318
+ "default": "false",
2319
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
2320
+ "fieldName": "hideLabel",
2321
+ "inheritedFrom": {
2322
+ "name": "FormAssociatedMixin",
2323
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2324
+ }
2291
2325
  },
2292
2326
  {
2293
- "name": "max",
2327
+ "name": "placeholder",
2294
2328
  "type": {
2295
- "text": "string"
2329
+ "text": "string | undefined"
2296
2330
  },
2297
- "default": "\"\"",
2298
- "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.",
2299
- "fieldName": "max"
2331
+ "description": "Placeholder text to display within the input.",
2332
+ "fieldName": "placeholder",
2333
+ "inheritedFrom": {
2334
+ "name": "FormAssociatedMixin",
2335
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2336
+ }
2300
2337
  },
2301
2338
  {
2302
- "name": "expand",
2339
+ "name": "error",
2340
+ "type": {
2341
+ "text": "string | undefined"
2342
+ },
2343
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
2344
+ "fieldName": "error",
2345
+ "inheritedFrom": {
2346
+ "name": "FormAssociatedMixin",
2347
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2348
+ }
2349
+ },
2350
+ {
2351
+ "name": "required",
2303
2352
  "type": {
2304
2353
  "text": "boolean"
2305
2354
  },
2306
2355
  "default": "false",
2307
- "description": "Controls whether the calendar expands to fill the width of its container.",
2308
- "fieldName": "expand"
2356
+ "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.",
2357
+ "fieldName": "required",
2358
+ "inheritedFrom": {
2359
+ "name": "FormAssociatedMixin",
2360
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2361
+ }
2362
+ },
2363
+ {
2364
+ "name": "disabled",
2365
+ "type": {
2366
+ "text": "boolean"
2367
+ },
2368
+ "default": "false",
2369
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
2370
+ "fieldName": "disabled",
2371
+ "inheritedFrom": {
2372
+ "name": "InputMixin",
2373
+ "module": "src/common/mixins/InputMixin.ts"
2374
+ }
2375
+ },
2376
+ {
2377
+ "name": "name",
2378
+ "type": {
2379
+ "text": "string | undefined"
2380
+ },
2381
+ "description": "The name of the form component.",
2382
+ "fieldName": "name",
2383
+ "inheritedFrom": {
2384
+ "name": "InputMixin",
2385
+ "module": "src/common/mixins/InputMixin.ts"
2386
+ }
2387
+ },
2388
+ {
2389
+ "name": "value",
2390
+ "type": {
2391
+ "text": "string"
2392
+ },
2393
+ "default": "\"\"",
2394
+ "description": "The value of the form component.",
2395
+ "fieldName": "value",
2396
+ "inheritedFrom": {
2397
+ "name": "InputMixin",
2398
+ "module": "src/common/mixins/InputMixin.ts"
2399
+ }
2400
+ }
2401
+ ],
2402
+ "mixins": [
2403
+ {
2404
+ "name": "SizeMixin",
2405
+ "module": "/src/common/mixins/SizeMixin.js"
2406
+ },
2407
+ {
2408
+ "name": "FormAssociatedMixin",
2409
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
2410
+ },
2411
+ {
2412
+ "name": "InputMixin",
2413
+ "module": "/src/common/mixins/InputMixin.js"
2414
+ },
2415
+ {
2416
+ "name": "FocusableMixin",
2417
+ "module": "/src/common/mixins/FocusableMixin.js"
2309
2418
  }
2310
2419
  ],
2311
2420
  "superclass": {
2312
- "name": "LitElement",
2313
- "package": "lit"
2314
- },
2315
- "status": "ready",
2316
- "category": "list",
2317
- "displayName": null,
2318
- "examples": [],
2319
- "tagName": "nord-calendar",
2320
- "customElement": true
2321
- }
2322
- ],
2323
- "exports": [
2324
- {
2325
- "kind": "js",
2326
- "name": "default",
2327
- "declaration": {
2328
- "name": "Calendar",
2329
- "module": "src/calendar/Calendar.ts"
2330
- }
2331
- },
2332
- {
2333
- "kind": "custom-element-definition",
2334
- "name": "nord-calendar",
2335
- "declaration": {
2336
- "name": "Calendar",
2337
- "module": "src/calendar/Calendar.ts"
2338
- }
2339
- }
2340
- ],
2341
- "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"
2342
- },
2343
- {
2344
- "kind": "javascript-module",
2345
- "path": "src/calendar/DateSelectEvent.ts",
2346
- "declarations": [
2347
- {
2348
- "kind": "class",
2349
- "description": "",
2350
- "name": "DateSelectEvent",
2351
- "superclass": {
2352
- "name": "NordEvent",
2353
- "module": "/src/common/events.js"
2354
- },
2355
- "examples": []
2356
- }
2357
- ],
2358
- "exports": [
2359
- {
2360
- "kind": "js",
2361
- "name": "DateSelectEvent",
2362
- "declaration": {
2363
- "name": "DateSelectEvent",
2364
- "module": "src/calendar/DateSelectEvent.ts"
2365
- }
2366
- }
2367
- ],
2368
- "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"
2369
- },
2370
- {
2371
- "kind": "javascript-module",
2372
- "path": "src/calendar/localization.ts",
2373
- "declarations": [
2374
- {
2375
- "kind": "variable",
2376
- "name": "calendarLocalization",
2377
- "type": {
2378
- "text": "object"
2421
+ "name": "LitElement",
2422
+ "package": "lit"
2379
2423
  },
2380
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
2381
- }
2382
- ],
2383
- "exports": [
2384
- {
2385
- "kind": "js",
2386
- "name": "default",
2387
- "declaration": {
2388
- "name": "calendarLocalization",
2389
- "module": "src/calendar/localization.ts"
2390
- }
2391
- }
2392
- ],
2393
- "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"
2394
- },
2395
- {
2396
- "kind": "javascript-module",
2397
- "path": "src/calendar/month-view.ts",
2398
- "declarations": [
2399
- {
2400
- "kind": "function",
2401
- "name": "dayView",
2402
- "parameters": [
2424
+ "status": "ready",
2425
+ "category": "form",
2426
+ "displayName": null,
2427
+ "examples": [],
2428
+ "tagName": "nord-checkbox",
2429
+ "customElement": true,
2430
+ "events": [
2403
2431
  {
2404
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
2432
+ "name": "input",
2405
2433
  "type": {
2406
- "text": "DatePickerDayProps"
2434
+ "text": "NordEvent"
2435
+ },
2436
+ "description": "Fired as the user types into the input.",
2437
+ "inheritedFrom": {
2438
+ "name": "FormAssociatedMixin",
2439
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2407
2440
  }
2408
- }
2409
- ]
2410
- },
2411
- {
2412
- "kind": "function",
2413
- "name": "monthView",
2414
- "parameters": [
2441
+ },
2415
2442
  {
2416
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
2443
+ "name": "change",
2417
2444
  "type": {
2418
- "text": "MonthViewArgs"
2445
+ "text": "NordEvent"
2446
+ },
2447
+ "description": "Fired whenever the input's value is changed via user interaction.",
2448
+ "inheritedFrom": {
2449
+ "name": "FormAssociatedMixin",
2450
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2419
2451
  }
2420
2452
  }
2421
2453
  ]
@@ -2424,22 +2456,22 @@
2424
2456
  "exports": [
2425
2457
  {
2426
2458
  "kind": "js",
2427
- "name": "dayView",
2459
+ "name": "default",
2428
2460
  "declaration": {
2429
- "name": "dayView",
2430
- "module": "src/calendar/month-view.ts"
2461
+ "name": "Checkbox",
2462
+ "module": "src/checkbox/Checkbox.ts"
2431
2463
  }
2432
2464
  },
2433
2465
  {
2434
- "kind": "js",
2435
- "name": "monthView",
2466
+ "kind": "custom-element-definition",
2467
+ "name": "nord-checkbox",
2436
2468
  "declaration": {
2437
- "name": "monthView",
2438
- "module": "src/calendar/month-view.ts"
2469
+ "name": "Checkbox",
2470
+ "module": "src/checkbox/Checkbox.ts"
2439
2471
  }
2440
2472
  }
2441
2473
  ],
2442
- "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"
2474
+ "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"
2443
2475
  },
2444
2476
  {
2445
2477
  "kind": "javascript-module",
@@ -4563,6 +4595,21 @@
4563
4595
  }
4564
4596
  ]
4565
4597
  },
4598
+ {
4599
+ "kind": "field",
4600
+ "name": "size",
4601
+ "type": {
4602
+ "text": "\"s\" | \"m\" | \"l\""
4603
+ },
4604
+ "default": "\"m\"",
4605
+ "description": "The size of the component.",
4606
+ "attribute": "size",
4607
+ "reflects": true,
4608
+ "inheritedFrom": {
4609
+ "name": "SizeMixin",
4610
+ "module": "src/common/mixins/SizeMixin.ts"
4611
+ }
4612
+ },
4566
4613
  {
4567
4614
  "kind": "field",
4568
4615
  "name": "labelSlot",
@@ -5006,6 +5053,19 @@
5006
5053
  "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
5007
5054
  "fieldName": "firstDayOfWeek"
5008
5055
  },
5056
+ {
5057
+ "name": "size",
5058
+ "type": {
5059
+ "text": "\"s\" | \"m\" | \"l\""
5060
+ },
5061
+ "default": "\"m\"",
5062
+ "description": "The size of the component.",
5063
+ "fieldName": "size",
5064
+ "inheritedFrom": {
5065
+ "name": "SizeMixin",
5066
+ "module": "src/common/mixins/SizeMixin.ts"
5067
+ }
5068
+ },
5009
5069
  {
5010
5070
  "name": "label",
5011
5071
  "type": {
@@ -5121,6 +5181,10 @@
5121
5181
  }
5122
5182
  ],
5123
5183
  "mixins": [
5184
+ {
5185
+ "name": "SizeMixin",
5186
+ "module": "/src/common/mixins/SizeMixin.js"
5187
+ },
5124
5188
  {
5125
5189
  "name": "FormAssociatedMixin",
5126
5190
  "module": "/src/common/mixins/FormAssociatedMixin.js"
@@ -6045,7 +6109,7 @@
6045
6109
  "kind": "field",
6046
6110
  "name": "size",
6047
6111
  "type": {
6048
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6112
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6049
6113
  },
6050
6114
  "default": "\"m\"",
6051
6115
  "description": "The size of the icon.",
@@ -6100,7 +6164,7 @@
6100
6164
  {
6101
6165
  "name": "size",
6102
6166
  "type": {
6103
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6167
+ "text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
6104
6168
  },
6105
6169
  "default": "\"m\"",
6106
6170
  "description": "The size of the icon.",
@@ -6259,6 +6323,21 @@
6259
6323
  }
6260
6324
  ]
6261
6325
  },
6326
+ {
6327
+ "kind": "field",
6328
+ "name": "size",
6329
+ "type": {
6330
+ "text": "\"s\" | \"m\" | \"l\""
6331
+ },
6332
+ "default": "\"m\"",
6333
+ "description": "The size of the component.",
6334
+ "attribute": "size",
6335
+ "reflects": true,
6336
+ "inheritedFrom": {
6337
+ "name": "SizeMixin",
6338
+ "module": "src/common/mixins/SizeMixin.ts"
6339
+ }
6340
+ },
6262
6341
  {
6263
6342
  "kind": "field",
6264
6343
  "name": "labelSlot",
@@ -6662,6 +6741,19 @@
6662
6741
  "description": "Controls whether the input expands to fill the width of its container.",
6663
6742
  "fieldName": "expand"
6664
6743
  },
6744
+ {
6745
+ "name": "size",
6746
+ "type": {
6747
+ "text": "\"s\" | \"m\" | \"l\""
6748
+ },
6749
+ "default": "\"m\"",
6750
+ "description": "The size of the component.",
6751
+ "fieldName": "size",
6752
+ "inheritedFrom": {
6753
+ "name": "SizeMixin",
6754
+ "module": "src/common/mixins/SizeMixin.ts"
6755
+ }
6756
+ },
6665
6757
  {
6666
6758
  "name": "label",
6667
6759
  "type": {
@@ -6803,6 +6895,10 @@
6803
6895
  }
6804
6896
  ],
6805
6897
  "mixins": [
6898
+ {
6899
+ "name": "SizeMixin",
6900
+ "module": "/src/common/mixins/SizeMixin.js"
6901
+ },
6806
6902
  {
6807
6903
  "name": "FormAssociatedMixin",
6808
6904
  "module": "/src/common/mixins/FormAssociatedMixin.js"
@@ -9408,6 +9504,86 @@
9408
9504
  ],
9409
9505
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing radio button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n"
9410
9506
  },
9507
+ {
9508
+ "kind": "javascript-module",
9509
+ "path": "src/skeleton/Skeleton.ts",
9510
+ "declarations": [
9511
+ {
9512
+ "kind": "class",
9513
+ "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
9514
+ "name": "Skeleton",
9515
+ "cssProperties": [
9516
+ {
9517
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
9518
+ "name": "--n-skeleton-border-radius",
9519
+ "default": "var(--n-border-radius)"
9520
+ },
9521
+ {
9522
+ "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
9523
+ "name": "--n-skeleton-color",
9524
+ "default": "var(--n-color-border)"
9525
+ },
9526
+ {
9527
+ "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
9528
+ "name": "--n-skeleton-sheen-color",
9529
+ "default": "var(--n-color-border-strong)"
9530
+ }
9531
+ ],
9532
+ "members": [
9533
+ {
9534
+ "kind": "field",
9535
+ "name": "effect",
9536
+ "type": {
9537
+ "text": "\"pulse\" | \"sheen\" | \"none\""
9538
+ },
9539
+ "default": "\"none\"",
9540
+ "description": "Determines which animation effect the skeleton will use.",
9541
+ "attribute": "effect"
9542
+ }
9543
+ ],
9544
+ "attributes": [
9545
+ {
9546
+ "name": "effect",
9547
+ "type": {
9548
+ "text": "\"pulse\" | \"sheen\" | \"none\""
9549
+ },
9550
+ "default": "\"none\"",
9551
+ "description": "Determines which animation effect the skeleton will use.",
9552
+ "fieldName": "effect"
9553
+ }
9554
+ ],
9555
+ "superclass": {
9556
+ "name": "LitElement",
9557
+ "package": "lit"
9558
+ },
9559
+ "status": "new",
9560
+ "category": "feedback",
9561
+ "displayName": null,
9562
+ "examples": [],
9563
+ "tagName": "nord-skeleton",
9564
+ "customElement": true
9565
+ }
9566
+ ],
9567
+ "exports": [
9568
+ {
9569
+ "kind": "js",
9570
+ "name": "default",
9571
+ "declaration": {
9572
+ "name": "Skeleton",
9573
+ "module": "src/skeleton/Skeleton.ts"
9574
+ }
9575
+ },
9576
+ {
9577
+ "kind": "custom-element-definition",
9578
+ "name": "nord-skeleton",
9579
+ "declaration": {
9580
+ "name": "Skeleton",
9581
+ "module": "src/skeleton/Skeleton.ts"
9582
+ }
9583
+ }
9584
+ ],
9585
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
9586
+ },
9411
9587
  {
9412
9588
  "kind": "javascript-module",
9413
9589
  "path": "src/select/Select.ts",
@@ -9510,6 +9686,21 @@
9510
9686
  }
9511
9687
  ]
9512
9688
  },
9689
+ {
9690
+ "kind": "field",
9691
+ "name": "size",
9692
+ "type": {
9693
+ "text": "\"s\" | \"m\" | \"l\""
9694
+ },
9695
+ "default": "\"m\"",
9696
+ "description": "The size of the component.",
9697
+ "attribute": "size",
9698
+ "reflects": true,
9699
+ "inheritedFrom": {
9700
+ "name": "SizeMixin",
9701
+ "module": "src/common/mixins/SizeMixin.ts"
9702
+ }
9703
+ },
9513
9704
  {
9514
9705
  "kind": "field",
9515
9706
  "name": "labelSlot",
@@ -9863,9 +10054,22 @@
9863
10054
  "type": {
9864
10055
  "text": "boolean"
9865
10056
  },
9866
- "default": "false",
9867
- "description": "Controls whether the select expands to fill the width of its container.",
9868
- "fieldName": "expand"
10057
+ "default": "false",
10058
+ "description": "Controls whether the select expands to fill the width of its container.",
10059
+ "fieldName": "expand"
10060
+ },
10061
+ {
10062
+ "name": "size",
10063
+ "type": {
10064
+ "text": "\"s\" | \"m\" | \"l\""
10065
+ },
10066
+ "default": "\"m\"",
10067
+ "description": "The size of the component.",
10068
+ "fieldName": "size",
10069
+ "inheritedFrom": {
10070
+ "name": "SizeMixin",
10071
+ "module": "src/common/mixins/SizeMixin.ts"
10072
+ }
9869
10073
  },
9870
10074
  {
9871
10075
  "name": "label",
@@ -9995,6 +10199,10 @@
9995
10199
  }
9996
10200
  ],
9997
10201
  "mixins": [
10202
+ {
10203
+ "name": "SizeMixin",
10204
+ "module": "/src/common/mixins/SizeMixin.js"
10205
+ },
9998
10206
  {
9999
10207
  "name": "FormAssociatedMixin",
10000
10208
  "module": "/src/common/mixins/FormAssociatedMixin.js"
@@ -10068,86 +10276,6 @@
10068
10276
  ],
10069
10277
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using radio components instead, if you have enough space to allow it. \n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun&nbsp;form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing select labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n"
10070
10278
  },
10071
- {
10072
- "kind": "javascript-module",
10073
- "path": "src/skeleton/Skeleton.ts",
10074
- "declarations": [
10075
- {
10076
- "kind": "class",
10077
- "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
10078
- "name": "Skeleton",
10079
- "cssProperties": [
10080
- {
10081
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
10082
- "name": "--n-skeleton-border-radius",
10083
- "default": "var(--n-border-radius)"
10084
- },
10085
- {
10086
- "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
10087
- "name": "--n-skeleton-color",
10088
- "default": "var(--n-color-border)"
10089
- },
10090
- {
10091
- "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
10092
- "name": "--n-skeleton-sheen-color",
10093
- "default": "var(--n-color-border-strong)"
10094
- }
10095
- ],
10096
- "members": [
10097
- {
10098
- "kind": "field",
10099
- "name": "effect",
10100
- "type": {
10101
- "text": "\"pulse\" | \"sheen\" | \"none\""
10102
- },
10103
- "default": "\"none\"",
10104
- "description": "Determines which animation effect the skeleton will use.",
10105
- "attribute": "effect"
10106
- }
10107
- ],
10108
- "attributes": [
10109
- {
10110
- "name": "effect",
10111
- "type": {
10112
- "text": "\"pulse\" | \"sheen\" | \"none\""
10113
- },
10114
- "default": "\"none\"",
10115
- "description": "Determines which animation effect the skeleton will use.",
10116
- "fieldName": "effect"
10117
- }
10118
- ],
10119
- "superclass": {
10120
- "name": "LitElement",
10121
- "package": "lit"
10122
- },
10123
- "status": "new",
10124
- "category": "feedback",
10125
- "displayName": null,
10126
- "examples": [],
10127
- "tagName": "nord-skeleton",
10128
- "customElement": true
10129
- }
10130
- ],
10131
- "exports": [
10132
- {
10133
- "kind": "js",
10134
- "name": "default",
10135
- "declaration": {
10136
- "name": "Skeleton",
10137
- "module": "src/skeleton/Skeleton.ts"
10138
- }
10139
- },
10140
- {
10141
- "kind": "custom-element-definition",
10142
- "name": "nord-skeleton",
10143
- "declaration": {
10144
- "name": "Skeleton",
10145
- "module": "src/skeleton/Skeleton.ts"
10146
- }
10147
- }
10148
- ],
10149
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
10150
- },
10151
10279
  {
10152
10280
  "kind": "javascript-module",
10153
10281
  "path": "src/spinner/Spinner.ts",
@@ -11054,6 +11182,21 @@
11054
11182
  "name": "resizeToFitContent",
11055
11183
  "privacy": "protected"
11056
11184
  },
11185
+ {
11186
+ "kind": "field",
11187
+ "name": "size",
11188
+ "type": {
11189
+ "text": "\"s\" | \"m\" | \"l\""
11190
+ },
11191
+ "default": "\"m\"",
11192
+ "description": "The size of the component.",
11193
+ "attribute": "size",
11194
+ "reflects": true,
11195
+ "inheritedFrom": {
11196
+ "name": "SizeMixin",
11197
+ "module": "src/common/mixins/SizeMixin.ts"
11198
+ }
11199
+ },
11057
11200
  {
11058
11201
  "kind": "field",
11059
11202
  "name": "labelSlot",
@@ -11444,6 +11587,19 @@
11444
11587
  "description": "Controls whether the textarea expands to fill the width of its container.",
11445
11588
  "fieldName": "expand"
11446
11589
  },
11590
+ {
11591
+ "name": "size",
11592
+ "type": {
11593
+ "text": "\"s\" | \"m\" | \"l\""
11594
+ },
11595
+ "default": "\"m\"",
11596
+ "description": "The size of the component.",
11597
+ "fieldName": "size",
11598
+ "inheritedFrom": {
11599
+ "name": "SizeMixin",
11600
+ "module": "src/common/mixins/SizeMixin.ts"
11601
+ }
11602
+ },
11447
11603
  {
11448
11604
  "name": "label",
11449
11605
  "type": {
@@ -11585,6 +11741,10 @@
11585
11741
  }
11586
11742
  ],
11587
11743
  "mixins": [
11744
+ {
11745
+ "name": "SizeMixin",
11746
+ "module": "/src/common/mixins/SizeMixin.js"
11747
+ },
11588
11748
  {
11589
11749
  "name": "FormAssociatedMixin",
11590
11750
  "module": "/src/common/mixins/FormAssociatedMixin.js"
@@ -12804,6 +12964,41 @@
12804
12964
  ],
12805
12965
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
12806
12966
  },
12967
+ {
12968
+ "kind": "javascript-module",
12969
+ "path": "src/common/decorators/observe.ts",
12970
+ "declarations": [
12971
+ {
12972
+ "kind": "function",
12973
+ "name": "observe",
12974
+ "parameters": [
12975
+ {
12976
+ "name": "propertyName",
12977
+ "type": {
12978
+ "text": "string"
12979
+ }
12980
+ },
12981
+ {
12982
+ "name": "lifecycle",
12983
+ "default": "\"update\"",
12984
+ "type": {
12985
+ "text": "ObserveLifecycle"
12986
+ }
12987
+ }
12988
+ ]
12989
+ }
12990
+ ],
12991
+ "exports": [
12992
+ {
12993
+ "kind": "js",
12994
+ "name": "observe",
12995
+ "declaration": {
12996
+ "name": "observe",
12997
+ "module": "src/common/decorators/observe.ts"
12998
+ }
12999
+ }
13000
+ ]
13001
+ },
12807
13002
  {
12808
13003
  "kind": "javascript-module",
12809
13004
  "path": "src/common/controllers/DirectionController.ts",
@@ -13836,41 +14031,6 @@
13836
14031
  }
13837
14032
  ]
13838
14033
  },
13839
- {
13840
- "kind": "javascript-module",
13841
- "path": "src/common/decorators/observe.ts",
13842
- "declarations": [
13843
- {
13844
- "kind": "function",
13845
- "name": "observe",
13846
- "parameters": [
13847
- {
13848
- "name": "propertyName",
13849
- "type": {
13850
- "text": "string"
13851
- }
13852
- },
13853
- {
13854
- "name": "lifecycle",
13855
- "default": "\"update\"",
13856
- "type": {
13857
- "text": "ObserveLifecycle"
13858
- }
13859
- }
13860
- ]
13861
- }
13862
- ],
13863
- "exports": [
13864
- {
13865
- "kind": "js",
13866
- "name": "observe",
13867
- "declaration": {
13868
- "name": "observe",
13869
- "module": "src/common/decorators/observe.ts"
13870
- }
13871
- }
13872
- ]
13873
- },
13874
14034
  {
13875
14035
  "kind": "javascript-module",
13876
14036
  "path": "src/common/directives/cond.ts",
@@ -15245,6 +15405,98 @@
15245
15405
  }
15246
15406
  }
15247
15407
  ]
15408
+ },
15409
+ {
15410
+ "kind": "javascript-module",
15411
+ "path": "src/common/mixins/SizeMixin.ts",
15412
+ "declarations": [
15413
+ {
15414
+ "kind": "class",
15415
+ "description": "",
15416
+ "name": "SizeMixinInterface",
15417
+ "members": [
15418
+ {
15419
+ "kind": "field",
15420
+ "name": "size",
15421
+ "type": {
15422
+ "text": "\"s\" | \"m\" | \"l\""
15423
+ }
15424
+ }
15425
+ ],
15426
+ "examples": []
15427
+ },
15428
+ {
15429
+ "kind": "mixin",
15430
+ "description": "",
15431
+ "name": "SizeMixin",
15432
+ "members": [
15433
+ {
15434
+ "kind": "field",
15435
+ "name": "size",
15436
+ "type": {
15437
+ "text": "\"s\" | \"m\" | \"l\""
15438
+ },
15439
+ "default": "\"m\"",
15440
+ "description": "The size of the component.",
15441
+ "attribute": "size",
15442
+ "reflects": true
15443
+ }
15444
+ ],
15445
+ "attributes": [
15446
+ {
15447
+ "name": "size",
15448
+ "type": {
15449
+ "text": "\"s\" | \"m\" | \"l\""
15450
+ },
15451
+ "default": "\"m\"",
15452
+ "description": "The size of the component.",
15453
+ "fieldName": "size"
15454
+ }
15455
+ ],
15456
+ "parameters": [
15457
+ {
15458
+ "name": "superClass",
15459
+ "type": {
15460
+ "text": "T"
15461
+ }
15462
+ }
15463
+ ]
15464
+ },
15465
+ {
15466
+ "kind": "variable",
15467
+ "name": "iconSizeMap",
15468
+ "type": {
15469
+ "text": "Record<SizeMixinInterface[\"size\"], string>"
15470
+ },
15471
+ "default": "{\n s: \"xs\",\n m: \"s\",\n l: \"m\",\n}"
15472
+ }
15473
+ ],
15474
+ "exports": [
15475
+ {
15476
+ "kind": "js",
15477
+ "name": "SizeMixinInterface",
15478
+ "declaration": {
15479
+ "name": "SizeMixinInterface",
15480
+ "module": "src/common/mixins/SizeMixin.ts"
15481
+ }
15482
+ },
15483
+ {
15484
+ "kind": "js",
15485
+ "name": "SizeMixin",
15486
+ "declaration": {
15487
+ "name": "SizeMixin",
15488
+ "module": "src/common/mixins/SizeMixin.ts"
15489
+ }
15490
+ },
15491
+ {
15492
+ "kind": "js",
15493
+ "name": "iconSizeMap",
15494
+ "declaration": {
15495
+ "name": "iconSizeMap",
15496
+ "module": "src/common/mixins/SizeMixin.ts"
15497
+ }
15498
+ }
15499
+ ]
15248
15500
  }
15249
15501
  ]
15250
15502
  }