@nordhealth/components 1.0.0-alpha.51 → 1.0.0-alpha.54

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.
Files changed (105) hide show
  1. package/custom-elements.json +1846 -1151
  2. package/lib/Badge.js +1 -1
  3. package/lib/Button.js +1 -1
  4. package/lib/Button.js.map +1 -1
  5. package/lib/Calendar-55a0b169.js +13 -0
  6. package/lib/Calendar-55a0b169.js.map +1 -0
  7. package/lib/Calendar.js +1 -1
  8. package/lib/Card.js +1 -1
  9. package/lib/Card.js.map +1 -1
  10. package/lib/Checkbox.js +1 -1
  11. package/lib/Checkbox.js.map +1 -1
  12. package/lib/CommandMenu.js +1 -1
  13. package/lib/CommandMenuAction.js +1 -1
  14. package/lib/{Component-1dcd22f4.js → Component-a19be7c9.js} +2 -2
  15. package/lib/Component-a19be7c9.js.map +1 -0
  16. package/lib/DatePicker.js +1 -1
  17. package/lib/DatePicker.js.map +1 -1
  18. package/lib/DirectionController-82794ee9.js +2 -0
  19. package/lib/DirectionController-82794ee9.js.map +1 -0
  20. package/lib/{DraftComponentMixin-1d7c27bc.js → DraftComponentMixin-30345acf.js} +8 -3
  21. package/lib/DraftComponentMixin-30345acf.js.map +1 -0
  22. package/lib/Fieldset.js +1 -1
  23. package/lib/FocusableMixin-98e13999.js +2 -0
  24. package/lib/FocusableMixin-98e13999.js.map +1 -0
  25. package/lib/{FormAssociatedMixin-f7acf8b3.js → FormAssociatedMixin-e146e0ab.js} +2 -2
  26. package/lib/{FormAssociatedMixin-f7acf8b3.js.map → FormAssociatedMixin-e146e0ab.js.map} +1 -1
  27. package/lib/{FormField-8b024c79.js → FormField-926a0dda.js} +2 -2
  28. package/lib/FormField-926a0dda.js.map +1 -0
  29. package/lib/Header.js +1 -1
  30. package/lib/Header.js.map +1 -1
  31. package/lib/Icon.js +1 -1
  32. package/lib/Icon.js.map +1 -1
  33. package/lib/Input.js +1 -1
  34. package/lib/Input.js.map +1 -1
  35. package/lib/InputMixin-33bc2df5.js +2 -0
  36. package/lib/InputMixin-33bc2df5.js.map +1 -0
  37. package/lib/LightDomController-f56fa1a4.js +2 -0
  38. package/lib/LightDomController-f56fa1a4.js.map +1 -0
  39. package/lib/NavGroup.js +2 -0
  40. package/lib/NavGroup.js.map +1 -0
  41. package/lib/NavItem.js +2 -0
  42. package/lib/NavItem.js.map +1 -0
  43. package/lib/Navigation.js +2 -0
  44. package/lib/Navigation.js.map +1 -0
  45. package/lib/Radio.js +1 -1
  46. package/lib/Radio.js.map +1 -1
  47. package/lib/Select.js +1 -1
  48. package/lib/Select.js.map +1 -1
  49. package/lib/SlotController-5bfc47d1.js.map +1 -1
  50. package/lib/Spinner.js +1 -1
  51. package/lib/Stack.js +1 -1
  52. package/lib/Table.js +1 -1
  53. package/lib/{TextField-d925074c.js → TextField-b4155167.js} +2 -2
  54. package/lib/TextField-b4155167.js.map +1 -0
  55. package/lib/Textarea.js +1 -1
  56. package/lib/Textarea.js.map +1 -1
  57. package/lib/Tooltip.js +1 -1
  58. package/lib/Tooltip.js.map +1 -1
  59. package/lib/VisuallyHidden.js +1 -1
  60. package/lib/class-map-61e9e8c1.js +7 -0
  61. package/lib/{class-map-df701775.js.map → class-map-61e9e8c1.js.map} +1 -1
  62. package/lib/{directive-helpers-f86e6d16.js → directive-helpers-e7b6bf4b.js} +2 -2
  63. package/lib/{directive-helpers-f86e6d16.js.map → directive-helpers-e7b6bf4b.js.map} +1 -1
  64. package/lib/if-defined-2a4c6dbc.js +7 -0
  65. package/lib/{if-defined-f6a18fde.js.map → if-defined-2a4c6dbc.js.map} +1 -1
  66. package/lib/index.js +1 -1
  67. package/lib/{lit-element-99571067.js → lit-element-9646ab7e.js} +4 -4
  68. package/lib/lit-element-9646ab7e.js.map +1 -0
  69. package/lib/month-view.js +1 -1
  70. package/lib/number-e7cd246c.js +7 -0
  71. package/lib/{number-ca13a56f.js.map → number-e7cd246c.js.map} +1 -1
  72. package/lib/{ref-3b5a3bd2.js → ref-eb5cfa10.js} +3 -3
  73. package/lib/{ref-3b5a3bd2.js.map → ref-eb5cfa10.js.map} +1 -1
  74. package/lib/src/button/Button.d.ts +11 -2
  75. package/lib/src/common/attribute.d.ts +12 -0
  76. package/lib/src/common/controllers/LightDomController.d.ts +3 -0
  77. package/lib/src/common/controllers/PortalController.d.ts +16 -0
  78. package/lib/src/common/controllers/SlotController.d.ts +1 -1
  79. package/lib/src/common/portal.d.ts +9 -0
  80. package/lib/src/index.d.ts +3 -0
  81. package/lib/src/nav-group/NavGroup.d.ts +25 -0
  82. package/lib/src/nav-group/NavGroup.test.d.ts +1 -0
  83. package/lib/src/nav-item/NavItem.d.ts +52 -0
  84. package/lib/src/nav-item/NavItem.test.d.ts +1 -0
  85. package/lib/src/navigation/Navigation.d.ts +23 -0
  86. package/lib/src/navigation/Navigation.test.d.ts +3 -0
  87. package/lib/src/tooltip/Tooltip.d.ts +16 -4
  88. package/lib/unsafe-html-4da54dd2.js +7 -0
  89. package/lib/{unsafe-html-7493c929.js.map → unsafe-html-4da54dd2.js.map} +1 -1
  90. package/package.json +15 -7
  91. package/lib/Calendar-6f8b8450.js +0 -13
  92. package/lib/Calendar-6f8b8450.js.map +0 -1
  93. package/lib/Component-1dcd22f4.js.map +0 -1
  94. package/lib/DraftComponentMixin-1d7c27bc.js.map +0 -1
  95. package/lib/FormField-8b024c79.js.map +0 -1
  96. package/lib/InputMixin-f2da5fa8.js +0 -2
  97. package/lib/InputMixin-f2da5fa8.js.map +0 -1
  98. package/lib/LightDomController-37815039.js +0 -2
  99. package/lib/LightDomController-37815039.js.map +0 -1
  100. package/lib/TextField-d925074c.js.map +0 -1
  101. package/lib/class-map-df701775.js +0 -7
  102. package/lib/if-defined-f6a18fde.js +0 -7
  103. package/lib/lit-element-99571067.js.map +0 -1
  104. package/lib/number-ca13a56f.js +0 -7
  105. package/lib/unsafe-html-7493c929.js +0 -7
@@ -166,6 +166,30 @@
166
166
  "name": "default",
167
167
  "module": "\"./header/Header.js\""
168
168
  }
169
+ },
170
+ {
171
+ "kind": "js",
172
+ "name": "NavGroup",
173
+ "declaration": {
174
+ "name": "default",
175
+ "module": "\"./nav-group/NavGroup.js\""
176
+ }
177
+ },
178
+ {
179
+ "kind": "js",
180
+ "name": "NavItem",
181
+ "declaration": {
182
+ "name": "default",
183
+ "module": "\"./nav-item/NavItem.js\""
184
+ }
185
+ },
186
+ {
187
+ "kind": "js",
188
+ "name": "Navigation",
189
+ "declaration": {
190
+ "name": "default",
191
+ "module": "\"./navigation/Navigation.js\""
192
+ }
169
193
  }
170
194
  ]
171
195
  },
@@ -259,150 +283,179 @@
259
283
  },
