@nordhealth/components 2.6.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/custom-elements.json +1353 -930
  2. package/lib/Avatar.js +1 -1
  3. package/lib/Avatar.js.map +1 -1
  4. package/lib/Badge.js +1 -1
  5. package/lib/Banner.js +1 -1
  6. package/lib/Button.js +1 -1
  7. package/lib/Button.js.map +1 -1
  8. package/lib/{Calendar-49dc5248.js → Calendar-1cdf8429.js} +2 -2
  9. package/lib/{Calendar-49dc5248.js.map → Calendar-1cdf8429.js.map} +1 -1
  10. package/lib/Calendar.js +1 -1
  11. package/lib/Card.js +1 -1
  12. package/lib/Checkbox.js +1 -1
  13. package/lib/CommandMenu.js +1 -1
  14. package/lib/CommandMenu.js.map +1 -1
  15. package/lib/CommandMenuAction.js +1 -1
  16. package/lib/{Component-49a41387.js → Component-92eb6234.js} +2 -2
  17. package/lib/Component-92eb6234.js.map +1 -0
  18. package/lib/DatePicker.js +1 -1
  19. package/lib/DatePicker.js.map +1 -1
  20. package/lib/Divider.js +1 -1
  21. package/lib/DraftComponentMixin-9e4b7b34.js +2 -0
  22. package/lib/DraftComponentMixin-9e4b7b34.js.map +1 -0
  23. package/lib/Drawer.js +1 -1
  24. package/lib/Drawer.js.map +1 -1
  25. package/lib/Dropdown.js +1 -1
  26. package/lib/Dropdown.js.map +1 -1
  27. package/lib/DropdownGroup.js +1 -1
  28. package/lib/DropdownItem.js +1 -1
  29. package/lib/EmptyState.js +1 -1
  30. package/lib/Fieldset.js +1 -1
  31. package/lib/FocusableMixin-34870ed3.js +2 -0
  32. package/lib/FocusableMixin-34870ed3.js.map +1 -0
  33. package/lib/{FormAssociatedMixin-f6e5b3cd.js → FormAssociatedMixin-3cc6e83b.js} +2 -2
  34. package/lib/{FormAssociatedMixin-f6e5b3cd.js.map → FormAssociatedMixin-3cc6e83b.js.map} +1 -1
  35. package/lib/{FormField-72062bf1.js → FormField-081da729.js} +2 -2
  36. package/lib/FormField-081da729.js.map +1 -0
  37. package/lib/Header.js +1 -1
  38. package/lib/Header.js.map +1 -1
  39. package/lib/Icon.js +1 -1
  40. package/lib/Input.js +1 -1
  41. package/lib/Layout.js +1 -1
  42. package/lib/Layout.js.map +1 -1
  43. package/lib/{LightDomController-9a6e398f.js → LightDomController-3c726b20.js} +2 -2
  44. package/lib/{LightDomController-9a6e398f.js.map → LightDomController-3c726b20.js.map} +1 -1
  45. package/lib/LocalizeController.js +1 -1
  46. package/lib/LocalizeController.js.map +1 -1
  47. package/lib/Modal.js +1 -1
  48. package/lib/Modal.js.map +1 -1
  49. package/lib/NavGroup.js +1 -1
  50. package/lib/NavItem.js +1 -1
  51. package/lib/NavToggle.js +2 -0
  52. package/lib/NavToggle.js.map +1 -0
  53. package/lib/Navigation.js +1 -1
  54. package/lib/Popout-08f11a8d.js +2 -0
  55. package/lib/Popout-08f11a8d.js.map +1 -0
  56. package/lib/Popout.js +1 -1
  57. package/lib/Popout.js.map +1 -1
  58. package/lib/ProgressBar.js +1 -1
  59. package/lib/Qrcode.js +1 -1
  60. package/lib/Radio.js +1 -1
  61. package/lib/Select.js +1 -1
  62. package/lib/Select.js.map +1 -1
  63. package/lib/Skeleton.js +1 -1
  64. package/lib/Spinner.js +1 -1
  65. package/lib/Stack.js +1 -1
  66. package/lib/Tab.js +1 -1
  67. package/lib/TabGroup.js +1 -1
  68. package/lib/TabPanel.js +1 -1
  69. package/lib/Table.js +1 -1
  70. package/lib/{TextField-94b0839b.js → TextField-a7382912.js} +2 -2
  71. package/lib/{TextField-94b0839b.js.map → TextField-a7382912.js.map} +1 -1
  72. package/lib/Textarea.js +1 -1
  73. package/lib/Toast.js +1 -1
  74. package/lib/ToastGroup.js +1 -1
  75. package/lib/Toggle.js +1 -1
  76. package/lib/Tooltip.js +1 -1
  77. package/lib/Tooltip.js.map +1 -1
  78. package/lib/VisuallyHidden.js +1 -1
  79. package/lib/bundle.js +6 -6
  80. package/lib/bundle.js.map +1 -1
  81. package/lib/{class-map-cd6c8cbd.js → class-map-949b7d3b.js} +2 -2
  82. package/lib/{class-map-cd6c8cbd.js.map → class-map-949b7d3b.js.map} +1 -1
  83. package/lib/cond-338158e9.js +2 -0
  84. package/lib/{cond-0a8d4554.js.map → cond-338158e9.js.map} +1 -1
  85. package/lib/en-us.js +1 -1
  86. package/lib/en-us.js.map +1 -1
  87. package/lib/fi-fi.js +1 -1
  88. package/lib/fi-fi.js.map +1 -1
  89. package/lib/{if-defined-f43b1487.js → if-defined-4598a996.js} +2 -2
  90. package/lib/{if-defined-f43b1487.js.map → if-defined-4598a996.js.map} +1 -1
  91. package/lib/index.js +1 -1
  92. package/lib/{lit-element-79bc2e0e.js → lit-element-9178eae5.js} +3 -3
  93. package/lib/{lit-element-79bc2e0e.js.map → lit-element-9178eae5.js.map} +1 -1
  94. package/lib/localization5.js +2 -0
  95. package/lib/localization5.js.map +1 -0
  96. package/lib/month-view.js +1 -1
  97. package/lib/positioning-3bbd3548.js.map +1 -1
  98. package/lib/{ref-697b28b5.js → ref-0e619221.js} +3 -3
  99. package/lib/{ref-697b28b5.js.map → ref-0e619221.js.map} +1 -1
  100. package/lib/repeat-ae6f075f.js +7 -0
  101. package/lib/{repeat-e7acc0bd.js.map → repeat-ae6f075f.js.map} +1 -1
  102. package/lib/src/avatar/Avatar.d.ts +7 -1
  103. package/lib/src/button/Button.test.d.ts +1 -0
  104. package/lib/src/common/mixins/FloatingComponentMixin.d.ts +11 -0
  105. package/lib/src/common/positioning.d.ts +2 -1
  106. package/lib/src/dropdown/Dropdown.d.ts +3 -21
  107. package/lib/src/index.d.ts +1 -0
  108. package/lib/src/layout/Layout.d.ts +6 -0
  109. package/lib/src/layout/Layout.test.d.ts +1 -0
  110. package/lib/src/localization/en-us.d.ts +3 -0
  111. package/lib/src/nav-toggle/NavToggle.d.ts +24 -0
  112. package/lib/src/nav-toggle/NavToggle.test.d.ts +2 -0
  113. package/lib/src/nav-toggle/localization.d.ts +4 -0
  114. package/lib/src/popout/Popout.d.ts +9 -20
  115. package/lib/translation.js +1 -1
  116. package/lib/translation.js.map +1 -1
  117. package/lib/{unsafe-html-be8023cd.js → unsafe-html-6be42999.js} +2 -2
  118. package/lib/{unsafe-html-be8023cd.js.map → unsafe-html-6be42999.js.map} +1 -1
  119. package/package.json +2 -2
  120. package/lib/Component-49a41387.js.map +0 -1
  121. package/lib/FocusableMixin-99db12c1.js +0 -2
  122. package/lib/FocusableMixin-99db12c1.js.map +0 -1
  123. package/lib/FormField-72062bf1.js.map +0 -1
  124. package/lib/cond-0a8d4554.js +0 -2
  125. package/lib/repeat-e7acc0bd.js +0 -7
@@ -374,6 +374,14 @@
374
374
  "name": "default",
375
375
  "module": "\"./drawer/Drawer.js\""
376
376
  }
377
+ },
378
+ {
379
+ "kind": "js",
380
+ "name": "NavToggle",
381
+ "declaration": {
382
+ "name": "default",
383
+ "module": "\"./nav-toggle/NavToggle.js\""
384
+ }
377
385
  }
378
386
  ]
379
387
  },
@@ -386,6 +394,11 @@
386
394
  "description": "Avatar is used for showing a thumbnail representation of a user or entity.\nDefault avatar illustration is displayed when no src is specified.",
387
395
  "name": "Avatar",
