@nordhealth/components 1.0.0-alpha.53 → 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.
@@ -283,177 +283,179 @@
283
283
  },
284
284
  {
285
285
  "kind": "javascript-module",
286
- "path": "src/button/Button.ts",
286
+ "path": "src/card/Card.ts",
287
287
  "declarations": [
288
288
  {
289
289
  "kind": "class",
290
- "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.",
291
- "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",
292
292
  "slots": [
293
293
  {
294
- "description": "The button content",
294
+ "description": "The card content.",
295
295
  "name": ""
296
296
  },
297
297
  {
298
- "description": "Used to place content before button text. Typically used for icons.",
299
- "name": "before"
298
+ "description": "Optional slot that holds a header for the card.",
299
+ "name": "header"
300
300
  },
301
301
  {
302
- "description": "Used to place content after button text. Typically used for icons.",
303
- "name": "after"
302
+ "description": "Optional slot that holds footer content for the card.",
303
+ "name": "footer"
304
304
  }
305
305
  ],
306
306
  "members": [
307
307
  {
308
308
  "kind": "field",
309
- "name": "buttonRef",
310
- "privacy": "private"
309
+ "name": "headerSlot",
310
+ "privacy": "private",
311
+ "default": "new SlotController(this, \"header\")"
311
312
  },
312
313
  {
313
314
  "kind": "field",
314
- "name": "lightDom",
315
+ "name": "footerSlot",
315
316
  "privacy": "private",
316
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
317
+ "default": "new SlotController(this, \"footer\")"
317
318
  },
318
319
  {
319
320
  "kind": "field",
320
- "name": "variant",
321
+ "name": "padding",
321
322
  "type": {
322
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
323
+ "text": "\"m\" | \"l\" | \"none\""
323
324
  },
324
- "default": "\"default\"",
325
- "description": "The style variant of the button.",
326
- "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",
327
328
  "reflects": true
328
329
  },
329
330
  {
330
331
  "kind": "field",
331
- "name": "type",
332
+ "name": "_warningLogged",
332
333
  "type": {
333
- "text": "\"button\" | \"submit\" | \"reset\""
334
+ "text": "boolean"
334
335
  },
335
- "default": "\"submit\"",
336
- "description": "The type of the button.",
337
- "attribute": "type",
338
- "reflects": true
339
- },
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": [
340
346
  {
341
- "kind": "field",
342
- "name": "size",
347
+ "name": "padding",
343
348
  "type": {
344
- "text": "\"s\" | \"m\" | \"l\""
349
+ "text": "\"m\" | \"l\" | \"none\""
345
350
  },
346
351
  "default": "\"m\"",
347
- "description": "The size of the button.\nThis affects font-size and padding.",
348
- "attribute": "size",
349
- "reflects": true
350
- },
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": [
351
357
  {
352
- "kind": "field",
353
- "name": "href",
354
- "type": {
355
- "text": "string | undefined"
356
- },
357
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
358
- "attribute": "href",
359
- "reflects": true
360
- },
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": [
361
401
  {
362
402
  "kind": "field",
363
- "name": "download",
403
+ "name": "dialogLabelId",
364
404
  "type": {
365
- "text": "boolean"
405
+ "text": "string"
366
406
  },
367
- "default": "false",
368
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
369
- "attribute": "download"
407
+ "privacy": "private",
408
+ "default": "\"dialog-header\""
370
409
  },
371
410
  {
372
411
  "kind": "field",
373
- "name": "target",
412
+ "name": "monthSelectNode",
374
413
  "type": {
375
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
414
+ "text": "HTMLElement"
376
415
  },
377
- "default": "\"_self\"",
378
- "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.",
379
- "attribute": "target",
380
- "reflects": true
416
+ "privacy": "private"
381
417
  },
382
418
  {
383
419
  "kind": "field",
384
- "name": "expand",
420
+ "name": "focusedDayNode",
385
421
  "type": {
386
- "text": "boolean"
422
+ "text": "HTMLButtonElement"
387
423
  },
388
- "default": "false",
389
- "description": "Controls whether the button expands to fill the width of its container.",
390
- "attribute": "expand",
391
- "reflects": true
424
+ "privacy": "private"
392
425
  },
393
426
  {
394
- "kind": "method",
395
- "name": "renderLink",
427
+ "kind": "field",
428
+ "name": "direction",
396
429
  "privacy": "private",
397
- "parameters": [
398
- {
399
- "name": "innards",
400
- "type": {
401
- "text": "TemplateResult"
402
- }
403
- }
404
- ],
405
- "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."
430
+ "default": "new DirectionController(this)"
406
431
  },
407
432
  {
408
- "kind": "method",
409
- "name": "renderButton",
433
+ "kind": "field",
434
+ "name": "swipe",
410
435
  "privacy": "private",
411
- "parameters": [
412
- {
413
- "name": "innards",
414
- "type": {
415
- "text": "TemplateResult"
416
- }
417
- }
418
- ]
419
- },
420
- {
421
- "kind": "method",
422
- "name": "renderLightDom",
423
- "privacy": "private"
436
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
424
437
  },
425
438
  {
426
- "kind": "method",
427
- "name": "handleClick",
439
+ "kind": "field",
440
+ "name": "shortcuts",
428
441
  "privacy": "private"
429
442
  },
430
443
  {
431
444
  "kind": "field",
432
- "name": "disabled",
445
+ "name": "dateFormatShort",
433
446
  "type": {
434
- "text": "boolean"
447
+ "text": "Intl.DateTimeFormat"
435
448
  },
436
- "default": "false",
437
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
438
- "attribute": "disabled",
439
- "reflects": true,
440
- "inheritedFrom": {
441
- "name": "InputMixin",
442
- "module": "src/common/mixins/InputMixin.ts"
443
- }
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"
444
451
  },
445
452
  {
446
453
  "kind": "field",
447
- "name": "name",
454
+ "name": "localization",
448
455
  "type": {
449
- "text": "string | undefined"
456
+ "text": "CalendarLocalizedText"
450
457
  },
451
- "description": "The name of the form component.",
452
- "attribute": "name",
453
- "inheritedFrom": {
454
- "name": "InputMixin",
455
- "module": "src/common/mixins/InputMixin.ts"
456
- }
458
+ "default": "localization"
457
459
  },
458
460
  {
459
461
  "kind": "field",
@@ -462,275 +464,202 @@
462
464
  "text": "string"
463
465
  },
464
466
  "default": "\"\"",
465
- "description": "The value of the form component.",
466
- "attribute": "value",
467
- "inheritedFrom": {
468
- "name": "InputMixin",
469
- "module": "src/common/mixins/InputMixin.ts"
470
- }
467
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
468
+ "attribute": "value"
471
469
  },
472
470
  {
473
471
  "kind": "field",
474
- "name": "form",
475
- "privacy": "protected",
476
- "description": "Gets the form, if any, associated with the form element.",
477
- "inheritedFrom": {
478
- "name": "InputMixin",
479
- "module": "src/common/mixins/InputMixin.ts"
480
- }
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"
481
478
  },
482
479
  {
483
480
  "kind": "field",
484
- "name": "focusableRef",
485
- "privacy": "protected",
486
- "inheritedFrom": {
487
- "name": "FocusableMixin",
488
- "module": "src/common/mixins/FocusableMixin.ts"
489
- }
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"
490
488
  },
491
489
  {
492
- "kind": "method",
493
- "name": "focus",
494
- "parameters": [
495
- {
496
- "name": "options",
497
- "optional": true,
498
- "type": {
499
- "text": "FocusOptions"
500
- },
501
- "description": "An object which controls aspects of the focusing process."
502
- }
503
- ],
504
- "description": "Programmatically move focus to the component.",
505
- "inheritedFrom": {
506
- "name": "FocusableMixin",
507
- "module": "src/common/mixins/FocusableMixin.ts"
508
- }
509
- },
510
- {
511
- "kind": "method",
512
- "name": "blur",
513
- "description": "Programmatically remove focus from the component.",
514
- "inheritedFrom": {
515
- "name": "FocusableMixin",
516
- "module": "src/common/mixins/FocusableMixin.ts"
517
- }
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"
518
498
  },
519
499
  {
520
- "kind": "method",
521
- "name": "click",
522
- "description": "Programmatically simulates a click on the component.",
523
- "inheritedFrom": {
524
- "name": "FocusableMixin",
525
- "module": "src/common/mixins/FocusableMixin.ts"
526
- }
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."
527
507
  },
528
508
  {
529
509
  "kind": "field",
530
- "name": "_warningLogged",
510
+ "name": "activeFocus",
531
511
  "type": {
532
512
  "text": "boolean"
533
513
  },
534
514
  "privacy": "private",
535
- "static": true,
536
- "default": "false",
537
- "inheritedFrom": {
538
- "name": "DraftComponentMixin",
539
- "module": "src/common/mixins/DraftComponentMixin.ts"
540
- }
541
- }
542
- ],
543
- "attributes": [
544
- {
545
- "name": "variant",
546
- "type": {
547
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
548
- },
549
- "default": "\"default\"",
550
- "description": "The style variant of the button.",
551
- "fieldName": "variant"
515
+ "default": "false"
552
516
  },
553
517
  {
554
- "name": "type",
555
- "type": {
556
- "text": "\"button\" | \"submit\" | \"reset\""
557
- },
558
- "default": "\"submit\"",
559
- "description": "The type of the button.",
560
- "fieldName": "type"
518
+ "kind": "field",
519
+ "name": "focusedDay",
520
+ "privacy": "private",
521
+ "default": "new Date()"
561
522
  },
562
523
  {
563
- "name": "size",
564
- "type": {
565
- "text": "\"s\" | \"m\" | \"l\""
566
- },
567
- "default": "\"m\"",
568
- "description": "The size of the button.\nThis affects font-size and padding.",
569
- "fieldName": "size"
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
+ ]
570
535
  },
571
536
  {
572
- "name": "href",
573
- "type": {
574
- "text": "string | undefined"
575
- },
576
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
577
- "fieldName": "href"
537
+ "kind": "method",
538
+ "name": "createDateFormatter",
539
+ "privacy": "private"
578
540
  },
579
541
  {
580
- "name": "download",
581
- "type": {
582
- "text": "boolean"
583
- },
584
- "default": "false",
585
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
586
- "fieldName": "download"
542
+ "kind": "field",
543
+ "name": "handleDaySelect",
544
+ "privacy": "private"
587
545
  },
588
546
  {
589
- "name": "target",
590
- "type": {
591
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
592
- },
593
- "default": "\"_self\"",
594
- "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.",
595
- "fieldName": "target"
547
+ "kind": "method",
548
+ "name": "addDays",
549
+ "privacy": "private",
550
+ "parameters": [
551
+ {
552
+ "name": "days",
553
+ "type": {
554
+ "text": "number"
555
+ }
556
+ }
557
+ ]
596
558
  },
597
559
  {
598
- "name": "expand",
599
- "type": {
600
- "text": "boolean"
601
- },
602
- "default": "false",
603
- "description": "Controls whether the button expands to fill the width of its container.",
604
- "fieldName": "expand"
560
+ "kind": "method",
561
+ "name": "addMonths",
562
+ "privacy": "private",
563
+ "parameters": [
564
+ {
565
+ "name": "months",
566
+ "type": {
567
+ "text": "number"
568
+ }
569
+ }
570
+ ]
605
571
  },
606
572
  {
607
- "name": "disabled",
608
- "type": {
609
- "text": "boolean"
610
- },
611
- "default": "false",
612
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
613
- "fieldName": "disabled",
614
- "inheritedFrom": {
615
- "name": "InputMixin",
616
- "module": "src/common/mixins/InputMixin.ts"
617
- }
573
+ "kind": "method",
574
+ "name": "addYears",
575
+ "privacy": "private",
576
+ "parameters": [
577
+ {
578
+ "name": "years",
579
+ "type": {
580
+ "text": "number"
581
+ }
582
+ }
583
+ ]
618
584
  },
619
585
  {
620
- "name": "name",
621
- "type": {
622
- "text": "string | undefined"
623
- },
624
- "description": "The name of the form component.",
625
- "fieldName": "name",
626
- "inheritedFrom": {
627
- "name": "InputMixin",
628
- "module": "src/common/mixins/InputMixin.ts"
629
- }
586
+ "kind": "method",
587
+ "name": "startOfWeek",
588
+ "privacy": "private"
630
589
  },
631
590
  {
632
- "name": "value",
633
- "type": {
634
- "text": "string"
635
- },
636
- "default": "\"\"",
637
- "description": "The value of the form component.",
638
- "fieldName": "value",
639
- "inheritedFrom": {
640
- "name": "InputMixin",
641
- "module": "src/common/mixins/InputMixin.ts"
642
- }
643
- }
644
- ],
645
- "mixins": [
591
+ "kind": "method",
592
+ "name": "endOfWeek",
593
+ "privacy": "private"
594
+ },
646
595
  {
647
- "name": "InputMixin",
648
- "module": "/src/common/mixins/InputMixin.js"
596
+ "kind": "method",
597
+ "name": "setMonth",
598
+ "privacy": "private",
599
+ "parameters": [
600
+ {
601
+ "name": "month",
602
+ "type": {
603
+ "text": "number"
604
+ }
605
+ }
606
+ ]
649
607
  },
650
608
  {
651
- "name": "FocusableMixin",
652
- "module": "/src/common/mixins/FocusableMixin.js"
609
+ "kind": "method",
610
+ "name": "setYear",
611
+ "privacy": "private",
612
+ "parameters": [
613
+ {
614
+ "name": "year",
615
+ "type": {
616
+ "text": "number"
617
+ }
618
+ }
619
+ ]
653
620
  },
654
621
  {
655
- "name": "DraftComponentMixin",
656
- "module": "/src/common/mixins/DraftComponentMixin.js"
657
- }
658
- ],
659
- "superclass": {
660
- "name": "LitElement",
661
- "package": "lit"
662
- },
663
- "status": "draft",
664
- "category": "action",
665
- "tagName": "nord-button",
666
- "customElement": true
667
- }
668
- ],
669
- "exports": [
670
- {
671
- "kind": "js",
672
- "name": "default",
673
- "declaration": {
674
- "name": "Button",
675
- "module": "src/button/Button.ts"
676
- }
677
- },
678
- {
679
- "kind": "custom-element-definition",
680
- "name": "nord-button",
681
- "declaration": {
682
- "name": "Button",
683
- "module": "src/button/Button.ts"
684
- }
685
- }
686
- ],
687
- "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"
688
- },
689
- {
690
- "kind": "javascript-module",
691
- "path": "src/card/Card.ts",
692
- "declarations": [
693
- {
694
- "kind": "class",
695
- "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.",
696
- "name": "Card",
697
- "slots": [
622
+ "kind": "method",
623
+ "name": "setFocusedDay",
624
+ "privacy": "private",
625
+ "parameters": [
626
+ {
627
+ "name": "day",
628
+ "type": {
629
+ "text": "Date"
630
+ }
631
+ }
632
+ ]
633
+ },
698
634
  {
699
- "description": "The card content.",
700
- "name": ""
635
+ "kind": "field",
636
+ "name": "handleMonthSelect",
637
+ "privacy": "private"
701
638
  },
702
639
  {
703
- "description": "Optional slot that holds a header for the card.",
704
- "name": "header"
640
+ "kind": "field",
641
+ "name": "handleYearSelect",
642
+ "privacy": "private"
705
643
  },
706
644
  {
707
- "description": "Optional slot that holds footer content for the card.",
708
- "name": "footer"
709
- }
710
- ],
711
- "members": [
645
+ "kind": "field",
646
+ "name": "handleNextMonthClick",
647
+ "privacy": "private"
648
+ },
712
649
  {
713
650
  "kind": "field",
714
- "name": "headerSlot",
715
- "privacy": "private",
716
- "default": "new SlotController(this, \"header\")"
651
+ "name": "handlePreviousMonthClick",
652
+ "privacy": "private"
717
653
  },
718
654
  {
719
655
  "kind": "field",
720
- "name": "footerSlot",
721
- "privacy": "private",
722
- "default": "new SlotController(this, \"footer\")"
656
+ "name": "enableActiveFocus",
657
+ "privacy": "private"
723
658
  },
724
659
  {
725
660
  "kind": "field",
726
- "name": "padding",
727
- "type": {
728
- "text": "\"m\" | \"l\" | \"none\""
729
- },
730
- "default": "\"m\"",
731
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
732
- "attribute": "padding",
733
- "reflects": true
661
+ "name": "disableActiveFocus",
662
+ "privacy": "private"
734
663
  },
735
664
  {
736
665
  "kind": "field",
@@ -749,13 +678,39 @@
749
678
  ],
750
679
  "attributes": [
751
680
  {
752
- "name": "padding",
681
+ "name": "value",
753
682
  "type": {
754
- "text": "\"m\" | \"l\" | \"none\""
683
+ "text": "string"
755
684
  },
756
- "default": "\"m\"",
757
- "description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
758
- "fieldName": "padding"
685
+ "default": "\"\"",
686
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
687
+ "fieldName": "value"
688
+ },
689
+ {
690
+ "name": "firstDayOfWeek",
691
+ "type": {
692
+ "text": "DaysOfWeek"
693
+ },
694
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
695
+ "fieldName": "firstDayOfWeek"
696
+ },
697
+ {
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"
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"
759
714
  }
760
715
  ],
761
716
  "mixins": [
@@ -769,8 +724,8 @@
769
724
  "package": "lit"
770
725
  },
771
726
  "status": "draft",
772
- "category": "structure",
773
- "tagName": "nord-card",
727
+ "category": "list",
728
+ "tagName": "nord-calendar",
774
729
  "customElement": true
775
730
  }
776
731
  ],
