@nordhealth/components 1.14.3 → 2.0.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 (106) hide show
  1. package/custom-elements.json +1132 -904
  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/Badge.js.map +1 -1
  6. package/lib/Banner.js +1 -1
  7. package/lib/Banner.js.map +1 -1
  8. package/lib/Button.js +1 -1
  9. package/lib/Button.js.map +1 -1
  10. package/lib/Calendar-82a1df31.js +2 -0
  11. package/lib/Calendar-82a1df31.js.map +1 -0
  12. package/lib/Calendar.js +1 -1
  13. package/lib/Card.js +1 -1
  14. package/lib/Card.js.map +1 -1
  15. package/lib/Checkbox.js +1 -1
  16. package/lib/Checkbox.js.map +1 -1
  17. package/lib/CommandMenu.js +1 -1
  18. package/lib/CommandMenu.js.map +1 -1
  19. package/lib/DatePicker.js +1 -1
  20. package/lib/DatePicker.js.map +1 -1
  21. package/lib/Divider.js +1 -1
  22. package/lib/Divider.js.map +1 -1
  23. package/lib/Dropdown.js +1 -1
  24. package/lib/Dropdown.js.map +1 -1
  25. package/lib/DropdownGroup.js +1 -1
  26. package/lib/DropdownGroup.js.map +1 -1
  27. package/lib/DropdownItem.js +1 -1
  28. package/lib/DropdownItem.js.map +1 -1
  29. package/lib/Header.js +1 -1
  30. package/lib/Header.js.map +1 -1
  31. package/lib/Icon.js +1 -1
  32. package/lib/Icon.js.map +1 -1
  33. package/lib/Input.js +1 -1
  34. package/lib/Input.js.map +1 -1
  35. package/lib/Layout.js +1 -1
  36. package/lib/Layout.js.map +1 -1
  37. package/lib/Modal.js +1 -1
  38. package/lib/Modal.js.map +1 -1
  39. package/lib/NavGroup.js +1 -1
  40. package/lib/NavGroup.js.map +1 -1
  41. package/lib/NavItem.js +1 -1
  42. package/lib/NavItem.js.map +1 -1
  43. package/lib/Popout.js +1 -1
  44. package/lib/Popout.js.map +1 -1
  45. package/lib/ProgressBar.js +1 -1
  46. package/lib/ProgressBar.js.map +1 -1
  47. package/lib/Radio.js +1 -1
  48. package/lib/Radio.js.map +1 -1
  49. package/lib/Select.js +1 -1
  50. package/lib/Select.js.map +1 -1
  51. package/lib/Skeleton.js +1 -1
  52. package/lib/Skeleton.js.map +1 -1
  53. package/lib/Spinner.js +1 -1
  54. package/lib/Spinner.js.map +1 -1
  55. package/lib/Stack.js +1 -1
  56. package/lib/Stack.js.map +1 -1
  57. package/lib/Tab.js +1 -1
  58. package/lib/Tab.js.map +1 -1
  59. package/lib/TabGroup.js +1 -1
  60. package/lib/TabGroup.js.map +1 -1
  61. package/lib/Table.js +1 -1
  62. package/lib/Table.js.map +1 -1
  63. package/lib/TextField-2df7c697.js +2 -0
  64. package/lib/{TextField-c34519d4.js.map → TextField-2df7c697.js.map} +1 -1
  65. package/lib/Textarea.js +1 -1
  66. package/lib/Textarea.js.map +1 -1
  67. package/lib/Toast.js +1 -1
  68. package/lib/Toast.js.map +1 -1
  69. package/lib/ToastGroup.js +1 -1
  70. package/lib/ToastGroup.js.map +1 -1
  71. package/lib/Toggle.js +1 -1
  72. package/lib/Toggle.js.map +1 -1
  73. package/lib/Tooltip.js +1 -1
  74. package/lib/Tooltip.js.map +1 -1
  75. package/lib/bundle.js +23 -23
  76. package/lib/bundle.js.map +1 -1
  77. package/lib/index.js +1 -1
  78. package/lib/src/avatar/Avatar.d.ts +3 -1
  79. package/lib/src/badge/Badge.d.ts +10 -3
  80. package/lib/src/badge/Badge.test.d.ts +4 -0
  81. package/lib/src/banner/Banner.d.ts +3 -0
  82. package/lib/src/button/Button.d.ts +6 -0
  83. package/lib/src/calendar/Calendar.d.ts +3 -0
  84. package/lib/src/card/Card.d.ts +5 -0
  85. package/lib/src/command-menu/CommandMenu.d.ts +4 -0
  86. package/lib/src/divider/Divider.d.ts +3 -0
  87. package/lib/src/dropdown/Dropdown.d.ts +2 -0
  88. package/lib/src/input/Input.d.ts +6 -0
  89. package/lib/src/layout/Layout.d.ts +3 -1
  90. package/lib/src/modal/Modal.d.ts +4 -0
  91. package/lib/src/progress-bar/ProgressBar.d.ts +4 -0
  92. package/lib/src/skeleton/Skeleton.d.ts +6 -4
  93. package/lib/src/stack/Stack.d.ts +2 -0
  94. package/lib/src/tab/Tab.d.ts +3 -0
  95. package/lib/src/tab/Tab.test.d.ts +1 -1
  96. package/lib/src/tab-group/TabGroup.d.ts +2 -0
  97. package/lib/src/table/Table.d.ts +3 -0
  98. package/lib/src/textarea/Textarea.d.ts +8 -0
  99. package/lib/src/toast/Toast.d.ts +2 -4
  100. package/lib/src/toast-group/ToastGroup.d.ts +2 -3
  101. package/package.json +6 -6
  102. package/lib/Calendar-df35e1cd.js +0 -2
  103. package/lib/Calendar-df35e1cd.js.map +0 -1
  104. package/lib/DraftComponentMixin-9e4b7b34.js +0 -2
  105. package/lib/DraftComponentMixin-9e4b7b34.js.map +0 -1
  106. package/lib/TextField-c34519d4.js +0 -2
@@ -377,6 +377,13 @@
377
377
  "kind": "class",
378
378
  "description": "Avatar is used for showing a thumbnail representation of a user or entity.\nDefault avatar illustration is displayed when no src is specified.",
379
379
  "name": "Avatar",