388
396
  "cssProperties": [
397
+ {
398
+ "description": "Controls the color of the avatar fallback, using [color tokens](/tokens/#color).",
399
+ "name": "--n-avatar-color",
400
+ "default": "var(--n-color-status-highlight)"
401
+ },
389
402
  {
390
403
  "description": "Controls the size of the avatar, using [icon sizing tokens](/tokens/#size).",
391
404
  "name": "--n-avatar-size",
@@ -406,7 +419,7 @@
406
419
  "kind": "field",
407
420
  "name": "size",
408
421
  "type": {
409
- "text": "\"m\" | \"l\" | \"xl\" | \"xxl\""
422
+ "text": "\"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
410
423
  },
411
424
  "default": "\"m\"",
412
425
  "description": "The size of the avatar.",
@@ -433,6 +446,17 @@
433
446
  "description": "The name of the person.",
434
447
  "attribute": "name"
435
448
  },
449
+ {
450
+ "kind": "field",
451
+ "name": "variant",
452
+ "type": {
453
+ "text": "\"default\" | \"square\""
454
+ },
455
+ "default": "\"default\"",
456
+ "description": "The style variant of the avatar.",
457
+ "attribute": "variant",
458
+ "reflects": true
459
+ },
436
460
  {
437
461
  "kind": "method",
438
462
  "name": "handleSrcChange",
@@ -463,7 +487,7 @@
463
487
  {
464
488
  "name": "size",
465
489
  "type": {
466
- "text": "\"m\" | \"l\" | \"xl\" | \"xxl\""
490
+ "text": "\"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
467
491
  },
468
492
  "default": "\"m\"",
469
493
  "description": "The size of the avatar.",
@@ -485,6 +509,15 @@
485
509
  "default": "\"\"",
486
510
  "description": "The name of the person.",
487
511
  "fieldName": "name"
512
+ },
513
+ {
514
+ "name": "variant",
515
+ "type": {
516
+ "text": "\"default\" | \"square\""
517
+ },
518
+ "default": "\"default\"",
519
+ "description": "The style variant of the avatar.",
520
+ "fieldName": "variant"
488
521
  }
489
522
  ],
490
523
  "superclass": {
@@ -521,303 +554,356 @@
521
554
  },
522
555
  {
523
556
  "kind": "javascript-module",
524
- "path": "src/button/Button.ts",
557
+ "path": "src/banner/Banner.ts",
525
558
  "declarations": [
526
559
  {
527
560
  "kind": "class",
528
- "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.",
529
- "name": "Button",
561
+ "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
562
+ "name": "Banner",
530
563
  "cssProperties": [
531
564
  {
532
- "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
533
- "name": "--n-button-border-radius",
534
- "default": "var(--n-border-radius-s)"
535
- },
536
- {
537
- "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
538
- "name": "--n-button-gap",
539
- "default": "var(--n-space-s)"
540
- },
541
- {
542
- "description": "Controls the overlayed gradient background on the button.",
543
- "name": "--n-button-gradient",
544
- "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
545
- },
546
- {
547
- "description": "Controls the background color of the button, using [color tokens](/tokens/#color).",
548
- "name": "--n-button-background-color",
549
- "default": "var(--n-color-button)"
550
- },
551
- {
552
- "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
553
- "name": "--n-button-border-color",
554
- "default": "var(--n-color-border-strong)"
565
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
566
+ "name": "--n-banner-border-radius",
567
+ "default": "var(--n-border-radius)"
555
568
  },
556
569
  {
557
- "description": "Controls the text alignment for the text in the button.",
558
- "name": "--n-button-text-align",
559
- "default": "center"
570
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
571
+ "name": "--n-banner-box-shadow",
572
+ "default": "var(--n-box-shadow-card)"
560
573
  }
561
574
  ],
562
575
  "slots": [
563
576
  {
564
- "description": "The button content",
577
+ "description": "default slot",
565
578
  "name": ""
566
- },
567
- {
568
- "description": "Used to place content at the start of button text. Typically used for icons.",
569
- "name": "start"
570
- },
571
- {
572
- "description": "Used to place content at the end of button text. Typically used for icons.",
573
- "name": "end"
574
579
  }
575
580
  ],
576
581
  "members": [
577
- {
578
- "kind": "field",
579
- "name": "buttonRef",
580
- "privacy": "private"
581
- },
582
- {
583
- "kind": "field",
584
- "name": "events",
585
- "privacy": "private",
586
- "default": "new EventController(this)"
587
- },
588
- {
589
- "kind": "field",
590
- "name": "lightDom",
591
- "privacy": "private",
592
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
593
- },
594
582
  {
595
583
  "kind": "field",
596
584
  "name": "variant",
597
585
  "type": {
598
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
586
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
599
587
  },
600
- "default": "\"default\"",
601
- "description": "The style variant of the button.",
588
+ "default": "\"info\"",
589
+ "description": "The style variant of the banner.",
602
590
  "attribute": "variant",
603
591
  "reflects": true
604
- },
592
+ }
593
+ ],
594
+ "attributes": [
595
+ {
596
+ "name": "variant",
597
+ "type": {
598
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
599
+ },
600
+ "default": "\"info\"",
601
+ "description": "The style variant of the banner.",
602
+ "fieldName": "variant"
603
+ }
604
+ ],
605
+ "superclass": {
606
+ "name": "LitElement",
607
+ "package": "lit"
608
+ },
609
+ "status": "ready",
610
+ "category": "feedback",
611
+ "displayName": null,
612
+ "examples": [],
613
+ "tagName": "nord-banner",
614
+ "customElement": true
615
+ }
616
+ ],
617
+ "exports": [
618
+ {
619
+ "kind": "js",
620
+ "name": "default",
621
+ "declaration": {
622
+ "name": "Banner",
623
+ "module": "src/banner/Banner.ts"
624
+ }
625
+ },
626
+ {
627
+ "kind": "custom-element-definition",
628
+ "name": "nord-banner",
629
+ "declaration": {
630
+ "name": "Banner",
631
+ "module": "src/banner/Banner.ts"
632
+ }
633
+ }
634
+ ],
635
+ "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 this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it 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\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
636
+ },
637
+ {
638
+ "kind": "javascript-module",
639
+ "path": "src/badge/Badge.ts",
640
+ "declarations": [
641
+ {
642
+ "kind": "class",
643
+ "description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
644
+ "name": "Badge",
645
+ "slots": [
646
+ {
647
+ "description": "The badge content.",
648
+ "name": ""
649
+ }
650
+ ],
651
+ "members": [
605
652
  {
606
653
  "kind": "field",
607
654
  "name": "type",
608
655
  "type": {
609
- "text": "\"button\" | \"submit\" | \"reset\""
656
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
610
657
  },
611
- "default": "\"submit\"",
612
- "description": "The type of the button.",
658
+ "default": "\"neutral\"",
659
+ "description": "The type of badge.\nDetermines the background color of the badge.",
613
660
  "attribute": "type",
614
661
  "reflects": true
615
662
  },
616
663
  {
617
664
  "kind": "field",
618
- "name": "size",
665
+ "name": "progress",
619
666
  "type": {
620
- "text": "\"s\" | \"m\" | \"l\""
667
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
621
668
  },
622
- "default": "\"m\"",
623
- "description": "The size of the button.\nThis affects font-size and padding.",
624
- "attribute": "size",
625
- "reflects": true
669
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
670
+ "attribute": "progress"
671
+ }
672
+ ],
673
+ "attributes": [
674
+ {
675
+ "name": "type",
676
+ "type": {
677
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
678
+ },
679
+ "default": "\"neutral\"",
680
+ "description": "The type of badge.\nDetermines the background color of the badge.",
681
+ "fieldName": "type"
626
682
  },
627
683
  {
628
- "kind": "field",
629
- "name": "accessibleExpanded",
684
+ "name": "progress",
630
685
  "type": {
631
- "text": "\"true\" | \"false\" | undefined"
686
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
632
687
  },
633
- "privacy": "private",
634
- "attribute": "aria-expanded"
688
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
689
+ "fieldName": "progress"
690
+ }
691
+ ],
692
+ "superclass": {
693
+ "name": "LitElement",
694
+ "package": "lit"
695
+ },
696
+ "status": "ready",
697
+ "category": "text",
698
+ "displayName": null,
699
+ "examples": [],
700
+ "tagName": "nord-badge",
701
+ "customElement": true
702
+ }
703
+ ],
704
+ "exports": [
705
+ {
706
+ "kind": "js",
707
+ "name": "default",
708
+ "declaration": {
709
+ "name": "Badge",
710
+ "module": "src/badge/Badge.ts"
711
+ }
712
+ },
713
+ {
714
+ "kind": "custom-element-definition",
715
+ "name": "nord-badge",
716
+ "declaration": {
717
+ "name": "Badge",
718
+ "module": "src/badge/Badge.ts"
719
+ }
720
+ }
721
+ ],
722
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
723
+ },
724
+ {
725
+ "kind": "javascript-module",
726
+ "path": "src/calendar/Calendar.ts",
727
+ "declarations": [
728
+ {
729
+ "kind": "class",
730
+ "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.",
731
+ "name": "Calendar",
732
+ "cssProperties": [
733
+ {
734
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
735
+ "name": "--n-calendar-border-radius",
736
+ "default": "var(--n-border-radius)"
635
737
  },
738
+ {
739
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
740
+ "name": "--n-calendar-box-shadow",
741
+ "default": "var(--n-box-shadow-popout)"
742
+ }
743
+ ],
744
+ "members": [
636
745
  {
637
746
  "kind": "field",
638
- "name": "accessibleHasPopup",
747
+ "name": "dialogLabelId",
639
748
  "type": {
640
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
749
+ "text": "string"
641
750
  },
642
751
  "privacy": "private",
643
- "attribute": "aria-haspopup"
752
+ "default": "\"dialog-header\""
644
753
  },
645
754
  {
646
755
  "kind": "field",
647
- "name": "href",
756
+ "name": "monthSelectNode",
648
757
  "type": {
649
- "text": "string | undefined"
758
+ "text": "HTMLElement"
650
759
  },
651
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
652
- "attribute": "href",
653
- "reflects": true
760
+ "privacy": "private"
654
761
  },
655
762
  {
656
763
  "kind": "field",
657
- "name": "download",
764
+ "name": "focusedDayNode",
658
765
  "type": {
659
- "text": "boolean"
766
+ "text": "HTMLButtonElement"
660
767
  },
661
- "default": "false",
662
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
663
- "attribute": "download"
768
+ "privacy": "private"
664
769
  },
665
770
  {
666
771
  "kind": "field",
667
- "name": "target",
668
- "type": {
669
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
670
- },
671
- "default": "\"_self\"",
672
- "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.",
673
- "attribute": "target",
674
- "reflects": true
772
+ "name": "direction",
773
+ "privacy": "private",
774
+ "default": "new DirectionController(this)"
675
775
  },
676
776
  {
677
777
  "kind": "field",
678
- "name": "expand",
679
- "type": {
680
- "text": "boolean"
681
- },
682
- "default": "false",
683
- "description": "Controls whether the button expands to fill the width of its container.",
684
- "attribute": "expand",
685
- "reflects": true
778
+ "name": "swipe",
779
+ "privacy": "private",
780
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
686
781
  },
687
782
  {
688
783
  "kind": "field",
689
- "name": "loading",
690
- "type": {
691
- "text": "boolean"
692
- },
693
- "default": "false",
694
- "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
695
- "attribute": "loading",
696
- "reflects": true
784
+ "name": "shortcuts",
785
+ "privacy": "private"
697
786
  },
698
787
  {
699
- "kind": "method",
700
- "name": "renderLink",
788
+ "kind": "field",
789
+ "name": "localize",
701
790
  "privacy": "private",
702
- "parameters": [
703
- {
704
- "name": "innards",
705
- "type": {
706
- "text": "TemplateResult"
707
- }
708
- }
709
- ],
710
- "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."
791
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
711
792
  },
712
793
  {
713
- "kind": "method",
714
- "name": "renderButton",
794
+ "kind": "field",
795
+ "name": "dateFormatShort",
796
+ "type": {
797
+ "text": "Intl.DateTimeFormat"
798
+ },
715
799
  "privacy": "private",
716
- "parameters": [
717
- {
718
- "name": "innards",
719
- "type": {
720
- "text": "TemplateResult"
721
- }
722
- }
723
- ]
800
+ "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"
724
801
  },
725
802
  {
726
- "kind": "method",
727
- "name": "renderLightDom",
803
+ "kind": "field",
804
+ "name": "monthNames",
805
+ "type": {
806
+ "text": "string[]"
807
+ },
728
808
  "privacy": "private"
729
809
  },
730
810
  {
731
811
  "kind": "field",
732
- "name": "handleOuterClick",
812
+ "name": "monthNamesShort",
813
+ "type": {
814
+ "text": "string[]"
815
+ },
733
816
  "privacy": "private"
734
817
  },
735
818
  {
736
- "kind": "method",
737
- "name": "handleClick",
738
- "privacy": "private",
739
- "parameters": [
740
- {
741
- "name": "e",
742
- "type": {
743
- "text": "Event"
744
- }
745
- }
746
- ]
819
+ "kind": "field",
820
+ "name": "dayNames",
821
+ "type": {
822
+ "text": "string[]"
823
+ },
824
+ "privacy": "private"
747
825
  },
748
826
  {
749
- "kind": "method",
750
- "name": "handleProxyChange",
751
- "privacy": "private",
752
- "parameters": [
753
- {
754
- "name": "e",
755
- "type": {
756
- "text": "Event"
757
- }
758
- }
759
- ],
760
- "description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
827
+ "kind": "field",
828
+ "name": "dayNamesShort",
829
+ "type": {
830
+ "text": "string[]"
831
+ },
832
+ "privacy": "private"
761
833
  },
762
834
  {
763
835
  "kind": "field",
764
- "name": "disabled",
836
+ "name": "value",
765
837
  "type": {
766
- "text": "boolean"
838
+ "text": "string"
767
839
  },
768
- "default": "false",
769
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
770
- "attribute": "disabled",
771
- "reflects": true,
772
- "inheritedFrom": {
773
- "name": "InputMixin",
774
- "module": "src/common/mixins/InputMixin.ts"
775
- }
840
+ "default": "\"\"",
841
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
842
+ "attribute": "value"
776
843
  },
777
844
  {
778
845
  "kind": "field",
779
- "name": "name",
846
+ "name": "firstDayOfWeek",
780
847
  "type": {
781
- "text": "string | undefined"
848
+ "text": "DaysOfWeek"
782
849
  },
783
- "description": "The name of the form component.",
784
- "attribute": "name",
785
- "inheritedFrom": {
786
- "name": "InputMixin",
787
- "module": "src/common/mixins/InputMixin.ts"
788
- }
850
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
851
+ "attribute": "firstDayOfWeek"
789
852
  },
790
853
  {
791
854
  "kind": "field",
792
- "name": "value",
855
+ "name": "min",
793
856
  "type": {
794
857
  "text": "string"
795
858
  },
796
859
  "default": "\"\"",
797
- "description": "The value of the form component.",
798
- "attribute": "value",
799
- "inheritedFrom": {
800
- "name": "InputMixin",
801
- "module": "src/common/mixins/InputMixin.ts"
802
- }
860
+ "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.",
861
+ "attribute": "min"
803
862
  },
804
863
  {
805
864
  "kind": "field",
806
- "name": "form",
807
- "description": "Gets the form, if any, associated with the form element.",
808
- "inheritedFrom": {
809
- "name": "InputMixin",
810
- "module": "src/common/mixins/InputMixin.ts"
811
- }
865
+ "name": "max",
866
+ "type": {
867
+ "text": "string"
868
+ },
869
+ "default": "\"\"",
870
+ "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.",
871
+ "attribute": "max"
812
872
  },
813
873
  {
814
874
  "kind": "field",
815
- "name": "focusableRef",
816
- "privacy": "protected",
817
- "inheritedFrom": {
818
- "name": "FocusableMixin",
819
- "module": "src/common/mixins/FocusableMixin.ts"
820
- }
875
+ "name": "expand",
876
+ "type": {
877
+ "text": "boolean"
878
+ },
879
+ "default": "false",
880
+ "description": "Controls whether the calendar expands to fill the width of its container.",
881
+ "attribute": "expand",
882
+ "reflects": true
883
+ },
884
+ {
885
+ "kind": "field",
886
+ "name": "isDateDisabled",
887
+ "type": {
888
+ "text": "DateDisabledPredicate"
889
+ },
890
+ "default": "isDateDisabled",
891
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
892
+ },
893
+ {
894
+ "kind": "field",
895
+ "name": "activeFocus",
896
+ "type": {
897
+ "text": "boolean"
898
+ },
899
+ "privacy": "private",
900
+ "default": "false"
901
+ },
902
+ {
903
+ "kind": "field",
904
+ "name": "focusedDay",
905
+ "privacy": "private",
906
+ "default": "new Date()"
821
907
  },
822
908
  {
823
909
  "kind": "method",
@@ -827,169 +913,212 @@
827
913
  "name": "options",
828
914
  "optional": true,
829
915
  "type": {
830
- "text": "FocusOptions"
916
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
831
917
  },
832
918
  "description": "An object which controls aspects of the focusing process."
833
919
  }
834
920
  ],
835
- "description": "Programmatically move focus to the component.",
836
- "inheritedFrom": {
837
- "name": "FocusableMixin",
838
- "module": "src/common/mixins/FocusableMixin.ts"
839
- }
921
+ "description": "Programmatically move focus to the calendar."
840
922
  },
841
923
  {
842
924
  "kind": "method",
843
- "name": "blur",
844
- "description": "Programmatically remove focus from the component.",
845
- "inheritedFrom": {
846
- "name": "FocusableMixin",
847
- "module": "src/common/mixins/FocusableMixin.ts"
848
- }
925
+ "name": "handleValueChange",
926
+ "privacy": "protected"
849
927
  },
850
928
  {
851
929
  "kind": "method",
852
- "name": "click",
853
- "description": "Programmatically simulates a click on the component.",
854
- "inheritedFrom": {
855
- "name": "FocusableMixin",
856
- "module": "src/common/mixins/FocusableMixin.ts"
857
- }
858
- }
859
- ],
860
- "attributes": [
861
- {
862
- "name": "variant",
863
- "type": {
864
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
865
- },
866
- "default": "\"default\"",
867
- "description": "The style variant of the button.",
868
- "fieldName": "variant"
930
+ "name": "handleFocusedDayChange",
931
+ "privacy": "protected"
869
932
  },
870
933
  {
871
- "name": "type",
872
- "type": {
873
- "text": "\"button\" | \"submit\" | \"reset\""
874
- },
875
- "default": "\"submit\"",
876
- "description": "The type of the button.",
877
- "fieldName": "type"
934
+ "kind": "method",
935
+ "name": "handleLangChange",
936
+ "privacy": "private"
878
937
  },
879
938
  {
880
- "name": "size",
881
- "type": {
882
- "text": "\"s\" | \"m\" | \"l\""
883
- },
884
- "default": "\"m\"",
885
- "description": "The size of the button.\nThis affects font-size and padding.",
886
- "fieldName": "size"
939
+ "kind": "field",
940
+ "name": "handleDaySelect",
941
+ "privacy": "private"
887
942
  },
888
943
  {
889
- "name": "aria-expanded",
890
- "type": {
891
- "text": "\"true\" | \"false\" | undefined"
892
- },
893
- "fieldName": "accessibleExpanded"
944
+ "kind": "method",
945
+ "name": "addDays",
946
+ "privacy": "private",
947
+ "parameters": [
948
+ {
949
+ "name": "days",
950
+ "type": {
951
+ "text": "number"
952
+ }
953
+ }
954
+ ]
894
955
  },
895
956
  {
896
- "name": "aria-haspopup",
897
- "type": {
898
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
899
- },
900
- "fieldName": "accessibleHasPopup"
957
+ "kind": "method",
958
+ "name": "addMonths",
959
+ "privacy": "private",
960
+ "parameters": [
961
+ {
962
+ "name": "months",
963
+ "type": {
964
+ "text": "number"
965
+ }
966
+ }
967
+ ]
901
968
  },
902
969
  {
903
- "name": "href",
904
- "type": {
905
- "text": "string | undefined"
906
- },
907
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
908
- "fieldName": "href"
970
+ "kind": "method",
971
+ "name": "addYears",
972
+ "privacy": "private",
973
+ "parameters": [
974
+ {
975
+ "name": "years",
976
+ "type": {
977
+ "text": "number"
978
+ }
979
+ }
980
+ ]
909
981
  },
910
982
  {
911
- "name": "download",
912
- "type": {
913
- "text": "boolean"
914
- },
915
- "default": "false",
916
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
917
- "fieldName": "download"
983
+ "kind": "method",
984
+ "name": "startOfWeek",
985
+ "privacy": "private"
918
986
  },
919
987
  {
920
- "name": "target",
988
+ "kind": "method",
989
+ "name": "endOfWeek",
990
+ "privacy": "private"
991
+ },
992
+ {
993
+ "kind": "method",
994
+ "name": "setMonth",
995
+ "privacy": "private",
996
+ "parameters": [
997
+ {
998
+ "name": "month",
999
+ "type": {
1000
+ "text": "number"
1001
+ }
1002
+ }
1003
+ ]
1004
+ },
1005
+ {
1006
+ "kind": "method",
1007
+ "name": "setYear",
1008
+ "privacy": "private",
1009
+ "parameters": [
1010
+ {
1011
+ "name": "year",
1012
+ "type": {
1013
+ "text": "number"
1014
+ }
1015
+ }
1016
+ ]
1017
+ },
1018
+ {
1019
+ "kind": "method",
1020
+ "name": "setFocusedDay",
1021
+ "privacy": "private",
1022
+ "parameters": [
1023
+ {
1024
+ "name": "day",
1025
+ "type": {
1026
+ "text": "Date"
1027
+ }
1028
+ }
1029
+ ]
1030
+ },
1031
+ {
1032
+ "kind": "field",
1033
+ "name": "handleMonthSelect",
1034
+ "privacy": "private"
1035
+ },
1036
+ {
1037
+ "kind": "field",
1038
+ "name": "handleYearSelect",
1039
+ "privacy": "private"
1040
+ },
1041
+ {
1042
+ "kind": "field",
1043
+ "name": "handleNextMonthClick",
1044
+ "privacy": "private"
1045
+ },
1046
+ {
1047
+ "kind": "field",
1048
+ "name": "handlePreviousMonthClick",
1049
+ "privacy": "private"
1050
+ },
1051
+ {
1052
+ "kind": "field",
1053
+ "name": "enableActiveFocus",
1054
+ "privacy": "private"
1055
+ },
1056
+ {
1057
+ "kind": "field",
1058
+ "name": "disableActiveFocus",
1059
+ "privacy": "private"
1060
+ }
1061
+ ],
1062
+ "events": [
1063
+ {
1064
+ "name": "nord-focus-date",
921
1065
  "type": {
922
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1066
+ "text": "DateSelectEvent"
923
1067
  },
924
- "default": "\"_self\"",
925
- "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.",
926
- "fieldName": "target"
1068
+ "description": "Dispatched when the calendar's focused date changes."
927
1069
  },
928
1070
  {
929
- "name": "expand",
930
1071
  "type": {
931
- "text": "boolean"
1072
+ "text": "DateSelectEvent"
932
1073
  },
933
- "default": "false",
934
- "description": "Controls whether the button expands to fill the width of its container.",
935
- "fieldName": "expand"
936
- },
1074
+ "description": "Dispatched when a date is selected and the value changes.",
1075
+ "name": "change"
1076
+ }
1077
+ ],
1078
+ "attributes": [
937
1079
  {
938
- "name": "loading",
1080
+ "name": "value",
939
1081
  "type": {
940
- "text": "boolean"
1082
+ "text": "string"
941
1083
  },
942
- "default": "false",
943
- "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
944
- "fieldName": "loading"
1084
+ "default": "\"\"",
1085
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1086
+ "fieldName": "value"
945
1087
  },
946
1088
  {
947
- "name": "disabled",
1089
+ "name": "firstDayOfWeek",
948
1090
  "type": {
949
- "text": "boolean"
1091
+ "text": "DaysOfWeek"
950
1092
  },
951
- "default": "false",
952
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
953
- "fieldName": "disabled",
954
- "inheritedFrom": {
955
- "name": "InputMixin",
956
- "module": "src/common/mixins/InputMixin.ts"
957
- }
1093
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1094
+ "fieldName": "firstDayOfWeek"
958
1095
  },
959
1096
  {
960
- "name": "name",
1097
+ "name": "min",
961
1098
  "type": {
962
- "text": "string | undefined"
1099
+ "text": "string"
963
1100
  },
964
- "description": "The name of the form component.",
965
- "fieldName": "name",
966
- "inheritedFrom": {
967
- "name": "InputMixin",
968
- "module": "src/common/mixins/InputMixin.ts"
969
- }
1101
+ "default": "\"\"",
1102
+ "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.",
1103
+ "fieldName": "min"
970
1104
  },
971
1105
  {
972
- "name": "value",
1106
+ "name": "max",
973
1107
  "type": {
974
1108
  "text": "string"
975
1109
  },
976
1110
  "default": "\"\"",
977
- "description": "The value of the form component.",
978
- "fieldName": "value",
979
- "inheritedFrom": {
980
- "name": "InputMixin",
981
- "module": "src/common/mixins/InputMixin.ts"
982
- }
983
- }
984
- ],
985
- "mixins": [
986
- {
987
- "name": "InputMixin",
988
- "module": "/src/common/mixins/InputMixin.js"
1111
+ "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.",
1112
+ "fieldName": "max"
989
1113
  },
990
1114
  {
991
- "name": "FocusableMixin",
992
- "module": "/src/common/mixins/FocusableMixin.js"
1115
+ "name": "expand",
1116
+ "type": {
1117
+ "text": "boolean"
1118
+ },
1119
+ "default": "false",
1120
+ "description": "Controls whether the calendar expands to fill the width of its container.",
1121
+ "fieldName": "expand"
993
1122
  }
994
1123
  ],