@@ -779,292 +734,383 @@
779
734
  "kind": "js",
780
735
  "name": "default",
781
736
  "declaration": {
782
- "name": "Card",
783
- "module": "src/card/Card.ts"
737
+ "name": "Calendar",
738
+ "module": "src/calendar/Calendar.ts"
784
739
  }
785
740
  },
786
741
  {
787
742
  "kind": "custom-element-definition",
788
- "name": "nord-card",
743
+ "name": "nord-calendar",
789
744
  "declaration": {
790
- "name": "Card",
791
- "module": "src/card/Card.ts"
745
+ "name": "Calendar",
746
+ "module": "src/calendar/Calendar.ts"
792
747
  }
793
748
  }
794
749
  ],
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 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"
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"
796
751
  },
797
752
  {
798
753
  "kind": "javascript-module",
799
- "path": "src/calendar/Calendar.ts",
754
+ "path": "src/calendar/DateSelectEvent.ts",
800
755
  "declarations": [
801
756
  {
802
757
  "kind": "class",
803
- "description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
804
- "name": "Calendar",
758
+ "description": "",
759
+ "name": "DateSelectEvent",
805
760
  "members": [
806
761
  {
807
762
  "kind": "field",
808
- "name": "dialogLabelId",
763
+ "name": "eventName",
809
764
  "type": {
810
765
  "text": "string"
811
766
  },
812
- "privacy": "private",
813
- "default": "\"dialog-header\""
767
+ "static": true,
768
+ "default": "\"nord-select\""
814
769
  },
815
770
  {
816
771
  "kind": "field",
817
- "name": "monthSelectNode",
772
+ "name": "date",
818
773
  "type": {
819
- "text": "HTMLElement"
774
+ "text": "Date"
820
775
  },
821
- "privacy": "private"
822
- },
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": [
823
830
  {
824
- "kind": "field",
825
- "name": "focusedDayNode",
831
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
826
832
  "type": {
827
- "text": "HTMLButtonElement"
828
- },
829
- "privacy": "private"
830
- },
833
+ "text": "DatePickerDayProps"
834
+ }
835
+ }
836
+ ]
837
+ },
838
+ {
839
+ "kind": "function",
840
+ "name": "monthView",
841
+ "parameters": [
831
842
  {
832
- "kind": "field",
833
- "name": "direction",
834
- "privacy": "private",
835
- "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": ""
836
883
  },
837
884
  {
838
- "kind": "field",
839
- "name": "swipe",
840
- "privacy": "private",
841
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
885
+ "description": "Used to place content before button text. Typically used for icons.",
886
+ "name": "before"
842
887
  },
888
+ {
889
+ "description": "Used to place content after button text. Typically used for icons.",
890
+ "name": "after"
891
+ }
892
+ ],
893
+ "members": [
843
894
  {
844
895
  "kind": "field",
845
- "name": "shortcuts",
896
+ "name": "buttonRef",
846
897
  "privacy": "private"
847
898
  },
848
899
  {
849
900
  "kind": "field",
850
- "name": "dateFormatShort",
851
- "type": {
852
- "text": "Intl.DateTimeFormat"
853
- },
901
+ "name": "lightDom",
854
902
  "privacy": "private",
855
- "description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
903
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
856
904
  },
857
905
  {
858
906
  "kind": "field",
859
- "name": "localization",
907
+ "name": "variant",
860
908
  "type": {
861
- "text": "CalendarLocalizedText"
909
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
862
910
  },
863
- "default": "localization"
911
+ "default": "\"default\"",
912
+ "description": "The style variant of the button.",
913
+ "attribute": "variant",
914
+ "reflects": true
864
915
  },
865
916
  {
866
917
  "kind": "field",
867
- "name": "value",
918
+ "name": "type",
868
919
  "type": {
869
- "text": "string"
920
+ "text": "\"button\" | \"submit\" | \"reset\""
870
921
  },
871
- "default": "\"\"",
872
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
873
- "attribute": "value"
922
+ "default": "\"submit\"",
923
+ "description": "The type of the button.",
924
+ "attribute": "type",
925
+ "reflects": true
874
926
  },
875
927
  {
876
928
  "kind": "field",
877
- "name": "firstDayOfWeek",
929
+ "name": "size",
878
930
  "type": {
879
- "text": "DaysOfWeek"
931
+ "text": "\"s\" | \"m\" | \"l\""
880
932
  },
881
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
882
- "attribute": "firstDayOfWeek"
933
+ "default": "\"m\"",
934
+ "description": "The size of the button.\nThis affects font-size and padding.",
935
+ "attribute": "size",
936
+ "reflects": true
883
937
  },
884
938
  {
885
939
  "kind": "field",
886
- "name": "min",
940
+ "name": "href",
887
941
  "type": {
888
- "text": "string"
942
+ "text": "string | undefined"
889
943
  },
890
- "default": "\"\"",
891
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
892
- "attribute": "min"
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
893
947
  },
894
948
  {
895
949
  "kind": "field",
896
- "name": "max",
950
+ "name": "download",
897
951
  "type": {
898
- "text": "string"
952
+ "text": "boolean"
899
953
  },
900
- "default": "\"\"",
901
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
902
- "attribute": "max"
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"
903
957
  },
904
958
  {
905
959
  "kind": "field",
906
- "name": "isDateDisabled",
960
+ "name": "target",
907
961
  "type": {
908
- "text": "DateDisabledPredicate"
962
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
909
963
  },
910
- "default": "isDateDisabled",
911
- "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
912
968
  },
913
969
  {
914
970
  "kind": "field",
915
- "name": "activeFocus",
971
+ "name": "expand",
916
972
  "type": {
917
973
  "text": "boolean"
918
974
  },
919
- "privacy": "private",
920
- "default": "false"
921
- },
922
- {
923
- "kind": "field",
924
- "name": "focusedDay",
925
- "privacy": "private",
926
- "default": "new Date()"
927
- },
928
- {
929
- "kind": "method",
930
- "name": "focus",
931
- "parameters": [
932
- {
933
- "name": "options",
934
- "optional": true,
935
- "type": {
936
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
937
- }
938
- }
939
- ]
940
- },
941
- {
942
- "kind": "method",
943
- "name": "createDateFormatter",
944
- "privacy": "private"
945
- },
946
- {
947
- "kind": "field",
948
- "name": "handleDaySelect",
949
- "privacy": "private"
950
- },
951
- {
952
- "kind": "method",
953
- "name": "addDays",
954
- "privacy": "private",
955
- "parameters": [
956
- {
957
- "name": "days",
958
- "type": {
959
- "text": "number"
960
- }
961
- }
962
- ]
975
+ "default": "false",
976
+ "description": "Controls whether the button expands to fill the width of its container.",
977
+ "attribute": "expand",
978
+ "reflects": true
963
979
  },
964
980
  {
965
981
  "kind": "method",
966
- "name": "addMonths",
982
+ "name": "renderLink",
967
983
  "privacy": "private",
968
984
  "parameters": [
969
985
  {
970
- "name": "months",
986
+ "name": "innards",
971
987
  "type": {
972
- "text": "number"
988
+ "text": "TemplateResult"
973
989
  }
974
990
  }
975
- ]
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."
976
993
  },
977
994
  {
978
995
  "kind": "method",
979
- "name": "addYears",
996
+ "name": "renderButton",
980
997
  "privacy": "private",
981
998
  "parameters": [
982
999
  {
983
- "name": "years",
1000
+ "name": "innards",
984
1001
  "type": {
985
- "text": "number"
1002
+ "text": "TemplateResult"
986
1003
  }
987
1004
  }
988
1005
  ]
989
1006
  },
990
1007
  {
991
1008
  "kind": "method",
992
- "name": "startOfWeek",
1009
+ "name": "renderLightDom",
993
1010
  "privacy": "private"
994
1011
  },
995
1012
  {
996
1013
  "kind": "method",
997
- "name": "endOfWeek",
1014
+ "name": "handleClick",
998
1015
  "privacy": "private"
999
1016
  },
1000
1017
  {
1001
- "kind": "method",
1002
- "name": "setMonth",
1003
- "privacy": "private",
1004
- "parameters": [
1005
- {
1006
- "name": "month",
1007
- "type": {
1008
- "text": "number"
1009
- }
1010
- }
1011
- ]
1012
- },
1013
- {
1014
- "kind": "method",
1015
- "name": "setYear",
1016
- "privacy": "private",
1017
- "parameters": [
1018
- {
1019
- "name": "year",
1020
- "type": {
1021
- "text": "number"
1022
- }
1023
- }
1024
- ]
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
+ }
1025
1031
  },
1026
1032
  {
1027
- "kind": "method",
1028
- "name": "setFocusedDay",
1029
- "privacy": "private",
1030
- "parameters": [
1031
- {
1032
- "name": "day",
1033
- "type": {
1034
- "text": "Date"
1035
- }
1036
- }
1037
- ]
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
+ }
1038
1044
  },