380
+ "cssProperties": [
381
+ {
382
+ "description": "Controls the size of the avatar, using [icon sizing tokens](/tokens/#size).",
383
+ "name": "--n-avatar-size",
384
+ "default": "var(--n-size-icon-l)"
385
+ }
386
+ ],
380
387
  "members": [
381
388
  {
382
389
  "kind": "field",
@@ -505,125 +512,233 @@
505
512
  },
506
513
  {
507
514
  "kind": "javascript-module",
508
- "path": "src/button/Button.ts",
515
+ "path": "src/banner/Banner.ts",
509
516
  "declarations": [
510
517
  {
511
518
  "kind": "class",
512
- "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.",
513
- "name": "Button",
519
+ "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.",
520
+ "name": "Banner",
521
+ "cssProperties": [
522
+ {
523
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
524
+ "name": "--n-banner-border-radius",
525
+ "default": "var(--n-border-radius)"
526
+ },
527
+ {
528
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
529
+ "name": "--n-banner-box-shadow",
530
+ "default": "var(--n-box-shadow-card)"
531
+ }
532
+ ],
514
533
  "slots": [
515
534
  {
516
- "description": "The button content",
535
+ "description": "default slot",
517
536
  "name": ""
518
- },
537
+ }
538
+ ],
539
+ "members": [
519
540
  {
520
- "description": "Used to place content at the start of button text. Typically used for icons.",
521
- "name": "start"
541
+ "kind": "field",
542
+ "name": "variant",
543
+ "type": {
544
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
545
+ },
546
+ "default": "\"info\"",
547
+ "description": "The style variant of the banner.",
548
+ "attribute": "variant",
549
+ "reflects": true
550
+ }
551
+ ],
552
+ "attributes": [
553
+ {
554
+ "name": "variant",
555
+ "type": {
556
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
557
+ },
558
+ "default": "\"info\"",
559
+ "description": "The style variant of the banner.",
560
+ "fieldName": "variant"
561
+ }
562
+ ],
563
+ "superclass": {
564
+ "name": "LitElement",
565
+ "package": "lit"
566
+ },
567
+ "status": "ready",
568
+ "category": "feedback",
569
+ "displayName": null,
570
+ "tagName": "nord-banner",
571
+ "customElement": true
572
+ }
573
+ ],
574
+ "exports": [
575
+ {
576
+ "kind": "js",
577
+ "name": "default",
578
+ "declaration": {
579
+ "name": "Banner",
580
+ "module": "src/banner/Banner.ts"
581
+ }
582
+ },
583
+ {
584
+ "kind": "custom-element-definition",
585
+ "name": "nord-banner",
586
+ "declaration": {
587
+ "name": "Banner",
588
+ "module": "src/banner/Banner.ts"
589
+ }
590
+ }
591
+ ],
592
+ "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"
593
+ },
594
+ {
595
+ "kind": "javascript-module",
596
+ "path": "src/calendar/Calendar.ts",
597
+ "declarations": [
598
+ {
599
+ "kind": "class",
600
+ "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.",
601
+ "name": "Calendar",
602
+ "cssProperties": [
603
+ {
604
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
605
+ "name": "--n-calendar-border-radius",
606
+ "default": "var(--n-border-radius)"
522
607
  },
523
608
  {
524
- "description": "Used to place content at the end of button text. Typically used for icons.",
525
- "name": "end"
609
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
610
+ "name": "--n-calendar-box-shadow",
611
+ "default": "var(--n-box-shadow-popout)"
526
612
  }
527
613
  ],
528
614
  "members": [
529
615
  {
530
616
  "kind": "field",
531
- "name": "buttonRef",
617
+ "name": "dialogLabelId",
618
+ "type": {
619
+ "text": "string"
620
+ },
621
+ "privacy": "private",
622
+ "default": "\"dialog-header\""
623
+ },
624
+ {
625
+ "kind": "field",
626
+ "name": "monthSelectNode",
627
+ "type": {
628
+ "text": "HTMLElement"
629
+ },
532
630
  "privacy": "private"
533
631
  },
534
632
  {
535
633
  "kind": "field",
536
- "name": "events",
634
+ "name": "focusedDayNode",
635
+ "type": {
636
+ "text": "HTMLButtonElement"
637
+ },
638
+ "privacy": "private"
639
+ },
640
+ {
641
+ "kind": "field",
642
+ "name": "direction",
537
643
  "privacy": "private",
538
- "default": "new EventController(this)"
644
+ "default": "new DirectionController(this)"
539
645
  },
540
646
  {
541
647
  "kind": "field",
542
- "name": "lightDom",
648
+ "name": "swipe",
543
649
  "privacy": "private",
544
- "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
650
+ "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
545
651
  },
546
652
  {
547
653
  "kind": "field",
548
- "name": "variant",
654
+ "name": "shortcuts",
655
+ "privacy": "private"
656
+ },
657
+ {
658
+ "kind": "field",
659
+ "name": "localize",
660
+ "privacy": "private",
661
+ "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
662
+ },
663
+ {
664
+ "kind": "field",
665
+ "name": "dateFormatShort",
549
666
  "type": {
550
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
667
+ "text": "Intl.DateTimeFormat"
551
668
  },
552
- "default": "\"default\"",
553
- "description": "The style variant of the button.",
554
- "attribute": "variant",
555
- "reflects": true
669
+ "privacy": "private",
670
+ "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"
556
671
  },
557
672
  {
558
673
  "kind": "field",
559
- "name": "type",
674
+ "name": "monthNames",
560
675
  "type": {
561
- "text": "\"button\" | \"submit\" | \"reset\""
676
+ "text": "string[]"
562
677
  },
563
- "default": "\"submit\"",
564
- "description": "The type of the button.",
565
- "attribute": "type",
566
- "reflects": true
678
+ "privacy": "private"
567
679
  },
568
680
  {
569
681
  "kind": "field",
570
- "name": "size",
682
+ "name": "monthNamesShort",
571
683
  "type": {
572
- "text": "\"s\" | \"m\" | \"l\""
684
+ "text": "string[]"
573
685
  },
574
- "default": "\"m\"",
575
- "description": "The size of the button.\nThis affects font-size and padding.",
576
- "attribute": "size",
577
- "reflects": true
686
+ "privacy": "private"
578
687
  },
579
688
  {
580
689
  "kind": "field",
581
- "name": "accessibleExpanded",
690
+ "name": "dayNames",
582
691
  "type": {
583
- "text": "\"true\" | \"false\" | undefined"
692
+ "text": "string[]"
584
693
  },
585
- "privacy": "private",
586
- "attribute": "aria-expanded"
694
+ "privacy": "private"
587
695
  },
588
696
  {
589
697
  "kind": "field",
590
- "name": "accessibleHasPopup",
698
+ "name": "dayNamesShort",
591
699
  "type": {
592
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
700
+ "text": "string[]"
593
701
  },
594
- "privacy": "private",
595
- "attribute": "aria-haspopup"
702
+ "privacy": "private"
596
703
  },
597
704
  {
598
705
  "kind": "field",
599
- "name": "href",
706
+ "name": "value",
600
707
  "type": {
601
- "text": "string | undefined"
708
+ "text": "string"
602
709
  },
603
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
604
- "attribute": "href",
605
- "reflects": true
710
+ "default": "\"\"",
711
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
712
+ "attribute": "value"
606
713
  },
607
714
  {
608
715
  "kind": "field",
609
- "name": "download",
716
+ "name": "firstDayOfWeek",
610
717
  "type": {
611
- "text": "boolean"
718
+ "text": "DaysOfWeek"
612
719
  },
613
- "default": "false",
614
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
615
- "attribute": "download"
720
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
721
+ "attribute": "firstDayOfWeek"
616
722
  },
617
723
  {
618
724
  "kind": "field",
619
- "name": "target",
725
+ "name": "min",
620
726
  "type": {
621
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
727
+ "text": "string"
622
728
  },
623
- "default": "\"_self\"",
624
- "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.",
625
- "attribute": "target",
626
- "reflects": true
729
+ "default": "\"\"",
730
+ "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.",
731
+ "attribute": "min"
732
+ },
733
+ {
734
+ "kind": "field",
735
+ "name": "max",
736
+ "type": {
737
+ "text": "string"
738
+ },
739
+ "default": "\"\"",
740
+ "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.",
741
+ "attribute": "max"
627
742
  },
628
743
  {
629
744
  "kind": "field",
@@ -632,316 +747,248 @@
632
747
  "text": "boolean"
633
748
  },
634
749
  "default": "false",
635
- "description": "Controls whether the button expands to fill the width of its container.",
750
+ "description": "Controls whether the calendar expands to fill the width of its container.",
636
751
  "attribute": "expand",
637
752
  "reflects": true
638
753
  },
639
754
  {
640
755
  "kind": "field",
641
- "name": "loading",
756
+ "name": "isDateDisabled",
757
+ "type": {
758
+ "text": "DateDisabledPredicate"
759
+ },
760
+ "default": "isDateDisabled",
761
+ "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
762
+ },
763
+ {
764
+ "kind": "field",
765
+ "name": "activeFocus",
642
766
  "type": {
643
767
  "text": "boolean"
644
768
  },
645
- "default": "false",
646
- "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.",
647
- "attribute": "loading",
648
- "reflects": true
769
+ "privacy": "private",
770
+ "default": "false"
649
771
  },
650
772
  {
651
- "kind": "method",
652
- "name": "renderLink",
773
+ "kind": "field",
774
+ "name": "focusedDay",
653
775
  "privacy": "private",
654
- "parameters": [
655
- {
656
- "name": "innards",
657
- "type": {
658
- "text": "TemplateResult"
659
- }
660
- }
661
- ],
662
- "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."
776
+ "default": "new Date()"
663
777
  },
664
778
  {
665
779
  "kind": "method",
666
- "name": "renderButton",
667
- "privacy": "private",
780
+ "name": "focus",
668
781
  "parameters": [
669
782
  {
670
- "name": "innards",
783
+ "name": "options",
784
+ "optional": true,
671
785
  "type": {
672
- "text": "TemplateResult"
673
- }
786
+ "text": "FocusOptions & { target: \"day\" | \"month\" }"
787
+ },
788
+ "description": "An object which controls aspects of the focusing process."
674
789
  }
675
- ]
790
+ ],
791
+ "description": "Programmatically move focus to the calendar."
676
792
  },
677
793
  {
678
794
  "kind": "method",
679
- "name": "renderLightDom",
795
+ "name": "handleValueChange",
796
+ "privacy": "protected"
797
+ },
798
+ {
799
+ "kind": "method",
800
+ "name": "handleFocusedDayChange",
801
+ "privacy": "protected"
802
+ },
803
+ {
804
+ "kind": "method",
805
+ "name": "handleLangChange",
680
806
  "privacy": "private"
681
807
  },
682
808
  {
683
809
  "kind": "field",
684
- "name": "handleOuterClick",
810
+ "name": "handleDaySelect",
685
811
  "privacy": "private"
686
812
  },
687
813
  {
688
814
  "kind": "method",
689
- "name": "handleClick",
815
+ "name": "addDays",
690
816
  "privacy": "private",
691
817
  "parameters": [
692
818
  {
693
- "name": "e",
819
+ "name": "days",
694
820
  "type": {
695
- "text": "Event"
821
+ "text": "number"
696
822
  }
697
823
  }
698
824
  ]
699
825
  },
700
826
  {
701
827
  "kind": "method",
702
- "name": "handleProxyChange",
828
+ "name": "addMonths",
703
829
  "privacy": "private",
704
830
  "parameters": [
705
831
  {
706
- "name": "e",
832
+ "name": "months",
707
833
  "type": {
708
- "text": "Event"
834
+ "text": "number"
709
835
  }
710
836
  }
711
- ],
712
- "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."
837
+ ]
713
838
  },
714
839
  {
715
- "kind": "field",
716
- "name": "disabled",
717
- "type": {
718
- "text": "boolean"
719
- },
720
- "default": "false",
721
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
722
- "attribute": "disabled",
723
- "reflects": true,
724
- "inheritedFrom": {
725
- "name": "InputMixin",
726
- "module": "src/common/mixins/InputMixin.ts"
727
- }
840
+ "kind": "method",
841
+ "name": "addYears",
842
+ "privacy": "private",
843
+ "parameters": [
844
+ {
845
+ "name": "years",
846
+ "type": {
847
+ "text": "number"
848
+ }
849
+ }
850
+ ]
728
851
  },
729
852
  {
730
- "kind": "field",
731
- "name": "name",
732
- "type": {
733
- "text": "string | undefined"
734
- },
735
- "description": "The name of the form component.",
736
- "attribute": "name",
737
- "inheritedFrom": {
738
- "name": "InputMixin",
739
- "module": "src/common/mixins/InputMixin.ts"
740
- }
853
+ "kind": "method",
854
+ "name": "startOfWeek",
855
+ "privacy": "private"
741
856
  },
742
857
  {
743
- "kind": "field",
744
- "name": "value",
745
- "type": {
746
- "text": "string"
747
- },
748
- "default": "\"\"",
749
- "description": "The value of the form component.",
750
- "attribute": "value",
751
- "inheritedFrom": {
752
- "name": "InputMixin",
753
- "module": "src/common/mixins/InputMixin.ts"
754
- }
858
+ "kind": "method",
859
+ "name": "endOfWeek",
860
+ "privacy": "private"
755
861
  },
756
862
  {
757
- "kind": "field",
758
- "name": "form",
759
- "description": "Gets the form, if any, associated with the form element.",
760
- "inheritedFrom": {
761
- "name": "InputMixin",
762
- "module": "src/common/mixins/InputMixin.ts"
763
- }
863
+ "kind": "method",
864
+ "name": "setMonth",
865
+ "privacy": "private",
866
+ "parameters": [
867
+ {
868
+ "name": "month",
869
+ "type": {
870
+ "text": "number"
871
+ }
872
+ }
873
+ ]
764
874
  },
765
875
  {
766
- "kind": "field",
767
- "name": "focusableRef",
768
- "privacy": "protected",
769
- "inheritedFrom": {
770
- "name": "FocusableMixin",
771
- "module": "src/common/mixins/FocusableMixin.ts"
772
- }
876
+ "kind": "method",
877
+ "name": "setYear",
878
+ "privacy": "private",
879
+ "parameters": [
880
+ {
881
+ "name": "year",
882
+ "type": {
883
+ "text": "number"
884
+ }
885
+ }
886
+ ]
773
887
  },
774
888
  {
775
889
  "kind": "method",
776
- "name": "focus",
890
+ "name": "setFocusedDay",
891
+ "privacy": "private",
777
892
  "parameters": [
778
893
  {
779
- "name": "options",
780
- "optional": true,
894
+ "name": "day",
781
895
  "type": {
782
- "text": "FocusOptions"
783
- },
784
- "description": "An object which controls aspects of the focusing process."
896
+ "text": "Date"
897
+ }
785
898
  }
786
- ],
787
- "description": "Programmatically move focus to the component.",
788
- "inheritedFrom": {
789
- "name": "FocusableMixin",
790
- "module": "src/common/mixins/FocusableMixin.ts"
791
- }
899
+ ]
792
900
  },
793
901
  {
794
- "kind": "method",
795
- "name": "blur",
796
- "description": "Programmatically remove focus from the component.",
797
- "inheritedFrom": {
798
- "name": "FocusableMixin",
799
- "module": "src/common/mixins/FocusableMixin.ts"
800
- }
902
+ "kind": "field",
903
+ "name": "handleMonthSelect",
904
+ "privacy": "private"
801
905
  },
802
906
  {
803
- "kind": "method",
804
- "name": "click",
805
- "description": "Programmatically simulates a click on the component.",
806
- "inheritedFrom": {
807
- "name": "FocusableMixin",
808
- "module": "src/common/mixins/FocusableMixin.ts"
809
- }
810
- }
811
- ],
812
- "attributes": [
907
+ "kind": "field",
908
+ "name": "handleYearSelect",
909
+ "privacy": "private"
910
+ },
813
911
  {
814
- "name": "variant",
815
- "type": {
816
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
817
- },
818
- "default": "\"default\"",
819
- "description": "The style variant of the button.",
820
- "fieldName": "variant"
912
+ "kind": "field",
913
+ "name": "handleNextMonthClick",
914
+ "privacy": "private"
821
915
  },
