@nordhealth/components 1.0.0-alpha.56 → 1.0.0-alpha.57

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.
@@ -796,275 +796,411 @@
796
796
  },
797
797
  {
798
798
  "kind": "javascript-module",
799
- "path": "src/calendar/Calendar.ts",
799
+ "path": "src/checkbox/Checkbox.ts",
800
800
  "declarations": [
801
801
  {
802
802
  "kind": "class",
803
- "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.",
804
- "name": "Calendar",
803
+ "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.",
804
+ "name": "Checkbox",
805
+ "slots": [
806
+ {
807
+ "description": "Use when a label requires more than plain text.",
808
+ "name": "label"
809
+ },
810
+ {
811
+ "description": "Optional slot that holds hint text for the input.",
812
+ "name": "hint"
813
+ },
814
+ {
815
+ "description": "Optional slot that holds error text for the input.",
816
+ "name": "error"
817
+ }
818
+ ],
805
819
  "members": [
806
820
  {
807
821
  "kind": "field",
808
- "name": "dialogLabelId",
809
- "type": {
810
- "text": "string"
811
- },
812
- "privacy": "private",
813
- "default": "\"dialog-header\""
822
+ "name": "formValue",
823
+ "privacy": "protected",
824
+ "inheritedFrom": {
825
+ "name": "FormAssociatedMixin",
826
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
827
+ }
814
828
  },
815
829
  {
816
830
  "kind": "field",
817
- "name": "monthSelectNode",
831
+ "name": "checked",
818
832
  "type": {
819
- "text": "HTMLElement"
833
+ "text": "boolean"
820
834
  },
821
- "privacy": "private"
835
+ "default": "false",
836
+ "description": "Controls whether the checkbox is checked or not.",
837
+ "attribute": "checked"
822
838
  },
823
839
  {
824
- "kind": "field",
825
- "name": "focusedDayNode",
826
- "type": {
827
- "text": "HTMLButtonElement"
840
+ "kind": "method",
841
+ "name": "handleChange",
842
+ "privacy": "protected",
843
+ "return": {
844
+ "type": {
845
+ "text": "void"
846
+ }
828
847
  },
829
- "privacy": "private"
848
+ "parameters": [
849
+ {
850
+ "name": "e",
851
+ "type": {
852
+ "text": "Event"
853
+ }
854
+ }
855
+ ],
856
+ "inheritedFrom": {
857
+ "name": "FormAssociatedMixin",
858
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
859
+ }
830
860
  },
831
861
  {
832
862
  "kind": "field",
833
- "name": "direction",
834
- "privacy": "private",
835
- "default": "new DirectionController(this)"
863
+ "name": "labelSlot",
864
+ "privacy": "protected",
865
+ "default": "new SlotController(this, \"label\")",
866
+ "inheritedFrom": {
867
+ "name": "FormAssociatedMixin",
868
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
869
+ }
836
870
  },
837
871
  {
838
872
  "kind": "field",
839
- "name": "swipe",
840
- "privacy": "private",
841
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
873
+ "name": "errorSlot",
874
+ "privacy": "protected",
875
+ "default": "new SlotController(this, \"error\")",
876
+ "inheritedFrom": {
877
+ "name": "FormAssociatedMixin",
878
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
879
+ }
842
880
  },
843
881
  {
844
882
  "kind": "field",
845
- "name": "shortcuts",
846
- "privacy": "private"
883
+ "name": "hintSlot",
884
+ "privacy": "protected",
885
+ "default": "new SlotController(this, \"hint\")",
886
+ "inheritedFrom": {
887
+ "name": "FormAssociatedMixin",
888
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
889
+ }
847
890
  },
848
891
  {
849
892
  "kind": "field",
850
- "name": "dateFormatShort",
893
+ "name": "formData",
894
+ "privacy": "protected",
895
+ "default": "new FormDataController(this, { value: () => this.formValue })",
896
+ "inheritedFrom": {
897
+ "name": "FormAssociatedMixin",
898
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
899
+ }
900
+ },
901
+ {
902
+ "kind": "field",
903
+ "name": "inputId",
851
904
  "type": {
852
- "text": "Intl.DateTimeFormat"
905
+ "text": "string"
853
906
  },
854
- "privacy": "private",
855
- "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"
907
+ "privacy": "protected",
908
+ "default": "\"input\"",
909
+ "inheritedFrom": {
910
+ "name": "FormAssociatedMixin",
911
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
912
+ }
856
913
  },
857
914
  {
858
915
  "kind": "field",
859
- "name": "localization",
916
+ "name": "errorId",
860
917
  "type": {
861
- "text": "CalendarLocalizedText"
918
+ "text": "string"
862
919
  },
863
- "default": "localization"
920
+ "privacy": "protected",
921
+ "default": "\"error\"",
922
+ "inheritedFrom": {
923
+ "name": "FormAssociatedMixin",
924
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
925
+ }
864
926
  },
865
927
  {
866
928
  "kind": "field",
867
- "name": "value",
929
+ "name": "hintId",
930
+ "type": {
931
+ "text": "string"
932
+ },
933
+ "privacy": "protected",
934
+ "default": "\"hint\"",
935
+ "inheritedFrom": {
936
+ "name": "FormAssociatedMixin",
937
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
938
+ }
939
+ },
940
+ {
941
+ "kind": "field",
942
+ "name": "label",
868
943
  "type": {
869
944
  "text": "string"
870
945
  },
871
946
  "default": "\"\"",
872
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
873
- "attribute": "value"
947
+ "description": "Label for the input.",
948
+ "attribute": "label",
949
+ "inheritedFrom": {
950
+ "name": "FormAssociatedMixin",
951
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
952
+ }
874
953
  },
875
954
  {
876
955
  "kind": "field",
877
- "name": "firstDayOfWeek",
956
+ "name": "hint",
878
957
  "type": {
879
- "text": "DaysOfWeek"
958
+ "text": "string | undefined"
880
959
  },
881
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
882
- "attribute": "firstDayOfWeek"
960
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
961
+ "attribute": "hint",
962
+ "inheritedFrom": {
963
+ "name": "FormAssociatedMixin",
964
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
965
+ }
883
966
  },
884
967
  {
885
968
  "kind": "field",
886
- "name": "min",
969
+ "name": "hideLabel",
887
970
  "type": {
888
- "text": "string"
971
+ "text": "boolean"
889
972
  },
890
- "default": "\"\"",
891
- "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.",
892
- "attribute": "min"
973
+ "default": "false",
974
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
975
+ "attribute": "hide-label",
976
+ "inheritedFrom": {
977
+ "name": "FormAssociatedMixin",
978
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
979
+ }
893
980
  },
894
981
  {
895
982
  "kind": "field",
896
- "name": "max",
983
+ "name": "placeholder",
897
984
  "type": {
898
- "text": "string"
985
+ "text": "string | undefined"
899
986
  },
900
- "default": "\"\"",
901
- "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.",
902
- "attribute": "max"
987
+ "description": "Placeholder text to display within the input.",
988
+ "attribute": "placeholder",
989
+ "inheritedFrom": {
990
+ "name": "FormAssociatedMixin",
991
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
992
+ }
903
993
  },
904
994
  {
905
995
  "kind": "field",
906
- "name": "isDateDisabled",
996
+ "name": "error",
907
997
  "type": {
908
- "text": "DateDisabledPredicate"
998
+ "text": "string | undefined"
909
999
  },
910
- "default": "isDateDisabled",
911
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1000
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1001
+ "attribute": "error",
1002
+ "inheritedFrom": {
1003
+ "name": "FormAssociatedMixin",
1004
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1005
+ }
912
1006
  },
913
1007
  {
914
1008
  "kind": "field",
915
- "name": "activeFocus",
1009
+ "name": "required",
916
1010
  "type": {
917
1011
  "text": "boolean"
918
1012
  },
919
- "privacy": "private",
920
- "default": "false"
1013
+ "default": "false",
1014
+ "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.",
1015
+ "attribute": "required",
1016
+ "inheritedFrom": {
1017
+ "name": "FormAssociatedMixin",
1018
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1019
+ }
921
1020
  },
922
1021
  {
923
1022
  "kind": "field",
924
- "name": "focusedDay",
925
- "privacy": "private",
926
- "default": "new Date()"
1023
+ "name": "expand",
1024
+ "type": {
1025
+ "text": "boolean"
1026
+ },
1027
+ "default": "false",
1028
+ "description": "Controls whether the input expands to fill the width of its container.",
1029
+ "attribute": "expand",
1030
+ "reflects": true,
1031
+ "inheritedFrom": {
1032
+ "name": "FormAssociatedMixin",
1033
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1034
+ }
927
1035
  },
928
1036
  {
929
1037
  "kind": "method",
930
- "name": "focus",
1038
+ "name": "handleInput",
1039
+ "privacy": "protected",
931
1040
  "parameters": [
932
1041
  {
933
- "name": "options",
934
- "optional": true,
1042
+ "name": "e",
935
1043
  "type": {
936
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1044
+ "text": "Event"
937
1045
  }
938
1046
  }
939
- ]
1047
+ ],
1048
+ "inheritedFrom": {
1049
+ "name": "FormAssociatedMixin",
1050
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1051
+ }
940
1052
  },
941
1053
  {
942
1054
  "kind": "method",
943
- "name": "createDateFormatter",
944
- "privacy": "private"
945
- },
946
- {
947
- "kind": "field",
948
- "name": "handleDaySelect",
949
- "privacy": "private"
1055
+ "name": "renderLabel",
1056
+ "privacy": "protected",
1057
+ "inheritedFrom": {
1058
+ "name": "FormAssociatedMixin",
1059
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1060
+ }
950
1061
  },
951
1062
  {
952
1063
  "kind": "method",
953
- "name": "addDays",
954
- "privacy": "private",
955
- "parameters": [
956
- {
957
- "name": "days",
958
- "type": {
959
- "text": "number"
960
- }
961
- }
962
- ]
963
- },
964
- {
965
- "kind": "method",
966
- "name": "addMonths",
967
- "privacy": "private",
968
- "parameters": [
969
- {
970
- "name": "months",
971
- "type": {
972
- "text": "number"
973
- }
974
- }
975
- ]
1064
+ "name": "renderError",
1065
+ "privacy": "protected",
1066
+ "inheritedFrom": {
1067
+ "name": "FormAssociatedMixin",
1068
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1069
+ }
976
1070
  },
977
1071
  {
978
1072
  "kind": "method",
979
- "name": "addYears",
980
- "privacy": "private",
981
- "parameters": [
982
- {
983
- "name": "years",
984
- "type": {
985
- "text": "number"
986
- }
987
- }
988
- ]
1073
+ "name": "getDescribedBy",
1074
+ "privacy": "protected",
1075
+ "inheritedFrom": {
1076
+ "name": "FormAssociatedMixin",
1077
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1078
+ }
989
1079
  },
990
1080
  {
991
1081
  "kind": "method",
992
- "name": "startOfWeek",
993
- "privacy": "private"
1082
+ "name": "getInvalid",
1083
+ "privacy": "protected",
1084
+ "inheritedFrom": {
1085
+ "name": "FormAssociatedMixin",
1086
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1087
+ }
994
1088
  },
995
1089
  {
996
- "kind": "method",
997
- "name": "endOfWeek",
998
- "privacy": "private"
1090
+ "kind": "field",
1091
+ "name": "hasHint",
1092
+ "privacy": "protected",
1093
+ "inheritedFrom": {
1094
+ "name": "FormAssociatedMixin",
1095
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1096
+ }
999
1097
  },
1000
1098
  {
1001
- "kind": "method",
1002
- "name": "setMonth",
1003
- "privacy": "private",
1004
- "parameters": [
1005
- {
1006
- "name": "month",
1007
- "type": {
1008
- "text": "number"
1009
- }
1010
- }
1011
- ]
1099
+ "kind": "field",
1100
+ "name": "hasError",
1101
+ "privacy": "protected",
1102
+ "inheritedFrom": {
1103
+ "name": "FormAssociatedMixin",
1104
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1105
+ }
1012
1106
  },
1013
1107
  {
1014
- "kind": "method",
1015
- "name": "setYear",
1016
- "privacy": "private",
1017
- "parameters": [
1018
- {
1019
- "name": "year",
1020
- "type": {
1021
- "text": "number"
1022
- }
1023
- }
1024
- ]
1108
+ "kind": "field",
1109
+ "name": "disabled",
1110
+ "type": {
1111
+ "text": "boolean"
1112
+ },
1113
+ "default": "false",
1114
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1115
+ "attribute": "disabled",
1116
+ "reflects": true,
1117
+ "inheritedFrom": {
1118
+ "name": "InputMixin",
1119
+ "module": "src/common/mixins/InputMixin.ts"
1120
+ }
1025
1121
  },
1026
1122
  {
1027
- "kind": "method",
1028
- "name": "setFocusedDay",
1029
- "privacy": "private",
1030
- "parameters": [
1031
- {
1032
- "name": "day",
1033
- "type": {
1034
- "text": "Date"
1035
- }
1036
- }
1037
- ]
1123
+ "kind": "field",
1124
+ "name": "name",
1125
+ "type": {
1126
+ "text": "string | undefined"
1127
+ },
1128
+ "description": "The name of the form component.",
1129
+ "attribute": "name",
1130
+ "inheritedFrom": {
1131
+ "name": "InputMixin",
1132
+ "module": "src/common/mixins/InputMixin.ts"
1133
+ }
1038
1134
  },
1039
1135
  {
1040
1136
  "kind": "field",
1041
- "name": "handleMonthSelect",
1042
- "privacy": "private"
1137
+ "name": "value",
1138
+ "type": {
1139
+ "text": "string"
1140
+ },
1141
+ "default": "\"\"",
1142
+ "description": "The value of the form component.",
1143
+ "attribute": "value",
1144
+ "inheritedFrom": {
1145
+ "name": "InputMixin",
1146
+ "module": "src/common/mixins/InputMixin.ts"
1147
+ }
1043
1148
  },
1044
1149
  {
1045
1150
  "kind": "field",
1046
- "name": "handleYearSelect",
1047
- "privacy": "private"
1151
+ "name": "form",
1152
+ "privacy": "protected",
1153
+ "description": "Gets the form, if any, associated with the form element.",
1154
+ "inheritedFrom": {
1155
+ "name": "InputMixin",
1156
+ "module": "src/common/mixins/InputMixin.ts"
1157
+ }
1048
1158
  },
1049
1159
  {
1050
1160
  "kind": "field",
1051
- "name": "handleNextMonthClick",
1052
- "privacy": "private"
1161
+ "name": "focusableRef",
1162
+ "privacy": "protected",
1163
+ "inheritedFrom": {
1164
+ "name": "FocusableMixin",
1165
+ "module": "src/common/mixins/FocusableMixin.ts"
1166
+ }
1053
1167
  },
1054
1168
  {
1055
- "kind": "field",
1056
- "name": "handlePreviousMonthClick",
1057
- "privacy": "private"
1169
+ "kind": "method",
1170
+ "name": "focus",
1171
+ "parameters": [
1172
+ {
1173
+ "name": "options",
1174
+ "optional": true,
1175
+ "type": {
1176
+ "text": "FocusOptions"
1177
+ },
1178
+ "description": "An object which controls aspects of the focusing process."
1179
+ }
1180
+ ],
1181
+ "description": "Programmatically move focus to the component.",
1182
+ "inheritedFrom": {
1183
+ "name": "FocusableMixin",
1184
+ "module": "src/common/mixins/FocusableMixin.ts"
1185
+ }
1058
1186
  },
1059
1187
  {
1060
- "kind": "field",
1061
- "name": "enableActiveFocus",
1062
- "privacy": "private"
1188
+ "kind": "method",
1189
+ "name": "blur",
1190
+ "description": "Programmatically remove focus from the component.",
1191
+ "inheritedFrom": {
1192
+ "name": "FocusableMixin",
1193
+ "module": "src/common/mixins/FocusableMixin.ts"
1194
+ }
1063
1195
  },
1064
1196
  {
1065
- "kind": "field",
1066
- "name": "disableActiveFocus",
1067
- "privacy": "private"
1197
+ "kind": "method",
1198
+ "name": "click",
1199
+ "description": "Programmatically simulates a click on the component.",
1200
+ "inheritedFrom": {
1201
+ "name": "FocusableMixin",
1202
+ "module": "src/common/mixins/FocusableMixin.ts"
1203
+ }
1068
1204
  },
1069
1205
  {
1070
1206
  "kind": "field",
@@ -1083,566 +1219,343 @@
1083
1219
  ],
1084
1220
  "attributes": [
1085
1221
  {
1086
- "name": "value",
1222
+ "name": "checked",
1223
+ "type": {
1224
+ "text": "boolean"
1225
+ },
1226
+ "default": "false",
1227
+ "description": "Controls whether the checkbox is checked or not.",
1228
+ "fieldName": "checked"
1229
+ },
1230
+ {
1231
+ "name": "label",
1087
1232
  "type": {
1088
1233
  "text": "string"
1089
1234
  },
1090
1235
  "default": "\"\"",
1091
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1092
- "fieldName": "value"
1236
+ "description": "Label for the input.",
1237
+ "fieldName": "label",
1238
+ "inheritedFrom": {
1239
+ "name": "FormAssociatedMixin",
1240
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1241
+ }
1093
1242
  },
1094
1243
  {
1095
- "name": "firstDayOfWeek",
1244
+ "name": "hint",
1096
1245
  "type": {
1097
- "text": "DaysOfWeek"
1246
+ "text": "string | undefined"
1098
1247
  },
1099
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1100
- "fieldName": "firstDayOfWeek"
1248
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1249
+ "fieldName": "hint",
1250
+ "inheritedFrom": {
1251
+ "name": "FormAssociatedMixin",
1252
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1253
+ }
1101
1254
  },
1102
1255
  {
1103
- "name": "min",
1256
+ "name": "hide-label",
1104
1257
  "type": {
1105
- "text": "string"
1258
+ "text": "boolean"
1106
1259
  },
1107
- "default": "\"\"",
1108
- "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.",
1109
- "fieldName": "min"
1260
+ "default": "false",
1261
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1262
+ "fieldName": "hideLabel",
1263
+ "inheritedFrom": {
1264
+ "name": "FormAssociatedMixin",
1265
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1266
+ }
1110
1267
  },
1111
1268
  {
1112
- "name": "max",
1269
+ "name": "placeholder",
1113
1270
  "type": {
1114
- "text": "string"
1271
+ "text": "string | undefined"
1115
1272
  },
1116
- "default": "\"\"",
1117
- "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.",
1118
- "fieldName": "max"
1119
- }
1120
- ],
1121
- "mixins": [
1273
+ "description": "Placeholder text to display within the input.",
1274
+ "fieldName": "placeholder",
1275
+ "inheritedFrom": {
1276
+ "name": "FormAssociatedMixin",
1277
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1278
+ }
1279
+ },
1122
1280
  {
1123
- "name": "DraftComponentMixin",
1124
- "module": "/src/common/mixins/DraftComponentMixin.js"
1125
- }
1126
- ],
1127
- "superclass": {
1128
- "name": "LitElement",
1129
- "package": "lit"
1130
- },
1131
- "status": "draft",
1132
- "category": "list",
1133
- "tagName": "nord-calendar",
1134
- "customElement": true
1135
- }
1136
- ],
1137
- "exports": [
1138
- {
1139
- "kind": "js",
1140
- "name": "default",
1141
- "declaration": {
1142
- "name": "Calendar",
1143
- "module": "src/calendar/Calendar.ts"
1144
- }
1145
- },
1146
- {
1147
- "kind": "custom-element-definition",
1148
- "name": "nord-calendar",
1149
- "declaration": {
1150
- "name": "Calendar",
1151
- "module": "src/calendar/Calendar.ts"
1152
- }
1153
- }
1154
- ],
1155
- "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"
1156
- },
1157
- {
1158
- "kind": "javascript-module",
1159
- "path": "src/calendar/DateSelectEvent.ts",
1160
- "declarations": [
1161
- {
1162
- "kind": "class",
1163
- "description": "",
1164
- "name": "DateSelectEvent",
1165
- "members": [
1166
- {
1167
- "kind": "field",
1168
- "name": "eventName",
1169
- "type": {
1170
- "text": "string"
1171
- },
1172
- "static": true,
1173
- "default": "\"nord-select\""
1174
- },
1175
- {
1176
- "kind": "field",
1177
- "name": "date",
1281
+ "name": "error",
1178
1282
  "type": {
1179
- "text": "Date"
1283
+ "text": "string | undefined"
1180
1284
  },
1181
- "default": "date"
1182
- }
1183
- ],
1184
- "superclass": {
1185
- "name": "NordEvent",
1186
- "module": "/src/common/events.js"
1187
- }
1188
- }
1189
- ],
1190
- "exports": [
1191
- {
1192
- "kind": "js",
1193
- "name": "DateSelectEvent",
1194
- "declaration": {
1195
- "name": "DateSelectEvent",
1196
- "module": "src/calendar/DateSelectEvent.ts"
1197
- }
1198
- }
1199
- ],
1200
- "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"
1201
- },
1202
- {
1203
- "kind": "javascript-module",
1204
- "path": "src/calendar/calendar-localization.ts",
1205
- "declarations": [
1206
- {
1207
- "kind": "variable",
1208
- "name": "localization",
1209
- "type": {
1210
- "text": "CalendarLocalizedText"
1211
- },
1212
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
1213
- }
1214
- ],
1215
- "exports": [
1216
- {
1217
- "kind": "js",
1218
- "name": "default",
1219
- "declaration": {
1220
- "name": "localization",
1221
- "module": "src/calendar/calendar-localization.ts"
1222
- }
1223
- }
1224
- ],
1225
- "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"
1226
- },
1227
- {
1228
- "kind": "javascript-module",
1229
- "path": "src/calendar/month-view.ts",
1230
- "declarations": [
1231
- {
1232
- "kind": "function",
1233
- "name": "dayView",
1234
- "parameters": [
1235
- {
1236
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1237
- "type": {
1238
- "text": "DatePickerDayProps"
1239
- }
1240
- }
1241
- ]
1242
- },
1243
- {
1244
- "kind": "function",
1245
- "name": "monthView",
1246
- "parameters": [
1247
- {
1248
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1249
- "type": {
1250
- "text": "MonthViewArgs"
1251
- }
1252
- }
1253
- ]
1254
- }
1255
- ],
1256
- "exports": [
1257
- {
1258
- "kind": "js",
1259
- "name": "dayView",
1260
- "declaration": {
1261
- "name": "dayView",
1262
- "module": "src/calendar/month-view.ts"
1263
- }
1264
- },
1265
- {
1266
- "kind": "js",
1267
- "name": "monthView",
1268
- "declaration": {
1269
- "name": "monthView",
1270
- "module": "src/calendar/month-view.ts"
1271
- }
1272
- }
1273
- ],
1274
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use 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"
1275
- },
1276
- {
1277
- "kind": "javascript-module",
1278
- "path": "src/checkbox/Checkbox.ts",
1279
- "declarations": [
1280
- {
1281
- "kind": "class",
1282
- "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.",
1283
- "name": "Checkbox",
1284
- "slots": [
1285
- {
1286
- "description": "Use when a label requires more than plain text.",
1287
- "name": "label"
1288
- },
1289
- {
1290
- "description": "Optional slot that holds hint text for the input.",
1291
- "name": "hint"
1292
- },
1293
- {
1294
- "description": "Optional slot that holds error text for the input.",
1295
- "name": "error"
1296
- }
1297
- ],
1298
- "members": [
1299
- {
1300
- "kind": "field",
1301
- "name": "formValue",
1302
- "privacy": "protected",
1285
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1286
+ "fieldName": "error",
1303
1287
  "inheritedFrom": {
1304
1288
  "name": "FormAssociatedMixin",
1305
1289
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1306
1290
  }
1307
1291
  },
1308
1292
  {
1309
- "kind": "field",
1310
- "name": "checked",
1293
+ "name": "required",
1311
1294
  "type": {
1312
1295
  "text": "boolean"
1313
1296
  },
1314
1297
  "default": "false",
1315
- "description": "Controls whether the checkbox is checked or not.",
1316
- "attribute": "checked"
1317
- },
1318
- {
1319
- "kind": "method",
1320
- "name": "handleChange",
1321
- "privacy": "protected",
1322
- "return": {
1323
- "type": {
1324
- "text": "void"
1325
- }
1326
- },
1327
- "parameters": [
1328
- {
1329
- "name": "e",
1330
- "type": {
1331
- "text": "Event"
1332
- }
1333
- }
1334
- ],
1335
- "inheritedFrom": {
1336
- "name": "FormAssociatedMixin",
1337
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1338
- }
1339
- },
1340
- {
1341
- "kind": "field",
1342
- "name": "labelSlot",
1343
- "privacy": "protected",
1344
- "default": "new SlotController(this, \"label\")",
1345
- "inheritedFrom": {
1346
- "name": "FormAssociatedMixin",
1347
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1348
- }
1349
- },
1350
- {
1351
- "kind": "field",
1352
- "name": "errorSlot",
1353
- "privacy": "protected",
1354
- "default": "new SlotController(this, \"error\")",
1355
- "inheritedFrom": {
1356
- "name": "FormAssociatedMixin",
1357
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1358
- }
1359
- },
1360
- {
1361
- "kind": "field",
1362
- "name": "hintSlot",
1363
- "privacy": "protected",
1364
- "default": "new SlotController(this, \"hint\")",
1365
- "inheritedFrom": {
1366
- "name": "FormAssociatedMixin",
1367
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1368
- }
1369
- },
1370
- {
1371
- "kind": "field",
1372
- "name": "formData",
1373
- "privacy": "protected",
1374
- "default": "new FormDataController(this, { value: () => this.formValue })",
1298
+ "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.",
1299
+ "fieldName": "required",
1375
1300
  "inheritedFrom": {
1376
1301
  "name": "FormAssociatedMixin",
1377
1302
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1378
1303
  }
1379
1304
  },
1380
1305
  {
1381
- "kind": "field",
1382
- "name": "inputId",
1306
+ "name": "expand",
1383
1307
  "type": {
1384
- "text": "string"
1308
+ "text": "boolean"
1385
1309
  },
1386
- "privacy": "protected",
1387
- "default": "\"input\"",
1310
+ "default": "false",
1311
+ "description": "Controls whether the input expands to fill the width of its container.",
1312
+ "fieldName": "expand",
1388
1313
  "inheritedFrom": {
1389
1314
  "name": "FormAssociatedMixin",
1390
1315
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1391
1316
  }
1392
1317
  },
1393
1318
  {
1394
- "kind": "field",
1395
- "name": "errorId",
1319
+ "name": "disabled",
1396
1320
  "type": {
1397
- "text": "string"
1321
+ "text": "boolean"
1398
1322
  },
1399
- "privacy": "protected",
1400
- "default": "\"error\"",
1323
+ "default": "false",
1324
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1325
+ "fieldName": "disabled",
1401
1326
  "inheritedFrom": {
1402
- "name": "FormAssociatedMixin",
1403
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1327
+ "name": "InputMixin",
1328
+ "module": "src/common/mixins/InputMixin.ts"
1404
1329
  }
1405
1330
  },
1406
1331
  {
1407
- "kind": "field",
1408
- "name": "hintId",
1332
+ "name": "name",
1409
1333
  "type": {
1410
- "text": "string"
1334
+ "text": "string | undefined"
1411
1335
  },
1412
- "privacy": "protected",
1413
- "default": "\"hint\"",
1336
+ "description": "The name of the form component.",
1337
+ "fieldName": "name",
1414
1338
  "inheritedFrom": {
1415
- "name": "FormAssociatedMixin",
1416
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1339
+ "name": "InputMixin",
1340
+ "module": "src/common/mixins/InputMixin.ts"
1417
1341
  }
1418
1342
  },
1419
1343
  {
1420
- "kind": "field",
1421
- "name": "label",
1344
+ "name": "value",
1422
1345
  "type": {
1423
1346
  "text": "string"
1424
1347
  },
1425
1348
  "default": "\"\"",
1426
- "description": "Label for the input.",
1427
- "attribute": "label",
1349
+ "description": "The value of the form component.",
1350
+ "fieldName": "value",
1428
1351
  "inheritedFrom": {
1429
- "name": "FormAssociatedMixin",
1430
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1352
+ "name": "InputMixin",
1353
+ "module": "src/common/mixins/InputMixin.ts"
1431
1354
  }
1355
+ }
1356
+ ],
1357
+ "mixins": [
1358
+ {
1359
+ "name": "FormAssociatedMixin",
1360
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
1432
1361
  },
1433
1362
  {
1434
- "kind": "field",
1435
- "name": "hint",
1436
- "type": {
1437
- "text": "string | undefined"
1438
- },
1439
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1440
- "attribute": "hint",
1441
- "inheritedFrom": {
1442
- "name": "FormAssociatedMixin",
1443
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1444
- }
1363
+ "name": "InputMixin",
1364
+ "module": "/src/common/mixins/InputMixin.js"
1445
1365
  },
1446
1366
  {
1447
- "kind": "field",
1448
- "name": "hideLabel",
1367
+ "name": "FocusableMixin",
1368
+ "module": "/src/common/mixins/FocusableMixin.js"
1369
+ },
1370
+ {
1371
+ "name": "DraftComponentMixin",
1372
+ "module": "/src/common/mixins/DraftComponentMixin.js"
1373
+ }
1374
+ ],
1375
+ "superclass": {
1376
+ "name": "LitElement",
1377
+ "package": "lit"
1378
+ },
1379
+ "status": "draft",
1380
+ "category": "form",
1381
+ "tagName": "nord-checkbox",
1382
+ "customElement": true,
1383
+ "events": [
1384
+ {
1385
+ "name": "input",
1449
1386
  "type": {
1450
- "text": "boolean"
1387
+ "text": "NordEvent"
1451
1388
  },
1452
- "default": "false",
1453
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1454
- "attribute": "hide-label",
1389
+ "description": "Fired as the user types into the input.",
1455
1390
  "inheritedFrom": {
1456
1391
  "name": "FormAssociatedMixin",
1457
1392
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1458
1393
  }
1459
1394
  },
1460
1395
  {
1461
- "kind": "field",
1462
- "name": "placeholder",
1396
+ "name": "change",
1463
1397
  "type": {
1464
- "text": "string | undefined"
1398
+ "text": "NordEvent"
1465
1399
  },
1466
- "description": "Placeholder text to display within the input.",
1467
- "attribute": "placeholder",
1400
+ "description": "Fired whenever the input's value is changed via user interaction.",
1468
1401
  "inheritedFrom": {
1469
1402
  "name": "FormAssociatedMixin",
1470
1403
  "module": "src/common/mixins/FormAssociatedMixin.ts"
1471
1404
  }
1472
- },
1405
+ }
1406
+ ]
1407
+ }
1408
+ ],
1409
+ "exports": [
1410
+ {
1411
+ "kind": "js",
1412
+ "name": "default",
1413
+ "declaration": {
1414
+ "name": "Checkbox",
1415
+ "module": "src/checkbox/Checkbox.ts"
1416
+ }
1417
+ },
1418
+ {
1419
+ "kind": "custom-element-definition",
1420
+ "name": "nord-checkbox",
1421
+ "declaration": {
1422
+ "name": "Checkbox",
1423
+ "module": "src/checkbox/Checkbox.ts"
1424
+ }
1425
+ }
1426
+ ],
1427
+ "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- Don’t use 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"
1428
+ },
1429
+ {
1430
+ "kind": "javascript-module",
1431
+ "path": "src/calendar/Calendar.ts",
1432
+ "declarations": [
1433
+ {
1434
+ "kind": "class",
1435
+ "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.",
1436
+ "name": "Calendar",
1437
+ "members": [
1473
1438
  {
1474
1439
  "kind": "field",
1475
- "name": "error",
1440
+ "name": "dialogLabelId",
1476
1441
  "type": {
1477
- "text": "string | undefined"
1442
+ "text": "string"
1478
1443
  },
1479
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1480
- "attribute": "error",
1481
- "inheritedFrom": {
1482
- "name": "FormAssociatedMixin",
1483
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1484
- }
1444
+ "privacy": "private",
1445
+ "default": "\"dialog-header\""
1485
1446
  },
1486
1447
  {
1487
1448
  "kind": "field",
1488
- "name": "required",
1449
+ "name": "monthSelectNode",
1489
1450
  "type": {
1490
- "text": "boolean"
1451
+ "text": "HTMLElement"
1491
1452
  },
1492
- "default": "false",
1493
- "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.",
1494
- "attribute": "required",
1495
- "inheritedFrom": {
1496
- "name": "FormAssociatedMixin",
1497
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1498
- }
1453
+ "privacy": "private"
1499
1454
  },
1500
1455
  {
1501
1456
  "kind": "field",
1502
- "name": "expand",
1457
+ "name": "focusedDayNode",
1503
1458
  "type": {
1504
- "text": "boolean"
1459
+ "text": "HTMLButtonElement"
1505
1460
  },
1506
- "default": "false",
1507
- "description": "Controls whether the input expands to fill the width of its container.",
1508
- "attribute": "expand",
1509
- "reflects": true,
1510
- "inheritedFrom": {
1511
- "name": "FormAssociatedMixin",
1512
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1513
- }
1514
- },
1515
- {
1516
- "kind": "method",
1517
- "name": "handleInput",
1518
- "privacy": "protected",
1519
- "parameters": [
1520
- {
1521
- "name": "e",
1522
- "type": {
1523
- "text": "Event"
1524
- }
1525
- }
1526
- ],
1527
- "inheritedFrom": {
1528
- "name": "FormAssociatedMixin",
1529
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1530
- }
1461
+ "privacy": "private"
1531
1462
  },
1532
1463
  {
1533
- "kind": "method",
1534
- "name": "renderLabel",
1535
- "privacy": "protected",
1536
- "inheritedFrom": {
1537
- "name": "FormAssociatedMixin",
1538
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1539
- }
1464
+ "kind": "field",
1465
+ "name": "direction",
1466
+ "privacy": "private",
1467
+ "default": "new DirectionController(this)"
1540
1468
  },
1541
1469
  {
1542
- "kind": "method",
1543
- "name": "renderError",
1544
- "privacy": "protected",
1545
- "inheritedFrom": {
1546
- "name": "FormAssociatedMixin",
1547
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1548
- }
1470
+ "kind": "field",
1471
+ "name": "swipe",
1472
+ "privacy": "private",
1473
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1549
1474
  },
1550
1475
  {
1551
- "kind": "method",
1552
- "name": "getDescribedBy",
1553
- "privacy": "protected",
1554
- "inheritedFrom": {
1555
- "name": "FormAssociatedMixin",
1556
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1557
- }
1476
+ "kind": "field",
1477
+ "name": "shortcuts",
1478
+ "privacy": "private"
1558
1479
  },
1559
1480
  {
1560
- "kind": "method",
1561
- "name": "getInvalid",
1562
- "privacy": "protected",
1563
- "inheritedFrom": {
1564
- "name": "FormAssociatedMixin",
1565
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1566
- }
1481
+ "kind": "field",
1482
+ "name": "dateFormatShort",
1483
+ "type": {
1484
+ "text": "Intl.DateTimeFormat"
1485
+ },
1486
+ "privacy": "private",
1487
+ "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"
1567
1488
  },
1568
1489
  {
1569
1490
  "kind": "field",
1570
- "name": "hasHint",
1571
- "privacy": "protected",
1572
- "inheritedFrom": {
1573
- "name": "FormAssociatedMixin",
1574
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1575
- }
1491
+ "name": "localization",
1492
+ "type": {
1493
+ "text": "CalendarLocalizedText"
1494
+ },
1495
+ "default": "localization"
1576
1496
  },
1577
1497
  {
1578
1498
  "kind": "field",
1579
- "name": "hasError",
1580
- "privacy": "protected",
1581
- "inheritedFrom": {
1582
- "name": "FormAssociatedMixin",
1583
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1584
- }
1499
+ "name": "value",
1500
+ "type": {
1501
+ "text": "string"
1502
+ },
1503
+ "default": "\"\"",
1504
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1505
+ "attribute": "value"
1585
1506
  },
1586
1507
  {
1587
1508
  "kind": "field",
1588
- "name": "disabled",
1509
+ "name": "firstDayOfWeek",
1589
1510
  "type": {
1590
- "text": "boolean"
1511
+ "text": "DaysOfWeek"
1591
1512
  },
1592
- "default": "false",
1593
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1594
- "attribute": "disabled",
1595
- "reflects": true,
1596
- "inheritedFrom": {
1597
- "name": "InputMixin",
1598
- "module": "src/common/mixins/InputMixin.ts"
1599
- }
1513
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1514
+ "attribute": "firstDayOfWeek"
1600
1515
  },
1601
1516
  {
1602
1517
  "kind": "field",
1603
- "name": "name",
1518
+ "name": "min",
1604
1519
  "type": {
1605
- "text": "string | undefined"
1520
+ "text": "string"
1606
1521
  },
1607
- "description": "The name of the form component.",
1608
- "attribute": "name",
1609
- "inheritedFrom": {
1610
- "name": "InputMixin",
1611
- "module": "src/common/mixins/InputMixin.ts"
1612
- }
1522
+ "default": "\"\"",
1523
+ "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.",
1524
+ "attribute": "min"
1613
1525
  },
1614
1526
  {
1615
1527
  "kind": "field",
1616
- "name": "value",
1528
+ "name": "max",
1617
1529
  "type": {
1618
1530
  "text": "string"
1619
1531
  },
1620
1532
  "default": "\"\"",
1621
- "description": "The value of the form component.",
1622
- "attribute": "value",
1623
- "inheritedFrom": {
1624
- "name": "InputMixin",
1625
- "module": "src/common/mixins/InputMixin.ts"
1626
- }
1533
+ "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.",
1534
+ "attribute": "max"
1627
1535
  },
1628
1536
  {
1629
1537
  "kind": "field",
1630
- "name": "form",
1631
- "privacy": "protected",
1632
- "description": "Gets the form, if any, associated with the form element.",
1633
- "inheritedFrom": {
1634
- "name": "InputMixin",
1635
- "module": "src/common/mixins/InputMixin.ts"
1636
- }
1538
+ "name": "isDateDisabled",
1539
+ "type": {
1540
+ "text": "DateDisabledPredicate"
1541
+ },
1542
+ "default": "isDateDisabled",
1543
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1637
1544
  },
1638
1545
  {
1639
1546
  "kind": "field",
1640
- "name": "focusableRef",
1641
- "privacy": "protected",
1642
- "inheritedFrom": {
1643
- "name": "FocusableMixin",
1644
- "module": "src/common/mixins/FocusableMixin.ts"
1645
- }
1547
+ "name": "activeFocus",
1548
+ "type": {
1549
+ "text": "boolean"
1550
+ },
1551
+ "privacy": "private",
1552
+ "default": "false"
1553
+ },
1554
+ {
1555
+ "kind": "field",
1556
+ "name": "focusedDay",
1557
+ "privacy": "private",
1558
+ "default": "new Date()"
1646
1559
  },
1647
1560
  {
1648
1561
  "kind": "method",
@@ -1652,200 +1565,192 @@
1652
1565
  "name": "options",
1653
1566
  "optional": true,
1654
1567
  "type": {
1655
- "text": "FocusOptions"
1656
- },
1657
- "description": "An object which controls aspects of the focusing process."
1568
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
1569
+ }
1658
1570
  }
1659
- ],
1660
- "description": "Programmatically move focus to the component.",
1661
- "inheritedFrom": {
1662
- "name": "FocusableMixin",
1663
- "module": "src/common/mixins/FocusableMixin.ts"
1664
- }
1571
+ ]
1665
1572
  },