1039
1045
  {
1040
1046
  "kind": "field",
1041
- "name": "handleMonthSelect",
1042
- "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
+ }
1043
1058
  },
1044
1059
  {
1045
1060
  "kind": "field",
1046
- "name": "handleYearSelect",
1047
- "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
+ }
1048
1068
  },
1049
1069
  {
1050
1070
  "kind": "field",
1051
- "name": "handleNextMonthClick",
1052
- "privacy": "private"
1071
+ "name": "focusableRef",
1072
+ "privacy": "protected",
1073
+ "inheritedFrom": {
1074
+ "name": "FocusableMixin",
1075
+ "module": "src/common/mixins/FocusableMixin.ts"
1076
+ }
1053
1077
  },
1054
1078
  {
1055
- "kind": "field",
1056
- "name": "handlePreviousMonthClick",
1057
- "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
+ }
1058
1096
  },
1059
1097
  {
1060
- "kind": "field",
1061
- "name": "enableActiveFocus",
1062
- "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
+ }
1063
1105
  },
1064
1106
  {
1065
- "kind": "field",
1066
- "name": "disableActiveFocus",
1067
- "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
+ }
1068
1114
  },
1069
1115
  {
1070
1116
  "kind": "field",
@@ -1083,42 +1129,115 @@
1083
1129
  ],