260
284
  {
261
285
  "kind": "javascript-module",
262
- "path": "src/button/Button.ts",
286
+ "path": "src/card/Card.ts",
263
287
  "declarations": [
264
288
  {
265
289
  "kind": "class",
266
- "description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
267
- "name": "Button",
290
+ "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.",
291
+ "name": "Card",
268
292
  "slots": [
269
293
  {
270
- "description": "The button content",
294
+ "description": "The card content.",
271
295
  "name": ""
272
296
  },
273
297
  {
274
- "description": "Used to place content before button text. Typically used for icons.",
275
- "name": "before"
298
+ "description": "Optional slot that holds a header for the card.",
299
+ "name": "header"
276
300
  },
277
301
  {
278
- "description": "Used to place content after button text. Typically used for icons.",
279
- "name": "after"
302
+ "description": "Optional slot that holds footer content for the card.",
303
+ "name": "footer"
280
304
  }
281
305
  ],
282
306
  "members": [
283
307
  {
284
308
  "kind": "field",
285
- "name": "buttonRef",
286
- "privacy": "private"
309
+ "name": "headerSlot",
310
+ "privacy": "private",
311
+ "default": "new SlotController(this, \"header\")"
287
312
  },
288
313
  {
289
314
  "kind": "field",
290
- "name": "lightDom",
315
+ "name": "footerSlot",
291
316
  "privacy": "private",
292
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
317
+ "default": "new SlotController(this, \"footer\")"
293
318
  },
294
319
  {
295
320
  "kind": "field",
296
- "name": "variant",
321
+ "name": "padding",
297
322
  "type": {
298
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
323
+ "text": "\"m\" | \"l\" | \"none\""
299
324
  },
300
- "default": "\"default\"",
301
- "description": "The style variant of the button.",
302
- "attribute": "variant",
325
+ "default": "\"m\"",
326
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
327
+ "attribute": "padding",
303
328
  "reflects": true
304
329
  },
305
330
  {
306
331
  "kind": "field",
307
- "name": "type",
332
+ "name": "_warningLogged",
308
333
  "type": {
309
- "text": "\"button\" | \"submit\" | \"reset\""
334
+ "text": "boolean"
310
335
  },
311
- "default": "\"submit\"",
312
- "description": "The type of the button.",
313
- "attribute": "type",
314
- "reflects": true
315
- },
336
+ "privacy": "private",
337
+ "static": true,
338
+ "default": "false",
339
+ "inheritedFrom": {
340
+ "name": "DraftComponentMixin",
341
+ "module": "src/common/mixins/DraftComponentMixin.ts"
342
+ }
343
+ }
344
+ ],
345
+ "attributes": [
316
346
  {
317
- "kind": "field",
318
- "name": "size",
347
+ "name": "padding",
319
348
  "type": {
320
- "text": "\"s\" | \"m\" | \"l\""
349
+ "text": "\"m\" | \"l\" | \"none\""
321
350
  },
322
351
  "default": "\"m\"",
323
- "description": "The size of the button.\nThis affects font-size and padding.",
324
- "attribute": "size",
325
- "reflects": true
326
- },
352
+ "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
353
+ "fieldName": "padding"
354
+ }
355
+ ],
356
+ "mixins": [
357
+ {
358
+ "name": "DraftComponentMixin",
359
+ "module": "/src/common/mixins/DraftComponentMixin.js"
360
+ }
361
+ ],
362
+ "superclass": {
363
+ "name": "LitElement",
364
+ "package": "lit"
365
+ },
366
+ "status": "draft",
367
+ "category": "structure",
368
+ "tagName": "nord-card",
369
+ "customElement": true
370
+ }
371
+ ],
372
+ "exports": [
373
+ {
374
+ "kind": "js",
375
+ "name": "default",
376
+ "declaration": {
377
+ "name": "Card",
378
+ "module": "src/card/Card.ts"
379
+ }
380
+ },
381
+ {
382
+ "kind": "custom-element-definition",
383
+ "name": "nord-card",
384
+ "declaration": {
385
+ "name": "Card",
386
+ "module": "src/card/Card.ts"
387
+ }
388
+ }
389
+ ],
390
+ "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\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"
391
+ },
392
+ {
393
+ "kind": "javascript-module",
394
+ "path": "src/calendar/Calendar.ts",
395
+ "declarations": [
396
+ {
397
+ "kind": "class",
398
+ "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.",
399
+ "name": "Calendar",
400
+ "members": [
327
401
  {
328
402
  "kind": "field",
329
- "name": "href",
403
+ "name": "dialogLabelId",
330
404
  "type": {
331
- "text": "string | undefined"
405
+ "text": "string"
332
406
  },
333
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
334
- "attribute": "href",
335
- "reflects": true
407
+ "privacy": "private",
408
+ "default": "\"dialog-header\""
336
409
  },
337
410
  {
338
411
  "kind": "field",
339
- "name": "download",
412
+ "name": "monthSelectNode",
340
413
  "type": {
341
- "text": "boolean"
414
+ "text": "HTMLElement"
342
415
  },
343
- "default": "false",
344
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
345
- "attribute": "download"
416
+ "privacy": "private"
346
417
  },
347
418
  {
348
419
  "kind": "field",
349
- "name": "target",
420
+ "name": "focusedDayNode",
350
421
  "type": {
351
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
422
+ "text": "HTMLButtonElement"
352
423
  },
353
- "default": "\"_self\"",
354
- "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
355
- "attribute": "target",
356
- "reflects": true
424
+ "privacy": "private"
357
425
  },
358
426
  {
359
427
  "kind": "field",
360
- "name": "expand",
361
- "type": {
362
- "text": "boolean"
363
- },
364
- "default": "false",
365
- "description": "Controls whether the button expands to fill the width of its container.",
366
- "attribute": "expand",
367
- "reflects": true
428
+ "name": "direction",
429
+ "privacy": "private",
430
+ "default": "new DirectionController(this)"
368
431
  },
369
432
  {
370
- "kind": "method",
371
- "name": "renderLightDom",
372
- "privacy": "private"
433
+ "kind": "field",
434
+ "name": "swipe",
435
+ "privacy": "private",
436
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
373
437
  },
374
438
  {
375
- "kind": "method",
376
- "name": "handleClick",
439
+ "kind": "field",
440
+ "name": "shortcuts",
377
441
  "privacy": "private"
378
442
  },
379
443
  {
380
444
  "kind": "field",
381
- "name": "disabled",
445
+ "name": "dateFormatShort",
382
446
  "type": {
383
- "text": "boolean"
447
+ "text": "Intl.DateTimeFormat"
384
448
  },
385
- "default": "false",
386
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
387
- "attribute": "disabled",
388
- "reflects": true,
389
- "inheritedFrom": {
390
- "name": "InputMixin",
391
- "module": "src/common/mixins/InputMixin.ts"
392
- }
449
+ "privacy": "private",
450
+ "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"
393
451
  },
394
452
  {
395
453
  "kind": "field",
396
- "name": "name",
454
+ "name": "localization",
397
455
  "type": {
398
- "text": "string | undefined"
456
+ "text": "CalendarLocalizedText"
399
457
  },
400
- "description": "The name of the form component.",
401
- "attribute": "name",
402
- "inheritedFrom": {
403
- "name": "InputMixin",
404
- "module": "src/common/mixins/InputMixin.ts"
405
- }
458
+ "default": "localization"
406
459
  },
407
460
  {
408
461
  "kind": "field",
@@ -411,195 +464,256 @@
411
464
  "text": "string"
412
465
  },
413
466
  "default": "\"\"",
414
- "description": "The value of the form component.",
415
- "attribute": "value",
416
- "inheritedFrom": {
417
- "name": "InputMixin",
418
- "module": "src/common/mixins/InputMixin.ts"
419
- }
467
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
468
+ "attribute": "value"
420
469
  },
421
470
  {
422
471
  "kind": "field",
423
- "name": "form",
424
- "privacy": "protected",
425
- "description": "Gets the form, if any, associated with the form element.",
426
- "inheritedFrom": {
427
- "name": "InputMixin",
428
- "module": "src/common/mixins/InputMixin.ts"
429
- }
472
+ "name": "firstDayOfWeek",
473
+ "type": {
474
+ "text": "DaysOfWeek"
475
+ },
476
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
477
+ "attribute": "firstDayOfWeek"
430
478
  },
431
479
  {
432
480
  "kind": "field",
433
- "name": "focusableRef",
434
- "privacy": "protected",
435
- "inheritedFrom": {
436
- "name": "FocusableMixin",
437
- "module": "src/common/mixins/FocusableMixin.ts"
438
- }
439
- },
440
- {
441
- "kind": "method",
442
- "name": "focus",
443
- "parameters": [
444
- {
445
- "name": "options",
446
- "optional": true,
447
- "type": {
448
- "text": "FocusOptions"
449
- },
450
- "description": "An object which controls aspects of the focusing process."
451
- }
452
- ],
453
- "description": "Programmatically move focus to the component.",
454
- "inheritedFrom": {
455
- "name": "FocusableMixin",
456
- "module": "src/common/mixins/FocusableMixin.ts"
457
- }
481
+ "name": "min",
482
+ "type": {
483
+ "text": "string"
484
+ },
485
+ "default": "\"\"",
486
+ "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.",
487
+ "attribute": "min"
458
488
  },
459
489
  {
460
- "kind": "method",
461
- "name": "blur",
462
- "description": "Programmatically remove focus from the component.",
463
- "inheritedFrom": {
464
- "name": "FocusableMixin",
465
- "module": "src/common/mixins/FocusableMixin.ts"
466
- }
490
+ "kind": "field",
491
+ "name": "max",
492
+ "type": {
493
+ "text": "string"
494
+ },
495
+ "default": "\"\"",
496
+ "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.",
497
+ "attribute": "max"
467
498
  },
468
499
  {
469
- "kind": "method",
470
- "name": "click",
471
- "description": "Programmatically simulates a click on the component.",
472
- "inheritedFrom": {
473
- "name": "FocusableMixin",
474
- "module": "src/common/mixins/FocusableMixin.ts"
475
- }
500
+ "kind": "field",
501
+ "name": "isDateDisabled",
502
+ "type": {
503
+ "text": "DateDisabledPredicate"
504
+ },
505
+ "default": "isDateDisabled",
506
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
476
507
  },
477
508
  {
478
509
  "kind": "field",
479
- "name": "_warningLogged",
510
+ "name": "activeFocus",
480
511
  "type": {
481
512
  "text": "boolean"
482
513
  },
483
514
  "privacy": "private",
484
- "static": true,
485
- "default": "false",
486
- "inheritedFrom": {
487
- "name": "DraftComponentMixin",
488
- "module": "src/common/mixins/DraftComponentMixin.ts"
489
- }
490
- }
491
- ],
492
- "attributes": [
515
+ "default": "false"
516
+ },
493
517
  {
494
- "name": "variant",
495
- "type": {
496
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
497
- },
498
- "default": "\"default\"",
499
- "description": "The style variant of the button.",
500
- "fieldName": "variant"
518
+ "kind": "field",
519
+ "name": "focusedDay",
520
+ "privacy": "private",
521
+ "default": "new Date()"
501
522
  },
502
523
  {
503
- "name": "type",
504
- "type": {
505
- "text": "\"button\" | \"submit\" | \"reset\""
506
- },
507
- "default": "\"submit\"",
508
- "description": "The type of the button.",
509
- "fieldName": "type"
524
+ "kind": "method",
525
+ "name": "focus",
526
+ "parameters": [
527
+ {
528
+ "name": "options",
529
+ "optional": true,
530
+ "type": {
531
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
532
+ }
533
+ }
534
+ ]
510
535
  },
511
536
  {
512
- "name": "size",
513
- "type": {
514
- "text": "\"s\" | \"m\" | \"l\""
515
- },
516
- "default": "\"m\"",
517
- "description": "The size of the button.\nThis affects font-size and padding.",
518
- "fieldName": "size"
537
+ "kind": "method",
538
+ "name": "createDateFormatter",
539
+ "privacy": "private"
519
540
  },
520
541
  {
521
- "name": "href",
522
- "type": {
523
- "text": "string | undefined"
524
- },
525
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
526
- "fieldName": "href"
542
+ "kind": "field",
543
+ "name": "handleDaySelect",
544
+ "privacy": "private"
527
545
  },
528
546
  {
529
- "name": "download",
530
- "type": {
531
- "text": "boolean"
532
- },
533
- "default": "false",
534
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
535
- "fieldName": "download"
547
+ "kind": "method",
548
+ "name": "addDays",
549
+ "privacy": "private",
550
+ "parameters": [
551
+ {
552
+ "name": "days",
553
+ "type": {
554
+ "text": "number"
555
+ }
556
+ }
557
+ ]
536
558
  },
537
559
  {
538
- "name": "target",
539
- "type": {
540
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
541
- },
542
- "default": "\"_self\"",
543
- "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
544
- "fieldName": "target"
560
+ "kind": "method",
561
+ "name": "addMonths",
562
+ "privacy": "private",
563
+ "parameters": [
564
+ {
565
+ "name": "months",
566
+ "type": {
567
+ "text": "number"
568
+ }
569
+ }
570
+ ]
545
571
  },
546
572
  {
547
- "name": "expand",
548
- "type": {
549
- "text": "boolean"
550
- },
551
- "default": "false",
552
- "description": "Controls whether the button expands to fill the width of its container.",
553
- "fieldName": "expand"
573
+ "kind": "method",
574
+ "name": "addYears",
575
+ "privacy": "private",
576
+ "parameters": [
577
+ {
578
+ "name": "years",
579
+ "type": {
580
+ "text": "number"
581
+ }
582
+ }
583
+ ]
554
584
  },
555
585
  {
556
- "name": "disabled",
586
+ "kind": "method",
587
+ "name": "startOfWeek",
588
+ "privacy": "private"
589
+ },
590
+ {
591
+ "kind": "method",
592
+ "name": "endOfWeek",
593
+ "privacy": "private"
594
+ },
595
+ {
596
+ "kind": "method",
597
+ "name": "setMonth",
598
+ "privacy": "private",
599
+ "parameters": [
600
+ {
601
+ "name": "month",
602
+ "type": {
603
+ "text": "number"
604
+ }
605
+ }
606
+ ]
607
+ },
608
+ {
609
+ "kind": "method",
610
+ "name": "setYear",
611
+ "privacy": "private",
612
+ "parameters": [
613
+ {
614
+ "name": "year",
615
+ "type": {
616
+ "text": "number"
617
+ }
618
+ }
619
+ ]
620
+ },
621
+ {
622
+ "kind": "method",
623
+ "name": "setFocusedDay",
624
+ "privacy": "private",
625
+ "parameters": [
626
+ {
627
+ "name": "day",
628
+ "type": {
629
+ "text": "Date"
630
+ }
631
+ }
632
+ ]
633
+ },
634
+ {
635
+ "kind": "field",
636
+ "name": "handleMonthSelect",
637
+ "privacy": "private"
638
+ },
639
+ {
640
+ "kind": "field",
641
+ "name": "handleYearSelect",
642
+ "privacy": "private"
643
+ },
644
+ {
645
+ "kind": "field",
646
+ "name": "handleNextMonthClick",
647
+ "privacy": "private"
648
+ },
649
+ {
650
+ "kind": "field",
651
+ "name": "handlePreviousMonthClick",
652
+ "privacy": "private"
653
+ },
654
+ {
655
+ "kind": "field",
656
+ "name": "enableActiveFocus",
657
+ "privacy": "private"
658
+ },
659
+ {
660
+ "kind": "field",
661
+ "name": "disableActiveFocus",
662
+ "privacy": "private"
663
+ },
664
+ {
665
+ "kind": "field",
666
+ "name": "_warningLogged",
557
667
  "type": {
558
668
  "text": "boolean"
559
669
  },
670
+ "privacy": "private",
671
+ "static": true,
560
672
  "default": "false",
561
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
562
- "fieldName": "disabled",
563
673
  "inheritedFrom": {
564
- "name": "InputMixin",
565
- "module": "src/common/mixins/InputMixin.ts"
674
+ "name": "DraftComponentMixin",
675
+ "module": "src/common/mixins/DraftComponentMixin.ts"
566
676
  }
567
- },
677
+ }
678
+ ],
679
+ "attributes": [
568
680
  {
569
- "name": "name",
681
+ "name": "value",
570
682
  "type": {
571
- "text": "string | undefined"
683
+ "text": "string"
572
684
  },
573
- "description": "The name of the form component.",
574
- "fieldName": "name",
575
- "inheritedFrom": {
576
- "name": "InputMixin",
577
- "module": "src/common/mixins/InputMixin.ts"
578
- }
685
+ "default": "\"\"",
686
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
687
+ "fieldName": "value"
579
688
  },
580
689
  {
581
- "name": "value",
690
+ "name": "firstDayOfWeek",
582
691
  "type": {
583
- "text": "string"
692
+ "text": "DaysOfWeek"
584
693
  },
585
- "default": "\"\"",
586
- "description": "The value of the form component.",
587
- "fieldName": "value",
588
- "inheritedFrom": {
589
- "name": "InputMixin",
590
- "module": "src/common/mixins/InputMixin.ts"
591
- }
592
- }
593
- ],
594
- "mixins": [
595
- {
596
- "name": "InputMixin",
597
- "module": "/src/common/mixins/InputMixin.js"
694
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
695
+ "fieldName": "firstDayOfWeek"
598
696
  },
599
697
  {
600
- "name": "FocusableMixin",
601
- "module": "/src/common/mixins/FocusableMixin.js"
698
+ "name": "min",
699
+ "type": {
700
+ "text": "string"
701
+ },
702
+ "default": "\"\"",
703
+ "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.",
704
+ "fieldName": "min"
602
705
  },
706
+ {
707
+ "name": "max",
708
+ "type": {
709
+ "text": "string"
710
+ },
711
+ "default": "\"\"",
712
+ "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.",
713
+ "fieldName": "max"
714
+ }
715
+ ],
716
+ "mixins": [
603
717
  {
604
718
  "name": "DraftComponentMixin",
605
719
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -610,8 +724,8 @@
610
724
  "package": "lit"
611
725
  },
612
726
  "status": "draft",
613
- "category": "action",
614
- "tagName": "nord-button",
727
+ "category": "list",
728
+ "tagName": "nord-calendar",
615
729
  "customElement": true
616
730
  }
617
731
  ],
@@ -620,292 +734,383 @@
620
734
  "kind": "js",
621
735
  "name": "default",
622
736
  "declaration": {
623
- "name": "Button",
624
- "module": "src/button/Button.ts"
737
+ "name": "Calendar",
738
+ "module": "src/calendar/Calendar.ts"
625
739
  }
626
740
  },
627
741
  {
628
742
  "kind": "custom-element-definition",
629
- "name": "nord-button",
743
+ "name": "nord-calendar",
630
744
  "declaration": {
631
- "name": "Button",
632
- "module": "src/button/Button.ts"
745
+ "name": "Calendar",
746
+ "module": "src/calendar/Calendar.ts"
633
747
  }
634
748
  }
635
749
  ],
636
- "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 clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
750
+ "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"
637
751
  },