995
1124
  "superclass": {
@@ -997,10 +1126,10 @@
997
1126
  "package": "lit"
998
1127
  },
999
1128
  "status": "ready",
1000
- "category": "action",
1129
+ "category": "list",
1001
1130
  "displayName": null,
1002
1131
  "examples": [],
1003
- "tagName": "nord-button",
1132
+ "tagName": "nord-calendar",
1004
1133
  "customElement": true
1005
1134
  }
1006
1135
  ],
@@ -1009,169 +1138,275 @@
1009
1138
  "kind": "js",
1010
1139
  "name": "default",
1011
1140
  "declaration": {
1012
- "name": "Button",
1013
- "module": "src/button/Button.ts"
1141
+ "name": "Calendar",
1142
+ "module": "src/calendar/Calendar.ts"
1014
1143
  }
1015
1144
  },
1016
1145
  {
1017
1146
  "kind": "custom-element-definition",
1018
- "name": "nord-button",
1147
+ "name": "nord-calendar",
1019
1148
  "declaration": {
1020
- "name": "Button",
1021
- "module": "src/button/Button.ts"
1149
+ "name": "Calendar",
1150
+ "module": "src/calendar/Calendar.ts"
1022
1151
  }
1023
1152
  }
1024
1153
  ],
1025
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
1154
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Dont use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1026
1155
  },