1084
1130
  "attributes": [
1085
1131
  {
1086
- "name": "value",
1132
+ "name": "variant",
1087
1133
  "type": {
1088
- "text": "string"
1134
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
1089
1135
  },
1090
- "default": "\"\"",
1091
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1092
- "fieldName": "value"
1136
+ "default": "\"default\"",
1137
+ "description": "The style variant of the button.",
1138
+ "fieldName": "variant"
1093
1139
  },
1094
1140
  {
1095
- "name": "firstDayOfWeek",
1141
+ "name": "type",
1096
1142
  "type": {
1097
- "text": "DaysOfWeek"
1143
+ "text": "\"button\" | \"submit\" | \"reset\""
1098
1144
  },
1099
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1100
- "fieldName": "firstDayOfWeek"
1145
+ "default": "\"submit\"",
1146
+ "description": "The type of the button.",
1147
+ "fieldName": "type"
1101
1148
  },
1102
1149
  {
1103
- "name": "min",
1150
+ "name": "size",
1104
1151
  "type": {
1105
- "text": "string"
1152
+ "text": "\"s\" | \"m\" | \"l\""
1106
1153
  },
1107
- "default": "\"\"",
1108
- "description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
1109
- "fieldName": "min"
1154
+ "default": "\"m\"",
1155
+ "description": "The size of the button.\nThis affects font-size and padding.",
1156
+ "fieldName": "size"
1110
1157
  },
1111
1158
  {
1112
- "name": "max",
1159
+ "name": "href",
1160
+ "type": {
1161
+ "text": "string | undefined"
1162
+ },
1163
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1164
+ "fieldName": "href"
1165
+ },
1166
+ {
1167
+ "name": "download",
1168
+ "type": {
1169
+ "text": "boolean"
1170
+ },
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"
1174
+ },
1175
+ {
1176
+ "name": "target",
1177
+ "type": {
1178
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1179
+ },
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"
1183
+ },
1184
+ {
1185
+ "name": "expand",
1186
+ "type": {
1187
+ "text": "boolean"
1188
+ },
1189
+ "default": "false",
1190
+ "description": "Controls whether the button expands to fill the width of its container.",
1191
+ "fieldName": "expand"
1192
+ },
1193
+ {
1194
+ "name": "disabled",
1195
+ "type": {
1196
+ "text": "boolean"
1197
+ },
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",
1201
+ "inheritedFrom": {
1202
+ "name": "InputMixin",
1203
+ "module": "src/common/mixins/InputMixin.ts"
1204
+ }
1205
+ },
1206
+ {
1207
+ "name": "name",
1208
+ "type": {
1209
+ "text": "string | undefined"
1210
+ },
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",
1113
1220
  "type": {
1114
1221
  "text": "string"
1115
1222
  },
1116
1223
  "default": "\"\"",
1117
- "description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
1118
- "fieldName": "max"
1224
+ "description": "The value of the form component.",
1225
+ "fieldName": "value",
1226
+ "inheritedFrom": {
1227
+ "name": "InputMixin",
1228
+ "module": "src/common/mixins/InputMixin.ts"
1229
+ }
1119
1230
  }
1120
1231
  ],