1666
1573
  {
1667
1574
  "kind": "method",
1668
- "name": "blur",
1669
- "description": "Programmatically remove focus from the component.",
1670
- "inheritedFrom": {
1671
- "name": "FocusableMixin",
1672
- "module": "src/common/mixins/FocusableMixin.ts"
1673
- }
1575
+ "name": "createDateFormatter",
1576
+ "privacy": "private"
1577
+ },
1578
+ {
1579
+ "kind": "field",
1580
+ "name": "handleDaySelect",
1581
+ "privacy": "private"
1674
1582
  },
1675
1583
  {
1676
1584
  "kind": "method",
1677
- "name": "click",
1678
- "description": "Programmatically simulates a click on the component.",
1679
- "inheritedFrom": {
1680
- "name": "FocusableMixin",
1681
- "module": "src/common/mixins/FocusableMixin.ts"
1682
- }
1585
+ "name": "addDays",
1586
+ "privacy": "private",
1587
+ "parameters": [
1588
+ {
1589
+ "name": "days",
1590
+ "type": {
1591
+ "text": "number"
1592
+ }
1593
+ }
1594
+ ]
1683
1595
  },
1684
1596
  {
1685
- "kind": "field",
1686
- "name": "_warningLogged",
1687
- "type": {
1688
- "text": "boolean"
1689
- },
1597
+ "kind": "method",
1598
+ "name": "addMonths",
1690
1599
  "privacy": "private",
1691
- "static": true,
1692
- "default": "false",
1693
- "inheritedFrom": {
1694
- "name": "DraftComponentMixin",
1695
- "module": "src/common/mixins/DraftComponentMixin.ts"
1696
- }
1697
- }
1698
- ],
1699
- "attributes": [
1600
+ "parameters": [
1601
+ {
1602
+ "name": "months",
1603
+ "type": {
1604
+ "text": "number"
1605
+ }
1606
+ }
1607
+ ]
1608
+ },
1700
1609
  {
1701
- "name": "checked",
1702
- "type": {
1703
- "text": "boolean"
1704
- },
1705
- "default": "false",
1706
- "description": "Controls whether the checkbox is checked or not.",
1707
- "fieldName": "checked"
1610
+ "kind": "method",
1611
+ "name": "addYears",
1612
+ "privacy": "private",
1613
+ "parameters": [
1614
+ {
1615
+ "name": "years",
1616
+ "type": {
1617
+ "text": "number"
1618
+ }
1619
+ }
1620
+ ]
1708
1621
  },
