@nordhealth/components 2.2.0 → 2.3.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.
@@ -1095,761 +1095,402 @@
1095
1095
  },
1096
1096
  {
1097
1097
  "kind": "javascript-module",
1098
- "path": "src/badge/Badge.ts",
1098
+ "path": "src/calendar/Calendar.ts",
1099
1099
  "declarations": [
1100
1100
  {
1101
1101
  "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": [
1102
+ "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.",
1103
+ "name": "Calendar",
1104
+ "cssProperties": [
1105
1105
  {
1106
- "description": "The badge content.",
1107
- "name": ""
1106
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1107
+ "name": "--n-calendar-border-radius",
1108
+ "default": "var(--n-border-radius)"
1109
+ },
1110
+ {
1111
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1112
+ "name": "--n-calendar-box-shadow",
1113
+ "default": "var(--n-box-shadow-popout)"
1108
1114
  }
1109
1115
  ],
1110
1116
  "members": [
1111
1117
  {
1112
1118
  "kind": "field",
1113
- "name": "type",
1119
+ "name": "dialogLabelId",
1114
1120
  "type": {
1115
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1121
+ "text": "string"
1116
1122
  },
1117
- "default": "\"neutral\"",
1118
- "description": "The type of badge.\nDetermines the background color of the badge.",
1119
- "attribute": "type",
1120
- "reflects": true
1123
+ "privacy": "private",
1124
+ "default": "\"dialog-header\""
1121
1125
  },
1122
1126
  {
1123
1127
  "kind": "field",
1124
- "name": "progress",
1125
- "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"
1130
- }
1131
- ],
1132
- "attributes": [
1133
- {
1134
- "name": "type",
1128
+ "name": "monthSelectNode",
1135
1129
  "type": {
1136
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1130
+ "text": "HTMLElement"
1137
1131
  },
1138
- "default": "\"neutral\"",
1139
- "description": "The type of badge.\nDetermines the background color of the badge.",
1140
- "fieldName": "type"
1132
+ "privacy": "private"
1141
1133
  },
1142
1134
  {
1143
- "name": "progress",
1135
+ "kind": "field",
1136
+ "name": "focusedDayNode",
1144
1137
  "type": {
1145
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1138
+ "text": "HTMLButtonElement"
1146
1139
  },
1147
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1148
- "fieldName": "progress"
1149
- }
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
1161
- }
1162
- ],
1163
- "exports": [
1164
- {
1165
- "kind": "js",
1166
- "name": "default",
1167
- "declaration": {
1168
- "name": "Badge",
1169
- "module": "src/badge/Badge.ts"
1170
- }
1171
- },
1172
- {
1173
- "kind": "custom-element-definition",
1174
- "name": "nord-badge",
1175
- "declaration": {
1176
- "name": "Badge",
1177
- "module": "src/badge/Badge.ts"
1178
- }
1179
- }
1180
- ],
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"
1182
- },
1183
- {
1184
- "kind": "javascript-module",
1185
- "path": "src/card/Card.ts",
1186
- "declarations": [
1187
- {
1188
- "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",
1191
- "cssProperties": [
1192
- {
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)"
1196
- },
1197
- {
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)"
1201
- },
1202
- {
1203
- "description": "Controls the padding on all sides of the card.",
1204
- "name": "--n-card-padding",
1205
- "default": "var(--n-space-m)"
1206
- },
1207
- {
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)"
1211
- }
1212
- ],
1213
- "slots": [
1214
- {
1215
- "description": "The card content.",
1216
- "name": ""
1217
- },
1218
- {
1219
- "description": "Optional slot that holds a header for the card.",
1220
- "name": "header"
1140
+ "privacy": "private"
1221
1141
  },
1222
1142
  {
1223
- "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
1224
- "name": "header-end"
1143
+ "kind": "field",
1144
+ "name": "direction",
1145
+ "privacy": "private",
1146
+ "default": "new DirectionController(this)"
1225
1147
  },
1226
- {
1227
- "description": "Optional slot that holds footer content for the card.",
1228
- "name": "footer"
1229
- }
1230
- ],
1231
- "members": [
1232
1148
  {
1233
1149
  "kind": "field",
1234
- "name": "headerSlot",
1150
+ "name": "swipe",
1235
1151
  "privacy": "private",
1236
- "default": "new SlotController(this, \"header\")"
1152
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1237
1153
  },
1238
1154
  {
1239
1155
  "kind": "field",
1240
- "name": "headerEndSlot",
1241
- "privacy": "private",
1242
- "default": "new SlotController(this, \"header-end\")"
1156
+ "name": "shortcuts",
1157
+ "privacy": "private"
1243
1158
  },
1244
1159
  {
1245
1160
  "kind": "field",
1246
- "name": "footerSlot",
1161
+ "name": "localize",
1247
1162
  "privacy": "private",
1248
- "default": "new SlotController(this, \"footer\")"
1163
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1249
1164
  },
1250
1165
  {
1251
1166
  "kind": "field",
1252
- "name": "padding",
1167
+ "name": "dateFormatShort",
1253
1168
  "type": {
1254
- "text": "\"m\" | \"l\" | \"none\""
1169
+ "text": "Intl.DateTimeFormat"
1255
1170
  },
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",
1259
- "reflects": true
1260
- }
1261
- ],
1262
- "attributes": [
1171
+ "privacy": "private",
1172
+ "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"
1173
+ },
1263
1174
  {
1264
- "name": "padding",
1175
+ "kind": "field",
1176
+ "name": "monthNames",
1265
1177
  "type": {
1266
- "text": "\"m\" | \"l\" | \"none\""
1178
+ "text": "string[]"
1267
1179
  },
1268
- "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": [
1314
- {
1315
- "description": "Use when a label requires more than plain text.",
1316
- "name": "label"
1180
+ "privacy": "private"
1317
1181
  },
1318
1182
  {
1319
- "description": "Optional slot that holds hint text for the input.",
1320
- "name": "hint"
1183
+ "kind": "field",
1184
+ "name": "monthNamesShort",
1185
+ "type": {
1186
+ "text": "string[]"
1187
+ },
1188
+ "privacy": "private"
1321
1189
  },
1322
- {
1323
- "description": "Optional slot that holds error text for the input.",
1324
- "name": "error"
1325
- }
1326
- ],
1327
- "members": [
1328
1190
  {
1329
1191
  "kind": "field",
1330
- "name": "formValue",
1331
- "privacy": "protected",
1332
- "inheritedFrom": {
1333
- "name": "FormAssociatedMixin",
1334
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1335
- }
1192
+ "name": "dayNames",
1193
+ "type": {
1194
+ "text": "string[]"
1195
+ },
1196
+ "privacy": "private"
1336
1197
  },
1337
1198
  {
1338
1199
  "kind": "field",
1339
- "name": "indeterminate",
1200
+ "name": "dayNamesShort",
1340
1201
  "type": {
1341
- "text": "boolean"
1202
+ "text": "string[]"
1342
1203
  },
1343
- "default": "false",
1344
- "description": "Controls whether the checkbox is in an indeterminate state.",
1345
- "attribute": "indeterminate"
1204
+ "privacy": "private"
1346
1205
  },
1347
1206
  {
1348
1207
  "kind": "field",
1349
- "name": "checked",
1350
- "type": {
1351
- "text": "boolean"
1352
- },
1353
- "default": "false",
1354
- "description": "Controls whether the checkbox is checked or not.",
1355
- "attribute": "checked"
1356
- },
1357
- {
1358
- "kind": "method",
1359
- "name": "handleChange",
1360
- "privacy": "protected",
1361
- "parameters": [
1362
- {
1363
- "name": "e",
1364
- "type": {
1365
- "text": "Event"
1366
- }
1367
- }
1368
- ],
1369
- "return": {
1370
- "type": {
1371
- "text": "void"
1372
- }
1373
- },
1374
- "inheritedFrom": {
1375
- "name": "FormAssociatedMixin",
1376
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1377
- }
1378
- },
1379
- {
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
- }
1388
- },
1389
- {
1390
- "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
- }
1398
- },
1399
- {
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
- }
1408
- },
1409
- {
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
- }
1418
- },
1419
- {
1420
- "kind": "field",
1421
- "name": "inputId",
1208
+ "name": "value",
1422
1209
  "type": {
1423
1210
  "text": "string"
1424
1211
  },
1425
- "privacy": "protected",
1426
- "default": "\"input\"",
1427
- "inheritedFrom": {
1428
- "name": "FormAssociatedMixin",
1429
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1430
- }
1212
+ "default": "\"\"",
1213
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1214
+ "attribute": "value"
1431
1215
  },