1027
1156
  {
1028
1157
  "kind": "javascript-module",
1029
- "path": "src/calendar/Calendar.ts",
1158
+ "path": "src/calendar/DateSelectEvent.ts",
1030
1159
  "declarations": [
1031
1160
  {
1032
1161
  "kind": "class",
1033
- "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.",
1034
- "name": "Calendar",
1035
- "cssProperties": [
1036
- {
1037
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1038
- "name": "--n-calendar-border-radius",
1039
- "default": "var(--n-border-radius)"
1040
- },
1041
- {
1042
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1043
- "name": "--n-calendar-box-shadow",
1044
- "default": "var(--n-box-shadow-popout)"
1045
- }
1046
- ],
1047
- "members": [
1162
+ "description": "",
1163
+ "name": "DateSelectEvent",
1164
+ "superclass": {
1165
+ "name": "NordEvent",
1166
+ "module": "/src/common/events.js"
1167
+ },
1168
+ "examples": []
1169
+ }
1170
+ ],
1171
+ "exports": [
1172
+ {
1173
+ "kind": "js",
1174
+ "name": "DateSelectEvent",
1175
+ "declaration": {
1176
+ "name": "DateSelectEvent",
1177
+ "module": "src/calendar/DateSelectEvent.ts"
1178
+ }
1179
+ }
1180
+ ],
1181
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
1182
+ },
1183
+ {
1184
+ "kind": "javascript-module",
1185
+ "path": "src/calendar/localization.ts",
1186
+ "declarations": [
1187
+ {
1188
+ "kind": "variable",
1189
+ "name": "calendarLocalization",
1190
+ "type": {
1191
+ "text": "object"
1192
+ },
1193
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1194
+ }
1195
+ ],
1196
+ "exports": [
1197
+ {
1198
+ "kind": "js",
1199
+ "name": "default",
1200
+ "declaration": {
1201
+ "name": "calendarLocalization",
1202
+ "module": "src/calendar/localization.ts"
1203
+ }
1204
+ }
1205
+ ],
1206
+ "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"
1207
+ },
1208
+ {
1209
+ "kind": "javascript-module",
1210
+ "path": "src/calendar/month-view.ts",
1211
+ "declarations": [
1212
+ {
1213
+ "kind": "function",
1214
+ "name": "dayView",
1215
+ "parameters": [
1048
1216
  {
1049
- "kind": "field",
1050
- "name": "dialogLabelId",
1217
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1051
1218
  "type": {
1052
- "text": "string"
1053
- },
1054
- "privacy": "private",
1055
- "default": "\"dialog-header\""
1056
- },
1219
+ "text": "DatePickerDayProps"
1220
+ }
1221
+ }
1222
+ ]
1223
+ },
1224
+ {
1225
+ "kind": "function",
1226
+ "name": "monthView",
1227
+ "parameters": [
1057
1228
  {
1058
- "kind": "field",
1059
- "name": "monthSelectNode",
1229
+ "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1060
1230
  "type": {
1061
- "text": "HTMLElement"
1062
- },
1063
- "privacy": "private"
1231
+ "text": "MonthViewArgs"
1232
+ }
1233
+ }
1234
+ ]
1235
+ }
1236
+ ],
1237
+ "exports": [
1238
+ {
1239
+ "kind": "js",
1240
+ "name": "dayView",
1241
+ "declaration": {
1242
+ "name": "dayView",
1243
+ "module": "src/calendar/month-view.ts"
1244
+ }
1245
+ },
1246
+ {
1247
+ "kind": "js",
1248
+ "name": "monthView",
1249
+ "declaration": {
1250
+ "name": "monthView",
1251
+ "module": "src/calendar/month-view.ts"
1252
+ }
1253
+ }
1254
+ ],
1255
+ "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"
1256
+ },
1257
+ {
1258
+ "kind": "javascript-module",
1259
+ "path": "src/button/Button.ts",
1260
+ "declarations": [
1261
+ {
1262
+ "kind": "class",
1263
+ "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.",
1264
+ "name": "Button",
1265
+ "cssProperties": [
1266
+ {
1267
+ "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1268
+ "name": "--n-button-border-radius",
1269
+ "default": "var(--n-border-radius-s)"
1064
1270
  },
1065
1271
  {
1066
- "kind": "field",
1067
- "name": "focusedDayNode",
1068
- "type": {
1069
- "text": "HTMLButtonElement"
1070
- },
1071
- "privacy": "private"
1272
+ "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
1273
+ "name": "--n-button-gap",
1274
+ "default": "var(--n-space-s)"
1072
1275
  },
1073
1276
  {
1074
- "kind": "field",
1075
- "name": "direction",
1076
- "privacy": "private",
1077
- "default": "new DirectionController(this)"
1277
+ "description": "Controls the overlayed gradient background on the button.",
1278
+ "name": "--n-button-gradient",
1279
+ "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
1078
1280
  },
1079
1281
  {
1080
- "kind": "field",
1081
- "name": "swipe",
1082
- "privacy": "private",
1083
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1282
+ "description": "Controls the background color of the button, using [color tokens](/tokens/#color).",
1283
+ "name": "--n-button-background-color",
1284
+ "default": "var(--n-color-button)"
1285
+ },
1286
+ {
1287
+ "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
1288
+ "name": "--n-button-border-color",
1289
+ "default": "var(--n-color-border-strong)"
1290
+ },
1291
+ {
1292
+ "description": "Controls the text alignment for the text in the button.",
1293
+ "name": "--n-button-text-align",
1294
+ "default": "center"
1295
+ }
1296
+ ],
1297
+ "slots": [
1298
+ {
1299
+ "description": "The button content",
1300
+ "name": ""
1301
+ },
1302
+ {
1303
+ "description": "Used to place content at the start of button text. Typically used for icons.",
1304
+ "name": "start"
1084
1305
  },
1306
+ {
1307
+ "description": "Used to place content at the end of button text. Typically used for icons.",
1308
+ "name": "end"
1309
+ }
1310
+ ],
1311
+ "members": [
1085
1312
  {
1086
1313
  "kind": "field",
1087
- "name": "shortcuts",
1314
+ "name": "buttonRef",
1088
1315
  "privacy": "private"
1089
1316
  },
1090
1317
  {
1091
1318
  "kind": "field",
1092
- "name": "localize",
1319
+ "name": "events",
1093
1320
  "privacy": "private",
1094
- "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1321
+ "default": "new EventController(this)"
1095
1322
  },
1096
1323
  {
1097
1324
  "kind": "field",
1098
- "name": "dateFormatShort",
1099
- "type": {
1100
- "text": "Intl.DateTimeFormat"
1101
- },
1325
+ "name": "lightDom",
1102
1326
  "privacy": "private",
1103
- "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"
1327
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
1104
1328
  },
1105
1329
  {
1106
1330
  "kind": "field",
1107
- "name": "monthNames",
1331
+ "name": "variant",
1108
1332
  "type": {
1109
- "text": "string[]"
1333
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1110
1334
  },
1111
- "privacy": "private"
1335
+ "default": "\"default\"",
1336
+ "description": "The style variant of the button.",
1337
+ "attribute": "variant",
1338
+ "reflects": true
1112
1339
  },
1113
1340
  {
1114
1341
  "kind": "field",
1115
- "name": "monthNamesShort",
1342
+ "name": "type",
1116
1343
  "type": {
1117
- "text": "string[]"
1344
+ "text": "\"button\" | \"submit\" | \"reset\""
1118
1345
  },
1119
- "privacy": "private"
1346
+ "default": "\"submit\"",
1347
+ "description": "The type of the button.",
1348
+ "attribute": "type",
1349
+ "reflects": true
1120
1350
  },
1121
1351
  {
1122
1352
  "kind": "field",
1123
- "name": "dayNames",
1353
+ "name": "size",
1124
1354
  "type": {
1125
- "text": "string[]"
1355
+ "text": "\"s\" | \"m\" | \"l\""
1126
1356
  },
1127
- "privacy": "private"
1357
+ "default": "\"m\"",
1358
+ "description": "The size of the button.\nThis affects font-size and padding.",
1359
+ "attribute": "size",
1360
+ "reflects": true
1128
1361
  },
1129
1362
  {
1130
1363
  "kind": "field",
1131
- "name": "dayNamesShort",
1364
+ "name": "accessibleExpanded",
1132
1365
  "type": {
1133
- "text": "string[]"
1366
+ "text": "\"true\" | \"false\" | undefined"
1134
1367
  },
1135
- "privacy": "private"
1368
+ "privacy": "private",
1369
+ "attribute": "aria-expanded"
1136
1370
  },
1137
1371
  {
1138
1372
  "kind": "field",
1139
- "name": "value",
1373
+ "name": "accessibleHasPopup",
1140
1374
  "type": {
1141
- "text": "string"
1375
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1142
1376
  },
1143
- "default": "\"\"",
1144
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1145
- "attribute": "value"
1377
+ "privacy": "private",
1378
+ "attribute": "aria-haspopup"
1146
1379
  },
1147
1380
  {
1148
1381
  "kind": "field",
1149
- "name": "firstDayOfWeek",
1382
+ "name": "href",
1150
1383
  "type": {
1151
- "text": "DaysOfWeek"
1384
+ "text": "string | undefined"
1152
1385
  },
1153
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1154
- "attribute": "firstDayOfWeek"
1386
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1387
+ "attribute": "href",
1388
+ "reflects": true
1155
1389
  },
1156
1390
  {
1157
1391
  "kind": "field",
1158
- "name": "min",
1392
+ "name": "download",
1159
1393
  "type": {
1160
- "text": "string"
1394
+ "text": "boolean"
1161
1395
  },
1162
- "default": "\"\"",
1163
- "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.",
1164
- "attribute": "min"
1396
+ "default": "false",
1397
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1398
+ "attribute": "download"
1165
1399
  },
1166
1400
  {
1167
1401
  "kind": "field",
1168
- "name": "max",
1402
+ "name": "target",
1169
1403
  "type": {
1170
- "text": "string"
1404
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1171
1405
  },
1172
- "default": "\"\"",
1173
- "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.",
1174
- "attribute": "max"
1406
+ "default": "\"_self\"",
1407
+ "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.",
1408
+ "attribute": "target",
1409
+ "reflects": true
1175
1410
  },
1176
1411
  {
1177
1412
  "kind": "field",
@@ -1180,431 +1415,316 @@
1180
1415
  "text": "boolean"
1181
1416
  },
1182
1417
  "default": "false",
1183
- "description": "Controls whether the calendar expands to fill the width of its container.",
1418
+ "description": "Controls whether the button expands to fill the width of its container.",
1184
1419
  "attribute": "expand",
1185
1420
  "reflects": true
1186
1421
  },
1187
1422
  {
1188
1423
  "kind": "field",
1189
- "name": "isDateDisabled",
1190
- "type": {
1191
- "text": "DateDisabledPredicate"
1192
- },
1193
- "default": "isDateDisabled",
1194
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1195
- },
1196
- {
1197
- "kind": "field",
1198
- "name": "activeFocus",
1424
+ "name": "loading",
1199
1425
  "type": {
1200
1426
  "text": "boolean"
1201
1427
  },
1202
- "privacy": "private",
1203
- "default": "false"
1204
- },
1205
- {
1206
- "kind": "field",
1207
- "name": "focusedDay",
1208
- "privacy": "private",
1209
- "default": "new Date()"
1210
- },
1211
- {
1212
- "kind": "method",
1213
- "name": "focus",
1214
- "parameters": [
1215
- {
1216
- "name": "options",
1217
- "optional": true,
1218
- "type": {
1219
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1220
- },
1221
- "description": "An object which controls aspects of the focusing process."
1222
- }
1223
- ],
1224
- "description": "Programmatically move focus to the calendar."
1225
- },
1226
- {
1227
- "kind": "method",
1228
- "name": "handleValueChange",
1229
- "privacy": "protected"
1230
- },
1231
- {
1232
- "kind": "method",
1233
- "name": "handleFocusedDayChange",
1234
- "privacy": "protected"
1235
- },
1236
- {
1237
- "kind": "method",
1238
- "name": "handleLangChange",
1239
- "privacy": "private"
1240
- },
1241
- {
1242
- "kind": "field",
1243
- "name": "handleDaySelect",
1244
- "privacy": "private"
1245
- },
1246
- {
1247
- "kind": "method",
1248
- "name": "addDays",
1249
- "privacy": "private",
1250
- "parameters": [
1251
- {
1252
- "name": "days",
1253
- "type": {
1254
- "text": "number"
1255
- }
1256
- }
1257
- ]
1428
+ "default": "false",
1429
+ "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
1430
+ "attribute": "loading",
1431
+ "reflects": true
1258
1432
  },
1259
1433
  {
1260
1434
  "kind": "method",
1261
- "name": "addMonths",
1435
+ "name": "renderLink",
1262
1436
  "privacy": "private",
1263
1437
  "parameters": [
1264
1438
  {
1265
- "name": "months",
1439
+ "name": "innards",
1266
1440
  "type": {
1267
- "text": "number"
1441
+ "text": "TemplateResult"
1268
1442
  }
1269
1443
  }
1270
- ]
1444
+ ],
1445
+ "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."
1271
1446
  },
1272
1447
  {
1273
1448
  "kind": "method",
1274
- "name": "addYears",
1449
+ "name": "renderButton",
1275
1450
  "privacy": "private",
1276
1451
  "parameters": [
1277
1452
  {
1278
- "name": "years",
1453
+ "name": "innards",
1279
1454
  "type": {
1280
- "text": "number"
1455
+ "text": "TemplateResult"
1281
1456
  }
1282
1457
  }
1283
1458
  ]
1284
1459
  },
1285
1460
  {
1286
1461
  "kind": "method",
1287
- "name": "startOfWeek",
1462
+ "name": "renderLightDom",
1288
1463
  "privacy": "private"
1289
1464
  },
1290
1465
  {
1291
- "kind": "method",
1292
- "name": "endOfWeek",
1466
+ "kind": "field",
1467
+ "name": "handleOuterClick",
1293
1468
  "privacy": "private"
1294
1469
  },
1295
1470
  {
1296
1471
  "kind": "method",
1297
- "name": "setMonth",
1298
- "privacy": "private",
1299
- "parameters": [
1300
- {
1301
- "name": "month",
1302
- "type": {
1303
- "text": "number"
1304
- }
1305
- }
1306
- ]
1307
- },
1308
- {
1309
- "kind": "method",
1310
- "name": "setYear",
1472
+ "name": "handleClick",
1311
1473
  "privacy": "private",
1312
1474
  "parameters": [
1313
1475
  {
1314
- "name": "year",
1476
+ "name": "e",
1315
1477
  "type": {
1316
- "text": "number"
1478
+ "text": "Event"
1317
1479
  }
1318
1480
  }
1319
1481
  ]
1320
1482
  },
1321
1483
  {
1322
1484
  "kind": "method",
1323
- "name": "setFocusedDay",
1485
+ "name": "handleProxyChange",
1324
1486
  "privacy": "private",
1325
1487
  "parameters": [
1326
1488
  {
1327
- "name": "day",
1489
+ "name": "e",
1328
1490
  "type": {
1329
- "text": "Date"
1491
+ "text": "Event"
1330
1492
  }
1331
1493
  }
1332
- ]
1494
+ ],
1495
+ "description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
1333
1496
  },
1334
1497
  {
1335
1498
  "kind": "field",
1336
- "name": "handleMonthSelect",
1337
- "privacy": "private"
1499
+ "name": "disabled",
1500
+ "type": {
1501
+ "text": "boolean"
1502
+ },
1503
+ "default": "false",
1504
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1505
+ "attribute": "disabled",
1506
+ "reflects": true,
1507
+ "inheritedFrom": {
1508
+ "name": "InputMixin",
1509
+ "module": "src/common/mixins/InputMixin.ts"
1510
+ }
1338
1511
  },
1339
1512
  {
1340
1513
  "kind": "field",
1341
- "name": "handleYearSelect",
1342
- "privacy": "private"
1514
+ "name": "name",
1515
+ "type": {
1516
+ "text": "string | undefined"
1517
+ },
1518
+ "description": "The name of the form component.",
1519
+ "attribute": "name",
1520
+ "inheritedFrom": {
1521
+ "name": "InputMixin",
1522
+ "module": "src/common/mixins/InputMixin.ts"
1523
+ }
1343
1524
  },
1344
1525
  {
1345
1526
  "kind": "field",
1346
- "name": "handleNextMonthClick",
1347
- "privacy": "private"
1527
+ "name": "value",
1528
+ "type": {
1529
+ "text": "string"
1530
+ },
1531
+ "default": "\"\"",
1532
+ "description": "The value of the form component.",
1533
+ "attribute": "value",
1534
+ "inheritedFrom": {
1535
+ "name": "InputMixin",
1536
+ "module": "src/common/mixins/InputMixin.ts"
1537
+ }
1348
1538
  },
1349
1539
  {
1350
1540
  "kind": "field",
1351
- "name": "handlePreviousMonthClick",
1352
- "privacy": "private"
1541
+ "name": "form",
1542
+ "description": "Gets the form, if any, associated with the form element.",
1543
+ "inheritedFrom": {
1544
+ "name": "InputMixin",
1545
+ "module": "src/common/mixins/InputMixin.ts"
1546
+ }
1353
1547
  },
1354
1548
  {
1355
1549
  "kind": "field",
1356
- "name": "enableActiveFocus",
1357
- "privacy": "private"
1550
+ "name": "focusableRef",
1551
+ "privacy": "protected",
1552
+ "inheritedFrom": {
1553
+ "name": "FocusableMixin",
1554
+ "module": "src/common/mixins/FocusableMixin.ts"
1555
+ }
1358
1556
  },
1359
1557
  {
1360
- "kind": "field",
1361
- "name": "disableActiveFocus",
1362
- "privacy": "private"
1363
- }
1364
- ],
1365
- "events": [
1558
+ "kind": "method",
1559
+ "name": "focus",
1560
+ "parameters": [
1561
+ {
1562
+ "name": "options",
1563
+ "optional": true,
1564
+ "type": {
1565
+ "text": "FocusOptions"
1566
+ },
1567
+ "description": "An object which controls aspects of the focusing process."
1568
+ }
1569
+ ],
1570
+ "description": "Programmatically move focus to the component.",
1571
+ "inheritedFrom": {
1572
+ "name": "FocusableMixin",
1573
+ "module": "src/common/mixins/FocusableMixin.ts"
1574
+ }
1575
+ },
1366
1576
  {
1367
- "name": "nord-focus-date",
1368
- "type": {
1369
- "text": "DateSelectEvent"
1370
- },
1371
- "description": "Dispatched when the calendar's focused date changes."
1577
+ "kind": "method",
1578
+ "name": "blur",
1579
+ "description": "Programmatically remove focus from the component.",
1580
+ "inheritedFrom": {
1581
+ "name": "FocusableMixin",
1582
+ "module": "src/common/mixins/FocusableMixin.ts"
1583
+ }
1372
1584
  },