1121
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
+ },
1122
1241
  {
1123
1242
  "name": "DraftComponentMixin",
1124
1243
  "module": "/src/common/mixins/DraftComponentMixin.js"
@@ -1129,8 +1248,8 @@
1129
1248
  "package": "lit"
1130
1249
  },
1131
1250
  "status": "draft",
1132
- "category": "list",
1133
- "tagName": "nord-calendar",
1251
+ "category": "action",
1252
+ "tagName": "nord-button",
1134
1253
  "customElement": true
1135
1254
  }
1136
1255
  ],
@@ -1139,139 +1258,20 @@
1139
1258
  "kind": "js",
1140
1259
  "name": "default",
1141
1260
  "declaration": {
1142
- "name": "Calendar",
1143
- "module": "src/calendar/Calendar.ts"
1261
+ "name": "Button",
1262
+ "module": "src/button/Button.ts"
1144
1263
  }
1145
1264
  },
1146
1265
  {
1147
1266
  "kind": "custom-element-definition",
1148
- "name": "nord-calendar",
1149
- "declaration": {
1150
- "name": "Calendar",
1151
- "module": "src/calendar/Calendar.ts"
1152
- }
1153
- }
1154
- ],
1155
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1156
- },
1157
- {
1158
- "kind": "javascript-module",
1159
- "path": "src/calendar/DateSelectEvent.ts",
1160
- "declarations": [
1161
- {
1162
- "kind": "class",
1163
- "description": "",
1164
- "name": "DateSelectEvent",
1165
- "members": [
1166
- {
1167
- "kind": "field",
1168
- "name": "eventName",
1169
- "type": {
1170
- "text": "string"
1171
- },
1172
- "static": true,
1173
- "default": "\"nord-select\""
1174
- },
1175
- {
1176
- "kind": "field",
1177
- "name": "date",
1178
- "type": {
1179
- "text": "Date"
1180
- },
1181
- "default": "date"
1182
- }
1183
- ],
1184
- "superclass": {
1185
- "name": "NordEvent",
1186
- "module": "/src/common/events.js"
1187
- }
1188
- }
1189
- ],
1190
- "exports": [
1191
- {
1192
- "kind": "js",
1193
- "name": "DateSelectEvent",
1194
- "declaration": {
1195
- "name": "DateSelectEvent",
1196
- "module": "src/calendar/DateSelectEvent.ts"
1197
- }
1198
- }
1199
- ],
1200
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1201
- },
1202
- {
1203
- "kind": "javascript-module",
1204
- "path": "src/calendar/calendar-localization.ts",
1205
- "declarations": [
1206
- {
1207
- "kind": "variable",
1208
- "name": "localization",
1209
- "type": {
1210
- "text": "CalendarLocalizedText"
1211
- },
1212
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n calendarHeading: \"Choose a date\",\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n locale: \"en-GB\",\n}"
1213
- }
1214
- ],
1215
- "exports": [
1216
- {
1217
- "kind": "js",
1218
- "name": "default",
1219
- "declaration": {
1220
- "name": "localization",
1221
- "module": "src/calendar/calendar-localization.ts"
1222
- }
1223
- }
1224
- ],
1225
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1226
- },
1227
- {
1228
- "kind": "javascript-module",
1229
- "path": "src/calendar/month-view.ts",
1230
- "declarations": [
1231
- {
1232
- "kind": "function",
1233
- "name": "dayView",
1234
- "parameters": [
1235
- {
1236
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1237
- "type": {
1238
- "text": "DatePickerDayProps"
1239
- }
1240
- }
1241
- ]
1242
- },
1243
- {
1244
- "kind": "function",
1245
- "name": "monthView",
1246
- "parameters": [
1247
- {
1248
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n localization,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1249
- "type": {
1250
- "text": "MonthViewArgs"
1251
- }
1252
- }
1253
- ]
1254
- }
1255
- ],
1256
- "exports": [
1257
- {
1258
- "kind": "js",
1259
- "name": "dayView",
1260
- "declaration": {
1261
- "name": "dayView",
1262
- "module": "src/calendar/month-view.ts"
1263
- }
1264
- },
1265
- {
1266
- "kind": "js",
1267
- "name": "monthView",
1267
+ "name": "nord-button",
1268
1268
  "declaration": {
1269
- "name": "monthView",
1270
- "module": "src/calendar/month-view.ts"
1269
+ "name": "Button",
1270
+ "module": "src/button/Button.ts"
1271
1271
  }
1272
1272
  }
1273
1273
  ],
1274
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
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"
1275
1275
  },
1276
1276
  {
1277
1277
  "kind": "javascript-module",