@nordhealth/components 2.4.0 → 2.5.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.
- package/custom-elements.json +888 -883
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/{Calendar-8b36a7e5.js → Calendar-7ae2dda7.js} +1 -1
- package/lib/{Calendar-8b36a7e5.js.map → Calendar-7ae2dda7.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/button/Button.d.ts +1 -0
- package/package.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -513,52 +513,57 @@
|
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
"kind": "javascript-module",
|
|
516
|
-
"path": "src/
|
|
516
|
+
"path": "src/badge/Badge.ts",
|
|
517
517
|
"declarations": [
|
|
518
518
|
{
|
|
519
519
|
"kind": "class",
|
|
520
|
-
"description": "
|
|
521
|
-
"name": "
|
|
522
|
-
"cssProperties": [
|
|
523
|
-
{
|
|
524
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
525
|
-
"name": "--n-banner-border-radius",
|
|
526
|
-
"default": "var(--n-border-radius)"
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
530
|
-
"name": "--n-banner-box-shadow",
|
|
531
|
-
"default": "var(--n-box-shadow-card)"
|
|
532
|
-
}
|
|
533
|
-
],
|
|
520
|
+
"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.",
|
|
521
|
+
"name": "Badge",
|
|
534
522
|
"slots": [
|
|
535
523
|
{
|
|
536
|
-
"description": "
|
|
524
|
+
"description": "The badge content.",
|
|
537
525
|
"name": ""
|
|
538
526
|
}
|
|
539
527
|
],
|
|
540
528
|
"members": [
|
|
541
529
|
{
|
|
542
530
|
"kind": "field",
|
|
543
|
-
"name": "
|
|
531
|
+
"name": "type",
|
|
544
532
|
"type": {
|
|
545
|
-
"text": "\"
|
|
533
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
546
534
|
},
|
|
547
|
-
"default": "\"
|
|
548
|
-
"description": "The
|
|
549
|
-
"attribute": "
|
|
535
|
+
"default": "\"neutral\"",
|
|
536
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
537
|
+
"attribute": "type",
|
|
550
538
|
"reflects": true
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"kind": "field",
|
|
542
|
+
"name": "progress",
|
|
543
|
+
"type": {
|
|
544
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
545
|
+
},
|
|
546
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
547
|
+
"attribute": "progress"
|
|
551
548
|
}
|
|
552
549
|
],
|
|
553
550
|
"attributes": [
|
|
554
551
|
{
|
|
555
|
-
"name": "
|
|
552
|
+
"name": "type",
|
|
556
553
|
"type": {
|
|
557
|
-
"text": "\"
|
|
554
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
558
555
|
},
|
|
559
|
-
"default": "\"
|
|
560
|
-
"description": "The
|
|
561
|
-
"fieldName": "
|
|
556
|
+
"default": "\"neutral\"",
|
|
557
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
558
|
+
"fieldName": "type"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "progress",
|
|
562
|
+
"type": {
|
|
563
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
564
|
+
},
|
|
565
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
566
|
+
"fieldName": "progress"
|
|
562
567
|
}
|
|
563
568
|
],
|
|
564
569
|
"superclass": {
|
|
@@ -566,10 +571,10 @@
|
|
|
566
571
|
"package": "lit"
|
|
567
572
|
},
|
|
568
573
|
"status": "ready",
|
|
569
|
-
"category": "
|
|
574
|
+
"category": "text",
|
|
570
575
|
"displayName": null,
|
|
571
576
|
"examples": [],
|
|
572
|
-
"tagName": "nord-
|
|
577
|
+
"tagName": "nord-badge",
|
|
573
578
|
"customElement": true
|
|
574
579
|
}
|
|
575
580
|
],
|
|
@@ -578,169 +583,174 @@
|
|
|
578
583
|
"kind": "js",
|
|
579
584
|
"name": "default",
|
|
580
585
|
"declaration": {
|
|
581
|
-
"name": "
|
|
582
|
-
"module": "src/
|
|
586
|
+
"name": "Badge",
|
|
587
|
+
"module": "src/badge/Badge.ts"
|
|
583
588
|
}
|
|
584
589
|
},
|
|
585
590
|
{
|
|
586
591
|
"kind": "custom-element-definition",
|
|
587
|
-
"name": "nord-
|
|
592
|
+
"name": "nord-badge",
|
|
588
593
|
"declaration": {
|
|
589
|
-
"name": "
|
|
590
|
-
"module": "src/
|
|
594
|
+
"name": "Badge",
|
|
595
|
+
"module": "src/badge/Badge.ts"
|
|
591
596
|
}
|
|
592
597
|
}
|
|
593
598
|
],
|
|
594
|
-
"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
|
|
599
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |\n| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
|
|
595
600
|
},
|
|
596
601
|
{
|
|
597
602
|
"kind": "javascript-module",
|
|
598
|
-
"path": "src/
|
|
603
|
+
"path": "src/button/Button.ts",
|
|
599
604
|
"declarations": [
|
|
600
605
|
{
|
|
601
606
|
"kind": "class",
|
|
602
|
-
"description": "
|
|
603
|
-
"name": "
|
|
607
|
+
"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.",
|
|
608
|
+
"name": "Button",
|
|
604
609
|
"cssProperties": [
|
|
605
610
|
{
|
|
606
|
-
"description": "Controls
|
|
607
|
-
"name": "--n-
|
|
608
|
-
"default": "var(--n-border-radius)"
|
|
611
|
+
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
612
|
+
"name": "--n-button-border-radius",
|
|
613
|
+
"default": "var(--n-border-radius-s)"
|
|
609
614
|
},
|
|
610
615
|
{
|
|
611
|
-
"description": "Controls the
|
|
612
|
-
"name": "--n-
|
|
613
|
-
"default": "var(--n-
|
|
614
|
-
}
|
|
615
|
-
],
|
|
616
|
-
"members": [
|
|
616
|
+
"description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
|
|
617
|
+
"name": "--n-button-gap",
|
|
618
|
+
"default": "var(--n-space-s)"
|
|
619
|
+
},
|
|
617
620
|
{
|
|
618
|
-
"
|
|
619
|
-
"name": "
|
|
620
|
-
"
|
|
621
|
-
"text": "string"
|
|
622
|
-
},
|
|
623
|
-
"privacy": "private",
|
|
624
|
-
"default": "\"dialog-header\""
|
|
621
|
+
"description": "Controls the overlayed gradient background on the button.",
|
|
622
|
+
"name": "--n-button-gradient",
|
|
623
|
+
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
625
624
|
},
|
|
626
625
|
{
|
|
627
|
-
"
|
|
628
|
-
"name": "
|
|
629
|
-
"
|
|
630
|
-
"text": "HTMLElement"
|
|
631
|
-
},
|
|
632
|
-
"privacy": "private"
|
|
626
|
+
"description": "Controls the background color of the button, using [color tokens](/tokens/#color).",
|
|
627
|
+
"name": "--n-button-background-color",
|
|
628
|
+
"default": "var(--n-color-button)"
|
|
633
629
|
},
|
|
634
630
|
{
|
|
635
|
-
"
|
|
636
|
-
"name": "
|
|
637
|
-
"
|
|
638
|
-
"text": "HTMLButtonElement"
|
|
639
|
-
},
|
|
640
|
-
"privacy": "private"
|
|
631
|
+
"description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
|
|
632
|
+
"name": "--n-button-border-color",
|
|
633
|
+
"default": "var(--n-color-border-strong)"
|
|
641
634
|
},
|
|
642
635
|
{
|
|
643
|
-
"
|
|
644
|
-
"name": "
|
|
645
|
-
"
|
|
646
|
-
|
|
636
|
+
"description": "Controls the text alignment for the text in the button.",
|
|
637
|
+
"name": "--n-button-text-align",
|
|
638
|
+
"default": "center"
|
|
639
|
+
}
|
|
640
|
+
],
|
|
641
|
+
"slots": [
|
|
642
|
+
{
|
|
643
|
+
"description": "The button content",
|
|
644
|
+
"name": ""
|
|
647
645
|
},
|
|
648
646
|
{
|
|
649
|
-
"
|
|
650
|
-
"name": "
|
|
651
|
-
"privacy": "private",
|
|
652
|
-
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
647
|
+
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
648
|
+
"name": "start"
|
|
653
649
|
},
|
|
650
|
+
{
|
|
651
|
+
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
652
|
+
"name": "end"
|
|
653
|
+
}
|
|
654
|
+
],
|
|
655
|
+
"members": [
|
|
654
656
|
{
|
|
655
657
|
"kind": "field",
|
|
656
|
-
"name": "
|
|
658
|
+
"name": "buttonRef",
|
|
657
659
|
"privacy": "private"
|
|
658
660
|
},
|
|
659
661
|
{
|
|
660
662
|
"kind": "field",
|
|
661
|
-
"name": "
|
|
663
|
+
"name": "events",
|
|
662
664
|
"privacy": "private",
|
|
663
|
-
"default": "new
|
|
665
|
+
"default": "new EventController(this)"
|
|
664
666
|
},
|
|
665
667
|
{
|
|
666
668
|
"kind": "field",
|
|
667
|
-
"name": "
|
|
668
|
-
"type": {
|
|
669
|
-
"text": "Intl.DateTimeFormat"
|
|
670
|
-
},
|
|
669
|
+
"name": "lightDom",
|
|
671
670
|
"privacy": "private",
|
|
672
|
-
"
|
|
671
|
+
"default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
|
|
673
672
|
},
|
|
674
673
|
{
|
|
675
674
|
"kind": "field",
|
|
676
|
-
"name": "
|
|
675
|
+
"name": "variant",
|
|
677
676
|
"type": {
|
|
678
|
-
"text": "
|
|
677
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
|
|
679
678
|
},
|
|
680
|
-
"
|
|
679
|
+
"default": "\"default\"",
|
|
680
|
+
"description": "The style variant of the button.",
|
|
681
|
+
"attribute": "variant",
|
|
682
|
+
"reflects": true
|
|
681
683
|
},
|
|
682
684
|
{
|
|
683
685
|
"kind": "field",
|
|
684
|
-
"name": "
|
|
686
|
+
"name": "type",
|
|
685
687
|
"type": {
|
|
686
|
-
"text": "
|
|
688
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
687
689
|
},
|
|
688
|
-
"
|
|
690
|
+
"default": "\"submit\"",
|
|
691
|
+
"description": "The type of the button.",
|
|
692
|
+
"attribute": "type",
|
|
693
|
+
"reflects": true
|
|
689
694
|
},
|
|
690
695
|
{
|
|
691
696
|
"kind": "field",
|
|
692
|
-
"name": "
|
|
697
|
+
"name": "size",
|
|
693
698
|
"type": {
|
|
694
|
-
"text": "
|
|
699
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
695
700
|
},
|
|
696
|
-
"
|
|
701
|
+
"default": "\"m\"",
|
|
702
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
703
|
+
"attribute": "size",
|
|
704
|
+
"reflects": true
|
|
697
705
|
},
|
|
698
706
|
{
|
|
699
707
|
"kind": "field",
|
|
700
|
-
"name": "
|
|
708
|
+
"name": "accessibleExpanded",
|
|
701
709
|
"type": {
|
|
702
|
-
"text": "
|
|
710
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
703
711
|
},
|
|
704
|
-
"privacy": "private"
|
|
712
|
+
"privacy": "private",
|
|
713
|
+
"attribute": "aria-expanded"
|
|
705
714
|
},
|
|
706
715
|
{
|
|
707
716
|
"kind": "field",
|
|
708
|
-
"name": "
|
|
717
|
+
"name": "accessibleHasPopup",
|
|
709
718
|
"type": {
|
|
710
|
-
"text": "
|
|
719
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
711
720
|
},
|
|
712
|
-
"
|
|
713
|
-
"
|
|
714
|
-
"attribute": "value"
|
|
721
|
+
"privacy": "private",
|
|
722
|
+
"attribute": "aria-haspopup"
|
|
715
723
|
},
|
|
716
724
|
{
|
|
717
725
|
"kind": "field",
|
|
718
|
-
"name": "
|
|
726
|
+
"name": "href",
|
|
719
727
|
"type": {
|
|
720
|
-
"text": "
|
|
728
|
+
"text": "string | undefined"
|
|
721
729
|
},
|
|
722
|
-
"description": "
|
|
723
|
-
"attribute": "
|
|
730
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
731
|
+
"attribute": "href",
|
|
732
|
+
"reflects": true
|
|
724
733
|
},
|
|
725
734
|
{
|
|
726
735
|
"kind": "field",
|
|
727
|
-
"name": "
|
|
736
|
+
"name": "download",
|
|
728
737
|
"type": {
|
|
729
|
-
"text": "
|
|
738
|
+
"text": "boolean"
|
|
730
739
|
},
|
|
731
|
-
"default": "
|
|
732
|
-
"description": "
|
|
733
|
-
"attribute": "
|
|
740
|
+
"default": "false",
|
|
741
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
742
|
+
"attribute": "download"
|
|
734
743
|
},
|
|
735
744
|
{
|
|
736
745
|
"kind": "field",
|
|
737
|
-
"name": "
|
|
746
|
+
"name": "target",
|
|
738
747
|
"type": {
|
|
739
|
-
"text": "
|
|
748
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
740
749
|
},
|
|
741
|
-
"default": "\"\"",
|
|
742
|
-
"description": "
|
|
743
|
-
"attribute": "
|
|
750
|
+
"default": "\"_self\"",
|
|
751
|
+
"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.",
|
|
752
|
+
"attribute": "target",
|
|
753
|
+
"reflects": true
|
|
744
754
|
},
|
|
745
755
|
{
|
|
746
756
|
"kind": "field",
|
|
@@ -749,259 +759,327 @@
|
|
|
749
759
|
"text": "boolean"
|
|
750
760
|
},
|
|
751
761
|
"default": "false",
|
|
752
|
-
"description": "Controls whether the
|
|
762
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
753
763
|
"attribute": "expand",
|
|
754
764
|
"reflects": true
|
|
755
765
|
},
|
|
756
766
|
{
|
|
757
767
|
"kind": "field",
|
|
758
|
-
"name": "
|
|
759
|
-
"type": {
|
|
760
|
-
"text": "DateDisabledPredicate"
|
|
761
|
-
},
|
|
762
|
-
"default": "isDateDisabled",
|
|
763
|
-
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
"kind": "field",
|
|
767
|
-
"name": "activeFocus",
|
|
768
|
+
"name": "loading",
|
|
768
769
|
"type": {
|
|
769
770
|
"text": "boolean"
|
|
770
771
|
},
|
|
771
|
-
"
|
|
772
|
-
"
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
"kind": "field",
|
|
776
|
-
"name": "focusedDay",
|
|
777
|
-
"privacy": "private",
|
|
778
|
-
"default": "new Date()"
|
|
772
|
+
"default": "false",
|
|
773
|
+
"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.",
|
|
774
|
+
"attribute": "loading",
|
|
775
|
+
"reflects": true
|
|
779
776
|
},
|
|
780
777
|
{
|
|
781
778
|
"kind": "method",
|
|
782
|
-
"name": "
|
|
783
|
-
"parameters": [
|
|
784
|
-
{
|
|
785
|
-
"name": "options",
|
|
786
|
-
"optional": true,
|
|
787
|
-
"type": {
|
|
788
|
-
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
789
|
-
},
|
|
790
|
-
"description": "An object which controls aspects of the focusing process."
|
|
791
|
-
}
|
|
792
|
-
],
|
|
793
|
-
"description": "Programmatically move focus to the calendar."
|
|
794
|
-
},
|
|
795
|
-
{
|
|
796
|
-
"kind": "method",
|
|
797
|
-
"name": "handleValueChange",
|
|
798
|
-
"privacy": "protected"
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
"kind": "method",
|
|
802
|
-
"name": "handleFocusedDayChange",
|
|
803
|
-
"privacy": "protected"
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
"kind": "method",
|
|
807
|
-
"name": "handleLangChange",
|
|
808
|
-
"privacy": "private"
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
"kind": "field",
|
|
812
|
-
"name": "handleDaySelect",
|
|
813
|
-
"privacy": "private"
|
|
814
|
-
},
|
|
815
|
-
{
|
|
816
|
-
"kind": "method",
|
|
817
|
-
"name": "addDays",
|
|
818
|
-
"privacy": "private",
|
|
819
|
-
"parameters": [
|
|
820
|
-
{
|
|
821
|
-
"name": "days",
|
|
822
|
-
"type": {
|
|
823
|
-
"text": "number"
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
]
|
|
827
|
-
},
|
|
828
|
-
{
|
|
829
|
-
"kind": "method",
|
|
830
|
-
"name": "addMonths",
|
|
779
|
+
"name": "renderLink",
|
|
831
780
|
"privacy": "private",
|
|
832
781
|
"parameters": [
|
|
833
782
|
{
|
|
834
|
-
"name": "
|
|
783
|
+
"name": "innards",
|
|
835
784
|
"type": {
|
|
836
|
-
"text": "
|
|
785
|
+
"text": "TemplateResult"
|
|
837
786
|
}
|
|
838
787
|
}
|
|
839
|
-
]
|
|
788
|
+
],
|
|
789
|
+
"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."
|
|
840
790
|
},
|
|
841
791
|
{
|
|
842
792
|
"kind": "method",
|
|
843
|
-
"name": "
|
|
793
|
+
"name": "renderButton",
|
|
844
794
|
"privacy": "private",
|
|
845
795
|
"parameters": [
|
|
846
796
|
{
|
|
847
|
-
"name": "
|
|
797
|
+
"name": "innards",
|
|
848
798
|
"type": {
|
|
849
|
-
"text": "
|
|
799
|
+
"text": "TemplateResult"
|
|
850
800
|
}
|
|
851
801
|
}
|
|
852
802
|
]
|
|
853
803
|
},
|
|
854
804
|
{
|
|
855
805
|
"kind": "method",
|
|
856
|
-
"name": "
|
|
806
|
+
"name": "renderLightDom",
|
|
857
807
|
"privacy": "private"
|
|
858
808
|
},
|
|
859
809
|
{
|
|
860
|
-
"kind": "
|
|
861
|
-
"name": "
|
|
810
|
+
"kind": "field",
|
|
811
|
+
"name": "handleOuterClick",
|
|
862
812
|
"privacy": "private"
|
|
863
813
|
},
|
|
864
814
|
{
|
|
865
815
|
"kind": "method",
|
|
866
|
-
"name": "
|
|
816
|
+
"name": "handleClick",
|
|
867
817
|
"privacy": "private",
|
|
868
818
|
"parameters": [
|
|
869
819
|
{
|
|
870
|
-
"name": "
|
|
820
|
+
"name": "e",
|
|
871
821
|
"type": {
|
|
872
|
-
"text": "
|
|
822
|
+
"text": "Event"
|
|
873
823
|
}
|
|
874
824
|
}
|
|
875
825
|
]
|
|
876
826
|
},
|
|
877
827
|
{
|
|
878
828
|
"kind": "method",
|
|
879
|
-
"name": "
|
|
829
|
+
"name": "handleProxyChange",
|
|
880
830
|
"privacy": "private",
|
|
881
831
|
"parameters": [
|
|
882
832
|
{
|
|
883
|
-
"name": "
|
|
833
|
+
"name": "e",
|
|
884
834
|
"type": {
|
|
885
|
-
"text": "
|
|
835
|
+
"text": "Event"
|
|
886
836
|
}
|
|
887
837
|
}
|
|
888
|
-
]
|
|
838
|
+
],
|
|
839
|
+
"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."
|
|
889
840
|
},
|
|
890
841
|
{
|
|
891
|
-
"kind": "
|
|
892
|
-
"name": "
|
|
893
|
-
"
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
842
|
+
"kind": "field",
|
|
843
|
+
"name": "disabled",
|
|
844
|
+
"type": {
|
|
845
|
+
"text": "boolean"
|
|
846
|
+
},
|
|
847
|
+
"default": "false",
|
|
848
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
849
|
+
"attribute": "disabled",
|
|
850
|
+
"reflects": true,
|
|
851
|
+
"inheritedFrom": {
|
|
852
|
+
"name": "InputMixin",
|
|
853
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
854
|
+
}
|
|
902
855
|
},
|
|
903
856
|
{
|
|
904
857
|
"kind": "field",
|
|
905
|
-
"name": "
|
|
906
|
-
"
|
|
858
|
+
"name": "name",
|
|
859
|
+
"type": {
|
|
860
|
+
"text": "string | undefined"
|
|
861
|
+
},
|
|
862
|
+
"description": "The name of the form component.",
|
|
863
|
+
"attribute": "name",
|
|
864
|
+
"inheritedFrom": {
|
|
865
|
+
"name": "InputMixin",
|
|
866
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
867
|
+
}
|
|
907
868
|
},
|
|
908
869
|
{
|
|
909
870
|
"kind": "field",
|
|
910
|
-
"name": "
|
|
911
|
-
"
|
|
871
|
+
"name": "value",
|
|
872
|
+
"type": {
|
|
873
|
+
"text": "string"
|
|
874
|
+
},
|
|
875
|
+
"default": "\"\"",
|
|
876
|
+
"description": "The value of the form component.",
|
|
877
|
+
"attribute": "value",
|
|
878
|
+
"inheritedFrom": {
|
|
879
|
+
"name": "InputMixin",
|
|
880
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
881
|
+
}
|
|
912
882
|
},
|
|
913
883
|
{
|
|
914
884
|
"kind": "field",
|
|
915
|
-
"name": "
|
|
916
|
-
"
|
|
885
|
+
"name": "form",
|
|
886
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
887
|
+
"inheritedFrom": {
|
|
888
|
+
"name": "InputMixin",
|
|
889
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
890
|
+
}
|
|
917
891
|
},
|
|
918
892
|
{
|
|
919
893
|
"kind": "field",
|
|
920
|
-
"name": "
|
|
921
|
-
"privacy": "
|
|
894
|
+
"name": "focusableRef",
|
|
895
|
+
"privacy": "protected",
|
|
896
|
+
"inheritedFrom": {
|
|
897
|
+
"name": "FocusableMixin",
|
|
898
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
899
|
+
}
|
|
922
900
|
},
|
|
923
901
|
{
|
|
924
|
-
"kind": "
|
|
925
|
-
"name": "
|
|
926
|
-
"
|
|
902
|
+
"kind": "method",
|
|
903
|
+
"name": "focus",
|
|
904
|
+
"parameters": [
|
|
905
|
+
{
|
|
906
|
+
"name": "options",
|
|
907
|
+
"optional": true,
|
|
908
|
+
"type": {
|
|
909
|
+
"text": "FocusOptions"
|
|
910
|
+
},
|
|
911
|
+
"description": "An object which controls aspects of the focusing process."
|
|
912
|
+
}
|
|
913
|
+
],
|
|
914
|
+
"description": "Programmatically move focus to the component.",
|
|
915
|
+
"inheritedFrom": {
|
|
916
|
+
"name": "FocusableMixin",
|
|
917
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
918
|
+
}
|
|
927
919
|
},
|
|
928
920
|
{
|
|
929
|
-
"kind": "
|
|
930
|
-
"name": "
|
|
931
|
-
"
|
|
921
|
+
"kind": "method",
|
|
922
|
+
"name": "blur",
|
|
923
|
+
"description": "Programmatically remove focus from the component.",
|
|
924
|
+
"inheritedFrom": {
|
|
925
|
+
"name": "FocusableMixin",
|
|
926
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"kind": "method",
|
|
931
|
+
"name": "click",
|
|
932
|
+
"description": "Programmatically simulates a click on the component.",
|
|
933
|
+
"inheritedFrom": {
|
|
934
|
+
"name": "FocusableMixin",
|
|
935
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
936
|
+
}
|
|
932
937
|
}
|
|
933
938
|
],
|
|
934
|
-
"
|
|
939
|
+
"attributes": [
|
|
935
940
|
{
|
|
936
|
-
"name": "
|
|
941
|
+
"name": "variant",
|
|
937
942
|
"type": {
|
|
938
|
-
"text": "
|
|
943
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
|
|
939
944
|
},
|
|
940
|
-
"
|
|
945
|
+
"default": "\"default\"",
|
|
946
|
+
"description": "The style variant of the button.",
|
|
947
|
+
"fieldName": "variant"
|
|
941
948
|
},
|
|
942
949
|
{
|
|
950
|
+
"name": "type",
|
|
943
951
|
"type": {
|
|
944
|
-
"text": "
|
|
952
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
945
953
|
},
|
|
946
|
-
"
|
|
947
|
-
"
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
"attributes": [
|
|
954
|
+
"default": "\"submit\"",
|
|
955
|
+
"description": "The type of the button.",
|
|
956
|
+
"fieldName": "type"
|
|
957
|
+
},
|
|
951
958
|
{
|
|
952
|
-
"name": "
|
|
959
|
+
"name": "size",
|
|
953
960
|
"type": {
|
|
954
|
-
"text": "
|
|
961
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
955
962
|
},
|
|
956
|
-
"default": "\"\"",
|
|
957
|
-
"description": "The
|
|
958
|
-
"fieldName": "
|
|
963
|
+
"default": "\"m\"",
|
|
964
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
965
|
+
"fieldName": "size"
|
|
959
966
|
},
|
|
960
967
|
{
|
|
961
|
-
"name": "
|
|
968
|
+
"name": "aria-expanded",
|
|
962
969
|
"type": {
|
|
963
|
-
"text": "
|
|
970
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
964
971
|
},
|
|
965
|
-
"
|
|
966
|
-
"fieldName": "firstDayOfWeek"
|
|
972
|
+
"fieldName": "accessibleExpanded"
|
|
967
973
|
},
|
|
968
974
|
{
|
|
969
|
-
"name": "
|
|
975
|
+
"name": "aria-haspopup",
|
|
970
976
|
"type": {
|
|
971
|
-
"text": "
|
|
977
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
972
978
|
},
|
|
973
|
-
"
|
|
974
|
-
"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.",
|
|
975
|
-
"fieldName": "min"
|
|
979
|
+
"fieldName": "accessibleHasPopup"
|
|
976
980
|
},
|
|
977
981
|
{
|
|
978
|
-
"name": "
|
|
982
|
+
"name": "href",
|
|
979
983
|
"type": {
|
|
980
|
-
"text": "string"
|
|
984
|
+
"text": "string | undefined"
|
|
981
985
|
},
|
|
982
|
-
"
|
|
983
|
-
"
|
|
984
|
-
"fieldName": "max"
|
|
986
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
987
|
+
"fieldName": "href"
|
|
985
988
|
},
|
|
986
989
|
{
|
|
987
|
-
"name": "
|
|
990
|
+
"name": "download",
|
|
988
991
|
"type": {
|
|
989
992
|
"text": "boolean"
|
|
990
993
|
},
|
|
991
994
|
"default": "false",
|
|
992
|
-
"description": "
|
|
993
|
-
"fieldName": "
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
995
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
996
|
+
"fieldName": "download"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"name": "target",
|
|
1000
|
+
"type": {
|
|
1001
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
1002
|
+
},
|
|
1003
|
+
"default": "\"_self\"",
|
|
1004
|
+
"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.",
|
|
1005
|
+
"fieldName": "target"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"name": "expand",
|
|
1009
|
+
"type": {
|
|
1010
|
+
"text": "boolean"
|
|
1011
|
+
},
|
|
1012
|
+
"default": "false",
|
|
1013
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1014
|
+
"fieldName": "expand"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"name": "loading",
|
|
1018
|
+
"type": {
|
|
1019
|
+
"text": "boolean"
|
|
1020
|
+
},
|
|
1021
|
+
"default": "false",
|
|
1022
|
+
"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.",
|
|
1023
|
+
"fieldName": "loading"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"name": "disabled",
|
|
1027
|
+
"type": {
|
|
1028
|
+
"text": "boolean"
|
|
1029
|
+
},
|
|
1030
|
+
"default": "false",
|
|
1031
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1032
|
+
"fieldName": "disabled",
|
|
1033
|
+
"inheritedFrom": {
|
|
1034
|
+
"name": "InputMixin",
|
|
1035
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"name": "name",
|
|
1040
|
+
"type": {
|
|
1041
|
+
"text": "string | undefined"
|
|
1042
|
+
},
|
|
1043
|
+
"description": "The name of the form component.",
|
|
1044
|
+
"fieldName": "name",
|
|
1045
|
+
"inheritedFrom": {
|
|
1046
|
+
"name": "InputMixin",
|
|
1047
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"name": "value",
|
|
1052
|
+
"type": {
|
|
1053
|
+
"text": "string"
|
|
1054
|
+
},
|
|
1055
|
+
"default": "\"\"",
|
|
1056
|
+
"description": "The value of the form component.",
|
|
1057
|
+
"fieldName": "value",
|
|
1058
|
+
"inheritedFrom": {
|
|
1059
|
+
"name": "InputMixin",
|
|
1060
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
],
|
|
1064
|
+
"mixins": [
|
|
1065
|
+
{
|
|
1066
|
+
"name": "InputMixin",
|
|
1067
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"name": "FocusableMixin",
|
|
1071
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
"superclass": {
|
|
1075
|
+
"name": "LitElement",
|
|
1076
|
+
"package": "lit"
|
|
1077
|
+
},
|
|
1078
|
+
"status": "ready",
|
|
1079
|
+
"category": "action",
|
|
1002
1080
|
"displayName": null,
|
|
1003
1081
|
"examples": [],
|
|
1004
|
-
"tagName": "nord-
|
|
1082
|
+
"tagName": "nord-button",
|
|
1005
1083
|
"customElement": true
|
|
1006
1084
|
}
|
|
1007
1085
|
],
|
|
@@ -1010,588 +1088,623 @@
|
|
|
1010
1088
|
"kind": "js",
|
|
1011
1089
|
"name": "default",
|
|
1012
1090
|
"declaration": {
|
|
1013
|
-
"name": "
|
|
1014
|
-
"module": "src/
|
|
1091
|
+
"name": "Button",
|
|
1092
|
+
"module": "src/button/Button.ts"
|
|
1015
1093
|
}
|
|
1016
1094
|
},
|
|
1017
1095
|
{
|
|
1018
1096
|
"kind": "custom-element-definition",
|
|
1019
|
-
"name": "nord-
|
|
1097
|
+
"name": "nord-button",
|
|
1020
1098
|
"declaration": {
|
|
1021
|
-
"name": "
|
|
1022
|
-
"module": "src/
|
|
1099
|
+
"name": "Button",
|
|
1100
|
+
"module": "src/button/Button.ts"
|
|
1023
1101
|
}
|
|
1024
1102
|
}
|
|
1025
1103
|
],
|
|
1026
|
-
"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-
|
|
1104
|
+
"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"
|
|
1027
1105
|
},
|
|
1028
1106
|
{
|
|
1029
1107
|
"kind": "javascript-module",
|
|
1030
|
-
"path": "src/
|
|
1108
|
+
"path": "src/card/Card.ts",
|
|
1031
1109
|
"declarations": [
|
|
1032
1110
|
{
|
|
1033
1111
|
"kind": "class",
|
|
1034
|
-
"description": "",
|
|
1035
|
-
"name": "
|
|
1112
|
+
"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.",
|
|
1113
|
+
"name": "Card",
|
|
1114
|
+
"cssProperties": [
|
|
1115
|
+
{
|
|
1116
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1117
|
+
"name": "--n-card-border-radius",
|
|
1118
|
+
"default": "var(--n-border-radius)"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1122
|
+
"name": "--n-card-box-shadow",
|
|
1123
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
"description": "Controls the padding on all sides of the card.",
|
|
1127
|
+
"name": "--n-card-padding",
|
|
1128
|
+
"default": "var(--n-space-m)"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1132
|
+
"name": "--n-card-slot-padding",
|
|
1133
|
+
"default": "var(--n-space-m)"
|
|
1134
|
+
}
|
|
1135
|
+
],
|
|
1136
|
+
"slots": [
|
|
1137
|
+
{
|
|
1138
|
+
"description": "The card content.",
|
|
1139
|
+
"name": ""
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1143
|
+
"name": "header"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1147
|
+
"name": "header-end"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1151
|
+
"name": "footer"
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
"members": [
|
|
1155
|
+
{
|
|
1156
|
+
"kind": "field",
|
|
1157
|
+
"name": "headerSlot",
|
|
1158
|
+
"privacy": "private",
|
|
1159
|
+
"default": "new SlotController(this, \"header\")"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
"kind": "field",
|
|
1163
|
+
"name": "headerEndSlot",
|
|
1164
|
+
"privacy": "private",
|
|
1165
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
"kind": "field",
|
|
1169
|
+
"name": "footerSlot",
|
|
1170
|
+
"privacy": "private",
|
|
1171
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"kind": "field",
|
|
1175
|
+
"name": "padding",
|
|
1176
|
+
"type": {
|
|
1177
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1178
|
+
},
|
|
1179
|
+
"default": "\"m\"",
|
|
1180
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1181
|
+
"attribute": "padding",
|
|
1182
|
+
"reflects": true
|
|
1183
|
+
}
|
|
1184
|
+
],
|
|
1185
|
+
"attributes": [
|
|
1186
|
+
{
|
|
1187
|
+
"name": "padding",
|
|
1188
|
+
"type": {
|
|
1189
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1190
|
+
},
|
|
1191
|
+
"default": "\"m\"",
|
|
1192
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1193
|
+
"fieldName": "padding"
|
|
1194
|
+
}
|
|
1195
|
+
],
|
|
1036
1196
|
"superclass": {
|
|
1037
|
-
"name": "
|
|
1038
|
-
"
|
|
1197
|
+
"name": "LitElement",
|
|
1198
|
+
"package": "lit"
|
|
1039
1199
|
},
|
|
1040
|
-
"
|
|
1200
|
+
"status": "ready",
|
|
1201
|
+
"category": "structure",
|
|
1202
|
+
"displayName": null,
|
|
1203
|
+
"examples": [],
|
|
1204
|
+
"tagName": "nord-card",
|
|
1205
|
+
"customElement": true
|
|
1041
1206
|
}
|
|
1042
1207
|
],
|
|
1043
1208
|
"exports": [
|
|
1044
1209
|
{
|
|
1045
1210
|
"kind": "js",
|
|
1046
|
-
"name": "
|
|
1211
|
+
"name": "default",
|
|
1047
1212
|
"declaration": {
|
|
1048
|
-
"name": "
|
|
1049
|
-
"module": "src/
|
|
1213
|
+
"name": "Card",
|
|
1214
|
+
"module": "src/card/Card.ts"
|
|
1050
1215
|
}
|
|
1051
|
-
}
|
|
1052
|
-
],
|
|
1053
|
-
"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"
|
|
1054
|
-
},
|
|
1055
|
-
{
|
|
1056
|
-
"kind": "javascript-module",
|
|
1057
|
-
"path": "src/calendar/localization.ts",
|
|
1058
|
-
"declarations": [
|
|
1059
|
-
{
|
|
1060
|
-
"kind": "variable",
|
|
1061
|
-
"name": "calendarLocalization",
|
|
1062
|
-
"type": {
|
|
1063
|
-
"text": "object"
|
|
1064
|
-
},
|
|
1065
|
-
"default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
|
|
1066
|
-
}
|
|
1067
|
-
],
|
|
1068
|
-
"exports": [
|
|
1216
|
+
},
|
|
1069
1217
|
{
|
|
1070
|
-
"kind": "
|
|
1071
|
-
"name": "
|
|
1218
|
+
"kind": "custom-element-definition",
|
|
1219
|
+
"name": "nord-card",
|
|
1072
1220
|
"declaration": {
|
|
1073
|
-
"name": "
|
|
1074
|
-
"module": "src/
|
|
1221
|
+
"name": "Card",
|
|
1222
|
+
"module": "src/card/Card.ts"
|
|
1075
1223
|
}
|
|
1076
1224
|
}
|
|
1077
1225
|
],
|
|
1078
|
-
"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
|
|
1226
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n- Include a header when placing a [Table](/components/table) component inside the card.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
1079
1227
|
},
|
|
1080
1228
|
{
|
|
1081
1229
|
"kind": "javascript-module",
|
|
1082
|
-
"path": "src/
|
|
1230
|
+
"path": "src/banner/Banner.ts",
|
|
1083
1231
|
"declarations": [
|
|
1084
1232
|
{
|
|
1085
|
-
"kind": "
|
|
1086
|
-
"
|
|
1087
|
-
"
|
|
1233
|
+
"kind": "class",
|
|
1234
|
+
"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.",
|
|
1235
|
+
"name": "Banner",
|
|
1236
|
+
"cssProperties": [
|
|
1088
1237
|
{
|
|
1089
|
-
"
|
|
1238
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1239
|
+
"name": "--n-banner-border-radius",
|
|
1240
|
+
"default": "var(--n-border-radius)"
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1244
|
+
"name": "--n-banner-box-shadow",
|
|
1245
|
+
"default": "var(--n-box-shadow-card)"
|
|
1246
|
+
}
|
|
1247
|
+
],
|
|
1248
|
+
"slots": [
|
|
1249
|
+
{
|
|
1250
|
+
"description": "default slot",
|
|
1251
|
+
"name": ""
|
|
1252
|
+
}
|
|
1253
|
+
],
|
|
1254
|
+
"members": [
|
|
1255
|
+
{
|
|
1256
|
+
"kind": "field",
|
|
1257
|
+
"name": "variant",
|
|
1090
1258
|
"type": {
|
|
1091
|
-
"text": "
|
|
1092
|
-
}
|
|
1259
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1260
|
+
},
|
|
1261
|
+
"default": "\"info\"",
|
|
1262
|
+
"description": "The style variant of the banner.",
|
|
1263
|
+
"attribute": "variant",
|
|
1264
|
+
"reflects": true
|
|
1093
1265
|
}
|
|
1094
|
-
]
|
|
1095
|
-
|
|
1096
|
-
{
|
|
1097
|
-
"kind": "function",
|
|
1098
|
-
"name": "monthView",
|
|
1099
|
-
"parameters": [
|
|
1266
|
+
],
|
|
1267
|
+
"attributes": [
|
|
1100
1268
|
{
|
|
1101
|
-
"name": "
|
|
1269
|
+
"name": "variant",
|
|
1102
1270
|
"type": {
|
|
1103
|
-
"text": "
|
|
1104
|
-
}
|
|
1271
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1272
|
+
},
|
|
1273
|
+
"default": "\"info\"",
|
|
1274
|
+
"description": "The style variant of the banner.",
|
|
1275
|
+
"fieldName": "variant"
|
|
1105
1276
|
}
|
|
1106
|
-
]
|
|
1277
|
+
],
|
|
1278
|
+
"superclass": {
|
|
1279
|
+
"name": "LitElement",
|
|
1280
|
+
"package": "lit"
|
|
1281
|
+
},
|
|
1282
|
+
"status": "ready",
|
|
1283
|
+
"category": "feedback",
|
|
1284
|
+
"displayName": null,
|
|
1285
|
+
"examples": [],
|
|
1286
|
+
"tagName": "nord-banner",
|
|
1287
|
+
"customElement": true
|
|
1107
1288
|
}
|
|
1108
1289
|
],
|
|
1109
1290
|
"exports": [
|
|
1110
1291
|
{
|
|
1111
1292
|
"kind": "js",
|
|
1112
|
-
"name": "
|
|
1293
|
+
"name": "default",
|
|
1113
1294
|
"declaration": {
|
|
1114
|
-
"name": "
|
|
1115
|
-
"module": "src/
|
|
1295
|
+
"name": "Banner",
|
|
1296
|
+
"module": "src/banner/Banner.ts"
|
|
1116
1297
|
}
|
|
1117
1298
|
},
|
|
1118
1299
|
{
|
|
1119
|
-
"kind": "
|
|
1120
|
-
"name": "
|
|
1300
|
+
"kind": "custom-element-definition",
|
|
1301
|
+
"name": "nord-banner",
|
|
1121
1302
|
"declaration": {
|
|
1122
|
-
"name": "
|
|
1123
|
-
"module": "src/
|
|
1303
|
+
"name": "Banner",
|
|
1304
|
+
"module": "src/banner/Banner.ts"
|
|
1124
1305
|
}
|
|
1125
1306
|
}
|
|
1126
1307
|
],
|
|
1127
|
-
"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
|
|
1308
|
+
"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"
|
|
1128
1309
|
},
|
|
1129
1310
|
{
|
|
1130
1311
|
"kind": "javascript-module",
|
|
1131
|
-
"path": "src/
|
|
1312
|
+
"path": "src/calendar/Calendar.ts",
|
|
1132
1313
|
"declarations": [
|
|
1133
1314
|
{
|
|
1134
1315
|
"kind": "class",
|
|
1135
|
-
"description": "
|
|
1136
|
-
"name": "
|
|
1316
|
+
"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.",
|
|
1317
|
+
"name": "Calendar",
|
|
1137
1318
|
"cssProperties": [
|
|
1138
1319
|
{
|
|
1139
|
-
"description": "Controls
|
|
1140
|
-
"name": "--n-
|
|
1141
|
-
"default": "var(--n-border-radius
|
|
1320
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1321
|
+
"name": "--n-calendar-border-radius",
|
|
1322
|
+
"default": "var(--n-border-radius)"
|
|
1142
1323
|
},
|
|
1143
1324
|
{
|
|
1144
|
-
"description": "Controls the
|
|
1145
|
-
"name": "--n-
|
|
1146
|
-
"default": "var(--n-
|
|
1147
|
-
}
|
|
1325
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1326
|
+
"name": "--n-calendar-box-shadow",
|
|
1327
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1328
|
+
}
|
|
1329
|
+
],
|
|
1330
|
+
"members": [
|
|
1148
1331
|
{
|
|
1149
|
-
"
|
|
1150
|
-
"name": "
|
|
1151
|
-
"
|
|
1332
|
+
"kind": "field",
|
|
1333
|
+
"name": "dialogLabelId",
|
|
1334
|
+
"type": {
|
|
1335
|
+
"text": "string"
|
|
1336
|
+
},
|
|
1337
|
+
"privacy": "private",
|
|
1338
|
+
"default": "\"dialog-header\""
|
|
1152
1339
|
},
|
|
1153
1340
|
{
|
|
1154
|
-
"
|
|
1155
|
-
"name": "
|
|
1156
|
-
"
|
|
1341
|
+
"kind": "field",
|
|
1342
|
+
"name": "monthSelectNode",
|
|
1343
|
+
"type": {
|
|
1344
|
+
"text": "HTMLElement"
|
|
1345
|
+
},
|
|
1346
|
+
"privacy": "private"
|
|
1157
1347
|
},
|
|
1158
1348
|
{
|
|
1159
|
-
"
|
|
1160
|
-
"name": "
|
|
1161
|
-
"
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
{
|
|
1166
|
-
"description": "The button content",
|
|
1167
|
-
"name": ""
|
|
1349
|
+
"kind": "field",
|
|
1350
|
+
"name": "focusedDayNode",
|
|
1351
|
+
"type": {
|
|
1352
|
+
"text": "HTMLButtonElement"
|
|
1353
|
+
},
|
|
1354
|
+
"privacy": "private"
|
|
1168
1355
|
},
|
|
1169
1356
|
{
|
|
1170
|
-
"
|
|
1171
|
-
"name": "
|
|
1357
|
+
"kind": "field",
|
|
1358
|
+
"name": "direction",
|
|
1359
|
+
"privacy": "private",
|
|
1360
|
+
"default": "new DirectionController(this)"
|
|
1172
1361
|
},
|
|
1173
1362
|
{
|
|
1174
|
-
"
|
|
1175
|
-
"name": "
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1363
|
+
"kind": "field",
|
|
1364
|
+
"name": "swipe",
|
|
1365
|
+
"privacy": "private",
|
|
1366
|
+
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
1367
|
+
},
|
|
1179
1368
|
{
|
|
1180
1369
|
"kind": "field",
|
|
1181
|
-
"name": "
|
|
1370
|
+
"name": "shortcuts",
|
|
1182
1371
|
"privacy": "private"
|
|
1183
1372
|
},
|
|
1184
1373
|
{
|
|
1185
1374
|
"kind": "field",
|
|
1186
|
-
"name": "
|
|
1375
|
+
"name": "localize",
|
|
1187
1376
|
"privacy": "private",
|
|
1188
|
-
"default": "new
|
|
1377
|
+
"default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
|
|
1189
1378
|
},
|
|
1190
1379
|
{
|
|
1191
1380
|
"kind": "field",
|
|
1192
|
-
"name": "
|
|
1381
|
+
"name": "dateFormatShort",
|
|
1382
|
+
"type": {
|
|
1383
|
+
"text": "Intl.DateTimeFormat"
|
|
1384
|
+
},
|
|
1193
1385
|
"privacy": "private",
|
|
1194
|
-
"
|
|
1386
|
+
"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"
|
|
1195
1387
|
},
|
|
1196
1388
|
{
|
|
1197
1389
|
"kind": "field",
|
|
1198
|
-
"name": "
|
|
1390
|
+
"name": "monthNames",
|
|
1199
1391
|
"type": {
|
|
1200
|
-
"text": "
|
|
1392
|
+
"text": "string[]"
|
|
1201
1393
|
},
|
|
1202
|
-
"
|
|
1203
|
-
"description": "The style variant of the button.",
|
|
1204
|
-
"attribute": "variant",
|
|
1205
|
-
"reflects": true
|
|
1394
|
+
"privacy": "private"
|
|
1206
1395
|
},
|
|
1207
1396
|
{
|
|
1208
1397
|
"kind": "field",
|
|
1209
|
-
"name": "
|
|
1398
|
+
"name": "monthNamesShort",
|
|
1210
1399
|
"type": {
|
|
1211
|
-
"text": "
|
|
1400
|
+
"text": "string[]"
|
|
1212
1401
|
},
|
|
1213
|
-
"
|
|
1214
|
-
"description": "The type of the button.",
|
|
1215
|
-
"attribute": "type",
|
|
1216
|
-
"reflects": true
|
|
1402
|
+
"privacy": "private"
|
|
1217
1403
|
},
|
|
1218
1404
|
{
|
|
1219
1405
|
"kind": "field",
|
|
1220
|
-
"name": "
|
|
1406
|
+
"name": "dayNames",
|
|
1221
1407
|
"type": {
|
|
1222
|
-
"text": "
|
|
1408
|
+
"text": "string[]"
|
|
1223
1409
|
},
|
|
1224
|
-
"
|
|
1225
|
-
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1226
|
-
"attribute": "size",
|
|
1227
|
-
"reflects": true
|
|
1410
|
+
"privacy": "private"
|
|
1228
1411
|
},
|
|
1229
1412
|
{
|
|
1230
1413
|
"kind": "field",
|
|
1231
|
-
"name": "
|
|
1414
|
+
"name": "dayNamesShort",
|
|
1232
1415
|
"type": {
|
|
1233
|
-
"text": "
|
|
1416
|
+
"text": "string[]"
|
|
1234
1417
|
},
|
|
1235
|
-
"privacy": "private"
|
|
1236
|
-
"attribute": "aria-expanded"
|
|
1418
|
+
"privacy": "private"
|
|
1237
1419
|
},
|
|
1238
1420
|
{
|
|
1239
1421
|
"kind": "field",
|
|
1240
|
-
"name": "
|
|
1422
|
+
"name": "value",
|
|
1241
1423
|
"type": {
|
|
1242
|
-
"text": "
|
|
1424
|
+
"text": "string"
|
|
1243
1425
|
},
|
|
1244
|
-
"
|
|
1245
|
-
"
|
|
1426
|
+
"default": "\"\"",
|
|
1427
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1428
|
+
"attribute": "value"
|
|
1246
1429
|
},
|
|
1247
1430
|
{
|
|
1248
1431
|
"kind": "field",
|
|
1249
|
-
"name": "
|
|
1432
|
+
"name": "firstDayOfWeek",
|
|
1250
1433
|
"type": {
|
|
1251
|
-
"text": "
|
|
1434
|
+
"text": "DaysOfWeek"
|
|
1252
1435
|
},
|
|
1253
|
-
"description": "
|
|
1254
|
-
"attribute": "
|
|
1255
|
-
"reflects": true
|
|
1436
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1437
|
+
"attribute": "firstDayOfWeek"
|
|
1256
1438
|
},
|
|
1257
1439
|
{
|
|
1258
1440
|
"kind": "field",
|
|
1259
|
-
"name": "
|
|
1441
|
+
"name": "min",
|
|
1260
1442
|
"type": {
|
|
1261
|
-
"text": "
|
|
1443
|
+
"text": "string"
|
|
1262
1444
|
},
|
|
1263
|
-
"default": "
|
|
1264
|
-
"description": "
|
|
1265
|
-
"attribute": "
|
|
1445
|
+
"default": "\"\"",
|
|
1446
|
+
"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.",
|
|
1447
|
+
"attribute": "min"
|
|
1266
1448
|
},
|
|
1267
1449
|
{
|
|
1268
1450
|
"kind": "field",
|
|
1269
|
-
"name": "
|
|
1451
|
+
"name": "max",
|
|
1270
1452
|
"type": {
|
|
1271
|
-
"text": "
|
|
1453
|
+
"text": "string"
|
|
1272
1454
|
},
|
|
1273
|
-
"default": "\"
|
|
1274
|
-
"description": "
|
|
1275
|
-
"attribute": "
|
|
1455
|
+
"default": "\"\"",
|
|
1456
|
+
"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.",
|
|
1457
|
+
"attribute": "max"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"kind": "field",
|
|
1461
|
+
"name": "expand",
|
|
1462
|
+
"type": {
|
|
1463
|
+
"text": "boolean"
|
|
1464
|
+
},
|
|
1465
|
+
"default": "false",
|
|
1466
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1467
|
+
"attribute": "expand",
|
|
1276
1468
|
"reflects": true
|
|
1277
1469
|
},
|
|
1278
1470
|
{
|
|
1279
1471
|
"kind": "field",
|
|
1280
|
-
"name": "
|
|
1472
|
+
"name": "isDateDisabled",
|
|
1473
|
+
"type": {
|
|
1474
|
+
"text": "DateDisabledPredicate"
|
|
1475
|
+
},
|
|
1476
|
+
"default": "isDateDisabled",
|
|
1477
|
+
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"kind": "field",
|
|
1481
|
+
"name": "activeFocus",
|
|
1281
1482
|
"type": {
|
|
1282
1483
|
"text": "boolean"
|
|
1283
1484
|
},
|
|
1284
|
-
"
|
|
1285
|
-
"
|
|
1286
|
-
"attribute": "expand",
|
|
1287
|
-
"reflects": true
|
|
1485
|
+
"privacy": "private",
|
|
1486
|
+
"default": "false"
|
|
1288
1487
|
},
|
|
1289
1488
|
{
|
|
1290
1489
|
"kind": "field",
|
|
1291
|
-
"name": "
|
|
1292
|
-
"
|
|
1293
|
-
|
|
1294
|
-
},
|
|
1295
|
-
"default": "false",
|
|
1296
|
-
"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.",
|
|
1297
|
-
"attribute": "loading",
|
|
1298
|
-
"reflects": true
|
|
1490
|
+
"name": "focusedDay",
|
|
1491
|
+
"privacy": "private",
|
|
1492
|
+
"default": "new Date()"
|
|
1299
1493
|
},
|
|
1300
1494
|
{
|
|
1301
1495
|
"kind": "method",
|
|
1302
|
-
"name": "
|
|
1303
|
-
"privacy": "private",
|
|
1496
|
+
"name": "focus",
|
|
1304
1497
|
"parameters": [
|
|
1305
1498
|
{
|
|
1306
|
-
"name": "
|
|
1499
|
+
"name": "options",
|
|
1500
|
+
"optional": true,
|
|
1307
1501
|
"type": {
|
|
1308
|
-
"text": "
|
|
1309
|
-
}
|
|
1502
|
+
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
1503
|
+
},
|
|
1504
|
+
"description": "An object which controls aspects of the focusing process."
|
|
1310
1505
|
}
|
|
1311
1506
|
],
|
|
1312
|
-
"description": "
|
|
1507
|
+
"description": "Programmatically move focus to the calendar."
|
|
1313
1508
|
},
|
|
1314
1509
|
{
|
|
1315
1510
|
"kind": "method",
|
|
1316
|
-
"name": "
|
|
1317
|
-
"privacy": "
|
|
1318
|
-
"parameters": [
|
|
1319
|
-
{
|
|
1320
|
-
"name": "innards",
|
|
1321
|
-
"type": {
|
|
1322
|
-
"text": "TemplateResult"
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
]
|
|
1511
|
+
"name": "handleValueChange",
|
|
1512
|
+
"privacy": "protected"
|
|
1326
1513
|
},
|
|
1327
1514
|
{
|
|
1328
1515
|
"kind": "method",
|
|
1329
|
-
"name": "
|
|
1516
|
+
"name": "handleFocusedDayChange",
|
|
1517
|
+
"privacy": "protected"
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"kind": "method",
|
|
1521
|
+
"name": "handleLangChange",
|
|
1330
1522
|
"privacy": "private"
|
|
1331
1523
|
},
|
|
1332
1524
|
{
|
|
1333
1525
|
"kind": "field",
|
|
1334
|
-
"name": "
|
|
1526
|
+
"name": "handleDaySelect",
|
|
1335
1527
|
"privacy": "private"
|
|
1336
1528
|
},
|
|
1337
1529
|
{
|
|
1338
1530
|
"kind": "method",
|
|
1339
|
-
"name": "
|
|
1531
|
+
"name": "addDays",
|
|
1340
1532
|
"privacy": "private",
|
|
1341
1533
|
"parameters": [
|
|
1342
1534
|
{
|
|
1343
|
-
"name": "
|
|
1535
|
+
"name": "days",
|
|
1344
1536
|
"type": {
|
|
1345
|
-
"text": "
|
|
1537
|
+
"text": "number"
|
|
1346
1538
|
}
|
|
1347
1539
|
}
|
|
1348
1540
|
]
|
|
1349
1541
|
},
|
|
1350
1542
|
{
|
|
1351
1543
|
"kind": "method",
|
|
1352
|
-
"name": "
|
|
1544
|
+
"name": "addMonths",
|
|
1353
1545
|
"privacy": "private",
|
|
1354
1546
|
"parameters": [
|
|
1355
1547
|
{
|
|
1356
|
-
"name": "
|
|
1548
|
+
"name": "months",
|
|
1357
1549
|
"type": {
|
|
1358
|
-
"text": "
|
|
1550
|
+
"text": "number"
|
|
1359
1551
|
}
|
|
1360
1552
|
}
|
|
1361
|
-
]
|
|
1362
|
-
"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."
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
"kind": "field",
|
|
1366
|
-
"name": "disabled",
|
|
1367
|
-
"type": {
|
|
1368
|
-
"text": "boolean"
|
|
1369
|
-
},
|
|
1370
|
-
"default": "false",
|
|
1371
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1372
|
-
"attribute": "disabled",
|
|
1373
|
-
"reflects": true,
|
|
1374
|
-
"inheritedFrom": {
|
|
1375
|
-
"name": "InputMixin",
|
|
1376
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1377
|
-
}
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
"kind": "field",
|
|
1381
|
-
"name": "name",
|
|
1382
|
-
"type": {
|
|
1383
|
-
"text": "string | undefined"
|
|
1384
|
-
},
|
|
1385
|
-
"description": "The name of the form component.",
|
|
1386
|
-
"attribute": "name",
|
|
1387
|
-
"inheritedFrom": {
|
|
1388
|
-
"name": "InputMixin",
|
|
1389
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1390
|
-
}
|
|
1553
|
+
]
|
|
1391
1554
|
},
|
|
1392
1555
|
{
|
|
1393
|
-
"kind": "
|
|
1394
|
-
"name": "
|
|
1395
|
-
"
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
}
|
|
1556
|
+
"kind": "method",
|
|
1557
|
+
"name": "addYears",
|
|
1558
|
+
"privacy": "private",
|
|
1559
|
+
"parameters": [
|
|
1560
|
+
{
|
|
1561
|
+
"name": "years",
|
|
1562
|
+
"type": {
|
|
1563
|
+
"text": "number"
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
]
|
|
1405
1567
|
},
|
|
1406
1568
|
{
|
|
1407
|
-
"kind": "
|
|
1408
|
-
"name": "
|
|
1409
|
-
"
|
|
1410
|
-
"inheritedFrom": {
|
|
1411
|
-
"name": "InputMixin",
|
|
1412
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1413
|
-
}
|
|
1569
|
+
"kind": "method",
|
|
1570
|
+
"name": "startOfWeek",
|
|
1571
|
+
"privacy": "private"
|
|
1414
1572
|
},
|
|
1415
1573
|
{
|
|
1416
|
-
"kind": "
|
|
1417
|
-
"name": "
|
|
1418
|
-
"privacy": "
|
|
1419
|
-
"inheritedFrom": {
|
|
1420
|
-
"name": "FocusableMixin",
|
|
1421
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1422
|
-
}
|
|
1574
|
+
"kind": "method",
|
|
1575
|
+
"name": "endOfWeek",
|
|
1576
|
+
"privacy": "private"
|
|
1423
1577
|
},
|
|
1424
1578
|
{
|
|
1425
1579
|
"kind": "method",
|
|
1426
|
-
"name": "
|
|
1580
|
+
"name": "setMonth",
|
|
1581
|
+
"privacy": "private",
|
|
1427
1582
|
"parameters": [
|
|
1428
1583
|
{
|
|
1429
|
-
"name": "
|
|
1430
|
-
"optional": true,
|
|
1584
|
+
"name": "month",
|
|
1431
1585
|
"type": {
|
|
1432
|
-
"text": "
|
|
1433
|
-
}
|
|
1434
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1586
|
+
"text": "number"
|
|
1587
|
+
}
|
|
1435
1588
|
}
|
|
1436
|
-
]
|
|
1437
|
-
"description": "Programmatically move focus to the component.",
|
|
1438
|
-
"inheritedFrom": {
|
|
1439
|
-
"name": "FocusableMixin",
|
|
1440
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1441
|
-
}
|
|
1589
|
+
]
|
|
1442
1590
|
},
|
|
1443
1591
|
{
|
|
1444
1592
|
"kind": "method",
|
|
1445
|
-
"name": "
|
|
1446
|
-
"
|
|
1447
|
-
"
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1593
|
+
"name": "setYear",
|
|
1594
|
+
"privacy": "private",
|
|
1595
|
+
"parameters": [
|
|
1596
|
+
{
|
|
1597
|
+
"name": "year",
|
|
1598
|
+
"type": {
|
|
1599
|
+
"text": "number"
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
]
|
|
1451
1603
|
},
|
|
1452
1604
|
{
|
|
1453
1605
|
"kind": "method",
|
|
1454
|
-
"name": "
|
|
1455
|
-
"
|
|
1456
|
-
"
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
"name": "variant",
|
|
1465
|
-
"type": {
|
|
1466
|
-
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
|
|
1467
|
-
},
|
|
1468
|
-
"default": "\"default\"",
|
|
1469
|
-
"description": "The style variant of the button.",
|
|
1470
|
-
"fieldName": "variant"
|
|
1471
|
-
},
|
|
1472
|
-
{
|
|
1473
|
-
"name": "type",
|
|
1474
|
-
"type": {
|
|
1475
|
-
"text": "\"button\" | \"submit\" | \"reset\""
|
|
1476
|
-
},
|
|
1477
|
-
"default": "\"submit\"",
|
|
1478
|
-
"description": "The type of the button.",
|
|
1479
|
-
"fieldName": "type"
|
|
1606
|
+
"name": "setFocusedDay",
|
|
1607
|
+
"privacy": "private",
|
|
1608
|
+
"parameters": [
|
|
1609
|
+
{
|
|
1610
|
+
"name": "day",
|
|
1611
|
+
"type": {
|
|
1612
|
+
"text": "Date"
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
]
|
|
1480
1616
|
},
|
|
1481
1617
|
{
|
|
1482
|
-
"
|
|
1483
|
-
"
|
|
1484
|
-
|
|
1485
|
-
},
|
|
1486
|
-
"default": "\"m\"",
|
|
1487
|
-
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1488
|
-
"fieldName": "size"
|
|
1618
|
+
"kind": "field",
|
|
1619
|
+
"name": "handleMonthSelect",
|
|
1620
|
+
"privacy": "private"
|
|
1489
1621
|
},
|
|
1490
1622
|
{
|
|
1491
|
-
"
|
|
1492
|
-
"
|
|
1493
|
-
|
|
1494
|
-
},
|
|
1495
|
-
"fieldName": "accessibleExpanded"
|
|
1623
|
+
"kind": "field",
|
|
1624
|
+
"name": "handleYearSelect",
|
|
1625
|
+
"privacy": "private"
|
|
1496
1626
|
},
|
|
1497
1627
|
{
|
|
1498
|
-
"
|
|
1499
|
-
"
|
|
1500
|
-
|
|
1501
|
-
},
|
|
1502
|
-
"fieldName": "accessibleHasPopup"
|
|
1628
|
+
"kind": "field",
|
|
1629
|
+
"name": "handleNextMonthClick",
|
|
1630
|
+
"privacy": "private"
|
|
1503
1631
|
},
|
|
1504
1632
|
{
|
|
1505
|
-
"
|
|
1506
|
-
"
|
|
1507
|
-
|
|
1508
|
-
},
|
|
1509
|
-
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1510
|
-
"fieldName": "href"
|
|
1633
|
+
"kind": "field",
|
|
1634
|
+
"name": "handlePreviousMonthClick",
|
|
1635
|
+
"privacy": "private"
|
|
1511
1636
|
},
|
|
1512
|
-
{
|
|
1513
|
-
"
|
|
1514
|
-
"
|
|
1515
|
-
|
|
1516
|
-
},
|
|
1517
|
-
"default": "false",
|
|
1518
|
-
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1519
|
-
"fieldName": "download"
|
|
1637
|
+
{
|
|
1638
|
+
"kind": "field",
|
|
1639
|
+
"name": "enableActiveFocus",
|
|
1640
|
+
"privacy": "private"
|
|
1520
1641
|
},
|
|
1521
1642
|
{
|
|
1522
|
-
"
|
|
1643
|
+
"kind": "field",
|
|
1644
|
+
"name": "disableActiveFocus",
|
|
1645
|
+
"privacy": "private"
|
|
1646
|
+
}
|
|
1647
|
+
],
|
|
1648
|
+
"events": [
|
|
1649
|
+
{
|
|
1650
|
+
"name": "nord-focus-date",
|
|
1523
1651
|
"type": {
|
|
1524
|
-
"text": "
|
|
1652
|
+
"text": "DateSelectEvent"
|
|
1525
1653
|
},
|
|
1526
|
-
"
|
|
1527
|
-
"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.",
|
|
1528
|
-
"fieldName": "target"
|
|
1654
|
+
"description": "Dispatched when the calendar's focused date changes."
|
|
1529
1655
|
},
|
|
1530
1656
|
{
|
|
1531
|
-
"name": "expand",
|
|
1532
1657
|
"type": {
|
|
1533
|
-
"text": "
|
|
1658
|
+
"text": "DateSelectEvent"
|
|
1534
1659
|
},
|
|
1535
|
-
"
|
|
1536
|
-
"
|
|
1537
|
-
|
|
1538
|
-
|
|
1660
|
+
"description": "Dispatched when a date is selected and the value changes.",
|
|
1661
|
+
"name": "change"
|
|
1662
|
+
}
|
|
1663
|
+
],
|
|
1664
|
+
"attributes": [
|
|
1539
1665
|
{
|
|
1540
|
-
"name": "
|
|
1666
|
+
"name": "value",
|
|
1541
1667
|
"type": {
|
|
1542
|
-
"text": "
|
|
1668
|
+
"text": "string"
|
|
1543
1669
|
},
|
|
1544
|
-
"default": "
|
|
1545
|
-
"description": "
|
|
1546
|
-
"fieldName": "
|
|
1670
|
+
"default": "\"\"",
|
|
1671
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1672
|
+
"fieldName": "value"
|
|
1547
1673
|
},
|
|
1548
1674
|
{
|
|
1549
|
-
"name": "
|
|
1675
|
+
"name": "firstDayOfWeek",
|
|
1550
1676
|
"type": {
|
|
1551
|
-
"text": "
|
|
1677
|
+
"text": "DaysOfWeek"
|
|
1552
1678
|
},
|
|
1553
|
-
"
|
|
1554
|
-
"
|
|
1555
|
-
"fieldName": "disabled",
|
|
1556
|
-
"inheritedFrom": {
|
|
1557
|
-
"name": "InputMixin",
|
|
1558
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1559
|
-
}
|
|
1679
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1680
|
+
"fieldName": "firstDayOfWeek"
|
|
1560
1681
|
},
|
|
1561
1682
|
{
|
|
1562
|
-
"name": "
|
|
1683
|
+
"name": "min",
|
|
1563
1684
|
"type": {
|
|
1564
|
-
"text": "string
|
|
1685
|
+
"text": "string"
|
|
1565
1686
|
},
|
|
1566
|
-
"
|
|
1567
|
-
"
|
|
1568
|
-
"
|
|
1569
|
-
"name": "InputMixin",
|
|
1570
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1571
|
-
}
|
|
1687
|
+
"default": "\"\"",
|
|
1688
|
+
"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.",
|
|
1689
|
+
"fieldName": "min"
|
|
1572
1690
|
},
|
|
1573
1691
|
{
|
|
1574
|
-
"name": "
|
|
1692
|
+
"name": "max",
|
|
1575
1693
|
"type": {
|
|
1576
1694
|
"text": "string"
|
|
1577
1695
|
},
|
|
1578
1696
|
"default": "\"\"",
|
|
1579
|
-
"description": "
|
|
1580
|
-
"fieldName": "
|
|
1581
|
-
"inheritedFrom": {
|
|
1582
|
-
"name": "InputMixin",
|
|
1583
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
],
|
|
1587
|
-
"mixins": [
|
|
1588
|
-
{
|
|
1589
|
-
"name": "InputMixin",
|
|
1590
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
1697
|
+
"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.",
|
|
1698
|
+
"fieldName": "max"
|
|
1591
1699
|
},
|
|
1592
1700
|
{
|
|
1593
|
-
"name": "
|
|
1594
|
-
"
|
|
1701
|
+
"name": "expand",
|
|
1702
|
+
"type": {
|
|
1703
|
+
"text": "boolean"
|
|
1704
|
+
},
|
|
1705
|
+
"default": "false",
|
|
1706
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1707
|
+
"fieldName": "expand"
|
|
1595
1708
|
}
|
|
1596
1709
|
],
|
|
1597
1710
|
"superclass": {
|
|
@@ -1599,10 +1712,10 @@
|
|
|
1599
1712
|
"package": "lit"
|
|
1600
1713
|
},
|
|
1601
1714
|
"status": "ready",
|
|
1602
|
-
"category": "
|
|
1715
|
+
"category": "list",
|
|
1603
1716
|
"displayName": null,
|
|
1604
1717
|
"examples": [],
|
|
1605
|
-
"tagName": "nord-
|
|
1718
|
+
"tagName": "nord-calendar",
|
|
1606
1719
|
"customElement": true
|
|
1607
1720
|
}
|
|
1608
1721
|
],
|
|
@@ -1611,229 +1724,121 @@
|
|
|
1611
1724
|
"kind": "js",
|
|
1612
1725
|
"name": "default",
|
|
1613
1726
|
"declaration": {
|
|
1614
|
-
"name": "
|
|
1615
|
-
"module": "src/
|
|
1727
|
+
"name": "Calendar",
|
|
1728
|
+
"module": "src/calendar/Calendar.ts"
|
|
1616
1729
|
}
|
|
1617
1730
|
},
|
|
1618
1731
|
{
|
|
1619
1732
|
"kind": "custom-element-definition",
|
|
1620
|
-
"name": "nord-
|
|
1733
|
+
"name": "nord-calendar",
|
|
1621
1734
|
"declaration": {
|
|
1622
|
-
"name": "
|
|
1623
|
-
"module": "src/
|
|
1735
|
+
"name": "Calendar",
|
|
1736
|
+
"module": "src/calendar/Calendar.ts"
|
|
1624
1737
|
}
|
|
1625
1738
|
}
|
|
1626
1739
|
],
|
|
1627
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n-
|
|
1740
|
+
"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"
|
|
1628
1741
|
},
|
|
1629
1742
|
{
|
|
1630
1743
|
"kind": "javascript-module",
|
|
1631
|
-
"path": "src/
|
|
1744
|
+
"path": "src/calendar/DateSelectEvent.ts",
|
|
1632
1745
|
"declarations": [
|
|
1633
1746
|
{
|
|
1634
1747
|
"kind": "class",
|
|
1635
|
-
"description": "
|
|
1636
|
-
"name": "
|
|
1637
|
-
"slots": [
|
|
1638
|
-
{
|
|
1639
|
-
"description": "The badge content.",
|
|
1640
|
-
"name": ""
|
|
1641
|
-
}
|
|
1642
|
-
],
|
|
1643
|
-
"members": [
|
|
1644
|
-
{
|
|
1645
|
-
"kind": "field",
|
|
1646
|
-
"name": "type",
|
|
1647
|
-
"type": {
|
|
1648
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1649
|
-
},
|
|
1650
|
-
"default": "\"neutral\"",
|
|
1651
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1652
|
-
"attribute": "type",
|
|
1653
|
-
"reflects": true
|
|
1654
|
-
},
|
|
1655
|
-
{
|
|
1656
|
-
"kind": "field",
|
|
1657
|
-
"name": "progress",
|
|
1658
|
-
"type": {
|
|
1659
|
-
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
1660
|
-
},
|
|
1661
|
-
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
1662
|
-
"attribute": "progress"
|
|
1663
|
-
}
|
|
1664
|
-
],
|
|
1665
|
-
"attributes": [
|
|
1666
|
-
{
|
|
1667
|
-
"name": "type",
|
|
1668
|
-
"type": {
|
|
1669
|
-
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
1670
|
-
},
|
|
1671
|
-
"default": "\"neutral\"",
|
|
1672
|
-
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
1673
|
-
"fieldName": "type"
|
|
1674
|
-
},
|
|
1675
|
-
{
|
|
1676
|
-
"name": "progress",
|
|
1677
|
-
"type": {
|
|
1678
|
-
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
1679
|
-
},
|
|
1680
|
-
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
1681
|
-
"fieldName": "progress"
|
|
1682
|
-
}
|
|
1683
|
-
],
|
|
1748
|
+
"description": "",
|
|
1749
|
+
"name": "DateSelectEvent",
|
|
1684
1750
|
"superclass": {
|
|
1685
|
-
"name": "
|
|
1686
|
-
"
|
|
1751
|
+
"name": "NordEvent",
|
|
1752
|
+
"module": "/src/common/events.js"
|
|
1687
1753
|
},
|
|
1688
|
-
"
|
|
1689
|
-
"category": "text",
|
|
1690
|
-
"displayName": null,
|
|
1691
|
-
"examples": [],
|
|
1692
|
-
"tagName": "nord-badge",
|
|
1693
|
-
"customElement": true
|
|
1754
|
+
"examples": []
|
|
1694
1755
|
}
|
|
1695
1756
|
],
|
|
1696
1757
|
"exports": [
|
|
1697
1758
|
{
|
|
1698
1759
|
"kind": "js",
|
|
1699
|
-
"name": "
|
|
1700
|
-
"declaration": {
|
|
1701
|
-
"name": "Badge",
|
|
1702
|
-
"module": "src/badge/Badge.ts"
|
|
1703
|
-
}
|
|
1704
|
-
},
|
|
1705
|
-
{
|
|
1706
|
-
"kind": "custom-element-definition",
|
|
1707
|
-
"name": "nord-badge",
|
|
1760
|
+
"name": "DateSelectEvent",
|
|
1708
1761
|
"declaration": {
|
|
1709
|
-
"name": "
|
|
1710
|
-
"module": "src/
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1713
|
-
],
|
|
1714
|
-
"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
|
|
1715
|
-
},
|
|
1716
|
-
{
|
|
1717
|
-
"kind": "javascript-module",
|
|
1718
|
-
"path": "src/
|
|
1719
|
-
"declarations": [
|
|
1720
|
-
{
|
|
1721
|
-
"kind": "
|
|
1722
|
-
"
|
|
1723
|
-
"
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
"
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
"name": ""
|
|
1750
|
-
},
|
|
1751
|
-
{
|
|
1752
|
-
"description": "Optional slot that holds a header for the card.",
|
|
1753
|
-
"name": "header"
|
|
1754
|
-
},
|
|
1755
|
-
{
|
|
1756
|
-
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1757
|
-
"name": "header-end"
|
|
1758
|
-
},
|
|
1759
|
-
{
|
|
1760
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
1761
|
-
"name": "footer"
|
|
1762
|
-
}
|
|
1763
|
-
],
|
|
1764
|
-
"members": [
|
|
1765
|
-
{
|
|
1766
|
-
"kind": "field",
|
|
1767
|
-
"name": "headerSlot",
|
|
1768
|
-
"privacy": "private",
|
|
1769
|
-
"default": "new SlotController(this, \"header\")"
|
|
1770
|
-
},
|
|
1771
|
-
{
|
|
1772
|
-
"kind": "field",
|
|
1773
|
-
"name": "headerEndSlot",
|
|
1774
|
-
"privacy": "private",
|
|
1775
|
-
"default": "new SlotController(this, \"header-end\")"
|
|
1776
|
-
},
|
|
1777
|
-
{
|
|
1778
|
-
"kind": "field",
|
|
1779
|
-
"name": "footerSlot",
|
|
1780
|
-
"privacy": "private",
|
|
1781
|
-
"default": "new SlotController(this, \"footer\")"
|
|
1782
|
-
},
|
|
1762
|
+
"name": "DateSelectEvent",
|
|
1763
|
+
"module": "src/calendar/DateSelectEvent.ts"
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
],
|
|
1767
|
+
"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"
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
"kind": "javascript-module",
|
|
1771
|
+
"path": "src/calendar/localization.ts",
|
|
1772
|
+
"declarations": [
|
|
1773
|
+
{
|
|
1774
|
+
"kind": "variable",
|
|
1775
|
+
"name": "calendarLocalization",
|
|
1776
|
+
"type": {
|
|
1777
|
+
"text": "object"
|
|
1778
|
+
},
|
|
1779
|
+
"default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
|
|
1780
|
+
}
|
|
1781
|
+
],
|
|
1782
|
+
"exports": [
|
|
1783
|
+
{
|
|
1784
|
+
"kind": "js",
|
|
1785
|
+
"name": "default",
|
|
1786
|
+
"declaration": {
|
|
1787
|
+
"name": "calendarLocalization",
|
|
1788
|
+
"module": "src/calendar/localization.ts"
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
],
|
|
1792
|
+
"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"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"kind": "javascript-module",
|
|
1796
|
+
"path": "src/calendar/month-view.ts",
|
|
1797
|
+
"declarations": [
|
|
1798
|
+
{
|
|
1799
|
+
"kind": "function",
|
|
1800
|
+
"name": "dayView",
|
|
1801
|
+
"parameters": [
|
|
1783
1802
|
{
|
|
1784
|
-
"
|
|
1785
|
-
"name": "padding",
|
|
1803
|
+
"name": "{\n focusedDay,\n today,\n day,\n onDaySelect,\n onKeyboardNavigation,\n disabled,\n inRange,\n isSelected,\n dateFormatter,\n}",
|
|
1786
1804
|
"type": {
|
|
1787
|
-
"text": "
|
|
1788
|
-
}
|
|
1789
|
-
"default": "\"m\"",
|
|
1790
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1791
|
-
"attribute": "padding",
|
|
1792
|
-
"reflects": true
|
|
1805
|
+
"text": "DatePickerDayProps"
|
|
1806
|
+
}
|
|
1793
1807
|
}
|
|
1794
|
-
]
|
|
1795
|
-
|
|
1808
|
+
]
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"kind": "function",
|
|
1812
|
+
"name": "monthView",
|
|
1813
|
+
"parameters": [
|
|
1796
1814
|
{
|
|
1797
|
-
"name": "
|
|
1815
|
+
"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}",
|
|
1798
1816
|
"type": {
|
|
1799
|
-
"text": "
|
|
1800
|
-
}
|
|
1801
|
-
"default": "\"m\"",
|
|
1802
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1803
|
-
"fieldName": "padding"
|
|
1817
|
+
"text": "MonthViewArgs"
|
|
1818
|
+
}
|
|
1804
1819
|
}
|
|
1805
|
-
]
|
|
1806
|
-
"superclass": {
|
|
1807
|
-
"name": "LitElement",
|
|
1808
|
-
"package": "lit"
|
|
1809
|
-
},
|
|
1810
|
-
"status": "ready",
|
|
1811
|
-
"category": "structure",
|
|
1812
|
-
"displayName": null,
|
|
1813
|
-
"examples": [],
|
|
1814
|
-
"tagName": "nord-card",
|
|
1815
|
-
"customElement": true
|
|
1820
|
+
]
|
|
1816
1821
|
}
|
|
1817
1822
|
],
|
|
1818
1823
|
"exports": [
|
|
1819
1824
|
{
|
|
1820
1825
|
"kind": "js",
|
|
1821
|
-
"name": "
|
|
1826
|
+
"name": "dayView",
|
|
1822
1827
|
"declaration": {
|
|
1823
|
-
"name": "
|
|
1824
|
-
"module": "src/
|
|
1828
|
+
"name": "dayView",
|
|
1829
|
+
"module": "src/calendar/month-view.ts"
|
|
1825
1830
|
}
|
|
1826
1831
|
},
|
|
1827
1832
|
{
|
|
1828
|
-
"kind": "
|
|
1829
|
-
"name": "
|
|
1833
|
+
"kind": "js",
|
|
1834
|
+
"name": "monthView",
|
|
1830
1835
|
"declaration": {
|
|
1831
|
-
"name": "
|
|
1832
|
-
"module": "src/
|
|
1836
|
+
"name": "monthView",
|
|
1837
|
+
"module": "src/calendar/month-view.ts"
|
|
1833
1838
|
}
|
|
1834
1839
|
}
|
|
1835
1840
|
],
|
|
1836
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use
|
|
1841
|
+
"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"
|
|
1837
1842
|
},
|
|
1838
1843
|
{
|
|
1839
1844
|
"kind": "javascript-module",
|
|
@@ -9504,86 +9509,6 @@
|
|
|
9504
9509
|
],
|
|
9505
9510
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use a radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\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 radio 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 ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n"
|
|
9506
9511
|
},
|
|
9507
|
-
{
|
|
9508
|
-
"kind": "javascript-module",
|
|
9509
|
-
"path": "src/skeleton/Skeleton.ts",
|
|
9510
|
-
"declarations": [
|
|
9511
|
-
{
|
|
9512
|
-
"kind": "class",
|
|
9513
|
-
"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.",
|
|
9514
|
-
"name": "Skeleton",
|
|
9515
|
-
"cssProperties": [
|
|
9516
|
-
{
|
|
9517
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
9518
|
-
"name": "--n-skeleton-border-radius",
|
|
9519
|
-
"default": "var(--n-border-radius)"
|
|
9520
|
-
},
|
|
9521
|
-
{
|
|
9522
|
-
"description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
9523
|
-
"name": "--n-skeleton-color",
|
|
9524
|
-
"default": "var(--n-color-border)"
|
|
9525
|
-
},
|
|
9526
|
-
{
|
|
9527
|
-
"description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
9528
|
-
"name": "--n-skeleton-sheen-color",
|
|
9529
|
-
"default": "var(--n-color-border-strong)"
|
|
9530
|
-
}
|
|
9531
|
-
],
|
|
9532
|
-
"members": [
|
|
9533
|
-
{
|
|
9534
|
-
"kind": "field",
|
|
9535
|
-
"name": "effect",
|
|
9536
|
-
"type": {
|
|
9537
|
-
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
9538
|
-
},
|
|
9539
|
-
"default": "\"none\"",
|
|
9540
|
-
"description": "Determines which animation effect the skeleton will use.",
|
|
9541
|
-
"attribute": "effect"
|
|
9542
|
-
}
|
|
9543
|
-
],
|
|
9544
|
-
"attributes": [
|
|
9545
|
-
{
|
|
9546
|
-
"name": "effect",
|
|
9547
|
-
"type": {
|
|
9548
|
-
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
9549
|
-
},
|
|
9550
|
-
"default": "\"none\"",
|
|
9551
|
-
"description": "Determines which animation effect the skeleton will use.",
|
|
9552
|
-
"fieldName": "effect"
|
|
9553
|
-
}
|
|
9554
|
-
],
|
|
9555
|
-
"superclass": {
|
|
9556
|
-
"name": "LitElement",
|
|
9557
|
-
"package": "lit"
|
|
9558
|
-
},
|
|
9559
|
-
"status": "new",
|
|
9560
|
-
"category": "feedback",
|
|
9561
|
-
"displayName": null,
|
|
9562
|
-
"examples": [],
|
|
9563
|
-
"tagName": "nord-skeleton",
|
|
9564
|
-
"customElement": true
|
|
9565
|
-
}
|
|
9566
|
-
],
|
|
9567
|
-
"exports": [
|
|
9568
|
-
{
|
|
9569
|
-
"kind": "js",
|
|
9570
|
-
"name": "default",
|
|
9571
|
-
"declaration": {
|
|
9572
|
-
"name": "Skeleton",
|
|
9573
|
-
"module": "src/skeleton/Skeleton.ts"
|
|
9574
|
-
}
|
|
9575
|
-
},
|
|
9576
|
-
{
|
|
9577
|
-
"kind": "custom-element-definition",
|
|
9578
|
-
"name": "nord-skeleton",
|
|
9579
|
-
"declaration": {
|
|
9580
|
-
"name": "Skeleton",
|
|
9581
|
-
"module": "src/skeleton/Skeleton.ts"
|
|
9582
|
-
}
|
|
9583
|
-
}
|
|
9584
|
-
],
|
|
9585
|
-
"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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
|
|
9586
|
-
},
|
|
9587
9512
|
{
|
|
9588
9513
|
"kind": "javascript-module",
|
|
9589
9514
|
"path": "src/select/Select.ts",
|
|
@@ -10276,6 +10201,86 @@
|
|
|
10276
10201
|
],
|
|
10277
10202
|
"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 let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using radio components instead, if you have enough space to allow it. \n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing select labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n"
|
|
10278
10203
|
},
|
|
10204
|
+
{
|
|
10205
|
+
"kind": "javascript-module",
|
|
10206
|
+
"path": "src/skeleton/Skeleton.ts",
|
|
10207
|
+
"declarations": [
|
|
10208
|
+
{
|
|
10209
|
+
"kind": "class",
|
|
10210
|
+
"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.",
|
|
10211
|
+
"name": "Skeleton",
|
|
10212
|
+
"cssProperties": [
|
|
10213
|
+
{
|
|
10214
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
10215
|
+
"name": "--n-skeleton-border-radius",
|
|
10216
|
+
"default": "var(--n-border-radius)"
|
|
10217
|
+
},
|
|
10218
|
+
{
|
|
10219
|
+
"description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
10220
|
+
"name": "--n-skeleton-color",
|
|
10221
|
+
"default": "var(--n-color-border)"
|
|
10222
|
+
},
|
|
10223
|
+
{
|
|
10224
|
+
"description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
10225
|
+
"name": "--n-skeleton-sheen-color",
|
|
10226
|
+
"default": "var(--n-color-border-strong)"
|
|
10227
|
+
}
|
|
10228
|
+
],
|
|
10229
|
+
"members": [
|
|
10230
|
+
{
|
|
10231
|
+
"kind": "field",
|
|
10232
|
+
"name": "effect",
|
|
10233
|
+
"type": {
|
|
10234
|
+
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
10235
|
+
},
|
|
10236
|
+
"default": "\"none\"",
|
|
10237
|
+
"description": "Determines which animation effect the skeleton will use.",
|
|
10238
|
+
"attribute": "effect"
|
|
10239
|
+
}
|
|
10240
|
+
],
|
|
10241
|
+
"attributes": [
|
|
10242
|
+
{
|
|
10243
|
+
"name": "effect",
|
|
10244
|
+
"type": {
|
|
10245
|
+
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
10246
|
+
},
|
|
10247
|
+
"default": "\"none\"",
|
|
10248
|
+
"description": "Determines which animation effect the skeleton will use.",
|
|
10249
|
+
"fieldName": "effect"
|
|
10250
|
+
}
|
|
10251
|
+
],
|
|
10252
|
+
"superclass": {
|
|
10253
|
+
"name": "LitElement",
|
|
10254
|
+
"package": "lit"
|
|
10255
|
+
},
|
|
10256
|
+
"status": "new",
|
|
10257
|
+
"category": "feedback",
|
|
10258
|
+
"displayName": null,
|
|
10259
|
+
"examples": [],
|
|
10260
|
+
"tagName": "nord-skeleton",
|
|
10261
|
+
"customElement": true
|
|
10262
|
+
}
|
|
10263
|
+
],
|
|
10264
|
+
"exports": [
|
|
10265
|
+
{
|
|
10266
|
+
"kind": "js",
|
|
10267
|
+
"name": "default",
|
|
10268
|
+
"declaration": {
|
|
10269
|
+
"name": "Skeleton",
|
|
10270
|
+
"module": "src/skeleton/Skeleton.ts"
|
|
10271
|
+
}
|
|
10272
|
+
},
|
|
10273
|
+
{
|
|
10274
|
+
"kind": "custom-element-definition",
|
|
10275
|
+
"name": "nord-skeleton",
|
|
10276
|
+
"declaration": {
|
|
10277
|
+
"name": "Skeleton",
|
|
10278
|
+
"module": "src/skeleton/Skeleton.ts"
|
|
10279
|
+
}
|
|
10280
|
+
}
|
|
10281
|
+
],
|
|
10282
|
+
"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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
|
|
10283
|
+
},
|
|
10279
10284
|
{
|
|
10280
10285
|
"kind": "javascript-module",
|
|
10281
10286
|
"path": "src/spinner/Spinner.ts",
|