1373
1585
  {
1374
- "type": {
1375
- "text": "DateSelectEvent"
1376
- },
1377
- "description": "Dispatched when a date is selected and the value changes.",
1378
- "name": "change"
1586
+ "kind": "method",
1587
+ "name": "click",
1588
+ "description": "Programmatically simulates a click on the component.",
1589
+ "inheritedFrom": {
1590
+ "name": "FocusableMixin",
1591
+ "module": "src/common/mixins/FocusableMixin.ts"
1592
+ }
1379
1593
  }
1380
1594
  ],
1381
1595
  "attributes": [
1382
1596
  {
1383
- "name": "value",
1597
+ "name": "variant",
1384
1598
  "type": {
1385
- "text": "string"
1599
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1386
1600
  },
1387
- "default": "\"\"",
1388
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1389
- "fieldName": "value"
1601
+ "default": "\"default\"",
1602
+ "description": "The style variant of the button.",
1603
+ "fieldName": "variant"
1390
1604
  },
1391
1605
  {
1392
- "name": "firstDayOfWeek",
1606
+ "name": "type",
1393
1607
  "type": {
1394
- "text": "DaysOfWeek"
1608
+ "text": "\"button\" | \"submit\" | \"reset\""
1395
1609
  },
1396
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1397
- "fieldName": "firstDayOfWeek"
1610
+ "default": "\"submit\"",
1611
+ "description": "The type of the button.",
1612
+ "fieldName": "type"
1398
1613
  },
1399
1614
  {
1400
- "name": "min",
1615
+ "name": "size",
1401
1616
  "type": {
1402
- "text": "string"
1617
+ "text": "\"s\" | \"m\" | \"l\""
1403
1618
  },
1404
- "default": "\"\"",
1405
- "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.",
1406
- "fieldName": "min"
1619
+ "default": "\"m\"",
1620
+ "description": "The size of the button.\nThis affects font-size and padding.",
1621
+ "fieldName": "size"
1407
1622
  },
1408
1623
  {
1409
- "name": "max",
1624
+ "name": "aria-expanded",
1410
1625
  "type": {
1411
- "text": "string"
1626
+ "text": "\"true\" | \"false\" | undefined"
1412
1627
  },
1413
- "default": "\"\"",
1414
- "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.",
1415
- "fieldName": "max"
1628
+ "fieldName": "accessibleExpanded"
1416
1629
  },
1417
1630
  {
1418
- "name": "expand",
1631
+ "name": "aria-haspopup",
1419
1632
  "type": {
1420
- "text": "boolean"
1633
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1421
1634
  },
1422
- "default": "false",
1423
- "description": "Controls whether the calendar expands to fill the width of its container.",
1424
- "fieldName": "expand"
1425
- }
1426
- ],
1427
- "superclass": {
1428
- "name": "LitElement",
1429
- "package": "lit"
1430
- },
1431
- "status": "ready",
1432
- "category": "list",
1433
- "displayName": null,
1434
- "examples": [],
1435
- "tagName": "nord-calendar",
1436
- "customElement": true
1437
- }
1438
- ],
1439
- "exports": [
1440
- {
1441
- "kind": "js",
1442
- "name": "default",
1443
- "declaration": {
1444
- "name": "Calendar",
1445
- "module": "src/calendar/Calendar.ts"
1446
- }
1447
- },
1448
- {
1449
- "kind": "custom-element-definition",
1450
- "name": "nord-calendar",
1451
- "declaration": {
1452
- "name": "Calendar",
1453
- "module": "src/calendar/Calendar.ts"
1454
- }
1455
- }
1456
- ],
1457
- "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"
1458
- },
1459
- {
1460
- "kind": "javascript-module",
1461
- "path": "src/calendar/DateSelectEvent.ts",
1462
- "declarations": [
1463
- {
1464
- "kind": "class",
1465
- "description": "",
1466
- "name": "DateSelectEvent",
1467
- "superclass": {
1468
- "name": "NordEvent",
1469
- "module": "/src/common/events.js"
1470
- },
1471
- "examples": []
1472
- }
1473
- ],
1474
- "exports": [
1475
- {
1476
- "kind": "js",
1477
- "name": "DateSelectEvent",
1478
- "declaration": {
1479
- "name": "DateSelectEvent",
1480
- "module": "src/calendar/DateSelectEvent.ts"
1481
- }
1482
- }
1483
- ],
1484
- "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"
1485
- },
1486
- {
1487
- "kind": "javascript-module",
1488
- "path": "src/calendar/localization.ts",
1489
- "declarations": [
1490
- {
1491
- "kind": "variable",
1492
- "name": "calendarLocalization",
1493
- "type": {
1494
- "text": "object"
1495
- },
1496
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1497
- }
1498
- ],
1499
- "exports": [
1500
- {
1501
- "kind": "js",
1502
- "name": "default",
1503
- "declaration": {
1504
- "name": "calendarLocalization",
1505
- "module": "src/calendar/localization.ts"
1506
- }
1507
- }
1508
- ],
1509
- "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"
1510
- },
1511
- {
1512
- "kind": "javascript-module",
1513
- "path": "src/calendar/month-view.ts",
1514
- "declarations": [
1515
- {
1516
- "kind": "function",
1517
- "name": "dayView",
1518
- "parameters": [
1635
+ "fieldName": "accessibleHasPopup"
1636
+ },
1519
1637
  {
1520
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1638
+ "name": "href",
1521
1639
  "type": {
1522
- "text": "DatePickerDayProps"
1523
- }
1524
- }
1525
- ]
1526
- },
1527
- {
1528
- "kind": "function",
1529
- "name": "monthView",
1530
- "parameters": [
1640
+ "text": "string | undefined"
1641
+ },
1642
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1643
+ "fieldName": "href"
1644
+ },
1531
1645
  {
1532
- "name": "{\n onFocusIn,\n onFocusOut,\n selectedDate,\n focusedDate,\n labelledById,\n dayNames,\n dayNamesShort,\n firstDayOfWeek,\n min,\n max,\n dateFormatter,\n isDateDisabled,\n onDateSelect,\n onKeyboardNavigation,\n}",
1646
+ "name": "download",
1533
1647
  "type": {
1534
- "text": "MonthViewArgs"
1535
- }
1536
- }
1537
- ]
1538
- }
1539
- ],
1540
- "exports": [
1541
- {
1542
- "kind": "js",
1543
- "name": "dayView",
1544
- "declaration": {
1545
- "name": "dayView",
1546
- "module": "src/calendar/month-view.ts"
1547
- }
1548
- },
1549
- {
1550
- "kind": "js",
1551
- "name": "monthView",
1552
- "declaration": {
1553
- "name": "monthView",
1554
- "module": "src/calendar/month-view.ts"
1555
- }
1556
- }
1557
- ],
1558
- "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"
1559
- },
1560
- {
1561
- "kind": "javascript-module",
1562
- "path": "src/banner/Banner.ts",
1563
- "declarations": [
1564
- {
1565
- "kind": "class",
1566
- "description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
1567
- "name": "Banner",
1568
- "cssProperties": [
1648
+ "text": "boolean"
1649
+ },
1650
+ "default": "false",
1651
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1652
+ "fieldName": "download"
1653
+ },
1569
1654
  {
1570
- "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
1571
- "name": "--n-banner-border-radius",
1572
- "default": "var(--n-border-radius)"
1655
+ "name": "target",
1656
+ "type": {
1657
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1658
+ },
1659
+ "default": "\"_self\"",
1660
+ "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.",
1661
+ "fieldName": "target"
1573
1662
  },
1574
1663
  {
1575
- "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
1576
- "name": "--n-banner-box-shadow",
1577
- "default": "var(--n-box-shadow-card)"
1578
- }
1579
- ],
1580
- "slots": [
1664
+ "name": "expand",
1665
+ "type": {
1666
+ "text": "boolean"
1667
+ },
1668
+ "default": "false",
1669
+ "description": "Controls whether the button expands to fill the width of its container.",
1670
+ "fieldName": "expand"
1671
+ },
1581
1672
  {
1582
- "description": "default slot",
1583
- "name": ""
1584
- }
1585
- ],
1586
- "members": [
1673
+ "name": "loading",
1674
+ "type": {
1675
+ "text": "boolean"
1676
+ },
1677
+ "default": "false",
1678
+ "description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
1679
+ "fieldName": "loading"
1680
+ },
1587
1681
  {
1588
- "kind": "field",
1589
- "name": "variant",
1682
+ "name": "disabled",
1590
1683
  "type": {
1591
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1684
+ "text": "boolean"
1592
1685
  },
1593
- "default": "\"info\"",
1594
- "description": "The style variant of the banner.",
1595
- "attribute": "variant",
1596
- "reflects": true
1597
- }
1598
- ],
1599
- "attributes": [
1686
+ "default": "false",
1687
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1688
+ "fieldName": "disabled",
1689
+ "inheritedFrom": {
1690
+ "name": "InputMixin",
1691
+ "module": "src/common/mixins/InputMixin.ts"
1692
+ }
1693
+ },
1600
1694
  {
1601
- "name": "variant",
1695
+ "name": "name",
1602
1696
  "type": {
1603
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1697
+ "text": "string | undefined"
1604
1698
  },
1605
- "default": "\"info\"",
1606
- "description": "The style variant of the banner.",
1607
- "fieldName": "variant"
1699
+ "description": "The name of the form component.",
1700
+ "fieldName": "name",
1701
+ "inheritedFrom": {
1702
+ "name": "InputMixin",
1703
+ "module": "src/common/mixins/InputMixin.ts"
1704
+ }
1705
+ },
1706
+ {
1707
+ "name": "value",
1708
+ "type": {
1709
+ "text": "string"
1710
+ },
1711
+ "default": "\"\"",
1712
+ "description": "The value of the form component.",
1713
+ "fieldName": "value",
1714
+ "inheritedFrom": {
1715
+ "name": "InputMixin",
1716
+ "module": "src/common/mixins/InputMixin.ts"
1717
+ }
1718
+ }
1719
+ ],
1720
+ "mixins": [
1721
+ {
1722
+ "name": "InputMixin",
1723
+ "module": "/src/common/mixins/InputMixin.js"
1724
+ },
1725
+ {
1726
+ "name": "FocusableMixin",
1727
+ "module": "/src/common/mixins/FocusableMixin.js"
1608
1728
  }
1609
1729
  ],