1432
1216
  {
1433
1217
  "kind": "field",
1434
- "name": "errorId",
1218
+ "name": "firstDayOfWeek",
1435
1219
  "type": {
1436
- "text": "string"
1220
+ "text": "DaysOfWeek"
1437
1221
  },
1438
- "privacy": "protected",
1439
- "default": "\"error\"",
1440
- "inheritedFrom": {
1441
- "name": "FormAssociatedMixin",
1442
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1443
- }
1222
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1223
+ "attribute": "firstDayOfWeek"
1444
1224
  },
1445
1225
  {
1446
1226
  "kind": "field",
1447
- "name": "hintId",
1227
+ "name": "min",
1448
1228
  "type": {
1449
1229
  "text": "string"
1450
1230
  },
1451
- "privacy": "protected",
1452
- "default": "\"hint\"",
1453
- "inheritedFrom": {
1454
- "name": "FormAssociatedMixin",
1455
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1456
- }
1231
+ "default": "\"\"",
1232
+ "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.",
1233
+ "attribute": "min"
1457
1234
  },
1458
1235
  {
1459
1236
  "kind": "field",
1460
- "name": "label",
1237
+ "name": "max",
1461
1238
  "type": {
1462
1239
  "text": "string"
1463
1240
  },
1464
1241
  "default": "\"\"",
1465
- "description": "Label for the input.",
1466
- "attribute": "label",
1467
- "inheritedFrom": {
1468
- "name": "FormAssociatedMixin",
1469
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1470
- }
1471
- },
1472
- {
1473
- "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",
1480
- "inheritedFrom": {
1481
- "name": "FormAssociatedMixin",
1482
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1483
- }
1242
+ "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.",
1243
+ "attribute": "max"
1484
1244
  },
1485
1245
  {
1486
1246
  "kind": "field",
1487
- "name": "hideLabel",
1247
+ "name": "expand",
1488
1248
  "type": {
1489
1249
  "text": "boolean"
1490
1250
  },
1491
1251
  "default": "false",
1492
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
1493
- "attribute": "hide-label",
1494
- "inheritedFrom": {
1495
- "name": "FormAssociatedMixin",
1496
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1497
- }
1252
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1253
+ "attribute": "expand",
1254
+ "reflects": true
1498
1255
  },
1499
1256
  {
1500
1257
  "kind": "field",
1501
- "name": "placeholder",
1258
+ "name": "isDateDisabled",
1502
1259
  "type": {
1503
- "text": "string | undefined"
1260
+ "text": "DateDisabledPredicate"
1504
1261
  },
1505
- "description": "Placeholder text to display within the input.",
1506
- "attribute": "placeholder",
1507
- "inheritedFrom": {
1508
- "name": "FormAssociatedMixin",
1509
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1510
- }
1262
+ "default": "isDateDisabled",
1263
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1511
1264
  },
1512
1265
  {
1513
1266
  "kind": "field",
1514
- "name": "error",
1267
+ "name": "activeFocus",
1515
1268
  "type": {
1516
- "text": "string | undefined"
1269
+ "text": "boolean"
1517
1270
  },
1518
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
1519
- "attribute": "error",
1520
- "inheritedFrom": {
1521
- "name": "FormAssociatedMixin",
1522
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1523
- }
1271
+ "privacy": "private",
1272
+ "default": "false"
1524
1273
  },
1525
1274
  {
1526
1275
  "kind": "field",
1527
- "name": "required",
1528
- "type": {
1529
- "text": "boolean"
1530
- },
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
- }
1276
+ "name": "focusedDay",
1277
+ "privacy": "private",
1278
+ "default": "new Date()"
1538
1279
  },
1539
1280
  {
1540
1281
  "kind": "method",
1541
- "name": "handleInput",
1542
- "privacy": "protected",
1282
+ "name": "focus",
1543
1283
  "parameters": [
1544
1284
  {
1545
- "name": "e",
1285
+ "name": "options",
1286
+ "optional": true,
1546
1287
  "type": {
1547
- "text": "Event"
1548
- }
1288
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
1289
+ },
1290
+ "description": "An object which controls aspects of the focusing process."
1549
1291
  }
1550
1292
  ],
1551
- "inheritedFrom": {
1552
- "name": "FormAssociatedMixin",
1553
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1554
- }
1555
- },
1556
- {
1557
- "kind": "method",
1558
- "name": "renderLabel",
1559
- "privacy": "protected",
1560
- "inheritedFrom": {
1561
- "name": "FormAssociatedMixin",
1562
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1563
- }
1293
+ "description": "Programmatically move focus to the calendar."
1564
1294
  },