822
916
  {
823
- "name": "type",
824
- "type": {
825
- "text": "\"button\" | \"submit\" | \"reset\""
826
- },
827
- "default": "\"submit\"",
828
- "description": "The type of the button.",
829
- "fieldName": "type"
917
+ "kind": "field",
918
+ "name": "handlePreviousMonthClick",
919
+ "privacy": "private"
830
920
  },
831
921
  {
832
- "name": "size",
833
- "type": {
834
- "text": "\"s\" | \"m\" | \"l\""
835
- },
836
- "default": "\"m\"",
837
- "description": "The size of the button.\nThis affects font-size and padding.",
838
- "fieldName": "size"
922
+ "kind": "field",
923
+ "name": "enableActiveFocus",
924
+ "privacy": "private"
839
925
  },
840
926
  {
841
- "name": "aria-expanded",
927
+ "kind": "field",
928
+ "name": "disableActiveFocus",
929
+ "privacy": "private"
930
+ }
931
+ ],
932
+ "events": [
933
+ {
934
+ "name": "nord-focus-date",
842
935
  "type": {
843
- "text": "\"true\" | \"false\" | undefined"
936
+ "text": "DateSelectEvent"
844
937
  },
845
- "fieldName": "accessibleExpanded"
938
+ "description": "Dispatched when the calendar's focused date changes."
846
939
  },
847
940
  {
848
- "name": "aria-haspopup",
849
941
  "type": {
850
- "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
942
+ "text": "DateSelectEvent"
851
943
  },
852
- "fieldName": "accessibleHasPopup"
853
- },
944
+ "description": "Dispatched when a date is selected and the value changes.",
945
+ "name": "change"
946
+ }
947
+ ],
948
+ "attributes": [
854
949
  {
855
- "name": "href",
950
+ "name": "value",
856
951
  "type": {
857
- "text": "string | undefined"
952
+ "text": "string"
858
953
  },
859
- "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
860
- "fieldName": "href"
954
+ "default": "\"\"",
955
+ "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
956
+ "fieldName": "value"
861
957
  },
862
958
  {
863
- "name": "download",
959
+ "name": "firstDayOfWeek",
864
960
  "type": {
865
- "text": "boolean"
961
+ "text": "DaysOfWeek"
866
962
  },
867
- "default": "false",
868
- "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
869
- "fieldName": "download"
963
+ "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
964
+ "fieldName": "firstDayOfWeek"
870
965
  },
871
966
  {
872
- "name": "target",
967
+ "name": "min",
873
968
  "type": {
874
- "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
969
+ "text": "string"
875
970
  },
876
- "default": "\"_self\"",
877
- "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.",
878
- "fieldName": "target"
971
+ "default": "\"\"",
972
+ "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.",
973
+ "fieldName": "min"
879
974
  },
880
975
  {
881
- "name": "expand",
976
+ "name": "max",
882
977
  "type": {
883
- "text": "boolean"
978
+ "text": "string"
884
979
  },
885
- "default": "false",
886
- "description": "Controls whether the button expands to fill the width of its container.",
887
- "fieldName": "expand"
980
+ "default": "\"\"",
981
+ "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.",
982
+ "fieldName": "max"
888
983
  },
889
984
  {
890
- "name": "loading",
985
+ "name": "expand",
891
986
  "type": {
892
987
  "text": "boolean"
893
988
  },
894
989
  "default": "false",
895
- "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.",
896
- "fieldName": "loading"
897
- },
898
- {
899
- "name": "disabled",
900
- "type": {
901
- "text": "boolean"
902
- },
903
- "default": "false",
904
- "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
905
- "fieldName": "disabled",
906
- "inheritedFrom": {
907
- "name": "InputMixin",
908
- "module": "src/common/mixins/InputMixin.ts"
909
- }
910
- },
911
- {
912
- "name": "name",
913
- "type": {
914
- "text": "string | undefined"
915
- },
916
- "description": "The name of the form component.",
917
- "fieldName": "name",
918
- "inheritedFrom": {
919
- "name": "InputMixin",
920
- "module": "src/common/mixins/InputMixin.ts"
921
- }
922
- },
923
- {
924
- "name": "value",
925
- "type": {
926
- "text": "string"
927
- },
928
- "default": "\"\"",
929
- "description": "The value of the form component.",
930
- "fieldName": "value",
931
- "inheritedFrom": {
932
- "name": "InputMixin",
933
- "module": "src/common/mixins/InputMixin.ts"
934
- }
935
- }
936
- ],
937
- "mixins": [
938
- {
939
- "name": "InputMixin",
940
- "module": "/src/common/mixins/InputMixin.js"
941
- },
942
- {
943
- "name": "FocusableMixin",
944
- "module": "/src/common/mixins/FocusableMixin.js"
990
+ "description": "Controls whether the calendar expands to fill the width of its container.",
991
+ "fieldName": "expand"
945
992
  }
946
993
  ],
947
994
  "superclass": {
@@ -949,9 +996,9 @@
949
996
  "package": "lit"
950
997
  },
951
998
  "status": "ready",
952
- "category": "action",
999
+ "category": "list",
953
1000
  "displayName": null,
954
- "tagName": "nord-button",
1001
+ "tagName": "nord-calendar",
955
1002
  "customElement": true
956
1003
  }
957
1004
  ],
@@ -960,295 +1007,269 @@
960
1007
  "kind": "js",
961
1008
  "name": "default",
962
1009
  "declaration": {
963
- "name": "Button",
964
- "module": "src/button/Button.ts"
1010
+ "name": "Calendar",
1011
+ "module": "src/calendar/Calendar.ts"
965
1012
  }
966
1013
  },
967
1014
  {
968
1015
  "kind": "custom-element-definition",
969
- "name": "nord-button",
1016
+ "name": "nord-calendar",
970
1017
  "declaration": {
971
- "name": "Button",
972
- "module": "src/button/Button.ts"
1018
+ "name": "Calendar",
1019
+ "module": "src/calendar/Calendar.ts"
973
1020
  }
974
1021
  }
975
1022
  ],
976
- "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"
1023
+ "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"
977
1024
  },
978
1025
  {
979
1026
  "kind": "javascript-module",
980
- "path": "src/banner/Banner.ts",
1027
+ "path": "src/calendar/DateSelectEvent.ts",
981
1028
  "declarations": [
982
1029
  {
983
1030
  "kind": "class",
984
- "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.",
985
- "name": "Banner",
986
- "slots": [
987
- {
988
- "description": "default slot",
989
- "name": ""
990
- }
991
- ],
992
- "members": [
993
- {
994
- "kind": "field",
995
- "name": "variant",
996
- "type": {
997
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
998
- },
999
- "default": "\"info\"",
1000
- "description": "The style variant of the banner.",
1001
- "attribute": "variant",
1002
- "reflects": true
1003
- }
1004
- ],
1005
- "attributes": [
1006
- {
1007
- "name": "variant",
1008
- "type": {
1009
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1010
- },
1011
- "default": "\"info\"",
1012
- "description": "The style variant of the banner.",
1013
- "fieldName": "variant"
1014
- }
1015
- ],
1031
+ "description": "",
1032
+ "name": "DateSelectEvent",
1016
1033
  "superclass": {
1017
- "name": "LitElement",
1018
- "package": "lit"
1019
- },
1020
- "status": "ready",
1021
- "category": "feedback",
1022
- "displayName": null,
1023
- "tagName": "nord-banner",
1024
- "customElement": true
1034
+ "name": "NordEvent",
1035
+ "module": "/src/common/events.js"
1036
+ }
1025
1037
  }
1026
1038
  ],
1027
1039
  "exports": [
1028
1040
  {
1029
1041
  "kind": "js",
1030
- "name": "default",
1042
+ "name": "DateSelectEvent",
1031
1043
  "declaration": {
1032
- "name": "Banner",
1033
- "module": "src/banner/Banner.ts"
1044
+ "name": "DateSelectEvent",
1045
+ "module": "src/calendar/DateSelectEvent.ts"
1034
1046
  }
1035
- },
1047
+ }
1048
+ ],
1049
+ "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"
1050
+ },
1051
+ {
1052
+ "kind": "javascript-module",
1053
+ "path": "src/calendar/localization.ts",
1054
+ "declarations": [
1036
1055
  {
1037
- "kind": "custom-element-definition",
1038
- "name": "nord-banner",
1056
+ "kind": "variable",
1057
+ "name": "calendarLocalization",
1058
+ "type": {
1059
+ "text": "object"
1060
+ },
1061
+ "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1062
+ }
1063
+ ],
1064
+ "exports": [
1065
+ {
1066
+ "kind": "js",
1067
+ "name": "default",
1039
1068
  "declaration": {
1040
- "name": "Banner",
1041
- "module": "src/banner/Banner.ts"
1069
+ "name": "calendarLocalization",
1070
+ "module": "src/calendar/localization.ts"
1042
1071
  }
1043
1072
  }
1044
1073
  ],
1045
- "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"
1074
+ "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"
1046
1075
  },
1047
1076
  {
1048
1077
  "kind": "javascript-module",
1049
- "path": "src/badge/Badge.ts",
1078
+ "path": "src/calendar/month-view.ts",
1050
1079
  "declarations": [
1051
1080
  {
1052
- "kind": "class",
1053
- "description": "Badges are used to inform users of the status of an object or of an action that’s been taken. Commonly used in tabular data to indicate status.",
1054
- "name": "Badge",
1055
- "slots": [
1056
- {
1057
- "description": "The badge content.",
1058
- "name": ""
1059
- }
1060
- ],
1061
- "members": [
1081
+ "kind": "function",
1082
+ "name": "dayView",
1083
+ "parameters": [
1062
1084
  {
1063
- "kind": "field",
1064
- "name": "type",
1085
+ "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1065
1086
  "type": {
1066
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
1067
- },
1068
- "default": "\"info\"",
1069
- "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
1070
- "attribute": "type",
1071
- "reflects": true
1087
+ "text": "DatePickerDayProps"
1088
+ }
1072
1089
  }
1073
- ],
1074
- "attributes": [
1090
+ ]
1091
+ },
1092
+ {
1093
+ "kind": "function",
1094
+ "name": "monthView",
1095
+ "parameters": [
1075
1096
  {
1076
- "name": "type",
1097
+ "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}",
1077
1098
  "type": {
1078
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
1079
- },
1080
- "default": "\"info\"",
1081
- "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
1082
- "fieldName": "type"
1099
+ "text": "MonthViewArgs"
1100
+ }
1083
1101
  }
1084
- ],
1085
- "superclass": {
1086
- "name": "LitElement",
1087
- "package": "lit"
1088
- },
1089
- "status": "ready",
1090
- "category": "text",
1091
- "displayName": null,
1092
- "tagName": "nord-badge",
1093
- "customElement": true
1102
+ ]
1094
1103
  }
1095
1104
  ],