1610
1730
  "superclass": {
@@ -1612,10 +1732,10 @@
1612
1732
  "package": "lit"
1613
1733
  },
1614
1734
  "status": "ready",
1615
- "category": "feedback",
1735
+ "category": "action",
1616
1736
  "displayName": null,
1617
1737
  "examples": [],
1618
- "tagName": "nord-banner",
1738
+ "tagName": "nord-button",
1619
1739
  "customElement": true
1620
1740
  }
1621
1741
  ],
@@ -1624,20 +1744,20 @@
1624
1744
  "kind": "js",
1625
1745
  "name": "default",
1626
1746
  "declaration": {
1627
- "name": "Banner",
1628
- "module": "src/banner/Banner.ts"
1747
+ "name": "Button",
1748
+ "module": "src/button/Button.ts"
1629
1749
  }
1630
1750
  },
1631
1751
  {
1632
1752
  "kind": "custom-element-definition",
1633
- "name": "nord-banner",
1753
+ "name": "nord-button",
1634
1754
  "declaration": {
1635
- "name": "Banner",
1636
- "module": "src/banner/Banner.ts"
1755
+ "name": "Button",
1756
+ "module": "src/button/Button.ts"
1637
1757
  }
1638
1758
  }
1639
1759
  ],
1640
- "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 this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it 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\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
1760
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
1641
1761
  },
1642
1762
  {
1643
1763
  "kind": "javascript-module",
@@ -1734,97 +1854,10 @@
1734
1854
  "package": "lit"
1735
1855
  },
1736
1856
  "status": "ready",
1737
- "category": "structure",
1738
- "displayName": null,
1739
- "examples": [],
1740
- "tagName": "nord-card",
1741
- "customElement": true
1742
- }
1743
- ],
1744
- "exports": [
1745
- {
1746
- "kind": "js",
1747
- "name": "default",
1748
- "declaration": {
1749
- "name": "Card",
1750
- "module": "src/card/Card.ts"
1751
- }
1752
- },
1753
- {
1754
- "kind": "custom-element-definition",
1755
- "name": "nord-card",
1756
- "declaration": {
1757
- "name": "Card",
1758
- "module": "src/card/Card.ts"
1759
- }
1760
- }
1761
- ],
1762
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
1763
- },
1764
- {
1765
- "kind": "javascript-module",
1766
- "path": "src/badge/Badge.ts",
1767
- "declarations": [
1768
- {
1769
- "kind": "class",
1770
- "description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
1771
- "name": "Badge",
1772
- "slots": [
1773
- {
1774
- "description": "The badge content.",
1775
- "name": ""
1776
- }
1777
- ],
1778
- "members": [
1779
- {
1780
- "kind": "field",
1781
- "name": "type",
1782
- "type": {
1783
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1784
- },
1785
- "default": "\"neutral\"",
1786
- "description": "The type of badge.\nDetermines the background color of the badge.",
1787
- "attribute": "type",
1788
- "reflects": true
1789
- },
1790
- {
1791
- "kind": "field",
1792
- "name": "progress",
1793
- "type": {
1794
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1795
- },
1796
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1797
- "attribute": "progress"
1798
- }
1799
- ],
1800
- "attributes": [
1801
- {
1802
- "name": "type",
1803
- "type": {
1804
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
1805
- },
1806
- "default": "\"neutral\"",
1807
- "description": "The type of badge.\nDetermines the background color of the badge.",
1808
- "fieldName": "type"
1809
- },
1810
- {
1811
- "name": "progress",
1812
- "type": {
1813
- "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
1814
- },
1815
- "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
1816
- "fieldName": "progress"
1817
- }
1818
- ],
1819
- "superclass": {
1820
- "name": "LitElement",
1821
- "package": "lit"
1822
- },
1823
- "status": "ready",
1824
- "category": "text",
1857
+ "category": "structure",
1825
1858
  "displayName": null,
1826
1859
  "examples": [],
1827
- "tagName": "nord-badge",
1860
+ "tagName": "nord-card",
1828
1861
  "customElement": true
1829
1862
  }
1830
1863
  ],
@@ -1833,20 +1866,20 @@
1833
1866
  "kind": "js",
1834
1867
  "name": "default",
1835
1868
  "declaration": {
1836
- "name": "Badge",
1837
- "module": "src/badge/Badge.ts"
1869
+ "name": "Card",
1870
+ "module": "src/card/Card.ts"
1838
1871
  }
1839
1872
  },
1840
1873
  {
1841
1874
  "kind": "custom-element-definition",
1842
- "name": "nord-badge",
1875
+ "name": "nord-card",
1843
1876
  "declaration": {
1844
- "name": "Badge",
1845
- "module": "src/badge/Badge.ts"
1877
+ "name": "Card",
1878
+ "module": "src/card/Card.ts"
1846
1879
  }
1847
1880
  }
1848
1881
  ],
1849
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
1882
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
1850
1883
  },
1851
1884
  {
1852
1885
  "kind": "javascript-module",
@@ -5487,7 +5520,7 @@
5487
5520
  }
5488
5521
  }
5489
5522
  ],
5490
- "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 displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n"
5523
+ "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 displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n\n---\n\n## Additional considerations\n\n- You can customize the width of the component using `--n-layout-drawer-inline-size` CSS Custom Property that is offered on [Layout component](/components/layout/).\n"
5491
5524
  },
5492
5525
  {
5493
5526
  "kind": "javascript-module",
@@ -5523,37 +5556,6 @@
5523
5556
  },
5524
5557
  "privacy": "private"
5525
5558
  },
5526
- {
5527
- "kind": "field",
5528
- "name": "open",
5529
- "type": {
5530
- "text": "boolean"
5531
- },
5532
- "default": "false",
5533
- "description": "Controls whether the dropdown is open or not.",
5534
- "attribute": "open",
5535
- "reflects": true
5536
- },
5537
- {
5538
- "kind": "field",
5539
- "name": "align",
5540
- "type": {
5541
- "text": "Popout[\"align\"] | undefined"
5542
- },
5543
- "description": "Set the alignment of the dropdown in relation to the toggle depending on the position.\n`start` will align the left of the dropdown to the left of the toggle.\n`end` will align the right of the dropdown to the right of the toggle.\nA dropdown with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the dropdown respectively.",
5544
- "attribute": "align",
5545
- "reflects": true
5546
- },
5547
- {
5548
- "kind": "field",
5549
- "name": "position",
5550
- "type": {
5551
- "text": "Popout[\"position\"] | undefined"
5552
- },
5553
- "description": "Set the position of the dropdown in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
5554
- "attribute": "position",
5555
- "reflects": true
5556
- },
5557
5559
  {
5558
5560
  "kind": "field",
5559
5561
  "name": "expand",
@@ -5615,34 +5617,54 @@
5615
5617
  "kind": "method",
5616
5618
  "name": "handleClose",
5617
5619
  "privacy": "private"
5618
- }
5619
- ],
5620
- "attributes": [
5620
+ },
5621
5621
  {
5622
+ "kind": "field",
5622
5623
  "name": "open",
5623
5624
  "type": {
5624
5625
  "text": "boolean"
5625
5626
  },
5626
5627
  "default": "false",
5627
- "description": "Controls whether the dropdown is open or not.",
5628
- "fieldName": "open"
5628
+ "description": "Controls whether the component is open or not.",
5629
+ "attribute": "open",
5630
+ "reflects": true,
5631
+ "inheritedFrom": {
5632
+ "name": "FloatingMixin",
5633
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
5634
+ }
5629
5635
  },
5630
5636
  {
5637
+ "kind": "field",
5631
5638
  "name": "align",
5632
5639
  "type": {
5633
- "text": "Popout[\"align\"] | undefined"
5640
+ "text": "\"start\" | \"end\""
5634
5641
  },
5635
- "description": "Set the alignment of the dropdown in relation to the toggle depending on the position.\n`start` will align the left of the dropdown to the left of the toggle.\n`end` will align the right of the dropdown to the right of the toggle.\nA dropdown with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the dropdown respectively.",
5636
- "fieldName": "align"
5642
+ "default": "\"start\"",
5643
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
5644
+ "attribute": "align",
5645
+ "reflects": true,
5646
+ "inheritedFrom": {
5647
+ "name": "FloatingMixin",
5648
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
5649
+ }
5637
5650
  },
5638
5651
  {
5652
+ "kind": "field",
5639
5653
  "name": "position",
5640
5654
  "type": {
5641
- "text": "Popout[\"position\"] | undefined"
5655
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
5642
5656
  },
5643
- "description": "Set the position of the dropdown in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
5644
- "fieldName": "position"
5645
- },
5657
+ "default": "\"block-end\"",
5658
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
5659
+ "attribute": "position",
5660
+ "reflects": true,
5661
+ "inheritedFrom": {
5662
+ "name": "FloatingMixin",
5663
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
5664
+ }
5665
+ }
5666
+ ],
5667
+ "attributes": [
5646
5668
  {
5647
5669
  "name": "expand",
5648
5670
  "type": {
@@ -5660,6 +5682,51 @@
5660
5682
  "default": "\"m\"",
5661
5683
  "description": "The size of the dropdown. This affects the minimum and maximum inline-size\nof the dropdown.",
5662
5684
  "fieldName": "size"
5685
+ },
5686
+ {
5687
+ "name": "open",
5688
+ "type": {
5689
+ "text": "boolean"
5690
+ },
5691
+ "default": "false",
5692
+ "description": "Controls whether the component is open or not.",
5693
+ "fieldName": "open",
5694
+ "inheritedFrom": {
5695
+ "name": "FloatingMixin",
5696
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
5697
+ }
5698
+ },
5699
+ {
5700
+ "name": "align",
5701
+ "type": {
5702
+ "text": "\"start\" | \"end\""
5703
+ },
5704
+ "default": "\"start\"",
5705
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
5706
+ "fieldName": "align",
5707
+ "inheritedFrom": {
5708
+ "name": "FloatingMixin",
5709
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
5710
+ }
5711
+ },
5712
+ {
5713
+ "name": "position",
5714
+ "type": {
5715
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
5716
+ },
5717
+ "default": "\"block-end\"",
5718
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
5719
+ "fieldName": "position",
5720
+ "inheritedFrom": {
5721
+ "name": "FloatingMixin",
5722
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
5723
+ }
5724
+ }
5725
+ ],
5726
+ "mixins": [
5727
+ {
5728
+ "name": "FloatingMixin",
5729
+ "module": "/src/common/mixins/FloatingComponentMixin.js"
5663
5730
  }
5664
5731
  ],
5665
5732
  "superclass": {
@@ -7161,6 +7228,10 @@
7161
7228
  {
7162
7229
  "description": "Used to place additional content/details relating to a selected item.",
7163
7230
  "name": "drawer"
7231
+ },
7232
+ {
7233
+ "description": "Used to place a own nav-toggle component, for cases where you might need to add a tooltip.",
7234
+ "name": "nav-toggle"
7164
7235
  }
7165
7236
  ],
7166
7237
  "members": [
@@ -7200,7 +7271,7 @@
7200
7271
  "kind": "field",
7201
7272
  "name": "lightDismiss",
7202
7273
  "privacy": "private",
7203
- "default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !mediaQuery.matches,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl && !this.isNavToggle(node),\n })"
7274
+ "default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !this.wideScreen,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl,\n })"
7204
7275
  },
7205
7276
  {
7206
7277
  "kind": "field",
@@ -7232,6 +7303,11 @@
7232
7303
  },
7233
7304
  "privacy": "private"
7234
7305
  },