1565
1295
  {
1566
1296
  "kind": "method",
1567
- "name": "renderError",
1568
- "privacy": "protected",
1569
- "inheritedFrom": {
1570
- "name": "FormAssociatedMixin",
1571
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1572
- }
1297
+ "name": "handleValueChange",
1298
+ "privacy": "protected"
1573
1299
  },
1574
1300
  {
1575
1301
  "kind": "method",
1576
- "name": "getDescribedBy",
1577
- "privacy": "protected",
1578
- "inheritedFrom": {
1579
- "name": "FormAssociatedMixin",
1580
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1581
- }
1302
+ "name": "handleFocusedDayChange",
1303
+ "privacy": "protected"
1582
1304
  },
1583
1305
  {
1584
1306
  "kind": "method",
1585
- "name": "getInvalid",
1586
- "privacy": "protected",
1587
- "inheritedFrom": {
1588
- "name": "FormAssociatedMixin",
1589
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1590
- }
1307
+ "name": "handleLangChange",
1308
+ "privacy": "private"
1591
1309
  },
1592
1310
  {
1593
1311
  "kind": "field",
1594
- "name": "hasHint",
1595
- "privacy": "protected",
1596
- "inheritedFrom": {
1597
- "name": "FormAssociatedMixin",
1598
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1599
- }
1312
+ "name": "handleDaySelect",
1313
+ "privacy": "private"
1600
1314
  },
1601
1315
  {
1602
- "kind": "field",
1603
- "name": "hasError",
1604
- "privacy": "protected",
1605
- "inheritedFrom": {
1606
- "name": "FormAssociatedMixin",
1607
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1608
- }
1316
+ "kind": "method",
1317
+ "name": "addDays",
1318
+ "privacy": "private",
1319
+ "parameters": [
1320
+ {
1321
+ "name": "days",
1322
+ "type": {
1323
+ "text": "number"
1324
+ }
1325
+ }
1326
+ ]
1609
1327
  },
1610
1328
  {
1611
- "kind": "field",
1612
- "name": "disabled",
1613
- "type": {
1614
- "text": "boolean"
1615
- },
1616
- "default": "false",
1617
- "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,
1620
- "inheritedFrom": {
1621
- "name": "InputMixin",
1622
- "module": "src/common/mixins/InputMixin.ts"
1623
- }
1329
+ "kind": "method",
1330
+ "name": "addMonths",
1331
+ "privacy": "private",
1332
+ "parameters": [
1333
+ {
1334
+ "name": "months",
1335
+ "type": {
1336
+ "text": "number"
1337
+ }
1338
+ }
1339
+ ]
1624
1340
  },
1625
1341
  {
1626
- "kind": "field",
1627
- "name": "name",
1628
- "type": {
1629
- "text": "string | undefined"
1630
- },
1631
- "description": "The name of the form component.",
1632
- "attribute": "name",
1633
- "inheritedFrom": {
1634
- "name": "InputMixin",
1635
- "module": "src/common/mixins/InputMixin.ts"
1636
- }
1342
+ "kind": "method",
1343
+ "name": "addYears",
1344
+ "privacy": "private",
1345
+ "parameters": [
1346
+ {
1347
+ "name": "years",
1348
+ "type": {
1349
+ "text": "number"
1350
+ }
1351
+ }
1352
+ ]
1637
1353
  },
1638
1354
  {
1639
- "kind": "field",
1640
- "name": "value",
1641
- "type": {
1642
- "text": "string"
1643
- },
1644
- "default": "\"\"",
1645
- "description": "The value of the form component.",
1646
- "attribute": "value",
1647
- "inheritedFrom": {
1648
- "name": "InputMixin",
1649
- "module": "src/common/mixins/InputMixin.ts"
1650
- }
1355
+ "kind": "method",
1356
+ "name": "startOfWeek",
1357
+ "privacy": "private"
1651
1358
  },
1652
1359
  {
1653
- "kind": "field",
1654
- "name": "form",
1655
- "description": "Gets the form, if any, associated with the form element.",
1656
- "inheritedFrom": {
1657
- "name": "InputMixin",
1658
- "module": "src/common/mixins/InputMixin.ts"
1659
- }
1360
+ "kind": "method",
1361
+ "name": "endOfWeek",
1362
+ "privacy": "private"
1660
1363
  },
1661
1364
  {
1662
- "kind": "field",
1663
- "name": "focusableRef",
1664
- "privacy": "protected",
1665
- "inheritedFrom": {
1666
- "name": "FocusableMixin",
1667
- "module": "src/common/mixins/FocusableMixin.ts"
1668
- }
1365
+ "kind": "method",
1366
+ "name": "setMonth",
1367
+ "privacy": "private",
1368
+ "parameters": [
1369
+ {
1370
+ "name": "month",
1371
+ "type": {
1372
+ "text": "number"
1373
+ }
1374
+ }
1375
+ ]
1669
1376
  },
1670
1377
  {
1671
1378
  "kind": "method",
1672
- "name": "focus",
1379
+ "name": "setYear",
1380
+ "privacy": "private",
1673
1381
  "parameters": [
1674
1382
  {
1675
- "name": "options",
1676
- "optional": true,
1383
+ "name": "year",
1677
1384
  "type": {
1678
- "text": "FocusOptions"
1679
- },
1680
- "description": "An object which controls aspects of the focusing process."
1385
+ "text": "number"
1386
+ }
1681
1387
  }
1682
- ],
1683
- "description": "Programmatically move focus to the component.",
1684
- "inheritedFrom": {
1685
- "name": "FocusableMixin",
1686
- "module": "src/common/mixins/FocusableMixin.ts"
1687
- }
1388
+ ]
1688
1389
  },
1689
1390
  {
1690
1391
  "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
- }
1392
+ "name": "setFocusedDay",
1393
+ "privacy": "private",
1394
+ "parameters": [
1395
+ {
1396
+ "name": "day",
1397
+ "type": {
1398
+ "text": "Date"
1399
+ }
1400
+ }
1401
+ ]
1697
1402
  },
1698
1403
  {
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
- }
1706
- }
1707
- ],
1708
- "attributes": [
1404
+ "kind": "field",
1405
+ "name": "handleMonthSelect",
1406
+ "privacy": "private"
1407
+ },
1709
1408
  {
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"
1409
+ "kind": "field",
1410
+ "name": "handleYearSelect",
1411
+ "privacy": "private"
1717
1412
  },
1718
1413
  {
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"
1414
+ "kind": "field",
1415
+ "name": "handleNextMonthClick",
1416
+ "privacy": "private"
1726
1417
  },