1709
1622
  {
1710
- "name": "label",
1711
- "type": {
1712
- "text": "string"
1713
- },
1714
- "default": "\"\"",
1715
- "description": "Label for the input.",
1716
- "fieldName": "label",
1717
- "inheritedFrom": {
1718
- "name": "FormAssociatedMixin",
1719
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1720
- }
1623
+ "kind": "method",
1624
+ "name": "startOfWeek",
1625
+ "privacy": "private"
1721
1626
  },
1722
1627
  {
1723
- "name": "hint",
1724
- "type": {
1725
- "text": "string | undefined"
1726
- },
1727
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
1728
- "fieldName": "hint",
1729
- "inheritedFrom": {
1730
- "name": "FormAssociatedMixin",
1731
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1732
- }
1628
+ "kind": "method",
1629
+ "name": "endOfWeek",
1630
+ "privacy": "private"
1733
1631
  },
1734
1632
  {
1735
- "name": "hide-label",
1736
- "type": {
1737
- "text": "boolean"
1738
- },
1739
- "default": "false",
1740
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1741
- "fieldName": "hideLabel",
1742
- "inheritedFrom": {
1743
- "name": "FormAssociatedMixin",
1744
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1745
- }
1633
+ "kind": "method",
1634
+ "name": "setMonth",
1635
+ "privacy": "private",
1636
+ "parameters": [
1637
+ {
1638
+ "name": "month",
1639
+ "type": {
1640
+ "text": "number"
1641
+ }
1642
+ }
1643
+ ]
1644
+ },
1645
+ {
1646
+ "kind": "method",
1647
+ "name": "setYear",
1648
+ "privacy": "private",
1649
+ "parameters": [
1650
+ {
1651
+ "name": "year",
1652
+ "type": {
1653
+ "text": "number"
1654
+ }
1655
+ }
1656
+ ]
1657
+ },
1658
+ {
1659
+ "kind": "method",
1660
+ "name": "setFocusedDay",
1661
+ "privacy": "private",
1662
+ "parameters": [
1663
+ {
1664
+ "name": "day",
1665
+ "type": {
1666
+ "text": "Date"
1667
+ }
1668
+ }
1669
+ ]
1670
+ },
1671
+ {
1672
+ "kind": "field",
1673
+ "name": "handleMonthSelect",
1674
+ "privacy": "private"
1675
+ },
1676
+ {
1677
+ "kind": "field",
1678
+ "name": "handleYearSelect",
1679
+ "privacy": "private"
1680
+ },
1681
+ {
1682
+ "kind": "field",
1683
+ "name": "handleNextMonthClick",
1684
+ "privacy": "private"
1746
1685
  },