1096
1105
  "exports": [
1097
1106
  {
1098
1107
  "kind": "js",
1099
- "name": "default",
1108
+ "name": "dayView",
1100
1109
  "declaration": {
1101
- "name": "Badge",
1102
- "module": "src/badge/Badge.ts"
1110
+ "name": "dayView",
1111
+ "module": "src/calendar/month-view.ts"
1103
1112
  }
1104
1113
  },
1105
1114
  {
1106
- "kind": "custom-element-definition",
1107
- "name": "nord-badge",
1115
+ "kind": "js",
1116
+ "name": "monthView",
1108
1117
  "declaration": {
1109
- "name": "Badge",
1110
- "module": "src/badge/Badge.ts"
1118
+ "name": "monthView",
1119
+ "module": "src/calendar/month-view.ts"
1111
1120
  }
1112
1121
  }
1113
1122
  ],
1114
- "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 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- Use established color patterns so that users can clearly identify the importance level.\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| `info` | The default variant. 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"
1123
+ "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"
1115
1124
  },
1116
1125
  {
1117
1126
  "kind": "javascript-module",
1118
- "path": "src/calendar/Calendar.ts",
1127
+ "path": "src/button/Button.ts",
1119
1128
  "declarations": [
1120
1129
  {
1121
1130
  "kind": "class",
1122
- "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.",
1123
- "name": "Calendar",
1124
- "members": [
1131
+ "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.",
1132
+ "name": "Button",
1133
+ "cssProperties": [
1125
1134
  {
1126
- "kind": "field",
1127
- "name": "dialogLabelId",
1128
- "type": {
1129
- "text": "string"
1130
- },
1131
- "privacy": "private",
1132
- "default": "\"dialog-header\""
1135
+ "description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
1136
+ "name": "--n-button-border-radius",
1137
+ "default": "var(--n-border-radius-s)"
1133
1138
  },
1134
1139
  {
1135
- "kind": "field",
1136
- "name": "monthSelectNode",
1137
- "type": {
1138
- "text": "HTMLElement"
1139
- },
1140
- "privacy": "private"
1140
+ "description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
1141
+ "name": "--n-button-gap",
1142
+ "default": "var(--n-space-s)"
1141
1143
  },
1142
1144
  {
1143
- "kind": "field",
1144
- "name": "focusedDayNode",
1145
- "type": {
1146
- "text": "HTMLButtonElement"
1147
- },
1148
- "privacy": "private"
1145
+ "description": "Controls the overlayed gradient background on the button.",
1146
+ "name": "--n-button-gradient",
1147
+ "default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
1149
1148
  },
1150
1149
  {
1151
- "kind": "field",
1152
- "name": "direction",
1153
- "privacy": "private",
1154
- "default": "new DirectionController(this)"
1150
+ "description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
1151
+ "name": "--n-button-border-color",
1152
+ "default": "var(--n-color-border-strong)"
1155
1153
  },
1156
1154
  {
1157
- "kind": "field",
1158
- "name": "swipe",
1159
- "privacy": "private",
1160
- "default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
1155
+ "description": "Controls the text alignment for the text in the button.",
1156
+ "name": "--n-button-text-align",
1157
+ "default": "center"
1158
+ }
1159
+ ],
1160
+ "slots": [
1161
+ {
1162
+ "description": "The button content",
1163
+ "name": ""
1161
1164
  },
1162
1165
  {
1163
- "kind": "field",
1164
- "name": "shortcuts",
1165
- "privacy": "private"
1166
+ "description": "Used to place content at the start of button text. Typically used for icons.",
1167
+ "name": "start"
1166
1168
  },
1169
+ {
1170
+ "description": "Used to place content at the end of button text. Typically used for icons.",
1171
+ "name": "end"
1172
+ }
1173
+ ],
1174
+ "members": [
1167
1175
  {
1168
1176
  "kind": "field",
1169
- "name": "localize",
1177
+ "name": "buttonRef",
1178
+ "privacy": "private"
1179
+ },
1180
+ {
1181
+ "kind": "field",
1182
+ "name": "events",
1170
1183
  "privacy": "private",
1171
- "default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
1184
+ "default": "new EventController(this)"
1172
1185
  },
1173
1186
  {
1174
1187
  "kind": "field",
1175
- "name": "dateFormatShort",
1176
- "type": {
1177
- "text": "Intl.DateTimeFormat"
1178
- },
1188
+ "name": "lightDom",
1179
1189
  "privacy": "private",
1180
- "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"
1190
+ "default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
1181
1191
  },
1182
1192
  {
1183
1193
  "kind": "field",
1184
- "name": "monthNames",
1194
+ "name": "variant",
1185
1195
  "type": {
1186
- "text": "string[]"
1196
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1187
1197
  },
1188
- "privacy": "private"
1198
+ "default": "\"default\"",
1199
+ "description": "The style variant of the button.",
1200
+ "attribute": "variant",
1201
+ "reflects": true
1189
1202
  },
1190
1203
  {
1191
1204
  "kind": "field",
1192
- "name": "monthNamesShort",
1205
+ "name": "type",
1193
1206
  "type": {
1194
- "text": "string[]"
1207
+ "text": "\"button\" | \"submit\" | \"reset\""
1195
1208
  },
1196
- "privacy": "private"
1209
+ "default": "\"submit\"",
1210
+ "description": "The type of the button.",
1211
+ "attribute": "type",
1212
+ "reflects": true
1197
1213
  },
1198
1214
  {
1199
1215
  "kind": "field",
1200
- "name": "dayNames",
1216
+ "name": "size",
1201
1217
  "type": {
1202
- "text": "string[]"
1218
+ "text": "\"s\" | \"m\" | \"l\""
1203
1219
  },
1204
- "privacy": "private"
1220
+ "default": "\"m\"",
1221
+ "description": "The size of the button.\nThis affects font-size and padding.",
1222
+ "attribute": "size",
1223
+ "reflects": true
1205
1224
  },
1206
1225
  {
1207
1226
  "kind": "field",
1208
- "name": "dayNamesShort",
1227
+ "name": "accessibleExpanded",
1209
1228
  "type": {
1210
- "text": "string[]"
1229
+ "text": "\"true\" | \"false\" | undefined"
1211
1230
  },
1212
- "privacy": "private"
1231
+ "privacy": "private",
1232
+ "attribute": "aria-expanded"
1213
1233
  },
1214
1234
  {
1215
1235
  "kind": "field",
1216
- "name": "value",
1236
+ "name": "accessibleHasPopup",
1217
1237
  "type": {
1218
- "text": "string"
1238
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1219
1239
  },
1220
- "default": "\"\"",
1221
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1222
- "attribute": "value"
1240
+ "privacy": "private",
1241
+ "attribute": "aria-haspopup"
1223
1242
  },
1224
1243
  {
1225
1244
  "kind": "field",
1226
- "name": "firstDayOfWeek",
1245
+ "name": "href",
1227
1246
  "type": {
1228
- "text": "DaysOfWeek"
1247
+ "text": "string | undefined"
1229
1248
  },
1230
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1231
- "attribute": "firstDayOfWeek"
1249
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1250
+ "attribute": "href",
1251
+ "reflects": true
1232
1252
  },
1233
1253
  {
1234
1254
  "kind": "field",
1235
- "name": "min",
1255
+ "name": "download",
1236
1256
  "type": {
1237
- "text": "string"
1257
+ "text": "boolean"
1238
1258
  },
1239
- "default": "\"\"",
1240
- "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.",
1241
- "attribute": "min"
1259
+ "default": "false",
1260
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1261
+ "attribute": "download"
1242
1262
  },
1243
1263
  {
1244
1264
  "kind": "field",
1245
- "name": "max",
1265
+ "name": "target",
1246
1266
  "type": {
1247
- "text": "string"
1267
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1248
1268
  },
1249
- "default": "\"\"",
1250
- "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.",
1251
- "attribute": "max"
1269
+ "default": "\"_self\"",
1270
+ "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.",
1271
+ "attribute": "target",
1272
+ "reflects": true
1252
1273
  },
1253
1274
  {
1254
1275
  "kind": "field",
@@ -1257,447 +1278,316 @@
1257
1278
  "text": "boolean"
1258
1279
  },
1259
1280
  "default": "false",
1260
- "description": "Controls whether the calendar expands to fill the width of its container.",
1281
+ "description": "Controls whether the button expands to fill the width of its container.",
1261
1282
  "attribute": "expand",
1262
1283
  "reflects": true
1263
1284
  },
1264
1285
  {
1265
1286
  "kind": "field",
1266
- "name": "isDateDisabled",
1267
- "type": {
1268
- "text": "DateDisabledPredicate"
1269
- },
1270
- "default": "isDateDisabled",
1271
- "description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
1272
- },
1273
- {
1274
- "kind": "field",
1275
- "name": "activeFocus",
1287
+ "name": "loading",
1276
1288
  "type": {
1277
1289
  "text": "boolean"
1278
1290
  },
1279
- "privacy": "private",
1280
- "default": "false"
1281
- },
1282
- {
1283
- "kind": "field",
1284
- "name": "focusedDay",
1285
- "privacy": "private",
1286
- "default": "new Date()"
1287
- },
1288
- {
1289
- "kind": "method",
1290
- "name": "focus",
1291
- "parameters": [
1292
- {
1293
- "name": "options",
1294
- "optional": true,
1295
- "type": {
1296
- "text": "FocusOptions & { target: \"day\" | \"month\" }"
1297
- },
1298
- "description": "An object which controls aspects of the focusing process."
1299
- }
1300
- ],
1301
- "description": "Programmatically move focus to the calendar."
1302
- },
1303
- {
1304
- "kind": "method",
1305
- "name": "handleValueChange",
1306
- "privacy": "protected"
1307
- },
1308
- {
1309
- "kind": "method",
1310
- "name": "handleFocusedDayChange",
1311
- "privacy": "protected"
1312
- },
1313
- {
1314
- "kind": "method",
1315
- "name": "handleLangChange",
1316
- "privacy": "private"
1317
- },
1318
- {
1319
- "kind": "field",
1320
- "name": "handleDaySelect",
1321
- "privacy": "private"
1322
- },
1323
- {
1324
- "kind": "method",
1325
- "name": "addDays",
1326
- "privacy": "private",
1327
- "parameters": [
1328
- {
1329
- "name": "days",
1330
- "type": {
1331
- "text": "number"
1332
- }
1333
- }
1334
- ]
1291
+ "default": "false",
1292
+ "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.",
1293
+ "attribute": "loading",
1294
+ "reflects": true
1335
1295
  },
1336
1296
  {
1337
1297
  "kind": "method",
1338
- "name": "addMonths",
1298
+ "name": "renderLink",
1339
1299
  "privacy": "private",
1340
1300
  "parameters": [
1341
1301
  {
1342
- "name": "months",
1302
+ "name": "innards",
1343
1303
  "type": {
1344
- "text": "number"
1304
+ "text": "TemplateResult"
1345
1305
  }
1346
1306
  }
1347
- ]
1307
+ ],
1308
+ "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."
1348
1309
  },
1349
1310
  {
1350
1311
  "kind": "method",
1351
- "name": "addYears",
1312
+ "name": "renderButton",
1352
1313
  "privacy": "private",
1353
1314
  "parameters": [
1354
1315
  {
1355
- "name": "years",
1316
+ "name": "innards",
1356
1317
  "type": {
1357
- "text": "number"
1318
+ "text": "TemplateResult"
1358
1319
  }
1359
1320
  }
1360
1321
  ]
1361
1322
  },
1362
1323
  {
1363
1324
  "kind": "method",
1364
- "name": "startOfWeek",
1325
+ "name": "renderLightDom",
1365
1326
  "privacy": "private"
1366
1327
  },
1367
1328
  {
1368
- "kind": "method",
1369
- "name": "endOfWeek",
1329
+ "kind": "field",
1330
+ "name": "handleOuterClick",
1370
1331
  "privacy": "private"
1371
1332
  },
1372
1333
  {
1373
1334
  "kind": "method",
1374
- "name": "setMonth",
1375
- "privacy": "private",
1376
- "parameters": [
1377
- {
1378
- "name": "month",
1379
- "type": {
1380
- "text": "number"
1381
- }
1382
- }
1383
- ]
1384
- },
1385
- {
1386
- "kind": "method",
1387
- "name": "setYear",
1335
+ "name": "handleClick",
1388
1336
  "privacy": "private",
1389
1337
  "parameters": [
1390
1338
  {
1391
- "name": "year",
1339
+ "name": "e",
1392
1340
  "type": {
1393
- "text": "number"
1341
+ "text": "Event"
1394
1342
  }
1395
1343
  }
1396
1344
  ]
1397
1345
  },
1398
1346
  {
1399
1347
  "kind": "method",
1400
- "name": "setFocusedDay",
1348
+ "name": "handleProxyChange",
1401
1349
  "privacy": "private",
1402
1350
  "parameters": [
1403
1351
  {
1404
- "name": "day",
1352
+ "name": "e",
1405
1353
  "type": {
1406
- "text": "Date"
1354
+ "text": "Event"
1407
1355
  }
1408
1356
  }
1409
- ]
1357
+ ],
1358
+ "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."
1410
1359
  },
1411
1360
  {
1412
1361
  "kind": "field",
1413
- "name": "handleMonthSelect",
1414
- "privacy": "private"
1362
+ "name": "disabled",
1363
+ "type": {
1364
+ "text": "boolean"
1365
+ },
1366
+ "default": "false",
1367
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1368
+ "attribute": "disabled",
1369
+ "reflects": true,
1370
+ "inheritedFrom": {
1371
+ "name": "InputMixin",
1372
+ "module": "src/common/mixins/InputMixin.ts"
1373
+ }
1415
1374
  },
1416
1375
  {
1417
1376
  "kind": "field",
1418
- "name": "handleYearSelect",
1419
- "privacy": "private"
1377
+ "name": "name",
1378
+ "type": {
1379
+ "text": "string | undefined"
1380
+ },
1381
+ "description": "The name of the form component.",
1382
+ "attribute": "name",
1383
+ "inheritedFrom": {
1384
+ "name": "InputMixin",
1385
+ "module": "src/common/mixins/InputMixin.ts"
1386
+ }
1420
1387
  },
1421
1388
  {
1422
1389
  "kind": "field",
1423
- "name": "handleNextMonthClick",
1424
- "privacy": "private"
1390
+ "name": "value",
1391
+ "type": {
1392
+ "text": "string"
1393
+ },
1394
+ "default": "\"\"",
1395
+ "description": "The value of the form component.",
1396
+ "attribute": "value",
1397
+ "inheritedFrom": {
1398
+ "name": "InputMixin",
1399
+ "module": "src/common/mixins/InputMixin.ts"
1400
+ }
1425
1401
  },
1426
1402
  {
1427
1403
  "kind": "field",
1428
- "name": "handlePreviousMonthClick",
1429
- "privacy": "private"
1404
+ "name": "form",
1405
+ "description": "Gets the form, if any, associated with the form element.",
1406
+ "inheritedFrom": {
1407
+ "name": "InputMixin",
1408
+ "module": "src/common/mixins/InputMixin.ts"
1409
+ }
1430
1410
  },
1431
1411
  {
1432
1412
  "kind": "field",
1433
- "name": "enableActiveFocus",
1434
- "privacy": "private"
1413
+ "name": "focusableRef",
1414
+ "privacy": "protected",
1415
+ "inheritedFrom": {
1416
+ "name": "FocusableMixin",
1417
+ "module": "src/common/mixins/FocusableMixin.ts"
1418
+ }
1435
1419
  },
1436
1420
  {
1437
- "kind": "field",
1438
- "name": "disableActiveFocus",
1439
- "privacy": "private"
1421
+ "kind": "method",
1422
+ "name": "focus",
1423
+ "parameters": [
1424
+ {
1425
+ "name": "options",
1426
+ "optional": true,
1427
+ "type": {
1428
+ "text": "FocusOptions"
1429
+ },
1430
+ "description": "An object which controls aspects of the focusing process."
1431
+ }
1432
+ ],
1433
+ "description": "Programmatically move focus to the component.",
1434
+ "inheritedFrom": {
1435
+ "name": "FocusableMixin",
1436
+ "module": "src/common/mixins/FocusableMixin.ts"
1437
+ }
1438
+ },
1439
+ {
1440
+ "kind": "method",
1441
+ "name": "blur",
1442
+ "description": "Programmatically remove focus from the component.",
1443
+ "inheritedFrom": {
1444
+ "name": "FocusableMixin",
1445
+ "module": "src/common/mixins/FocusableMixin.ts"
1446
+ }
1447
+ },
1448
+ {
1449
+ "kind": "method",
1450
+ "name": "click",
1451
+ "description": "Programmatically simulates a click on the component.",
1452
+ "inheritedFrom": {
1453
+ "name": "FocusableMixin",
1454
+ "module": "src/common/mixins/FocusableMixin.ts"
1455
+ }
1440
1456
  }
1441
1457
  ],
1442
- "events": [
1458
+ "attributes": [
1443
1459
  {
1444
- "name": "nord-focus-date",
1460
+ "name": "variant",
1445
1461
  "type": {
1446
- "text": "DateSelectEvent"
1462
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
1447
1463
  },
1448
- "description": "Dispatched when the calendar's focused date changes."
1464
+ "default": "\"default\"",
1465
+ "description": "The style variant of the button.",
1466
+ "fieldName": "variant"
1449
1467
  },
1450
1468
  {
1469
+ "name": "type",
1451
1470
  "type": {
1452
- "text": "DateSelectEvent"
1471
+ "text": "\"button\" | \"submit\" | \"reset\""
1453
1472
  },
1454
- "description": "Dispatched when a date is selected and the value changes.",
1455
- "name": "change"
1456
- }
1457
- ],
1458
- "attributes": [
1473
+ "default": "\"submit\"",
1474
+ "description": "The type of the button.",
1475
+ "fieldName": "type"
1476
+ },
1459
1477
  {
1460
- "name": "value",
1478
+ "name": "size",
1461
1479
  "type": {
1462
- "text": "string"
1480
+ "text": "\"s\" | \"m\" | \"l\""
1463
1481
  },
1464
- "default": "\"\"",
1465
- "description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
1466
- "fieldName": "value"
1482
+ "default": "\"m\"",
1483
+ "description": "The size of the button.\nThis affects font-size and padding.",
1484
+ "fieldName": "size"
1467
1485
  },
1468
1486
  {
1469
- "name": "firstDayOfWeek",
1487
+ "name": "aria-expanded",
1470
1488
  "type": {
1471
- "text": "DaysOfWeek"
1489
+ "text": "\"true\" | \"false\" | undefined"
1472
1490
  },
1473
- "description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
1474
- "fieldName": "firstDayOfWeek"
1491
+ "fieldName": "accessibleExpanded"
1475
1492
  },
1476
1493
  {
1477
- "name": "min",
1494
+ "name": "aria-haspopup",
1478
1495
  "type": {
1479
- "text": "string"
1496
+ "text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
1480
1497
  },
1481
- "default": "\"\"",
1482
- "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.",
1483
- "fieldName": "min"
1498
+ "fieldName": "accessibleHasPopup"
1484
1499
  },
1485
1500
  {
1486
- "name": "max",
1501
+ "name": "href",
1487
1502
  "type": {
1488
- "text": "string"
1503
+ "text": "string | undefined"
1489
1504
  },
1490
- "default": "\"\"",
1491
- "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.",
1492
- "fieldName": "max"
1505
+ "description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
1506
+ "fieldName": "href"
1493
1507
  },
1494
1508
  {
1495
- "name": "expand",
1509
+ "name": "download",
1496
1510
  "type": {
1497
1511
  "text": "boolean"
1498
1512
  },
1499
1513
  "default": "false",
1500
- "description": "Controls whether the calendar expands to fill the width of its container.",
1501
- "fieldName": "expand"
1502
- }
1503
- ],
1504
- "superclass": {
1505
- "name": "LitElement",
1506
- "package": "lit"
1507
- },
1508
- "status": "ready",
1509
- "category": "list",
1510
- "displayName": null,
1511
- "tagName": "nord-calendar",
1512
- "customElement": true
1513
- }
1514
- ],
1515
- "exports": [
1516
- {
1517
- "kind": "js",
1518
- "name": "default",
1519
- "declaration": {
1520
- "name": "Calendar",
1521
- "module": "src/calendar/Calendar.ts"
1522
- }
1523
- },
1524
- {
1525
- "kind": "custom-element-definition",
1526
- "name": "nord-calendar",
1527
- "declaration": {
1528
- "name": "Calendar",
1529
- "module": "src/calendar/Calendar.ts"
1530
- }
1531
- }
1532
- ],
1533
- "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"
1534
- },
1535
- {
1536
- "kind": "javascript-module",
1537
- "path": "src/calendar/DateSelectEvent.ts",
1538
- "declarations": [
1539
- {
1540
- "kind": "class",
1541
- "description": "",
1542
- "name": "DateSelectEvent",
1543
- "superclass": {
1544
- "name": "NordEvent",
1545
- "module": "/src/common/events.js"
1546
- }
1547
- }
1548
- ],
1549
- "exports": [
1550
- {
1551
- "kind": "js",
1552
- "name": "DateSelectEvent",
1553
- "declaration": {
1554
- "name": "DateSelectEvent",
1555
- "module": "src/calendar/DateSelectEvent.ts"
1556
- }
1557
- }
1558
- ],
1559
- "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"
1560
- },
1561
- {
1562
- "kind": "javascript-module",
1563
- "path": "src/calendar/localization.ts",
1564
- "declarations": [
1565
- {
1566
- "kind": "variable",
1567
- "name": "calendarLocalization",
1568
- "type": {
1569
- "text": "object"
1570
- },
1571
- "default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
1572
- }
1573
- ],
1574
- "exports": [
1575
- {
1576
- "kind": "js",
1577
- "name": "default",
1578
- "declaration": {
1579
- "name": "calendarLocalization",
1580
- "module": "src/calendar/localization.ts"
1581
- }
1582
- }
1583
- ],
1584
- "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"
1585
- },
1586
- {
1587
- "kind": "javascript-module",
1588
- "path": "src/calendar/month-view.ts",
1589
- "declarations": [
1590
- {
1591
- "kind": "function",
1592
- "name": "dayView",
1593
- "parameters": [
1594
- {
1595
- "name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
1596
- "type": {
1597
- "text": "DatePickerDayProps"
1598
- }
1599
- }
1600
- ]
1601
- },
1602
- {
1603
- "kind": "function",
1604
- "name": "monthView",
1605
- "parameters": [
1606
- {
1607
- "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}",
1608
- "type": {
1609
- "text": "MonthViewArgs"
1610
- }
1611
- }
1612
- ]
1613
- }
1614
- ],
1615
- "exports": [
1616
- {
1617
- "kind": "js",
1618
- "name": "dayView",
1619
- "declaration": {
1620
- "name": "dayView",
1621
- "module": "src/calendar/month-view.ts"
1622
- }
1623
- },
1624
- {
1625
- "kind": "js",
1626
- "name": "monthView",
1627
- "declaration": {
1628
- "name": "monthView",
1629
- "module": "src/calendar/month-view.ts"
1630
- }
1631
- }
1632
- ],
1633
- "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"
1634
- },
1635
- {
1636
- "kind": "javascript-module",
1637
- "path": "src/card/Card.ts",
1638
- "declarations": [
1639
- {
1640
- "kind": "class",
1641
- "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
1642
- "name": "Card",
1643
- "slots": [
1644
- {
1645
- "description": "The card content.",
1646
- "name": ""
1514
+ "description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
1515
+ "fieldName": "download"
1647
1516
  },
1648
1517
  {
1649
- "description": "Optional slot that holds a header for the card.",
1650
- "name": "header"
1518
+ "name": "target",
1519
+ "type": {
1520
+ "text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
1521
+ },
1522
+ "default": "\"_self\"",
1523
+ "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.",
1524
+ "fieldName": "target"
1651
1525
  },
1652
1526
  {
1653
- "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
1654
- "name": "header-end"
1527
+ "name": "expand",
1528
+ "type": {
1529
+ "text": "boolean"
1530
+ },
1531
+ "default": "false",
1532
+ "description": "Controls whether the button expands to fill the width of its container.",
1533
+ "fieldName": "expand"
1655
1534
  },
1656
1535
  {
1657
- "description": "Optional slot that holds footer content for the card.",
1658
- "name": "footer"
1659
- }
1660
- ],
1661
- "members": [
1662
- {
1663
- "kind": "field",
1664
- "name": "headerSlot",
1665
- "privacy": "private",
1666
- "default": "new SlotController(this, \"header\")"
1536
+ "name": "loading",
1537
+ "type": {
1538
+ "text": "boolean"
1539
+ },
1540
+ "default": "false",
1541
+ "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.",
1542
+ "fieldName": "loading"
1667
1543
  },
1668
1544
  {
1669
- "kind": "field",
1670
- "name": "headerEndSlot",
1671
- "privacy": "private",
1672
- "default": "new SlotController(this, \"header-end\")"
1545
+ "name": "disabled",
1546
+ "type": {
1547
+ "text": "boolean"
1548
+ },
1549
+ "default": "false",
1550
+ "description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
1551
+ "fieldName": "disabled",
1552
+ "inheritedFrom": {
1553
+ "name": "InputMixin",
1554
+ "module": "src/common/mixins/InputMixin.ts"
1555
+ }
1673
1556
  },
1674
1557
  {
1675
- "kind": "field",
1676
- "name": "footerSlot",
1677
- "privacy": "private",
1678
- "default": "new SlotController(this, \"footer\")"
1558
+ "name": "name",
1559
+ "type": {
1560
+ "text": "string | undefined"
1561
+ },
1562
+ "description": "The name of the form component.",
1563
+ "fieldName": "name",
1564
+ "inheritedFrom": {
1565
+ "name": "InputMixin",
1566
+ "module": "src/common/mixins/InputMixin.ts"
1567
+ }
1679
1568
  },
1680
1569
  {
1681
- "kind": "field",
1682
- "name": "padding",
1570
+ "name": "value",
1683
1571
  "type": {
1684
- "text": "\"m\" | \"l\" | \"none\""
1572
+ "text": "string"
1685
1573
  },
1686
- "default": "\"m\"",
1687
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1688
- "attribute": "padding",
1689
- "reflects": true
1574
+ "default": "\"\"",
1575
+ "description": "The value of the form component.",
1576
+ "fieldName": "value",
1577
+ "inheritedFrom": {
1578
+ "name": "InputMixin",
1579
+ "module": "src/common/mixins/InputMixin.ts"
1580
+ }
1690
1581
  }
1691
1582
  ],
1692
- "attributes": [
1583
+ "mixins": [
1693
1584
  {
1694
- "name": "padding",
1695
- "type": {
1696
- "text": "\"m\" | \"l\" | \"none\""
1697
- },
1698
- "default": "\"m\"",
1699
- "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
1700
- "fieldName": "padding"
1585
+ "name": "InputMixin",
1586
+ "module": "/src/common/mixins/InputMixin.js"
1587
+ },
1588
+ {
1589
+ "name": "FocusableMixin",
1590
+ "module": "/src/common/mixins/FocusableMixin.js"
1701
1591
  }
1702
1592
  ],
1703
1593
  "superclass": {
@@ -1705,9 +1595,9 @@
1705
1595
  "package": "lit"
1706
1596
  },
1707
1597
  "status": "ready",
1708
- "category": "structure",
1598
+ "category": "action",
1709
1599
  "displayName": null,
1710
- "tagName": "nord-card",
1600
+ "tagName": "nord-button",
1711
1601
  "customElement": true
1712
1602
  }
1713
1603
  ],
@@ -1716,20 +1606,20 @@
1716
1606
  "kind": "js",
1717
1607
  "name": "default",
1718
1608
  "declaration": {
1719
- "name": "Card",
1720
- "module": "src/card/Card.ts"
1609
+ "name": "Button",
1610
+ "module": "src/button/Button.ts"
1721
1611
  }
1722
1612
  },
1723
1613
  {
1724
1614
  "kind": "custom-element-definition",
1725
- "name": "nord-card",
1615
+ "name": "nord-button",
1726
1616
  "declaration": {
1727
- "name": "Card",
1728
- "module": "src/card/Card.ts"
1617
+ "name": "Button",
1618
+ "module": "src/button/Button.ts"
1729
1619
  }
1730
1620
  }
1731
1621
  ],