638
752
  {
639
753
  "kind": "javascript-module",
640
- "path": "src/calendar/Calendar.ts",
754
+ "path": "src/calendar/DateSelectEvent.ts",
641
755
  "declarations": [
642
756
  {
643
757
  "kind": "class",
644
- "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.",
645
- "name": "Calendar",
758
+ "description": "",
759
+ "name": "DateSelectEvent",
646
760
  "members": [
647
761
  {
648
762
  "kind": "field",
649
- "name": "dialogLabelId",
763
+ "name": "eventName",
650
764
  "type": {
651
765
  "text": "string"
652
766
  },
653
- "privacy": "private",
654
- "default": "\"dialog-header\""
767
+ "static": true,
768
+ "default": "\"nord-select\""
655
769
  },
656
770
  {
657
771
  "kind": "field",
658
- "name": "monthSelectNode",
772
+ "name": "date",
659
773
  "type": {
660
- "text": "HTMLElement"
774
+ "text": "Date"
661
775
  },
662
- "privacy": "private"
663
- },
776
+ "default": "date"
777
+ }
778
+ ],
779
+ "superclass": {
780
+ "name": "NordEvent",
781
+ "module": "/src/common/events.js"
782
+ }
783
+ }
784
+ ],
785
+ "exports": [
786
+ {
787
+ "kind": "js",
788
+ "name": "DateSelectEvent",
789
+ "declaration": {
790
+ "name": "DateSelectEvent",
791
+ "module": "src/calendar/DateSelectEvent.ts"
792
+ }
793
+ }
794
+ ],
795
+ "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"
796
+ },
797
+ {
798
+ "kind": "javascript-module",
799
+ "path": "src/calendar/calendar-localization.ts",
800
+ "declarations": [
801
+ {
802
+ "kind": "variable",
803
+ "name": "localization",
804
+ "type": {
805
+ "text": "CalendarLocalizedText"
806
+ },
807
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
808
+ }
809
+ ],
810
+ "exports": [
811
+ {
812
+ "kind": "js",
813
+ "name": "default",
814
+ "declaration": {
815
+ "name": "localization",
816
+ "module": "src/calendar/calendar-localization.ts"
817
+ }
818
+ }
819
+ ],
820
+ "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"
821
+ },
822
+ {
823
+ "kind": "javascript-module",
824
+ "path": "src/calendar/month-view.ts",
825
+ "declarations": [
826
+ {
827
+ "kind": "function",
828
+ "name": "dayView",
829
+ "parameters": [
664
830
  {
665
- "kind": "field",
666
- "name": "focusedDayNode",
831
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
667
832
  "type": {
668
- "text": "HTMLButtonElement"
669
- },
670
- "privacy": "private"
671
- },
833
+ "text": "DatePickerDayProps"
834
+ }
835
+ }
836
+ ]
837
+ },
838
+ {
839
+ "kind": "function",
840
+ "name": "monthView",
841
+ "parameters": [
672
842
  {
673
- "kind": "field",
674
- "name": "direction",
675
- "privacy": "private",
676
- "default": "new DirectionController(this)"
843
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
844
+ "type": {
845
+ "text": "MonthViewArgs"
846
+ }
847
+ }
848
+ ]
849
+ }
850
+ ],
851
+ "exports": [
852
+ {
853
+ "kind": "js",
854
+ "name": "dayView",
855
+ "declaration": {
856
+ "name": "dayView",
857
+ "module": "src/calendar/month-view.ts"
858
+ }
859
+ },
860
+ {
861
+ "kind": "js",
862
+ "name": "monthView",
863
+ "declaration": {
864
+ "name": "monthView",
865
+ "module": "src/calendar/month-view.ts"
866
+ }
867
+ }
868
+ ],
869
+ "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"
870
+ },
871
+ {
872
+ "kind": "javascript-module",
873
+ "path": "src/button/Button.ts",
874
+ "declarations": [
875
+ {
876
+ "kind": "class",
877
+ "description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
878
+ "name": "Button",
879
+ "slots": [
880
+ {
881
+ "description": "The button content",
882
+ "name": ""
677
883
  },
678
884
  {
679
- "kind": "field",
680
- "name": "swipe",
681
- "privacy": "private",
682
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
885
+ "description": "Used to place content before button text. Typically used for icons.",
886
+ "name": "before"
683
887
  },
888
+ {
889
+ "description": "Used to place content after button text. Typically used for icons.",
890
+ "name": "after"
891
+ }
892
+ ],
893
+ "members": [
684
894
  {
685
895
  "kind": "field",
686
- "name": "shortcuts",
896
+ "name": "buttonRef",
687
897
  "privacy": "private"
688
898
  },
689
899
  {
690
900
  "kind": "field",
691
- "name": "dateFormatShort",
692
- "type": {
693
- "text": "Intl.DateTimeFormat"
694
- },
901
+ "name": "lightDom",
695
902
  "privacy": "private",
696
- "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"
903
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
697
904
  },
698
905
  {
699
906
  "kind": "field",
700
- "name": "localization",
907
+ "name": "variant",
701
908
  "type": {
702
- "text": "CalendarLocalizedText"
909
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
703
910
  },
704
- "default": "localization"
911
+ "default": "\"default\"",
912
+ "description": "The style variant of the button.",
913
+ "attribute": "variant",
914
+ "reflects": true
705
915
  },
706
916
  {
707
917
  "kind": "field",
708
- "name": "value",
918
+ "name": "type",
709
919
  "type": {
710
- "text": "string"
920
+ "text": "\"button\" | \"submit\" | \"reset\""
711
921
  },
712
- "default": "\"\"",
713
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
714
- "attribute": "value"
922
+ "default": "\"submit\"",
923
+ "description": "The type of the button.",
924
+ "attribute": "type",
925
+ "reflects": true
715
926
  },
716
927
  {
717
928
  "kind": "field",
718
- "name": "firstDayOfWeek",
929
+ "name": "size",
719
930
  "type": {
720
- "text": "DaysOfWeek"
931
+ "text": "\"s\" | \"m\" | \"l\""
721
932
  },
722
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
723
- "attribute": "firstDayOfWeek"
933
+ "default": "\"m\"",
934
+ "description": "The size of the button.\nThis affects font-size and padding.",
935
+ "attribute": "size",
936
+ "reflects": true
724
937
  },
725
938
  {
726
939
  "kind": "field",
727
- "name": "min",
940
+ "name": "href",
728
941
  "type": {
729
- "text": "string"
942
+ "text": "string | undefined"
730
943
  },
731
- "default": "\"\"",
732
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
733
- "attribute": "min"
944
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
945
+ "attribute": "href",
946
+ "reflects": true
734
947
  },
735
948
  {
736
949
  "kind": "field",
737
- "name": "max",
950
+ "name": "download",
738
951
  "type": {
739
- "text": "string"
952
+ "text": "boolean"
740
953
  },
741
- "default": "\"\"",
742
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
743
- "attribute": "max"
954
+ "default": "false",
955
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
956
+ "attribute": "download"
744
957
  },
745
958
  {
746
959
  "kind": "field",
747
- "name": "isDateDisabled",
960
+ "name": "target",
748
961
  "type": {
749
- "text": "DateDisabledPredicate"
962
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
750
963
  },
751
- "default": "isDateDisabled",
752
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
964
+ "default": "\"_self\"",
965
+ "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
966
+ "attribute": "target",
967
+ "reflects": true
753
968
  },
754
969
  {
755
970
  "kind": "field",
756
- "name": "activeFocus",
971
+ "name": "expand",
757
972
  "type": {
758
973
  "text": "boolean"
759
974
  },
760
- "privacy": "private",
761
- "default": "false"
762
- },
763
- {
764
- "kind": "field",
765
- "name": "focusedDay",
766
- "privacy": "private",
767
- "default": "new Date()"
768
- },
769
- {
770
- "kind": "method",
771
- "name": "focus",
772
- "parameters": [
773
- {
774
- "name": "options",
775
- "optional": true,
776
- "type": {
777
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
778
- }
779
- }
780
- ]
781
- },
782
- {
783
- "kind": "method",
784
- "name": "createDateFormatter",
785
- "privacy": "private"
786
- },
787
- {
788
- "kind": "field",
789
- "name": "handleDaySelect",
790
- "privacy": "private"
791
- },
792
- {
793
- "kind": "method",
794
- "name": "addDays",
795
- "privacy": "private",
796
- "parameters": [
797
- {
798
- "name": "days",
799
- "type": {
800
- "text": "number"
801
- }
802
- }
803
- ]
975
+ "default": "false",
976
+ "description": "Controls whether the button expands to fill the width of its container.",
977
+ "attribute": "expand",
978
+ "reflects": true
804
979
  },
805
980
  {
806
981
  "kind": "method",
807
- "name": "addMonths",
982
+ "name": "renderLink",
808
983
  "privacy": "private",
809
984
  "parameters": [
810
985
  {
811
- "name": "months",
986
+ "name": "innards",
812
987
  "type": {
813
- "text": "number"
988
+ "text": "TemplateResult"
814
989
  }
815
990
  }
816
- ]
991
+ ],
992
+ "description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
817
993
  },
818
994
  {
819
995
  "kind": "method",
820
- "name": "addYears",
996
+ "name": "renderButton",
821
997
  "privacy": "private",
822
998
  "parameters": [
823
999
  {
824
- "name": "years",
1000
+ "name": "innards",
825
1001
  "type": {
826
- "text": "number"
1002
+ "text": "TemplateResult"
827
1003
  }
828
1004
  }
829
1005
  ]
830
1006
  },
831
1007
  {
832
1008
  "kind": "method",
833
- "name": "startOfWeek",
1009
+ "name": "renderLightDom",
834
1010
  "privacy": "private"
835
1011
  },
836
1012
  {
837
1013
  "kind": "method",
838
- "name": "endOfWeek",
1014
+ "name": "handleClick",
839
1015
  "privacy": "private"
840
1016
  },
841
1017
  {
842
- "kind": "method",
843
- "name": "setMonth",
844
- "privacy": "private",
845
- "parameters": [
846
- {
847
- "name": "month",
848
- "type": {
849
- "text": "number"
850
- }
851
- }
852
- ]
853
- },
854
- {
855
- "kind": "method",
856
- "name": "setYear",
857
- "privacy": "private",
858
- "parameters": [
859
- {
860
- "name": "year",
861
- "type": {
862
- "text": "number"
863
- }
864
- }
865
- ]
1018
+ "kind": "field",
1019
+ "name": "disabled",
1020
+ "type": {
1021
+ "text": "boolean"
1022
+ },
1023
+ "default": "false",
1024
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1025
+ "attribute": "disabled",
1026
+ "reflects": true,
1027
+ "inheritedFrom": {
1028
+ "name": "InputMixin",
1029
+ "module": "src/common/mixins/InputMixin.ts"
1030
+ }
866
1031
  },
867
1032
  {
868
- "kind": "method",
869
- "name": "setFocusedDay",
870
- "privacy": "private",
871
- "parameters": [
872
- {
873
- "name": "day",
874
- "type": {
875
- "text": "Date"
876
- }
877
- }
878
- ]
1033
+ "kind": "field",
1034
+ "name": "name",
1035
+ "type": {
1036
+ "text": "string | undefined"
1037
+ },
1038
+ "description": "The name of the form component.",
1039
+ "attribute": "name",
1040
+ "inheritedFrom": {
1041
+ "name": "InputMixin",
1042
+ "module": "src/common/mixins/InputMixin.ts"
1043
+ }
879
1044
  },
880
1045
  {
881
1046
  "kind": "field",
882
- "name": "handleMonthSelect",
883
- "privacy": "private"
1047
+ "name": "value",
1048
+ "type": {
1049
+ "text": "string"
1050
+ },
1051
+ "default": "\"\"",
1052
+ "description": "The value of the form component.",
1053
+ "attribute": "value",
1054
+ "inheritedFrom": {
1055
+ "name": "InputMixin",
1056
+ "module": "src/common/mixins/InputMixin.ts"
1057
+ }
884
1058
  },
885
1059
  {
886
1060
  "kind": "field",
887
- "name": "handleYearSelect",
888
- "privacy": "private"
1061
+ "name": "form",
1062
+ "privacy": "protected",
1063
+ "description": "Gets the form, if any, associated with the form element.",
1064
+ "inheritedFrom": {
1065
+ "name": "InputMixin",
1066
+ "module": "src/common/mixins/InputMixin.ts"
1067
+ }
889
1068
  },
890
1069
  {
891
1070
  "kind": "field",
892
- "name": "handleNextMonthClick",
893
- "privacy": "private"
1071
+ "name": "focusableRef",
1072
+ "privacy": "protected",
1073
+ "inheritedFrom": {
1074
+ "name": "FocusableMixin",
1075
+ "module": "src/common/mixins/FocusableMixin.ts"
1076
+ }
894
1077
  },
895
1078
  {
896
- "kind": "field",
897
- "name": "handlePreviousMonthClick",
898
- "privacy": "private"
1079
+ "kind": "method",
1080
+ "name": "focus",
1081
+ "parameters": [
1082
+ {
1083
+ "name": "options",
1084
+ "optional": true,
1085
+ "type": {
1086
+ "text": "FocusOptions"
1087
+ },
1088
+ "description": "An object which controls aspects of the focusing process."
1089
+ }
1090
+ ],
1091
+ "description": "Programmatically move focus to the component.",
1092
+ "inheritedFrom": {
1093
+ "name": "FocusableMixin",
1094
+ "module": "src/common/mixins/FocusableMixin.ts"
1095
+ }
899
1096
  },
900
1097
  {
901
- "kind": "field",
902
- "name": "enableActiveFocus",
903
- "privacy": "private"
1098
+ "kind": "method",
1099
+ "name": "blur",
1100
+ "description": "Programmatically remove focus from the component.",
1101
+ "inheritedFrom": {
1102
+ "name": "FocusableMixin",
1103
+ "module": "src/common/mixins/FocusableMixin.ts"
1104
+ }
904
1105
  },
905
1106
  {
906
- "kind": "field",
907
- "name": "disableActiveFocus",
908
- "privacy": "private"
1107
+ "kind": "method",
1108
+ "name": "click",
1109
+ "description": "Programmatically simulates a click on the component.",
1110
+ "inheritedFrom": {
1111
+ "name": "FocusableMixin",
1112
+ "module": "src/common/mixins/FocusableMixin.ts"
1113
+ }
909
1114
  },
910
1115
  {
911
1116
  "kind": "field",
@@ -924,269 +1129,115 @@
924
1129
  ],
925
1130
  "attributes": [
926
1131
  {
927
- "name": "value",
1132
+ "name": "variant",
928
1133
  "type": {
929
- "text": "string"
1134
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
930
1135
  },
931
- "default": "\"\"",
932
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
933
- "fieldName": "value"
1136
+ "default": "\"default\"",
1137
+ "description": "The style variant of the button.",
1138
+ "fieldName": "variant"
934
1139
  },
935
1140
  {
936
- "name": "firstDayOfWeek",
1141
+ "name": "type",
937
1142
  "type": {
938
- "text": "DaysOfWeek"
1143
+ "text": "\"button\" | \"submit\" | \"reset\""
939
1144
  },
940
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
941
- "fieldName": "firstDayOfWeek"
1145
+ "default": "\"submit\"",
1146
+ "description": "The type of the button.",
1147
+ "fieldName": "type"
942
1148
  },
943
1149
  {
944
- "name": "min",
1150
+ "name": "size",
945
1151
  "type": {
946
- "text": "string"
1152
+ "text": "\"s\" | \"m\" | \"l\""
947
1153
  },
948
- "default": "\"\"",
949
- "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.",
950
- "fieldName": "min"
1154
+ "default": "\"m\"",
1155
+ "description": "The size of the button.\nThis affects font-size and padding.",
1156
+ "fieldName": "size"
951
1157
  },
952
1158
  {
953
- "name": "max",
1159
+ "name": "href",
954
1160
  "type": {
955
- "text": "string"
1161
+ "text": "string | undefined"
956
1162
  },
957
- "default": "\"\"",
958
- "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.",
959
- "fieldName": "max"
960
- }
961
- ],
962
- "mixins": [
1163
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1164
+ "fieldName": "href"
1165
+ },
963
1166
  {
964
- "name": "DraftComponentMixin",
965
- "module": "/src/common/mixins/DraftComponentMixin.js"
966
- }
967
- ],
968
- "superclass": {
969
- "name": "LitElement",
970
- "package": "lit"
971
- },
972
- "status": "draft",
973
- "category": "list",
974
- "tagName": "nord-calendar",
975
- "customElement": true
976
- }
977
- ],
978
- "exports": [
979
- {
980
- "kind": "js",
981
- "name": "default",
982
- "declaration": {
983
- "name": "Calendar",
984
- "module": "src/calendar/Calendar.ts"
985
- }
986
- },
987
- {
988
- "kind": "custom-element-definition",
989
- "name": "nord-calendar",
990
- "declaration": {
991
- "name": "Calendar",
992
- "module": "src/calendar/Calendar.ts"
993
- }
994
- }
995
- ],
996
- "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"
997
- },
998
- {
999
- "kind": "javascript-module",
1000
- "path": "src/calendar/DateSelectEvent.ts",
1001
- "declarations": [
1002
- {
1003
- "kind": "class",
1004
- "description": "",
1005
- "name": "DateSelectEvent",
1006
- "members": [
1007
- {
1008
- "kind": "field",
1009
- "name": "eventName",
1167
+ "name": "download",
1010
1168
  "type": {
1011
- "text": "string"
1169
+ "text": "boolean"
1012
1170
  },
1013
- "static": true,
1014
- "default": "\"nord-select\""
1171
+ "default": "false",
1172
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1173
+ "fieldName": "download"
1015
1174
  },
1016
1175
  {
1017
- "kind": "field",
1018
- "name": "date",
1176
+ "name": "target",
1019
1177
  "type": {
1020
- "text": "Date"
1178
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1021
1179
  },
1022
- "default": "date"
1023
- }
1024
- ],
1025
- "superclass": {
1026
- "name": "NordEvent",
1027
- "module": "/src/common/events.js"
1028
- }
1029
- }
1030
- ],
1031
- "exports": [
1032
- {
1033
- "kind": "js",
1034
- "name": "DateSelectEvent",
1035
- "declaration": {
1036
- "name": "DateSelectEvent",
1037
- "module": "src/calendar/DateSelectEvent.ts"
1038
- }
1039
- }
1040
- ],
1041
- "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"
1042
- },
1043
- {
1044
- "kind": "javascript-module",
1045
- "path": "src/calendar/calendar-localization.ts",
1046
- "declarations": [
1047
- {
1048
- "kind": "variable",
1049
- "name": "localization",
1050
- "type": {
1051
- "text": "CalendarLocalizedText"
1052
- },
1053
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
1054
- }
1055
- ],
1056
- "exports": [
1057
- {
1058
- "kind": "js",
1059
- "name": "default",
1060
- "declaration": {
1061
- "name": "localization",
1062
- "module": "src/calendar/calendar-localization.ts"
1063
- }
1064
- }
1065
- ],
1066
- "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"
1067
- },
1068
- {
1069
- "kind": "javascript-module",
1070
- "path": "src/calendar/month-view.ts",
1071
- "declarations": [
1072
- {
1073
- "kind": "function",
1074
- "name": "dayView",
1075
- "parameters": [
1076
- {
1077
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1078
- "type": {
1079
- "text": "DatePickerDayProps"
1080
- }
1081
- }
1082
- ]
1083
- },
1084
- {
1085
- "kind": "function",
1086
- "name": "monthView",
1087
- "parameters": [
1088
- {
1089
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1090
- "type": {
1091
- "text": "MonthViewArgs"
1092
- }
1093
- }
1094
- ]
1095
- }
1096
- ],
1097
- "exports": [
1098
- {
1099
- "kind": "js",
1100
- "name": "dayView",
1101
- "declaration": {
1102
- "name": "dayView",
1103
- "module": "src/calendar/month-view.ts"
1104
- }
1105
- },
1106
- {
1107
- "kind": "js",
1108
- "name": "monthView",
1109
- "declaration": {
1110
- "name": "monthView",
1111
- "module": "src/calendar/month-view.ts"
1112
- }
1113
- }
1114
- ],
1115
- "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"
1116
- },
1117
- {
1118
- "kind": "javascript-module",
1119
- "path": "src/card/Card.ts",
1120
- "declarations": [
1121
- {
1122
- "kind": "class",
1123
- "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.",
1124
- "name": "Card",
1125
- "slots": [
1126
- {
1127
- "description": "The card content.",
1128
- "name": ""
1129
- },
1130
- {
1131
- "description": "Optional slot that holds a header for the card.",
1132
- "name": "header"
1133
- },
1134
- {
1135
- "description": "Optional slot that holds footer content for the card.",
1136
- "name": "footer"
1137
- }
1138
- ],
1139
- "members": [
1140
- {
1141
- "kind": "field",
1142
- "name": "headerSlot",
1143
- "privacy": "private",
1144
- "default": "new SlotController(this, \"header\")"
1145
- },
1146
- {
1147
- "kind": "field",
1148
- "name": "footerSlot",
1149
- "privacy": "private",
1150
- "default": "new SlotController(this, \"footer\")"
1180
+ "default": "\"_self\"",
1181
+ "description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
1182
+ "fieldName": "target"
1151
1183
  },
1152
1184
  {
1153
- "kind": "field",
1154
- "name": "padding",
1185
+ "name": "expand",
1155
1186
  "type": {
1156
- "text": "\"m\" | \"l\" | \"none\""
1187
+ "text": "boolean"
1157
1188
  },
1158
- "default": "\"m\"",
1159
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1160
- "attribute": "padding",
1161
- "reflects": true
1189
+ "default": "false",
1190
+ "description": "Controls whether the button expands to fill the width of its container.",
1191
+ "fieldName": "expand"
1162
1192
  },
1163
1193
  {
1164
- "kind": "field",
1165
- "name": "_warningLogged",
1194
+ "name": "disabled",
1166
1195
  "type": {
1167
1196
  "text": "boolean"
1168
1197
  },
1169
- "privacy": "private",
1170
- "static": true,
1171
1198
  "default": "false",
1199
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1200
+ "fieldName": "disabled",
1172
1201
  "inheritedFrom": {
1173
- "name": "DraftComponentMixin",
1174
- "module": "src/common/mixins/DraftComponentMixin.ts"
1202
+ "name": "InputMixin",
1203
+ "module": "src/common/mixins/InputMixin.ts"
1175
1204
  }
1176
- }
1177
- ],
1178
- "attributes": [
1205
+ },
1179
1206
  {
1180
- "name": "padding",
1207
+ "name": "name",
1181
1208
  "type": {
1182
- "text": "\"m\" | \"l\" | \"none\""
1209
+ "text": "string | undefined"
1183
1210
  },
1184
- "default": "\"m\"",
1185
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
1186
- "fieldName": "padding"
1211
+ "description": "The name of the form component.",
1212
+ "fieldName": "name",
1213
+ "inheritedFrom": {
1214
+ "name": "InputMixin",
1215
+ "module": "src/common/mixins/InputMixin.ts"
1216
+ }
1217
+ },
1218
+ {
1219
+ "name": "value",
1220
+ "type": {
1221
+ "text": "string"
1222
+ },
1223
+ "default": "\"\"",
1224
+ "description": "The value of the form component.",
1225
+ "fieldName": "value",
1226
+ "inheritedFrom": {
1227
+ "name": "InputMixin",
1228
+ "module": "src/common/mixins/InputMixin.ts"
1229
+ }
1187
1230
  }
1188
1231
  ],
1189
1232
  "mixins": [
1233
+ {
1234
+ "name": "InputMixin",
1235
+ "module": "/src/common/mixins/InputMixin.js"
1236
+ },
1237
+ {
1238
+ "name": "FocusableMixin",
1239
+ "module": "/src/common/mixins/FocusableMixin.js"
1240
+ },
1190
1241
  {
1191
1242
  "name": "DraftComponentMixin",
1192
1243
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -1197,8 +1248,8 @@
1197
1248
  "package": "lit"
1198
1249
  },
1199
1250
  "status": "draft",
1200
- "category": "structure",
1201
- "tagName": "nord-card",
1251
+ "category": "action",
1252
+ "tagName": "nord-button",
1202
1253
  "customElement": true
1203
1254
  }
1204
1255
  ],
@@ -1207,20 +1258,20 @@
1207
1258
  "kind": "js",
1208
1259
  "name": "default",
1209
1260
  "declaration": {
1210
- "name": "Card",
1211
- "module": "src/card/Card.ts"
1261
+ "name": "Button",
1262
+ "module": "src/button/Button.ts"
1212
1263
  }
1213
1264
  },