1727
1418
  {
1728
- "name": "label",
1419
+ "kind": "field",
1420
+ "name": "handlePreviousMonthClick",
1421
+ "privacy": "private"
1422
+ },
1423
+ {
1424
+ "kind": "field",
1425
+ "name": "enableActiveFocus",
1426
+ "privacy": "private"
1427
+ },
1428
+ {
1429
+ "kind": "field",
1430
+ "name": "disableActiveFocus",
1431
+ "privacy": "private"
1432
+ }
1433
+ ],
1434
+ "events": [
1435
+ {
1436
+ "name": "nord-focus-date",
1729
1437
  "type": {
1730
- "text": "string"
1438
+ "text": "DateSelectEvent"
1731
1439
  },
1732
- "default": "\"\"",
1733
- "description": "Label for the input.",
1734
- "fieldName": "label",
1735
- "inheritedFrom": {
1736
- "name": "FormAssociatedMixin",
1737
- "module": "src/common/mixins/FormAssociatedMixin.ts"
1738
- }
1440
+ "description": "Dispatched when the calendar's focused date changes."
1739
1441
  },
1740
1442
  {
1741
- "name": "hint",
1742
1443
  "type": {
1743
- "text": "string | undefined"
1444
+ "text": "DateSelectEvent"
1744
1445
  },
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
- },
1446
+ "description": "Dispatched when a date is selected and the value changes.",
1447
+ "name": "change"
1448
+ }
1449
+ ],
1450
+ "attributes": [
1752
1451
  {
1753
- "name": "hide-label",
1452
+ "name": "value",
1754
1453
  "type": {
1755
- "text": "boolean"
1454
+ "text": "string"
1756
1455
  },
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
- }
1456
+ "default": "\"\"",
1457
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1458
+ "fieldName": "value"
1764
1459
  },
1765
1460
  {
1766
- "name": "placeholder",
1461
+ "name": "firstDayOfWeek",
1767
1462
  "type": {
1768
- "text": "string | undefined"
1463
+ "text": "DaysOfWeek"
1769
1464
  },
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
- }
1465
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1466
+ "fieldName": "firstDayOfWeek"
1776
1467
  },
1777
1468
  {
1778
- "name": "error",
1469
+ "name": "min",
1779
1470
  "type": {
1780
- "text": "string | undefined"
1471
+ "text": "string"
1781
1472
  },
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
- }
1473
+ "default": "\"\"",
1474
+ "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.",
1475
+ "fieldName": "min"
1788
1476
  },
1789
1477
  {
1790
- "name": "required",
1478
+ "name": "max",
1791
1479
  "type": {
1792
- "text": "boolean"
1480
+ "text": "string"
1793
1481
  },
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
- }
1482
+ "default": "\"\"",
1483
+ "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.",
1484
+ "fieldName": "max"
1801
1485
  },
1802
1486
  {
1803
- "name": "disabled",
1487
+ "name": "expand",
1804
1488
  "type": {
1805
1489
  "text": "boolean"
1806
1490
  },
1807
1491
  "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
- },
1815
- {
1816
- "name": "name",
1817
- "type": {
1818
- "text": "string | undefined"
1819
- },
1820
- "description": "The name of the form component.",
1821
- "fieldName": "name",
1822
- "inheritedFrom": {
1823
- "name": "InputMixin",
1824
- "module": "src/common/mixins/InputMixin.ts"
1825
- }
1826
- },
1827
- {
1828
- "name": "value",
1829
- "type": {
1830
- "text": "string"
1831
- },
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"
1492
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1493
+ "fieldName": "expand"
1853
1494
  }
1854
1495
  ],
1855
1496
  "superclass": {
@@ -1857,32 +1498,109 @@
1857
1498
  "package": "lit"
1858
1499
  },
1859
1500
  "status": "ready",
1860
- "category": "form",
1501
+ "category": "list",
1861
1502
  "displayName": null,
1862
1503
  "examples": [],
1863
- "tagName": "nord-checkbox",
1864
- "customElement": true,
1865
- "events": [
1504
+ "tagName": "nord-calendar",
1505
+ "customElement": true
1506
+ }
1507
+ ],
1508
+ "exports": [
1509
+ {
1510
+ "kind": "js",
1511
+ "name": "default",
1512
+ "declaration": {
1513
+ "name": "Calendar",
1514
+ "module": "src/calendar/Calendar.ts"
1515
+ }
1516
+ },
1517
+ {
1518
+ "kind": "custom-element-definition",
1519
+ "name": "nord-calendar",
1520
+ "declaration": {
1521
+ "name": "Calendar",
1522
+ "module": "src/calendar/Calendar.ts"
1523
+ }
1524
+ }
1525
+ ],
1526
+ "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"
1527
+ },
1528
+ {
1529
+ "kind": "javascript-module",
1530
+ "path": "src/calendar/DateSelectEvent.ts",
1531
+ "declarations": [
1532
+ {
1533
+ "kind": "class",
1534
+ "description": "",
1535
+ "name": "DateSelectEvent",
1536
+ "superclass": {
1537
+ "name": "NordEvent",
1538
+ "module": "/src/common/events.js"
1539
+ },
1540
+ "examples": []
1541
+ }
1542
+ ],
1543
+ "exports": [
1544
+ {
1545
+ "kind": "js",
1546
+ "name": "DateSelectEvent",
1547
+ "declaration": {
1548
+ "name": "DateSelectEvent",
1549
+ "module": "src/calendar/DateSelectEvent.ts"
1550
+ }
1551
+ }
1552
+ ],
1553
+ "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"
1554
+ },
1555
+ {
1556
+ "kind": "javascript-module",
1557
+ "path": "src/calendar/localization.ts",
1558
+ "declarations": [
1559
+ {
1560
+ "kind": "variable",
1561
+ "name": "calendarLocalization",
1562
+ "type": {
1563
+ "text": "object"
1564
+ },
1565
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1566
+ }
1567
+ ],
1568
+ "exports": [
1569
+ {
1570
+ "kind": "js",
1571
+ "name": "default",
1572
+ "declaration": {
1573
+ "name": "calendarLocalization",
1574
+ "module": "src/calendar/localization.ts"
1575
+ }
1576
+ }
1577
+ ],
1578
+ "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"
1579
+ },
1580
+ {
1581
+ "kind": "javascript-module",
1582
+ "path": "src/calendar/month-view.ts",
1583
+ "declarations": [
1584
+ {
1585
+ "kind": "function",
1586
+ "name": "dayView",
1587
+ "parameters": [
1866
1588
  {
1867
- "name": "input",
1589
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1868
1590
  "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"
1591
+ "text": "DatePickerDayProps"
1875
1592
  }
1876
- },
1593
+ }
1594
+ ]
1595
+ },
1596
+ {
1597
+ "kind": "function",
1598
+ "name": "monthView",
1599
+ "parameters": [
1877
1600
  {
1878
- "name": "change",
1601
+ "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}",
1879
1602
  "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"
1603
+ "text": "MonthViewArgs"
1886
1604
  }
1887
1605
  }
1888
1606
  ]