1732
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
1622
+ "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"
1733
1623
  },
1734
1624
  {
1735
1625
  "kind": "javascript-module",
@@ -2277,43 +2167,250 @@
2277
2167
  "module": "/src/common/mixins/InputMixin.js"
2278
2168
  },
2279
2169
  {
2280
- "name": "FocusableMixin",
2281
- "module": "/src/common/mixins/FocusableMixin.js"
2170
+ "name": "FocusableMixin",
2171
+ "module": "/src/common/mixins/FocusableMixin.js"
2172
+ }
2173
+ ],
2174
+ "superclass": {
2175
+ "name": "LitElement",
2176
+ "package": "lit"
2177
+ },
2178
+ "status": "ready",
2179
+ "category": "form",
2180
+ "displayName": null,
2181
+ "tagName": "nord-checkbox",
2182
+ "customElement": true,
2183
+ "events": [
2184
+ {
2185
+ "name": "input",
2186
+ "type": {
2187
+ "text": "NordEvent"
2188
+ },
2189
+ "description": "Fired as the user types into the input.",
2190
+ "inheritedFrom": {
2191
+ "name": "FormAssociatedMixin",
2192
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2193
+ }
2194
+ },
2195
+ {
2196
+ "name": "change",
2197
+ "type": {
2198
+ "text": "NordEvent"
2199
+ },
2200
+ "description": "Fired whenever the input's value is changed via user interaction.",
2201
+ "inheritedFrom": {
2202
+ "name": "FormAssociatedMixin",
2203
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
2204
+ }
2205
+ }
2206
+ ]
2207
+ }
2208
+ ],
2209
+ "exports": [
2210
+ {
2211
+ "kind": "js",
2212
+ "name": "default",
2213
+ "declaration": {
2214
+ "name": "Checkbox",
2215
+ "module": "src/checkbox/Checkbox.ts"
2216
+ }
2217
+ },
2218
+ {
2219
+ "kind": "custom-element-definition",
2220
+ "name": "nord-checkbox",
2221
+ "declaration": {
2222
+ "name": "Checkbox",
2223
+ "module": "src/checkbox/Checkbox.ts"
2224
+ }
2225
+ }
2226
+ ],
2227
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
2228
+ },
2229
+ {
2230
+ "kind": "javascript-module",
2231
+ "path": "src/card/Card.ts",
2232
+ "declarations": [
2233
+ {
2234
+ "kind": "class",
2235
+ "description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
2236
+ "name": "Card",
2237
+ "cssProperties": [
2238
+ {
2239
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
2240
+ "name": "--n-card-border-radius",
2241
+ "default": "var(--n-border-radius)"
2242
+ },
2243
+ {
2244
+ "description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
2245
+ "name": "--n-card-box-shadow",
2246
+ "default": "var(--n-box-shadow-popout)"
2247
+ },
2248
+ {
2249
+ "description": "Controls the padding on all sides of the card.",
2250
+ "name": "--n-card-padding",
2251
+ "default": "var(--n-space-m)"
2252
+ },
2253
+ {
2254
+ "description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
2255
+ "name": "--n-card-slot-padding",
2256
+ "default": "var(--n-space-m)"
2257
+ }
2258
+ ],
2259
+ "slots": [
2260
+ {
2261
+ "description": "The card content.",
2262
+ "name": ""
2263
+ },
2264
+ {
2265
+ "description": "Optional slot that holds a header for the card.",
2266
+ "name": "header"
2267
+ },
2268
+ {
2269
+ "description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
2270
+ "name": "header-end"
2271
+ },
2272
+ {
2273
+ "description": "Optional slot that holds footer content for the card.",
2274
+ "name": "footer"
2275
+ }
2276
+ ],
2277
+ "members": [
2278
+ {
2279
+ "kind": "field",
2280
+ "name": "headerSlot",
2281
+ "privacy": "private",
2282
+ "default": "new SlotController(this, \"header\")"
2283
+ },
2284
+ {
2285
+ "kind": "field",
2286
+ "name": "headerEndSlot",
2287
+ "privacy": "private",
2288
+ "default": "new SlotController(this, \"header-end\")"
2289
+ },
2290
+ {
2291
+ "kind": "field",
2292
+ "name": "footerSlot",
2293
+ "privacy": "private",
2294
+ "default": "new SlotController(this, \"footer\")"
2295
+ },
2296
+ {
2297
+ "kind": "field",
2298
+ "name": "padding",
2299
+ "type": {
2300
+ "text": "\"m\" | \"l\" | \"none\""
2301
+ },
2302
+ "default": "\"m\"",
2303
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2304
+ "attribute": "padding",
2305
+ "reflects": true
2306
+ }
2307
+ ],
2308
+ "attributes": [
2309
+ {
2310
+ "name": "padding",
2311
+ "type": {
2312
+ "text": "\"m\" | \"l\" | \"none\""
2313
+ },
2314
+ "default": "\"m\"",
2315
+ "description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
2316
+ "fieldName": "padding"
2317
+ }
2318
+ ],
2319
+ "superclass": {
2320
+ "name": "LitElement",
2321
+ "package": "lit"
2322
+ },
2323
+ "status": "ready",
2324
+ "category": "structure",
2325
+ "displayName": null,
2326
+ "tagName": "nord-card",
2327
+ "customElement": true
2328
+ }
2329
+ ],
2330
+ "exports": [
2331
+ {
2332
+ "kind": "js",
2333
+ "name": "default",
2334
+ "declaration": {
2335
+ "name": "Card",
2336
+ "module": "src/card/Card.ts"
2337
+ }
2338
+ },
2339
+ {
2340
+ "kind": "custom-element-definition",
2341
+ "name": "nord-card",
2342
+ "declaration": {
2343
+ "name": "Card",
2344
+ "module": "src/card/Card.ts"
2345
+ }
2346
+ }
2347
+ ],
2348
+ "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
2349
+ },
2350
+ {
2351
+ "kind": "javascript-module",
2352
+ "path": "src/badge/Badge.ts",
2353
+ "declarations": [
2354
+ {
2355
+ "kind": "class",
2356
+ "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.",
2357
+ "name": "Badge",
2358
+ "slots": [
2359
+ {
2360
+ "description": "The badge content.",
2361
+ "name": ""
2362
+ }
2363
+ ],
2364
+ "members": [
2365
+ {
2366
+ "kind": "field",
2367
+ "name": "type",
2368
+ "type": {
2369
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
2370
+ },
2371
+ "default": "\"neutral\"",
2372
+ "description": "The type of badge.\nDetermines the background color of the badge.",
2373
+ "attribute": "type",
2374
+ "reflects": true
2375
+ },
2376
+ {
2377
+ "kind": "field",
2378
+ "name": "progress",
2379
+ "type": {
2380
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
2381
+ },
2382
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
2383
+ "attribute": "progress"
2282
2384
  }
2283
2385
  ],
2284
- "superclass": {
2285
- "name": "LitElement",
2286
- "package": "lit"
2287
- },
2288
- "status": "ready",
2289
- "category": "form",
2290
- "displayName": null,
2291
- "tagName": "nord-checkbox",
2292
- "customElement": true,
2293
- "events": [
2386
+ "attributes": [
2294
2387
  {
2295
- "name": "input",
2388
+ "name": "type",
2296
2389
  "type": {
2297
- "text": "NordEvent"
2390
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
2298
2391
  },
2299
- "description": "Fired as the user types into the input.",
2300
- "inheritedFrom": {
2301
- "name": "FormAssociatedMixin",
2302
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2303
- }
2392
+ "default": "\"neutral\"",
2393
+ "description": "The type of badge.\nDetermines the background color of the badge.",
2394
+ "fieldName": "type"
2304
2395
  },
2305
2396
  {
2306
- "name": "change",
2397
+ "name": "progress",
2307
2398
  "type": {
2308
- "text": "NordEvent"
2399
+ "text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
2309
2400
  },
2310
- "description": "Fired whenever the input's value is changed via user interaction.",
2311
- "inheritedFrom": {
2312
- "name": "FormAssociatedMixin",
2313
- "module": "src/common/mixins/FormAssociatedMixin.ts"
2314
- }
2401
+ "description": "The progress of the badge. Displays a progress\nindicator next to the label.",
2402
+ "fieldName": "progress"
2315
2403
  }
2316
- ]
2404
+ ],
2405
+ "superclass": {
2406
+ "name": "LitElement",
2407
+ "package": "lit"
2408
+ },
2409
+ "status": "ready",
2410
+ "category": "text",
2411
+ "displayName": null,
2412
+ "tagName": "nord-badge",
2413
+ "customElement": true
2317
2414
  }
2318
2415
  ],
2319
2416
  "exports": [
@@ -2321,20 +2418,20 @@
2321
2418
  "kind": "js",
2322
2419
  "name": "default",
2323
2420
  "declaration": {
2324
- "name": "Checkbox",
2325
- "module": "src/checkbox/Checkbox.ts"
2421
+ "name": "Badge",
2422
+ "module": "src/badge/Badge.ts"
2326
2423
  }
2327
2424
  },
2328
2425
  {
2329
2426
  "kind": "custom-element-definition",
2330
- "name": "nord-checkbox",
2427
+ "name": "nord-badge",
2331
2428
  "declaration": {
2332
- "name": "Checkbox",
2333
- "module": "src/checkbox/Checkbox.ts"
2429
+ "name": "Badge",
2430
+ "module": "src/badge/Badge.ts"
2334
2431
  }
2335
2432
  }
2336
2433
  ],