7306
+ {
7307
+ "kind": "field",
7308
+ "name": "wideScreen",
7309
+ "privacy": "private"
7310
+ },
7235
7311
  {
7236
7312
  "kind": "field",
7237
7313
  "name": "navOpen",
@@ -7248,7 +7324,8 @@
7248
7324
  "type": {
7249
7325
  "text": "string | undefined"
7250
7326
  },
7251
- "description": "ID reference of element used to toggle the navigation.",
7327
+ "description": "ID reference of element used to toggle the navigation.\nThis is deprecated, the layout component will now render its own nav toggle to simplify usage.",
7328
+ "deprecated": "true",
7252
7329
  "attribute": "nav-toggle"
7253
7330
  },
7254
7331
  {
@@ -7262,6 +7339,11 @@
7262
7339
  "attribute": "padding",
7263
7340
  "reflects": true
7264
7341
  },
7342
+ {
7343
+ "kind": "method",
7344
+ "name": "renderNavToggle",
7345
+ "privacy": "private"
7346
+ },
7265
7347
  {
7266
7348
  "kind": "method",
7267
7349
  "name": "handleNavWidthChange",
@@ -7449,7 +7531,8 @@
7449
7531
  "type": {
7450
7532
  "text": "string | undefined"
7451
7533
  },
7452
- "description": "ID reference of element used to toggle the navigation.",
7534
+ "description": "ID reference of element used to toggle the navigation.\nThis is deprecated, the layout component will now render its own nav toggle to simplify usage.",
7535
+ "deprecated": "true",
7453
7536
  "fieldName": "navToggle"
7454
7537
  },
7455
7538
  {
@@ -7590,7 +7673,7 @@
7590
7673
  "type": {
7591
7674
  "text": "object"
7592
7675
  },
7593
- "default": "{\n $lang: \"en-US\",\n $name: \"English\",\n $dir: \"ltr\" as \"ltr\" | \"rtl\",\n \"nord-command-menu\": commandMenuLocalization,\n \"nord-calendar\": calendarLocalization,\n \"nord-date-picker\": datePickerLocalization,\n \"nord-modal\": modalLocalization,\n}"
7676
+ "default": "{\n $lang: \"en-US\",\n $name: \"English\",\n $dir: \"ltr\" as \"ltr\" | \"rtl\",\n \"nord-command-menu\": commandMenuLocalization,\n \"nord-calendar\": calendarLocalization,\n \"nord-date-picker\": datePickerLocalization,\n \"nord-modal\": modalLocalization,\n \"nord-nav-toggle\": navToggleLocalization,\n}"
7594
7677
  }
7595
7678
  ],
7596
7679
  "exports": [
@@ -7614,7 +7697,7 @@
7614
7697
  "type": {
7615
7698
  "text": "Translation"
7616
7699
  },
7617
- "default": "{\n $lang: \"fi\",\n $name: \"Suomi\",\n $dir: \"ltr\",\n\n \"nord-command-menu\": {\n instructions: \"Paina 'Enter' vahvistaaksesi valinnan tai 'Escape' peruuttaaksesi\",\n inputLabel: \"Kirjoita komento jonka haluat suorittaa.\",\n footerArrowKeys: \"Siirry\",\n footerEnterKey: \"Valitse\",\n footerEscapeKey: \"Esc sulje\",\n footerBackspaceKey: \"Siirry takaisin\",\n noResults: searchTerm => `Ei tuloksia haulle \"${searchTerm}\"`,\n tip: \"Vinkki: jotkin haut vaativat tarkan hakutermin. Koita kirjoittaa koko hakutermi kokonaisuudessaan, tai kokeile toista sanaa tai fraasia.\",\n },\n\n \"nord-calendar\": {\n prevMonthLabel: \"Edellinen kuukausi\",\n nextMonthLabel: \"Seuraava kuukausi\",\n monthSelectLabel: \"Kuukausi\",\n yearSelectLabel: \"Vuosi\",\n },\n\n \"nord-date-picker\": {\n modalHeading: \"Valitse päivämäärä\",\n closeLabel: \"Sulje ikkuna\",\n buttonLabel: \"Valitse päivämäärä\",\n selectedDateMessage: \"Valittu päivämäärä on\",\n },\n\n \"nord-modal\": {\n closeLabel: \"Sulje ikkuna\",\n },\n}"
7700
+ "default": "{\n $lang: \"fi\",\n $name: \"Suomi\",\n $dir: \"ltr\",\n\n \"nord-command-menu\": {\n instructions: \"Paina 'Enter' vahvistaaksesi valinnan tai 'Escape' peruuttaaksesi\",\n inputLabel: \"Kirjoita komento jonka haluat suorittaa.\",\n footerArrowKeys: \"Siirry\",\n footerEnterKey: \"Valitse\",\n footerEscapeKey: \"Esc sulje\",\n footerBackspaceKey: \"Siirry takaisin\",\n noResults: searchTerm => `Ei tuloksia haulle \"${searchTerm}\"`,\n tip: \"Vinkki: jotkin haut vaativat tarkan hakutermin. Koita kirjoittaa koko hakutermi kokonaisuudessaan, tai kokeile toista sanaa tai fraasia.\",\n },\n\n \"nord-calendar\": {\n prevMonthLabel: \"Edellinen kuukausi\",\n nextMonthLabel: \"Seuraava kuukausi\",\n monthSelectLabel: \"Kuukausi\",\n yearSelectLabel: \"Vuosi\",\n },\n\n \"nord-date-picker\": {\n modalHeading: \"Valitse päivämäärä\",\n closeLabel: \"Sulje ikkuna\",\n buttonLabel: \"Valitse päivämäärä\",\n selectedDateMessage: \"Valittu päivämäärä on\",\n },\n\n \"nord-modal\": {\n closeLabel: \"Sulje ikkuna\",\n },\n\n \"nord-nav-toggle\": {\n label: \"Näytä/Piilota valikko\",\n },\n}"
7618
7701
  }
7619
7702
  ],
7620
7703
  "exports": [
@@ -8376,12 +8459,169 @@
8376
8459
  "name": "LitElement",
8377
8460
  "package": "lit"
8378
8461
  },
8379
- "status": "ready",
8380
- "category": "navigation",
8381
- "displayName": null,
8382
- "examples": [],
8383
- "tagName": "nord-nav-item",
8384
- "customElement": true
8462
+ "status": "ready",
8463
+ "category": "navigation",
8464
+ "displayName": null,
8465
+ "examples": [],
8466
+ "tagName": "nord-nav-item",
8467
+ "customElement": true
8468
+ }
8469
+ ],
8470
+ "exports": [
8471
+ {
8472
+ "kind": "js",
8473
+ "name": "default",
8474
+ "declaration": {
8475
+ "name": "NavItem",
8476
+ "module": "src/nav-item/NavItem.ts"
8477
+ }
8478
+ },
8479
+ {
8480
+ "kind": "custom-element-definition",
8481
+ "name": "nord-nav-item",
8482
+ "declaration": {
8483
+ "name": "NavItem",
8484
+ "module": "src/nav-item/NavItem.ts"
8485
+ }
8486
+ }
8487
+ ],
8488
+ "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\nAvoid 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"
8489
+ },
8490
+ {
8491
+ "kind": "javascript-module",
8492
+ "path": "src/nav-toggle/NavToggle.ts",
8493
+ "declarations": [
8494
+ {
8495
+ "kind": "class",
8496
+ "description": "Nav toggle is meant for hiding and showing the primary navigation.\nThis component is used internally in the Layout component, but can also be\nused separate to further customize the behaviour.",
8497
+ "name": "NavToggle",
8498
+ "members": [
8499
+ {
8500
+ "kind": "field",
8501
+ "name": "direction",
8502
+ "privacy": "private",
8503
+ "default": "new DirectionController(this)"
8504
+ },
8505
+ {
8506
+ "kind": "field",
8507
+ "name": "localization",
8508
+ "privacy": "private",
8509
+ "default": "new LocalizeController<\"nord-nav-toggle\">(this)"
8510
+ },
8511
+ {
8512
+ "kind": "field",
8513
+ "name": "focusableRef",
8514
+ "privacy": "protected",
8515
+ "inheritedFrom": {
8516
+ "name": "FocusableMixin",
8517
+ "module": "src/common/mixins/FocusableMixin.ts"
8518
+ }
8519
+ },
8520
+ {
8521
+ "kind": "method",
8522
+ "name": "focus",
8523
+ "parameters": [
8524
+ {
8525
+ "name": "options",
8526
+ "optional": true,
8527
+ "type": {
8528
+ "text": "FocusOptions"
8529
+ },
8530
+ "description": "An object which controls aspects of the focusing process."
8531
+ }
8532
+ ],
8533
+ "description": "Programmatically move focus to the component.",
8534
+ "inheritedFrom": {
8535
+ "name": "FocusableMixin",
8536
+ "module": "src/common/mixins/FocusableMixin.ts"
8537
+ }
8538
+ },
8539
+ {
8540
+ "kind": "method",
8541
+ "name": "blur",
8542
+ "description": "Programmatically remove focus from the component.",
8543
+ "inheritedFrom": {
8544
+ "name": "FocusableMixin",
8545
+ "module": "src/common/mixins/FocusableMixin.ts"
8546
+ }
8547
+ },
8548
+ {
8549
+ "kind": "method",
8550
+ "name": "click",
8551
+ "description": "Programmatically simulates a click on the component.",
8552
+ "inheritedFrom": {
8553
+ "name": "FocusableMixin",
8554
+ "module": "src/common/mixins/FocusableMixin.ts"
8555
+ }
8556
+ },
8557
+ {
8558
+ "kind": "field",
8559
+ "name": "_warningLogged",
8560
+ "type": {
8561
+ "text": "boolean"
8562
+ },
8563
+ "privacy": "private",
8564
+ "static": true,
8565
+ "default": "false",
8566
+ "inheritedFrom": {
8567
+ "name": "DraftComponentMixin",
8568
+ "module": "src/common/mixins/DraftComponentMixin.ts"
8569
+ }
8570
+ }
8571
+ ],
8572
+ "mixins": [
8573
+ {
8574
+ "name": "FocusableMixin",
8575
+ "module": "/src/common/mixins/FocusableMixin.js"
8576
+ },
8577
+ {
8578
+ "name": "DraftComponentMixin",
8579
+ "module": "/src/common/mixins/DraftComponentMixin.js"
8580
+ }
8581
+ ],
8582
+ "superclass": {
8583
+ "name": "LitElement",
8584
+ "package": "lit"
8585
+ },
8586
+ "status": "draft",
8587
+ "category": "action",
8588
+ "displayName": null,
8589
+ "examples": [],
8590
+ "tagName": "nord-nav-toggle",
8591
+ "customElement": true
8592
+ }
8593
+ ],
8594
+ "exports": [
8595
+ {
8596
+ "kind": "js",
8597
+ "name": "default",
8598
+ "declaration": {
8599
+ "name": "NavToggle",
8600
+ "module": "src/nav-toggle/NavToggle.ts"
8601
+ }
8602
+ },
8603
+ {
8604
+ "kind": "custom-element-definition",
8605
+ "name": "nord-nav-toggle",
8606
+ "declaration": {
8607
+ "name": "NavToggle",
8608
+ "module": "src/nav-toggle/NavToggle.ts"
8609
+ }
8610
+ }
8611
+ ],
8612
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip with the toggle that’s labelled as `Toggle navigation`.\n- We recommend setting a keyboard shortcut that toggles the navigation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic button or toggle. Use the [Button component](/components/button/) instead.\n\n</div>\n"
8613
+ },
8614
+ {
8615
+ "kind": "javascript-module",
8616
+ "path": "src/nav-toggle/localization.ts",
8617
+ "declarations": [
8618
+ {
8619
+ "kind": "variable",
8620
+ "name": "localization",
8621
+ "type": {
8622
+ "text": "object"
8623
+ },
8624
+ "default": "{\n label: \"Toggle navigation\",\n}"
8385
8625
  }
8386
8626
  ],
8387
8627
  "exports": [
@@ -8389,20 +8629,12 @@
8389
8629
  "kind": "js",
8390
8630
  "name": "default",
8391
8631
  "declaration": {
8392
- "name": "NavItem",
8393
- "module": "src/nav-item/NavItem.ts"
8394
- }
8395
- },
8396
- {
8397
- "kind": "custom-element-definition",
8398
- "name": "nord-nav-item",
8399
- "declaration": {
8400
- "name": "NavItem",
8401
- "module": "src/nav-item/NavItem.ts"
8632
+ "name": "localization",
8633
+ "module": "src/nav-toggle/localization.ts"
8402
8634
  }
8403
8635
  }
8404
8636
  ],