@@ -1891,531 +1609,845 @@
1891
1609
  "exports": [
1892
1610
  {
1893
1611
  "kind": "js",
1894
- "name": "default",
1612
+ "name": "dayView",
1895
1613
  "declaration": {
1896
- "name": "Checkbox",
1897
- "module": "src/checkbox/Checkbox.ts"
1614
+ "name": "dayView",
1615
+ "module": "src/calendar/month-view.ts"
1898
1616
  }
1899
1617
  },
1900
1618
  {
1901
- "kind": "custom-element-definition",
1902
- "name": "nord-checkbox",
1619
+ "kind": "js",
1620
+ "name": "monthView",
1903
1621
  "declaration": {
1904
- "name": "Checkbox",
1905
- "module": "src/checkbox/Checkbox.ts"
1622
+ "name": "monthView",
1623
+ "module": "src/calendar/month-view.ts"
1906
1624
  }
1907
1625
  }
1908
1626
  ],
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 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"
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- 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"
1910
1628
  },
1911
1629
  {
1912
1630
  "kind": "javascript-module",
1913
- "path": "src/calendar/Calendar.ts",
1631
+ "path": "src/card/Card.ts",
1914
1632
  "declarations": [
1915
1633
  {
1916
1634
  "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",
1635
+ "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.",
1636
+ "name": "Card",
1919
1637
  "cssProperties": [
1920
1638
  {
1921
1639
  "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1922
- "name": "--n-calendar-border-radius",
1640
+ "name": "--n-card-border-radius",
1923
1641
  "default": "var(--n-border-radius)"
1924
1642
  },
1925
1643
  {
1926
1644
  "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1927
- "name": "--n-calendar-box-shadow",
1645
+ "name": "--n-card-box-shadow",
1928
1646
  "default": "var(--n-box-shadow-popout)"
1647
+ },
1648
+ {
1649
+ "description": "Controls the padding on all sides of the card.",
1650
+ "name": "--n-card-padding",
1651
+ "default": "var(--n-space-m)"
1652
+ },
1653
+ {
1654
+ "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
1655
+ "name": "--n-card-slot-padding",
1656
+ "default": "var(--n-space-m)"
1929
1657
  }
1930
1658
  ],
1931
- "members": [
1659
+ "slots": [
1932
1660
  {
1933
- "kind": "field",
1934
- "name": "dialogLabelId",
1935
- "type": {
1936
- "text": "string"
1937
- },
1938
- "privacy": "private",
1939
- "default": "\"dialog-header\""
1661
+ "description": "The card content.",
1662
+ "name": ""
1940
1663
  },
1941
1664
  {
1942
- "kind": "field",
1943
- "name": "monthSelectNode",
1944
- "type": {
1945
- "text": "HTMLElement"
1946
- },
1947
- "privacy": "private"
1665
+ "description": "Optional slot that holds a header for the card.",
1666
+ "name": "header"
1948
1667
  },
1949
1668
  {
1950
- "kind": "field",
1951
- "name": "focusedDayNode",
1952
- "type": {
1953
- "text": "HTMLButtonElement"
1954
- },
1955
- "privacy": "private"
1669
+ "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
1670
+ "name": "header-end"
1956
1671
  },
1957
1672
  {
1958
- "kind": "field",
1959
- "name": "direction",
1960
- "privacy": "private",
1961
- "default": "new DirectionController(this)"
1962
- },
1673
+ "description": "Optional slot that holds footer content for the card.",
1674
+ "name": "footer"
1675
+ }
1676
+ ],
1677
+ "members": [
1963
1678
  {
1964
1679
  "kind": "field",
1965
- "name": "swipe",
1680
+ "name": "headerSlot",
1966
1681
  "privacy": "private",
1967
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1968
- },
1969
- {
1970
- "kind": "field",
1971
- "name": "shortcuts",
1972
- "privacy": "private"
1682
+ "default": "new SlotController(this, \"header\")"
1973
1683
  },
1974
1684
  {
1975
1685
  "kind": "field",
1976
- "name": "localize",
1686
+ "name": "headerEndSlot",
1977
1687
  "privacy": "private",
1978
- "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1688
+ "default": "new SlotController(this, \"header-end\")"
1979
1689
  },
1980
1690
  {
1981
1691
  "kind": "field",
1982
- "name": "dateFormatShort",
1983
- "type": {
1984
- "text": "Intl.DateTimeFormat"
1985
- },
1692
+ "name": "footerSlot",
1986
1693
  "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"
1694
+ "default": "new SlotController(this, \"footer\")"
1988
1695
  },
1989
1696
  {
1990
1697
  "kind": "field",
1991
- "name": "monthNames",
1698
+ "name": "padding",
1992
1699
  "type": {
1993
- "text": "string[]"
1700
+ "text": "\"m\" | \"l\" | \"none\""
1994
1701
  },
1995
- "privacy": "private"
1996
- },
1997
- {
1998
- "kind": "field",
1999
- "name": "monthNamesShort",
1702
+ "default": "\"m\"",
1703
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1704
+ "attribute": "padding",
1705
+ "reflects": true
1706
+ }
1707
+ ],
1708
+ "attributes": [
1709
+ {
1710
+ "name": "padding",
2000
1711
  "type": {
2001
- "text": "string[]"
1712
+ "text": "\"m\" | \"l\" | \"none\""
2002
1713
  },
2003
- "privacy": "private"
2004
- },
1714
+ "default": "\"m\"",
1715
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1716
+ "fieldName": "padding"
1717
+ }
1718
+ ],
1719
+ "superclass": {
1720
+ "name": "LitElement",
1721
+ "package": "lit"
1722
+ },
1723
+ "status": "ready",
1724
+ "category": "structure",
1725
+ "displayName": null,
1726
+ "examples": [],
1727
+ "tagName": "nord-card",
1728
+ "customElement": true
1729
+ }
1730
+ ],
1731
+ "exports": [
1732
+ {
1733
+ "kind": "js",
1734
+ "name": "default",
1735
+ "declaration": {
1736
+ "name": "Card",
1737
+ "module": "src/card/Card.ts"
1738
+ }
1739
+ },
1740
+ {
1741
+ "kind": "custom-element-definition",
1742
+ "name": "nord-card",
1743
+ "declaration": {
1744
+ "name": "Card",
1745
+ "module": "src/card/Card.ts"
1746
+ }
1747
+ }
1748
+ ],
1749
+ "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"
1750
+ },
1751
+ {
1752
+ "kind": "javascript-module",
1753
+ "path": "src/badge/Badge.ts",
1754
+ "declarations": [
1755
+ {
1756
+ "kind": "class",
1757
+ "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.",
1758
+ "name": "Badge",
1759
+ "slots": [
1760
+ {
1761
+ "description": "The badge content.",
1762
+ "name": ""
1763
+ }
1764
+ ],
1765
+ "members": [
2005
1766
  {
2006
1767
  "kind": "field",
2007
- "name": "dayNames",
1768
+ "name": "type",
2008
1769
  "type": {
2009
- "text": "string[]"
1770
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
2010
1771
  },
2011
- "privacy": "private"
1772
+ "default": "\"neutral\"",
1773
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1774
+ "attribute": "type",
1775
+ "reflects": true
2012
1776
  },
2013
1777
  {
2014
1778
  "kind": "field",
2015
- "name": "dayNamesShort",
1779
+ "name": "progress",
2016
1780
  "type": {
2017
- "text": "string[]"
1781
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
2018
1782
  },
2019
- "privacy": "private"
2020
- },
1783
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1784
+ "attribute": "progress"
1785
+ }
1786
+ ],
1787
+ "attributes": [
2021
1788
  {
2022
- "kind": "field",
2023
- "name": "value",
1789
+ "name": "type",
2024
1790
  "type": {
2025
- "text": "string"
1791
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
2026
1792
  },
2027
- "default": "\"\"",
2028
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2029
- "attribute": "value"
1793
+ "default": "\"neutral\"",
1794
+ "description": "The type of badge.\nDetermines the background color of the badge.",
1795
+ "fieldName": "type"
2030
1796
  },
2031
1797
  {
2032
- "kind": "field",
2033
- "name": "firstDayOfWeek",
1798
+ "name": "progress",
2034
1799
  "type": {
2035
- "text": "DaysOfWeek"
1800
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
2036
1801
  },
2037
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2038
- "attribute": "firstDayOfWeek"
1802
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1803
+ "fieldName": "progress"
1804
+ }
1805
+ ],
1806
+ "superclass": {
1807
+ "name": "LitElement",
1808
+ "package": "lit"
1809
+ },
1810
+ "status": "ready",
1811
+ "category": "text",
1812
+ "displayName": null,
1813
+ "examples": [],
1814
+ "tagName": "nord-badge",
1815
+ "customElement": true
1816
+ }
1817
+ ],
1818
+ "exports": [
1819
+ {
1820
+ "kind": "js",
1821
+ "name": "default",
1822
+ "declaration": {
1823
+ "name": "Badge",
1824
+ "module": "src/badge/Badge.ts"
1825
+ }
1826
+ },
1827
+ {
1828
+ "kind": "custom-element-definition",
1829
+ "name": "nord-badge",
1830
+ "declaration": {
1831
+ "name": "Badge",
1832
+ "module": "src/badge/Badge.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 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"
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"
2039
1850
  },
2040
1851
  {
2041
- "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"
1852
+ "description": "Optional slot that holds hint text for the input.",
1853
+ "name": "hint"
2049
1854
  },
1855
+ {
1856
+ "description": "Optional slot that holds error text for the input.",
1857
+ "name": "error"
1858
+ }
1859
+ ],
1860
+ "members": [
2050
1861
  {
2051
1862
  "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"
1863
+ "name": "formValue",
1864
+ "privacy": "protected",
1865
+ "inheritedFrom": {
1866
+ "name": "FormAssociatedMixin",
1867
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1868
+ }
2059
1869
  },
2060
1870
  {
2061
1871
  "kind": "field",
2062
- "name": "expand",
1872
+ "name": "indeterminate",
2063
1873
  "type": {
2064
1874
  "text": "boolean"
2065
1875
  },
2066
1876
  "default": "false",
2067
- "description": "Controls whether the calendar expands to fill the width of its container.",
2068
- "attribute": "expand",
2069
- "reflects": true
2070
- },
2071
- {
2072
- "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."
1877
+ "description": "Controls whether the checkbox is in an indeterminate state.",
1878
+ "attribute": "indeterminate"
2079
1879
  },
2080
1880
  {
2081
1881
  "kind": "field",
2082
- "name": "activeFocus",
1882
+ "name": "checked",
2083
1883
  "type": {
2084
1884
  "text": "boolean"
2085
1885
  },
2086
- "privacy": "private",
2087
- "default": "false"
2088
- },
2089
- {
2090
- "kind": "field",
2091
- "name": "focusedDay",
2092
- "privacy": "private",
2093
- "default": "new Date()"
1886
+ "default": "false",
1887
+ "description": "Controls whether the checkbox is checked or not.",
1888
+ "attribute": "checked"
2094
1889
  },
2095
1890
  {
2096
1891
  "kind": "method",
2097
- "name": "focus",
1892
+ "name": "handleChange",
1893
+ "privacy": "protected",
2098
1894
  "parameters": [
2099
1895
  {
2100
- "name": "options",
2101
- "optional": true,
1896
+ "name": "e",
2102
1897
  "type": {
2103
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
2104
- },
2105
- "description": "An object which controls aspects of the focusing process."
1898
+ "text": "Event"
1899
+ }
2106
1900
  }
2107
1901
  ],
2108
- "description": "Programmatically move focus to the calendar."
1902
+ "return": {
1903
+ "type": {
1904
+ "text": "void"
1905
+ }
1906
+ },
1907
+ "inheritedFrom": {
1908
+ "name": "FormAssociatedMixin",
1909
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1910
+ }
2109
1911
  },
2110
1912
  {
2111
- "kind": "method",
2112
- "name": "handleValueChange",
2113
- "privacy": "protected"
1913
+ "kind": "field",
1914
+ "name": "size",
1915
+ "type": {
1916
+ "text": "\"s\" | \"m\" | \"l\""
1917
+ },
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
+ }
2114
1926
  },