1214
1265
  {
1215
1266
  "kind": "custom-element-definition",
1216
- "name": "nord-card",
1267
+ "name": "nord-button",
1217
1268
  "declaration": {
1218
- "name": "Card",
1219
- "module": "src/card/Card.ts"
1269
+ "name": "Button",
1270
+ "module": "src/button/Button.ts"
1220
1271
  }
1221
1272
  }
1222
1273
  ],
1223
- "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\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"
1274
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
1224
1275
  },
1225
1276
  {
1226
1277
  "kind": "javascript-module",
@@ -2416,16 +2467,90 @@
2416
2467
  },
2417
2468
  {
2418
2469
  "kind": "javascript-module",
2419
- "path": "src/common/collection.ts",
2470
+ "path": "src/common/attribute.ts",
2420
2471
  "declarations": [
2421
2472
  {
2422
2473
  "kind": "function",
2423
- "name": "groupBy",
2474
+ "name": "add",
2424
2475
  "parameters": [
2425
2476
  {
2426
- "name": "array",
2477
+ "name": "element",
2427
2478
  "type": {
2428
- "text": "Array<TObject>"
2479
+ "text": "Element"
2480
+ }
2481
+ },
2482
+ {
2483
+ "name": "attr",
2484
+ "type": {
2485
+ "text": "string"
2486
+ }
2487
+ },
2488
+ {
2489
+ "name": "token",
2490
+ "type": {
2491
+ "text": "string"
2492
+ }
2493
+ }
2494
+ ],
2495
+ "description": "Carefully adds a token to a space-separated attribute\nSimilar to classList, but for any attribute."
2496
+ },
2497
+ {
2498
+ "kind": "function",
2499
+ "name": "remove",
2500
+ "parameters": [
2501
+ {
2502
+ "name": "element",
2503
+ "type": {
2504
+ "text": "Element"
2505
+ }
2506
+ },
2507
+ {
2508
+ "name": "attr",
2509
+ "type": {
2510
+ "text": "string"
2511
+ }
2512
+ },
2513
+ {
2514
+ "name": "token",
2515
+ "type": {
2516
+ "text": "string"
2517
+ }
2518
+ }
2519
+ ],
2520
+ "description": "Carefully removes a token from a space-separated attribute.\nSimilar to classList, but for any attribute."
2521
+ }
2522
+ ],
2523
+ "exports": [
2524
+ {
2525
+ "kind": "js",
2526
+ "name": "add",
2527
+ "declaration": {
2528
+ "name": "add",
2529
+ "module": "src/common/attribute.ts"
2530
+ }
2531
+ },
2532
+ {
2533
+ "kind": "js",
2534
+ "name": "remove",
2535
+ "declaration": {
2536
+ "name": "remove",
2537
+ "module": "src/common/attribute.ts"
2538
+ }
2539
+ }
2540
+ ]
2541
+ },
2542
+ {
2543
+ "kind": "javascript-module",
2544
+ "path": "src/common/collection.ts",
2545
+ "declarations": [
2546
+ {
2547
+ "kind": "function",
2548
+ "name": "groupBy",
2549
+ "parameters": [
2550
+ {
2551
+ "name": "array",
2552
+ "type": {
2553
+ "text": "Array<TObject>"
2429
2554
  },
2430
2555
  "description": "the collection of objects to group"
2431
2556
  },
@@ -3240,6 +3365,41 @@
3240
3365
  }
3241
3366
  ]
3242
3367
  },
3368
+ {
3369
+ "kind": "javascript-module",
3370
+ "path": "src/common/portal.ts",
3371
+ "declarations": [
3372
+ {
3373
+ "kind": "function",
3374
+ "name": "createPortal",
3375
+ "parameters": [
3376
+ {
3377
+ "name": "src",
3378
+ "type": {
3379
+ "text": "Node"
3380
+ }
3381
+ },
3382
+ {
3383
+ "name": "dest",
3384
+ "type": {
3385
+ "text": "Node"
3386
+ }
3387
+ }
3388
+ ],
3389
+ "description": "Creates a \"portal\" for transporting an element from one location to another.\nThe element gets moved to its destination on open(),\nand restored to its original location on close()."
3390
+ }
3391
+ ],
3392
+ "exports": [
3393
+ {
3394
+ "kind": "js",
3395
+ "name": "createPortal",
3396
+ "declaration": {
3397
+ "name": "createPortal",
3398
+ "module": "src/common/portal.ts"
3399
+ }
3400
+ }
3401
+ ]
3402
+ },
3243
3403
  {
3244
3404
  "kind": "javascript-module",
3245
3405
  "path": "src/common/ref.ts",
@@ -4540,33 +4700,786 @@
4540
4700
  "reflects": true
4541
4701
  },
4542
4702
  {
4543
- "kind": "field",
4544
- "name": "label",
4703
+ "kind": "field",
4704
+ "name": "label",
4705
+ "type": {
4706
+ "text": "string | undefined"
4707
+ },
4708
+ "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
4709
+ "attribute": "label",
4710
+ "reflects": true
4711
+ },
4712
+ {
4713
+ "kind": "field",
4714
+ "name": "svg",
4715
+ "type": {
4716
+ "text": "string"
4717
+ },
4718
+ "privacy": "private",
4719
+ "default": "\"\""
4720
+ },
4721
+ {
4722
+ "kind": "method",
4723
+ "name": "resolve",
4724
+ "privacy": "private",
4725
+ "return": {
4726
+ "type": {
4727
+ "text": "string | Promise<string>"
4728
+ }
4729
+ }
4730
+ },
4731
+ {
4732
+ "kind": "field",
4733
+ "name": "_warningLogged",
4734
+ "type": {
4735
+ "text": "boolean"
4736
+ },
4737
+ "privacy": "private",
4738
+ "static": true,
4739
+ "default": "false",
4740
+ "inheritedFrom": {
4741
+ "name": "DraftComponentMixin",
4742
+ "module": "src/common/mixins/DraftComponentMixin.ts"
4743
+ }
4744
+ }
4745
+ ],
4746
+ "attributes": [
4747
+ {
4748
+ "name": "name",
4749
+ "type": {
4750
+ "text": "string"
4751
+ },
4752
+ "default": "\"\"",
4753
+ "description": "The name of the icon to display, as defined by nordicons.",
4754
+ "fieldName": "name"
4755
+ },
4756
+ {
4757
+ "name": "size",
4758
+ "type": {
4759
+ "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
4760
+ },
4761
+ "default": "\"m\"",
4762
+ "description": "The size of the icon.",
4763
+ "fieldName": "size"
4764
+ },
4765
+ {
4766
+ "name": "color",
4767
+ "type": {
4768
+ "text": "string | undefined"
4769
+ },
4770
+ "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
4771
+ "fieldName": "color"
4772
+ },
4773
+ {
4774
+ "name": "label",
4775
+ "type": {
4776
+ "text": "string | undefined"
4777
+ },
4778
+ "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
4779
+ "fieldName": "label"
4780
+ }
4781
+ ],
4782
+ "mixins": [
4783
+ {
4784
+ "name": "DraftComponentMixin",
4785
+ "module": "/src/common/mixins/DraftComponentMixin.js"
4786
+ }
4787
+ ],
4788
+ "superclass": {
4789
+ "name": "LitElement",
4790
+ "package": "lit"
4791
+ },
4792
+ "status": "draft",
4793
+ "category": "image",
4794
+ "tagName": "nord-icon",
4795
+ "customElement": true
4796
+ }
4797
+ ],
4798
+ "exports": [
4799
+ {
4800
+ "kind": "js",
4801
+ "name": "default",
4802
+ "declaration": {
4803
+ "name": "Icon",
4804
+ "module": "src/icon/Icon.ts"
4805
+ }
4806
+ },
4807
+ {
4808
+ "kind": "custom-element-definition",
4809
+ "name": "nord-icon",
4810
+ "declaration": {
4811
+ "name": "Icon",
4812
+ "module": "src/icon/Icon.ts"
4813
+ }
4814
+ }
4815
+ ],
4816
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
4817
+ },
4818
+ {
4819
+ "kind": "javascript-module",
4820
+ "path": "src/input/Input.ts",
4821
+ "declarations": [
4822
+ {
4823
+ "kind": "class",
4824
+ "description": "Inputs are used to allow users to provide text input when the expected input is short.\nAs well as plain text, Input supports various types of text, including passwords and numbers.",
4825
+ "name": "Input",
4826
+ "slots": [
4827
+ {
4828
+ "description": "Use when a label requires more than plain text.",
4829
+ "name": "label"
4830
+ },
4831
+ {
4832
+ "description": "Optional slot that holds hint text for the input.",
4833
+ "name": "hint"
4834
+ },
4835
+ {
4836
+ "description": "Optional slot that holds error text for the input.",
4837
+ "name": "error"
4838
+ },
4839
+ {
4840
+ "description": "Optional slot that holds an icon for the input.",
4841
+ "name": "before"
4842
+ }
4843
+ ],
4844
+ "members": [
4845
+ {
4846
+ "kind": "field",
4847
+ "name": "beforeSlot",
4848
+ "privacy": "private",
4849
+ "default": "new SlotController(this, \"before\")"
4850
+ },
4851
+ {
4852
+ "kind": "field",
4853
+ "name": "type",
4854
+ "type": {
4855
+ "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\""
4856
+ },
4857
+ "default": "\"text\"",
4858
+ "description": "The type of the input.",
4859
+ "attribute": "type"
4860
+ },
4861
+ {
4862
+ "kind": "method",
4863
+ "name": "handleKeydown",
4864
+ "privacy": "private",
4865
+ "parameters": [
4866
+ {
4867
+ "name": "e",
4868
+ "type": {
4869
+ "text": "KeyboardEvent"
4870
+ }
4871
+ }
4872
+ ]
4873
+ },
4874
+ {
4875
+ "kind": "field",
4876
+ "name": "labelSlot",
4877
+ "privacy": "protected",
4878
+ "default": "new SlotController(this, \"label\")",
4879
+ "inheritedFrom": {
4880
+ "name": "FormAssociatedMixin",
4881
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4882
+ }
4883
+ },
4884
+ {
4885
+ "kind": "field",
4886
+ "name": "errorSlot",
4887
+ "privacy": "protected",
4888
+ "default": "new SlotController(this, \"error\")",
4889
+ "inheritedFrom": {
4890
+ "name": "FormAssociatedMixin",
4891
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4892
+ }
4893
+ },
4894
+ {
4895
+ "kind": "field",
4896
+ "name": "hintSlot",
4897
+ "privacy": "protected",
4898
+ "default": "new SlotController(this, \"hint\")",
4899
+ "inheritedFrom": {
4900
+ "name": "FormAssociatedMixin",
4901
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4902
+ }
4903
+ },
4904
+ {
4905
+ "kind": "field",
4906
+ "name": "formData",
4907
+ "privacy": "protected",
4908
+ "default": "new FormDataController(this, { value: () => this.formValue })",
4909
+ "inheritedFrom": {
4910
+ "name": "FormAssociatedMixin",
4911
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4912
+ }
4913
+ },
4914
+ {
4915
+ "kind": "field",
4916
+ "name": "formValue",
4917
+ "privacy": "protected",
4918
+ "inheritedFrom": {
4919
+ "name": "FormAssociatedMixin",
4920
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4921
+ }
4922
+ },
4923
+ {
4924
+ "kind": "field",
4925
+ "name": "inputId",
4926
+ "type": {
4927
+ "text": "string"
4928
+ },
4929
+ "privacy": "protected",
4930
+ "default": "\"input\"",
4931
+ "inheritedFrom": {
4932
+ "name": "FormAssociatedMixin",
4933
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4934
+ }
4935
+ },
4936
+ {
4937
+ "kind": "field",
4938
+ "name": "errorId",
4939
+ "type": {
4940
+ "text": "string"
4941
+ },
4942
+ "privacy": "protected",
4943
+ "default": "\"error\"",
4944
+ "inheritedFrom": {
4945
+ "name": "FormAssociatedMixin",
4946
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4947
+ }
4948
+ },
4949
+ {
4950
+ "kind": "field",
4951
+ "name": "hintId",
4952
+ "type": {
4953
+ "text": "string"
4954
+ },
4955
+ "privacy": "protected",
4956
+ "default": "\"hint\"",
4957
+ "inheritedFrom": {
4958
+ "name": "FormAssociatedMixin",
4959
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4960
+ }
4961
+ },
4962
+ {
4963
+ "kind": "field",
4964
+ "name": "label",
4965
+ "type": {
4966
+ "text": "string"
4967
+ },
4968
+ "default": "\"\"",
4969
+ "description": "Label for the input.",
4970
+ "attribute": "label",
4971
+ "inheritedFrom": {
4972
+ "name": "FormAssociatedMixin",
4973
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4974
+ }
4975
+ },
4976
+ {
4977
+ "kind": "field",
4978
+ "name": "hint",
4979
+ "type": {
4980
+ "text": "string | undefined"
4981
+ },
4982
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
4983
+ "attribute": "hint",
4984
+ "inheritedFrom": {
4985
+ "name": "FormAssociatedMixin",
4986
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
4987
+ }
4988
+ },
4989
+ {
4990
+ "kind": "field",
4991
+ "name": "hideLabel",
4992
+ "type": {
4993
+ "text": "boolean"
4994
+ },
4995
+ "default": "false",
4996
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
4997
+ "attribute": "hide-label",
4998
+ "inheritedFrom": {
4999
+ "name": "FormAssociatedMixin",
5000
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5001
+ }
5002
+ },
5003
+ {
5004
+ "kind": "field",
5005
+ "name": "placeholder",
5006
+ "type": {
5007
+ "text": "string | undefined"
5008
+ },
5009
+ "description": "Placeholder text to display within the input.",
5010
+ "attribute": "placeholder",
5011
+ "inheritedFrom": {
5012
+ "name": "FormAssociatedMixin",
5013
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5014
+ }
5015
+ },
5016
+ {
5017
+ "kind": "field",
5018
+ "name": "error",
5019
+ "type": {
5020
+ "text": "string | undefined"
5021
+ },
5022
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
5023
+ "attribute": "error",
5024
+ "inheritedFrom": {
5025
+ "name": "FormAssociatedMixin",
5026
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5027
+ }
5028
+ },
5029
+ {
5030
+ "kind": "field",
5031
+ "name": "required",
5032
+ "type": {
5033
+ "text": "boolean"
5034
+ },
5035
+ "default": "false",
5036
+ "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.",
5037
+ "attribute": "required",
5038
+ "inheritedFrom": {
5039
+ "name": "FormAssociatedMixin",
5040
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5041
+ }
5042
+ },
5043
+ {
5044
+ "kind": "field",
5045
+ "name": "expand",
5046
+ "type": {
5047
+ "text": "boolean"
5048
+ },
5049
+ "default": "false",
5050
+ "description": "Controls whether the input expands to fill the width of its container.",
5051
+ "attribute": "expand",
5052
+ "reflects": true,
5053
+ "inheritedFrom": {
5054
+ "name": "FormAssociatedMixin",
5055
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5056
+ }
5057
+ },
5058
+ {
5059
+ "kind": "method",
5060
+ "name": "handleInput",
5061
+ "privacy": "protected",
5062
+ "parameters": [
5063
+ {
5064
+ "name": "e",
5065
+ "type": {
5066
+ "text": "Event"
5067
+ }
5068
+ }
5069
+ ],
5070
+ "inheritedFrom": {
5071
+ "name": "FormAssociatedMixin",
5072
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5073
+ }
5074
+ },
5075
+ {
5076
+ "kind": "method",
5077
+ "name": "handleChange",
5078
+ "privacy": "protected",
5079
+ "inheritedFrom": {
5080
+ "name": "FormAssociatedMixin",
5081
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5082
+ }
5083
+ },
5084
+ {
5085
+ "kind": "method",
5086
+ "name": "renderLabel",
5087
+ "privacy": "protected",
5088
+ "inheritedFrom": {
5089
+ "name": "FormAssociatedMixin",
5090
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5091
+ }
5092
+ },
5093
+ {
5094
+ "kind": "method",
5095
+ "name": "renderError",
5096
+ "privacy": "protected",
5097
+ "inheritedFrom": {
5098
+ "name": "FormAssociatedMixin",
5099
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5100
+ }
5101
+ },
5102
+ {
5103
+ "kind": "method",
5104
+ "name": "getDescribedBy",
5105
+ "privacy": "protected",
5106
+ "inheritedFrom": {
5107
+ "name": "FormAssociatedMixin",
5108
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5109
+ }
5110
+ },
5111
+ {
5112
+ "kind": "method",
5113
+ "name": "getInvalid",
5114
+ "privacy": "protected",
5115
+ "inheritedFrom": {
5116
+ "name": "FormAssociatedMixin",
5117
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5118
+ }
5119
+ },
5120
+ {
5121
+ "kind": "field",
5122
+ "name": "hasHint",
5123
+ "privacy": "protected",
5124
+ "inheritedFrom": {
5125
+ "name": "FormAssociatedMixin",
5126
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5127
+ }
5128
+ },
5129
+ {
5130
+ "kind": "field",
5131
+ "name": "hasError",
5132
+ "privacy": "protected",
5133
+ "inheritedFrom": {
5134
+ "name": "FormAssociatedMixin",
5135
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5136
+ }
5137
+ },
5138
+ {
5139
+ "kind": "field",
5140
+ "name": "disabled",
5141
+ "type": {
5142
+ "text": "boolean"
5143
+ },
5144
+ "default": "false",
5145
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
5146
+ "attribute": "disabled",
5147
+ "reflects": true,
5148
+ "inheritedFrom": {
5149
+ "name": "InputMixin",
5150
+ "module": "src/common/mixins/InputMixin.ts"
5151
+ }
5152
+ },
5153
+ {
5154
+ "kind": "field",
5155
+ "name": "name",
5156
+ "type": {
5157
+ "text": "string | undefined"
5158
+ },
5159
+ "description": "The name of the form component.",
5160
+ "attribute": "name",
5161
+ "inheritedFrom": {
5162
+ "name": "InputMixin",
5163
+ "module": "src/common/mixins/InputMixin.ts"
5164
+ }
5165
+ },
5166
+ {
5167
+ "kind": "field",
5168
+ "name": "value",
5169
+ "type": {
5170
+ "text": "string"
5171
+ },
5172
+ "default": "\"\"",
5173
+ "description": "The value of the form component.",
5174
+ "attribute": "value",
5175
+ "inheritedFrom": {
5176
+ "name": "InputMixin",
5177
+ "module": "src/common/mixins/InputMixin.ts"
5178
+ }
5179
+ },
5180
+ {
5181
+ "kind": "field",
5182
+ "name": "form",
5183
+ "privacy": "protected",
5184
+ "description": "Gets the form, if any, associated with the form element.",
5185
+ "inheritedFrom": {
5186
+ "name": "InputMixin",
5187
+ "module": "src/common/mixins/InputMixin.ts"
5188
+ }
5189
+ },
5190
+ {
5191
+ "kind": "field",
5192
+ "name": "focusableRef",
5193
+ "privacy": "protected",
5194
+ "inheritedFrom": {
5195
+ "name": "FocusableMixin",
5196
+ "module": "src/common/mixins/FocusableMixin.ts"
5197
+ }
5198
+ },
5199
+ {
5200
+ "kind": "method",
5201
+ "name": "focus",
5202
+ "parameters": [
5203
+ {
5204
+ "name": "options",
5205
+ "optional": true,
5206
+ "type": {
5207
+ "text": "FocusOptions"
5208
+ },
5209
+ "description": "An object which controls aspects of the focusing process."
5210
+ }
5211
+ ],
5212
+ "description": "Programmatically move focus to the component.",
5213
+ "inheritedFrom": {
5214
+ "name": "FocusableMixin",
5215
+ "module": "src/common/mixins/FocusableMixin.ts"
5216
+ }
5217
+ },
5218
+ {
5219
+ "kind": "method",
5220
+ "name": "blur",
5221
+ "description": "Programmatically remove focus from the component.",
5222
+ "inheritedFrom": {
5223
+ "name": "FocusableMixin",
5224
+ "module": "src/common/mixins/FocusableMixin.ts"
5225
+ }
5226
+ },
5227
+ {
5228
+ "kind": "method",
5229
+ "name": "click",
5230
+ "description": "Programmatically simulates a click on the component.",
5231
+ "inheritedFrom": {
5232
+ "name": "FocusableMixin",
5233
+ "module": "src/common/mixins/FocusableMixin.ts"
5234
+ }
5235
+ },
5236
+ {
5237
+ "kind": "field",
5238
+ "name": "_warningLogged",
5239
+ "type": {
5240
+ "text": "boolean"
5241
+ },
5242
+ "privacy": "private",
5243
+ "static": true,
5244
+ "default": "false",
5245
+ "inheritedFrom": {
5246
+ "name": "DraftComponentMixin",
5247
+ "module": "src/common/mixins/DraftComponentMixin.ts"
5248
+ }
5249
+ }
5250
+ ],
5251
+ "attributes": [
5252
+ {
5253
+ "name": "type",
5254
+ "type": {
5255
+ "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\""
5256
+ },
5257
+ "default": "\"text\"",
5258
+ "description": "The type of the input.",
5259
+ "fieldName": "type"
5260
+ },
5261
+ {
5262
+ "name": "label",
5263
+ "type": {
5264
+ "text": "string"
5265
+ },
5266
+ "default": "\"\"",
5267
+ "description": "Label for the input.",
5268
+ "fieldName": "label",
5269
+ "inheritedFrom": {
5270
+ "name": "FormAssociatedMixin",
5271
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5272
+ }
5273
+ },
5274
+ {
5275
+ "name": "hint",
5276
+ "type": {
5277
+ "text": "string | undefined"
5278
+ },
5279
+ "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
5280
+ "fieldName": "hint",
5281
+ "inheritedFrom": {
5282
+ "name": "FormAssociatedMixin",
5283
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5284
+ }
5285
+ },
5286
+ {
5287
+ "name": "hide-label",
5288
+ "type": {
5289
+ "text": "boolean"
5290
+ },
5291
+ "default": "false",
5292
+ "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
5293
+ "fieldName": "hideLabel",
5294
+ "inheritedFrom": {
5295
+ "name": "FormAssociatedMixin",
5296
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5297
+ }
5298
+ },
5299
+ {
5300
+ "name": "placeholder",
5301
+ "type": {
5302
+ "text": "string | undefined"
5303
+ },
5304
+ "description": "Placeholder text to display within the input.",
5305
+ "fieldName": "placeholder",
5306
+ "inheritedFrom": {
5307
+ "name": "FormAssociatedMixin",
5308
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5309
+ }
5310
+ },
5311
+ {
5312
+ "name": "error",
5313
+ "type": {
5314
+ "text": "string | undefined"
5315
+ },
5316
+ "description": "Optional error to be shown with the input. Alternatively use the error slot.",
5317
+ "fieldName": "error",
5318
+ "inheritedFrom": {
5319
+ "name": "FormAssociatedMixin",
5320
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5321
+ }
5322
+ },
5323
+ {
5324
+ "name": "required",
5325
+ "type": {
5326
+ "text": "boolean"
5327
+ },
5328
+ "default": "false",
5329
+ "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.",
5330
+ "fieldName": "required",
5331
+ "inheritedFrom": {
5332
+ "name": "FormAssociatedMixin",
5333
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5334
+ }
5335
+ },
5336
+ {
5337
+ "name": "expand",
5338
+ "type": {
5339
+ "text": "boolean"
5340
+ },
5341
+ "default": "false",
5342
+ "description": "Controls whether the input expands to fill the width of its container.",
5343
+ "fieldName": "expand",
5344
+ "inheritedFrom": {
5345
+ "name": "FormAssociatedMixin",
5346
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5347
+ }
5348
+ },
5349
+ {
5350
+ "name": "disabled",
5351
+ "type": {
5352
+ "text": "boolean"
5353
+ },
5354
+ "default": "false",
5355
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
5356
+ "fieldName": "disabled",
5357
+ "inheritedFrom": {
5358
+ "name": "InputMixin",
5359
+ "module": "src/common/mixins/InputMixin.ts"
5360
+ }
5361
+ },
5362
+ {
5363
+ "name": "name",
5364
+ "type": {
5365
+ "text": "string | undefined"
5366
+ },
5367
+ "description": "The name of the form component.",
5368
+ "fieldName": "name",
5369
+ "inheritedFrom": {
5370
+ "name": "InputMixin",
5371
+ "module": "src/common/mixins/InputMixin.ts"
5372
+ }
5373
+ },
5374
+ {
5375
+ "name": "value",
5376
+ "type": {
5377
+ "text": "string"
5378
+ },
5379
+ "default": "\"\"",
5380
+ "description": "The value of the form component.",
5381
+ "fieldName": "value",
5382
+ "inheritedFrom": {
5383
+ "name": "InputMixin",
5384
+ "module": "src/common/mixins/InputMixin.ts"
5385
+ }
5386
+ }
5387
+ ],
5388
+ "mixins": [
5389
+ {
5390
+ "name": "FormAssociatedMixin",
5391
+ "module": "/src/common/mixins/FormAssociatedMixin.js"
5392
+ },
5393
+ {
5394
+ "name": "InputMixin",
5395
+ "module": "/src/common/mixins/InputMixin.js"
5396
+ },
5397
+ {
5398
+ "name": "FocusableMixin",
5399
+ "module": "/src/common/mixins/FocusableMixin.js"
5400
+ },
5401
+ {
5402
+ "name": "DraftComponentMixin",
5403
+ "module": "/src/common/mixins/DraftComponentMixin.js"
5404
+ }
5405
+ ],
5406
+ "superclass": {
5407
+ "name": "LitElement",
5408
+ "package": "lit"
5409
+ },
5410
+ "status": "draft",
5411
+ "category": "form",
5412
+ "tagName": "nord-input",
5413
+ "customElement": true,
5414
+ "events": [
5415
+ {
5416
+ "name": "input",
5417
+ "type": {
5418
+ "text": "NordEvent"
5419
+ },
5420
+ "description": "Fired as the user types into the input.",
5421
+ "inheritedFrom": {
5422
+ "name": "FormAssociatedMixin",
5423
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5424
+ }
5425
+ },
5426
+ {
5427
+ "name": "change",
4545
5428
  "type": {
4546
- "text": "string | undefined"
5429
+ "text": "NordEvent"
4547
5430
  },
4548
- "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
4549
- "attribute": "label",
4550
- "reflects": true
4551
- },
5431
+ "description": "Fired whenever the input's value is changed via user interaction.",
5432
+ "inheritedFrom": {
5433
+ "name": "FormAssociatedMixin",
5434
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
5435
+ }
5436
+ }
5437
+ ]
5438
+ }
5439
+ ],
5440
+ "exports": [
5441
+ {
5442
+ "kind": "js",
5443
+ "name": "default",
5444
+ "declaration": {
5445
+ "name": "Input",
5446
+ "module": "src/input/Input.ts"
5447
+ }
5448
+ },
5449
+ {
5450
+ "kind": "custom-element-definition",
5451
+ "name": "nord-input",
5452
+ "declaration": {
5453
+ "name": "Input",
5454
+ "module": "src/input/Input.ts"
5455
+ }
5456
+ }
5457
+ ],
5458
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n"
5459
+ },
5460
+ {
5461
+ "kind": "javascript-module",
5462
+ "path": "src/nav-group/NavGroup.ts",
5463
+ "declarations": [
5464
+ {
5465
+ "kind": "class",
5466
+ "description": "Navigation group includes all the actions or items in a single\ngroup and is used for grouping items into related categories.",
5467
+ "name": "NavGroup",
5468
+ "slots": [
5469
+ {
5470
+ "description": "The default slot used for the nav items.",
5471
+ "name": ""
5472
+ }
5473
+ ],
5474
+ "members": [
4552
5475
  {
4553
5476
  "kind": "field",
4554
- "name": "svg",
5477
+ "name": "heading",
4555
5478
  "type": {
4556
- "text": "string"
5479
+ "text": "string | undefined"
4557
5480
  },
4558
- "privacy": "private",
4559
- "default": "\"\""
4560
- },
4561
- {
4562
- "kind": "method",
4563
- "name": "resolve",
4564
- "privacy": "private",
4565
- "return": {
4566
- "type": {
4567
- "text": "string | Promise<string>"
4568
- }
4569
- }
5481
+ "description": "Heading and accessible label for the nav group",
5482
+ "attribute": "heading"
4570
5483
  },
4571
5484
  {
4572
5485
  "kind": "field",
@@ -4585,38 +5498,12 @@
4585
5498
  ],
4586
5499
  "attributes": [
4587
5500
  {
4588
- "name": "name",
4589
- "type": {
4590
- "text": "string"
4591
- },
4592
- "default": "\"\"",
4593
- "description": "The name of the icon to display, as defined by nordicons.",
4594
- "fieldName": "name"
4595
- },
4596
- {
4597
- "name": "size",
4598
- "type": {
4599
- "text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
4600
- },
4601
- "default": "\"m\"",
4602
- "description": "The size of the icon.",
4603
- "fieldName": "size"
4604
- },
4605
- {
4606
- "name": "color",
4607
- "type": {
4608
- "text": "string | undefined"
4609
- },
4610
- "description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
4611
- "fieldName": "color"
4612
- },
4613
- {
4614
- "name": "label",
5501
+ "name": "heading",
4615
5502
  "type": {
4616
5503
  "text": "string | undefined"
4617
5504
  },
4618
- "description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
4619
- "fieldName": "label"
5505
+ "description": "Heading and accessible label for the nav group",
5506
+ "fieldName": "heading"
4620
5507
  }
4621
5508
  ],
4622
5509
  "mixins": [
@@ -4630,8 +5517,8 @@
4630
5517
  "package": "lit"
4631
5518
  },
4632
5519
  "status": "draft",
4633
- "category": "image",
4634
- "tagName": "nord-icon",
5520
+ "category": "navigation",
5521
+ "tagName": "nord-nav-group",
4635
5522
  "customElement": true
4636
5523
  }
4637
5524
  ],
@@ -4640,392 +5527,143 @@
4640
5527
  "kind": "js",
4641
5528
  "name": "default",
4642
5529
  "declaration": {
4643
- "name": "Icon",
4644
- "module": "src/icon/Icon.ts"
5530
+ "name": "NavGroup",
5531
+ "module": "src/nav-group/NavGroup.ts"
4645
5532
  }
4646
5533
  },
4647
5534
  {
4648
5535
  "kind": "custom-element-definition",
4649
- "name": "nord-icon",
5536
+ "name": "nord-nav-group",
4650
5537
  "declaration": {
4651
- "name": "Icon",
4652
- "module": "src/icon/Icon.ts"
5538
+ "name": "NavGroup",
5539
+ "module": "src/nav-group/NavGroup.ts"
4653
5540
  }
4654
5541
  }
4655
5542
  ],