2337
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of serviceand similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
2434
+ "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 “draftor “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"
2338
2435
  },
2339
2436
  {
2340
2437
  "kind": "javascript-module",
@@ -2344,6 +2441,23 @@
2344
2441
  "kind": "class",
2345
2442
  "description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
2346
2443
  "name": "CommandMenu",
2444
+ "cssProperties": [
2445
+ {
2446
+ "description": "Controls the max inline size, or width, of the command menu.",
2447
+ "name": "--n-command-menu-inline-size",
2448
+ "default": "640px"
2449
+ },
2450
+ {
2451
+ "description": "Controls the max block size, or height, of the command menu.",
2452
+ "name": "--n-command-menu-block-size",
2453
+ "default": "290px"
2454
+ },
2455
+ {
2456
+ "description": "Controls the command menu offset from the block start, or top, of the screen.",
2457
+ "name": "--n-command-menu-block-start",
2458
+ "default": "16%"
2459
+ }
2460
+ ],
2347
2461
  "slots": [
2348
2462
  {
2349
2463
  "description": "Used to replace the default footer contents.",
@@ -5100,6 +5214,18 @@
5100
5214
  "kind": "class",
5101
5215
  "description": "Divider components are used to separate and distinguish sections of\ncontent or groups of menu items. Visually, they look like\nhorizontal or vertical lines.",
5102
5216
  "name": "Divider",
5217
+ "cssProperties": [
5218
+ {
5219
+ "description": "Controls the color of the divider, using our [color tokens](/tokens/#color).",
5220
+ "name": "--n-divider-color",
5221
+ "default": "var(--n-color-border)"
5222
+ },
5223
+ {
5224
+ "description": "Controls the size, or thickness, of the divider.",
5225
+ "name": "--n-divider-size",
5226
+ "default": "1px"
5227
+ }
5228
+ ],
5103
5229
  "members": [
5104
5230
  {
5105
5231
  "kind": "field",
@@ -5168,6 +5294,13 @@
5168
5294
  "kind": "class",
5169
5295
  "description": "Dropdown menu displays a list of actions or selectable options for\na user. Dropdown uses popout component internally to create\nthe overlay functionality.",
5170
5296
  "name": "Dropdown",
5297
+ "cssProperties": [
5298
+ {
5299
+ "description": "Controls the inline size, or width, of the dropdown. Will resize up to 1.5 times to account for larger content.",
5300
+ "name": "--n-dropdown-size",
5301
+ "default": "250px"
5302
+ }
5303
+ ],
5171
5304
  "slots": [
5172
5305
  {
5173
5306
  "description": "The dropdown content.",
@@ -6008,6 +6141,33 @@
6008
6141
  "kind": "class",
6009
6142
  "description": "Inputs are used to allow users to provide text input when the expected input is short.\nAs well as plain text, Input supports various types of text, including passwords and numbers.",
6010
6143
  "name": "Input",
6144
+ "cssProperties": [
6145
+ {
6146
+ "description": "Controls the inline size, or width, of the input.",
6147
+ "name": "--n-input-inline-size",
6148
+ "default": "240px"
6149
+ },
6150
+ {
6151
+ "description": "Controls the background of the input, using our [color tokens](/tokens/#color).",
6152
+ "name": "--n-input-background",
6153
+ "default": "var(--n-color-active)"
6154
+ },
6155
+ {
6156
+ "description": "Controls the text color of the input, using our [color tokens](/tokens/#color).",
6157
+ "name": "--n-input-color",
6158
+ "default": "var(--n-color-text)"
6159
+ },
6160
+ {
6161
+ "description": "Controls the border color of the input, using our [color tokens](/tokens/#color).",
6162
+ "name": "--n-input-border-color",
6163
+ "default": "var(--n-color-border-strong)"
6164
+ },
6165
+ {
6166
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
6167
+ "name": "--n-input-border-radius",
6168
+ "default": "var(--n-border-radius-s)"
6169
+ }
6170
+ ],
6011
6171
  "slots": [
6012
6172
  {
6013
6173
  "description": "Use when a label requires more than plain text.",
@@ -6705,6 +6865,13 @@
6705
6865
  "kind": "class",
6706
6866
  "description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
6707
6867
  "name": "Layout",
6868
+ "cssProperties": [
6869
+ {
6870
+ "description": "Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).",
6871
+ "name": "--n-layout-padding",
6872
+ "default": "var(--n-space-l)"
6873
+ }
6874
+ ],
6708
6875
  "slots": [
6709
6876
  {
6710
6877
  "description": "The default main section content.",
@@ -7295,6 +7462,23 @@
7295
7462
  "kind": "class",
7296
7463
  "description": "Modal component is used to display content that temporarily blocks interactions\nwith the main view of an application. Modal should be used sparingly and\nonly when necessary.",
7297
7464
  "name": "Modal",
7465
+ "cssProperties": [
7466
+ {
7467
+ "description": "Controls the padding on the sides of the modal, using our [spacing tokens](/tokens/#space).",
7468
+ "name": "--n-modal-padding-inline",
7469
+ "default": "var(--n-space-m)"
7470
+ },
7471
+ {
7472
+ "description": "Controls the padding above and below the modal, using our [spacing tokens](/tokens/#space).",
7473
+ "name": "--n-modal-padding-block",
7474
+ "default": "var(--n-space-m)"
7475
+ },
7476
+ {
7477
+ "description": "Controls the width of the modal.",
7478
+ "name": "--n-modal-max-inline-size",
7479
+ "default": "620px"
7480
+ }
7481
+ ],
7298
7482
  "slots": [
7299
7483
  {
7300
7484
  "description": "Default slot",
@@ -8223,6 +8407,23 @@
8223
8407
  "kind": "class",
8224
8408
  "description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
8225
8409
  "name": "ProgressBar",
8410
+ "cssProperties": [
8411
+ {
8412
+ "description": "Controls the thickness of the progress bar, using our [spacing tokens](/tokens/#space).",
8413
+ "name": "--n-progress-size",
8414
+ "default": "var(--n-space-s)"
8415
+ },
8416
+ {
8417
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
8418
+ "name": "--n-progress-border-radius",
8419
+ "default": "var(--n-border-radius-s)"
8420
+ },
8421
+ {
8422
+ "description": "Controls the color of the progress bar, using [color tokens](/tokens/#color).",
8423
+ "name": "--n-progress-color",
8424
+ "default": "var(--n-color-accent)"
8425
+ }
8426
+ ],
8226
8427
  "members": [
8227
8428
  {
8228
8429
  "kind": "field",
@@ -9841,6 +10042,23 @@
9841
10042
  "kind": "class",
9842
10043
  "description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
9843
10044
  "name": "Skeleton",
10045
+ "cssProperties": [
10046
+ {
10047
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
10048
+ "name": "--n-skeleton-border-radius",
10049
+ "default": "var(--n-border-radius)"
10050
+ },
10051
+ {
10052
+ "description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
10053
+ "name": "--n-skeleton-color",
10054
+ "default": "var(--n-color-border)"
10055
+ },
10056
+ {
10057
+ "description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
10058
+ "name": "--n-skeleton-sheen-color",
10059
+ "default": "var(--n-color-border-strong)"
10060
+ }
10061
+ ],
9844
10062
  "members": [
9845
10063
  {
9846
10064
  "kind": "field",
@@ -9851,20 +10069,6 @@
9851
10069
  "default": "\"none\"",
9852
10070
  "description": "Determines which animation effect the skeleton will use.",
9853
10071
  "attribute": "effect"
9854
- },
9855
- {
9856
- "kind": "field",
9857
- "name": "_warningLogged",
9858
- "type": {
9859
- "text": "boolean"
9860
- },
9861
- "privacy": "private",
9862
- "static": true,
9863
- "default": "false",
9864
- "inheritedFrom": {
9865
- "name": "DraftComponentMixin",
9866
- "module": "src/common/mixins/DraftComponentMixin.ts"
9867
- }
9868
10072
  }
9869
10073
  ],
9870
10074
  "attributes": [
@@ -9878,17 +10082,11 @@
9878
10082
  "fieldName": "effect"
9879
10083
  }
9880
10084
  ],
9881
- "mixins": [
9882
- {
9883
- "name": "DraftComponentMixin",
9884
- "module": "/src/common/mixins/DraftComponentMixin.js"
9885
- }
9886
- ],
9887
10085
  "superclass": {
9888
10086
  "name": "LitElement",
9889
10087
  "package": "lit"
9890
10088
  },
9891
- "status": "draft",
10089
+ "status": "new",
9892
10090
  "category": "feedback",
9893
10091
  "displayName": null,
9894
10092
  "tagName": "nord-skeleton",
@@ -10022,6 +10220,13 @@
10022
10220
  "kind": "class",
10023
10221
  "description": "Stack component manages layout of immediate children along the\nvertical or horizontal axis with optional spacing between each child.",
10024
10222
  "name": "Stack",
10223
+ "cssProperties": [
10224
+ {
10225
+ "description": "Controls the spacing between items, using our [spacing tokens](/tokens/#space).",
10226
+ "name": "--n-stack-gap",
10227
+ "default": "var(--n-space-m)"
10228
+ }
10229
+ ],
10025
10230
  "slots": [
10026
10231
  {
10027
10232
  "description": "The stack content.",
@@ -10191,6 +10396,18 @@
10191
10396
  "kind": "class",
10192
10397
  "description": "The interactive tab button for use within the tab group component.",
10193
10398
  "name": "Tab",
10399
+ "cssProperties": [
10400
+ {
10401
+ "description": "Controls the text color of the tab, using our [color tokens](/tokens/#color).",
10402
+ "name": "--n-tab-color",
10403
+ "default": "var(--n-color-text-weak)"
10404
+ },
10405
+ {
10406
+ "description": "Controls the font weight of the tab, using our [font tokens](/tokens/#font).",
10407
+ "name": "--n-tab-font-weight",
10408
+ "default": "var(--n-font-weight)"
10409
+ }
10410
+ ],
10194
10411
  "slots": [
10195
10412
  {
10196
10413
  "description": "The tab button content.",
@@ -10272,6 +10489,13 @@
10272
10489
  "kind": "class",
10273
10490
  "description": "Tab Group allows multiple panels to be contained within a single window,\nusing tabs as a navigational element.",
10274
10491
  "name": "TabGroup",
10492
+ "cssProperties": [
10493
+ {
10494
+ "description": "Controls the padding around the tab group (including the tab list), using our [spacing tokens](/tokens/#space).",
10495
+ "name": "--n-tab-group-padding",
10496
+ "default": "0"
10497
+ }
10498
+ ],
10275
10499
  "slots": [
10276
10500
  {
10277
10501
  "description": "The element which contains the content to be revealed.",
@@ -10552,6 +10776,18 @@
10552
10776
  "kind": "class",
10553
10777
  "description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
10554
10778
  "name": "Table",
10779
+ "cssProperties": [
10780
+ {
10781
+ "description": "Controls the padding around the table cells.",
10782
+ "name": "--n-table-td-padding",
10783
+ "default": "calc(var(--n-space-m) * 0.95)"
10784
+ },
10785
+ {
10786
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
10787
+ "name": "--n-table-border-radius",
10788
+ "default": "var(--n-border-radius-s)"
10789
+ }
10790
+ ],
10555
10791
  "slots": [
10556
10792
  {
10557
10793
  "description": "Default slot which holds the HTML `<table>` element.",
@@ -10673,6 +10909,38 @@
10673
10909
  "kind": "class",
10674
10910
  "description": "Textarea is a component that allows user to write text over\nmultiple rows. Used when the expected user input is long.\nFor shorter input, use the Input component.",
10675
10911
  "name": "Textarea",
10912
+ "cssProperties": [
10913
+ {
10914
+ "description": "Controls the inline size, or width, of the textarea.",
10915
+ "name": "--n-textarea-inline-size",
10916
+ "default": "240px"
10917
+ },
10918
+ {
10919
+ "description": "Controls the block size, or height, or the textarea.",
10920
+ "name": "--n-textarea-block-size",
10921
+ "default": "76px"
10922
+ },
10923
+ {
10924
+ "description": "Controls the background of the textarea, using our [color tokens](/tokens/#color).",
10925
+ "name": "--n-textarea-background",
10926
+ "default": "var(--n-color-active)"
10927
+ },
10928
+ {
10929
+ "description": "Controls the text color of the textarea, using our [color tokens](/tokens/#color).",
10930
+ "name": "--n-textarea-color",
10931
+ "default": "var(--n-color-text)"
10932
+ },
10933
+ {
10934
+ "description": "Controls the border color of the textarea, using our [color tokens](/tokens/#color).",
10935
+ "name": "--n-textarea-border-color",
10936
+ "default": "var(--n-color-border-strong)"
10937
+ },
10938
+ {
10939
+ "description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
10940
+ "name": "--n-textarea-border-radius",
10941
+ "default": "var(--n-border-radius-s)"
10942
+ }
10943
+ ],
10676
10944
  "slots": [
10677
10945
  {
10678
10946
  "description": "Use when a label requires more than plain text.",
@@ -11411,20 +11679,6 @@
11411
11679
  "kind": "method",
11412
11680
  "name": "handleAutoDismissChange",
11413
11681
  "privacy": "protected"
11414
- },
11415
- {
11416
- "kind": "field",
11417
- "name": "_warningLogged",
11418
- "type": {
11419
- "text": "boolean"
11420
- },
11421
- "privacy": "private",
11422
- "static": true,
11423
- "default": "false",
11424
- "inheritedFrom": {
11425
- "name": "DraftComponentMixin",
11426
- "module": "src/common/mixins/DraftComponentMixin.ts"
11427
- }
11428
11682
  }
11429
11683
  ],
11430
11684
  "events": [
@@ -11456,17 +11710,11 @@
11456
11710
  "fieldName": "autoDismiss"
11457
11711
  }
11458
11712
  ],
11459
- "mixins": [
11460
- {
11461
- "name": "DraftComponentMixin",
11462
- "module": "/src/common/mixins/DraftComponentMixin.js"
11463
- }
11464
- ],
11465
11713
  "superclass": {
11466
11714
  "name": "LitElement",
11467
11715
  "package": "lit"
11468
11716
  },
11469
- "status": "draft",
11717
+ "status": "new",
11470
11718
  "category": "feedback",
11471
11719
  "displayName": null,
11472
11720
  "tagName": "nord-toast",
@@ -11534,33 +11782,13 @@
11534
11782
  "text": ""
11535
11783
  }
11536
11784
  }
11537
- },
11538
- {
11539
- "kind": "field",
11540
- "name": "_warningLogged",
11541
- "type": {
11542
- "text": "boolean"
11543
- },
11544
- "privacy": "private",
11545
- "static": true,
11546
- "default": "false",
11547
- "inheritedFrom": {
11548
- "name": "DraftComponentMixin",
11549
- "module": "src/common/mixins/DraftComponentMixin.ts"
11550
- }
11551
- }
11552
- ],
11553
- "mixins": [
11554
- {
11555
- "name": "DraftComponentMixin",
11556
- "module": "/src/common/mixins/DraftComponentMixin.js"
11557
11785
  }
11558
11786
  ],
11559
11787
  "superclass": {
11560
11788
  "name": "LitElement",
11561
11789
  "package": "lit"
11562
11790
  },
11563
- "status": "draft",
11791
+ "status": "new",
11564
11792
  "category": "feedback",
11565
11793
  "displayName": null,
11566
11794
  "tagName": "nord-toast-group",
@@ -12512,41 +12740,6 @@
12512
12740
  ],
12513
12741
  "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 hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
12514
12742
  },
12515
- {
12516
- "kind": "javascript-module",
12517
- "path": "src/common/decorators/observe.ts",
12518
- "declarations": [
12519
- {
12520
- "kind": "function",
12521
- "name": "observe",
12522
- "parameters": [
12523
- {
12524
- "name": "propertyName",
12525
- "type": {
12526
- "text": "string"
12527
- }
12528
- },
12529
- {
12530
- "name": "lifecycle",
12531
- "default": "\"update\"",
12532
- "type": {
12533
- "text": "ObserveLifecycle"
12534
- }
12535
- }
12536
- ]
12537
- }
12538
- ],
12539
- "exports": [
12540
- {
12541
- "kind": "js",
12542
- "name": "observe",
12543
- "declaration": {
12544
- "name": "observe",
12545
- "module": "src/common/decorators/observe.ts"
12546
- }
12547
- }
12548
- ]
12549
- },
12550
12743
  {
12551
12744
  "kind": "javascript-module",
12552
12745
  "path": "src/common/controllers/DirectionController.ts",
@@ -13567,6 +13760,41 @@
13567
13760
  }
13568
13761
  ]
13569
13762
  },
13763
+ {
13764
+ "kind": "javascript-module",
13765
+ "path": "src/common/decorators/observe.ts",
13766
+ "declarations": [
13767
+ {
13768
+ "kind": "function",
13769
+ "name": "observe",
13770
+ "parameters": [
13771
+ {
13772
+ "name": "propertyName",
13773
+ "type": {
13774
+ "text": "string"
13775
+ }
13776
+ },
13777
+ {
13778
+ "name": "lifecycle",
13779
+ "default": "\"update\"",
13780
+ "type": {
13781
+ "text": "ObserveLifecycle"
13782
+ }
13783
+ }
13784
+ ]
13785
+ }
13786
+ ],
13787
+ "exports": [
13788
+ {
13789
+ "kind": "js",
13790
+ "name": "observe",
13791
+ "declaration": {
13792
+ "name": "observe",
13793
+ "module": "src/common/decorators/observe.ts"
13794
+ }
13795
+ }
13796
+ ]
13797
+ },
13570
13798
  {
13571
13799
  "kind": "javascript-module",
13572
13800
  "path": "src/common/directives/cond.ts",