2115
1927
  {
2116
- "kind": "method",
2117
- "name": "handleFocusedDayChange",
2118
- "privacy": "protected"
2119
- },
2120
- {
2121
- "kind": "method",
2122
- "name": "handleLangChange",
2123
- "privacy": "private"
2124
- },
2125
- {
2126
- "kind": "field",
2127
- "name": "handleDaySelect",
2128
- "privacy": "private"
2129
- },
2130
- {
2131
- "kind": "method",
2132
- "name": "addDays",
2133
- "privacy": "private",
2134
- "parameters": [
2135
- {
2136
- "name": "days",
2137
- "type": {
2138
- "text": "number"
2139
- }
2140
- }
2141
- ]
2142
- },
2143
- {
2144
- "kind": "method",
2145
- "name": "addMonths",
2146
- "privacy": "private",
2147
- "parameters": [
2148
- {
2149
- "name": "months",
2150
- "type": {
2151
- "text": "number"
2152
- }
2153
- }
2154
- ]
2155
- },
2156
- {
2157
- "kind": "method",
2158
- "name": "addYears",
2159
- "privacy": "private",
2160
- "parameters": [
2161
- {
2162
- "name": "years",
2163
- "type": {
2164
- "text": "number"
2165
- }
2166
- }
2167
- ]
2168
- },
2169
- {
2170
- "kind": "method",
2171
- "name": "startOfWeek",
2172
- "privacy": "private"
2173
- },
2174
- {
2175
- "kind": "method",
2176
- "name": "endOfWeek",
2177
- "privacy": "private"
2178
- },
2179
- {
2180
- "kind": "method",
2181
- "name": "setMonth",
2182
- "privacy": "private",
2183
- "parameters": [
2184
- {
2185
- "name": "month",
2186
- "type": {
2187
- "text": "number"
2188
- }
2189
- }
2190
- ]
2191
- },
2192
- {
2193
- "kind": "method",
2194
- "name": "setYear",
2195
- "privacy": "private",
2196
- "parameters": [
2197
- {
2198
- "name": "year",
2199
- "type": {
2200
- "text": "number"
2201
- }
2202
- }
2203
- ]
2204
- },
2205
- {
2206
- "kind": "method",
2207
- "name": "setFocusedDay",
2208
- "privacy": "private",
2209
- "parameters": [
2210
- {
2211
- "name": "day",
2212
- "type": {
2213
- "text": "Date"
2214
- }
2215
- }
2216
- ]
1928
+ "kind": "field",
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
+ }
2217
1936
  },