1747
1686
  {
1748
- "name": "placeholder",
1749
- "type": {
1750
- "text": "string | undefined"
1751
- },
1752
- "description": "Placeholder text to display within the input.",
1753
- "fieldName": "placeholder",
1754
- "inheritedFrom": {
1755
- "name": "FormAssociatedMixin",
1756
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1757
- }
1687
+ "kind": "field",
1688
+ "name": "handlePreviousMonthClick",
1689
+ "privacy": "private"
1758
1690
  },
1759
1691
  {
1760
- "name": "error",
1761
- "type": {
1762
- "text": "string | undefined"
1763
- },
1764
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1765
- "fieldName": "error",
1766
- "inheritedFrom": {
1767
- "name": "FormAssociatedMixin",
1768
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1769
- }
1692
+ "kind": "field",
1693
+ "name": "enableActiveFocus",
1694
+ "privacy": "private"
1770
1695
  },
1771
1696
  {
1772
- "name": "required",
1697
+ "kind": "field",
1698
+ "name": "disableActiveFocus",
1699
+ "privacy": "private"
1700
+ },
1701
+ {
1702
+ "kind": "field",
1703
+ "name": "_warningLogged",
1773
1704
  "type": {
1774
1705
  "text": "boolean"
1775
1706
  },
1707
+ "privacy": "private",
1708
+ "static": true,
1776
1709
  "default": "false",
1777
- "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.",
1778
- "fieldName": "required",
1779
1710
  "inheritedFrom": {
1780
- "name": "FormAssociatedMixin",
1781
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1711
+ "name": "DraftComponentMixin",
1712
+ "module": "src/common/mixins/DraftComponentMixin.ts"
1782
1713
  }
1783
- },
1714
+ }
1715
+ ],
1716
+ "attributes": [
1784
1717
  {
1785
- "name": "expand",
1718
+ "name": "value",
1786
1719
  "type": {
1787
- "text": "boolean"
1720
+ "text": "string"
1788
1721
  },
1789
- "default": "false",
1790
- "description": "Controls whether the input expands to fill the width of its container.",
1791
- "fieldName": "expand",
1792
- "inheritedFrom": {
1793
- "name": "FormAssociatedMixin",
1794
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1795
- }
1722
+ "default": "\"\"",
1723
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1724
+ "fieldName": "value"
1796
1725
  },
1797
1726
  {
1798
- "name": "disabled",
1727
+ "name": "firstDayOfWeek",
1799
1728
  "type": {
1800
- "text": "boolean"
1729
+ "text": "DaysOfWeek"
1801
1730
  },
1802
- "default": "false",
1803
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1804
- "fieldName": "disabled",
1805
- "inheritedFrom": {
1806
- "name": "InputMixin",
1807
- "module": "src/common/mixins/InputMixin.ts"
1808
- }
1731
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1732
+ "fieldName": "firstDayOfWeek"
1809
1733
  },
1810
1734
  {
1811
- "name": "name",
1735
+ "name": "min",
1812
1736
  "type": {
1813
- "text": "string | undefined"
1737
+ "text": "string"
1814
1738
  },
1815
- "description": "The name of the form component.",
1816
- "fieldName": "name",
1817
- "inheritedFrom": {
1818
- "name": "InputMixin",
1819
- "module": "src/common/mixins/InputMixin.ts"
1820
- }
1739
+ "default": "\"\"",
1740
+ "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.",
1741
+ "fieldName": "min"
1821
1742
  },
1822
1743
  {
1823
- "name": "value",
1744
+ "name": "max",
1824
1745
  "type": {
1825
1746
  "text": "string"
1826
1747
  },
1827
1748
  "default": "\"\"",
1828
- "description": "The value of the form component.",
1829
- "fieldName": "value",
1830
- "inheritedFrom": {
1831
- "name": "InputMixin",
1832
- "module": "src/common/mixins/InputMixin.ts"
1833
- }
1749
+ "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.",
1750
+ "fieldName": "max"
1834
1751
  }
1835
1752
  ],