8405
- "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\nAvoid 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"
8637
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a tooltip with the toggle that’s labelled as `Toggle navigation`.\n- We recommend setting a keyboard shortcut that toggles the navigation.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic button or toggle. Use the [Button component](/components/button/) instead.\n\n</div>\n"
8406
8638
  },
8407
8639
  {
8408
8640
  "kind": "javascript-module",
@@ -8482,6 +8714,14 @@
8482
8714
  },
8483
8715
  "privacy": "private"
8484
8716
  },
8717
+ {
8718
+ "kind": "field",
8719
+ "name": "anchorElement",
8720
+ "type": {
8721
+ "text": "Element"
8722
+ },
8723
+ "privacy": "private"
8724
+ },
8485
8725
  {
8486
8726
  "kind": "field",
8487
8727
  "name": "cleanupAutoUpdate",
@@ -8538,46 +8778,23 @@
8538
8778
  },
8539
8779
  {
8540
8780
  "kind": "field",
8541
- "name": "open",
8542
- "type": {
8543
- "text": "boolean"
8544
- },
8545
- "default": "false",
8546
- "description": "Controls whether the popout is open or not.",
8547
- "attribute": "open",
8548
- "reflects": true
8549
- },
8550
- {
8551
- "kind": "field",
8552
- "name": "align",
8553
- "type": {
8554
- "text": "\"start\" | \"end\""
8555
- },
8556
- "default": "\"start\"",
8557
- "description": "Set the alignment of the popout in relation to the toggle depending on the position.\n`start` will align the left of the popout to the left of the toggle.\n`end` will align the right of the popout to the right of the toggle.\nA popout with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the popout respectively.",
8558
- "attribute": "align",
8559
- "reflects": true
8560
- },
8561
- {
8562
- "kind": "field",
8563
- "name": "position",
8781
+ "name": "id",
8564
8782
  "type": {
8565
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
8783
+ "text": "string"
8566
8784
  },
8567
- "default": "\"block-end\"",
8568
- "description": "Set the position of the popout in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
8569
- "attribute": "position",
8785
+ "default": "\"\"",
8786
+ "description": "The id for the active element to reference via aria-controls.",
8787
+ "attribute": "id",
8570
8788
  "reflects": true
8571
8789
  },
8572
8790
  {
8573
8791
  "kind": "field",
8574
- "name": "id",
8792
+ "name": "anchor",
8575
8793
  "type": {
8576
- "text": "string"
8794
+ "text": "string | undefined"
8577
8795
  },
8578
- "default": "\"\"",
8579
- "description": "The id for the active element to reference via aria-controls.",
8580
- "attribute": "id",
8796
+ "description": "Set an optional anchor element to align against, replacing the triggering element.",
8797
+ "attribute": "anchor",
8581
8798
  "reflects": true
8582
8799
  },
8583
8800
  {
@@ -8632,11 +8849,61 @@
8632
8849
  "name": "getToggle",
8633
8850
  "privacy": "private"
8634
8851
  },
8852
+ {
8853
+ "kind": "method",
8854
+ "name": "getAnchor",
8855
+ "privacy": "private"
8856
+ },
8635
8857
  {
8636
8858
  "kind": "field",
8637
8859
  "name": "handleMediaQueryChange",
8638
8860
  "privacy": "private",
8639
8861
  "description": "Update the smallViewport flag to switch between \"sheet\" and \"floating\".\nautoUpdate is needed when a viewport gets larger and the popout is open."
8862
+ },
8863
+ {
8864
+ "kind": "field",
8865
+ "name": "open",
8866
+ "type": {
8867
+ "text": "boolean"
8868
+ },
8869
+ "default": "false",
8870
+ "description": "Controls whether the component is open or not.",
8871
+ "attribute": "open",
8872
+ "reflects": true,
8873
+ "inheritedFrom": {
8874
+ "name": "FloatingMixin",
8875
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
8876
+ }
8877
+ },
8878
+ {
8879
+ "kind": "field",
8880
+ "name": "align",
8881
+ "type": {
8882
+ "text": "\"start\" | \"end\""
8883
+ },
8884
+ "default": "\"start\"",
8885
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
8886
+ "attribute": "align",
8887
+ "reflects": true,
8888
+ "inheritedFrom": {
8889
+ "name": "FloatingMixin",
8890
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
8891
+ }
8892
+ },
8893
+ {
8894
+ "kind": "field",
8895
+ "name": "position",
8896
+ "type": {
8897
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
8898
+ },
8899
+ "default": "\"block-end\"",
8900
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
8901
+ "attribute": "position",
8902
+ "reflects": true,
8903
+ "inheritedFrom": {
8904
+ "name": "FloatingMixin",
8905
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
8906
+ }
8640
8907
  }
8641
8908
  ],
8642
8909
  "events": [
@@ -8656,14 +8923,35 @@
8656
8923
  }
8657
8924
  ],
8658
8925
  "attributes": [
8926
+ {
8927
+ "name": "id",
8928
+ "type": {
8929
+ "text": "string"
8930
+ },
8931
+ "default": "\"\"",
8932
+ "description": "The id for the active element to reference via aria-controls.",
8933
+ "fieldName": "id"
8934
+ },
8935
+ {
8936
+ "name": "anchor",
8937
+ "type": {
8938
+ "text": "string | undefined"
8939
+ },
8940
+ "description": "Set an optional anchor element to align against, replacing the triggering element.",
8941
+ "fieldName": "anchor"
8942
+ },
8659
8943
  {
8660
8944
  "name": "open",
8661
8945
  "type": {
8662
8946
  "text": "boolean"
8663
8947
  },
8664
8948
  "default": "false",
8665
- "description": "Controls whether the popout is open or not.",
8666
- "fieldName": "open"
8949
+ "description": "Controls whether the component is open or not.",
8950
+ "fieldName": "open",
8951
+ "inheritedFrom": {
8952
+ "name": "FloatingMixin",
8953
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
8954
+ }
8667
8955
  },
8668
8956
  {
8669
8957
  "name": "align",
@@ -8671,8 +8959,12 @@
8671
8959
  "text": "\"start\" | \"end\""
8672
8960
  },
8673
8961
  "default": "\"start\"",
8674
- "description": "Set the alignment of the popout in relation to the toggle depending on the position.\n`start` will align the left of the popout to the left of the toggle.\n`end` will align the right of the popout to the right of the toggle.\nA popout with a set position of `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom of the popout respectively.",
8675
- "fieldName": "align"
8962
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
8963
+ "fieldName": "align",
8964
+ "inheritedFrom": {
8965
+ "name": "FloatingMixin",
8966
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
8967
+ }
8676
8968
  },
8677
8969
  {
8678
8970
  "name": "position",
@@ -8680,17 +8972,18 @@
8680
8972
  "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
8681
8973
  },
8682
8974
  "default": "\"block-end\"",
8683
- "description": "Set the position of the popout in relation to the toggle.\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
8684
- "fieldName": "position"
8685
- },
8975
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
8976
+ "fieldName": "position",
8977
+ "inheritedFrom": {
8978
+ "name": "FloatingMixin",
8979
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
8980
+ }
8981
+ }
8982
+ ],
8983
+ "mixins": [
8686
8984
  {
8687
- "name": "id",
8688
- "type": {
8689
- "text": "string"
8690
- },
8691
- "default": "\"\"",
8692
- "description": "The id for the active element to reference via aria-controls.",
8693
- "fieldName": "id"
8985
+ "name": "FloatingMixin",
8986
+ "module": "/src/common/mixins/FloatingComponentMixin.js"
8694
8987
  }
8695
8988
  ],
8696
8989
  "superclass": {
@@ -14781,6 +15074,136 @@
14781
15074
  }
14782
15075
  ]
14783
15076
  },
15077
+ {
15078
+ "kind": "javascript-module",
15079
+ "path": "src/common/mixins/FloatingComponentMixin.ts",
15080
+ "declarations": [
15081
+ {
15082
+ "kind": "class",
15083
+ "description": "",
15084
+ "name": "FloatingMixinInterface",
15085
+ "members": [
15086
+ {
15087
+ "kind": "field",
15088
+ "name": "open",
15089
+ "type": {
15090
+ "text": "boolean"
15091
+ }
15092
+ },
15093
+ {
15094
+ "kind": "field",
15095
+ "name": "align",
15096
+ "type": {
15097
+ "text": "Alignment"
15098
+ }
15099
+ },
15100
+ {
15101
+ "kind": "field",
15102
+ "name": "position",
15103
+ "type": {
15104
+ "text": "LogicalSide"
15105
+ }
15106
+ }
15107
+ ],
15108
+ "examples": []
15109
+ },
15110
+ {
15111
+ "kind": "mixin",
15112
+ "description": "",
15113
+ "name": "FloatingMixin",
15114
+ "members": [
15115
+ {
15116
+ "kind": "field",
15117
+ "name": "open",
15118
+ "type": {
15119
+ "text": "boolean"
15120
+ },
15121
+ "default": "false",
15122
+ "description": "Controls whether the component is open or not.",
15123
+ "attribute": "open",
15124
+ "reflects": true
15125
+ },
15126
+ {
15127
+ "kind": "field",
15128
+ "name": "align",
15129
+ "type": {
15130
+ "text": "\"start\" | \"end\""
15131
+ },
15132
+ "default": "\"start\"",
15133
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
15134
+ "attribute": "align",
15135
+ "reflects": true
15136
+ },
15137
+ {
15138
+ "kind": "field",
15139
+ "name": "position",
15140
+ "type": {
15141
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
15142
+ },
15143
+ "default": "\"block-end\"",
15144
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
15145
+ "attribute": "position",
15146
+ "reflects": true
15147
+ }
15148
+ ],
15149
+ "attributes": [
15150
+ {
15151
+ "name": "open",
15152
+ "type": {
15153
+ "text": "boolean"
15154
+ },
15155
+ "default": "false",
15156
+ "description": "Controls whether the component is open or not.",
15157
+ "fieldName": "open"
15158
+ },
15159
+ {
15160
+ "name": "align",
15161
+ "type": {
15162
+ "text": "\"start\" | \"end\""
15163
+ },
15164
+ "default": "\"start\"",
15165
+ "description": "Set the alignment in relation to the toggle (or anchor) depending on the position.\n`start` will align it to the left of the toggle (or anchor).\n`end` will align it to the right of the toggle (or anchor).\nSetting the `position` to `inline-start` or `inline-end` will switch\n`start` and `end` to the top and bottom respectively.",
15166
+ "fieldName": "align"
15167
+ },
15168
+ {
15169
+ "name": "position",
15170
+ "type": {
15171
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
15172
+ },
15173
+ "default": "\"block-end\"",
15174
+ "description": "Set the position in relation to the toggle (or anchor).\nOptions follow logical properties.\n`block-start` and `block-end` referring to top and bottom respectively,\n`inline-start` and `inline-end` referring to left and right respectively.",
15175
+ "fieldName": "position"
15176
+ }
15177
+ ],
15178
+ "parameters": [
15179
+ {
15180
+ "name": "superClass",
15181
+ "type": {
15182
+ "text": "T"
15183
+ }
15184
+ }
15185
+ ]
15186
+ }
15187
+ ],
15188
+ "exports": [
15189
+ {
15190
+ "kind": "js",
15191
+ "name": "FloatingMixinInterface",
15192
+ "declaration": {
15193
+ "name": "FloatingMixinInterface",
15194
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
15195
+ }
15196
+ },
15197
+ {
15198
+ "kind": "js",
15199
+ "name": "FloatingMixin",
15200
+ "declaration": {
15201
+ "name": "FloatingMixin",
15202
+ "module": "src/common/mixins/FloatingComponentMixin.ts"
15203
+ }
15204
+ }
15205
+ ]
15206
+ },
14784
15207
  {
14785
15208
  "kind": "javascript-module",
14786
15209
  "path": "src/common/mixins/FocusableMixin.ts",