2218
1937
  {
2219
1938
  "kind": "field",
2220
- "name": "handleMonthSelect",
2221
- "privacy": "private"
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
+ }
2222
1946
  },
2223
1947
  {
2224
1948
  "kind": "field",
2225
- "name": "handleYearSelect",
2226
- "privacy": "private"
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
+ }
2227
1956
  },
2228
1957
  {
2229
1958
  "kind": "field",
2230
- "name": "handleNextMonthClick",
2231
- "privacy": "private"
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
+ }
2232
1966
  },
2233
1967
  {
2234
1968
  "kind": "field",
2235
- "name": "handlePreviousMonthClick",
2236
- "privacy": "private"
1969
+ "name": "inputId",
1970
+ "type": {
1971
+ "text": "string"
1972
+ },
1973
+ "privacy": "protected",
1974
+ "default": "\"input\"",
1975
+ "inheritedFrom": {
1976
+ "name": "FormAssociatedMixin",
1977
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
1978
+ }
2237
1979
  },
2238
1980
  {
2239
1981
  "kind": "field",
2240
- "name": "enableActiveFocus",
2241
- "privacy": "private"
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
+ }
2242
1992
  },
2243
1993
  {
2244
1994
  "kind": "field",
2245
- "name": "disableActiveFocus",
2246
- "privacy": "private"
2247
- }
2248
- ],
2249
- "events": [
2250
- {
2251
- "name": "nord-focus-date",
1995
+ "name": "hintId",
2252
1996
  "type": {
2253
- "text": "DateSelectEvent"
1997
+ "text": "string"
2254
1998
  },
2255
- "description": "Dispatched when the calendar's focused date changes."
1999
+ "privacy": "protected",
2000
+ "default": "\"hint\"",
2001
+ "inheritedFrom": {
2002
+ "name": "FormAssociatedMixin",
2003
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2004
+ }
2256
2005
  },
2257
2006
  {
2007
+ "kind": "field",
2008
+ "name": "label",
2258
2009
  "type": {
2259
- "text": "DateSelectEvent"
2010
+ "text": "string"
2260
2011
  },
2261
- "description": "Dispatched when a date is selected and the value changes.",
2262
- "name": "change"
2263
- }
2264
- ],
2265
- "attributes": [
2012
+ "default": "\"\"",
2013
+ "description": "Label for the input.",
2014
+ "attribute": "label",
2015
+ "inheritedFrom": {
2016
+ "name": "FormAssociatedMixin",
2017
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2018
+ }
2019
+ },
2266
2020
  {
2267
- "name": "value",
2021
+ "kind": "field",
2022
+ "name": "hint",
2268
2023
  "type": {
2269
- "text": "string"
2024
+ "text": "string | undefined"
2270
2025
  },
2271
- "default": "\"\"",
2272
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
2273
- "fieldName": "value"
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
+ }
2274
2032
  },
2275
2033
  {
2276
- "name": "firstDayOfWeek",
2034
+ "kind": "field",
2035
+ "name": "hideLabel",
2277
2036
  "type": {
2278
- "text": "DaysOfWeek"
2037
+ "text": "boolean"
2279
2038
  },
2280
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
2281
- "fieldName": "firstDayOfWeek"
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
+ }
2282
2046
  },
2283
2047
  {
2284
- "name": "min",
2048
+ "kind": "field",
2049
+ "name": "placeholder",
2285
2050
  "type": {
2286
- "text": "string"
2051
+ "text": "string | undefined"
2287
2052
  },
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"
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
+ }
2291
2059
  },
2292
2060
  {
2293
- "name": "max",
2061
+ "kind": "field",
2062
+ "name": "error",
2294
2063
  "type": {
2295
- "text": "string"
2064
+ "text": "string | undefined"
2296
2065
  },
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"
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
+ }
2300
2072
  },