4656
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
5543
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping other types of content.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
4657
5544
  },
4658
5545
  {
4659
5546
  "kind": "javascript-module",
4660
- "path": "src/input/Input.ts",
5547
+ "path": "src/nav-item/NavItem.ts",
4661
5548
  "declarations": [
4662
5549
  {
4663
5550
  "kind": "class",
4664
- "description": "Inputs are used to allow users to provide text input when the expected input is short.\nAs well as plain text, Input supports various types of text, including passwords and numbers.",
4665
- "name": "Input",
5551
+ "description": "Navigation item populates sidebar navigation with links.\nEvery item should be placed inside a navigation group.",
5552
+ "name": "NavItem",
4666
5553
  "slots": [
4667
5554
  {
4668
- "description": "Use when a label requires more than plain text.",
4669
- "name": "label"
4670
- },
4671
- {
4672
- "description": "Optional slot that holds hint text for the input.",
4673
- "name": "hint"
4674
- },
4675
- {
4676
- "description": "Optional slot that holds error text for the input.",
4677
- "name": "error"
5555
+ "description": "The default slot used for the nav item's text.",
5556
+ "name": ""
4678
5557
  },
4679
5558
  {
4680
- "description": "Optional slot that holds an icon for the input.",
4681
- "name": "before"
5559
+ "description": "Used for nesting navigation. When used the nav-item becomes a button to collapse the subnav, rather than a link.",
5560
+ "name": "subnav"
4682
5561
  }
4683
5562
  ],
4684
5563
  "members": [
4685
5564
  {
4686
5565
  "kind": "field",
4687
- "name": "beforeSlot",
4688
- "privacy": "private",
4689
- "default": "new SlotController(this, \"before\")"
4690
- },
4691
- {
4692
- "kind": "field",
4693
- "name": "type",
4694
- "type": {
4695
- "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\""
4696
- },
4697
- "default": "\"text\"",
4698
- "description": "The type of the input.",
4699
- "attribute": "type"
4700
- },
4701
- {
4702
- "kind": "method",
4703
- "name": "handleKeydown",
5566
+ "name": "subnavSlot",
4704
5567
  "privacy": "private",
4705
- "parameters": [
4706
- {
4707
- "name": "e",
4708
- "type": {
4709
- "text": "KeyboardEvent"
4710
- }
4711
- }
4712
- ]
4713
- },
4714
- {
4715
- "kind": "field",
4716
- "name": "labelSlot",
4717
- "privacy": "protected",
4718
- "default": "new SlotController(this, \"label\")",
4719
- "inheritedFrom": {
4720
- "name": "FormAssociatedMixin",
4721
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4722
- }
4723
- },
4724
- {
4725
- "kind": "field",
4726
- "name": "errorSlot",
4727
- "privacy": "protected",
4728
- "default": "new SlotController(this, \"error\")",
4729
- "inheritedFrom": {
4730
- "name": "FormAssociatedMixin",
4731
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4732
- }
4733
- },
4734
- {
4735
- "kind": "field",
4736
- "name": "hintSlot",
4737
- "privacy": "protected",
4738
- "default": "new SlotController(this, \"hint\")",
4739
- "inheritedFrom": {
4740
- "name": "FormAssociatedMixin",
4741
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4742
- }
4743
- },
4744
- {
4745
- "kind": "field",
4746
- "name": "formData",
4747
- "privacy": "protected",
4748
- "default": "new FormDataController(this, { value: () => this.formValue })",
4749
- "inheritedFrom": {
4750
- "name": "FormAssociatedMixin",
4751
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4752
- }
4753
- },
4754
- {
4755
- "kind": "field",
4756
- "name": "formValue",
4757
- "privacy": "protected",
4758
- "inheritedFrom": {
4759
- "name": "FormAssociatedMixin",
4760
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4761
- }
5568
+ "default": "new SlotController(this, \"subnav\")"
4762
5569
  },
4763
5570
  {
4764
5571
  "kind": "field",
4765
- "name": "inputId",
4766
- "type": {
4767
- "text": "string"
4768
- },
4769
- "privacy": "protected",
4770
- "default": "\"input\"",
4771
- "inheritedFrom": {
4772
- "name": "FormAssociatedMixin",
4773
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4774
- }
4775
- },
4776
- {
4777
- "kind": "field",
4778
- "name": "errorId",
4779
- "type": {
4780
- "text": "string"
4781
- },
4782
- "privacy": "protected",
4783
- "default": "\"error\"",
4784
- "inheritedFrom": {
4785
- "name": "FormAssociatedMixin",
4786
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4787
- }
4788
- },
4789
- {
4790
- "kind": "field",
4791
- "name": "hintId",
4792
- "type": {
4793
- "text": "string"
4794
- },
4795
- "privacy": "protected",
4796
- "default": "\"hint\"",
4797
- "inheritedFrom": {
4798
- "name": "FormAssociatedMixin",
4799
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4800
- }
4801
- },
4802
- {
4803
- "kind": "field",
4804
- "name": "label",
4805
- "type": {
4806
- "text": "string"
4807
- },
4808
- "default": "\"\"",
4809
- "description": "Label for the input.",
4810
- "attribute": "label",
4811
- "inheritedFrom": {
4812
- "name": "FormAssociatedMixin",
4813
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4814
- }
4815
- },
4816
- {
4817
- "kind": "field",
4818
- "name": "hint",
4819
- "type": {
4820
- "text": "string | undefined"
4821
- },
4822
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
4823
- "attribute": "hint",
4824
- "inheritedFrom": {
4825
- "name": "FormAssociatedMixin",
4826
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4827
- }
5572
+ "name": "direction",
5573
+ "privacy": "private",
5574
+ "default": "new DirectionController(this)"
4828
5575
  },
4829
5576
  {
4830
5577
  "kind": "field",
4831
- "name": "hideLabel",
5578
+ "name": "active",
4832
5579
  "type": {
4833
5580
  "text": "boolean"
4834
5581
  },
4835
5582
  "default": "false",
4836
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
4837
- "attribute": "hide-label",
4838
- "inheritedFrom": {
4839
- "name": "FormAssociatedMixin",
4840
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4841
- }
5583
+ "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
5584
+ "attribute": "active",
5585
+ "reflects": true
4842
5586
  },
4843
5587
  {
4844
5588
  "kind": "field",
4845
- "name": "placeholder",
5589
+ "name": "icon",
4846
5590
  "type": {
4847
5591
  "text": "string | undefined"
4848
5592
  },
4849
- "description": "Placeholder text to display within the input.",
4850
- "attribute": "placeholder",
4851
- "inheritedFrom": {
4852
- "name": "FormAssociatedMixin",
4853
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4854
- }
5593
+ "description": "The name of an icon from Nordicons to display for the nav item.",
5594
+ "attribute": "icon"
4855
5595
  },
4856
5596
  {
4857
5597
  "kind": "field",
4858
- "name": "error",
5598
+ "name": "href",
4859
5599
  "type": {
4860
5600
  "text": "string | undefined"
4861
5601
  },
4862
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
4863
- "attribute": "error",
4864
- "inheritedFrom": {
4865
- "name": "FormAssociatedMixin",
4866
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4867
- }
5602
+ "description": "The url the nav item should link to.\nNote: this is not used if you have nested navigation using the \"subnav\" slot.",
5603
+ "attribute": "href"
4868
5604
  },
4869
5605
  {
4870
5606
  "kind": "field",
4871
- "name": "required",
5607
+ "name": "badge",
4872
5608
  "type": {
4873
- "text": "boolean"
5609
+ "text": "string | undefined"
4874
5610
  },
4875
- "default": "false",
4876
- "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.",
4877
- "attribute": "required",
4878
- "inheritedFrom": {
4879
- "name": "FormAssociatedMixin",
4880
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4881
- }
5611
+ "description": "Allows you to add a notification badge with a number next to the nav item.",
5612
+ "attribute": "badge"
4882
5613
  },
4883
5614
  {
4884
5615
  "kind": "field",
4885
- "name": "expand",
5616
+ "name": "open",
4886
5617
  "type": {
4887
5618
  "text": "boolean"
4888
5619
  },
4889
5620
  "default": "false",
4890
- "description": "Controls whether the input expands to fill the width of its container.",
4891
- "attribute": "expand",
4892
- "reflects": true,
4893
- "inheritedFrom": {
4894
- "name": "FormAssociatedMixin",
4895
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4896
- }
5621
+ "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
5622
+ "attribute": "open"
4897
5623
  },
4898
5624
  {
4899
5625
  "kind": "method",
4900
- "name": "handleInput",
4901
- "privacy": "protected",
5626
+ "name": "renderLink",
5627
+ "privacy": "private",
4902
5628
  "parameters": [
4903
5629
  {
4904
- "name": "e",
5630
+ "name": "innards",
4905
5631
  "type": {
4906
- "text": "Event"
5632
+ "text": "TemplateResult"
4907
5633
  }
4908
5634
  }
4909
- ],
4910
- "inheritedFrom": {
4911
- "name": "FormAssociatedMixin",
4912
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4913
- }
4914
- },
4915
- {
4916
- "kind": "method",
4917
- "name": "handleChange",
4918
- "privacy": "protected",
4919
- "inheritedFrom": {
4920
- "name": "FormAssociatedMixin",
4921
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4922
- }
4923
- },
4924
- {
4925
- "kind": "method",
4926
- "name": "renderLabel",
4927
- "privacy": "protected",
4928
- "inheritedFrom": {
4929
- "name": "FormAssociatedMixin",
4930
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4931
- }
5635
+ ]
4932
5636
  },
4933
5637
  {
4934
5638
  "kind": "method",
4935
- "name": "renderError",
4936
- "privacy": "protected",
4937
- "inheritedFrom": {
4938
- "name": "FormAssociatedMixin",
4939
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4940
- }
5639
+ "name": "renderToggle",
5640
+ "privacy": "private",
5641
+ "parameters": [
5642
+ {
5643
+ "name": "innards",
5644
+ "type": {
5645
+ "text": "TemplateResult"
5646
+ }
5647
+ }
5648
+ ]
4941
5649
  },
4942
5650
  {
4943
5651
  "kind": "method",
4944
- "name": "getDescribedBy",
4945
- "privacy": "protected",
4946
- "inheritedFrom": {
4947
- "name": "FormAssociatedMixin",
4948
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4949
- }
5652
+ "name": "renderButton",
5653
+ "privacy": "private",
5654
+ "parameters": [
5655
+ {
5656
+ "name": "innards",
5657
+ "type": {
5658
+ "text": "TemplateResult"
5659
+ }
5660
+ }
5661
+ ]
4950
5662
  },
4951
5663
  {
4952
5664
  "kind": "method",
4953
- "name": "getInvalid",
4954
- "privacy": "protected",
4955
- "inheritedFrom": {
4956
- "name": "FormAssociatedMixin",
4957
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4958
- }
4959
- },
4960
- {
4961
- "kind": "field",
4962
- "name": "hasHint",
4963
- "privacy": "protected",
4964
- "inheritedFrom": {
4965
- "name": "FormAssociatedMixin",
4966
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4967
- }
4968
- },
4969
- {
4970
- "kind": "field",
4971
- "name": "hasError",
4972
- "privacy": "protected",
4973
- "inheritedFrom": {
4974
- "name": "FormAssociatedMixin",
4975
- "module": "src/common/mixins/FormAssociatedMixin.ts"
4976
- }
4977
- },
4978
- {
4979
- "kind": "field",
4980
- "name": "disabled",
4981
- "type": {
4982
- "text": "boolean"
4983
- },
4984
- "default": "false",
4985
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
4986
- "attribute": "disabled",
4987
- "reflects": true,
4988
- "inheritedFrom": {
4989
- "name": "InputMixin",
4990
- "module": "src/common/mixins/InputMixin.ts"
4991
- }
4992
- },
4993
- {
4994
- "kind": "field",
4995
- "name": "name",
4996
- "type": {
4997
- "text": "string | undefined"
4998
- },
4999
- "description": "The name of the form component.",
5000
- "attribute": "name",
5001
- "inheritedFrom": {
5002
- "name": "InputMixin",
5003
- "module": "src/common/mixins/InputMixin.ts"
5004
- }
5005
- },
5006
- {
5007
- "kind": "field",
5008
- "name": "value",
5009
- "type": {
5010
- "text": "string"
5011
- },
5012
- "default": "\"\"",
5013
- "description": "The value of the form component.",
5014
- "attribute": "value",
5015
- "inheritedFrom": {
5016
- "name": "InputMixin",
5017
- "module": "src/common/mixins/InputMixin.ts"
5018
- }
5019
- },
5020
- {
5021
- "kind": "field",
5022
- "name": "form",
5023
- "privacy": "protected",
5024
- "description": "Gets the form, if any, associated with the form element.",
5025
- "inheritedFrom": {
5026
- "name": "InputMixin",
5027
- "module": "src/common/mixins/InputMixin.ts"
5028
- }
5665
+ "name": "toggleOpen",
5666
+ "privacy": "private"
5029
5667
  },
5030
5668
  {
5031
5669
  "kind": "field",
@@ -5068,172 +5706,80 @@
5068
5706
  "kind": "method",
5069
5707
  "name": "click",
5070
5708
  "description": "Programmatically simulates a click on the component.",
5071
- "inheritedFrom": {
5072
- "name": "FocusableMixin",
5073
- "module": "src/common/mixins/FocusableMixin.ts"
5074
- }
5075
- },
5076
- {
5077
- "kind": "field",
5078
- "name": "_warningLogged",
5079
- "type": {
5080
- "text": "boolean"
5081
- },
5082
- "privacy": "private",
5083
- "static": true,
5084
- "default": "false",
5085
- "inheritedFrom": {
5086
- "name": "DraftComponentMixin",
5087
- "module": "src/common/mixins/DraftComponentMixin.ts"
5088
- }
5089
- }
5090
- ],
5091
- "attributes": [
5092
- {
5093
- "name": "type",
5094
- "type": {
5095
- "text": "\"text\" | \"email\" | \"password\" | \"tel\" | \"url\" | \"search\" | \"number\""
5096
- },
5097
- "default": "\"text\"",
5098
- "description": "The type of the input.",
5099
- "fieldName": "type"
5100
- },
5101
- {
5102
- "name": "label",
5103
- "type": {
5104
- "text": "string"
5105
- },
5106
- "default": "\"\"",
5107
- "description": "Label for the input.",
5108
- "fieldName": "label",
5109
- "inheritedFrom": {
5110
- "name": "FormAssociatedMixin",
5111
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5112
- }
5113
- },
5114
- {
5115
- "name": "hint",
5116
- "type": {
5117
- "text": "string | undefined"
5118
- },
5119
- "description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
5120
- "fieldName": "hint",
5121
- "inheritedFrom": {
5122
- "name": "FormAssociatedMixin",
5123
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5124
- }
5125
- },
5126
- {
5127
- "name": "hide-label",
5128
- "type": {
5129
- "text": "boolean"
5130
- },
5131
- "default": "false",
5132
- "description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
5133
- "fieldName": "hideLabel",
5134
- "inheritedFrom": {
5135
- "name": "FormAssociatedMixin",
5136
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5137
- }
5138
- },
5139
- {
5140
- "name": "placeholder",
5141
- "type": {
5142
- "text": "string | undefined"
5143
- },
5144
- "description": "Placeholder text to display within the input.",
5145
- "fieldName": "placeholder",
5146
- "inheritedFrom": {
5147
- "name": "FormAssociatedMixin",
5148
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5709
+ "inheritedFrom": {
5710
+ "name": "FocusableMixin",
5711
+ "module": "src/common/mixins/FocusableMixin.ts"
5149
5712
  }
5150
5713
  },
5151
5714
  {
5152
- "name": "error",
5715
+ "kind": "field",
5716
+ "name": "_warningLogged",
5153
5717
  "type": {
5154
- "text": "string | undefined"
5718
+ "text": "boolean"
5155
5719
  },
5156
- "description": "Optional error to be shown with the input. Alternatively use the error slot.",
5157
- "fieldName": "error",
5720
+ "privacy": "private",
5721
+ "static": true,
5722
+ "default": "false",
5158
5723
  "inheritedFrom": {
5159
- "name": "FormAssociatedMixin",
5160
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5724
+ "name": "DraftComponentMixin",
5725
+ "module": "src/common/mixins/DraftComponentMixin.ts"
5161
5726
  }
5162
- },
5727
+ }
5728
+ ],
5729
+ "events": [
5163
5730
  {
5164
- "name": "required",
5731
+ "name": "toggle",
5732
+ "type": {
5733
+ "text": "NordEvent"
5734
+ },
5735
+ "description": "Dispatched whenever a nav item's state changes between open and closed."
5736
+ }
5737
+ ],
5738
+ "attributes": [
5739
+ {
5740
+ "name": "active",
5165
5741
  "type": {
5166
5742
  "text": "boolean"
5167
5743
  },
5168
5744
  "default": "false",
5169
- "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.",
5170
- "fieldName": "required",
5171
- "inheritedFrom": {
5172
- "name": "FormAssociatedMixin",
5173
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5174
- }
5745
+ "description": "Used for indicating the current page. This gives a prominent background to the nav item,\nand marks the item as the current page for assistive technology.",
5746
+ "fieldName": "active"
5175
5747
  },
5176
5748
  {
5177
- "name": "expand",
5749
+ "name": "icon",
5178
5750
  "type": {
5179
- "text": "boolean"
5751
+ "text": "string | undefined"
5180
5752
  },
5181
- "default": "false",
5182
- "description": "Controls whether the input expands to fill the width of its container.",
5183
- "fieldName": "expand",
5184
- "inheritedFrom": {
5185
- "name": "FormAssociatedMixin",
5186
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5187
- }
5753
+ "description": "The name of an icon from Nordicons to display for the nav item.",
5754
+ "fieldName": "icon"
5188
5755
  },
5189
5756
  {
5190
- "name": "disabled",
5757
+ "name": "href",
5191
5758
  "type": {
5192
- "text": "boolean"
5759
+ "text": "string | undefined"
5193
5760
  },
5194
- "default": "false",
5195
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
5196
- "fieldName": "disabled",
5197
- "inheritedFrom": {
5198
- "name": "InputMixin",
5199
- "module": "src/common/mixins/InputMixin.ts"
5200
- }
5761
+ "description": "The url the nav item should link to.\nNote: this is not used if you have nested navigation using the \"subnav\" slot.",
5762
+ "fieldName": "href"
5201
5763
  },
5202
5764
  {
5203
- "name": "name",
5765
+ "name": "badge",
5204
5766
  "type": {
5205
5767
  "text": "string | undefined"
5206
5768
  },
5207
- "description": "The name of the form component.",
5208
- "fieldName": "name",
5209
- "inheritedFrom": {
5210
- "name": "InputMixin",
5211
- "module": "src/common/mixins/InputMixin.ts"
5212
- }
5769
+ "description": "Allows you to add a notification badge with a number next to the nav item.",
5770
+ "fieldName": "badge"
5213
5771
  },
5214
5772
  {
5215
- "name": "value",
5773
+ "name": "open",
5216
5774
  "type": {
5217
- "text": "string"
5775
+ "text": "boolean"
5218
5776
  },
5219
- "default": "\"\"",
5220
- "description": "The value of the form component.",
5221
- "fieldName": "value",
5222
- "inheritedFrom": {
5223
- "name": "InputMixin",
5224
- "module": "src/common/mixins/InputMixin.ts"
5225
- }
5777
+ "default": "false",
5778
+ "description": "When the nav items contains a subnav, controls whether the section is expanded or not.\nNote: this is only used if you have nested navigation using the \"subnav\" slot.",
5779
+ "fieldName": "open"
5226
5780
  }
5227
5781
  ],
5228
5782
  "mixins": [
5229
- {
5230
- "name": "FormAssociatedMixin",
5231
- "module": "/src/common/mixins/FormAssociatedMixin.js"
5232
- },
5233
- {
5234
- "name": "InputMixin",
5235
- "module": "/src/common/mixins/InputMixin.js"
5236
- },
5237
5783
  {
5238
5784
  "name": "FocusableMixin",
5239
5785
  "module": "/src/common/mixins/FocusableMixin.js"
@@ -5248,33 +5794,83 @@
5248
5794
  "package": "lit"
5249
5795
  },
5250
5796
  "status": "draft",
5251
- "category": "form",
5252
- "tagName": "nord-input",
5253
- "customElement": true,
5254
- "events": [
5797
+ "category": "navigation",
5798
+ "tagName": "nord-nav-item",
5799
+ "customElement": true
5800
+ }
5801
+ ],
5802
+ "exports": [
5803
+ {
5804
+ "kind": "js",
5805
+ "name": "default",
5806
+ "declaration": {
5807
+ "name": "NavItem",
5808
+ "module": "src/nav-item/NavItem.ts"
5809
+ }
5810
+ },
5811
+ {
5812
+ "kind": "custom-element-definition",
5813
+ "name": "nord-nav-item",
5814
+ "declaration": {
5815
+ "name": "NavItem",
5816
+ "module": "src/nav-item/NavItem.ts"
5817
+ }
5818
+ }
5819
+ ],
5820
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use navigation item outside of navigation group and navigation components.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
5821
+ },
5822
+ {
5823
+ "kind": "javascript-module",
5824
+ "path": "src/navigation/Navigation.ts",
5825
+ "declarations": [
5826
+ {
5827
+ "kind": "class",
5828
+ "description": "Navigation is used to display the primary navigation in the sidebar\nof an application. Navigation includes a list of links that users\nuse to move between sections of the application.",
5829
+ "name": "Navigation",
5830
+ "slots": [
5255
5831
  {
5256
- "name": "input",
5257
- "type": {
5258
- "text": "NordEvent"
5259
- },
5260
- "description": "Fired as the user types into the input.",
5261
- "inheritedFrom": {
5262
- "name": "FormAssociatedMixin",
5263
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5264
- }
5832
+ "description": "The main section of the sidebar, for holding nav components.",
5833
+ "name": ""
5265
5834
  },
5266
5835
  {
5267
- "name": "change",
5836
+ "description": "The top section of the sidebar.",
5837
+ "name": "header"
5838
+ },
5839
+ {
5840
+ "description": "The bottom section of the sidebar.",
5841
+ "name": "footer"
5842
+ }
5843
+ ],
5844
+ "members": [
5845
+ {
5846
+ "kind": "field",
5847
+ "name": "_warningLogged",
5268
5848
  "type": {
5269
- "text": "NordEvent"
5849
+ "text": "boolean"
5270
5850
  },
5271
- "description": "Fired whenever the input's value is changed via user interaction.",
5851
+ "privacy": "private",
5852
+ "static": true,
5853
+ "default": "false",
5272
5854
  "inheritedFrom": {
5273
- "name": "FormAssociatedMixin",
5274
- "module": "src/common/mixins/FormAssociatedMixin.ts"
5855
+ "name": "DraftComponentMixin",
5856
+ "module": "src/common/mixins/DraftComponentMixin.ts"
5275
5857
  }
5276
5858
  }
5277
- ]
5859
+ ],
5860
+ "mixins": [
5861
+ {
5862
+ "name": "DraftComponentMixin",
5863
+ "module": "/src/common/mixins/DraftComponentMixin.js"
5864
+ }
5865
+ ],
5866
+ "superclass": {
5867
+ "name": "LitElement",
5868
+ "package": "lit"
5869
+ },
5870
+ "status": "draft",
5871
+ "category": "navigation",
5872
+ "tagName": "nord-navigation",
5873
+ "customElement": true
5278
5874
  }
5279
5875
  ],
5280
5876
  "exports": [
@@ -5282,20 +5878,20 @@
5282
5878
  "kind": "js",
5283
5879
  "name": "default",
5284
5880
  "declaration": {
5285
- "name": "Input",
5286
- "module": "src/input/Input.ts"
5881
+ "name": "Navigation",
5882
+ "module": "src/navigation/Navigation.ts"
5287
5883
  }
5288
5884
  },
5289
5885
  {
5290
5886
  "kind": "custom-element-definition",
5291
- "name": "nord-input",
5887
+ "name": "nord-navigation",
5292
5888
  "declaration": {
5293
- "name": "Input",
5294
- "module": "src/input/Input.ts"
5889
+ "name": "Navigation",
5890
+ "module": "src/navigation/Navigation.ts"
5295
5891
  }
5296
5892
  }
5297
5893
  ],