1836
1753
  "mixins": [
1837
- {
1838
- "name": "FormAssociatedMixin",
1839
- "module": "/src/common/mixins/FormAssociatedMixin.js"
1840
- },
1841
- {
1842
- "name": "InputMixin",
1843
- "module": "/src/common/mixins/InputMixin.js"
1844
- },
1845
- {
1846
- "name": "FocusableMixin",
1847
- "module": "/src/common/mixins/FocusableMixin.js"
1848
- },
1849
1754
  {
1850
1755
  "name": "DraftComponentMixin",
1851
1756
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -1856,30 +1761,125 @@
1856
1761
  "package": "lit"
1857
1762
  },
1858
1763
  "status": "draft",
1859
- "category": "form",
1860
- "tagName": "nord-checkbox",
1861
- "customElement": true,
1862
- "events": [
1764
+ "category": "list",
1765
+ "tagName": "nord-calendar",
1766
+ "customElement": true
1767
+ }
1768
+ ],
1769
+ "exports": [
1770
+ {
1771
+ "kind": "js",
1772
+ "name": "default",
1773
+ "declaration": {
1774
+ "name": "Calendar",
1775
+ "module": "src/calendar/Calendar.ts"
1776
+ }
1777
+ },
1778
+ {
1779
+ "kind": "custom-element-definition",
1780
+ "name": "nord-calendar",
1781
+ "declaration": {
1782
+ "name": "Calendar",
1783
+ "module": "src/calendar/Calendar.ts"
1784
+ }
1785
+ }
1786
+ ],
1787
+ "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"
1788
+ },
1789
+ {
1790
+ "kind": "javascript-module",
1791
+ "path": "src/calendar/DateSelectEvent.ts",
1792
+ "declarations": [
1793
+ {
1794
+ "kind": "class",
1795
+ "description": "",
1796
+ "name": "DateSelectEvent",
1797
+ "members": [
1863
1798
  {
1864
- "name": "input",
1799
+ "kind": "field",
1800
+ "name": "eventName",
1865
1801
  "type": {
1866
- "text": "NordEvent"
1802
+ "text": "string"
1867
1803
  },
1868
- "description": "Fired as the user types into the input.",
1869
- "inheritedFrom": {
1870
- "name": "FormAssociatedMixin",
1871
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1872
- }
1804
+ "static": true,
1805
+ "default": "\"nord-select\""
1873
1806
  },
1874
1807
  {
1875
- "name": "change",
1808
+ "kind": "field",
1809
+ "name": "date",
1876
1810
  "type": {
1877
- "text": "NordEvent"
1811
+ "text": "Date"
1878
1812
  },
1879
- "description": "Fired whenever the input's value is changed via user interaction.",
1880
- "inheritedFrom": {
1881
- "name": "FormAssociatedMixin",
1882
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1813
+ "default": "date"
1814
+ }
1815
+ ],
1816
+ "superclass": {
1817
+ "name": "NordEvent",
1818
+ "module": "/src/common/events.js"
1819
+ }
1820
+ }
1821
+ ],
1822
+ "exports": [
1823
+ {
1824
+ "kind": "js",
1825
+ "name": "DateSelectEvent",
1826
+ "declaration": {
1827
+ "name": "DateSelectEvent",
1828
+ "module": "src/calendar/DateSelectEvent.ts"
1829
+ }
1830
+ }
1831
+ ],
1832
+ "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"
1833
+ },
1834
+ {
1835
+ "kind": "javascript-module",
1836
+ "path": "src/calendar/calendar-localization.ts",
1837
+ "declarations": [
1838
+ {
1839
+ "kind": "variable",
1840
+ "name": "localization",
1841
+ "type": {
1842
+ "text": "CalendarLocalizedText"
1843
+ },
1844
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
1845
+ }
1846
+ ],
1847
+ "exports": [
1848
+ {
1849
+ "kind": "js",
1850
+ "name": "default",
1851
+ "declaration": {
1852
+ "name": "localization",
1853
+ "module": "src/calendar/calendar-localization.ts"
1854
+ }
1855
+ }
1856
+ ],
1857
+ "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"
1858
+ },
1859
+ {
1860
+ "kind": "javascript-module",
1861
+ "path": "src/calendar/month-view.ts",
1862
+ "declarations": [
1863
+ {
1864
+ "kind": "function",
1865
+ "name": "dayView",
1866
+ "parameters": [
1867
+ {
1868
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1869
+ "type": {
1870
+ "text": "DatePickerDayProps"
1871
+ }
1872
+ }
1873
+ ]
1874
+ },
1875
+ {
1876
+ "kind": "function",
1877
+ "name": "monthView",
1878
+ "parameters": [
1879
+ {
1880
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1881
+ "type": {
1882
+ "text": "MonthViewArgs"
1883
1883
  }
1884
1884
  }
1885
1885
  ]
@@ -1888,22 +1888,22 @@
1888
1888
  "exports": [
1889
1889
  {
1890
1890
  "kind": "js",
1891
- "name": "default",
1891
+ "name": "dayView",
1892
1892
  "declaration": {
1893
- "name": "Checkbox",
1894
- "module": "src/checkbox/Checkbox.ts"
1893
+ "name": "dayView",
1894
+ "module": "src/calendar/month-view.ts"
1895
1895
  }
1896
1896
  },
1897
1897
  {
1898
- "kind": "custom-element-definition",
1899
- "name": "nord-checkbox",
1898
+ "kind": "js",
1899
+ "name": "monthView",
1900
1900
  "declaration": {
1901
- "name": "Checkbox",
1902
- "module": "src/checkbox/Checkbox.ts"
1901
+ "name": "monthView",
1902
+ "module": "src/calendar/month-view.ts"
1903
1903
  }
1904
1904
  }
1905
1905
  ],
1906
- "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- Don’t use 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"
1906
+ "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"
1907
1907
  },
1908
1908
  {
1909
1909
  "kind": "javascript-module",