2301
2073
  {
2302
- "name": "expand",
2074
+ "kind": "field",
2075
+ "name": "required",
2303
2076
  "type": {
2304
2077
  "text": "boolean"
2305
2078
  },
2306
2079
  "default": "false",
2307
- "description": "Controls whether the calendar expands to fill the width of its container.",
2308
- "fieldName": "expand"
2309
- }
2310
- ],
2311
- "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"
2379
- },
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": [
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
+ }
2086
+ },
2087
+ {
2088
+ "kind": "method",
2089
+ "name": "handleInput",
2090
+ "privacy": "protected",
2091
+ "parameters": [
2092
+ {
2093
+ "name": "e",
2094
+ "type": {
2095
+ "text": "Event"
2096
+ }
2097
+ }
2098
+ ],
2099
+ "inheritedFrom": {
2100
+ "name": "FormAssociatedMixin",
2101
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2102
+ }
2103
+ },
2104
+ {
2105
+ "kind": "method",
2106
+ "name": "renderLabel",
2107
+ "privacy": "protected",
2108
+ "inheritedFrom": {
2109
+ "name": "FormAssociatedMixin",
2110
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2111
+ }
2112
+ },
2113
+ {
2114
+ "kind": "method",
2115
+ "name": "renderError",
2116
+ "privacy": "protected",
2117
+ "inheritedFrom": {
2118
+ "name": "FormAssociatedMixin",
2119
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2120
+ }
2121
+ },
2122
+ {
2123
+ "kind": "method",
2124
+ "name": "getDescribedBy",
2125
+ "privacy": "protected",
2126
+ "inheritedFrom": {
2127
+ "name": "FormAssociatedMixin",
2128
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2129
+ }
2130
+ },
2131
+ {
2132
+ "kind": "method",
2133
+ "name": "getInvalid",
2134
+ "privacy": "protected",
2135
+ "inheritedFrom": {
2136
+ "name": "FormAssociatedMixin",
2137
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2138
+ }
2139
+ },
2140
+ {
2141
+ "kind": "field",
2142
+ "name": "hasHint",
2143
+ "privacy": "protected",
2144
+ "inheritedFrom": {
2145
+ "name": "FormAssociatedMixin",
2146
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2147
+ }
2148
+ },
2149
+ {
2150
+ "kind": "field",
2151
+ "name": "hasError",
2152
+ "privacy": "protected",
2153
+ "inheritedFrom": {
2154
+ "name": "FormAssociatedMixin",
2155
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2156
+ }
2157
+ },
2158
+ {
2159
+ "kind": "field",
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
+ }
2172
+ },
2173
+ {
2174
+ "kind": "field",
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
+ },
2186
+ {
2187
+ "kind": "field",
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
+ }
2199
+ },
2200
+ {
2201
+ "kind": "field",
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
+ }
2254
+ }
2255
+ ],
2256
+ "attributes": [
2257
+ {
2258
+ "name": "indeterminate",
2259
+ "type": {
2260
+ "text": "boolean"
2261
+ },
2262
+ "default": "false",
2263
+ "description": "Controls whether the checkbox is in an indeterminate state.",
2264
+ "fieldName": "indeterminate"
2265
+ },
2266
+ {
2267
+ "name": "checked",
2268
+ "type": {
2269
+ "text": "boolean"
2270
+ },
2271
+ "default": "false",
2272
+ "description": "Controls whether the checkbox is checked or not.",
2273
+ "fieldName": "checked"
2274
+ },
2275
+ {
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",
2290
+ "type": {
2291
+ "text": "string"
2292
+ },
2293
+ "default": "\"\"",
2294
+ "description": "Label for the input.",
2295
+ "fieldName": "label",
2296
+ "inheritedFrom": {
2297
+ "name": "FormAssociatedMixin",
2298
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2299
+ }
2300
+ },
2301
+ {
2302
+ "name": "hint",
2303
+ "type": {
2304
+ "text": "string | undefined"
2305
+ },
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
+ }
2312
+ },
2313
+ {
2314
+ "name": "hide-label",
2315
+ "type": {
2316
+ "text": "boolean"
2317
+ },
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
+ }
2325
+ },
2326
+ {
2327
+ "name": "placeholder",
2328
+ "type": {
2329
+ "text": "string | undefined"
2330
+ },
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
+ }
2337
+ },
2338
+ {
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",
2352
+ "type": {
2353
+ "text": "boolean"
2354
+ },
2355
+ "default": "false",
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
+ },
2403
2388
  {
2404
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
2389
+ "name": "value",
2405
2390
  "type": {
2406
- "text": "DatePickerDayProps"
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"
2407
2399
  }
2408
2400
  }
2409
- ]
2410
- },
2411
- {
2412
- "kind": "function",
2413
- "name": "monthView",
2414
- "parameters": [
2401
+ ],
2402
+ "mixins": [
2415
2403
  {
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}",
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"
2418
+ }
2419
+ ],
2420
+ "superclass": {
2421
+ "name": "LitElement",
2422
+ "package": "lit"
2423
+ },
2424
+ "status": "ready",
2425
+ "category": "form",
2426
+ "displayName": null,
2427
+ "examples": [],
2428
+ "tagName": "nord-checkbox",
2429
+ "customElement": true,
2430
+ "events": [
2431
+ {
2432
+ "name": "input",
2417
2433
  "type": {
2418
- "text": "MonthViewArgs"
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"
2440
+ }
2441
+ },
2442
+ {
2443
+ "name": "change",
2444
+ "type": {
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"
@@ -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"
@@ -9510,6 +9606,21 @@
9510
9606
  }
9511
9607
  ]
9512
9608
  },
9609
+ {
9610
+ "kind": "field",
9611
+ "name": "size",
9612
+ "type": {
9613
+ "text": "\"s\" | \"m\" | \"l\""
9614
+ },
9615
+ "default": "\"m\"",
9616
+ "description": "The size of the component.",
9617
+ "attribute": "size",
9618
+ "reflects": true,
9619
+ "inheritedFrom": {
9620
+ "name": "SizeMixin",
9621
+ "module": "src/common/mixins/SizeMixin.ts"
9622
+ }
9623
+ },
9513
9624
  {
9514
9625
  "kind": "field",
9515
9626
  "name": "labelSlot",
@@ -9867,6 +9978,19 @@
9867
9978
  "description": "Controls whether the select expands to fill the width of its container.",
9868
9979
  "fieldName": "expand"
9869
9980
  },
9981
+ {
9982
+ "name": "size",
9983
+ "type": {
9984
+ "text": "\"s\" | \"m\" | \"l\""
9985
+ },
9986
+ "default": "\"m\"",
9987
+ "description": "The size of the component.",
9988
+ "fieldName": "size",
9989
+ "inheritedFrom": {
9990
+ "name": "SizeMixin",
9991
+ "module": "src/common/mixins/SizeMixin.ts"
9992
+ }
9993
+ },
9870
9994
  {
9871
9995
  "name": "label",
9872
9996
  "type": {
@@ -9995,6 +10119,10 @@
9995
10119
  }
9996
10120
  ],
9997
10121
  "mixins": [
10122
+ {
10123
+ "name": "SizeMixin",
10124
+ "module": "/src/common/mixins/SizeMixin.js"
10125
+ },
9998
10126
  {
9999
10127
  "name": "FormAssociatedMixin",
10000
10128
  "module": "/src/common/mixins/FormAssociatedMixin.js"
@@ -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"
@@ -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
  }