5298
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n"
5894
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for primary navigation items that perform an action when clicked. Each action should navigate to a URL or trigger another action like a modal overlay.\n- Group navigation items into navigation groups based on related categories.\n- Use group headings to clarify the category of a section.\n- Use icons for all top level navigation items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place a `<nav>` element inside the navigation component, as it already contains one internally.\n\n</div>\n\n---\n\n## Content guidelines\n\nWhen writing navigation item labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in item labels, such as the”, “an” or a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending item labels in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse as few words as possible to describe each item label:\n\n<div class=\"n-usage n-usage-do\">Payments</div>\n<div class=\"n-usage n-usage-dont\">Payments in your clinic</div>\n\nAvoud all caps for item labels and group titles:\n\n<div class=\"n-usage n-usage-do\">Dashboard</div>\n<div class=\"n-usage n-usage-dont\">DASHBOARD</div>\n"
5299
5895
  },
5300
5896
  {
5301
5897
  "kind": "javascript-module",
@@ -7586,6 +8182,14 @@
7586
8182
  }
7587
8183
  ],
7588
8184
  "members": [
8185
+ {
8186
+ "kind": "field",
8187
+ "name": "lastOpened",
8188
+ "type": {
8189
+ "text": "Tooltip | undefined"
8190
+ },
8191
+ "static": true
8192
+ },
7589
8193
  {
7590
8194
  "kind": "field",
7591
8195
  "name": "shortcutSlot",
@@ -7596,10 +8200,16 @@
7596
8200
  "kind": "field",
7597
8201
  "name": "targetElement",
7598
8202
  "type": {
7599
- "text": "HTMLElement"
8203
+ "text": "FocusableElement"
7600
8204
  },
7601
8205
  "privacy": "private"
7602
8206
  },
8207
+ {
8208
+ "kind": "field",
8209
+ "name": "proxy",
8210
+ "privacy": "private",
8211
+ "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
8212
+ },
7603
8213
  {
7604
8214
  "kind": "field",
7605
8215
  "name": "visible",
@@ -7675,6 +8285,21 @@
7675
8285
  "name": "hideTooltip",
7676
8286
  "privacy": "private"
7677
8287
  },
8288
+ {
8289
+ "kind": "field",
8290
+ "name": "hideOnEscape",
8291
+ "privacy": "private"
8292
+ },
8293
+ {
8294
+ "kind": "field",
8295
+ "name": "addDescribedBy",
8296
+ "privacy": "private"
8297
+ },
8298
+ {
8299
+ "kind": "field",
8300
+ "name": "removeDescribedBy",
8301
+ "privacy": "private"
8302
+ },
7678
8303
  {
7679
8304
  "kind": "field",
7680
8305
  "name": "_warningLogged",
@@ -8018,10 +8643,22 @@
8018
8643
  "description": "",
8019
8644
  "name": "LightDomController",
8020
8645
  "members": [
8646
+ {
8647
+ "kind": "field",
8648
+ "name": "container",
8649
+ "type": {
8650
+ "text": "HTMLElement"
8651
+ },
8652
+ "privacy": "private"
8653
+ },
8021
8654
  {
8022
8655
  "kind": "method",
8023
8656
  "name": "hostUpdated"
8024
8657
  },
8658
+ {
8659
+ "kind": "method",
8660
+ "name": "hostDisconnected"
8661
+ },
8025
8662
  {
8026
8663
  "kind": "field",
8027
8664
  "name": "host",
@@ -8059,7 +8696,7 @@
8059
8696
  "kind": "field",
8060
8697
  "name": "renderHook",
8061
8698
  "type": {
8062
- "text": "HTMLElement"
8699
+ "text": "Comment"
8063
8700
  },
8064
8701
  "privacy": "private"
8065
8702
  },
@@ -8115,10 +8752,6 @@
8115
8752
  "name": "options",
8116
8753
  "default": "options"
8117
8754
  },
8118
- {
8119
- "kind": "field",
8120
- "name": "slot"
8121
- },
8122
8755
  {
8123
8756
  "kind": "field",
8124
8757
  "name": "hasContent",
@@ -8190,6 +8823,68 @@
8190
8823
  }
8191
8824
  ]
8192
8825
  },
8826
+ {
8827
+ "kind": "javascript-module",
8828
+ "path": "src/common/controllers/PortalController.ts",
8829
+ "declarations": [
8830
+ {
8831
+ "kind": "class",
8832
+ "description": "",
8833
+ "name": "PortalController",
8834
+ "members": [
8835
+ {
8836
+ "kind": "field",
8837
+ "name": "renderHook",
8838
+ "type": {
8839
+ "text": "Comment"
8840
+ },
8841
+ "privacy": "private"
8842
+ },
8843
+ {
8844
+ "kind": "field",
8845
+ "name": "lightDom",
8846
+ "type": {
8847
+ "text": "LightDomController"
8848
+ },
8849
+ "privacy": "private",
8850
+ "default": "new LightDomController(host, {\n render: () => this.options.render.call(host),\n container: options.outlet,\n renderOptions: {\n renderBefore: this.renderHook,\n host,\n },\n })"
8851
+ },
8852
+ {
8853
+ "kind": "method",
8854
+ "name": "hostConnected"
8855
+ },
8856
+ {
8857
+ "kind": "method",
8858
+ "name": "hostUpdated"
8859
+ },
8860
+ {
8861
+ "kind": "method",
8862
+ "name": "hostDisconnected"
8863
+ },
8864
+ {
8865
+ "kind": "field",
8866
+ "name": "host",
8867
+ "default": "host"
8868
+ },
8869
+ {
8870
+ "kind": "field",
8871
+ "name": "options",
8872
+ "default": "options"
8873
+ }
8874
+ ]
8875
+ }
8876
+ ],
8877
+ "exports": [
8878
+ {
8879
+ "kind": "js",
8880
+ "name": "PortalController",
8881
+ "declaration": {
8882
+ "name": "PortalController",
8883
+ "module": "src/common/controllers/PortalController.ts"
8884
+ }
8885
+ }
8886
+ ]
8887
+ },
8193
8888
  {
8194
8889
  "kind": "javascript-module",
8195
8890
  "path": "src/common/controllers/ShortcutController.ts",